Version Description
- Feature: Ability to set recipe type as "Non-Food" and not output metadata
- Feature: User and comment ratings accessible via REST API
- Feature: Compatible with Classic block in Gutenberg
- Improvement: Find Simple Recipe Pro ratings with the "Find Ratings" tool
- Fix: Ability to remove comment rating
- Fix: Prevent ratings migration from showing up on first install
Download this release
Release Info
Developer | BrechtVds |
Plugin | WP Recipe Maker |
Version | 2.4.0 |
Comparing to | |
See all releases |
Code changes from version 2.3.0 to 2.4.0
- assets/css/admin/manage.scss +5 -0
- assets/icons/pencil.svg +1 -0
- assets/icons/trash.svg +1 -0
- assets/js/admin/manage/datatable.js +1 -1
- assets/js/admin/modal/Recipe.js +3 -0
- assets/js/admin/modal/RecipeInit.js +5 -0
- assets/js/blocks.js +1 -0
- assets/js/blocks/recipe.js +38 -0
- assets/js/other/shortcode-tinymce.js +1 -1
- dist/admin.css +1 -1
- dist/admin.js +2 -2
- dist/amp.js +1 -1
- dist/blocks.js +1 -0
- includes/admin/class-wprm-migrations.php +1 -1
- includes/admin/class-wprm-seo-checker.php +7 -0
- includes/admin/class-wprm-tools-manager.php +5 -0
- includes/admin/manage/class-wprm-manage-recipes.php +1 -1
- includes/class-wp-recipe-maker.php +2 -1
- includes/public/class-wprm-api-rating.php +221 -0
- includes/public/class-wprm-assets.php +10 -0
- includes/public/class-wprm-comment-rating.php +21 -12
- includes/public/class-wprm-fallback-recipe.php +22 -0
- includes/public/class-wprm-metadata.php +12 -1
- includes/public/class-wprm-rating-database.php +33 -12
- includes/public/class-wprm-recipe-sanitizer.php +3 -0
- includes/public/class-wprm-recipe-saver.php +1 -0
- includes/public/class-wprm-recipe.php +13 -0
- includes/public/class-wprm-settings.php +3 -0
- readme.txt +12 -0
- templates/admin/menu/faq/whats_new.php +15 -0
- templates/admin/menu/import/import-overview.php +0 -3
- templates/admin/modal/tabs/recipe-details.php +17 -0
- templates/admin/settings/advanced.php +15 -0
- wp-recipe-maker.php +1 -1
assets/css/admin/manage.scss
CHANGED
@@ -61,6 +61,11 @@
|
|
61 |
.wprm-manage-recipes-seo-tooltip {
|
62 |
display: none;
|
63 |
}
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
|
66 |
.wprm-manage-recipes-actions-tooltip,
|
61 |
.wprm-manage-recipes-seo-tooltip {
|
62 |
display: none;
|
63 |
}
|
64 |
+
|
65 |
+
.wprm-manage-action-icon {
|
66 |
+
cursor: pointer;
|
67 |
+
margin-left: 5px;
|
68 |
+
}
|
69 |
}
|
70 |
|
71 |
.wprm-manage-recipes-actions-tooltip,
|
assets/icons/pencil.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" xml:space="preserve" width="16" height="16"><g class="nc-icon-wrapper" fill="#444444"><polygon data-color="color-2" fill="none" stroke="#444444" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points=" 13,0.5 15.5,3 7.5,11 4,12 5,8.5 "></polygon> <line data-color="color-2" fill="none" stroke="#444444" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="11" y1="2.5" x2="13.5" y2="5"></line> <path fill="none" stroke="#444444" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M13.5,9.5v5 c0,0.552-0.448,1-1,1h-11c-0.552,0-1-0.448-1-1v-11c0-0.552,0.448-1,1-1h5"></path> </g></svg>
|
assets/icons/trash.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16" height="16" viewBox="0 0 16 16"><g class="nc-icon-wrapper" fill="#444444"><path fill="none" stroke="#444444" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M2.5,6.5v7 c0,1.105,0.895,2,2,2h8c1.105,0,2-0.895,2-2v-7"></path> <line data-color="color-2" fill="none" stroke="#444444" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="1.5" y1="3.5" x2="15.5" y2="3.5"></line> <polyline data-color="color-2" fill="none" stroke="#444444" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points=" 6.5,3.5 6.5,0.5 10.5,0.5 10.5,3.5 "></polyline> <line fill="none" stroke="#444444" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="8.5" y1="7.5" x2="8.5" y2="12.5"></line> <line fill="none" stroke="#444444" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="11.5" y1="7.5" x2="11.5" y2="12.5"></line> <line fill="none" stroke="#444444" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="5.5" y1="7.5" x2="5.5" y2="12.5"></line> </g></svg>
|
assets/js/admin/manage/datatable.js
CHANGED
@@ -187,7 +187,7 @@ export default function initDatatable() {
|
|
187 |
},
|
188 |
});
|
189 |
|
190 |
-
jQuery('.wprm-manage-
|
191 |
delay: 0,
|
192 |
side: 'left',
|
193 |
});
|
187 |
},
|
188 |
});
|
189 |
|
190 |
+
jQuery('.wprm-manage-tooltip').tooltipster({
|
191 |
delay: 0,
|
192 |
side: 'left',
|
193 |
});
|
assets/js/admin/modal/Recipe.js
CHANGED
@@ -16,6 +16,7 @@ let Recipe = {
|
|
16 |
},
|
17 |
clear: function() {
|
18 |
// Recipe Details
|
|
|
19 |
utils.remove_media_image(jQuery('.wprm-recipe-image-container'));
|
20 |
jQuery('#wprm-recipe-name').val('');
|
21 |
RichEditor.clear(); // Recipe summary
|
@@ -68,6 +69,7 @@ let Recipe = {
|
|
68 |
utils.set_media_image(jQuery('.wprm-recipe-details-form .wprm-recipe-image-container'), recipe.image_id, recipe.image_url);
|
69 |
}
|
70 |
|
|
|
71 |
jQuery('#wprm-recipe-name').val(recipe.name);
|
72 |
RichEditor.set(recipe.summary);
|
73 |
jQuery('#wprm-recipe-servings-unit').val(recipe.servings_unit);
|
@@ -180,6 +182,7 @@ let Recipe = {
|
|
180 |
|
181 |
// Recipe Details
|
182 |
var recipe = {
|
|
|
183 |
image_id: jQuery('#wprm-recipe-image-id').val(),
|
184 |
name: jQuery('#wprm-recipe-name').val(),
|
185 |
summary: jQuery('#wprm-recipe-summary').val(),
|
16 |
},
|
17 |
clear: function() {
|
18 |
// Recipe Details
|
19 |
+
jQuery('#wprm-recipe-type').val('food').change();
|
20 |
utils.remove_media_image(jQuery('.wprm-recipe-image-container'));
|
21 |
jQuery('#wprm-recipe-name').val('');
|
22 |
RichEditor.clear(); // Recipe summary
|
69 |
utils.set_media_image(jQuery('.wprm-recipe-details-form .wprm-recipe-image-container'), recipe.image_id, recipe.image_url);
|
70 |
}
|
71 |
|
72 |
+
jQuery('#wprm-recipe-type').val(recipe.type).change();
|
73 |
jQuery('#wprm-recipe-name').val(recipe.name);
|
74 |
RichEditor.set(recipe.summary);
|
75 |
jQuery('#wprm-recipe-servings-unit').val(recipe.servings_unit);
|
182 |
|
183 |
// Recipe Details
|
184 |
var recipe = {
|
185 |
+
type: jQuery('#wprm-recipe-type').val(),
|
186 |
image_id: jQuery('#wprm-recipe-image-id').val(),
|
187 |
name: jQuery('#wprm-recipe-name').val(),
|
188 |
summary: jQuery('#wprm-recipe-summary').val(),
|
assets/js/admin/modal/RecipeInit.js
CHANGED
@@ -23,6 +23,11 @@ export default function recipeInit(recipe) {
|
|
23 |
// Initialize rich editor
|
24 |
RichEditor.init();
|
25 |
|
|
|
|
|
|
|
|
|
|
|
26 |
// Author
|
27 |
jQuery('#wprm-recipe-author-display').select2_wprm({
|
28 |
width: '95%'
|
23 |
// Initialize rich editor
|
24 |
RichEditor.init();
|
25 |
|
26 |
+
// Type
|
27 |
+
jQuery('#wprm-recipe-type').select2_wprm({
|
28 |
+
width: '95%'
|
29 |
+
});
|
30 |
+
|
31 |
// Author
|
32 |
jQuery('#wprm-recipe-author-display').select2_wprm({
|
33 |
width: '95%'
|
assets/js/blocks.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
//import './blocks/recipe';
|
assets/js/blocks/recipe.js
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { __ } = wp.i18n;
|
2 |
+
const { registerBlockType } = wp.blocks;
|
3 |
+
|
4 |
+
registerBlockType( 'wp-recipe-maker/recipe', {
|
5 |
+
title: __( 'Recipe' ),
|
6 |
+
icon: 'media-document',
|
7 |
+
keywords: [ 'wprm' ],
|
8 |
+
category: 'formatting',
|
9 |
+
transforms: {
|
10 |
+
from: [
|
11 |
+
{
|
12 |
+
type: 'shortcode',
|
13 |
+
tag: 'wprm-recipe',
|
14 |
+
attributes: {
|
15 |
+
id: {
|
16 |
+
type: 'number',
|
17 |
+
shortcode: ( { named: { id = '' } } ) => {
|
18 |
+
return id.replace( 'id', '' );
|
19 |
+
},
|
20 |
+
},
|
21 |
+
},
|
22 |
+
},
|
23 |
+
]
|
24 |
+
},
|
25 |
+
attributes: {
|
26 |
+
id: {
|
27 |
+
type: 'number',
|
28 |
+
},
|
29 |
+
},
|
30 |
+
edit: (props) => {
|
31 |
+
const { attributes, className } = props;
|
32 |
+
|
33 |
+
return <div className={ className }>Recipe { attributes.id }</div>
|
34 |
+
},
|
35 |
+
save: (props) => {
|
36 |
+
return null;
|
37 |
+
},
|
38 |
+
} );
|
assets/js/other/shortcode-tinymce.js
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
};
|
23 |
|
24 |
jQuery.post(wprm_temp_admin.ajax_url, ajax_data, function(preview) {
|
25 |
-
var content =
|
26 |
content = content.replace('>Loading WP Recipe Maker #' + id[1] + '<', '>' + preview + '<');
|
27 |
editor.setContent(content);
|
28 |
}, 'html');
|
22 |
};
|
23 |
|
24 |
jQuery.post(wprm_temp_admin.ajax_url, ajax_data, function(preview) {
|
25 |
+
var content = editor.getContent({format: 'raw'});
|
26 |
content = content.replace('>Loading WP Recipe Maker #' + id[1] + '<', '>' + preview + '<');
|
27 |
editor.setContent(content);
|
28 |
}, 'html');
|
dist/admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.select2_wprm-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2_wprm-container .select2_wprm-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2_wprm-container .select2_wprm-selection--single .select2_wprm-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2_wprm-container .select2_wprm-selection--single .select2_wprm-selection__clear{position:relative}.select2_wprm-container[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__rendered{padding-right:8px;padding-left:20px}.select2_wprm-container .select2_wprm-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2_wprm-container .select2_wprm-selection--multiple .select2_wprm-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2_wprm-container .select2_wprm-search--inline{float:left}.select2_wprm-container .select2_wprm-search--inline .select2_wprm-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2_wprm-container .select2_wprm-search--inline .select2_wprm-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2_wprm-dropdown{background-color:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2_wprm-results{display:block}.select2_wprm-results__options{list-style:none;margin:0;padding:0}.select2_wprm-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2_wprm-results__option[aria-selected]{cursor:pointer}.select2_wprm-container--open .select2_wprm-dropdown{left:0}.select2_wprm-container--open .select2_wprm-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2_wprm-container--open .select2_wprm-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2_wprm-search--dropdown{display:block;padding:4px}.select2_wprm-search--dropdown .select2_wprm-search__field{padding:4px;width:100%;box-sizing:border-box}.select2_wprm-search--dropdown .select2_wprm-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2_wprm-search--dropdown.select2_wprm-search--hide{display:none}.select2_wprm-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2_wprm-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2_wprm-container--default .select2_wprm-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__rendered{color:#444;line-height:28px}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__clear{cursor:pointer;float:right;font-weight:700}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__placeholder{color:#999}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__clear{float:left}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__arrow{left:1px;right:auto}.select2_wprm-container--default.select2_wprm-container--disabled .select2_wprm-selection--single{background-color:#eee;cursor:default}.select2_wprm-container--default.select2_wprm-container--disabled .select2_wprm-selection--single .select2_wprm-selection__clear{display:none}.select2_wprm-container--default.select2_wprm-container--open .select2_wprm-selection--single .select2_wprm-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2_wprm-container--default .select2_wprm-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__rendered li{list-style:none}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__placeholder{color:#999;margin-top:5px;float:left}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove:hover{color:#333}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-search--inline,.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice,.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__placeholder{float:right}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice{margin-left:5px;margin-right:auto}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove{margin-left:2px;margin-right:auto}.select2_wprm-container--default.select2_wprm-container--focus .select2_wprm-selection--multiple{border:1px solid #000;outline:0}.select2_wprm-container--default.select2_wprm-container--disabled .select2_wprm-selection--multiple{background-color:#eee;cursor:default}.select2_wprm-container--default.select2_wprm-container--disabled .select2_wprm-selection__choice__remove{display:none}.select2_wprm-container--default.select2_wprm-container--open.select2_wprm-container--above .select2_wprm-selection--multiple,.select2_wprm-container--default.select2_wprm-container--open.select2_wprm-container--above .select2_wprm-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2_wprm-container--default.select2_wprm-container--open.select2_wprm-container--below .select2_wprm-selection--multiple,.select2_wprm-container--default.select2_wprm-container--open.select2_wprm-container--below .select2_wprm-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2_wprm-container--default .select2_wprm-search--dropdown .select2_wprm-search__field{border:1px solid #aaa}.select2_wprm-container--default .select2_wprm-search--inline .select2_wprm-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2_wprm-container--default .select2_wprm-results>.select2_wprm-results__options{max-height:200px;overflow-y:auto}.select2_wprm-container--default .select2_wprm-results__option[role=group]{padding:0}.select2_wprm-container--default .select2_wprm-results__option[aria-disabled=true]{color:#999}.select2_wprm-container--default .select2_wprm-results__option[aria-selected=true]{background-color:#ddd}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option{padding-left:1em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__group{padding-left:0}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-1em;padding-left:2em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-2em;padding-left:3em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-3em;padding-left:4em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-4em;padding-left:5em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-5em;padding-left:6em}.select2_wprm-container--default .select2_wprm-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.select2_wprm-container--default .select2_wprm-results__group{cursor:default;display:block;padding:6px}.select2_wprm-container--classic .select2_wprm-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top,#fff 50%,#eee);background-image:-o-linear-gradient(top,#fff 50%,#eee 100%);background-image:linear-gradient(180deg,#fff 50%,#eee);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF",endColorstr="#FFEEEEEE",GradientType=0)}.select2_wprm-container--classic .select2_wprm-selection--single:focus{border:1px solid #5897fb}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__rendered{color:#444;line-height:28px}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__clear{cursor:pointer;float:right;font-weight:700;margin-right:10px}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__placeholder{color:#999}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top,#eee 50%,#ccc);background-image:-o-linear-gradient(top,#eee 50%,#ccc 100%);background-image:linear-gradient(180deg,#eee 50%,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE",endColorstr="#FFCCCCCC",GradientType=0)}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2_wprm-container--classic[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__clear{float:left}.select2_wprm-container--classic[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-selection--single{border:1px solid #5897fb}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-selection--single .select2_wprm-selection__arrow{background:transparent;border:none}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-selection--single .select2_wprm-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2_wprm-container--classic.select2_wprm-container--open.select2_wprm-container--above .select2_wprm-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top,#fff,#eee 50%);background-image:-o-linear-gradient(top,#fff 0,#eee 50%);background-image:linear-gradient(180deg,#fff 0,#eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF",endColorstr="#FFEEEEEE",GradientType=0)}.select2_wprm-container--classic.select2_wprm-container--open.select2_wprm-container--below .select2_wprm-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top,#eee 50%,#fff);background-image:-o-linear-gradient(top,#eee 50%,#fff 100%);background-image:linear-gradient(180deg,#eee 50%,#fff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE",endColorstr="#FFFFFFFF",GradientType=0)}.select2_wprm-container--classic .select2_wprm-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2_wprm-container--classic .select2_wprm-selection--multiple:focus{border:1px solid #5897fb}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__clear{display:none}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove:hover{color:#555}.select2_wprm-container--classic[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2_wprm-container--classic[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove{margin-left:2px;margin-right:auto}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-selection--multiple{border:1px solid #5897fb}.select2_wprm-container--classic.select2_wprm-container--open.select2_wprm-container--above .select2_wprm-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2_wprm-container--classic.select2_wprm-container--open.select2_wprm-container--below .select2_wprm-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2_wprm-container--classic .select2_wprm-search--dropdown .select2_wprm-search__field{border:1px solid #aaa;outline:0}.select2_wprm-container--classic .select2_wprm-search--inline .select2_wprm-search__field{outline:0;box-shadow:none}.select2_wprm-container--classic .select2_wprm-dropdown{background-color:#fff;border:1px solid transparent}.select2_wprm-container--classic .select2_wprm-dropdown--above{border-bottom:none}.select2_wprm-container--classic .select2_wprm-dropdown--below{border-top:none}.select2_wprm-container--classic .select2_wprm-results>.select2_wprm-results__options{max-height:200px;overflow-y:auto}.select2_wprm-container--classic .select2_wprm-results__option[role=group]{padding:0}.select2_wprm-container--classic .select2_wprm-results__option[aria-disabled=true]{color:grey}.select2_wprm-container--classic .select2_wprm-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2_wprm-container--classic .select2_wprm-results__group{cursor:default;display:block;padding:6px}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-dropdown{border-color:#5897fb}@-webkit-keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}to{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}@keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}to{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}.medium-editor-anchor-preview{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;left:0;line-height:1.4;max-width:280px;position:absolute;text-align:center;top:0;word-break:break-all;word-wrap:break-word;visibility:hidden;z-index:2000}.medium-editor-anchor-preview a{color:#fff;display:inline-block;margin:5px 5px 10px}.medium-editor-anchor-preview-active{visibility:visible}.medium-editor-dragover{background:#ddd}.medium-editor-image-loading{-webkit-animation:medium-editor-image-loading 1s infinite ease-in-out;animation:medium-editor-image-loading 1s infinite ease-in-out;background-color:#333;border-radius:100%;display:inline-block;height:40px;width:40px}.medium-editor-placeholder{position:relative}.medium-editor-placeholder:after{content:attr(data-placeholder)!important;font-style:italic;position:absolute;left:0;top:0;white-space:pre;padding:inherit;margin:inherit}.medium-editor-placeholder-relative{position:relative}.medium-editor-placeholder-relative:after{content:attr(data-placeholder)!important;font-style:italic;position:relative;white-space:pre;padding:inherit;margin:inherit}.medium-toolbar-arrow-over:before,.medium-toolbar-arrow-under:after{border-style:solid;content:"";display:block;height:0;left:50%;margin-left:-8px;position:absolute;width:0}.medium-toolbar-arrow-under:after{border-width:8px 8px 0}.medium-toolbar-arrow-over:before{border-width:0 8px 8px;top:-8px}.medium-editor-toolbar{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;left:0;position:absolute;top:0;visibility:hidden;z-index:2000}.medium-editor-toolbar ul{margin:0;padding:0}.medium-editor-toolbar li{float:left;list-style:none;margin:0;padding:0}.medium-editor-toolbar li button{box-sizing:border-box;cursor:pointer;display:block;font-size:14px;line-height:1.33;margin:0;padding:15px;text-decoration:none}.medium-editor-toolbar li button:focus{outline:none}.medium-editor-toolbar li .medium-editor-action-underline{text-decoration:underline}.medium-editor-toolbar li .medium-editor-action-pre{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px;font-weight:100;padding:15px 0}.medium-editor-toolbar-active{visibility:visible}.medium-editor-sticky-toolbar{position:fixed;top:1px}.medium-editor-relative-toolbar{position:relative}.medium-editor-toolbar-active.medium-editor-stalker-toolbar{-webkit-animation:medium-editor-pop-upwards .16s forwards linear;animation:medium-editor-pop-upwards .16s forwards linear}.medium-editor-action-bold{font-weight:bolder}.medium-editor-action-italic{font-style:italic}.medium-editor-toolbar-form{display:none}.medium-editor-toolbar-form a,.medium-editor-toolbar-form input{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.medium-editor-toolbar-form .medium-editor-toolbar-form-row{line-height:14px;margin-left:5px;padding-bottom:5px}.medium-editor-toolbar-form .medium-editor-toolbar-input,.medium-editor-toolbar-form label{border:none;box-sizing:border-box;font-size:14px;margin:0;padding:6px;width:316px;display:inline-block}.medium-editor-toolbar-form .medium-editor-toolbar-input:focus,.medium-editor-toolbar-form label:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;box-shadow:none;outline:0}.medium-editor-toolbar-form a{display:inline-block;font-size:24px;font-weight:bolder;margin:0 10px;text-decoration:none}.medium-editor-toolbar-form-active{display:block}.medium-editor-toolbar-actions:after{clear:both;content:"";display:table}.medium-editor-element{word-wrap:break-word;min-height:30px}.medium-editor-element img{max-width:100%}.medium-editor-element sub{vertical-align:sub}.medium-editor-element sup{vertical-align:super}.medium-editor-hidden{display:none}.medium-toolbar-arrow-under:after{border-color:#000 transparent transparent;top:40px}.medium-toolbar-arrow-over:before{border-color:transparent transparent #000}.medium-editor-toolbar{background-color:#000;border:none;border-radius:50px}.medium-editor-toolbar li button{background-color:transparent;border:none;box-sizing:border-box;color:#ccc;height:40px;min-width:40px;padding:5px 12px;-webkit-transition:background-color .2s ease-in,color .2s ease-in;transition:background-color .2s ease-in,color .2s ease-in}.medium-editor-toolbar li button:hover{background-color:#000;color:#a2d7c7}.medium-editor-toolbar li .medium-editor-button-first{border-bottom-left-radius:50px;border-top-left-radius:50px;padding-left:24px}.medium-editor-toolbar li .medium-editor-button-last{border-bottom-right-radius:50px;border-right:none;border-top-right-radius:50px;padding-right:24px}.medium-editor-toolbar li .medium-editor-button-active{background-color:#000;color:#a2d7c7}.medium-editor-toolbar-form{background:#000;border-radius:50px;color:#ccc;overflow:hidden}.medium-editor-toolbar-form .medium-editor-toolbar-input{background:#000;box-sizing:border-box;color:#ccc;height:40px;padding-left:16px;width:220px}.medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder{color:#f8f5f3;color:hsla(24,26%,96%,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder,.medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder{color:#f8f5f3;color:hsla(24,26%,96%,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder{color:#f8f5f3;color:hsla(24,26%,96%,.8)}.medium-editor-toolbar-form a{color:#ccc;-webkit-transform:translateY(2px);transform:translateY(2px)}.medium-editor-toolbar-form .medium-editor-toolbar-close{margin-right:16px}.medium-editor-toolbar-anchor-preview{background:#000;border-radius:50px;padding:5px 12px}.medium-editor-anchor-preview a{color:#ccc;text-decoration:none}.medium-editor-toolbar-actions button,.medium-editor-toolbar-actions li{border-radius:50px}.wprm-import p{max-width:600px}.wprm-import .wprm-import-error{max-width:600px;border:1px solid darkred;background-color:#ff9f9f;padding:10px}.wprm-import .wprm-import-recipes{width:100%}.wprm-import .wprm-import-recipes input[type=checkbox]{vertical-align:top}.wprm-import .wprm-import-recipes a{text-decoration:none}.wprm-import .wprm-import-recipes .dashicons.dashicons-visibility{font-size:18px}.wprm-import .wprm-import-recipes td:first-child{width:2%}.wprm-import .wprm-import-recipes td:nth-child(2){width:30%}.wprm-import #wprm-import-progress-container{width:100%;max-width:300px;height:20px;margin:10px 0;border:1px solid #000;background-color:#fff}.wprm-import #wprm-import-progress-bar{width:0;height:100%;background-color:#4484ce}.wprm-import #wprm-import-finished{display:none}table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable tfoot th,table.dataTable thead th{font-weight:700}table.dataTable thead td,table.dataTable thead th{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead td:active,table.dataTable thead th:active{outline:none}table.dataTable tfoot td,table.dataTable tfoot th{padding:10px 18px 6px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand;background-repeat:no-repeat;background-position:100%}table.dataTable thead .sorting{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7XQMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC)}table.dataTable thead .sorting_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=)}table.dataTable thead .sorting_asc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAW0lEQVQoz2NgoCm4w3Vnwh02wspK7/y6k01Ikdadx3f+37l9RxmfIsY7c4GKQHDiHUbcyhzvvIMq+3THBpci3jv7oIpAcMcdduzKEu/8vPMdDn/eiWQYBYMKAAC3ykIEuYQJUgAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAWUlEQVQoz2NgGAWDCtyJvPPzznc4/HknEbsy9js77vyHw313eHGZZ3PnE1TRuzuOuK1lvDMRqmzuHUZ87lO+cxuo6PEdLUIeyb7z604pYf+y3Zlwh4u2YQoAc7ZCBHH4jigAAAAASUVORK5CYII=)}table.dataTable tbody tr{background-color:#fff}table.dataTable tbody tr.selected{background-color:#b0bed9}table.dataTable tbody td,table.dataTable tbody th{padding:8px 10px}table.dataTable.display tbody td,table.dataTable.display tbody th,table.dataTable.row-border tbody td,table.dataTable.row-border tbody th{border-top:1px solid #ddd}table.dataTable.display tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.row-border tbody tr:first-child th{border-top:none}table.dataTable.cell-border tbody td,table.dataTable.cell-border tbody th{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr td:first-child,table.dataTable.cell-border tbody tr th:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child td,table.dataTable.cell-border tbody tr:first-child th{border-top:none}table.dataTable.display tbody tr.odd,table.dataTable.stripe tbody tr.odd{background-color:#f9f9f9}table.dataTable.display tbody tr.odd.selected,table.dataTable.stripe tbody tr.odd.selected{background-color:#abb9d3}table.dataTable.display tbody tr:hover,table.dataTable.hover tbody tr:hover{background-color:#f5f5f5}table.dataTable.display tbody tr:hover.selected,table.dataTable.hover tbody tr:hover.selected{background-color:#a9b7d1}table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3,table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3{background-color:#f9f9f9}table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3,table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3{background-color:#acbad4}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:#f5f5f5}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b3cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a7b5ce}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b6d0}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#f9f9f9}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fbfbfb}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fdfdfd}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad4}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#adbbd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ebebeb}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#eee}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap td,table.dataTable.nowrap th{white-space:nowrap}table.dataTable.compact thead td,table.dataTable.compact thead th{padding:4px 17px 4px 4px}table.dataTable.compact tbody td,table.dataTable.compact tbody th,table.dataTable.compact tfoot td,table.dataTable.compact tfoot th{padding:4px}table.dataTable td.dt-left,table.dataTable th.dt-left{text-align:left}table.dataTable td.dataTables_empty,table.dataTable td.dt-center,table.dataTable th.dt-center{text-align:center}table.dataTable td.dt-right,table.dataTable th.dt-right{text-align:right}table.dataTable td.dt-justify,table.dataTable th.dt-justify{text-align:justify}table.dataTable td.dt-nowrap,table.dataTable th.dt-nowrap{white-space:nowrap}table.dataTable tfoot td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable thead th.dt-head-left{text-align:left}table.dataTable tfoot td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable thead th.dt-head-center{text-align:center}table.dataTable tfoot td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable thead th.dt-head-right{text-align:right}table.dataTable tfoot td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable thead th.dt-head-justify{text-align:justify}table.dataTable tfoot td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable thead th.dt-head-nowrap{white-space:nowrap}table.dataTable tbody td.dt-body-left,table.dataTable tbody th.dt-body-left{text-align:left}table.dataTable tbody td.dt-body-center,table.dataTable tbody th.dt-body-center{text-align:center}table.dataTable tbody td.dt-body-right,table.dataTable tbody th.dt-body-right{text-align:right}table.dataTable tbody td.dt-body-justify,table.dataTable tbody th.dt-body-justify{text-align:justify}table.dataTable tbody td.dt-body-nowrap,table.dataTable tbody th.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable td,table.dataTable th{box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:.5em 1em;margin-left:2px;text-align:center;text-decoration:none!important;cursor:pointer;*cursor:hand;color:#333!important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333!important;border:1px solid #979797;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(100%,#dcdcdc));background:-webkit-linear-gradient(top,#fff,#dcdcdc);background:-moz-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-ms-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-o-linear-gradient(top,#fff 0,#dcdcdc 100%);background:linear-gradient(180deg,#fff 0,#dcdcdc)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{cursor:default;color:#666!important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:#fff!important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#585858),color-stop(100%,#111));background:-webkit-linear-gradient(top,#585858,#111);background:-moz-linear-gradient(top,#585858 0,#111 100%);background:-ms-linear-gradient(top,#585858 0,#111 100%);background:-o-linear-gradient(top,#585858 0,#111 100%);background:linear-gradient(180deg,#585858 0,#111)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#2b2b2b),color-stop(100%,#0c0c0c));background:-webkit-linear-gradient(top,#2b2b2b,#0c0c0c);background:-moz-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-ms-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-o-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:linear-gradient(180deg,#2b2b2b 0,#0c0c0c);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:#fff;background:-webkit-gradient(linear,left top,right top,color-stop(0,hsla(0,0%,100%,0)),color-stop(25%,hsla(0,0%,100%,.9)),color-stop(75%,hsla(0,0%,100%,.9)),color-stop(100%,hsla(0,0%,100%,0)));background:-webkit-linear-gradient(left,hsla(0,0%,100%,0),hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0));background:-moz-linear-gradient(left,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0) 100%);background:-ms-linear-gradient(left,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0) 100%);background:-o-linear-gradient(left,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0) 100%);background:linear-gradient(90deg,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0))}.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_paginate,.dataTables_wrapper .dataTables_processing{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollBody>table,.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width:767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:.5em}}@media screen and (max-width:640px){.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_length{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:.5em}}.tooltipster-base{display:flex;pointer-events:none;position:absolute}.tooltipster-box{flex:1 1 auto}.tooltipster-content{box-sizing:border-box;max-height:100%;max-width:100%;overflow:auto}.tooltipster-ruler{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;visibility:hidden}.tooltipster-fade{opacity:0;-webkit-transition-property:opacity;-moz-transition-property:opacity;-o-transition-property:opacity;-ms-transition-property:opacity;transition-property:opacity}.tooltipster-fade.tooltipster-show{opacity:1}.tooltipster-grow{-webkit-transform:scale(0);-moz-transform:scale(0);-o-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform;-webkit-backface-visibility:hidden}.tooltipster-grow.tooltipster-show{-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);transform:scale(1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-moz-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-ms-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-o-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-swing{opacity:0;-webkit-transform:rotate(4deg);-moz-transform:rotate(4deg);-o-transform:rotate(4deg);-ms-transform:rotate(4deg);transform:rotate(4deg);-webkit-transition-property:-webkit-transform,opacity;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform}.tooltipster-swing.tooltipster-show{opacity:1;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);-webkit-transition-timing-function:cubic-bezier(.23,.635,.495,1);-webkit-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);-moz-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);-ms-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);-o-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);transition-timing-function:cubic-bezier(.23,.635,.495,2.4)}.tooltipster-fall{-webkit-transition-property:top;-moz-transition-property:top;-o-transition-property:top;-ms-transition-property:top;transition-property:top;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-moz-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-ms-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-o-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-fall.tooltipster-initial{top:0!important}.tooltipster-fall.tooltipster-dying{-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;-ms-transition-property:all;transition-property:all;top:0!important;opacity:0}.tooltipster-slide{-webkit-transition-property:left;-moz-transition-property:left;-o-transition-property:left;-ms-transition-property:left;transition-property:left;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-moz-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-ms-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-o-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-slide.tooltipster-initial{left:-40px!important}.tooltipster-slide.tooltipster-dying{-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;-ms-transition-property:all;transition-property:all;left:0!important;opacity:0}@keyframes tooltipster-fading{0%{opacity:0}to{opacity:1}}.tooltipster-update-fade{animation:tooltipster-fading .4s}@keyframes tooltipster-rotating{25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}to{transform:rotate(0)}}.tooltipster-update-rotate{animation:tooltipster-rotating .6s}@keyframes tooltipster-scaling{50%{transform:scale(1.1)}to{transform:scale(1)}}.tooltipster-update-scale{animation:tooltipster-scaling .6s}.tooltipster-sidetip .tooltipster-box{background:#565656;border:2px solid #000;border-radius:4px}.tooltipster-sidetip.tooltipster-bottom .tooltipster-box{margin-top:8px}.tooltipster-sidetip.tooltipster-left .tooltipster-box{margin-right:8px}.tooltipster-sidetip.tooltipster-right .tooltipster-box{margin-left:8px}.tooltipster-sidetip.tooltipster-top .tooltipster-box{margin-bottom:8px}.tooltipster-sidetip .tooltipster-content{color:#fff;line-height:18px;padding:6px 14px}.tooltipster-sidetip .tooltipster-arrow{overflow:hidden;position:absolute}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow{height:10px;margin-left:-10px;top:0;width:20px}.tooltipster-sidetip.tooltipster-left .tooltipster-arrow{height:20px;margin-top:-10px;right:0;top:0;width:10px}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow{height:20px;margin-top:-10px;left:0;top:0;width:10px}.tooltipster-sidetip.tooltipster-top .tooltipster-arrow{bottom:0;height:10px;margin-left:-10px;width:20px}.tooltipster-sidetip .tooltipster-arrow-background,.tooltipster-sidetip .tooltipster-arrow-border{height:0;position:absolute;width:0}.tooltipster-sidetip .tooltipster-arrow-background{border:10px solid transparent}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-background{border-bottom-color:#565656;left:0;top:3px}.tooltipster-sidetip.tooltipster-left .tooltipster-arrow-background{border-left-color:#565656;left:-3px;top:0}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-background{border-right-color:#565656;left:3px;top:0}.tooltipster-sidetip.tooltipster-top .tooltipster-arrow-background{border-top-color:#565656;left:0;top:-3px}.tooltipster-sidetip .tooltipster-arrow-border{border:10px solid transparent;left:0;top:0}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-border{border-bottom-color:#000}.tooltipster-sidetip.tooltipster-left .tooltipster-arrow-border{border-left-color:#000}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-border{border-right-color:#000}.tooltipster-sidetip.tooltipster-top .tooltipster-arrow-border{border-top-color:#000}.tooltipster-sidetip .tooltipster-arrow-uncropped{position:relative}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-uncropped{top:-10px}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-uncropped{left:-10px}.wprm-manage .wprm-manage-header{margin-top:20px}.wprm-manage .wprm-manage-recipes-filters .select2_wprm-container,.wprm-manage .wprm-manage-recipes-filters .wprm-manage-recipes-filter{margin-left:5px;z-index:100;max-width:100%}.wprm-manage .wprm-manage-datatable{display:none}.wprm-manage .wprm-manage-datatable .wprm-icon{cursor:pointer;color:#444}.wprm-manage .dataTables_wrapper{margin-top:20px}.wprm-manage .dataTables_wrapper .wprm-manage-datatable{display:table}.wprm-manage .wprm-manage-recipes-rating-details{font-size:.7em}.wprm-manage .wprm-manage-recipes-seo{margin:0 auto;width:15px;height:15px;border:1px solid #444;border-radius:50%}.wprm-manage .wprm-manage-recipes-seo.wprm-manage-recipes-seo-bad{background-color:#e74c3c}.wprm-manage .wprm-manage-recipes-seo.wprm-manage-recipes-seo-warning{background-color:#e67e22}.wprm-manage .wprm-manage-recipes-seo.wprm-manage-recipes-seo-rating{background-color:#f1c40f}.wprm-manage .wprm-manage-recipes-seo.wprm-manage-recipes-seo-good{background-color:#27ae60}.wprm-manage .wprm-manage-recipes-seo:hover{cursor:pointer}.wprm-manage .wprm-manage-recipes-seo-tooltip{display:none}.wprm-manage-custom-taxonomies-actions-tooltip,.wprm-manage-ingredients-actions-tooltip,.wprm-manage-recipes-actions-tooltip,.wprm-manage-taxonomies-actions-tooltip{text-align:right;min-width:250px;font-size:14px}.wprm-manage-custom-taxonomies-actions-tooltip .tooltip-header,.wprm-manage-ingredients-actions-tooltip .tooltip-header,.wprm-manage-recipes-actions-tooltip .tooltip-header,.wprm-manage-taxonomies-actions-tooltip .tooltip-header{margin-bottom:5px;font-weight:700}.wprm-manage-custom-taxonomies-actions-tooltip a,.wprm-manage-ingredients-actions-tooltip a,.wprm-manage-recipes-actions-tooltip a,.wprm-manage-taxonomies-actions-tooltip a{color:#fff;display:block;text-decoration:none}.wprm-manage-custom-taxonomies-actions-tooltip a:hover,.wprm-manage-ingredients-actions-tooltip a:hover,.wprm-manage-recipes-actions-tooltip a:hover,.wprm-manage-taxonomies-actions-tooltip a:hover{text-decoration:underline}.wprm-giveaway-notice{border:1px solid #006400;background-color:rgba(0,255,0,.15);padding:10px;margin-bottom:10px}.wprm-feedback-notice{border:1px solid #0085ba;background-color:rgba(0,133,186,.15);padding:10px;margin-bottom:10px}.wprm-feedback-notice button{margin:5px 5px 0 0!important}.wprm-easyrecipe-warning{display:none;border:1px solid darkred;background-color:rgba(255,0,0,.15);padding:10px;padding-bottom:0;margin-bottom:10px}.mce-floatpanel{z-index:100101!important}.select2_wprm-container{z-index:100075}.select2_wprm-container.select2_wprm-container--focus .select2_wprm-selection{border-color:#5b9dd9}.select2_wprm-container li{margin:0}.select2_wprm-container .select2_wprm-selection{border-color:#ddd}.medium-editor-anchor-preview,.medium-editor-toolbar{z-index:100080}.medium-editor-anchor-preview{font-size:12px}.medium-editor-element{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);min-height:68px;padding:3px 5px}.medium-editor-element:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.medium-editor-element:after{font-style:normal;color:#999;opacity:.5;font-size:14px;line-height:28px}.medium-editor-element p:first-child{margin-top:0}.medium-editor-element p:last-child{margin-bottom:0}.wprm-modal-hint{max-width:400px;margin-bottom:20px}.wprm-modal-hint .wprm-modal-hint-header{font-weight:700;font-variant:small-caps}.wprm-modal-hint .wprm-modal-hint-text{font-style:italic}.wprm-modal-container{display:none}.wprm-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100000}.wprm-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:100050}.wprm-modal *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wprm-modal-close{position:absolute;top:0;right:0;width:50px;height:50px;padding:0;z-index:1000;text-decoration:none!important;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.wprm-modal-close .wprm-modal-icon:before{content:"\F158";font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.wprm-modal-close:hover .wprm-modal-icon:before{color:#00a0d2}.wprm-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.wprm-modal-content ::-webkit-input-placeholder{color:#999;opacity:.5}.wprm-modal-content :-moz-placeholder,.wprm-modal-content ::-moz-placeholder{color:#999;opacity:.5}.wprm-modal-content :-ms-input-placeholder{color:#999;opacity:.5}.wprm-frame{overflow:hidden;right:0}.wprm-frame,.wprm-frame-menu{position:absolute;left:0;bottom:0;top:0}.wprm-frame-menu{width:200px;z-index:150}.wprm-frame-title .dashicons,.wprm-frame.hide-router .wprm-frame-router{display:none}.wprm-frame-title{top:0;height:50px}.wprm-frame-router,.wprm-frame-title{z-index:200;left:200px;position:absolute;right:0}.wprm-menu-item{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wprm-menu{position:absolute;left:0;margin:0;padding:10px 0;border-right-width:1px;border-right-style:solid;border-right-color:#ccc;user-select:none}.wprm-menu-hidden{padding:5px 5px 0 10px;font-style:italic}.wprm-menu,.wprm-sidebar{top:0;bottom:0;background:#f3f3f3;right:0}.wprm-menu .active,.wprm-menu .active:hover{color:#23282d;font-weight:700}.wprm-menu>a{display:block;position:relative;padding:8px 20px;margin:0;color:#0073aa}.wprm-menu>a,.wprm-router>a{line-height:18px;font-size:14px;text-decoration:none}.wprm-frame a{border-bottom:none;color:#0073aa}.wprm-frame .hidden{display:none}.wprm-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.wprm-frame-title h1{padding:0 16px;font-size:22px;line-height:50px;margin:0}.wprm-frame-router{top:50px;height:36px}.wprm-router{position:relative;padding:0 6px;margin:0;clear:both;user-select:none}.wprm-router:not(.active){display:none}.wprm-router>a{position:relative;float:left;padding:8px 10px 9px;margin:0;height:18px}.wprm-router a{-webkit-transition:none;transition:none}.wprm-router>a:last-child{border-right:0}.wprm-router .active,.wprm-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:none}.wprm-router .active,.wprm-router .active:hover{color:#32373c}.wprm-frame-content{position:absolute;top:84px;left:200px;right:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.wprm-frame-content-tab{margin:20px}.wprm-frame-content-tab:not(.active){display:none}.wprm-frame-toolbar{left:200px;bottom:0}.wprm-frame-toolbar,.wprm-toolbar{position:absolute;right:0;height:60px;z-index:100}.wprm-toolbar{top:0;left:0;padding:0 16px;border:0 solid #ddd;overflow:hidden}.wprm-modal-content .wprm-toolbar-primary.search-form{width:33%}.wprm-toolbar-primary{float:right;height:100%}.wprm-modal-content .wprm-toolbar-primary .wprm-button{float:right}.wprm-button-action-save{display:none}.wprm-toolbar-primary>.wprm-button,.wprm-toolbar-primary>.wprm-button-group{margin-left:10px;float:left;margin-top:15px}@media only screen and (max-width:900px){.wprm-frame:not(.hide-menu) .wprm-frame-title .dashicons{display:inline-block;line-height:50px}.wprm-frame:not(.hide-menu) .wprm-frame-menu{position:static;width:0}.wprm-frame:not(.hide-menu) .wprm-frame-content,.wprm-frame:not(.hide-menu) .wprm-frame-router,.wprm-frame:not(.hide-menu) .wprm-frame-title,.wprm-frame:not(.hide-menu) .wprm-frame-toolbar,.wprm-frame:not(.hide-menu) .wprm-menu.visible{left:0}.wprm-frame:not(.hide-menu) .wprm-menu{width:auto;max-width:80%;overflow:auto;z-index:2000;top:50px;left:-300px;right:auto;bottom:auto;padding:5px 0;border:1px solid #ccc}.wprm-frame:not(.hide-menu) .wprm-menu>a.active{display:none}.wprm-frame:not(.hide-menu) .wprm-menu>a{padding:12px 16px;font-size:16px}.wprm-frame:not(.hide-menu) .wprm-menu .separator{margin:5px 10px}.wprm-frame:not(.hide-menu) .wprm-frame-title h1{color:#0073aa;line-height:3;font-size:18px;float:left;cursor:pointer}}@media only screen and (max-width:640px),screen and (max-height:400px){.wprm-modal{position:fixed;top:0;left:0;right:0;bottom:0}.wprm-modal .wprm-frame-title{height:40px}}@media only screen and (max-width:480px){.wprm-frame:not(.hide-menu) .wprm-frame-title .dashicons{line-height:40px}.wprm-frame-router,.wprm-frame:not(.hide-menu) .wprm-menu{top:40px}.wprm-frame:not(.hide-menu) .wprm-frame-title h1,.wprm-modal .wprm-frame-title h1{font-size:18px;line-height:40px}.wprm-frame-content{top:74px}}.wprm-recipe-form{max-width:600px}.wprm-recipe-form .wprm-recipe-form-container{margin-bottom:15px;vertical-align:top}.wprm-recipe-form .wprm-recipe-form-container-halfs{display:inline-block;width:50%}.wprm-recipe-form .wprm-recipe-form-container-thirds{display:inline-block;width:33.3%}.wprm-recipe-form label{display:block;font-weight:700;margin-bottom:5px}.wprm-recipe-form input[type=number],.wprm-recipe-form input[type=text]{margin:0;width:100%;max-width:120px;height:34px;line-height:34px}.wprm-recipe-form input[type=number][type=number],.wprm-recipe-form input[type=text][type=number]{max-width:65px}.wprm-recipe-form input[type=number].select2_wprm-search__field,.wprm-recipe-form input[type=text].select2_wprm-search__field{height:18px;line-height:18px}.wprm-recipe-form select{width:100%}.wprm-recipe-form textarea{width:100%;resize:vertical}@media only screen and (max-width:480px){.wprm-recipe-form .wprm-recipe-form-container-halfs,.wprm-recipe-form .wprm-recipe-form-container-thirds{display:block;width:100%}}.wprm-recipe-import-text-form .import-text-buttons{margin-bottom:10px}.wprm-recipe-import-text-form .import-text-step{display:none}.wprm-recipe-import-text-form .import-text-step#import-text-step-input{display:block}.wprm-recipe-import-text-form #import-text-highlight-sandbox,.wprm-recipe-import-text-form .import-text-input{margin-top:10px}.wprm-recipe-import-text-form #import-text-ingredient-groups label,.wprm-recipe-import-text-form #import-text-instruction-groups label{display:inline;font-weight:400}.wprm-recipe-import-text-form .import-text-group-warning{margin-top:10px;display:none}.wprm-recipe-import-text-form #import-text-highlight-sandbox{display:none;max-height:400px;overflow:scroll;padding:10px;border:1px dashed #999}.wprm-loader{display:none}.wprm-loader,.wprm-loader:after,.wprm-loader:before{border-radius:50%;width:1.5em;height:1.5em;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation:load7 1.8s infinite ease-in-out;animation:load7 1.8s infinite ease-in-out}.wprm-loader{color:#444;font-size:10px;margin:20px auto;position:relative;text-indent:-9999em;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation-delay:-.16s;animation-delay:-.16s}.wprm-loader:after,.wprm-loader:before{content:"";position:absolute;top:0}.wprm-loader:before{left:-2.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.wprm-loader:after{left:2.5em}@-webkit-keyframes load7{0%,80%,to{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}@keyframes load7{0%,80%,to{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}.wprm-recipe-details-form input#wprm-recipe-name{max-width:450px}.wprm-recipe-details-form input#wprm-recipe-author-link,.wprm-recipe-details-form input#wprm-recipe-author-name{max-width:none}.wprm-recipe-details-form input#wprm-recipe-calories{max-width:70px}.wprm-recipe-details-form .wprm-recipe-image-preview{float:right;max-width:100px}.wprm-recipe-details-form .wprm-recipe-image-preview img{max-width:100%;height:auto}.wprm-recipe-details-form .wprm-recipe-summary-container{clear:both}@media only screen and (max-width:480px){.wprm-recipe-details-form .wprm-recipe-image-preview{float:none;margin:10px auto}}.wprm-recipe-ingredients-form,.wprm-recipe-instructions-form{max-width:750px;margin-bottom:15px}.wprm-recipe-ingredients-form input,.wprm-recipe-instructions-form input{margin:0;width:100%;height:34px;line-height:34px}.wprm-recipe-ingredients-form textarea,.wprm-recipe-instructions-form textarea{width:100%;resize:vertical}.wprm-recipe-ingredients-form ::-webkit-input-placeholder,.wprm-recipe-instructions-form ::-webkit-input-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form :-moz-placeholder,.wprm-recipe-ingredients-form ::-moz-placeholder,.wprm-recipe-instructions-form :-moz-placeholder,.wprm-recipe-instructions-form ::-moz-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form :-ms-input-placeholder,.wprm-recipe-instructions-form :-ms-input-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form table,.wprm-recipe-instructions-form table{width:100%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th,.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th{text-align:left}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:first-child,.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(6),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:first-child,.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(6){width:5%;text-align:center}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(2),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(2){width:10%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(3),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(3){width:15%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(4),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(4){width:40%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(5),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(5){width:25%}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th,.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th{text-align:left}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:first-child,.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(4),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:first-child,.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(4){width:5%;text-align:center}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(2),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(2){width:65%}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(3),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(3){width:25%}.wprm-recipe-ingredients-form table .wprm-recipe-ingredients-placeholder,.wprm-recipe-ingredients-form table .wprm-recipe-instructions-placeholder,.wprm-recipe-instructions-form table .wprm-recipe-ingredients-placeholder,.wprm-recipe-instructions-form table .wprm-recipe-instructions-placeholder{display:none}.wprm-recipe-ingredients-form table td,.wprm-recipe-instructions-form table td{text-align:left;vertical-align:top}.wprm-recipe-ingredients-form table td:first-child,.wprm-recipe-ingredients-form table td:last-child,.wprm-recipe-instructions-form table td:first-child,.wprm-recipe-instructions-form table td:last-child{text-align:center;vertical-align:middle}.wprm-recipe-ingredients-form .ui-sortable-helper,.wprm-recipe-instructions-form .ui-sortable-helper{display:table}.wprm-recipe-ingredients-form .ui-sortable-helper .wprm-recipe-instruction-text,.wprm-recipe-instructions-form .ui-sortable-helper .wprm-recipe-instruction-text{min-width:200px}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort{cursor:move}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete{cursor:pointer}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort{color:#999;opacity:.5}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete:hover,.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort:hover,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete:hover,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort:hover{color:#444;opacity:1}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-actions,.wprm-recipe-ingredients-form .wprm-recipe-instructions-actions,.wprm-recipe-instructions-form .wprm-recipe-ingredients-actions,.wprm-recipe-instructions-form .wprm-recipe-instructions-actions{margin:10px}.wprm-recipe-ingredients-form .wprm-recipe-image-preview,.wprm-recipe-instructions-form .wprm-recipe-image-preview{max-width:75px}.wprm-recipe-ingredients-form .wprm-recipe-image-preview img,.wprm-recipe-instructions-form .wprm-recipe-image-preview img{max-width:100%;height:auto}.wprm-shortcode-builder .wprm-shortcode-builder-container{margin-bottom:15px;vertical-align:top}.wprm-shortcode-builder .wprm-shortcode-builder-container-halfs{display:inline-block;width:50%}.wprm-shortcode-builder .wprm-shortcode-builder-container-thirds{display:inline-block;width:33.3%}.wprm-shortcode-builder label{display:block;font-weight:700;margin-bottom:5px}.wprm-shortcode-builder .wprm-shortcode-builder-helper{margin-left:5px;font-size:.8em;font-style:italic}.wprm-shortcode-builder input{margin:0;width:100%;max-width:250px;height:34px;line-height:34px}.wprm-shortcode-builder input.select2_wprm-search__field{height:18px;line-height:18px}.wprm-shortcode-builder select{width:250px}.wprm-settings select{min-width:200px}.wprm-settings .select2_wprm-container{z-index:99000}.wprm-settings #template_font_size{width:60px}.wprm-settings .template-preview-container .template-preview{float:left;text-align:center;width:250px;height:230px;overflow:hidden;margin:5px}.wprm-settings .template-preview-container .template-name{font-weight:700;line-height:30px}.wprm-settings .template-preview-container .template-screenshot{width:250px}.wprm-settings .template-preview-container .template-no-screenshot{width:250px;height:200px;line-height:200px;border:1px dashed #999;box-sizing:border-box}.wprm-tools #wprm-tools-progress-container{width:100%;max-width:300px;height:20px;margin:10px 0;border:1px solid #000;background-color:#fff}.wprm-tools #wprm-tools-progress-bar{width:0;height:100%;background-color:#4484ce}.wprm-tools #wprm-tools-finished{display:none}.wprm-addons .wprm-addons-bundle-container{box-sizing:border-box;width:30%;float:left;margin-right:1%;padding:0 20px 20px;border:1px dashed gray}.wprm-addons .wprm-addons-bundle-container .wprm-addons-button-container,.wprm-addons .wprm-addons-bundle-container h2,.wprm-addons .wprm-addons-bundle-container h3{text-align:center}.wprm-addons .wprm-addons-bundle-container h3{font-size:1.1em}.wprm-addons .wprm-drip-form{margin:20px 0}.wprm-addons .wprm-drip-form input{width:100%;max-width:400px;margin:10px 0}.wprm-addons .wprm-drip-form input[type=submit]{max-width:250px;margin-bottom:0}.wprm-addons .wprm-drip-form .wprm-disclaimer{font-size:.8em}@media only screen and (max-width:640px){.wprm-addons .wprm-addons-bundle-container{width:100%;float:none;margin-bottom:20px}}.comment-form-wprm-rating label{display:none}.comment-form-wprm-rating .wprm-rating-star{cursor:pointer}.comment-form-wprm-rating .wprm-rating-star svg{vertical-align:middle;width:16px;height:16px;margin:0}.comment-form-wprm-rating .wprm-rating-star.rated svg polygon{fill:#000}.wprm-faq p{max-width:650px}.wprm-faq ul{list-style-type:square}.wprm-faq .wprm-drip-form{margin:20px 0}.wprm-faq .wprm-drip-form input{width:100%;max-width:400px;margin:10px 0}.wprm-faq .wprm-drip-form input[type=submit]{max-width:350px;margin-bottom:0}.wprm-faq .wprm-drip-form .wprm-disclaimer{font-size:.8em}.wprm-badge{background:#fff url(assets/9db239b0b8817856fa53552be937ab40.png) no-repeat;background-position:center 20px;-webkit-background-size:128px 128px;background-size:128px 128px;color:#333;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:155px;height:25px;display:inline-block;width:150px;text-rendering:optimizeLegibility;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.about-wrap .wprm-badge{position:absolute;top:0;right:0}@media only screen and (max-width:500px){.about-wrap .wprm-badge{position:relative;margin-bottom:1.5em;width:100%}}
|
1 |
+
.select2_wprm-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2_wprm-container .select2_wprm-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2_wprm-container .select2_wprm-selection--single .select2_wprm-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2_wprm-container .select2_wprm-selection--single .select2_wprm-selection__clear{position:relative}.select2_wprm-container[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__rendered{padding-right:8px;padding-left:20px}.select2_wprm-container .select2_wprm-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2_wprm-container .select2_wprm-selection--multiple .select2_wprm-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2_wprm-container .select2_wprm-search--inline{float:left}.select2_wprm-container .select2_wprm-search--inline .select2_wprm-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2_wprm-container .select2_wprm-search--inline .select2_wprm-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2_wprm-dropdown{background-color:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2_wprm-results{display:block}.select2_wprm-results__options{list-style:none;margin:0;padding:0}.select2_wprm-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2_wprm-results__option[aria-selected]{cursor:pointer}.select2_wprm-container--open .select2_wprm-dropdown{left:0}.select2_wprm-container--open .select2_wprm-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2_wprm-container--open .select2_wprm-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2_wprm-search--dropdown{display:block;padding:4px}.select2_wprm-search--dropdown .select2_wprm-search__field{padding:4px;width:100%;box-sizing:border-box}.select2_wprm-search--dropdown .select2_wprm-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2_wprm-search--dropdown.select2_wprm-search--hide{display:none}.select2_wprm-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2_wprm-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2_wprm-container--default .select2_wprm-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__rendered{color:#444;line-height:28px}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__clear{cursor:pointer;float:right;font-weight:700}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__placeholder{color:#999}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2_wprm-container--default .select2_wprm-selection--single .select2_wprm-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__clear{float:left}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__arrow{left:1px;right:auto}.select2_wprm-container--default.select2_wprm-container--disabled .select2_wprm-selection--single{background-color:#eee;cursor:default}.select2_wprm-container--default.select2_wprm-container--disabled .select2_wprm-selection--single .select2_wprm-selection__clear{display:none}.select2_wprm-container--default.select2_wprm-container--open .select2_wprm-selection--single .select2_wprm-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2_wprm-container--default .select2_wprm-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__rendered li{list-style:none}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__placeholder{color:#999;margin-top:5px;float:left}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2_wprm-container--default .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove:hover{color:#333}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-search--inline,.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice,.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__placeholder{float:right}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice{margin-left:5px;margin-right:auto}.select2_wprm-container--default[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove{margin-left:2px;margin-right:auto}.select2_wprm-container--default.select2_wprm-container--focus .select2_wprm-selection--multiple{border:1px solid #000;outline:0}.select2_wprm-container--default.select2_wprm-container--disabled .select2_wprm-selection--multiple{background-color:#eee;cursor:default}.select2_wprm-container--default.select2_wprm-container--disabled .select2_wprm-selection__choice__remove{display:none}.select2_wprm-container--default.select2_wprm-container--open.select2_wprm-container--above .select2_wprm-selection--multiple,.select2_wprm-container--default.select2_wprm-container--open.select2_wprm-container--above .select2_wprm-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2_wprm-container--default.select2_wprm-container--open.select2_wprm-container--below .select2_wprm-selection--multiple,.select2_wprm-container--default.select2_wprm-container--open.select2_wprm-container--below .select2_wprm-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2_wprm-container--default .select2_wprm-search--dropdown .select2_wprm-search__field{border:1px solid #aaa}.select2_wprm-container--default .select2_wprm-search--inline .select2_wprm-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2_wprm-container--default .select2_wprm-results>.select2_wprm-results__options{max-height:200px;overflow-y:auto}.select2_wprm-container--default .select2_wprm-results__option[role=group]{padding:0}.select2_wprm-container--default .select2_wprm-results__option[aria-disabled=true]{color:#999}.select2_wprm-container--default .select2_wprm-results__option[aria-selected=true]{background-color:#ddd}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option{padding-left:1em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__group{padding-left:0}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-1em;padding-left:2em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-2em;padding-left:3em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-3em;padding-left:4em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-4em;padding-left:5em}.select2_wprm-container--default .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option .select2_wprm-results__option{margin-left:-5em;padding-left:6em}.select2_wprm-container--default .select2_wprm-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.select2_wprm-container--default .select2_wprm-results__group{cursor:default;display:block;padding:6px}.select2_wprm-container--classic .select2_wprm-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top,#fff 50%,#eee);background-image:-o-linear-gradient(top,#fff 50%,#eee 100%);background-image:linear-gradient(180deg,#fff 50%,#eee);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF",endColorstr="#FFEEEEEE",GradientType=0)}.select2_wprm-container--classic .select2_wprm-selection--single:focus{border:1px solid #5897fb}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__rendered{color:#444;line-height:28px}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__clear{cursor:pointer;float:right;font-weight:700;margin-right:10px}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__placeholder{color:#999}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top,#eee 50%,#ccc);background-image:-o-linear-gradient(top,#eee 50%,#ccc 100%);background-image:linear-gradient(180deg,#eee 50%,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE",endColorstr="#FFCCCCCC",GradientType=0)}.select2_wprm-container--classic .select2_wprm-selection--single .select2_wprm-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2_wprm-container--classic[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__clear{float:left}.select2_wprm-container--classic[dir=rtl] .select2_wprm-selection--single .select2_wprm-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-selection--single{border:1px solid #5897fb}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-selection--single .select2_wprm-selection__arrow{background:transparent;border:none}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-selection--single .select2_wprm-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2_wprm-container--classic.select2_wprm-container--open.select2_wprm-container--above .select2_wprm-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top,#fff,#eee 50%);background-image:-o-linear-gradient(top,#fff 0,#eee 50%);background-image:linear-gradient(180deg,#fff 0,#eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFFFFFFF",endColorstr="#FFEEEEEE",GradientType=0)}.select2_wprm-container--classic.select2_wprm-container--open.select2_wprm-container--below .select2_wprm-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top,#eee 50%,#fff);background-image:-o-linear-gradient(top,#eee 50%,#fff 100%);background-image:linear-gradient(180deg,#eee 50%,#fff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#FFEEEEEE",endColorstr="#FFFFFFFF",GradientType=0)}.select2_wprm-container--classic .select2_wprm-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2_wprm-container--classic .select2_wprm-selection--multiple:focus{border:1px solid #5897fb}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__clear{display:none}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2_wprm-container--classic .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove:hover{color:#555}.select2_wprm-container--classic[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2_wprm-container--classic[dir=rtl] .select2_wprm-selection--multiple .select2_wprm-selection__choice__remove{margin-left:2px;margin-right:auto}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-selection--multiple{border:1px solid #5897fb}.select2_wprm-container--classic.select2_wprm-container--open.select2_wprm-container--above .select2_wprm-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2_wprm-container--classic.select2_wprm-container--open.select2_wprm-container--below .select2_wprm-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2_wprm-container--classic .select2_wprm-search--dropdown .select2_wprm-search__field{border:1px solid #aaa;outline:0}.select2_wprm-container--classic .select2_wprm-search--inline .select2_wprm-search__field{outline:0;box-shadow:none}.select2_wprm-container--classic .select2_wprm-dropdown{background-color:#fff;border:1px solid transparent}.select2_wprm-container--classic .select2_wprm-dropdown--above{border-bottom:none}.select2_wprm-container--classic .select2_wprm-dropdown--below{border-top:none}.select2_wprm-container--classic .select2_wprm-results>.select2_wprm-results__options{max-height:200px;overflow-y:auto}.select2_wprm-container--classic .select2_wprm-results__option[role=group]{padding:0}.select2_wprm-container--classic .select2_wprm-results__option[aria-disabled=true]{color:grey}.select2_wprm-container--classic .select2_wprm-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2_wprm-container--classic .select2_wprm-results__group{cursor:default;display:block;padding:6px}.select2_wprm-container--classic.select2_wprm-container--open .select2_wprm-dropdown{border-color:#5897fb}@-webkit-keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}to{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}@keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}to{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}.medium-editor-anchor-preview{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;left:0;line-height:1.4;max-width:280px;position:absolute;text-align:center;top:0;word-break:break-all;word-wrap:break-word;visibility:hidden;z-index:2000}.medium-editor-anchor-preview a{color:#fff;display:inline-block;margin:5px 5px 10px}.medium-editor-anchor-preview-active{visibility:visible}.medium-editor-dragover{background:#ddd}.medium-editor-image-loading{-webkit-animation:medium-editor-image-loading 1s infinite ease-in-out;animation:medium-editor-image-loading 1s infinite ease-in-out;background-color:#333;border-radius:100%;display:inline-block;height:40px;width:40px}.medium-editor-placeholder{position:relative}.medium-editor-placeholder:after{content:attr(data-placeholder)!important;font-style:italic;position:absolute;left:0;top:0;white-space:pre;padding:inherit;margin:inherit}.medium-editor-placeholder-relative{position:relative}.medium-editor-placeholder-relative:after{content:attr(data-placeholder)!important;font-style:italic;position:relative;white-space:pre;padding:inherit;margin:inherit}.medium-toolbar-arrow-over:before,.medium-toolbar-arrow-under:after{border-style:solid;content:"";display:block;height:0;left:50%;margin-left:-8px;position:absolute;width:0}.medium-toolbar-arrow-under:after{border-width:8px 8px 0}.medium-toolbar-arrow-over:before{border-width:0 8px 8px;top:-8px}.medium-editor-toolbar{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;left:0;position:absolute;top:0;visibility:hidden;z-index:2000}.medium-editor-toolbar ul{margin:0;padding:0}.medium-editor-toolbar li{float:left;list-style:none;margin:0;padding:0}.medium-editor-toolbar li button{box-sizing:border-box;cursor:pointer;display:block;font-size:14px;line-height:1.33;margin:0;padding:15px;text-decoration:none}.medium-editor-toolbar li button:focus{outline:none}.medium-editor-toolbar li .medium-editor-action-underline{text-decoration:underline}.medium-editor-toolbar li .medium-editor-action-pre{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px;font-weight:100;padding:15px 0}.medium-editor-toolbar-active{visibility:visible}.medium-editor-sticky-toolbar{position:fixed;top:1px}.medium-editor-relative-toolbar{position:relative}.medium-editor-toolbar-active.medium-editor-stalker-toolbar{-webkit-animation:medium-editor-pop-upwards .16s forwards linear;animation:medium-editor-pop-upwards .16s forwards linear}.medium-editor-action-bold{font-weight:bolder}.medium-editor-action-italic{font-style:italic}.medium-editor-toolbar-form{display:none}.medium-editor-toolbar-form a,.medium-editor-toolbar-form input{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.medium-editor-toolbar-form .medium-editor-toolbar-form-row{line-height:14px;margin-left:5px;padding-bottom:5px}.medium-editor-toolbar-form .medium-editor-toolbar-input,.medium-editor-toolbar-form label{border:none;box-sizing:border-box;font-size:14px;margin:0;padding:6px;width:316px;display:inline-block}.medium-editor-toolbar-form .medium-editor-toolbar-input:focus,.medium-editor-toolbar-form label:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;box-shadow:none;outline:0}.medium-editor-toolbar-form a{display:inline-block;font-size:24px;font-weight:bolder;margin:0 10px;text-decoration:none}.medium-editor-toolbar-form-active{display:block}.medium-editor-toolbar-actions:after{clear:both;content:"";display:table}.medium-editor-element{word-wrap:break-word;min-height:30px}.medium-editor-element img{max-width:100%}.medium-editor-element sub{vertical-align:sub}.medium-editor-element sup{vertical-align:super}.medium-editor-hidden{display:none}.medium-toolbar-arrow-under:after{border-color:#000 transparent transparent;top:40px}.medium-toolbar-arrow-over:before{border-color:transparent transparent #000}.medium-editor-toolbar{background-color:#000;border:none;border-radius:50px}.medium-editor-toolbar li button{background-color:transparent;border:none;box-sizing:border-box;color:#ccc;height:40px;min-width:40px;padding:5px 12px;-webkit-transition:background-color .2s ease-in,color .2s ease-in;transition:background-color .2s ease-in,color .2s ease-in}.medium-editor-toolbar li button:hover{background-color:#000;color:#a2d7c7}.medium-editor-toolbar li .medium-editor-button-first{border-bottom-left-radius:50px;border-top-left-radius:50px;padding-left:24px}.medium-editor-toolbar li .medium-editor-button-last{border-bottom-right-radius:50px;border-right:none;border-top-right-radius:50px;padding-right:24px}.medium-editor-toolbar li .medium-editor-button-active{background-color:#000;color:#a2d7c7}.medium-editor-toolbar-form{background:#000;border-radius:50px;color:#ccc;overflow:hidden}.medium-editor-toolbar-form .medium-editor-toolbar-input{background:#000;box-sizing:border-box;color:#ccc;height:40px;padding-left:16px;width:220px}.medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder{color:#f8f5f3;color:hsla(24,26%,96%,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder,.medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder{color:#f8f5f3;color:hsla(24,26%,96%,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder{color:#f8f5f3;color:hsla(24,26%,96%,.8)}.medium-editor-toolbar-form a{color:#ccc;-webkit-transform:translateY(2px);transform:translateY(2px)}.medium-editor-toolbar-form .medium-editor-toolbar-close{margin-right:16px}.medium-editor-toolbar-anchor-preview{background:#000;border-radius:50px;padding:5px 12px}.medium-editor-anchor-preview a{color:#ccc;text-decoration:none}.medium-editor-toolbar-actions button,.medium-editor-toolbar-actions li{border-radius:50px}.wprm-import p{max-width:600px}.wprm-import .wprm-import-error{max-width:600px;border:1px solid darkred;background-color:#ff9f9f;padding:10px}.wprm-import .wprm-import-recipes{width:100%}.wprm-import .wprm-import-recipes input[type=checkbox]{vertical-align:top}.wprm-import .wprm-import-recipes a{text-decoration:none}.wprm-import .wprm-import-recipes .dashicons.dashicons-visibility{font-size:18px}.wprm-import .wprm-import-recipes td:first-child{width:2%}.wprm-import .wprm-import-recipes td:nth-child(2){width:30%}.wprm-import #wprm-import-progress-container{width:100%;max-width:300px;height:20px;margin:10px 0;border:1px solid #000;background-color:#fff}.wprm-import #wprm-import-progress-bar{width:0;height:100%;background-color:#4484ce}.wprm-import #wprm-import-finished{display:none}table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable tfoot th,table.dataTable thead th{font-weight:700}table.dataTable thead td,table.dataTable thead th{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead td:active,table.dataTable thead th:active{outline:none}table.dataTable tfoot td,table.dataTable tfoot th{padding:10px 18px 6px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand;background-repeat:no-repeat;background-position:100%}table.dataTable thead .sorting{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7XQMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC)}table.dataTable thead .sorting_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=)}table.dataTable thead .sorting_asc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAW0lEQVQoz2NgoCm4w3Vnwh02wspK7/y6k01Ikdadx3f+37l9RxmfIsY7c4GKQHDiHUbcyhzvvIMq+3THBpci3jv7oIpAcMcdduzKEu/8vPMdDn/eiWQYBYMKAAC3ykIEuYQJUgAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAWUlEQVQoz2NgGAWDCtyJvPPzznc4/HknEbsy9js77vyHw313eHGZZ3PnE1TRuzuOuK1lvDMRqmzuHUZ87lO+cxuo6PEdLUIeyb7z604pYf+y3Zlwh4u2YQoAc7ZCBHH4jigAAAAASUVORK5CYII=)}table.dataTable tbody tr{background-color:#fff}table.dataTable tbody tr.selected{background-color:#b0bed9}table.dataTable tbody td,table.dataTable tbody th{padding:8px 10px}table.dataTable.display tbody td,table.dataTable.display tbody th,table.dataTable.row-border tbody td,table.dataTable.row-border tbody th{border-top:1px solid #ddd}table.dataTable.display tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.row-border tbody tr:first-child th{border-top:none}table.dataTable.cell-border tbody td,table.dataTable.cell-border tbody th{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr td:first-child,table.dataTable.cell-border tbody tr th:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child td,table.dataTable.cell-border tbody tr:first-child th{border-top:none}table.dataTable.display tbody tr.odd,table.dataTable.stripe tbody tr.odd{background-color:#f9f9f9}table.dataTable.display tbody tr.odd.selected,table.dataTable.stripe tbody tr.odd.selected{background-color:#abb9d3}table.dataTable.display tbody tr:hover,table.dataTable.hover tbody tr:hover{background-color:#f5f5f5}table.dataTable.display tbody tr:hover.selected,table.dataTable.hover tbody tr:hover.selected{background-color:#a9b7d1}table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3,table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3{background-color:#f9f9f9}table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3,table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3{background-color:#acbad4}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:#f5f5f5}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b3cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a7b5ce}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b6d0}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#f9f9f9}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fbfbfb}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fdfdfd}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad4}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#adbbd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ebebeb}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#eee}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap td,table.dataTable.nowrap th{white-space:nowrap}table.dataTable.compact thead td,table.dataTable.compact thead th{padding:4px 17px 4px 4px}table.dataTable.compact tbody td,table.dataTable.compact tbody th,table.dataTable.compact tfoot td,table.dataTable.compact tfoot th{padding:4px}table.dataTable td.dt-left,table.dataTable th.dt-left{text-align:left}table.dataTable td.dataTables_empty,table.dataTable td.dt-center,table.dataTable th.dt-center{text-align:center}table.dataTable td.dt-right,table.dataTable th.dt-right{text-align:right}table.dataTable td.dt-justify,table.dataTable th.dt-justify{text-align:justify}table.dataTable td.dt-nowrap,table.dataTable th.dt-nowrap{white-space:nowrap}table.dataTable tfoot td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable thead th.dt-head-left{text-align:left}table.dataTable tfoot td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable thead th.dt-head-center{text-align:center}table.dataTable tfoot td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable thead th.dt-head-right{text-align:right}table.dataTable tfoot td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable thead th.dt-head-justify{text-align:justify}table.dataTable tfoot td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable thead th.dt-head-nowrap{white-space:nowrap}table.dataTable tbody td.dt-body-left,table.dataTable tbody th.dt-body-left{text-align:left}table.dataTable tbody td.dt-body-center,table.dataTable tbody th.dt-body-center{text-align:center}table.dataTable tbody td.dt-body-right,table.dataTable tbody th.dt-body-right{text-align:right}table.dataTable tbody td.dt-body-justify,table.dataTable tbody th.dt-body-justify{text-align:justify}table.dataTable tbody td.dt-body-nowrap,table.dataTable tbody th.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable td,table.dataTable th{box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:.5em 1em;margin-left:2px;text-align:center;text-decoration:none!important;cursor:pointer;*cursor:hand;color:#333!important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333!important;border:1px solid #979797;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(100%,#dcdcdc));background:-webkit-linear-gradient(top,#fff,#dcdcdc);background:-moz-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-ms-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-o-linear-gradient(top,#fff 0,#dcdcdc 100%);background:linear-gradient(180deg,#fff 0,#dcdcdc)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{cursor:default;color:#666!important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:#fff!important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#585858),color-stop(100%,#111));background:-webkit-linear-gradient(top,#585858,#111);background:-moz-linear-gradient(top,#585858 0,#111 100%);background:-ms-linear-gradient(top,#585858 0,#111 100%);background:-o-linear-gradient(top,#585858 0,#111 100%);background:linear-gradient(180deg,#585858 0,#111)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#2b2b2b),color-stop(100%,#0c0c0c));background:-webkit-linear-gradient(top,#2b2b2b,#0c0c0c);background:-moz-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-ms-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-o-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:linear-gradient(180deg,#2b2b2b 0,#0c0c0c);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:#fff;background:-webkit-gradient(linear,left top,right top,color-stop(0,hsla(0,0%,100%,0)),color-stop(25%,hsla(0,0%,100%,.9)),color-stop(75%,hsla(0,0%,100%,.9)),color-stop(100%,hsla(0,0%,100%,0)));background:-webkit-linear-gradient(left,hsla(0,0%,100%,0),hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0));background:-moz-linear-gradient(left,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0) 100%);background:-ms-linear-gradient(left,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0) 100%);background:-o-linear-gradient(left,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0) 100%);background:linear-gradient(90deg,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.9) 25%,hsla(0,0%,100%,.9) 75%,hsla(0,0%,100%,0))}.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_paginate,.dataTables_wrapper .dataTables_processing{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollBody>table,.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width:767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:.5em}}@media screen and (max-width:640px){.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_length{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:.5em}}.tooltipster-base{display:flex;pointer-events:none;position:absolute}.tooltipster-box{flex:1 1 auto}.tooltipster-content{box-sizing:border-box;max-height:100%;max-width:100%;overflow:auto}.tooltipster-ruler{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;visibility:hidden}.tooltipster-fade{opacity:0;-webkit-transition-property:opacity;-moz-transition-property:opacity;-o-transition-property:opacity;-ms-transition-property:opacity;transition-property:opacity}.tooltipster-fade.tooltipster-show{opacity:1}.tooltipster-grow{-webkit-transform:scale(0);-moz-transform:scale(0);-o-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform;-webkit-backface-visibility:hidden}.tooltipster-grow.tooltipster-show{-webkit-transform:scale(1);-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);transform:scale(1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-moz-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-ms-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-o-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-swing{opacity:0;-webkit-transform:rotate(4deg);-moz-transform:rotate(4deg);-o-transform:rotate(4deg);-ms-transform:rotate(4deg);transform:rotate(4deg);-webkit-transition-property:-webkit-transform,opacity;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform}.tooltipster-swing.tooltipster-show{opacity:1;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);-webkit-transition-timing-function:cubic-bezier(.23,.635,.495,1);-webkit-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);-moz-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);-ms-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);-o-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);transition-timing-function:cubic-bezier(.23,.635,.495,2.4)}.tooltipster-fall{-webkit-transition-property:top;-moz-transition-property:top;-o-transition-property:top;-ms-transition-property:top;transition-property:top;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-moz-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-ms-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-o-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-fall.tooltipster-initial{top:0!important}.tooltipster-fall.tooltipster-dying{-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;-ms-transition-property:all;transition-property:all;top:0!important;opacity:0}.tooltipster-slide{-webkit-transition-property:left;-moz-transition-property:left;-o-transition-property:left;-ms-transition-property:left;transition-property:left;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-moz-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-ms-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-o-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-slide.tooltipster-initial{left:-40px!important}.tooltipster-slide.tooltipster-dying{-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;-ms-transition-property:all;transition-property:all;left:0!important;opacity:0}@keyframes tooltipster-fading{0%{opacity:0}to{opacity:1}}.tooltipster-update-fade{animation:tooltipster-fading .4s}@keyframes tooltipster-rotating{25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}to{transform:rotate(0)}}.tooltipster-update-rotate{animation:tooltipster-rotating .6s}@keyframes tooltipster-scaling{50%{transform:scale(1.1)}to{transform:scale(1)}}.tooltipster-update-scale{animation:tooltipster-scaling .6s}.tooltipster-sidetip .tooltipster-box{background:#565656;border:2px solid #000;border-radius:4px}.tooltipster-sidetip.tooltipster-bottom .tooltipster-box{margin-top:8px}.tooltipster-sidetip.tooltipster-left .tooltipster-box{margin-right:8px}.tooltipster-sidetip.tooltipster-right .tooltipster-box{margin-left:8px}.tooltipster-sidetip.tooltipster-top .tooltipster-box{margin-bottom:8px}.tooltipster-sidetip .tooltipster-content{color:#fff;line-height:18px;padding:6px 14px}.tooltipster-sidetip .tooltipster-arrow{overflow:hidden;position:absolute}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow{height:10px;margin-left:-10px;top:0;width:20px}.tooltipster-sidetip.tooltipster-left .tooltipster-arrow{height:20px;margin-top:-10px;right:0;top:0;width:10px}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow{height:20px;margin-top:-10px;left:0;top:0;width:10px}.tooltipster-sidetip.tooltipster-top .tooltipster-arrow{bottom:0;height:10px;margin-left:-10px;width:20px}.tooltipster-sidetip .tooltipster-arrow-background,.tooltipster-sidetip .tooltipster-arrow-border{height:0;position:absolute;width:0}.tooltipster-sidetip .tooltipster-arrow-background{border:10px solid transparent}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-background{border-bottom-color:#565656;left:0;top:3px}.tooltipster-sidetip.tooltipster-left .tooltipster-arrow-background{border-left-color:#565656;left:-3px;top:0}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-background{border-right-color:#565656;left:3px;top:0}.tooltipster-sidetip.tooltipster-top .tooltipster-arrow-background{border-top-color:#565656;left:0;top:-3px}.tooltipster-sidetip .tooltipster-arrow-border{border:10px solid transparent;left:0;top:0}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-border{border-bottom-color:#000}.tooltipster-sidetip.tooltipster-left .tooltipster-arrow-border{border-left-color:#000}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-border{border-right-color:#000}.tooltipster-sidetip.tooltipster-top .tooltipster-arrow-border{border-top-color:#000}.tooltipster-sidetip .tooltipster-arrow-uncropped{position:relative}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-uncropped{top:-10px}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-uncropped{left:-10px}.wprm-manage .wprm-manage-header{margin-top:20px}.wprm-manage .wprm-manage-recipes-filters .select2_wprm-container,.wprm-manage .wprm-manage-recipes-filters .wprm-manage-recipes-filter{margin-left:5px;z-index:100;max-width:100%}.wprm-manage .wprm-manage-datatable{display:none}.wprm-manage .wprm-manage-datatable .wprm-icon{cursor:pointer;color:#444}.wprm-manage .dataTables_wrapper{margin-top:20px}.wprm-manage .dataTables_wrapper .wprm-manage-datatable{display:table}.wprm-manage .wprm-manage-recipes-rating-details{font-size:.7em}.wprm-manage .wprm-manage-recipes-seo{margin:0 auto;width:15px;height:15px;border:1px solid #444;border-radius:50%}.wprm-manage .wprm-manage-recipes-seo.wprm-manage-recipes-seo-bad{background-color:#e74c3c}.wprm-manage .wprm-manage-recipes-seo.wprm-manage-recipes-seo-warning{background-color:#e67e22}.wprm-manage .wprm-manage-recipes-seo.wprm-manage-recipes-seo-rating{background-color:#f1c40f}.wprm-manage .wprm-manage-recipes-seo.wprm-manage-recipes-seo-good{background-color:#27ae60}.wprm-manage .wprm-manage-recipes-seo:hover{cursor:pointer}.wprm-manage .wprm-manage-recipes-seo-tooltip{display:none}.wprm-manage .wprm-manage-action-icon{cursor:pointer;margin-left:5px}.wprm-manage-custom-taxonomies-actions-tooltip,.wprm-manage-ingredients-actions-tooltip,.wprm-manage-recipes-actions-tooltip,.wprm-manage-taxonomies-actions-tooltip{text-align:right;min-width:250px;font-size:14px}.wprm-manage-custom-taxonomies-actions-tooltip .tooltip-header,.wprm-manage-ingredients-actions-tooltip .tooltip-header,.wprm-manage-recipes-actions-tooltip .tooltip-header,.wprm-manage-taxonomies-actions-tooltip .tooltip-header{margin-bottom:5px;font-weight:700}.wprm-manage-custom-taxonomies-actions-tooltip a,.wprm-manage-ingredients-actions-tooltip a,.wprm-manage-recipes-actions-tooltip a,.wprm-manage-taxonomies-actions-tooltip a{color:#fff;display:block;text-decoration:none}.wprm-manage-custom-taxonomies-actions-tooltip a:hover,.wprm-manage-ingredients-actions-tooltip a:hover,.wprm-manage-recipes-actions-tooltip a:hover,.wprm-manage-taxonomies-actions-tooltip a:hover{text-decoration:underline}.wprm-giveaway-notice{border:1px solid #006400;background-color:rgba(0,255,0,.15);padding:10px;margin-bottom:10px}.wprm-feedback-notice{border:1px solid #0085ba;background-color:rgba(0,133,186,.15);padding:10px;margin-bottom:10px}.wprm-feedback-notice button{margin:5px 5px 0 0!important}.wprm-easyrecipe-warning{display:none;border:1px solid darkred;background-color:rgba(255,0,0,.15);padding:10px;padding-bottom:0;margin-bottom:10px}.mce-floatpanel{z-index:100101!important}.select2_wprm-container{z-index:100075}.select2_wprm-container.select2_wprm-container--focus .select2_wprm-selection{border-color:#5b9dd9}.select2_wprm-container li{margin:0}.select2_wprm-container .select2_wprm-selection{border-color:#ddd}.medium-editor-anchor-preview,.medium-editor-toolbar{z-index:100080}.medium-editor-anchor-preview{font-size:12px}.medium-editor-element{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);min-height:68px;padding:3px 5px}.medium-editor-element:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.medium-editor-element:after{font-style:normal;color:#999;opacity:.5;font-size:14px;line-height:28px}.medium-editor-element p:first-child{margin-top:0}.medium-editor-element p:last-child{margin-bottom:0}.wprm-modal-hint{max-width:400px;margin-bottom:20px}.wprm-modal-hint .wprm-modal-hint-header{font-weight:700;font-variant:small-caps}.wprm-modal-hint .wprm-modal-hint-text{font-style:italic}.wprm-modal-container{display:none}.wprm-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100000}.wprm-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:100050}.wprm-modal *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wprm-modal-close{position:absolute;top:0;right:0;width:50px;height:50px;padding:0;z-index:1000;text-decoration:none!important;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.wprm-modal-close .wprm-modal-icon:before{content:"\F158";font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.wprm-modal-close:hover .wprm-modal-icon:before{color:#00a0d2}.wprm-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.wprm-modal-content ::-webkit-input-placeholder{color:#999;opacity:.5}.wprm-modal-content :-moz-placeholder,.wprm-modal-content ::-moz-placeholder{color:#999;opacity:.5}.wprm-modal-content :-ms-input-placeholder{color:#999;opacity:.5}.wprm-frame{overflow:hidden;right:0}.wprm-frame,.wprm-frame-menu{position:absolute;left:0;bottom:0;top:0}.wprm-frame-menu{width:200px;z-index:150}.wprm-frame-title .dashicons,.wprm-frame.hide-router .wprm-frame-router{display:none}.wprm-frame-title{top:0;height:50px}.wprm-frame-router,.wprm-frame-title{z-index:200;left:200px;position:absolute;right:0}.wprm-menu-item{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wprm-menu{position:absolute;left:0;margin:0;padding:10px 0;border-right-width:1px;border-right-style:solid;border-right-color:#ccc;user-select:none}.wprm-menu-hidden{padding:5px 5px 0 10px;font-style:italic}.wprm-menu,.wprm-sidebar{top:0;bottom:0;background:#f3f3f3;right:0}.wprm-menu .active,.wprm-menu .active:hover{color:#23282d;font-weight:700}.wprm-menu>a{display:block;position:relative;padding:8px 20px;margin:0;color:#0073aa}.wprm-menu>a,.wprm-router>a{line-height:18px;font-size:14px;text-decoration:none}.wprm-frame a{border-bottom:none;color:#0073aa}.wprm-frame .hidden{display:none}.wprm-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.wprm-frame-title h1{padding:0 16px;font-size:22px;line-height:50px;margin:0}.wprm-frame-router{top:50px;height:36px}.wprm-router{position:relative;padding:0 6px;margin:0;clear:both;user-select:none}.wprm-router:not(.active){display:none}.wprm-router>a{position:relative;float:left;padding:8px 10px 9px;margin:0;height:18px}.wprm-router a{-webkit-transition:none;transition:none}.wprm-router>a:last-child{border-right:0}.wprm-router .active,.wprm-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:none}.wprm-router .active,.wprm-router .active:hover{color:#32373c}.wprm-frame-content{position:absolute;top:84px;left:200px;right:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.wprm-frame-content-tab{margin:20px}.wprm-frame-content-tab:not(.active){display:none}.wprm-frame-toolbar{left:200px;bottom:0}.wprm-frame-toolbar,.wprm-toolbar{position:absolute;right:0;height:60px;z-index:100}.wprm-toolbar{top:0;left:0;padding:0 16px;border:0 solid #ddd;overflow:hidden}.wprm-modal-content .wprm-toolbar-primary.search-form{width:33%}.wprm-toolbar-primary{float:right;height:100%}.wprm-modal-content .wprm-toolbar-primary .wprm-button{float:right}.wprm-button-action-save{display:none}.wprm-toolbar-primary>.wprm-button,.wprm-toolbar-primary>.wprm-button-group{margin-left:10px;float:left;margin-top:15px}@media only screen and (max-width:900px){.wprm-frame:not(.hide-menu) .wprm-frame-title .dashicons{display:inline-block;line-height:50px}.wprm-frame:not(.hide-menu) .wprm-frame-menu{position:static;width:0}.wprm-frame:not(.hide-menu) .wprm-frame-content,.wprm-frame:not(.hide-menu) .wprm-frame-router,.wprm-frame:not(.hide-menu) .wprm-frame-title,.wprm-frame:not(.hide-menu) .wprm-frame-toolbar,.wprm-frame:not(.hide-menu) .wprm-menu.visible{left:0}.wprm-frame:not(.hide-menu) .wprm-menu{width:auto;max-width:80%;overflow:auto;z-index:2000;top:50px;left:-300px;right:auto;bottom:auto;padding:5px 0;border:1px solid #ccc}.wprm-frame:not(.hide-menu) .wprm-menu>a.active{display:none}.wprm-frame:not(.hide-menu) .wprm-menu>a{padding:12px 16px;font-size:16px}.wprm-frame:not(.hide-menu) .wprm-menu .separator{margin:5px 10px}.wprm-frame:not(.hide-menu) .wprm-frame-title h1{color:#0073aa;line-height:3;font-size:18px;float:left;cursor:pointer}}@media only screen and (max-width:640px),screen and (max-height:400px){.wprm-modal{position:fixed;top:0;left:0;right:0;bottom:0}.wprm-modal .wprm-frame-title{height:40px}}@media only screen and (max-width:480px){.wprm-frame:not(.hide-menu) .wprm-frame-title .dashicons{line-height:40px}.wprm-frame-router,.wprm-frame:not(.hide-menu) .wprm-menu{top:40px}.wprm-frame:not(.hide-menu) .wprm-frame-title h1,.wprm-modal .wprm-frame-title h1{font-size:18px;line-height:40px}.wprm-frame-content{top:74px}}.wprm-recipe-form{max-width:600px}.wprm-recipe-form .wprm-recipe-form-container{margin-bottom:15px;vertical-align:top}.wprm-recipe-form .wprm-recipe-form-container-halfs{display:inline-block;width:50%}.wprm-recipe-form .wprm-recipe-form-container-thirds{display:inline-block;width:33.3%}.wprm-recipe-form label{display:block;font-weight:700;margin-bottom:5px}.wprm-recipe-form input[type=number],.wprm-recipe-form input[type=text]{margin:0;width:100%;max-width:120px;height:34px;line-height:34px}.wprm-recipe-form input[type=number][type=number],.wprm-recipe-form input[type=text][type=number]{max-width:65px}.wprm-recipe-form input[type=number].select2_wprm-search__field,.wprm-recipe-form input[type=text].select2_wprm-search__field{height:18px;line-height:18px}.wprm-recipe-form select{width:100%}.wprm-recipe-form textarea{width:100%;resize:vertical}@media only screen and (max-width:480px){.wprm-recipe-form .wprm-recipe-form-container-halfs,.wprm-recipe-form .wprm-recipe-form-container-thirds{display:block;width:100%}}.wprm-recipe-import-text-form .import-text-buttons{margin-bottom:10px}.wprm-recipe-import-text-form .import-text-step{display:none}.wprm-recipe-import-text-form .import-text-step#import-text-step-input{display:block}.wprm-recipe-import-text-form #import-text-highlight-sandbox,.wprm-recipe-import-text-form .import-text-input{margin-top:10px}.wprm-recipe-import-text-form #import-text-ingredient-groups label,.wprm-recipe-import-text-form #import-text-instruction-groups label{display:inline;font-weight:400}.wprm-recipe-import-text-form .import-text-group-warning{margin-top:10px;display:none}.wprm-recipe-import-text-form #import-text-highlight-sandbox{display:none;max-height:400px;overflow:scroll;padding:10px;border:1px dashed #999}.wprm-loader{display:none}.wprm-loader,.wprm-loader:after,.wprm-loader:before{border-radius:50%;width:1.5em;height:1.5em;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation:load7 1.8s infinite ease-in-out;animation:load7 1.8s infinite ease-in-out}.wprm-loader{color:#444;font-size:10px;margin:20px auto;position:relative;text-indent:-9999em;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation-delay:-.16s;animation-delay:-.16s}.wprm-loader:after,.wprm-loader:before{content:"";position:absolute;top:0}.wprm-loader:before{left:-2.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.wprm-loader:after{left:2.5em}@-webkit-keyframes load7{0%,80%,to{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}@keyframes load7{0%,80%,to{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}.wprm-recipe-details-form input#wprm-recipe-name{max-width:450px}.wprm-recipe-details-form input#wprm-recipe-author-link,.wprm-recipe-details-form input#wprm-recipe-author-name{max-width:none}.wprm-recipe-details-form input#wprm-recipe-calories{max-width:70px}.wprm-recipe-details-form .wprm-recipe-image-preview{float:right;max-width:100px}.wprm-recipe-details-form .wprm-recipe-image-preview img{max-width:100%;height:auto}.wprm-recipe-details-form .wprm-recipe-summary-container{clear:both}@media only screen and (max-width:480px){.wprm-recipe-details-form .wprm-recipe-image-preview{float:none;margin:10px auto}}.wprm-recipe-ingredients-form,.wprm-recipe-instructions-form{max-width:750px;margin-bottom:15px}.wprm-recipe-ingredients-form input,.wprm-recipe-instructions-form input{margin:0;width:100%;height:34px;line-height:34px}.wprm-recipe-ingredients-form textarea,.wprm-recipe-instructions-form textarea{width:100%;resize:vertical}.wprm-recipe-ingredients-form ::-webkit-input-placeholder,.wprm-recipe-instructions-form ::-webkit-input-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form :-moz-placeholder,.wprm-recipe-ingredients-form ::-moz-placeholder,.wprm-recipe-instructions-form :-moz-placeholder,.wprm-recipe-instructions-form ::-moz-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form :-ms-input-placeholder,.wprm-recipe-instructions-form :-ms-input-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form table,.wprm-recipe-instructions-form table{width:100%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th,.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th{text-align:left}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:first-child,.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(6),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:first-child,.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(6){width:5%;text-align:center}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(2),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(2){width:10%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(3),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(3){width:15%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(4),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(4){width:40%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(5),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(5){width:25%}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th,.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th{text-align:left}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:first-child,.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(4),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:first-child,.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(4){width:5%;text-align:center}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(2),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(2){width:65%}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(3),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(3){width:25%}.wprm-recipe-ingredients-form table .wprm-recipe-ingredients-placeholder,.wprm-recipe-ingredients-form table .wprm-recipe-instructions-placeholder,.wprm-recipe-instructions-form table .wprm-recipe-ingredients-placeholder,.wprm-recipe-instructions-form table .wprm-recipe-instructions-placeholder{display:none}.wprm-recipe-ingredients-form table td,.wprm-recipe-instructions-form table td{text-align:left;vertical-align:top}.wprm-recipe-ingredients-form table td:first-child,.wprm-recipe-ingredients-form table td:last-child,.wprm-recipe-instructions-form table td:first-child,.wprm-recipe-instructions-form table td:last-child{text-align:center;vertical-align:middle}.wprm-recipe-ingredients-form .ui-sortable-helper,.wprm-recipe-instructions-form .ui-sortable-helper{display:table}.wprm-recipe-ingredients-form .ui-sortable-helper .wprm-recipe-instruction-text,.wprm-recipe-instructions-form .ui-sortable-helper .wprm-recipe-instruction-text{min-width:200px}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort{cursor:move}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete{cursor:pointer}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort{color:#999;opacity:.5}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete:hover,.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort:hover,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete:hover,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort:hover{color:#444;opacity:1}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-actions,.wprm-recipe-ingredients-form .wprm-recipe-instructions-actions,.wprm-recipe-instructions-form .wprm-recipe-ingredients-actions,.wprm-recipe-instructions-form .wprm-recipe-instructions-actions{margin:10px}.wprm-recipe-ingredients-form .wprm-recipe-image-preview,.wprm-recipe-instructions-form .wprm-recipe-image-preview{max-width:75px}.wprm-recipe-ingredients-form .wprm-recipe-image-preview img,.wprm-recipe-instructions-form .wprm-recipe-image-preview img{max-width:100%;height:auto}.wprm-shortcode-builder .wprm-shortcode-builder-container{margin-bottom:15px;vertical-align:top}.wprm-shortcode-builder .wprm-shortcode-builder-container-halfs{display:inline-block;width:50%}.wprm-shortcode-builder .wprm-shortcode-builder-container-thirds{display:inline-block;width:33.3%}.wprm-shortcode-builder label{display:block;font-weight:700;margin-bottom:5px}.wprm-shortcode-builder .wprm-shortcode-builder-helper{margin-left:5px;font-size:.8em;font-style:italic}.wprm-shortcode-builder input{margin:0;width:100%;max-width:250px;height:34px;line-height:34px}.wprm-shortcode-builder input.select2_wprm-search__field{height:18px;line-height:18px}.wprm-shortcode-builder select{width:250px}.wprm-settings select{min-width:200px}.wprm-settings .select2_wprm-container{z-index:99000}.wprm-settings #template_font_size{width:60px}.wprm-settings .template-preview-container .template-preview{float:left;text-align:center;width:250px;height:230px;overflow:hidden;margin:5px}.wprm-settings .template-preview-container .template-name{font-weight:700;line-height:30px}.wprm-settings .template-preview-container .template-screenshot{width:250px}.wprm-settings .template-preview-container .template-no-screenshot{width:250px;height:200px;line-height:200px;border:1px dashed #999;box-sizing:border-box}.wprm-tools #wprm-tools-progress-container{width:100%;max-width:300px;height:20px;margin:10px 0;border:1px solid #000;background-color:#fff}.wprm-tools #wprm-tools-progress-bar{width:0;height:100%;background-color:#4484ce}.wprm-tools #wprm-tools-finished{display:none}.wprm-addons .wprm-addons-bundle-container{box-sizing:border-box;width:30%;float:left;margin-right:1%;padding:0 20px 20px;border:1px dashed gray}.wprm-addons .wprm-addons-bundle-container .wprm-addons-button-container,.wprm-addons .wprm-addons-bundle-container h2,.wprm-addons .wprm-addons-bundle-container h3{text-align:center}.wprm-addons .wprm-addons-bundle-container h3{font-size:1.1em}.wprm-addons .wprm-drip-form{margin:20px 0}.wprm-addons .wprm-drip-form input{width:100%;max-width:400px;margin:10px 0}.wprm-addons .wprm-drip-form input[type=submit]{max-width:250px;margin-bottom:0}.wprm-addons .wprm-drip-form .wprm-disclaimer{font-size:.8em}@media only screen and (max-width:640px){.wprm-addons .wprm-addons-bundle-container{width:100%;float:none;margin-bottom:20px}}.comment-form-wprm-rating label{display:none}.comment-form-wprm-rating .wprm-rating-star{cursor:pointer}.comment-form-wprm-rating .wprm-rating-star svg{vertical-align:middle;width:16px;height:16px;margin:0}.comment-form-wprm-rating .wprm-rating-star.rated svg polygon{fill:#000}.wprm-faq p{max-width:650px}.wprm-faq ul{list-style-type:square}.wprm-faq .wprm-drip-form{margin:20px 0}.wprm-faq .wprm-drip-form input{width:100%;max-width:400px;margin:10px 0}.wprm-faq .wprm-drip-form input[type=submit]{max-width:350px;margin-bottom:0}.wprm-faq .wprm-drip-form .wprm-disclaimer{font-size:.8em}.wprm-badge{background:#fff url(assets/9db239b0b8817856fa53552be937ab40.png) no-repeat;background-position:center 20px;-webkit-background-size:128px 128px;background-size:128px 128px;color:#333;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:155px;height:25px;display:inline-block;width:150px;text-rendering:optimizeLegibility;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.about-wrap .wprm-badge{position:absolute;top:0;right:0}@media only screen and (max-width:500px){.about-wrap .wprm-badge{position:relative;margin-bottom:1.5em;width:100%}}
|
dist/admin.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
var WPRecipeMaker=WPRecipeMaker||{};WPRecipeMaker.admin=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=17)}([function(t,e){t.exports=window.jQuery},function(t,e,n){"use strict";(function(t){var i=n(2),o=n(25),r={changes_made:!1,container:!1,active_editor_id:!1,actions:{},recipe:i.a,init:function(t){this.container=t,Object(o.a)(this),this.recipe.init()},open:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(".wprm-menu-item").show(),t(".wprm-menu-hidden").hide(),this.active_editor_id=e,t(".wprm-modal-container").show();var i=t(".wprm-router").find(".wprm-menu-item");t(i).each(function(){var e=t(this).data("init");e&&"function"==typeof r.actions[e]&&r.actions[e](n)}),t(".wprm-menu").find(".wprm-menu-item").first().click(),this.changes_made=!1},close:function(){this.active_editor_id=!1,t(".wprm-menu").removeClass("visible"),t(".wprm-modal-container").hide()},disable_menu:function(){t(".wprm-frame-menu").find(".wprm-menu-item").hide(),t(".wprm-menu-hidden").show()}};e.a=r}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var i=n(3),o=n(19),r=n(9),a={id:0,type:"insert",fields:!1,ingredient:{},instructions:{},prep_time_set:!1,cook_time_set:!1,total_time_set:!1,init:function(){Object(o.a)(this)},clear:function(){i.remove_media_image(t(".wprm-recipe-image-container")),t("#wprm-recipe-name").val(""),r.a.clear(),t("#wprm-recipe-author-display").val("default").change(),t("#wprm-recipe-author-link").val(""),t("#wprm-recipe-servings").val(""),t("#wprm-recipe-servings-unit").val(""),t("#wprm-recipe-calories").val(""),t("#wprm-recipe-prep-time").val(""),t("#wprm-recipe-cook-time").val(""),t("#wprm-recipe-total-time").val(""),t("#wprm-recipe-custom-time").val(""),t("#wprm-recipe-custom-time-label").val(""),this.prep_time_set=!1,this.cook_time_set=!1,this.total_time_set=!1,t(".wprm-recipe-tags").val(null).trigger("change");var e=t("#wprm-recipe-author-name");if(e.val(e.data("default")),t(".wprm-recipe-ingredients .wprm-recipe-ingredients-instructions-delete, .wprm-recipe-instructions .wprm-recipe-ingredients-instructions-delete").each(function(){t(this).click()}),t(".wprm-recipe-ingredients-add").click(),t(".wprm-recipe-instructions-add").click(),"undefined"!=typeof tinyMCE&&tinyMCE.get("wprm_recipe_notes")&&!tinyMCE.get("wprm_recipe_notes").isHidden()){tinyMCE.get("wprm_recipe_notes").focus(!0),t(".wprm-easyrecipe-warning").hide();try{tinyMCE.activeEditor.setContent("")}catch(e){t(".wprm-easyrecipe-warning").show()}}else t("#wprm_recipe_notes").val("")},set:function(e){parseInt(e.image_id)>0&&i.set_media_image(t(".wprm-recipe-details-form .wprm-recipe-image-container"),e.image_id,e.image_url),t("#wprm-recipe-name").val(e.name),r.a.set(e.summary),t("#wprm-recipe-servings-unit").val(e.servings_unit),t("#wprm-recipe-custom-time-label").val(e.custom_time_label),t("#wprm-recipe-author-display").val(e.author_display).change(),t("#wprm-recipe-author-name").val(e.author_name),t("#wprm-recipe-author-link").val(e.author_link);var n=parseInt(e.servings)>0?parseInt(e.servings):"",o=e.nutrition.calories?parseFloat(e.nutrition.calories):"",a=parseInt(e.prep_time)>0?parseInt(e.prep_time):"",s=parseInt(e.cook_time)>0?parseInt(e.cook_time):"",l=parseInt(e.total_time)>0?parseInt(e.total_time):"",c=parseInt(e.custom_time)>0?parseInt(e.custom_time):"";t("#wprm-recipe-servings").val(n),t("#wprm-recipe-calories").val(o),t("#wprm-recipe-prep-time").val(a),t("#wprm-recipe-cook-time").val(s),t("#wprm-recipe-total-time").val(l),t("#wprm-recipe-custom-time").val(c),a&&(this.prep_time_set=!0),s&&(this.cook_time_set=!0),l&&(this.total_time_set=!0);for(var u in e.tags)e.tags.hasOwnProperty(u)&&this.setTags(e,u);this.setIngredients(e.ingredients),this.setInstructions(e.instructions),"undefined"!=typeof tinyMCE&&tinyMCE.get("wprm_recipe_notes")&&!tinyMCE.get("wprm_recipe_notes").isHidden()?(tinyMCE.get("wprm_recipe_notes").focus(!0),tinyMCE.activeEditor.setContent(e.notes)):t("#wprm_recipe_notes").val(e.notes)},setTags:function(e,n){for(var i=[],o=t("#wprm-recipe-tag-"+n),r=0,a=e.tags[n].length;r<a;r++){var s=e.tags[n][r];i.push(s.term_id),0===o.find("option[value="+s.term_id+"]").length&&o.append('<option value="'+s.term_id+'">'+s.name+"</option>")}o.val(i).trigger("change")},setIngredients:function(e){t(".wprm-recipe-ingredients .wprm-recipe-ingredients-instructions-delete").each(function(){t(this).click()});var n,i,o,r,s;for(n=0,i=e.length;n<i;n++)for(o=e[n],(n>0||""!==o.name)&&a.addIngredientGroup(o.name),r=0,s=o.ingredients.length;r<s;r++){var l=o.ingredients[r],c=a.addIngredient(l.amount,l.unit,l.name,l.notes);a.ingredients[c]=l}},setInstructions:function(e){t(".wprm-recipe-instructions .wprm-recipe-ingredients-instructions-delete").each(function(){t(this).click()});var n,i,o,r,s;for(n=0,i=e.length;n<i;n++)for(o=e[n],(n>0||""!==o.name)&&a.addInstructionGroup(o.name),r=0,s=o.instructions.length;r<s;r++){var l=o.instructions[r],c=a.addInstruction(l.text,l.image);a.instructions[c]=l}},get:function(){var e=t("#wprm-recipe-author-display").val();"default"==e&&(e=t("#wprm-recipe-author-display").find("option:first").data("default"));var n={image_id:t("#wprm-recipe-image-id").val(),name:t("#wprm-recipe-name").val(),summary:t("#wprm-recipe-summary").val(),author_display:e,author_name:t("#wprm-recipe-author-name").val(),author_link:t("#wprm-recipe-author-link").val(),servings:t("#wprm-recipe-servings").val(),servings_unit:t("#wprm-recipe-servings-unit").val(),prep_time:t("#wprm-recipe-prep-time").val(),cook_time:t("#wprm-recipe-cook-time").val(),total_time:t("#wprm-recipe-total-time").val(),custom_time:t("#wprm-recipe-custom-time").val(),custom_time_label:t("#wprm-recipe-custom-time-label").val(),nutrition:{calories:t("#wprm-recipe-calories").val()},tags:{course:t("#wprm-recipe-tag-course").val(),cuisine:t("#wprm-recipe-tag-cuisine").val()}};n.tags={},t(".wprm-recipe-tags").each(function(){n.tags[t(this).data("key")]=t(this).val()}),n.ingredients=this.getIngredients();var i=[],o={name:"",instructions:[]};return t(".wprm-recipe-instructions").find("tr").each(function(){var e=t(this);e.hasClass("wprm-recipe-instruction-group")?(i.push(o),o={name:e.find(".wprm-recipe-instruction-group-name").val(),instructions:[]}):o.instructions.push({text:e.find("textarea.wprm-recipe-instruction-text").val(),image:e.find(".wprm-recipe-instruction-image").val()})}),i.push(o),n.instructions=i,"undefined"!=typeof tinyMCE&&tinyMCE.get("wprm_recipe_notes")&&!tinyMCE.get("wprm_recipe_notes").isHidden()?n.notes=tinyMCE.get("wprm_recipe_notes").getContent():n.notes=t("#wprm_recipe_notes").val(),n},getIngredients:function(){var e=[],n={name:"",ingredients:[]};return t(".wprm-recipe-ingredients").find("tr").each(function(){var i=t(this);if(i.hasClass("wprm-recipe-ingredient-group"))e.push(n),n={name:i.find(".wprm-recipe-ingredient-group-name").val(),ingredients:[]};else{var o=i.data("uid"),r={};a.ingredients.hasOwnProperty(o)&&(r=a.ingredients[o]),r.amount=i.find(".wprm-recipe-ingredient-amount").val(),r.unit=i.find(".wprm-recipe-ingredient-unit").val(),r.name=i.find(".wprm-recipe-ingredient-name").val(),r.notes=i.find(".wprm-recipe-ingredient-notes").val();var s=t("#wprm-ingredient-conversion-"+o);if(s.length>0){var l=s.find(".wprmuc-system-2-amount").val(),c=s.find(".wprmuc-system-2-unit").val();r.converted={2:{amount:l,unit:c}}}n.ingredients.push(r)}}),e.push(n),e},addIngredient:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=t(".wprm-recipe-ingredients-placeholder").find(".wprm-recipe-ingredient").clone();for(t(".wprm-recipe-ingredients").append(s),s.find(".wprm-recipe-ingredient-amount").val(i.decode_html_entities(e)).focus(),s.find(".wprm-recipe-ingredient-unit").val(i.decode_html_entities(n)),s.find(".wprm-recipe-ingredient-name").val(i.decode_html_entities(o)),s.find(".wprm-recipe-ingredient-notes").val(i.decode_html_entities(r));;){var l=Math.floor(99999*Math.random());if(!a.ingredients.hasOwnProperty(l))return s.data("uid",l),a.ingredients[l]={},l}},addIngredientGroup:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t(".wprm-recipe-ingredients-placeholder").find(".wprm-recipe-ingredient-group").clone();t(".wprm-recipe-ingredients").append(n),n.find("input:first").val(e).focus()},addInstruction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=t(".wprm-recipe-instructions-placeholder").find(".wprm-recipe-instruction").clone();if(o.find(".wprm-recipe-instruction-text").addClass("wprm-rich-editor"),t(".wprm-recipe-instructions").append(o),o.find(".wprm-recipe-instruction-text").val(e),r.a.init(),o.find(".wprm-recipe-instruction-text").focus(),parseInt(n)>0){var s=o.find(".wprm-recipe-image-container"),l=s.find(".wprm-recipe-image-add"),c={action:"wprm_get_thumbnail",security:wprm_temp_admin.nonce,image_id:n};i.start_loader(l),t.post(wprm_temp_admin.ajax_url,c,function(t){i.stop_loader(l),t.success&&i.set_media_image(s,n,t.data.image_url)},"json")}for(;;){var u=Math.floor(99999*Math.random());if(!a.instructions.hasOwnProperty(u))return o.data("uid",u),a.instructions[u]={},u}},addInstructionGroup:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t(".wprm-recipe-instructions-placeholder").find(".wprm-recipe-instruction-group").clone();t(".wprm-recipe-instructions").append(n),n.find("input:first").val(e).focus()}};e.a=a}).call(e,n(0))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){function i(t){return String(t).replace(/["]/g,function(t){return h[t]})}function o(e){if(e=" "+e+" ",d.a.active_editor_id)if("undefined"==typeof tinyMCE||!tinyMCE.get(d.a.active_editor_id)||tinyMCE.get(d.a.active_editor_id).isHidden()){var n=t("textarea#"+d.a.active_editor_id).val();t("textarea#"+d.a.active_editor_id).val(n+e)}else tinyMCE.get(d.a.active_editor_id).focus(!0),tinyMCE.activeEditor.selection.collapse(!1),tinyMCE.activeEditor.execCommand("mceInsertContent",!1,e)}function r(t){var e=wp.media({title:wprm_temp_admin.modal.text.media_title,button:{text:wprm_temp_admin.modal.text.media_button},multiple:!1});e.on("select",function(){var n=e.state().get("selection").first().toJSON();a(t,n.id,n.url)}),e.open()}function a(t,e,n){t.find(".wprm-recipe-image-preview").html(""),t.find(".wprm-recipe-image-preview").append('<img src="'+n+'" />'),t.find("input").val(e),t.find(".wprm-recipe-image-add").addClass("hidden"),t.find(".wprm-recipe-image-remove").removeClass("hidden"),d.a.changes_made=!0}function s(t){t.find(".wprm-recipe-image-preview").html(""),t.find("input").val(""),t.find(".wprm-recipe-image-add").removeClass("hidden"),t.find(".wprm-recipe-image-remove").addClass("hidden"),d.a.changes_made=!0}function l(t){t.prop("disabled",!0).css("width",t.outerWidth()).data("text",t.html()).html("...")}function c(t){t.prop("disabled",!1).css("width","").html(t.data("text"))}function u(t){var e=document.createElement("textarea");return e.innerHTML=t,e.value}e.shortcode_escape=i,e.add_text_to_editor=o,e.select_media_image=r,e.set_media_image=a,e.remove_media_image=s,e.start_loader=l,e.stop_loader=c,e.decode_html_entities=u;var d=n(1),h={'"':"'","[":"{","]":"}"}}.call(e,n(0))},function(t,e,n){(function(t){(void 0!==window.wprm_public?wprm_public.settings.features_comment_ratings:wprm_temp_admin.settings.features_comment_ratings)&&t(document).ready(function(e){if(t(".wprm-recipe-container").length>0||t("body.wp-admin").length>0){t(".comment-form-wprm-rating").show();var n=t(".comment-form-wprm-rating").data("color");t(document).on("mouseenter",".comment-form-wprm-rating .wprm-rating-star",function(){t(this).prevAll().andSelf().each(function(){t(this).find("polygon").css("fill",n)}),t(this).nextAll().each(function(){t(this).find("polygon").css("fill","none")})}),t(document).on("mouseleave",".comment-form-wprm-rating .wprm-rating-star",function(){t(this).siblings().andSelf().each(function(){t(this).find("polygon").css("fill","")})}),t(document).on("click",".comment-form-wprm-rating .wprm-rating-star",function(){var e=t(this),n=e.data("rating"),i=e.parents(".comment-form-wprm-rating").find("#wprm-comment-rating");i.val()==n?(i.val(""),t(this).siblings("").andSelf().each(function(){t(this).removeClass("rated")})):(i.val(n),t(this).prevAll().andSelf().each(function(){t(this).addClass("rated")}),t(this).nextAll().each(function(){t(this).removeClass("rated")}))})}else t(".comment-form-wprm-rating").hide()})}).call(e,n(0))},,,function(t,e,n){(function(i){var o,r,a,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};/*! select2_wprm 4.0.3 | https://github.com/select2_wprm/select2_wprm/blob/master/LICENSE.md */
|
2 |
!function(i){r=[n(0)],o=i,void 0!==(a="function"==typeof o?o.apply(e,r):o)&&(t.exports=a)}(function(t){var e=function(){if(t&&t.fn&&t.fn.select2_wprm&&t.fn.select2_wprm.amd)var e=t.fn.select2_wprm.amd;var e;return function(){if(!e||!e.requirejs){e?n=e:e={};var t,n,i;!function(e){function o(t,e){return y.call(t,e)}function r(t,e){var n,i,o,r,a,s,l,c,u,d,h,p=e&&e.split("/"),f=w.map,m=f&&f["*"]||{};if(t&&"."===t.charAt(0))if(e){for(t=t.split("/"),a=t.length-1,w.nodeIdCompat&&x.test(t[a])&&(t[a]=t[a].replace(x,"")),t=p.slice(0,p.length-1).concat(t),u=0;u<t.length;u+=1)if("."===(h=t[u]))t.splice(u,1),u-=1;else if(".."===h){if(1===u&&(".."===t[2]||".."===t[0]))break;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((p||m)&&f){for(n=t.split("/"),u=n.length;u>0;u-=1){if(i=n.slice(0,u).join("/"),p)for(d=p.length;d>0;d-=1)if((o=f[p.slice(0,d).join("/")])&&(o=o[i])){r=o,s=u;break}if(r)break;!l&&m&&m[i]&&(l=m[i],c=u)}!r&&l&&(r=l,s=c),r&&(n.splice(0,s,r),t=n.join("/"))}return t}function a(t,n){return function(){var i=C.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),f.apply(e,i.concat([t,n]))}}function l(t){return function(e){return r(e,t)}}function c(t){return function(e){v[t]=e}}function u(t){if(o(_,t)){var n=_[t];delete _[t],b[t]=!0,p.apply(e,n)}if(!o(v,t)&&!o(b,t))throw new Error("No "+t);return v[t]}function d(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function h(t){return function(){return w&&w.config&&w.config[t]||{}}}var p,f,m,g,v={},_={},w={},b={},y=Object.prototype.hasOwnProperty,C=[].slice,x=/\.js$/;m=function(t,e){var n,i=d(t),o=i[0];return t=i[1],o&&(o=r(o,e),n=u(o)),o?t=n&&n.normalize?n.normalize(t,l(e)):r(t,e):(t=r(t,e),i=d(t),o=i[0],t=i[1],o&&(n=u(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:n}},g={require:function(t){return a(t)},exports:function(t){var e=v[t];return void 0!==e?e:v[t]={}},module:function(t){return{id:t,uri:"",exports:v[t],config:h(t)}}},p=function(t,n,i,r){var l,d,h,p,f,w,y=[],C=void 0===i?"undefined":s(i);if(r=r||t,"undefined"===C||"function"===C){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if(p=m(n[f],r),"require"===(d=p.f))y[f]=g.require(t);else if("exports"===d)y[f]=g.exports(t),w=!0;else if("module"===d)l=y[f]=g.module(t);else if(o(v,d)||o(_,d)||o(b,d))y[f]=u(d);else{if(!p.p)throw new Error(t+" missing "+d);p.p.load(p.n,a(r,!0),c(d),{}),y[f]=v[d]}h=i?i.apply(v[t],y):void 0,t&&(l&&l.exports!==e&&l.exports!==v[t]?v[t]=l.exports:h===e&&w||(v[t]=h))}else t&&(v[t]=i)},t=n=f=function(t,n,i,o,r){if("string"==typeof t)return g[t]?g[t](n):u(m(t,n).f);if(!t.splice){if(w=t,w.deps&&f(w.deps,w.callback),!n)return;n.splice?(t=n,n=i,i=null):t=e}return n=n||function(){},"function"==typeof i&&(i=o,o=r),o?p(e,t,n,i):setTimeout(function(){p(e,t,n,i)},4),f},f.config=function(t){return f(t)},t._defined=v,i=function(t,e,n){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(n=e,e=[]),o(v,t)||o(_,t)||(_[t]=[t,e,n])},i.amd={jQuery:!0}}(),e.requirejs=t,e.require=n,e.define=i}}(),e.define("almond",function(){}),e.define("jquery",[],function(){var e=t||i;return null==e&&console&&console.error&&console.error("select2_wprm: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before select2_wprm on your web page."),e}),e.define("select2_wprm/utils",["jquery"],function(t){function e(t){var e=t.prototype,n=[];for(var i in e)"function"==typeof e[i]&&"constructor"!==i&&n.push(i);return n}var n={};n.Extend=function(t,e){function n(){this.constructor=t}var i={}.hasOwnProperty;for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},n.Decorate=function(t,n){function i(){var e=Array.prototype.unshift,i=n.prototype.constructor.length,o=t.prototype.constructor;i>0&&(e.call(arguments,t.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=i}var r=e(n),a=e(t);n.displayName=t.displayName,i.prototype=new o;for(var s=0;s<a.length;s++){var l=a[s];i.prototype[l]=t.prototype[l]}for(var c=0;c<r.length;c++){var u=r[c];i.prototype[u]=function(t){var e=function(){};t in i.prototype&&(e=i.prototype[t]);var o=n.prototype[t];return function(){return Array.prototype.unshift.call(arguments,e),o.apply(this,arguments)}}(u)}return i};var i=function(){this.listeners={}};return i.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},i.prototype.trigger=function(t){var e=Array.prototype.slice,n=e.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(t,e){for(var n=0,i=t.length;i>n;n++)t[n].apply(this,e)},n.Observable=i,n.generateChars=function(t){for(var e="",n=0;t>n;n++)e+=Math.floor(36*Math.random()).toString(36);return e},n.bind=function(t,e){return function(){t.apply(e,arguments)}},n._convertData=function(t){for(var e in t){var n=e.split("-"),i=t;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];r=r.substring(0,1).toLowerCase()+r.substring(1),r in i||(i[r]={}),o==n.length-1&&(i[r]=t[e]),i=i[r]}delete t[e]}}return t},n.hasScroll=function(e,n){var i=t(n),o=n.style.overflowX,r=n.style.overflowY;return(o!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===o||"scroll"===r||i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth)},n.escapeMarkup=function(t){var e={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},n.appendMany=function(e,n){if("1.7"===t.fn.jquery.substr(0,3)){var i=t();t.map(n,function(t){i=i.add(t)}),n=i}e.append(n)},n}),e.define("select2_wprm/results",["jquery","./utils"],function(t,e){function n(t,e,i){this.$element=t,this.data=i,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<ul class="select2_wprm-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(e){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=t('<li role="treeitem" aria-live="assertive" class="select2_wprm-results__option"></li>'),o=this.options.get("translations").get(e.message);i.append(n(o(e.args))),i[0].className+=" select2_wprm-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2_wprm-results__message").remove()},n.prototype.append=function(t){this.hideLoading();var e=[];if(null==t.results||0===t.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));t.results=this.sort(t.results);for(var n=0;n<t.results.length;n++){var i=t.results[n],o=this.option(i);e.push(o)}this.$results.append(e)},n.prototype.position=function(t,e){e.find(".select2_wprm-results").append(t)},n.prototype.sort=function(t){return this.options.get("sorter")(t)},n.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2_wprm-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var e=this;this.data.current(function(n){var i=t.map(n,function(t){return t.id.toString()});e.$results.find(".select2_wprm-results__option[aria-selected]").each(function(){var e=t(this),n=t.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&t.inArray(o,i)>-1?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},n.prototype.showLoading=function(t){this.hideLoading();var e=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:e(t)},i=this.option(n);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(e){var n=document.createElement("li");n.className="select2_wprm-results__option";var i={role:"treeitem","aria-selected":"false"};e.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==e.id&&delete i["aria-selected"],null!=e._resultId&&(n.id=e._resultId),e.title&&(n.title=e.title),e.children&&(i.role="group",i["aria-label"]=e.text,delete i["aria-selected"]);for(var o in i){var r=i[o];n.setAttribute(o,r)}if(e.children){var a=t(n),s=document.createElement("strong");s.className="select2_wprm-results__group",t(s),this.template(e,s);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var h=t("<ul></ul>",{class:"select2_wprm-results__options select2_wprm-results__options--nested"});h.append(l),a.append(s),a.append(h)}else this.template(e,n);return t.data(n,"data",e),n},n.prototype.bind=function(e,n){var i=this,o=e.id+"-results";this.$results.attr("id",o),e.on("results:all",function(t){i.clear(),i.append(t.data),e.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),e.on("results:append",function(t){i.append(t.data),e.isOpen()&&i.setClasses()}),e.on("query",function(t){i.hideMessages(),i.showLoading(t)}),e.on("select",function(){e.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),e.on("unselect",function(){e.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),e.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),e.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),e.on("results:toggle",function(){var t=i.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),e.on("results:select",function(){var t=i.getHighlightedResults();if(0!==t.length){var e=t.data("data");"true"==t.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:e})}}),e.on("results:previous",function(){var t=i.getHighlightedResults(),e=i.$results.find("[aria-selected]"),n=e.index(t);if(0!==n){var o=n-1;0===t.length&&(o=0);var r=e.eq(o);r.trigger("mouseenter");var a=i.$results.offset().top,s=r.offset().top,l=i.$results.scrollTop()+(s-a);0===o?i.$results.scrollTop(0):0>s-a&&i.$results.scrollTop(l)}}),e.on("results:next",function(){var t=i.getHighlightedResults(),e=i.$results.find("[aria-selected]"),n=e.index(t),o=n+1;if(!(o>=e.length)){var r=e.eq(o);r.trigger("mouseenter");var a=i.$results.offset().top+i.$results.outerHeight(!1),s=r.offset().top+r.outerHeight(!1),l=i.$results.scrollTop()+s-a;0===o?i.$results.scrollTop(0):s>a&&i.$results.scrollTop(l)}}),e.on("results:focus",function(t){t.element.addClass("select2_wprm-results__option--highlighted")}),e.on("results:message",function(t){i.displayMessage(t)}),t.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-e+t.deltaY,o=t.deltaY>0&&e-t.deltaY<=0,r=t.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):r&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2_wprm-results__option[aria-selected]",function(e){var n=t(this),o=n.data("data");return"true"===n.attr("aria-selected")?void(i.options.get("multiple")?i.trigger("unselect",{originalEvent:e,data:o}):i.trigger("close",{})):void i.trigger("select",{originalEvent:e,data:o})}),this.$results.on("mouseenter",".select2_wprm-results__option[aria-selected]",function(e){var n=t(this).data("data");i.getHighlightedResults().removeClass("select2_wprm-results__option--highlighted"),i.trigger("results:focus",{data:n,element:t(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2_wprm-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]"),n=e.index(t),i=this.$results.offset().top,o=t.offset().top,r=this.$results.scrollTop()+(o-i),a=o-i;r-=2*t.outerHeight(!1),2>=n?this.$results.scrollTop(0):(a>this.$results.outerHeight()||0>a)&&this.$results.scrollTop(r)}},n.prototype.template=function(e,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=i(e,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=o(r):t(n).append(r)},n}),e.define("select2_wprm/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2_wprm/selection/base",["jquery","../utils","../keys"],function(t,e,n){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<span class="select2_wprm-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e,e},i.prototype.bind=function(t,e){var i=this,o=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",function(t){i.trigger("focus",t)}),this.$selection.on("blur",function(t){i._handleBlur(t)}),this.$selection.on("keydown",function(t){i.trigger("keypress",t),t.which===n.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){i.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){i.update(t.data)}),t.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",o),i._attachCloseHandler(t)}),t.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(t)}),t.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),t.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||t.contains(n.$selection[0],document.activeElement)||n.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){t(document.body).on("mousedown.select2_wprm."+e.id,function(e){var n=t(e.target),i=n.closest(".select2_wprm");t(".select2_wprm.select2_wprm-container--open").each(function(){var e=t(this);this!=i[0]&&e.data("element").select2_wprm("close")})})},i.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2_wprm."+e.id)},i.prototype.position=function(t,e){e.find(".selection").append(t)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("select2_wprm/selection/single",["jquery","./base","../utils","../keys"],function(t,e,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,e),o.prototype.render=function(){var t=o.__super__.render.call(this);return t.addClass("select2_wprm-selection--single"),t.html('<span class="select2_wprm-selection__rendered"></span><span class="select2_wprm-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},o.prototype.bind=function(t,e){var n=this;o.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2_wprm-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(t){1===t.which&&n.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(t){}),this.$selection.on("blur",function(t){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(t){n.update(t.data)})},o.prototype.clear=function(){this.$selection.find(".select2_wprm-selection__rendered").empty()},o.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},o.prototype.selectionContainer=function(){return t("<span></span>")},o.prototype.update=function(t){if(0===t.length)return void this.clear();var e=t[0],n=this.$selection.find(".select2_wprm-selection__rendered"),i=this.display(e,n);n.empty().append(i),n.prop("title",e.title||e.text)},o}),e.define("select2_wprm/selection/multiple",["jquery","./base","../utils"],function(t,e,n){function i(t,e){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,e),i.prototype.render=function(){var t=i.__super__.render.call(this);return t.addClass("select2_wprm-selection--multiple"),t.html('<ul class="select2_wprm-selection__rendered"></ul>'),t},i.prototype.bind=function(e,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){o.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2_wprm-selection__choice__remove",function(e){if(!o.options.get("disabled")){var n=t(this),i=n.parent(),r=i.data("data");o.trigger("unselect",{originalEvent:e,data:r})}})},i.prototype.clear=function(){this.$selection.find(".select2_wprm-selection__rendered").empty()},i.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},i.prototype.selectionContainer=function(){return t('<li class="select2_wprm-selection__choice"><span class="select2_wprm-selection__choice__remove" role="presentation">×</span></li>')},i.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],i=0;i<t.length;i++){var o=t[i],r=this.selectionContainer(),a=this.display(o,r);r.append(a),r.prop("title",o.title||o.text),r.data("data",o),e.push(r)}var s=this.$selection.find(".select2_wprm-selection__rendered");n.appendMany(s,e)}},i}),e.define("select2_wprm/selection/placeholder",["../utils"],function(t){function e(t,e,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n)}return e.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},e.prototype.createPlaceholder=function(t,e){var n=this.selectionContainer();return n.html(this.display(e)),n.addClass("select2_wprm-selection__placeholder").removeClass("select2_wprm-selection__choice"),n},e.prototype.update=function(t,e){var n=1==e.length&&e[0].id!=this.placeholder.id;if(e.length>1||n)return t.call(this,e);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2_wprm-selection__rendered").append(i)},e}),e.define("select2_wprm/selection/allowClear",["jquery","../keys"],function(t,e){function n(){}return n.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("select2_wprm: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2_wprm-selection__clear",function(t){i._handleClear(t)}),e.on("keypress",function(t){i._handleKeyboardClear(t,e)})},n.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var n=this.$selection.find(".select2_wprm-selection__clear");if(0!==n.length){e.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(t,n,i){i.isOpen()||(n.which==e.DELETE||n.which==e.BACKSPACE)&&this._handleClear(n)},n.prototype.update=function(e,n){if(e.call(this,n),!(this.$selection.find(".select2_wprm-selection__placeholder").length>0||0===n.length)){var i=t('<span class="select2_wprm-selection__clear">×</span>');i.data("data",n),this.$selection.find(".select2_wprm-selection__rendered").prepend(i)}},n}),e.define("select2_wprm/selection/search",["jquery","../utils","../keys"],function(t,e,n){function i(t,e,n){t.call(this,e,n)}return i.prototype.render=function(e){var n=t('<li class="select2_wprm-search select2_wprm-search--inline"><input class="select2_wprm-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=e.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(t,e,i){var o=this;t.call(this,e,i),e.on("open",function(){o.$search.trigger("focus")}),e.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),e.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),e.on("disable",function(){o.$search.prop("disabled",!0)}),e.on("focus",function(t){o.$search.trigger("focus")}),e.on("results:focus",function(t){o.$search.attr("aria-activedescendant",t.id)}),this.$selection.on("focusin",".select2_wprm-search--inline",function(t){o.trigger("focus",t)}),this.$selection.on("focusout",".select2_wprm-search--inline",function(t){o._handleBlur(t)}),this.$selection.on("keydown",".select2_wprm-search--inline",function(t){if(t.stopPropagation(),o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented(),t.which===n.BACKSPACE&&""===o.$search.val()){var e=o.$searchContainer.prev(".select2_wprm-selection__choice");if(e.length>0){var i=e.data("data");o.searchRemoveChoice(i),t.preventDefault()}}});var r=document.documentMode,a=r&&11>=r;this.$selection.on("input.searchcheck",".select2_wprm-search--inline",function(t){return a?void o.$selection.off("input.search input.searchcheck"):void o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2_wprm-search--inline",function(t){if(a&&"input"===t.type)return void o.$selection.off("input.search input.searchcheck");var e=t.which;e!=n.SHIFT&&e!=n.CTRL&&e!=n.ALT&&e!=n.TAB&&o.handleSearch(t)})},i.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},i.prototype.update=function(t,e){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2_wprm-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";t=""!==this.$search.attr("placeholder")?this.$selection.find(".select2_wprm-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",t)},i}),e.define("select2_wprm/selection/eventRelay",["jquery"],function(t){function e(){}return e.prototype.bind=function(e,n,i){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],a=["opening","closing","selecting","unselecting"];e.call(this,n,i),n.on("*",function(e,n){if(-1!==t.inArray(e,r)){n=n||{};var i=t.Event("select2_wprm:"+e,{params:n});o.$element.trigger(i),-1!==t.inArray(e,a)&&(n.prevented=i.isDefaultPrevented())}})},e}),e.define("select2_wprm/translation",["jquery","require"],function(t,e){function n(t){this.dict=t||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(t){return this.dict[t]},n.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},n._cache={},n.loadPath=function(t){if(!(t in n._cache)){var i=e(t);n._cache[t]=i}return new n(n._cache[t])},n}),e.define("select2_wprm/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("select2_wprm/data/base",["../utils"],function(t){function e(t,n){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,n){var i=e.id+"-result-";return i+=t.generateChars(4),i+=null!=n.id?"-"+n.id.toString():"-"+t.generateChars(4)},e}),e.define("select2_wprm/data/select",["./base","../utils","jquery"],function(t,e,n){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,t),i.prototype.current=function(t){var e=[],i=this;this.$element.find(":selected").each(function(){var t=n(this),o=i.item(t);e.push(o)}),t(e)},i.prototype.select=function(t){var e=this;if(t.selected=!0,n(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var o=[];t=[t],t.push.apply(t,i);for(var r=0;r<t.length;r++){var a=t[r].id;-1===n.inArray(a,o)&&o.push(a)}e.$element.val(o),e.$element.trigger("change")});else{var i=t.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple"))return t.selected=!1,n(t.element).is("option")?(t.element.selected=!1,void this.$element.trigger("change")):void this.current(function(i){for(var o=[],r=0;r<i.length;r++){var a=i[r].id;a!==t.id&&-1===n.inArray(a,o)&&o.push(a)}e.$element.val(o),e.$element.trigger("change")})},i.prototype.bind=function(t,e){var n=this;this.container=t,t.on("select",function(t){n.select(t.data)}),t.on("unselect",function(t){n.unselect(t.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(t,e){var i=[],o=this;this.$element.children().each(function(){var e=n(this);if(e.is("option")||e.is("optgroup")){var r=o.item(e),a=o.matches(t,r);null!==a&&i.push(a)}}),e({results:i})},i.prototype.addOptions=function(t){e.appendMany(this.$element,t)},i.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup"),e.label=t.text):(e=document.createElement("option"),void 0!==e.textContent?e.textContent=t.text:e.innerText=t.text),t.id&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var i=n(e),o=this._normalizeItem(t);return o.element=e,n.data(e,"data",o),i},i.prototype.item=function(t){var e={};if(null!=(e=n.data(t[0],"data")))return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var i=t.children("option"),o=[],r=0;r<i.length;r++){var a=n(i[r]),s=this.item(a);o.push(s)}e.children=o}return e=this._normalizeItem(e),e.element=t[0],n.data(t[0],"data",e),e},i.prototype._normalizeItem=function(t){n.isPlainObject(t)||(t={id:t,text:t}),t=n.extend({},{text:""},t);var e={selected:!1,disabled:!1};return null!=t.id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),n.extend({},e,t)},i.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},i}),e.define("select2_wprm/data/array",["./select","../utils","jquery"],function(t,e,n){function i(t,e){var n=e.get("data")||[];i.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(n))}return e.Extend(i,t),i.prototype.select=function(t){var e=this.$element.find("option").filter(function(e,n){return n.value==t.id.toString()});0===e.length&&(e=this.option(t),this.addOptions(e)),i.__super__.select.call(this,t)},i.prototype.convertToOptions=function(t){for(var i=this,o=this.$element.find("option"),r=o.map(function(){return i.item(n(this)).id}).get(),a=[],s=0;s<t.length;s++){var l=this._normalizeItem(t[s]);if(n.inArray(l.id,r)>=0){var c=o.filter(function(t){return function(){return n(this).val()==t.id}}(l)),u=this.item(c),d=n.extend(!0,{},l,u),h=this.option(d);c.replaceWith(h)}else{var p=this.option(l);if(l.children){var f=this.convertToOptions(l.children);e.appendMany(p,f)}a.push(p)}}return a},i}),e.define("select2_wprm/data/ajax",["./array","../utils","jquery"],function(t,e,n){function i(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,t,e)}return e.Extend(i,t),i.prototype._applyDefaults=function(t){var e={data:function(t){return n.extend({},t,{q:t.term})},transport:function(t,e,i){var o=n.ajax(t);return o.then(e),o.fail(i),o}};return n.extend({},e,t,!0)},i.prototype.processResults=function(t){return t},i.prototype.query=function(t,e){function i(){var i=r.transport(r,function(i){var r=o.processResults(i,t);o.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("select2_wprm: The AJAX results did not return an array in the `results` key of the response.")),e(r)},function(){i.status&&"0"===i.status||o.trigger("results:message",{message:"errorLoading"})});o._request=i}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,t)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i}),e.define("select2_wprm/data/tags",["jquery"],function(t){function e(e,n,i){var o=i.get("tags"),r=i.get("createTag");void 0!==r&&(this.createTag=r);var a=i.get("insertTag");if(void 0!==a&&(this.insertTag=a),e.call(this,n,i),t.isArray(o))for(var s=0;s<o.length;s++){var l=o[s],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return e.prototype.query=function(t,e,n){function i(t,r){for(var a=t.results,s=0;s<a.length;s++){var l=a[s],c=null!=l.children&&!i({results:l.children},!0);if(l.text===e.term||c)return!r&&(t.data=a,void n(t))}if(r)return!0;var u=o.createTag(e);if(null!=u){var d=o.option(u);d.attr("data-select2_wprm-tag",!0),o.addOptions([d]),o.insertTag(a,u)}t.results=a,n(t)}var o=this;return this._removeOldTags(),null==e.term||null!=e.page?void t.call(this,e,n):void t.call(this,e,i)},e.prototype.createTag=function(e,n){var i=t.trim(n.term);return""===i?null:{id:i,text:i}},e.prototype.insertTag=function(t,e,n){e.unshift(n)},e.prototype._removeOldTags=function(e){(this._lastTag,this.$element.find("option[data-select2_wprm-tag]")).each(function(){this.selected||t(this).remove()})},e}),e.define("select2_wprm/data/tokenizer",["jquery"],function(t){function e(t,e,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),t.call(this,e,n)}return e.prototype.bind=function(t,e,n){t.call(this,e,n),this.$search=e.dropdown.$search||e.selection.$search||n.find(".select2_wprm-search__field")},e.prototype.query=function(e,n,i){function o(e){var n=a._normalizeItem(e);if(!a.$element.find("option").filter(function(){return t(this).val()===n.id}).length){var i=a.option(n);i.attr("data-select2_wprm-tag",!0),a._removeOldTags(),a.addOptions([i])}r(n)}function r(t){a.trigger("select",{data:t})}var a=this;n.term=n.term||"";var s=this.tokenizer(n,this.options,o);s.term!==n.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.focus()),n.term=s.term),e.call(this,n,i)},e.prototype.tokenizer=function(e,n,i,o){for(var r=i.get("tokenSeparators")||[],a=n.term,s=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};s<a.length;){var c=a[s];if(-1!==t.inArray(c,r)){var u=a.substr(0,s),d=t.extend({},n,{term:u}),h=l(d);null!=h?(o(h),a=a.substr(s+1)||"",s=0):s++}else s++}return{term:a}},e}),e.define("select2_wprm/data/minimumInputLength",[],function(){function t(t,e,n){this.minimumInputLength=n.get("minimumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){return e.term=e.term||"",e.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):void t.call(this,e,n)},t}),e.define("select2_wprm/data/maximumInputLength",[],function(){function t(t,e,n){this.maximumInputLength=n.get("maximumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){return e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):void t.call(this,e,n)},t}),e.define("select2_wprm/data/maximumSelectionLength",[],function(){function t(t,e,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){var i=this;this.current(function(o){var r=null!=o?o.length:0;return i.maximumSelectionLength>0&&r>=i.maximumSelectionLength?void i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):void t.call(i,e,n)})},t}),e.define("select2_wprm/dropdown",["jquery","./utils"],function(t,e){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2_wprm-dropdown"><span class="select2_wprm-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},n.prototype.bind=function(){},n.prototype.position=function(t,e){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2_wprm/dropdown/search",["jquery","../utils"],function(t,e){function n(){}return n.prototype.render=function(e){var n=e.call(this),i=t('<span class="select2_wprm-search select2_wprm-search--dropdown"><input class="select2_wprm-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(e,n,i){var o=this;e.call(this,n,i),this.$search.on("keydown",function(t){o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(e){t(this).off("keyup")}),this.$search.on("keyup input",function(t){o.handleSearch(t)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),n.on("focus",function(){n.isOpen()&&o.$search.focus()}),n.on("results:all",function(t){null!=t.query.term&&""!==t.query.term||(o.showSearch(t)?o.$searchContainer.removeClass("select2_wprm-search--hide"):o.$searchContainer.addClass("select2_wprm-search--hide"))})},n.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},n.prototype.showSearch=function(t,e){return!0},n}),e.define("select2_wprm/dropdown/hidePlaceholder",[],function(){function t(t,e,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n,i)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var n=e.slice(0),i=e.length-1;i>=0;i--){var o=e[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},t}),e.define("select2_wprm/dropdown/infiniteScroll",["jquery"],function(t){function e(t,e,n,i){this.lastParams={},t.call(this,e,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,n,i){var o=this;e.call(this,n,i),n.on("query",function(t){o.lastParams=t,o.loading=!0}),n.on("query:append",function(t){o.lastParams=t,o.loading=!0}),this.$results.on("scroll",function(){var e=t.contains(document.documentElement,o.$loadingMore[0]);!o.loading&&e&&o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore()})},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2_wprm-results__option select2_wprm-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return e.html(n(this.lastParams)),e},e}),e.define("select2_wprm/dropdown/attachBody",["jquery","../utils"],function(t,e){function n(e,n,i){this.$dropdownParent=i.get("dropdownParent")||t(document.body),e.call(this,n,i)}return n.prototype.bind=function(t,e,n){var i=this,o=!1;t.call(this,e,n),e.on("open",function(){i._showDropdown(),i._attachPositioningHandler(e),o||(o=!0,e.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),e.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),e.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},n.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(t,e,n){e.attr("class",n.attr("class")),e.removeClass("select2_wprm"),e.addClass("select2_wprm-container--open"),e.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(e){var n=t("<span></span>"),i=e.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,r="scroll.select2_wprm."+i.id,a="resize.select2_wprm."+i.id,s="orientationchange.select2_wprm."+i.id,l=this.$container.parents().filter(e.hasScroll);l.each(function(){t(this).data("select2_wprm-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})}),l.on(r,function(e){var n=t(this).data("select2_wprm-scroll-position");t(this).scrollTop(n.y)}),t(window).on(r+" "+a+" "+s,function(t){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.select2_wprm."+i.id,r="resize.select2_wprm."+i.id,a="orientationchange.select2_wprm."+i.id;this.$container.parents().filter(e.hasScroll).off(o),t(window).off(o+" "+r+" "+a)},n.prototype._positionDropdown=function(){var e=t(window),n=this.$dropdown.hasClass("select2_wprm-dropdown--above"),i=this.$dropdown.hasClass("select2_wprm-dropdown--below"),o=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=r.top,a.bottom=r.top+a.height;var s={height:this.$dropdown.outerHeight(!1)},l={top:e.scrollTop(),bottom:e.scrollTop()+e.height()},c=l.top<r.top-s.height,u=l.bottom>r.bottom+s.height,d={left:r.left,top:a.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var p=h.offset();d.top-=p.top,d.left-=p.left,n||i||(o="below"),u||!c||n?!c&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(d.top=a.top-p.top-s.height),null!=o&&(this.$dropdown.removeClass("select2_wprm-dropdown--below select2_wprm-dropdown--above").addClass("select2_wprm-dropdown--"+o),this.$container.removeClass("select2_wprm-container--below select2_wprm-container--above").addClass("select2_wprm-container--"+o)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},n.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),e.define("select2_wprm/dropdown/minimumResultsForSearch",[],function(){function t(e){for(var n=0,i=0;i<e.length;i++){var o=e[i];o.children?n+=t(o.children):n++}return n}function e(t,e,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,n,i)}return e.prototype.showSearch=function(e,n){return!(t(n.data.results)<this.minimumResultsForSearch)&&e.call(this,n)},e}),e.define("select2_wprm/dropdown/selectOnClose",[],function(){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("close",function(t){i._handleSelectOnClose(t)})},t.prototype._handleSelectOnClose=function(t,e){if(e&&null!=e.originalselect2_wprmEvent){var n=e.originalselect2_wprmEvent;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},t}),e.define("select2_wprm/dropdown/closeOnSelect",[],function(){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("select",function(t){i._selectTriggered(t)}),e.on("unselect",function(t){i._selectTriggered(t)})},t.prototype._selectTriggered=function(t,e){var n=e.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalselect2_wprmEvent:e})},t}),e.define("select2_wprm/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,n="Please delete "+e+" character";return 1!=e&&(n+="s"),n},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("select2_wprm/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(t,e,n,i,o,r,a,s,l,c,u,d,h,p,f,m,g,v,_,w,b,y,C,x,S,T,E,D,A){function N(){this.reset()}return N.prototype.apply=function(d){if(d=t.extend(!0,{},this.defaults,d),null==d.dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=p:d.dataAdapter=h,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,_)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,w)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,m)),(null!=d.tokenSeparators||null!=d.tokenizer)&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null!=d.query){var A=e(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,A)}if(null!=d.initSelection){var N=e(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,N)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,x)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,C)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,E))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=b;else{var k=c.Decorate(b,y);d.dropdownAdapter=k}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,T)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,D)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var R=e(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,R)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,S)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=o:d.selectionAdapter=i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var O=e(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,O)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var I=d.language.split("-"),L=I[0];d.language=[d.language,L]}else d.language=[d.language];if(t.isArray(d.language)){var P=new u;d.language.push("en");for(var M=d.language,$=0;$<M.length;$++){var F=M[$],H={};try{H=u.loadPath(F)}catch(t){try{F=this.defaults.amdLanguageBase+F,H=u.loadPath(F)}catch(t){d.debug&&window.console&&console.warn&&console.warn('select2_wprm: The language file for "'+F+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(H)}d.translations=P}else{var B=u.loadPath(this.defaults.amdLanguageBase+"en"),j=new u(d.language);j.extend(B),d.translations=j}return d},N.prototype.reset=function(){function e(t){function e(t){return d[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function n(i,o){if(""===t.trim(i.term))return o;if(o.children&&o.children.length>0){for(var r=t.extend(!0,{},o),a=o.children.length-1;a>=0;a--)null==n(i,o.children[a])&&r.children.splice(a,1);return r.children.length>0?r:n(i,r)}var s=e(o.text).toUpperCase(),l=e(i.term).toUpperCase();return s.indexOf(l)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:A,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},N.prototype.set=function(e,n){var i=t.camelCase(e),o={};o[i]=n;var r=c._convertData(o);t.extend(this.defaults,r)},new N}),e.define("select2_wprm/options",["require","jquery","./defaults","./utils"],function(t,e,n,i){function o(e,o){if(this.options=e,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var r=t(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,r)}}return o.prototype.fromElement=function(t){var n=["select2_wprm"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),t.data("select2_wprmTags")&&(this.options.debug&&window.console&&console.warn&&console.warn('select2_wprm: The `data-select2_wprm-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of select2_wprm.'),t.data("data",t.data("select2_wprmTags")),t.data("tags",!0)),t.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("select2_wprm: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of select2_wprm."),t.attr("ajax--url",t.data("ajaxUrl")),t.data("ajax--url",t.data("ajaxUrl")));var o={};o=e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset?e.extend(!0,{},t[0].dataset,t.data()):t.data();var r=e.extend(!0,{},o);r=i._convertData(r);for(var a in r)e.inArray(a,n)>-1||(e.isPlainObject(this.options[a])?e.extend(this.options[a],r[a]):this.options[a]=r[a]);return this},o.prototype.get=function(t){return this.options[t]},o.prototype.set=function(t,e){this.options[t]=e},o}),e.define("select2_wprm/core",["jquery","./options","./utils","./keys"],function(t,e,n,i){var o=function t(n,i){null!=n.data("select2_wprm")&&n.data("select2_wprm").destroy(),this.$element=n,this.id=this._generateId(n),i=i||{},this.options=new e(i,n),t.__super__.constructor.call(this);var o=n.attr("tabindex")||0;n.data("old-tabindex",o),n.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(n,this.options);var a=this.render();this._placeContainer(a);var s=this.options.get("selectionAdapter");this.selection=new s(n,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var l=this.options.get("dropdownAdapter");this.dropdown=new l(n,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var c=this.options.get("resultsAdapter");this.results=new c(n,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){u.trigger("selection:update",{data:t})}),n.addClass("select2_wprm-hidden-accessible"),n.attr("aria-hidden","true"),this._syncAttributes(),n.data("select2_wprm",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(t){var e="";return e=null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+n.generateChars(2):n.generateChars(4),e=e.replace(/(:|\.|\[|\]|,)/g,""),e="select2_wprm-"+e},o.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},o.prototype._resolveWidth=function(t,e){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var i=this._resolveWidth(t,"style");return null!=i?i:this._resolveWidth(t,"element")}if("element"==e){var o=t.outerWidth(!1);return 0>=o?"auto":o+"px"}if("style"==e){var r=t.attr("style");if("string"!=typeof r)return null;for(var a=r.split(";"),s=0,l=a.length;l>s;s+=1){var c=a[s].replace(/\s/g,""),u=c.match(n);if(null!==u&&u.length>=1)return u[1]}return null}return e},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2_wprm",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2_wprm",function(t){e.trigger("focus",t)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){t.each(n,e._syncA),t.each(n,e._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},o.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",function(e,n){t.trigger(e,n)})},o.prototype._registerSelectionEvents=function(){var e=this,n=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(t){e.focus(t)}),this.selection.on("*",function(i,o){-1===t.inArray(i,n)&&e.trigger(i,o)})},o.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",function(e,n){t.trigger(e,n)})},o.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",function(e,n){t.trigger(e,n)})},o.prototype._registerEvents=function(){var t=this;this.on("open",function(){t.$container.addClass("select2_wprm-container--open")}),this.on("close",function(){t.$container.removeClass("select2_wprm-container--open")}),this.on("enable",function(){t.$container.removeClass("select2_wprm-container--disabled")}),this.on("disable",function(){t.$container.addClass("select2_wprm-container--disabled")}),this.on("blur",function(){t.$container.removeClass("select2_wprm-container--focus")}),this.on("query",function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,function(n){t.trigger("results:all",{data:n,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(n){t.trigger("results:append",{data:n,query:e})})}),this.on("keypress",function(e){var n=e.which;t.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&e.altKey?(t.close(),e.preventDefault()):n===i.ENTER?(t.trigger("results:select",{}),e.preventDefault()):n===i.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):n===i.UP?(t.trigger("results:previous",{}),e.preventDefault()):n===i.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&e.altKey)&&(t.open(),e.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(t,e){var n=!1,i=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&e.addedNodes.length>0)for(var o=0;o<e.addedNodes.length;o++){var r=e.addedNodes[o];r.selected&&(n=!0)}else e.removedNodes&&e.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(t){i.trigger("selection:update",{data:t})})}},o.prototype.trigger=function(t,e){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===e&&(e={}),t in i){var r=i[t],a={prevented:!1,name:t,args:e};if(n.call(this,r,a),a.prevented)return void(e.prevented=!0)}n.call(this,t,e)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2_wprm-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2_wprm-container--focus")},o.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2_wprm-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('select2_wprm: The `select2_wprm("enable")` method has been deprecated and will be removed in later select2_wprm versions. Use $element.prop("disabled") instead.'),(null==t||0===t.length)&&(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('select2_wprm: Data can no longer be set using `select2_wprm("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('select2_wprm: The `select2_wprm("val")` method has been deprecated and will be removed in later select2_wprm versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var n=e[0];t.isArray(n)&&(n=t.map(n,function(t){return t.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2_wprm"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2_wprm-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2_wprm"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=t('<span class="select2_wprm select2_wprm-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2_wprm-container--"+this.options.get("theme")),e.data("element",this.$element),e},o}),e.define("jquery-mousewheel",["jquery"],function(t){return t}),e.define("jquery.select2_wprm",["jquery","jquery-mousewheel","./select2_wprm/core","./select2_wprm/defaults"],function(t,e,n,i){if(null==t.fn.select2_wprm){var o=["open","close","destroy"];t.fn.select2_wprm=function(e){if(e=e||{},"object"==(void 0===e?"undefined":s(e)))return this.each(function(){var i=t.extend(!0,{},e);new n(t(this),i)}),this;if("string"==typeof e){var i,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=t(this).data("select2_wprm");null==n&&window.console&&console.error&&console.error("The select2_wprm('"+e+"') method was called on an element that is not using select2_wprm."),i=n[e].apply(n,r)}),t.inArray(e,o)>-1?this:i}throw new Error("Invalid arguments for select2_wprm: "+e)}}return null==t.fn.select2_wprm.defaults&&(t.fn.select2_wprm.defaults=i),n}),{define:e.define,require:e.require}}(),n=e.require("jquery.select2_wprm");return t.fn.select2_wprm.amd=e,n})}).call(e,n(0))},function(t,e){},function(t,e,n){"use strict";var i=n(20),o=n.n(i),r=n(10),a=n.n(r),s=n(22),l=(n.n(s),n(23)),c=(n.n(l),n(24)),u=n(1),d={editor:!1,clear:function(){this.editor.resetContent()},set:function(t){this.editor.setContent(t)},init:function(){if(this.editor)this.editor.addElements(".wprm-rich-editor");else{o.a.init(),Object(c.b)();var t={placeholder:{text:wprm_temp_admin.modal.text.medium_editor_placeholder,hideOnClick:!0},autoLink:!0,anchorPreview:{showWhenToolbarIsVisible:!1},imageDragging:!1,toolbar:{buttons:["bold","italic","underline","subscript","superscript"]},extensions:{}};t.toolbar.buttons.push("links"),t.extensions.links=new this.extensions.links,wprm_temp_admin.addons.premium&&(t.toolbar.buttons.push("adjustable_servings"),t.toolbar.buttons.push("timer"),t.extensions.adjustable_servings=new this.extensions.adjustable_servings,t.extensions.timer=new this.extensions.timer),this.editor=new a.a(".wprm-rich-editor",t),this.editor.subscribe("editableInput",function(){u.a.changes_made=!0})}},extensions:{adjustable_servings:a.a.Extension.extend({name:"adjustable_servings",init:function(){this.button=this.document.createElement("button"),this.button.classList.add("medium-editor-action"),this.button.innerHTML="<b>Adjustable</b>",this.button.title="Adjustable Quantity",this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},handleClick:function(t){var e=o.a.getSelection(),n=e.getRangeAt(0),i=n.cloneRange(),r=n.cloneRange(),a=n.getDocument().createTextNode("[adjustable]"),s=n.getDocument().createTextNode("[/adjustable]");r.collapse(!1),r.insertNode(s),r.detach(),n.setEndAfter(s),n.insertNode(a),o.a.getSelection().setSingleRange(i)}}),timer:a.a.Extension.extend({name:"timer",init:function(){this.button=this.document.createElement("button"),this.button.classList.add("medium-editor-action"),this.button.innerHTML="<b>Timer</b>",this.button.title="Timer",this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},handleClick:function(t){var e=o.a.getSelection(),n=e.getRangeAt(0),i=n.cloneRange(),r=n.cloneRange(),a=n.getDocument().createTextNode("[timer minutes=0]"),s=n.getDocument().createTextNode("[/timer]");r.collapse(!1),r.insertNode(s),r.detach(),n.setEndAfter(s),n.insertNode(a),o.a.getSelection().setSingleRange(i)}}),links:c.a}};e.a=d},function(t,e,n){(function(i){var o;/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
|
3 |
"classList"in document.createElement("_")||function(t){"use strict";if("Element"in t){var e=t.Element.prototype,n=Object,i=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array.prototype.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},r=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},a=function(t,e){if(""===e)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(t,e)},s=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,r=n.length;o<r;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=s.prototype=[],c=function(){return new s(this)};if(r.prototype=Error.prototype,l.item=function(t){return this[t]||null},l.contains=function(t){return t+="",-1!==a(this,t)},l.add=function(){var t,e=arguments,n=0,i=e.length,o=!1;do{t=e[n]+"",-1===a(this,t)&&(this.push(t),o=!0)}while(++n<i);o&&this._updateClassName()},l.remove=function(){var t,e,n=arguments,i=0,o=n.length,r=!1;do{for(t=n[i]+"",e=a(this,t);-1!==e;)this.splice(e,1),r=!0,e=a(this,t)}while(++i<o);r&&this._updateClassName()},l.toggle=function(t,e){t+="";var n=this.contains(t),i=n?!0!==e&&"remove":!1!==e&&"add";return i&&this[i](t),!0===e||!1===e?e:!n},l.toString=function(){return this.join(" ")},n.defineProperty){var u={get:c,enumerable:!0,configurable:!0};try{n.defineProperty(e,"classList",u)}catch(t){-2146823252===t.number&&(u.enumerable=!1,n.defineProperty(e,"classList",u))}}else n.prototype.__defineGetter__&&e.__defineGetter__("classList",c)}}(self),/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
|
4 |
function(t){"use strict";if(t.URL=t.URL||t.webkitURL,t.Blob&&t.URL)try{return void new Blob}catch(t){}var e=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||function(t){var e=function(t){return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},i=function(t,e,n){this.data=t,this.size=t.length,this.type=e,this.encoding=n},o=n.prototype,r=i.prototype,a=t.FileReaderSync,s=function(t){this.code=this[this.name=t]},l="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=l.length,u=t.URL||t.webkitURL||t,d=u.createObjectURL,h=u.revokeObjectURL,p=u,f=t.btoa,m=t.atob,g=t.ArrayBuffer,v=t.Uint8Array,_=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(i.fake=r.fake=!0;c--;)s.prototype[l[c]]=c+1;return u.createObjectURL||(p=t.URL=function(t){var e,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");return n.href=t,"origin"in n||("data:"===n.protocol.toLowerCase()?n.origin=null:(e=t.match(_),n.origin=e&&e[1])),n}),p.createObjectURL=function(t){var e,n=t.type;return null===n&&(n="application/octet-stream"),t instanceof i?(e="data:"+n,"base64"===t.encoding?e+";base64,"+t.data:"URI"===t.encoding?e+","+decodeURIComponent(t.data):f?e+";base64,"+f(t.data):e+","+encodeURIComponent(t.data)):d?d.call(u,t):void 0},p.revokeObjectURL=function(t){"data:"!==t.substring(0,5)&&h&&h.call(u,t)},o.append=function(t){var n=this.data;if(v&&(t instanceof g||t instanceof v)){for(var o="",r=new v(t),l=0,c=r.length;l<c;l++)o+=String.fromCharCode(r[l]);n.push(o)}else if("Blob"===e(t)||"File"===e(t)){if(!a)throw new s("NOT_READABLE_ERR");var u=new a;n.push(u.readAsBinaryString(t))}else t instanceof i?"base64"===t.encoding&&m?n.push(m(t.data)):"URI"===t.encoding?n.push(decodeURIComponent(t.data)):"raw"===t.encoding&&n.push(t.data):("string"!=typeof t&&(t+=""),n.push(unescape(encodeURIComponent(t))))},o.getBlob=function(t){return arguments.length||(t=null),new i(this.data.join(""),t,"raw")},o.toString=function(){return"[object BlobBuilder]"},r.slice=function(t,e,n){var o=arguments.length;return o<3&&(n=null),new i(this.data.slice(t,o>1?e:this.data.length),n,this.encoding)},r.toString=function(){return"[object Blob]"},r.close=function(){this.size=0,delete this.data},n}(t);t.Blob=function(t,n){var i=n?n.type||"":"",o=new e;if(t)for(var r=0,a=t.length;r<a;r++)Uint8Array&&t[r]instanceof Uint8Array?o.append(t[r].buffer):o.append(t[r]);var s=o.getBlob(i);return!s.slice&&s.webkitSlice&&(s.slice=s.webkitSlice),s};var n=Object.getPrototypeOf||function(t){return t.__proto__};t.Blob.prototype=n(new t.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this),function(r,a){"use strict";"object"==typeof t&&void 0!==i&&i&&i.versions&&i.versions.electron||"object"!=typeof t?void 0!==(o=function(){return a}.call(e,n,e,t))&&(t.exports=o):t.exports=a}(0,function(){"use strict";function t(t,e){return this.init(t,e)}return t.extensions={},function(e){function n(t,e){var n,i=Array.prototype.slice.call(arguments,2);e=e||{};for(var o=0;o<i.length;o++){var r=i[o];if(r)for(n in r)r.hasOwnProperty(n)&&void 0!==r[n]&&(t||!1===e.hasOwnProperty(n))&&(e[n]=r[n])}return e}var i=!1;try{var o=document.createElement("div"),r=document.createTextNode(" ");o.appendChild(r),i=o.contains(r)}catch(t){}var a={isIE:"Microsoft Internet Explorer"===navigator.appName||"Netscape"===navigator.appName&&null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent),isEdge:null!==/Edge\/\d+/.exec(navigator.userAgent),isFF:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isMac:e.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(t){return!!(a.isMac&&t.metaKey||!a.isMac&&t.ctrlKey)},isKey:function(t,e){var n=a.getKeyCode(t);return!1===Array.isArray(e)?n===e:-1!==e.indexOf(n)},getKeyCode:function(t){var e=t.which;return null===e&&(e=null!==t.charCode?t.charCode:t.keyCode),e},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var t=[!0].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},defaults:function(){var t=[!1].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},createLink:function(t,e,n,i){var o=t.createElement("a");return a.moveTextRangeIntoElement(e[0],e[e.length-1],o),o.setAttribute("href",n),i&&("_blank"===i&&o.setAttribute("rel","noopener noreferrer"),o.setAttribute("target",i)),o},findOrCreateMatchingTextNodes:function(t,e,n){for(var i=t.createTreeWalker(e,NodeFilter.SHOW_ALL,null,!1),o=[],r=0,s=!1,l=null,c=null;null!==(l=i.nextNode());)if(!(l.nodeType>3))if(3===l.nodeType){if(!s&&n.start<r+l.nodeValue.length&&(s=!0,c=a.splitStartNodeIfNeeded(l,n.start,r)),s&&a.splitEndNodeIfNeeded(l,c,n.end,r),s&&r===n.end)break;if(s&&r>n.end+1)throw new Error("PerformLinking overshot the target!");s&&o.push(c||l),r+=l.nodeValue.length,null!==c&&(r+=c.nodeValue.length,i.nextNode()),c=null}else"img"===l.tagName.toLowerCase()&&(!s&&n.start<=r&&(s=!0),s&&o.push(l));return o},splitStartNodeIfNeeded:function(t,e,n){return e!==n?t.splitText(e-n):null},splitEndNodeIfNeeded:function(t,e,n,i){var o,r;o=i+t.nodeValue.length+(e?e.nodeValue.length:0)-1,r=n-i-(e?t.nodeValue.length:0),o>=n&&i!==o&&0!==r&&(e||t).splitText(r)},splitByBlockElements:function(e){if(3!==e.nodeType&&1!==e.nodeType)return[];var n=[],i=t.util.blockContainerElementNames.join(",");if(3===e.nodeType||0===e.querySelectorAll(i).length)return[e];for(var o=0;o<e.childNodes.length;o++){var r=e.childNodes[o];if(3===r.nodeType)n.push(r);else if(1===r.nodeType){var a=r.querySelectorAll(i);0===a.length?n.push(r):n=n.concat(t.util.splitByBlockElements(r))}}return n},findAdjacentTextNodeWithContent:function(t,e,n){var i,o=!1,r=n.createNodeIterator(t,NodeFilter.SHOW_TEXT,null,!1);for(i=r.nextNode();i;){if(i===e)o=!0;else if(o&&3===i.nodeType&&i.nodeValue&&i.nodeValue.trim().length>0)break;i=r.nextNode()}return i},findPreviousSibling:function(t){if(!t||a.isMediumEditorElement(t))return!1;for(var e=t.previousSibling;!e&&!a.isMediumEditorElement(t.parentNode);)t=t.parentNode,e=t.previousSibling;return e},isDescendant:function(t,e,n){if(!t||!e)return!1;if(t===e)return!!n;if(1!==t.nodeType)return!1;if(i||3!==e.nodeType)return t.contains(e);for(var o=e.parentNode;null!==o;){if(o===t)return!0;o=o.parentNode}return!1},isElement:function(t){return!(!t||1!==t.nodeType)},throttle:function(t,e){var n,i,o,r=null,a=0,s=function(){a=Date.now(),r=null,o=t.apply(n,i),r||(n=i=null)};return e||0===e||(e=50),function(){var l=Date.now(),c=e-(l-a);return n=this,i=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),a=l,o=t.apply(n,i),r||(n=i=null)):r||(r=setTimeout(s,c)),o}},traverseUp:function(t,e){if(!t)return!1;do{if(1===t.nodeType){if(e(t))return t;if(a.isMediumEditorElement(t))return!1}t=t.parentNode}while(t);return!1},htmlEntities:function(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},insertHTMLCommand:function(e,n){var i,o,r,s,l,c,u,d=!1,h=["insertHTML",!1,n];if(!t.util.isEdge&&e.queryCommandSupported("insertHTML"))try{return e.execCommand.apply(e,h)}catch(t){}if(i=e.getSelection(),i.rangeCount){if(o=i.getRangeAt(0),u=o.commonAncestorContainer,a.isMediumEditorElement(u)&&!u.firstChild)o.selectNode(u.appendChild(e.createTextNode("")));else if(3===u.nodeType&&0===o.startOffset&&o.endOffset===u.nodeValue.length||3!==u.nodeType&&u.innerHTML===o.toString()){for(;!a.isMediumEditorElement(u)&&u.parentNode&&1===u.parentNode.childNodes.length&&!a.isMediumEditorElement(u.parentNode);)u=u.parentNode;o.selectNode(u)}for(o.deleteContents(),r=e.createElement("div"),r.innerHTML=n,s=e.createDocumentFragment();r.firstChild;)l=r.firstChild,c=s.appendChild(l);o.insertNode(s),c&&(o=o.cloneRange(),o.setStartAfter(c),o.collapse(!0),t.selection.selectRange(e,o)),d=!0}return e.execCommand.callListeners&&e.execCommand.callListeners(h,d),d},execFormatBlock:function(e,n){var i,o=a.getTopBlockContainer(t.selection.getSelectionStart(e));if("blockquote"===n){if(o&&(i=Array.prototype.slice.call(o.childNodes),i.some(function(t){return a.isBlockContainer(t)})))return e.execCommand("outdent",!1,null);if(a.isIE)return e.execCommand("indent",!1,n)}if(o&&n===o.nodeName.toLowerCase()&&(n="p"),a.isIE&&(n="<"+n+">"),o&&"blockquote"===o.nodeName.toLowerCase()){if(a.isIE&&"<p>"===n)return e.execCommand("outdent",!1,n);if((a.isFF||a.isEdge)&&"p"===n)return i=Array.prototype.slice.call(o.childNodes),i.some(function(t){return!a.isBlockContainer(t)})&&e.execCommand("formatBlock",!1,n),e.execCommand("outdent",!1,n)}return e.execCommand("formatBlock",!1,n)},setTargetBlank:function(t,e){var n,i=e||!1;if("a"===t.nodeName.toLowerCase())t.target="_blank",t.rel="noopener noreferrer";else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)!1!==i&&i!==t[n].attributes.href.value||(t[n].target="_blank",t[n].rel="noopener noreferrer")},removeTargetBlank:function(t,e){var n;if("a"===t.nodeName.toLowerCase())t.removeAttribute("target"),t.removeAttribute("rel");else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)e===t[n].attributes.href.value&&(t[n].removeAttribute("target"),t[n].removeAttribute("rel"))},addClassToAnchors:function(t,e){var n,i,o=e.split(" ");if("a"===t.nodeName.toLowerCase())for(i=0;i<o.length;i+=1)t.classList.add(o[i]);else{var r=t.getElementsByTagName("a");if(0===r.length){var s=a.getClosestTag(t,"a");t=s?[s]:[]}else t=r;for(n=0;n<t.length;n+=1)for(i=0;i<o.length;i+=1)t[n].classList.add(o[i])}},isListItem:function(t){if(!t)return!1;if("li"===t.nodeName.toLowerCase())return!0;for(var e=t.parentNode,n=e.nodeName.toLowerCase();"li"===n||!a.isBlockContainer(e)&&"div"!==n;){if("li"===n)return!0;if(!(e=e.parentNode))return!1;n=e.nodeName.toLowerCase()}return!1},cleanListDOM:function(e,n){if("li"===n.nodeName.toLowerCase()){var i=n.parentElement;"p"===i.parentElement.nodeName.toLowerCase()&&(a.unwrap(i.parentElement,e),t.selection.moveCursor(e,n.firstChild,n.firstChild.textContent.length))}},splitOffDOMTree:function(t,e,n){for(var i=e,o=null,r=!n;i!==t;){var a,s=i.parentNode,l=s.cloneNode(!1),c=r?i:s.firstChild;for(o&&(r?l.appendChild(o):a=o),o=l;c;){var u=c.nextSibling;c===i?(c.hasChildNodes()?c=c.cloneNode(!1):c.parentNode.removeChild(c),c.textContent&&o.appendChild(c),c=r?u:null):(c.parentNode.removeChild(c),(c.hasChildNodes()||c.textContent)&&o.appendChild(c),c=u)}a&&o.appendChild(a),i=s}return o},moveTextRangeIntoElement:function(t,e,n){if(!t||!e)return!1;var i=a.findCommonRoot(t,e);if(!i)return!1;if(e===t){var o=t.parentNode,r=t.nextSibling;return o.removeChild(t),n.appendChild(t),r?o.insertBefore(n,r):o.appendChild(n),n.hasChildNodes()}for(var s,l,c,u=[],d=0;d<i.childNodes.length;d++)if(c=i.childNodes[d],s){if(a.isDescendant(c,e,!0)){l=c;break}u.push(c)}else a.isDescendant(c,t,!0)&&(s=c);var h=l.nextSibling,p=i.ownerDocument.createDocumentFragment();return s===t?(s.parentNode.removeChild(s),p.appendChild(s)):p.appendChild(a.splitOffDOMTree(s,t)),u.forEach(function(t){t.parentNode.removeChild(t),p.appendChild(t)}),l===e?(l.parentNode.removeChild(l),p.appendChild(l)):p.appendChild(a.splitOffDOMTree(l,e,!0)),n.appendChild(p),l.parentNode===i?i.insertBefore(n,l):h?i.insertBefore(n,h):i.appendChild(n),n.hasChildNodes()},depthOfNode:function(t){for(var e=0,n=t;null!==n.parentNode;)n=n.parentNode,e++;return e},findCommonRoot:function(t,e){for(var n=a.depthOfNode(t),i=a.depthOfNode(e),o=t,r=e;n!==i;)n>i?(o=o.parentNode,n-=1):(r=r.parentNode,i-=1);for(;o!==r;)o=o.parentNode,r=r.parentNode;return o},isElementAtBeginningOfBlock:function(t){for(var e,n;!a.isBlockContainer(t)&&!a.isMediumEditorElement(t);){for(n=t;n=n.previousSibling;)if(e=3===n.nodeType?n.nodeValue:n.textContent,e.length>0)return!1;t=t.parentNode}return!0},isMediumEditorElement:function(t){return t&&t.getAttribute&&!!t.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(t){return a.traverseUp(t,function(t){return a.isMediumEditorElement(t)})},isBlockContainer:function(t){return t&&3!==t.nodeType&&-1!==a.blockContainerElementNames.indexOf(t.nodeName.toLowerCase())},getClosestBlockContainer:function(t){return a.traverseUp(t,function(t){return a.isBlockContainer(t)||a.isMediumEditorElement(t)})},getTopBlockContainer:function(t){var e=!!a.isBlockContainer(t)&&t;return a.traverseUp(t,function(t){return a.isBlockContainer(t)&&(e=t),!(e||!a.isMediumEditorElement(t)||(e=t,0))}),e},getFirstSelectableLeafNode:function(t){for(;t&&t.firstChild;)t=t.firstChild;if(t=a.traverseUp(t,function(t){return-1===a.emptyElementNames.indexOf(t.nodeName.toLowerCase())}),"table"===t.nodeName.toLowerCase()){var e=t.querySelector("th, td");e&&(t=e)}return t},getFirstTextNode:function(t){return a.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),a._getFirstTextNode(t)},_getFirstTextNode:function(t){if(3===t.nodeType)return t;for(var e=0;e<t.childNodes.length;e++){var n=a._getFirstTextNode(t.childNodes[e]);if(null!==n)return n}return null},ensureUrlHasProtocol:function(t){return-1===t.indexOf("://")?"http://"+t:t},warn:function(){void 0!==e.console&&"function"==typeof e.console.warn&&e.console.warn.apply(e.console,arguments)},deprecated:function(t,e,n){var i=t+" is deprecated, please use "+e+" instead.";n&&(i+=" Will be removed in "+n),a.warn(i)},deprecatedMethod:function(t,e,n,i){a.deprecated(t,e,i),"function"==typeof this[e]&&this[e].apply(this,n)},cleanupAttrs:function(t,e){e.forEach(function(e){t.removeAttribute(e)})},cleanupTags:function(t,e){-1!==e.indexOf(t.nodeName.toLowerCase())&&t.parentNode.removeChild(t)},unwrapTags:function(e,n){-1!==n.indexOf(e.nodeName.toLowerCase())&&t.util.unwrap(e,document)},getClosestTag:function(t,e){return a.traverseUp(t,function(t){return t.nodeName.toLowerCase()===e.toLowerCase()})},unwrap:function(t,e){for(var n=e.createDocumentFragment(),i=Array.prototype.slice.call(t.childNodes),o=0;o<i.length;o++)n.appendChild(i[o]);n.childNodes.length?t.parentNode.replaceChild(n,t):t.parentNode.removeChild(t)},guid:function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}};t.util=a}(window),function(){var e=function(e){t.util.extend(this,e)};e.extend=function(e){var n,i=this;n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return i.apply(this,arguments)},t.util.extend(n,i);var o=function(){this.constructor=n};return o.prototype=i.prototype,n.prototype=new o,e&&t.util.extend(n.prototype,e),n},e.prototype={init:function(){},base:void 0,name:void 0,checkState:void 0,destroy:void 0,queryCommandState:void 0,isActive:void 0,isAlreadyApplied:void 0,setActive:void 0,setInactive:void 0,getInteractionElements:void 0,window:void 0,document:void 0,getEditorElements:function(){return this.base.elements},getEditorId:function(){return this.base.id},getEditorOption:function(t){return this.base.options[t]}},["execAction","on","off","subscribe","trigger"].forEach(function(t){e.prototype[t]=function(){return this.base[t].apply(this.base,arguments)}}),t.Extension=e}(),function(){function e(e){return t.util.isBlockContainer(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}var n={findMatchingSelectionParent:function(e,n){var i,o,r=n.getSelection();return 0!==r.rangeCount&&(i=r.getRangeAt(0),o=i.commonAncestorContainer,t.util.traverseUp(o,e))},getSelectionElement:function(e){return this.findMatchingSelectionParent(function(e){return t.util.isMediumEditorElement(e)},e)},exportSelection:function(t,e){if(!t)return null;var n=null,i=e.getSelection();if(i.rangeCount>0){var o,r=i.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(t),a.setEnd(r.startContainer,r.startOffset),o=a.toString().length,n={start:o,end:o+r.toString().length},this.doesRangeStartWithImages(r,e)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(t,n,r.endContainer,r.endOffset);if(s&&(n.trailingImageCount=s),0!==o){var l=this.getIndexRelativeToAdjacentEmptyBlocks(e,t,r.startContainer,r.startOffset);-1!==l&&(n.emptyBlocksIndex=l)}}return n},importSelection:function(t,e,n,i){if(t&&e){var o=n.createRange();o.setStart(e,0),o.collapse(!0);var r,a=e,s=[],l=0,c=!1,u=!1,d=0,h=!1,p=!1,f=null;for((i||t.startsWithImage||void 0!==t.emptyBlocksIndex)&&(p=!0);!h&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||u){if(t.trailingImageCount&&u&&("img"===a.nodeName.toLowerCase()&&d++,d===t.trailingImageCount)){for(var m=0;a.parentNode.childNodes[m]!==a;)m++;o.setEnd(a.parentNode,m+1),h=!0}if(!h&&1===a.nodeType)for(var g=a.childNodes.length-1;g>=0;)s.push(a.childNodes[g]),g-=1}else r=l+a.length,!c&&t.start>=l&&t.start<=r&&(p||t.start<r?(o.setStart(a,t.start-l),c=!0):f=a),c&&t.end>=l&&t.end<=r&&(t.trailingImageCount?u=!0:(o.setEnd(a,t.end-l),h=!0)),l=r;h||(a=s.pop())}!c&&f&&(o.setStart(f,f.length),o.setEnd(f,f.length)),void 0!==t.emptyBlocksIndex&&(o=this.importSelectionMoveCursorPastBlocks(n,e,t.emptyBlocksIndex,o)),i&&(o=this.importSelectionMoveCursorPastAnchor(t,o)),this.selectRange(n,o)}},importSelectionMoveCursorPastAnchor:function(e,n){var i=function(t){return"a"===t.nodeName.toLowerCase()};if(e.start===e.end&&3===n.startContainer.nodeType&&n.startOffset===n.startContainer.nodeValue.length&&t.util.traverseUp(n.startContainer,i)){for(var o=n.startContainer,r=n.startContainer.parentNode;null!==r&&"a"!==r.nodeName.toLowerCase();)r.childNodes[r.childNodes.length-1]!==o?r=null:(o=r,r=r.parentNode);if(null!==r&&"a"===r.nodeName.toLowerCase()){for(var a=null,s=0;null===a&&s<r.parentNode.childNodes.length;s++)r.parentNode.childNodes[s]===r&&(a=s);n.setStart(r.parentNode,a+1),n.collapse(!0)}}return n},importSelectionMoveCursorPastBlocks:function(n,i,o,r){var a,s,l=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,e,!1),c=r.startContainer,u=0;for(o=o||1,a=3===c.nodeType&&t.util.isBlockContainer(c.previousSibling)?c.previousSibling:t.util.getClosestBlockContainer(c);l.nextNode();)if(s){if(s=l.currentNode,++u===o)break;if(s.textContent.length>0)break}else a===l.currentNode&&(s=l.currentNode);return s||(s=a),r.setStart(t.util.getFirstSelectableLeafNode(s),0),r},getIndexRelativeToAdjacentEmptyBlocks:function(n,i,o,r){if(o.textContent.length>0&&r>0)return-1;var a=o;if(3!==a.nodeType&&(a=o.childNodes[r]),a){if(!t.util.isElementAtBeginningOfBlock(a))return-1;var s=t.util.findPreviousSibling(a);if(!s)return-1;if(s.nodeValue)return-1}for(var l=t.util.getClosestBlockContainer(o),c=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,e,!1),u=0;c.nextNode();){var d=""===c.currentNode.textContent;if((d||u>0)&&(u+=1),c.currentNode===l)return u;d||(u=0)}return u},doesRangeStartWithImages:function(t,e){if(0!==t.startOffset||1!==t.startContainer.nodeType)return!1;if("img"===t.startContainer.nodeName.toLowerCase())return!0;var n=t.startContainer.querySelector("img");if(!n)return!1;for(var i=e.createTreeWalker(t.startContainer,NodeFilter.SHOW_ALL,null,!1);i.nextNode();){var o=i.currentNode;if(o===n)break;if(o.nodeValue)return!1}return!0},getTrailingImageCount:function(t,e,n,i){if(0===i||1!==n.nodeType)return 0;if("img"!==n.nodeName.toLowerCase()&&!n.querySelector("img"))return 0;for(var o=n.childNodes[i-1];o.hasChildNodes();)o=o.lastChild;for(var r,a=t,s=[],l=0,c=!1,u=!1,d=!1,h=0;!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||u){if("img"===a.nodeName.toLowerCase()&&h++,a===o)d=!0;else if(1===a.nodeType)for(var p=a.childNodes.length-1;p>=0;)s.push(a.childNodes[p]),p-=1}else h=0,r=l+a.length,!c&&e.start>=l&&e.start<=r&&(c=!0),c&&e.end>=l&&e.end<=r&&(u=!0),l=r;d||(a=s.pop())}return h},selectionContainsContent:function(t){var e=t.getSelection();if(!e||e.isCollapsed||!e.rangeCount)return!1;if(""!==e.toString().trim())return!0;var n=this.getSelectedParentElement(e.getRangeAt(0));return!(!n||!("img"===n.nodeName.toLowerCase()||1===n.nodeType&&n.querySelector("img")))},selectionInContentEditableFalse:function(t){var e,n=this.findMatchingSelectionParent(function(t){var n=t&&t.getAttribute("contenteditable");return"true"===n&&(e=!0),"#text"!==t.nodeName&&"false"===n},t);return!e&&n},getSelectionHtml:function(t){var e,n,i,o="",r=t.getSelection();if(r.rangeCount){for(i=t.createElement("div"),e=0,n=r.rangeCount;e<n;e+=1)i.appendChild(r.getRangeAt(e).cloneContents());o=i.innerHTML}return o},getCaretOffsets:function(t,e){var n,i;return e||(e=window.getSelection().getRangeAt(0)),n=e.cloneRange(),i=e.cloneRange(),n.selectNodeContents(t),n.setEnd(e.endContainer,e.endOffset),i.selectNodeContents(t),i.setStart(e.endContainer,e.endOffset),{left:n.toString().length,right:i.toString().length}},rangeSelectsSingleNode:function(t){var e=t.startContainer;return e===t.endContainer&&e.hasChildNodes()&&t.endOffset===t.startOffset+1},getSelectedParentElement:function(t){return t?this.rangeSelectsSingleNode(t)&&3!==t.startContainer.childNodes[t.startOffset].nodeType?t.startContainer.childNodes[t.startOffset]:3===t.startContainer.nodeType?t.startContainer.parentNode:t.startContainer:null},getSelectedElements:function(t){var e,n,i,o=t.getSelection();if(!o.rangeCount||o.isCollapsed||!o.getRangeAt(0).commonAncestorContainer)return[];if(e=o.getRangeAt(0),3===e.commonAncestorContainer.nodeType){for(n=[],i=e.commonAncestorContainer;i.parentNode&&1===i.parentNode.childNodes.length;)n.push(i.parentNode),i=i.parentNode;return n}return[].filter.call(e.commonAncestorContainer.getElementsByTagName("*"),function(t){return"function"!=typeof o.containsNode||o.containsNode(t,!0)})},selectNode:function(t,e){var n=e.createRange();n.selectNodeContents(t),this.selectRange(e,n)},select:function(t,e,n,i,o){var r=t.createRange();return r.setStart(e,n),i?r.setEnd(i,o):r.collapse(!0),this.selectRange(t,r),r},clearSelection:function(t,e){e?t.getSelection().collapseToStart():t.getSelection().collapseToEnd()},moveCursor:function(t,e,n){this.select(t,e,n)},getSelectionRange:function(t){var e=t.getSelection();return 0===e.rangeCount?null:e.getRangeAt(0)},selectRange:function(t,e){var n=t.getSelection();n.removeAllRanges(),n.addRange(e)},getSelectionStart:function(t){var e=t.getSelection().anchorNode;return e&&3===e.nodeType?e.parentNode:e}};t.selection=n}(),function(){function e(e,n){return!!e&&e.some(function(e){if("function"!=typeof e.getInteractionElements)return!1;var i=e.getInteractionElements();return!!i&&(Array.isArray(i)||(i=[i]),i.some(function(e){return t.util.isDescendant(e,n,!0)}))})}var n=function(t){this.base=t,this.options=this.base.options,this.events=[],this.disabledEvents={},this.customEvents={},this.listeners={}};n.prototype={InputEventOnContenteditableSupported:!t.util.isIE&&!t.util.isEdge,attachDOMEvent:function(e,n,i,o){var r=this.base.options.contentWindow,a=this.base.options.ownerDocument;e=t.util.isElement(e)||[r,a].indexOf(e)>-1?[e]:e,Array.prototype.forEach.call(e,function(t){t.addEventListener(n,i,o),this.events.push([t,n,i,o])}.bind(this))},detachDOMEvent:function(e,n,i,o){var r,a,s=this.base.options.contentWindow,l=this.base.options.ownerDocument;e&&(e=t.util.isElement(e)||[s,l].indexOf(e)>-1?[e]:e,Array.prototype.forEach.call(e,function(t){-1!==(r=this.indexOfListener(t,n,i,o))&&(a=this.events.splice(r,1)[0],a[0].removeEventListener(a[1],a[2],a[3]))}.bind(this)))},indexOfListener:function(t,e,n,i){var o,r,a;for(o=0,r=this.events.length;o<r;o+=1)if(a=this.events[o],a[0]===t&&a[1]===e&&a[2]===n&&a[3]===i)return o;return-1},detachAllDOMEvents:function(){for(var t=this.events.pop();t;)t[0].removeEventListener(t[1],t[2],t[3]),t=this.events.pop()},detachAllEventsFromElement:function(t){for(var e=this.events.filter(function(e){return e&&e[0].getAttribute&&e[0].getAttribute("medium-editor-index")===t.getAttribute("medium-editor-index")}),n=0,i=e.length;n<i;n++){var o=e[n];this.detachDOMEvent(o[0],o[1],o[2],o[3])}},attachAllEventsToElement:function(t){this.listeners.editableInput&&(this.contentCache[t.getAttribute("medium-editor-index")]=t.innerHTML),this.eventsCache&&this.eventsCache.forEach(function(e){this.attachDOMEvent(t,e.name,e.handler.bind(this))},this)},enableCustomEvent:function(t){void 0!==this.disabledEvents[t]&&delete this.disabledEvents[t]},disableCustomEvent:function(t){this.disabledEvents[t]=!0},attachCustomEvent:function(t,e){this.setupListener(t),this.customEvents[t]||(this.customEvents[t]=[]),this.customEvents[t].push(e)},detachCustomEvent:function(t,e){var n=this.indexOfCustomListener(t,e);-1!==n&&this.customEvents[t].splice(n,1)},indexOfCustomListener:function(t,e){return this.customEvents[t]&&this.customEvents[t].length?this.customEvents[t].indexOf(e):-1},detachAllCustomEvents:function(){this.customEvents={}},triggerCustomEvent:function(t,e,n){this.customEvents[t]&&!this.disabledEvents[t]&&this.customEvents[t].forEach(function(t){t(e,n)})},destroy:function(){this.detachAllDOMEvents(),this.detachAllCustomEvents(),this.detachExecCommand(),this.base.elements&&this.base.elements.forEach(function(t){t.removeAttribute("data-medium-focused")})},attachToExecCommand:function(){this.execCommandListener||(this.execCommandListener=function(t){this.handleDocumentExecCommand(t)}.bind(this),this.wrapExecCommand(),this.options.ownerDocument.execCommand.listeners.push(this.execCommandListener))},detachExecCommand:function(){var t=this.options.ownerDocument;if(this.execCommandListener&&t.execCommand.listeners){var e=t.execCommand.listeners.indexOf(this.execCommandListener);-1!==e&&t.execCommand.listeners.splice(e,1),t.execCommand.listeners.length||this.unwrapExecCommand()}},wrapExecCommand:function(){var t=this.options.ownerDocument;if(!t.execCommand.listeners){var e=function(e,n){t.execCommand.listeners&&t.execCommand.listeners.forEach(function(t){t({command:e[0],value:e[2],args:e,result:n})})},n=function(){var n=t.execCommand.orig.apply(this,arguments);if(!t.execCommand.listeners)return n;var i=Array.prototype.slice.call(arguments);return e(i,n),n};n.orig=t.execCommand,n.listeners=[],n.callListeners=e,t.execCommand=n}},unwrapExecCommand:function(){var t=this.options.ownerDocument;t.execCommand.orig&&(t.execCommand=t.execCommand.orig)},setupListener:function(t){if(!this.listeners[t]){switch(t){case"externalInteraction":this.attachDOMEvent(this.options.ownerDocument.body,"mousedown",this.handleBodyMousedown.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"click",this.handleBodyClick.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"focus",this.handleBodyFocus.bind(this),!0);break;case"blur":case"focus":this.setupListener("externalInteraction");break;case"editableInput":this.contentCache={},this.base.elements.forEach(function(t){this.contentCache[t.getAttribute("medium-editor-index")]=t.innerHTML},this),this.InputEventOnContenteditableSupported&&this.attachToEachElement("input",this.handleInput),this.InputEventOnContenteditableSupported||(this.setupListener("editableKeypress"),this.keypressUpdateInput=!0,this.attachDOMEvent(document,"selectionchange",this.handleDocumentSelectionChange.bind(this)),this.attachToExecCommand());break;case"editableClick":this.attachToEachElement("click",this.handleClick);break;case"editableBlur":this.attachToEachElement("blur",this.handleBlur);break;case"editableKeypress":this.attachToEachElement("keypress",this.handleKeypress);break;case"editableKeyup":this.attachToEachElement("keyup",this.handleKeyup);break;case"editableKeydown":this.attachToEachElement("keydown",this.handleKeydown);break;case"editableKeydownSpace":case"editableKeydownEnter":case"editableKeydownTab":case"editableKeydownDelete":this.setupListener("editableKeydown");break;case"editableMouseover":this.attachToEachElement("mouseover",this.handleMouseover);break;case"editableDrag":this.attachToEachElement("dragover",this.handleDragging),this.attachToEachElement("dragleave",this.handleDragging);break;case"editableDrop":this.attachToEachElement("drop",this.handleDrop);break;case"editablePaste":this.attachToEachElement("paste",this.handlePaste)}this.listeners[t]=!0}},attachToEachElement:function(t,e){this.eventsCache||(this.eventsCache=[]),this.base.elements.forEach(function(n){this.attachDOMEvent(n,t,e.bind(this))},this),this.eventsCache.push({name:t,handler:e})},cleanupElement:function(t){var e=t.getAttribute("medium-editor-index");e&&(this.detachAllEventsFromElement(t),this.contentCache&&delete this.contentCache[e])},focusElement:function(t){t.focus(),this.updateFocus(t,{target:t,type:"focus"})},updateFocus:function(n,i){var o,r=this.base.getFocusedElement();r&&"click"===i.type&&this.lastMousedownTarget&&(t.util.isDescendant(r,this.lastMousedownTarget,!0)||e(this.base.extensions,this.lastMousedownTarget))&&(o=r),o||this.base.elements.some(function(e){return!o&&t.util.isDescendant(e,n,!0)&&(o=e),!!o},this);var a=!t.util.isDescendant(r,n,!0)&&!e(this.base.extensions,n);o!==r&&(r&&a&&(r.removeAttribute("data-medium-focused"),this.triggerCustomEvent("blur",i,r)),o&&(o.setAttribute("data-medium-focused",!0),this.triggerCustomEvent("focus",i,o))),a&&this.triggerCustomEvent("externalInteraction",i)},updateInput:function(t,e){if(this.contentCache){var n=t.getAttribute("medium-editor-index"),i=t.innerHTML;i!==this.contentCache[n]&&this.triggerCustomEvent("editableInput",e,t),this.contentCache[n]=i}},handleDocumentSelectionChange:function(e){if(e.currentTarget&&e.currentTarget.activeElement){var n,i=e.currentTarget.activeElement;this.base.elements.some(function(e){return!!t.util.isDescendant(e,i,!0)&&(n=e,!0)},this),n&&this.updateInput(n,{target:i,currentTarget:n})}},handleDocumentExecCommand:function(){var t=this.base.getFocusedElement();t&&this.updateInput(t,{target:t,currentTarget:t})},handleBodyClick:function(t){this.updateFocus(t.target,t)},handleBodyFocus:function(t){this.updateFocus(t.target,t)},handleBodyMousedown:function(t){this.lastMousedownTarget=t.target},handleInput:function(t){this.updateInput(t.currentTarget,t)},handleClick:function(t){this.triggerCustomEvent("editableClick",t,t.currentTarget)},handleBlur:function(t){this.triggerCustomEvent("editableBlur",t,t.currentTarget)},handleKeypress:function(t){if(this.triggerCustomEvent("editableKeypress",t,t.currentTarget),this.keypressUpdateInput){var e={target:t.target,currentTarget:t.currentTarget};setTimeout(function(){this.updateInput(e.currentTarget,e)}.bind(this),0)}},handleKeyup:function(t){this.triggerCustomEvent("editableKeyup",t,t.currentTarget)},handleMouseover:function(t){this.triggerCustomEvent("editableMouseover",t,t.currentTarget)},handleDragging:function(t){this.triggerCustomEvent("editableDrag",t,t.currentTarget)},handleDrop:function(t){this.triggerCustomEvent("editableDrop",t,t.currentTarget)},handlePaste:function(t){this.triggerCustomEvent("editablePaste",t,t.currentTarget)},handleKeydown:function(e){return this.triggerCustomEvent("editableKeydown",e,e.currentTarget),t.util.isKey(e,t.util.keyCode.SPACE)?this.triggerCustomEvent("editableKeydownSpace",e,e.currentTarget):t.util.isKey(e,t.util.keyCode.ENTER)||e.ctrlKey&&t.util.isKey(e,t.util.keyCode.M)?this.triggerCustomEvent("editableKeydownEnter",e,e.currentTarget):t.util.isKey(e,t.util.keyCode.TAB)?this.triggerCustomEvent("editableKeydownTab",e,e.currentTarget):t.util.isKey(e,[t.util.keyCode.DELETE,t.util.keyCode.BACKSPACE])?this.triggerCustomEvent("editableKeydownDelete",e,e.currentTarget):void 0}},t.Events=n}(),function(){var e=t.Extension.extend({action:void 0,aria:void 0,tagNames:void 0,style:void 0,useQueryState:void 0,contentDefault:void 0,contentFA:void 0,classList:void 0,attrs:void 0,constructor:function(n){e.isBuiltInButton(n)?t.Extension.call(this,this.defaults[n]):t.Extension.call(this,n)},init:function(){t.Extension.prototype.init.apply(this,arguments),this.button=this.createButton(),this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},getAction:function(){return"function"==typeof this.action?this.action(this.base.options):this.action},getAria:function(){return"function"==typeof this.aria?this.aria(this.base.options):this.aria},getTagNames:function(){return"function"==typeof this.tagNames?this.tagNames(this.base.options):this.tagNames},createButton:function(){var t=this.document.createElement("button"),e=this.contentDefault,n=this.getAria(),i=this.getEditorOption("buttonLabels");return t.classList.add("medium-editor-action"),t.classList.add("medium-editor-action-"+this.name),this.classList&&this.classList.forEach(function(e){t.classList.add(e)}),t.setAttribute("data-action",this.getAction()),n&&(t.setAttribute("title",n),t.setAttribute("aria-label",n)),this.attrs&&Object.keys(this.attrs).forEach(function(e){t.setAttribute(e,this.attrs[e])},this),"fontawesome"===i&&this.contentFA&&(e=this.contentFA),t.innerHTML=e,t},handleClick:function(t){t.preventDefault(),t.stopPropagation();var e=this.getAction();e&&this.execAction(e)},isActive:function(){return this.button.classList.contains(this.getEditorOption("activeButtonClass"))},setInactive:function(){this.button.classList.remove(this.getEditorOption("activeButtonClass")),delete this.knownState},setActive:function(){this.button.classList.add(this.getEditorOption("activeButtonClass")),delete this.knownState},queryCommandState:function(){var t=null;return this.useQueryState&&(t=this.base.queryCommandState(this.getAction())),t},isAlreadyApplied:function(t){var e,n,i=!1,o=this.getTagNames();return!1===this.knownState||!0===this.knownState?this.knownState:(o&&o.length>0&&(i=-1!==o.indexOf(t.nodeName.toLowerCase())),!i&&this.style&&(e=this.style.value.split("|"),n=this.window.getComputedStyle(t,null).getPropertyValue(this.style.prop),e.forEach(function(t){this.knownState||((i=-1!==n.indexOf(t))||"text-decoration"!==this.style.prop)&&(this.knownState=i)},this)),i)}});e.isBuiltInButton=function(e){return"string"==typeof e&&t.extensions.button.prototype.defaults.hasOwnProperty(e)},t.extensions.button=e}(),function(){t.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"<b>B</b>",contentFA:'<i class="fa fa-bold"></i>'},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"<b><i>I</i></b>",contentFA:'<i class="fa fa-italic"></i>'},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"<b><u>U</u></b>",contentFA:'<i class="fa fa-underline"></i>'},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"<s>A</s>",contentFA:'<i class="fa fa-strikethrough"></i>'},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"<b>x<sup>1</sup></b>",contentFA:'<i class="fa fa-superscript"></i>'},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"<b>x<sub>1</sub></b>",contentFA:'<i class="fa fa-subscript"></i>'},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"<b>image</b>",contentFA:'<i class="fa fa-picture-o"></i>'},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"<b>html</b>",contentFA:'<i class="fa fa-code"></i>'},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"<b>1.</b>",contentFA:'<i class="fa fa-list-ol"></i>'},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"<b>•</b>",contentFA:'<i class="fa fa-list-ul"></i>'},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"<b>→</b>",contentFA:'<i class="fa fa-indent"></i>'},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"<b>←</b>",contentFA:'<i class="fa fa-outdent"></i>'},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"<b>C</b>",contentFA:'<i class="fa fa-align-center"></i>'},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"<b>J</b>",contentFA:'<i class="fa fa-align-justify"></i>'},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"<b>L</b>",contentFA:'<i class="fa fa-align-left"></i>'},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"<b>R</b>",contentFA:'<i class="fa fa-align-right"></i>'},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"<b>X</b>",contentFA:'<i class="fa fa-eraser"></i>'},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"<b>“</b>",contentFA:'<i class="fa fa-quote-right"></i>'},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"<b>0101</b>",contentFA:'<i class="fa fa-code fa-lg"></i>'},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"<b>H1</b>",contentFA:'<i class="fa fa-header"><sup>1</sup>'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"<b>H2</b>",contentFA:'<i class="fa fa-header"><sup>2</sup>'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"<b>H3</b>",contentFA:'<i class="fa fa-header"><sup>3</sup>'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"<b>H4</b>",contentFA:'<i class="fa fa-header"><sup>4</sup>'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"<b>H5</b>",contentFA:'<i class="fa fa-header"><sup>5</sup>'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"<b>H6</b>",contentFA:'<i class="fa fa-header"><sup>6</sup>'}}}(),function(){var e=t.extensions.button.extend({init:function(){t.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return!!this.hasForm&&this.getForm().classList.contains(this.activeClass)},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.hideToolbarDefaultActions()},setToolbarPosition:function(){var t=this.base.getExtensionByName("toolbar");t&&t.setToolbarPosition()}});t.extensions.form=e}(),function(){var e=t.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"<b>#</b>",contentFA:'<i class="fa fa-link"></i>',init:function(){t.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(e){e.preventDefault(),e.stopPropagation();var n=t.selection.getSelectionRange(this.document);return"a"===n.startContainer.nodeName.toLowerCase()||"a"===n.endContainer.nodeName.toLowerCase()||t.util.getClosestTag(t.selection.getSelectedParentElement(n),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(e){t.util.isKey(e,t.util.keyCode.K)&&t.util.isMetaCtrlKey(e)&&!e.shiftKey&&this.handleClick(e)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var t=['<input type="text" class="medium-editor-toolbar-input" placeholder="',this.placeholderText,'">'];return t.push('<a href="#" class="medium-editor-toolbar-save">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':this.formSaveLabel,"</a>"),t.push('<a href="#" class="medium-editor-toolbar-close">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':this.formCloseLabel,"</a>"),this.targetCheckbox&&t.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-target" id="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">','<label for="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">',this.targetCheckboxText,"</label>","</div>"),this.customClassOption&&t.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-button">',"<label>",this.customClassOptionText,"</label>","</div>"),t.join("")},isDisplayed:function(){return t.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){t.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(e){var n=this.getInput(),i=this.getAnchorTargetCheckbox(),o=this.getAnchorButtonCheckbox();if(e=e||{value:""},"string"==typeof e&&(e={value:e}),this.base.saveSelection(),this.hideToolbarDefaultActions(),t.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),n.value=e.value,n.focus(),i&&(i.checked="_blank"===e.target),o){var r=e.buttonClass?e.buttonClass.split(" "):[];o.checked=-1!==r.indexOf(this.customClassOption)}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var t=this.getAnchorTargetCheckbox(),e=this.getAnchorButtonCheckbox(),n={value:this.getInput().value.trim()};return this.linkValidation&&(n.value=this.checkLinkFormat(n.value)),n.target="_self",t&&t.checked&&(n.target="_blank"),e&&e.checked&&(n.buttonClass=this.customClassOption),n},doFormSave:function(){var t=this.getFormOpts();this.completeFormSave(t)},completeFormSave:function(t){this.base.restoreSelection(),this.execAction(this.action,t),this.base.checkSelection()},ensureEncodedUri:function(t){return t===decodeURI(t)?encodeURI(t):t},ensureEncodedUriComponent:function(t){return t===decodeURIComponent(t)?encodeURIComponent(t):t},ensureEncodedParam:function(t){var e=t.split("="),n=e[0],i=e[1];return n+(void 0===i?"":"="+this.ensureEncodedUriComponent(i))},ensureEncodedQuery:function(t){return t.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(t){var e=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,n=e.test(t),i="",o=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,r=t.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),a=r[1],s=r[2],l=r[3];if(o.test(t))return"tel:"+t;if(!n){var c=a.split("/")[0];(c.match(/.+(\.|:).+/)||"localhost"===c)&&(i="http://")}return i+this.ensureEncodedUri(a)+(void 0===s?"":"?"+this.ensureEncodedQuery(s))+(void 0===l?"":"#"+l)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(t){var e=t.querySelector(".medium-editor-toolbar-close"),n=t.querySelector(".medium-editor-toolbar-save"),i=t.querySelector(".medium-editor-toolbar-input");this.on(t,"click",this.handleFormClick.bind(this)),this.on(i,"keyup",this.handleTextboxKeyup.bind(this)),this.on(e,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var t=this.document,e=t.createElement("div");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),e.innerHTML=this.getTemplate(),this.attachFormEvents(e),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(e){if(e.keyCode===t.util.keyCode.ENTER)return e.preventDefault(),void this.doFormSave();e.keyCode===t.util.keyCode.ESCAPE&&(e.preventDefault(),this.doFormCancel())},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.anchor=e}(),function(){var e=t.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var t=this.document.createElement("div");return t.id="medium-editor-anchor-preview-"+this.getEditorId(),t.className="medium-editor-anchor-preview",t.innerHTML=this.getTemplate(),this.on(t,"click",this.handleClick.bind(this)),t},getTemplate:function(){return'<div class="medium-editor-toolbar-anchor-preview" id="medium-editor-toolbar-anchor-preview"> <a class="medium-editor-toolbar-anchor-preview-inner"></a></div>'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(t){return!(!this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")&&!t.getAttribute("data-disable-preview"))||(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=t.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=t.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=t,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(t){t=t||this.activeAnchor;var e,n,i,o,r,a=this.window.innerWidth,s=this.anchorPreview.offsetHeight,l=t.getBoundingClientRect(),c=this.diffLeft,u=this.diffTop,d=this.getEditorOption("elementsContainer"),h=["absolute","fixed"].indexOf(window.getComputedStyle(d).getPropertyValue("position"))>-1,p={};e=this.anchorPreview.offsetWidth/2;var f=this.base.getExtensionByName("toolbar");f&&(c=f.diffLeft,u=f.diffTop),n=c-e,h?(o=d.getBoundingClientRect(),["top","left"].forEach(function(t){p[t]=l[t]-o[t]}),p.width=l.width,p.height=l.height,l=p,a=o.width,r=d.scrollTop):r=this.window.pageYOffset,i=l.left+l.width/2,r+=s+l.top+l.height-u-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(r)+"px",this.anchorPreview.style.right="initial",i<e?(this.anchorPreview.style.left=n+e+"px",this.anchorPreview.style.right="initial"):a-i<e?(this.anchorPreview.style.left="auto",this.anchorPreview.style.right=0):(this.anchorPreview.style.left=n+i+"px",this.anchorPreview.style.right="initial")},attachToEditables:function(){this.subscribe("editableMouseover",this.handleEditableMouseover.bind(this)),this.subscribe("positionedToolbar",this.handlePositionedToolbar.bind(this))},handlePositionedToolbar:function(){this.showWhenToolbarIsVisible||this.hidePreview()},handleClick:function(t){var e=this.base.getExtensionByName("anchor"),n=this.activeAnchor;e&&n&&(t.preventDefault(),this.base.selectElement(this.activeAnchor),this.base.delay(function(){if(n){var t={value:n.attributes.href.value,target:n.getAttribute("target"),buttonClass:n.getAttribute("class")};e.showForm(t),n=null}}.bind(this))),this.hidePreview()},handleAnchorMouseout:function(){this.anchorToPreview=null,this.off(this.activeAnchor,"mouseout",this.instanceHandleAnchorMouseout),this.instanceHandleAnchorMouseout=null},handleEditableMouseover:function(e){var n=t.util.getClosestTag(e.target,"a");if(!1!==n){if(!this.showOnEmptyLinks&&(!/href=["']\S+["']/.test(n.outerHTML)||/href=["']#\S+["']/.test(n.outerHTML)))return!0;var i=this.base.getExtensionByName("toolbar");if(!this.showWhenToolbarIsVisible&&i&&i.isDisplayed&&i.isDisplayed())return!0;this.activeAnchor&&this.activeAnchor!==n&&this.detachPreviewHandlers(),this.anchorToPreview=n,this.instanceHandleAnchorMouseout=this.handleAnchorMouseout.bind(this),this.on(this.anchorToPreview,"mouseout",this.instanceHandleAnchorMouseout),this.base.delay(function(){this.anchorToPreview&&this.showPreview(this.anchorToPreview)}.bind(this))}},handlePreviewMouseover:function(){this.lastOver=(new Date).getTime(),this.hovering=!0},handlePreviewMouseout:function(t){t.relatedTarget&&/anchor-preview/.test(t.relatedTarget.className)||(this.hovering=!1)},updatePreview:function(){if(this.hovering)return!0;(new Date).getTime()-this.lastOver>this.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=(new Date).getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});t.extensions.anchorPreview=e}(),function(){function e(e){return!t.util.getClosestTag(e,"a")}var n,i,o,r,a;n=[" ","\t","\n","\r"," "," "," "," "," ","\u2028","\u2029"],i="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",o="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+i+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+i+"))",r=new RegExp("^("+i+")$","i"),a=new RegExp(o,"gi");var s=t.Extension.extend({init:function(){t.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var t=0,e=0;e<this.window._mediumEditors.length;e++){var n=this.window._mediumEditors[e];null!==n&&void 0!==n.getExtensionByName("autoLink")&&t++}return 1===t},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.isLastInstance()&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(t,e){this.performLinking(e)},onKeypress:function(e){this.disableEventHandling||t.util.isKey(e,[t.util.keyCode.SPACE,t.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout(function(){try{var t=this.base.exportSelection();this.performLinking(e.target)&&this.base.importSelection(t,!0)}catch(t){window.console&&window.console.error("Failed to perform linking",t),this.disableEventHandling=!0}}.bind(this),0))},performLinking:function(e){var n=t.util.splitByBlockElements(e),i=!1;0===n.length&&(n=[e]);for(var o=0;o<n.length;o++)i=this.removeObsoleteAutoLinkSpans(n[o])||i,i=this.performLinkingWithinElement(n[o])||i;return this.base.events.updateInput(e,{target:e,currentTarget:e}),i},removeObsoleteAutoLinkSpans:function(n){if(!n||3===n.nodeType)return!1;for(var i=n.querySelectorAll('span[data-auto-link="true"]'),o=!1,r=0;r<i.length;r++){var a=i[r].textContent;if(-1===a.indexOf("://")&&(a=t.util.ensureUrlHasProtocol(a)),i[r].getAttribute("data-href")!==a&&e(i[r])){o=!0;var s=a.replace(/\s+$/,"");if(i[r].getAttribute("data-href")===s){var l=a.length-s.length,c=t.util.splitOffDOMTree(i[r],this.splitTextBeforeEnd(i[r],l));i[r].parentNode.insertBefore(c,i[r].nextSibling)}else t.util.unwrap(i[r],this.document)}}return o},splitTextBeforeEnd:function(t,e){for(var n=this.document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),i=!0;i;)i=null!==n.lastChild();for(var o,r,a;e>0&&null!==a;)o=n.currentNode,r=o.nodeValue,r.length>e?(a=o.splitText(r.length-e),e=0):(a=n.previousNode(),e-=r.length);return a},performLinkingWithinElement:function(e){for(var n=this.findLinkableText(e),i=0;i<n.length;i++){var o=t.util.findOrCreateMatchingTextNodes(this.document,e,n[i]);this.shouldNotLink(o)||this.createAutoLink(o,n[i].href)}return!1},shouldNotLink:function(e){for(var n=!1,i=0;i<e.length&&!1===n;i++)n=!!t.util.traverseUp(e[i],function(t){return"a"===t.nodeName.toLowerCase()||t.getAttribute&&"true"===t.getAttribute("data-auto-link")});return n},findLinkableText:function(t){for(var e=t.textContent,i=null,o=[];null!==(i=a.exec(e));){var s=!0,l=i.index+i[0].length;s=!(0!==i.index&&-1===n.indexOf(e[i.index-1])||l!==e.length&&-1===n.indexOf(e[l])),(s=s&&(-1!==i[0].indexOf("/")||r.test(i[0].split(".").pop().split("?").shift())))&&o.push({href:i[0],start:i.index,end:l})}return o},createAutoLink:function(e,n){n=t.util.ensureUrlHasProtocol(n);var i=t.util.createLink(this.document,e,n,this.getEditorOption("targetBlank")?"_blank":null),o=this.document.createElement("span");for(o.setAttribute("data-auto-link","true"),o.setAttribute("data-href",n),i.insertBefore(o,i.firstChild);i.childNodes.length>1;)o.appendChild(i.childNodes[1])}});t.extensions.autoLink=s}(),function(){function e(e){var i=t.util.getContainerEditorElement(e);Array.prototype.slice.call(i.parentElement.querySelectorAll("."+n)).forEach(function(t){t.classList.remove(n)})}var n="medium-editor-dragover",i=t.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(t){t.preventDefault(),t.dataTransfer.dropEffect="copy";var i=t.target.classList?t.target:t.target.parentElement;e(i),"dragover"===t.type&&i.classList.add(n)},handleDrop:function(t){t.preventDefault(),t.stopPropagation(),this.base.selectElement(t.target);var n=this.base.exportSelection();n.start=n.end,this.base.importSelection(n),t.dataTransfer.files&&Array.prototype.slice.call(t.dataTransfer.files).forEach(function(t){this.isAllowedFile(t)&&t.type.match("image")&&this.insertImageFile(t)},this),e(t.target)},isAllowedFile:function(t){return this.allowedTypes.some(function(e){return!!t.type.match(e)})},insertImageFile:function(e){if("function"==typeof FileReader){var n=new FileReader;n.readAsDataURL(e),n.addEventListener("load",function(e){var n=this.document.createElement("img");n.src=e.target.result,t.util.insertHTMLCommand(this.document,n.outerHTML)}.bind(this))}}});t.extensions.fileDragging=i}(),function(){var e=t.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(t){var e=t.key.charCodeAt(0);this.keys[e]||(this.keys[e]=[]),this.keys[e].push(t)},this)},handleKeydown:function(e){var n=t.util.getKeyCode(e);if(this.keys[n]){var i=t.util.isMetaCtrlKey(e),o=!!e.shiftKey,r=!!e.altKey;this.keys[n].forEach(function(t){t.meta!==i||t.shift!==o||t.alt!==r&&void 0!==t.alt||(e.preventDefault(),e.stopPropagation(),"function"==typeof t.command?t.command.apply(this):!1!==t.command&&this.execAction(t.command))},this)}}});t.extensions.keyboardCommands=e}(),function(){var e=t.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'<i class="fa fa-font"></i>',fonts:["","Arial","Verdana","Times New Roman"],init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontName")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(t){var e=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var t,e=this.document,n=e.createElement("div"),i=e.createElement("select"),o=e.createElement("a"),r=e.createElement("a");n.className="medium-editor-toolbar-form",n.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(n,"click",this.handleFormClick.bind(this));for(var a=0;a<this.fonts.length;a++)t=e.createElement("option"),t.innerHTML=this.fonts[a],t.value=this.fonts[a],i.appendChild(t);return i.className="medium-editor-toolbar-select",n.appendChild(i),this.on(i,"change",this.handleFontChange.bind(this)),r.setAttribute("href","#"),r.className="medium-editor-toobar-save",r.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"✓",n.appendChild(r),this.on(r,"click",this.handleSaveClick.bind(this),!0),o.setAttribute("href","#"),o.className="medium-editor-toobar-close",o.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':"×",n.appendChild(o),this.on(o,"click",this.handleCloseClick.bind(this)),n},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){t.selection.getSelectedElements(this.document).forEach(function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("face")&&t.removeAttribute("face")})},handleFontChange:function(){var t=this.getSelect().value;""===t?this.clearFontName():this.execAction("fontName",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.fontName=e}(),function(){var e=t.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'<i class="fa fa-text-height"></i>',init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontSize")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(t){var e=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var t=this.document,e=t.createElement("div"),n=t.createElement("input"),i=t.createElement("a"),o=t.createElement("a");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(e,"click",this.handleFormClick.bind(this)),n.setAttribute("type","range"),n.setAttribute("min","1"),n.setAttribute("max","7"),n.className="medium-editor-toolbar-input",e.appendChild(n),this.on(n,"change",this.handleSliderChange.bind(this)),o.setAttribute("href","#"),o.className="medium-editor-toobar-save",o.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"✓",e.appendChild(o),this.on(o,"click",this.handleSaveClick.bind(this),!0),i.setAttribute("href","#"),i.className="medium-editor-toobar-close",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':"×",e.appendChild(i),this.on(i,"click",this.handleCloseClick.bind(this)),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){t.selection.getSelectedElements(this.document).forEach(function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("size")&&t.removeAttribute("size")})},handleSliderChange:function(){var t=this.getInput().value;"4"===t?this.clearFontSize():this.execAction("fontSize",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.fontSize=e}(),function(){function e(){return[[new RegExp(/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/<!--StartFragment-->|<!--EndFragment-->/g),""],[new RegExp(/<br>$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(<br[^>]*>)?$/gi),""],[new RegExp(/<span class="Apple-converted-space">\s+<\/span>/g)," "],[new RegExp(/<br class="Apple-interchange-newline">/g),"<br>"],[new RegExp(/<span[^>]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),'<span class="replace-with italic bold">'],[new RegExp(/<span[^>]*font-style:italic[^>]*>/gi),'<span class="replace-with italic">'],[new RegExp(/<span[^>]*font-weight:(bold|700)[^>]*>/gi),'<span class="replace-with bold">'],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),'<a href="$1">'],[new RegExp(/<\/p>\n+/gi),"</p>"],[new RegExp(/\n+<p/gi),"<p"],[new RegExp(/<\/?o:[a-z]*>/gi),""],[new RegExp(/<!\[if !supportLists\]>(((?!<!).)*)<!\[endif]\>/gi),"$1"]]}function n(t,e,n){var i=t.clipboardData||e.clipboardData||n.dataTransfer,o={};if(!i)return o;if(i.getData){var r=i.getData("Text");r&&r.length>0&&(o["text/plain"]=r)}if(i.types)for(var a=0;a<i.types.length;a++){var s=i.types[a];o[s]=i.getData(s)}return o}var i=null,o=null,r=function(t){t.stopPropagation()},a=t.Extension.extend({forcePlainText:!0,cleanPastedHTML:!1,preCleanReplacements:[],cleanReplacements:[],cleanAttrs:["class","style","dir"],cleanTags:["meta"],unwrapTags:[],init:function(){t.Extension.prototype.init.apply(this,arguments),(this.forcePlainText||this.cleanPastedHTML)&&(this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.getEditorElements().forEach(function(t){this.on(t,"paste",this.handlePaste.bind(this))},this),this.subscribe("addElement",this.handleAddElement.bind(this)))},handleAddElement:function(t,e){this.on(e,"paste",this.handlePaste.bind(this))},destroy:function(){(this.forcePlainText||this.cleanPastedHTML)&&this.removePasteBin()},handlePaste:function(t,e){if(!t.defaultPrevented){var i=n(t,this.window,this.document),o=i["text/html"],r=i["text/plain"];this.window.clipboardData&&void 0===t.clipboardData&&!o&&(o=r),(o||r)&&(t.preventDefault(),this.doPaste(o,r,e))}},doPaste:function(e,n,i){var o,r,a="";if(this.cleanPastedHTML&&e)return this.cleanPaste(e);if(n){if(this.getEditorOption("disableReturn")||i&&i.getAttribute("data-disable-return"))a=t.util.htmlEntities(n);else if(o=n.split(/[\r\n]+/g),o.length>1)for(r=0;r<o.length;r+=1)""!==o[r]&&(a+="<p>"+t.util.htmlEntities(o[r])+"</p>");else a=t.util.htmlEntities(o[0]);t.util.insertHTMLCommand(this.document,a)}},handlePasteBinPaste:function(t){if(t.defaultPrevented)return void this.removePasteBin();var e=n(t,this.window,this.document),i=e["text/html"],r=e["text/plain"],a=o;if(!this.cleanPastedHTML||i)return t.preventDefault(),this.removePasteBin(),this.doPaste(i,r,a),void this.trigger("editablePaste",{currentTarget:a,target:a},a);setTimeout(function(){this.cleanPastedHTML&&(i=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(i,r,a),this.trigger("editablePaste",{currentTarget:a,target:a},a)}.bind(this),0)},handleKeydown:function(e,n){t.util.isKey(e,t.util.keyCode.V)&&t.util.isMetaCtrlKey(e)&&(e.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(n))},createPasteBin:function(e){var n,a=t.selection.getSelectionRange(this.document),s=this.window.pageYOffset;o=e,a&&(n=a.getClientRects(),n.length?s+=n[0].top:void 0!==a.startContainer.getBoundingClientRect?s+=a.startContainer.getBoundingClientRect().top:s+=a.getBoundingClientRect().top),i=a;var l=this.document.createElement("div");l.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),l.setAttribute("style","border: 1px red solid; position: absolute; top: "+s+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),l.setAttribute("contentEditable",!0),l.innerHTML="%ME_PASTEBIN%",this.document.body.appendChild(l),this.on(l,"focus",r),this.on(l,"focusin",r),this.on(l,"focusout",r),l.focus(),t.selection.selectNode(l,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(l,"paste",this.boundHandlePaste)},removePasteBin:function(){null!==i&&(t.selection.selectRange(this.document,i),i=null),null!==o&&(o=null);var e=this.getPasteBin();e&&e&&(this.off(e,"focus",r),this.off(e,"focusin",r),this.off(e,"focusout",r),this.off(e,"paste",this.boundHandlePaste),e.parentElement.removeChild(e))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var t=this.getPasteBin();if(!t)return!1;if(t.firstChild&&"mcepastebin"===t.firstChild.id)return!1;var e=t.innerHTML;return!(!e||"%ME_PASTEBIN%"===e)&&e},cleanPaste:function(t){var n,i,o,r,a=/<p|<br|<div/.test(t),s=[].concat(this.preCleanReplacements||[],e(),this.cleanReplacements||[]);for(n=0;n<s.length;n+=1)t=t.replace(s[n][0],s[n][1]);if(!a)return this.pasteHTML(t);for(o=this.document.createElement("div"),o.innerHTML="<p>"+t.split("<br><br>").join("</p><p>")+"</p>",i=o.querySelectorAll("a,p,div,br"),n=0;n<i.length;n+=1)switch(r=i[n],r.innerHTML=r.innerHTML.replace(/\n/gi," "),r.nodeName.toLowerCase()){case"p":case"div":this.filterCommonBlocks(r);break;case"br":this.filterLineBreak(r)}this.pasteHTML(o.innerHTML)},pasteHTML:function(e,n){n=t.util.defaults({},n,{cleanAttrs:this.cleanAttrs,cleanTags:this.cleanTags,unwrapTags:this.unwrapTags});var i,o,r,a,s=this.document.createDocumentFragment();for(s.appendChild(this.document.createElement("body")),a=s.querySelector("body"),a.innerHTML=e,this.cleanupSpans(a),i=a.querySelectorAll("*"),r=0;r<i.length;r+=1)o=i[r],"a"===o.nodeName.toLowerCase()&&this.getEditorOption("targetBlank")&&t.util.setTargetBlank(o),t.util.cleanupAttrs(o,n.cleanAttrs),t.util.cleanupTags(o,n.cleanTags),t.util.unwrapTags(o,n.unwrapTags);t.util.insertHTMLCommand(this.document,a.innerHTML.replace(/ /g," "))},isCommonBlock:function(t){return t&&("p"===t.nodeName.toLowerCase()||"div"===t.nodeName.toLowerCase())},filterCommonBlocks:function(t){/^\s*$/.test(t.textContent)&&t.parentNode&&t.parentNode.removeChild(t)},filterLineBreak:function(t){this.isCommonBlock(t.previousElementSibling)?this.removeWithParent(t):!this.isCommonBlock(t.parentNode)||t.parentNode.firstChild!==t&&t.parentNode.lastChild!==t?t.parentNode&&1===t.parentNode.childElementCount&&""===t.parentNode.textContent&&this.removeWithParent(t):this.removeWithParent(t)},removeWithParent:function(t){t&&t.parentNode&&(t.parentNode.parentNode&&1===t.parentNode.childElementCount?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t))},cleanupSpans:function(e){var n,i,o,r=e.querySelectorAll(".replace-with"),a=function(t){return t&&"#text"!==t.nodeName&&"false"===t.getAttribute("contenteditable")};for(n=0;n<r.length;n+=1)i=r[n],o=this.document.createElement(i.classList.contains("bold")?"b":"i"),i.classList.contains("bold")&&i.classList.contains("italic")?o.innerHTML="<i>"+i.innerHTML+"</i>":o.innerHTML=i.innerHTML,i.parentNode.replaceChild(o,i);for(r=e.querySelectorAll("span"),n=0;n<r.length;n+=1){if(i=r[n],t.util.traverseUp(i,a))return!1;t.util.unwrap(i,this.document)}}});t.extensions.paste=a}(),function(){var e=t.Extension.extend({name:"placeholder",text:"Type your text",hideOnClick:!0,init:function(){t.Extension.prototype.init.apply(this,arguments),this.initPlaceholders(),this.attachEventHandlers()},initPlaceholders:function(){this.getEditorElements().forEach(this.initElement,this)},handleAddElement:function(t,e){this.initElement(e)},initElement:function(t){t.getAttribute("data-placeholder")||t.setAttribute("data-placeholder",this.text),this.updatePlaceholder(t)},destroy:function(){this.getEditorElements().forEach(this.cleanupElement,this)},handleRemoveElement:function(t,e){this.cleanupElement(e)},cleanupElement:function(t){t.getAttribute("data-placeholder")===this.text&&t.removeAttribute("data-placeholder")},showPlaceholder:function(e){e&&(t.util.isFF&&0===e.childNodes.length?(e.classList.add("medium-editor-placeholder-relative"),e.classList.remove("medium-editor-placeholder")):(e.classList.add("medium-editor-placeholder"),e.classList.remove("medium-editor-placeholder-relative")))},hidePlaceholder:function(t){t&&(t.classList.remove("medium-editor-placeholder"),t.classList.remove("medium-editor-placeholder-relative"))},updatePlaceholder:function(t,e){if(t.querySelector("img, blockquote, ul, ol, table")||""!==t.textContent.replace(/^\s+|\s+$/g,""))return this.hidePlaceholder(t);e||this.showPlaceholder(t)},attachEventHandlers:function(){this.hideOnClick&&this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableInput",this.handleInput.bind(this)),this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("addElement",this.handleAddElement.bind(this)),this.subscribe("removeElement",this.handleRemoveElement.bind(this))},handleInput:function(t,e){var n=this.hideOnClick&&e===this.base.getFocusedElement();this.updatePlaceholder(e,n)},handleFocus:function(t,e){this.hidePlaceholder(e)},handleBlur:function(t,e){this.updatePlaceholder(e)}});t.extensions.placeholder=e}(),function(){var e=t.Extension.extend({name:"toolbar",align:"center",allowMultiParagraphSelection:!0,buttons:["bold","italic","underline","anchor","h2","h3","quote"],diffLeft:0,diffTop:-10,firstButtonClass:"medium-editor-button-first",lastButtonClass:"medium-editor-button-last",standardizeSelectionStart:!1,static:!1,sticky:!1,stickyTopOffset:0,updateOnEmptySelection:!1,relativeContainer:null,init:function(){t.Extension.prototype.init.apply(this,arguments),this.initThrottledMethods(),this.relativeContainer?this.relativeContainer.appendChild(this.getToolbarElement()):this.getEditorOption("elementsContainer").appendChild(this.getToolbarElement())},forEachExtension:function(t,e){return this.base.extensions.forEach(function(n){if(n!==this)return t.apply(e||this,arguments)},this)},createToolbar:function(){var t=this.document.createElement("div");return t.id="medium-editor-toolbar-"+this.getEditorId(),t.className="medium-editor-toolbar",this.static?t.className+=" static-toolbar":this.relativeContainer?t.className+=" medium-editor-relative-toolbar":t.className+=" medium-editor-stalker-toolbar",t.appendChild(this.createToolbarButtons()),this.forEachExtension(function(e){e.hasForm&&t.appendChild(e.getForm())}),this.attachEventHandlers(),t},createToolbarButtons:function(){var e,n,i,o,r,a,s=this.document.createElement("ul");return s.id="medium-editor-toolbar-actions"+this.getEditorId(),s.className="medium-editor-toolbar-actions",s.style.display="block",this.buttons.forEach(function(i){"string"==typeof i?(r=i,a=null):(r=i.name,a=i),(o=this.base.addBuiltInExtension(r,a))&&"function"==typeof o.getButton&&(n=o.getButton(this.base),e=this.document.createElement("li"),t.util.isElement(n)?e.appendChild(n):e.innerHTML=n,s.appendChild(e))},this),i=s.querySelectorAll("button"),i.length>0&&(i[0].classList.add(this.firstButtonClass),i[i.length-1].classList.add(this.lastButtonClass)),s},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=t.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(e){if(e&&e.target&&t.util.isDescendant(this.getToolbarElement(),e.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return"block"===this.getToolbarActionsElement().style.display},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(t){t.hasForm&&t.isDisplayed()&&t.hideForm()})},multipleBlockElementsSelected:function(){var e=/<[^\/>][^>]*><\/[^>]+>/gim,n=new RegExp("<("+t.util.blockContainerElementNames.join("|")+")[^>]*>","g"),i=t.selection.getSelectionHtml(this.document).replace(e,""),o=i.match(n);return!!o&&o.length>1},modifySelection:function(){var e=this.window.getSelection(),n=e.getRangeAt(0);if(this.standardizeSelectionStart&&n.startContainer.nodeValue&&n.startOffset===n.startContainer.nodeValue.length){var i=t.util.findAdjacentTextNodeWithContent(t.selection.getSelectionElement(this.window),n.startContainer,this.document);if(i){for(var o=0;0===i.nodeValue.substr(o,1).trim().length;)o+=1;n=t.selection.select(this.document,i,o,n.endContainer,n.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||t.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var e=t.selection.getSelectionElement(this.window);return!e||-1===this.getEditorElements().indexOf(e)||e.getAttribute("data-disable-toolbar")?this.hideToolbar():this.updateOnEmptySelection&&this.static?this.showAndUpdateToolbar():!t.selection.selectionContainsContent(this.document)||!1===this.allowMultiParagraphSelection&&this.multipleBlockElementsSelected()?this.hideToolbar():void this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(t){"function"==typeof t.isActive&&"function"==typeof t.setInactive&&t.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var e,n=[],i=null,o=t.selection.getSelectionRange(this.document),r=function(t){"function"==typeof t.checkState?t.checkState(e):"function"==typeof t.isActive&&"function"==typeof t.isAlreadyApplied&&"function"==typeof t.setActive&&!t.isActive()&&t.isAlreadyApplied(e)&&t.setActive()};if(o&&(this.forEachExtension(function(t){if("function"==typeof t.queryCommandState&&null!==(i=t.queryCommandState()))return void(i&&"function"==typeof t.setActive&&t.setActive());n.push(t)}),e=t.selection.getSelectedParentElement(o),this.getEditorElements().some(function(n){return t.util.isDescendant(n,e,!0)})))for(;e&&(n.forEach(r),!t.util.isMediumEditorElement(e));)e=e.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var t=this.base.getFocusedElement(),e=this.window.getSelection();if(!t)return this;!this.static&&e.isCollapsed||(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(t):this.positionToolbar(e)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(t){this.getToolbarElement().style.left="0";var e,n=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,i=this.window.innerWidth,o=this.getToolbarElement(),r=t.getBoundingClientRect(),a=r.top+n,s=r.left+r.width/2,l=o.offsetHeight,c=o.offsetWidth,u=c/2;switch(this.sticky?n>a+t.offsetHeight-l-this.stickyTopOffset?(o.style.top=a+t.offsetHeight-l+"px",o.classList.remove("medium-editor-sticky-toolbar")):n>a-l-this.stickyTopOffset?(o.classList.add("medium-editor-sticky-toolbar"),o.style.top=this.stickyTopOffset+"px"):(o.classList.remove("medium-editor-sticky-toolbar"),o.style.top=a-l+"px"):o.style.top=a-l+"px",this.align){case"left":e=r.left;break;case"right":e=r.right-c;break;case"center":e=s-u}e<0?e=0:e+c>i&&(e=i-Math.ceil(c)-1),o.style.left=e+"px"},positionToolbar:function(t){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var e=t.getRangeAt(0),n=e.getBoundingClientRect();(!n||0===n.height&&0===n.width&&e.startContainer===e.endContainer)&&(n=1===e.startContainer.nodeType&&e.startContainer.querySelector("img")?e.startContainer.querySelector("img").getBoundingClientRect():e.startContainer.getBoundingClientRect());var i,o,r=this.window.innerWidth,a=this.getToolbarElement(),s=a.offsetHeight,l=a.offsetWidth,c=l/2,u=this.diffLeft-c,d=this.getEditorOption("elementsContainer"),h=["absolute","fixed"].indexOf(window.getComputedStyle(d).getPropertyValue("position"))>-1,p={},f={};h?(o=d.getBoundingClientRect(),["top","left"].forEach(function(t){f[t]=n[t]-o[t]}),f.width=n.width,f.height=n.height,n=f,r=o.width,p.top=d.scrollTop):p.top=this.window.pageYOffset,i=n.left+n.width/2,p.top+=n.top-s,n.top<50?(a.classList.add("medium-toolbar-arrow-over"),a.classList.remove("medium-toolbar-arrow-under"),p.top+=50+n.height-this.diffTop):(a.classList.add("medium-toolbar-arrow-under"),a.classList.remove("medium-toolbar-arrow-over"),p.top+=this.diffTop),i<c?(p.left=u+c,p.right="initial"):r-i<c?(p.left="auto",p.right=0):(p.left=u+i,p.right="initial"),["top","left","right"].forEach(function(t){a.style[t]=p[t]+(isNaN(p[t])?"":"px")})}});t.extensions.toolbar=e}(),function(){var e=t.Extension.extend({init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(t){t.preventDefault(),t.dataTransfer.dropEffect="copy","dragover"===t.type?t.target.classList.add("medium-editor-dragover"):"dragleave"===t.type&&t.target.classList.remove("medium-editor-dragover")},handleDrop:function(e){var n;e.preventDefault(),e.stopPropagation(),e.dataTransfer.files&&(n=Array.prototype.slice.call(e.dataTransfer.files,0),n.some(function(e){if(e.type.match("image")){var n,i;n=new FileReader,n.readAsDataURL(e),i="medium-img-"+ +new Date,t.util.insertHTMLCommand(this.document,'<img class="medium-editor-image-loading" id="'+i+'" />'),n.onload=function(){var t=this.document.getElementById(i);t&&(t.removeAttribute("id"),t.removeAttribute("class"),t.src=n.result)}.bind(this)}}.bind(this))),e.target.classList.remove("medium-editor-dragover")}});t.extensions.imageDragging=e}(),function(){function e(e){var n=t.selection.getSelectionStart(this.options.ownerDocument),i=n.textContent,o=t.selection.getCaretOffsets(n);(void 0===i[o.left-1]||""===i[o.left-1].trim()||void 0!==i[o.left]&&""===i[o.left].trim())&&e.preventDefault()}function n(e,n){if(this.options.disableReturn||n.getAttribute("data-disable-return"))e.preventDefault();else if(this.options.disableDoubleReturn||n.getAttribute("data-disable-double-return")){var i=t.selection.getSelectionStart(this.options.ownerDocument);(i&&""===i.textContent.trim()&&"li"!==i.nodeName.toLowerCase()||i.previousElementSibling&&"br"!==i.previousElementSibling.nodeName.toLowerCase()&&""===i.previousElementSibling.textContent.trim())&&e.preventDefault()}}function i(e){var n=t.selection.getSelectionStart(this.options.ownerDocument);"pre"===(n&&n.nodeName.toLowerCase())&&(e.preventDefault(),t.util.insertHTMLCommand(this.options.ownerDocument," ")),t.util.isListItem(n)&&(e.preventDefault(),e.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function o(e){var n,i=t.selection.getSelectionStart(this.options.ownerDocument),o=i.nodeName.toLowerCase(),r=/^(\s+|<br\/?>)?$/i,a=/h\d/i;t.util.isKey(e,[t.util.keyCode.BACKSPACE,t.util.keyCode.ENTER])&&i.previousElementSibling&&a.test(o)&&0===t.selection.getCaretOffsets(i).left?t.util.isKey(e,t.util.keyCode.BACKSPACE)&&r.test(i.previousElementSibling.innerHTML)?(i.previousElementSibling.parentNode.removeChild(i.previousElementSibling),e.preventDefault()):!this.options.disableDoubleReturn&&t.util.isKey(e,t.util.keyCode.ENTER)&&(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.previousElementSibling.parentNode.insertBefore(n,i),e.preventDefault()):t.util.isKey(e,t.util.keyCode.DELETE)&&i.nextElementSibling&&i.previousElementSibling&&!a.test(o)&&r.test(i.innerHTML)&&a.test(i.nextElementSibling.nodeName.toLowerCase())?(t.selection.moveCursor(this.options.ownerDocument,i.nextElementSibling),i.previousElementSibling.parentNode.removeChild(i),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&"li"===o&&r.test(i.innerHTML)&&!i.previousElementSibling&&!i.parentElement.previousElementSibling&&i.nextElementSibling&&"li"===i.nextElementSibling.nodeName.toLowerCase()?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.parentElement.parentElement.insertBefore(n,i.parentElement),t.selection.moveCursor(this.options.ownerDocument,n),i.parentElement.removeChild(i),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&!1!==t.util.getClosestTag(i,"blockquote")&&0===t.selection.getCaretOffsets(i).left?(e.preventDefault(),t.util.execFormatBlock(this.options.ownerDocument,"p")):t.util.isKey(e,t.util.keyCode.ENTER)&&!1!==t.util.getClosestTag(i,"blockquote")&&0===t.selection.getCaretOffsets(i).right?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.parentElement.insertBefore(n,i.nextSibling),t.selection.moveCursor(this.options.ownerDocument,n),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&t.util.isMediumEditorElement(i.parentElement)&&!i.previousElementSibling&&i.nextElementSibling&&r.test(i.innerHTML)&&(e.preventDefault(),t.selection.moveCursor(this.options.ownerDocument,i.nextSibling),i.parentElement.removeChild(i))}function r(e){var n,i=t.selection.getSelectionStart(this.options.ownerDocument);i&&(t.util.isMediumEditorElement(i)&&0===i.children.length&&!t.util.isBlockContainer(i)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),!t.util.isKey(e,t.util.keyCode.ENTER)||t.util.isListItem(i)||t.util.isBlockContainer(i)||(n=i.nodeName.toLowerCase(),"a"===n?this.options.ownerDocument.execCommand("unlink",!1,null):e.shiftKey||e.ctrlKey||this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function a(t,e){var n=e.parentNode.querySelector('textarea[medium-editor-textarea-id="'+e.getAttribute("medium-editor-textarea-id")+'"]');n&&(n.value=e.innerHTML.trim())}function s(t){t._mediumEditors||(t._mediumEditors=[null]),this.id||(this.id=t._mediumEditors.length),t._mediumEditors[this.id]=this}function l(t){t._mediumEditors&&t._mediumEditors[this.id]&&(t._mediumEditors[this.id]=null)}function c(e,n,i){var o=[];if(e||(e=[]),"string"==typeof e&&(e=n.querySelectorAll(e)),t.util.isElement(e)&&(e=[e]),i)for(var r=0;r<e.length;r++){var a=e[r];!t.util.isElement(a)||a.getAttribute("data-medium-editor-element")||a.getAttribute("medium-editor-textarea-id")||o.push(a)}else o=Array.prototype.slice.apply(e);return o}function u(t){var e=t.parentNode.querySelector('textarea[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]');e&&(e.classList.remove("medium-editor-hidden"),e.removeAttribute("medium-editor-textarea-id")),t.parentNode&&t.parentNode.removeChild(t)}function d(t,e){return Object.keys(e).forEach(function(n){void 0===t[n]&&(t[n]=e[n])}),t}function h(t,e,n){return t=d(t,{window:n.options.contentWindow,document:n.options.ownerDocument,base:n}),"function"==typeof t.init&&t.init(),t.name||(t.name=e),t}function p(){return!this.elements.every(function(t){return!!t.getAttribute("data-disable-toolbar")})&&!1!==this.options.toolbar}function f(){return!!p.call(this)&&!1!==this.options.anchorPreview}function m(){return!1!==this.options.placeholder}function g(){return!1!==this.options.autoLink}function v(){return!1!==this.options.imageDragging}function _(){return!1!==this.options.keyboardCommands}function w(){return!this.options.extensions.imageDragging}function b(t){for(var e=this.options.ownerDocument.createElement("div"),n=Date.now(),i="medium-editor-"+n,o=t.attributes;this.options.ownerDocument.getElementById(i);)n++,i="medium-editor-"+n;e.className=t.className,e.id=i,e.innerHTML=t.value,t.setAttribute("medium-editor-textarea-id",i);for(var r=0,a=o.length;r<a;r++)e.hasAttribute(o[r].nodeName)||e.setAttribute(o[r].nodeName,o[r].value);return t.form&&this.on(t.form,"reset",function(t){t.defaultPrevented||this.resetContent(this.options.ownerDocument.getElementById(i))}.bind(this)),t.classList.add("medium-editor-hidden"),t.parentNode.insertBefore(e,t),e}function y(e,i){if(!e.getAttribute("data-medium-editor-element")){"textarea"===e.nodeName.toLowerCase()&&(e=b.call(this,e),this.instanceHandleEditableInput||(this.instanceHandleEditableInput=a.bind(this),this.subscribe("editableInput",this.instanceHandleEditableInput))),this.options.disableEditing||e.getAttribute("data-disable-editing")||(e.setAttribute("contentEditable",!0),e.setAttribute("spellcheck",this.options.spellcheck)),this.instanceHandleEditableKeydownEnter||(e.getAttribute("data-disable-return")||e.getAttribute("data-disable-double-return"))&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter)),this.options.disableReturn||e.getAttribute("data-disable-return")||this.on(e,"keyup",r.bind(this));var o=t.util.guid();e.setAttribute("data-medium-editor-element",!0),e.classList.add("medium-editor-element"),e.setAttribute("role","textbox"),e.setAttribute("aria-multiline",!0),e.setAttribute("data-medium-editor-editor-index",i),e.setAttribute("medium-editor-index",o),D[o]=e.innerHTML,this.events.attachAllEventsToElement(e)}return e}function C(){this.subscribe("editableKeydownTab",i.bind(this)),this.subscribe("editableKeydownDelete",o.bind(this)),this.subscribe("editableKeydownEnter",o.bind(this)),this.options.disableExtraSpaces&&this.subscribe("editableKeydownSpace",e.bind(this)),this.instanceHandleEditableKeydownEnter||(this.options.disableReturn||this.options.disableDoubleReturn)&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter))}function x(){if(this.extensions=[],Object.keys(this.options.extensions).forEach(function(t){"toolbar"!==t&&this.options.extensions[t]&&this.extensions.push(h(this.options.extensions[t],t,this))},this),w.call(this)){var e=this.options.fileDragging;e||(e={},v.call(this)||(e.allowedTypes=[])),this.addBuiltInExtension("fileDragging",e)}var n={paste:!0,"anchor-preview":f.call(this),autoLink:g.call(this),keyboardCommands:_.call(this),placeholder:m.call(this)};Object.keys(n).forEach(function(t){n[t]&&this.addBuiltInExtension(t)},this);var i=this.options.extensions.toolbar;if(!i&&p.call(this)){var o=t.util.extend({},this.options.toolbar,{allowMultiParagraphSelection:this.options.allowMultiParagraphSelection});i=new t.extensions.toolbar(o)}i&&this.extensions.push(h(i,"toolbar",this))}function S(e,n){var i=[["allowMultiParagraphSelection","toolbar.allowMultiParagraphSelection"]];return n&&i.forEach(function(e){n.hasOwnProperty(e[0])&&void 0!==n[e[0]]&&t.util.deprecated(e[0],e[1],"v6.0.0")}),t.util.defaults({},n,e)}function T(e,n){var i,o,r=/^append-(.+)$/gi,a=/justify([A-Za-z]*)$/g;if(i=r.exec(e))return t.util.execFormatBlock(this.options.ownerDocument,i[1]);if("fontSize"===e)return n.size&&t.util.deprecated(".size option for fontSize command",".value","6.0.0"),o=n.value||n.size,this.options.ownerDocument.execCommand("fontSize",!1,o);if("fontName"===e)return n.name&&t.util.deprecated(".name option for fontName command",".value","6.0.0"),o=n.value||n.name,this.options.ownerDocument.execCommand("fontName",!1,o);if("createLink"===e)return this.createLink(n);if("image"===e){var s=this.options.contentWindow.getSelection().toString().trim();return this.options.ownerDocument.execCommand("insertImage",!1,s)}if("html"===e){var l=this.options.contentWindow.getSelection().toString().trim();return t.util.insertHTMLCommand(this.options.ownerDocument,l)}if(a.exec(e)){var c=this.options.ownerDocument.execCommand(e,!1,null),u=t.selection.getSelectedParentElement(t.selection.getSelectionRange(this.options.ownerDocument));return u&&E.call(this,t.util.getTopBlockContainer(u)),c}return o=n&&n.value,this.options.ownerDocument.execCommand(e,!1,o)}function E(e){if(e){var n,i=Array.prototype.slice.call(e.childNodes).filter(function(t){var e="div"===t.nodeName.toLowerCase();return e&&!n&&(n=t.style.textAlign),e});i.length&&(this.saveSelection(),i.forEach(function(e){if(e.style.textAlign===n){var i=e.lastChild;if(i){t.util.unwrap(e,this.options.ownerDocument);var o=this.options.ownerDocument.createElement("BR");i.parentNode.insertBefore(o,i.nextSibling)}}},this),e.style.textAlign=n,this.restoreSelection())}}var D={};t.prototype={init:function(t,e){return this.options=S.call(this,this.defaults,e),this.origElements=t,this.options.elementsContainer||(this.options.elementsContainer=this.options.ownerDocument.body),this.setup()},setup:function(){this.isActive||(s.call(this,this.options.contentWindow),this.events=new t.Events(this),this.elements=[],this.addElements(this.origElements),0!==this.elements.length&&(this.isActive=!0,x.call(this),C.call(this)))},destroy:function(){this.isActive&&(this.isActive=!1,this.extensions.forEach(function(t){"function"==typeof t.destroy&&t.destroy()},this),this.events.destroy(),this.elements.forEach(function(t){this.options.spellcheck&&(t.innerHTML=t.innerHTML),t.removeAttribute("contentEditable"),t.removeAttribute("spellcheck"),t.removeAttribute("data-medium-editor-element"),t.classList.remove("medium-editor-element"),t.removeAttribute("role"),t.removeAttribute("aria-multiline"),t.removeAttribute("medium-editor-index"),t.removeAttribute("data-medium-editor-editor-index"),t.getAttribute("medium-editor-textarea-id")&&u(t)},this),this.elements=[],this.instanceHandleEditableKeydownEnter=null,this.instanceHandleEditableInput=null,l.call(this,this.options.contentWindow))},on:function(t,e,n,i){return this.events.attachDOMEvent(t,e,n,i),this},off:function(t,e,n,i){return this.events.detachDOMEvent(t,e,n,i),this},subscribe:function(t,e){return this.events.attachCustomEvent(t,e),this},unsubscribe:function(t,e){return this.events.detachCustomEvent(t,e),this},trigger:function(t,e,n){return this.events.triggerCustomEvent(t,e,n),this},delay:function(t){var e=this;return setTimeout(function(){e.isActive&&t()},this.options.delay)},serialize:function(){var t,e,n={},i=this.elements.length;for(t=0;t<i;t+=1)e=""!==this.elements[t].id?this.elements[t].id:"element-"+t,n[e]={value:this.elements[t].innerHTML.trim()};return n},getExtensionByName:function(t){var e;return this.extensions&&this.extensions.length&&this.extensions.some(function(n){return n.name===t&&(e=n,!0)}),e},addBuiltInExtension:function(e,n){var i,o=this.getExtensionByName(e);if(o)return o;switch(e){case"anchor":i=t.util.extend({},this.options.anchor,n),o=new t.extensions.anchor(i);break;case"anchor-preview":o=new t.extensions.anchorPreview(this.options.anchorPreview);break;case"autoLink":o=new t.extensions.autoLink;break;case"fileDragging":o=new t.extensions.fileDragging(n);break;case"fontname":o=new t.extensions.fontName(this.options.fontName);break;case"fontsize":o=new t.extensions.fontSize(n);break;case"keyboardCommands":o=new t.extensions.keyboardCommands(this.options.keyboardCommands);break;case"paste":o=new t.extensions.paste(this.options.paste);break;case"placeholder":o=new t.extensions.placeholder(this.options.placeholder);break;default:t.extensions.button.isBuiltInButton(e)&&(n?(i=t.util.defaults({},n,t.extensions.button.prototype.defaults[e]),o=new t.extensions.button(i)):o=new t.extensions.button(e))}return o&&this.extensions.push(h(o,e,this)),o},stopSelectionUpdates:function(){this.preventSelectionUpdates=!0},startSelectionUpdates:function(){this.preventSelectionUpdates=!1},checkSelection:function(){var t=this.getExtensionByName("toolbar");return t&&t.checkState(),this},queryCommandState:function(t){var e,n=/^full-(.+)$/gi,i=null;(e=n.exec(t))&&(t=e[1]);try{i=this.options.ownerDocument.queryCommandState(t)}catch(t){i=null}return i},execAction:function(e,n){var i,o;return i=/^full-(.+)$/gi.exec(e),i?(this.saveSelection(),this.selectAllContents(),o=T.call(this,i[1],n),this.restoreSelection()):o=T.call(this,e,n),"insertunorderedlist"!==e&&"insertorderedlist"!==e||t.util.cleanListDOM(this.options.ownerDocument,this.getSelectedParentElement()),this.checkSelection(),o},getSelectedParentElement:function(e){return void 0===e&&(e=this.options.contentWindow.getSelection().getRangeAt(0)),t.selection.getSelectedParentElement(e)},selectAllContents:function(){var e=t.selection.getSelectionElement(this.options.contentWindow);if(e){for(;1===e.children.length;)e=e.children[0];this.selectElement(e)}},selectElement:function(e){t.selection.selectNode(e,this.options.ownerDocument);var n=t.selection.getSelectionElement(this.options.contentWindow);n&&this.events.focusElement(n)},getFocusedElement:function(){var t;return this.elements.some(function(e){return!t&&e.getAttribute("data-medium-focused")&&(t=e),!!t},this),t},exportSelection:function(){var e=t.selection.getSelectionElement(this.options.contentWindow),n=this.elements.indexOf(e),i=null;return n>=0&&(i=t.selection.exportSelection(e,this.options.ownerDocument)),null!==i&&0!==n&&(i.editableElementIndex=n),i},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(e,n){if(e){var i=this.elements[e.editableElementIndex||0];t.selection.importSelection(e,i,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(e){var n,i=t.selection.getSelectionElement(this.options.contentWindow),o={};if(-1!==this.elements.indexOf(i)){try{if(this.events.disableCustomEvent("editableInput"),e.url&&t.util.deprecated(".url option for createLink",".value","6.0.0"),(n=e.url||e.value)&&n.trim().length>0){var r=this.options.contentWindow.getSelection();if(r){var a,s,l,c,u=r.getRangeAt(0),d=u.commonAncestorContainer;if(3===u.endContainer.nodeType&&3!==u.startContainer.nodeType&&0===u.startOffset&&u.startContainer.firstChild===u.endContainer&&(d=u.endContainer),s=t.util.getClosestBlockContainer(u.startContainer),l=t.util.getClosestBlockContainer(u.endContainer),3!==d.nodeType&&0!==d.textContent.length&&s===l){var h=s||i,p=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),a=this.exportSelection(),p.appendChild(h.cloneNode(!0)),i===h?t.selection.select(this.options.ownerDocument,h.firstChild,0,h.lastChild,3===h.lastChild.nodeType?h.lastChild.nodeValue.length:h.lastChild.childNodes.length):t.selection.select(this.options.ownerDocument,h,0,h,h.childNodes.length);var f=this.exportSelection();c=t.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,p,{start:a.start-f.start,end:a.end-f.start,editableElementIndex:a.editableElementIndex}),0===c.length&&(p=this.options.ownerDocument.createDocumentFragment(),p.appendChild(d.cloneNode(!0)),c=[p.firstChild.firstChild,p.firstChild.lastChild]),t.util.createLink(this.options.ownerDocument,c,n.trim());var m=(p.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;t.util.insertHTMLCommand(this.options.ownerDocument,p.firstChild.innerHTML.replace(/^\s+/,"")),a.start-=m,a.end-=m,this.importSelection(a)}else this.options.ownerDocument.execCommand("createLink",!1,n);this.options.targetBlank||"_blank"===e.target?t.util.setTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n):t.util.removeTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n),e.buttonClass&&t.util.addClassToAnchors(t.selection.getSelectionStart(this.options.ownerDocument),e.buttonClass)}}if(this.options.targetBlank||"_blank"===e.target||e.buttonClass){o=this.options.ownerDocument.createEvent("HTMLEvents"),o.initEvent("input",!0,!0,this.options.contentWindow);for(var g=0,v=this.elements.length;g<v;g+=1)this.elements[g].dispatchEvent(o)}}finally{this.events.enableCustomEvent("editableInput")}this.events.triggerCustomEvent("editableInput",o,i)}},cleanPaste:function(t){this.getExtensionByName("paste").cleanPaste(t)},pasteHTML:function(t,e){this.getExtensionByName("paste").pasteHTML(t,e)},setContent:function(t,e){if(e=e||0,this.elements[e]){var n=this.elements[e];n.innerHTML=t,this.checkContentChanged(n)}},getContent:function(t){return t=t||0,this.elements[t]?this.elements[t].innerHTML.trim():null},checkContentChanged:function(e){e=e||t.selection.getSelectionElement(this.options.contentWindow),this.events.updateInput(e,{target:e,currentTarget:e})},resetContent:function(t){if(t){var e=this.elements.indexOf(t);return void(-1!==e&&this.setContent(D[t.getAttribute("medium-editor-index")],e))}this.elements.forEach(function(t,e){this.setContent(D[t.getAttribute("medium-editor-index")],e)},this)},addElements:function(t){var e=c(t,this.options.ownerDocument,!0);if(0===e.length)return!1;e.forEach(function(t){t=y.call(this,t,this.id),this.elements.push(t),this.trigger("addElement",{target:t,currentTarget:t},t)},this)},removeElements:function(t){var e=c(t,this.options.ownerDocument),n=e.map(function(t){return t.getAttribute("medium-editor-textarea-id")&&t.parentNode?t.parentNode.querySelector('div[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]'):t});this.elements=this.elements.filter(function(t){return-1===n.indexOf(t)||(this.events.cleanupElement(t),t.getAttribute("medium-editor-textarea-id")&&u(t),this.trigger("removeElement",{target:t,currentTarget:t},t),!1)},this)}},t.getEditorFromElement=function(t){var e=t.getAttribute("data-medium-editor-editor-index"),n=t&&t.ownerDocument&&(t.ownerDocument.defaultView||t.ownerDocument.parentWindow);return n&&n._mediumEditors&&n._mediumEditors[e]?n._mediumEditors[e]:null}}(),function(){t.prototype.defaults={activeButtonClass:"medium-editor-button-active",buttonLabels:!1,delay:0,disableReturn:!1,disableDoubleReturn:!1,disableExtraSpaces:!1,disableEditing:!1,autoLink:!1,elementsContainer:!1,contentWindow:window,ownerDocument:document,targetBlank:!1,extensions:{},spellcheck:!0}}(),t.parseVersionString=function(t){var e=t.split("-"),n=e[0].split("."),i=e.length>1?e[1]:"";return{major:parseInt(n[0],10),minor:parseInt(n[1],10),revision:parseInt(n[2],10),preRelease:i,toString:function(){return[n[0],n[1],n[2]].join(".")+(i?"-"+i:"")}}},t.version=t.parseVersionString.call(this,{version:"5.23.3"}.version),t}())}).call(e,n(21))},function(t,e,n){var i,o;/*! DataTables 1.10.16
|
5 |
* ©2008-2017 SpryMedia Ltd - datatables.net/license
|
6 |
*/
|
7 |
-
!function(r){"use strict";i=[n(0)],void 0!==(o=function(t){return r(t,window,document)}.apply(e,i))&&(t.exports=o)}(function(t,e,n,i){"use strict";function o(e){var n,i,r={};t.each(e,function(t,a){(n=t.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(i=t.replace(n[0],n[2].toLowerCase()),r[i]=t,"o"===n[1]&&o(e[t]))}),e._hungarianMap=r}function r(e,n,a){e._hungarianMap||o(e);var s;t.each(n,function(o,l){(s=e._hungarianMap[o])===i||!a&&n[s]!==i||("o"===s.charAt(0)?(n[s]||(n[s]={}),t.extend(!0,n[s],n[o]),r(e[s],n[s],a)):n[s]=n[o])})}function a(t){var e=Gt.defaults.oLanguage,n=t.sZeroRecords;!t.sEmptyTable&&n&&"No data available in table"===e.sEmptyTable&&It(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&n&&"Loading..."===e.sLoadingRecords&&It(t,t,"sZeroRecords","sLoadingRecords"),t.sInfoThousands&&(t.sThousands=t.sInfoThousands);var i=t.sDecimal;i&&zt(i)}function s(t){fe(t,"ordering","bSort"),fe(t,"orderMulti","bSortMulti"),fe(t,"orderClasses","bSortClasses"),fe(t,"orderCellsTop","bSortCellsTop"),fe(t,"order","aaSorting"),fe(t,"orderFixed","aaSortingFixed"),fe(t,"paging","bPaginate"),fe(t,"pagingType","sPaginationType"),fe(t,"pageLength","iDisplayLength"),fe(t,"searching","bFilter"),"boolean"==typeof t.sScrollX&&(t.sScrollX=t.sScrollX?"100%":""),"boolean"==typeof t.scrollX&&(t.scrollX=t.scrollX?"100%":"");var e=t.aoSearchCols;if(e)for(var n=0,i=e.length;n<i;n++)e[n]&&r(Gt.models.oSearch,e[n])}function l(e){fe(e,"orderable","bSortable"),fe(e,"orderData","aDataSort"),fe(e,"orderSequence","asSorting"),fe(e,"orderDataType","sortDataType");var n=e.aDataSort;"number"!=typeof n||t.isArray(n)||(e.aDataSort=[n])}function c(n){if(!Gt.__browser){var i={};Gt.__browser=i;var o=t("<div/>").css({position:"fixed",top:0,left:-1*t(e).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(t("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(t("<div/>").css({width:"100%",height:10}))).appendTo("body"),r=o.children(),a=r.children();i.barWidth=r[0].offsetWidth-r[0].clientWidth,i.bScrollOversize=100===a[0].offsetWidth&&100!==r[0].clientWidth,i.bScrollbarLeft=1!==Math.round(a.offset().left),i.bBounding=!!o[0].getBoundingClientRect().width,o.remove()}t.extend(n.oBrowser,Gt.__browser),n.oScroll.iBarWidth=Gt.__browser.barWidth}function u(t,e,n,o,r,a){var s,l=o,c=!1;for(n!==i&&(s=n,c=!0);l!==r;)t.hasOwnProperty(l)&&(s=c?e(s,t[l],l,t):t[l],c=!0,l+=a);return s}function d(e,i){var o=Gt.defaults.column,r=e.aoColumns.length,a=t.extend({},Gt.models.oColumn,o,{nTh:i||n.createElement("th"),sTitle:o.sTitle?o.sTitle:i?i.innerHTML:"",aDataSort:o.aDataSort?o.aDataSort:[r],mData:o.mData?o.mData:r,idx:r});e.aoColumns.push(a);var s=e.aoPreSearchCols;s[r]=t.extend({},Gt.models.oSearch,s[r]),h(e,r,t(i).data())}function h(e,n,o){var a=e.aoColumns[n],s=e.oClasses,c=t(a.nTh);if(!a.sWidthOrig){a.sWidthOrig=c.attr("width")||null;var u=(c.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);u&&(a.sWidthOrig=u[1])}o!==i&&null!==o&&(l(o),r(Gt.defaults.column,o),o.mDataProp===i||o.mData||(o.mData=o.mDataProp),o.sType&&(a._sManualType=o.sType),o.className&&!o.sClass&&(o.sClass=o.className),o.sClass&&c.addClass(o.sClass),t.extend(a,o),It(a,o,"sWidth","sWidthOrig"),o.iDataSort!==i&&(a.aDataSort=[o.iDataSort]),It(a,o,"aDataSort"));var d=a.mData,h=D(d),p=a.mRender?D(a.mRender):null,f=function(t){return"string"==typeof t&&-1!==t.indexOf("@")};a._bAttrSrc=t.isPlainObject(d)&&(f(d.sort)||f(d.type)||f(d.filter)),a._setter=null,a.fnGetData=function(t,e,n){var o=h(t,e,i,n);return p&&e?p(o,e,t,n):o},a.fnSetData=function(t,e,n){return A(d)(t,e,n)},"number"!=typeof d&&(e._rowReadObject=!0),e.oFeatures.bSort||(a.bSortable=!1,c.addClass(s.sSortableNone));var m=-1!==t.inArray("asc",a.asSorting),g=-1!==t.inArray("desc",a.asSorting);a.bSortable&&(m||g)?m&&!g?(a.sSortingClass=s.sSortableAsc,a.sSortingClassJUI=s.sSortJUIAscAllowed):!m&&g?(a.sSortingClass=s.sSortableDesc,a.sSortingClassJUI=s.sSortJUIDescAllowed):(a.sSortingClass=s.sSortable,a.sSortingClassJUI=s.sSortJUI):(a.sSortingClass=s.sSortableNone,a.sSortingClassJUI="")}function p(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;vt(t);for(var n=0,i=e.length;n<i;n++)e[n].nTh.style.width=e[n].sWidth}var o=t.oScroll;""===o.sY&&""===o.sX||mt(t),$t(t,null,"column-sizing",[t])}function f(t,e){var n=v(t,"bVisible");return"number"==typeof n[e]?n[e]:null}function m(e,n){var i=v(e,"bVisible"),o=t.inArray(n,i);return-1!==o?o:null}function g(e){var n=0;return t.each(e.aoColumns,function(e,i){i.bVisible&&"none"!==t(i.nTh).css("display")&&n++}),n}function v(e,n){var i=[];return t.map(e.aoColumns,function(t,e){t[n]&&i.push(e)}),i}function _(t){var e,n,o,r,a,s,l,c,u,d=t.aoColumns,h=t.aoData,p=Gt.ext.type.detect;for(e=0,n=d.length;e<n;e++)if(l=d[e],u=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(o=0,r=p.length;o<r;o++){for(a=0,s=h.length;a<s&&(u[a]===i&&(u[a]=S(t,a,e,"type")),(c=p[o](u[a],t))||o===p.length-1)&&"html"!==c;a++);if(c){l.sType=c;break}}l.sType||(l.sType="string")}}function w(e,n,o,r){var a,s,l,c,u,h,p,f=e.aoColumns;if(n)for(a=n.length-1;a>=0;a--){p=n[a];var m=p.targets!==i?p.targets:p.aTargets;for(t.isArray(m)||(m=[m]),l=0,c=m.length;l<c;l++)if("number"==typeof m[l]&&m[l]>=0){for(;f.length<=m[l];)d(e);r(m[l],p)}else if("number"==typeof m[l]&&m[l]<0)r(f.length+m[l],p);else if("string"==typeof m[l])for(u=0,h=f.length;u<h;u++)("_all"==m[l]||t(f[u].nTh).hasClass(m[l]))&&r(u,p)}if(o)for(a=0,s=o.length;a<s;a++)r(a,o[a])}function b(e,n,o,r){var a=e.aoData.length,s=t.extend(!0,{},Gt.models.oRow,{src:o?"dom":"data",idx:a});s._aData=n,e.aoData.push(s);for(var l=e.aoColumns,c=0,u=l.length;c<u;c++)l[c].sType=null;e.aiDisplayMaster.push(a);var d=e.rowIdFn(n);return d!==i&&(e.aIds[d]=s),!o&&e.oFeatures.bDeferRender||L(e,a,o,r),a}function y(e,n){var i;return n instanceof t||(n=t(n)),n.map(function(t,n){return i=I(e,n),b(e,i.data,n,i.cells)})}function C(t,e){return e._DT_RowIndex!==i?e._DT_RowIndex:null}function x(e,n,i){return t.inArray(i,e.aoData[n].anCells)}function S(t,e,n,o){var r=t.iDraw,a=t.aoColumns[n],s=t.aoData[e]._aData,l=a.sDefaultContent,c=a.fnGetData(s,o,{settings:t,row:e,col:n});if(c===i)return t.iDrawError!=r&&null===l&&(Ot(t,0,"Requested unknown parameter "+("function"==typeof a.mData?"{function}":"'"+a.mData+"'")+" for row "+e+", column "+n,4),t.iDrawError=r),l;if(c!==s&&null!==c||null===l||o===i){if("function"==typeof c)return c.call(s)}else c=l;return null===c&&"display"==o?"":c}function T(t,e,n,i){var o=t.aoColumns[n],r=t.aoData[e]._aData;o.fnSetData(r,i,{settings:t,row:e,col:n})}function E(e){return t.map(e.match(/(\\.|[^\.])+/g)||[""],function(t){return t.replace(/\\\./g,".")})}function D(e){if(t.isPlainObject(e)){var n={};return t.each(e,function(t,e){e&&(n[t]=D(e))}),function(t,e,o,r){var a=n[e]||n._;return a!==i?a(t,e,o,r):t}}if(null===e)return function(t){return t};if("function"==typeof e)return function(t,n,i,o){return e(t,n,i,o)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,n){return t[e]};var o=function(e,n,r){var a,s,l,c;if(""!==r)for(var u=E(r),d=0,h=u.length;d<h;d++){if(a=u[d].match(me),s=u[d].match(ge),a){if(u[d]=u[d].replace(me,""),""!==u[d]&&(e=e[u[d]]),l=[],u.splice(0,d+1),c=u.join("."),t.isArray(e))for(var p=0,f=e.length;p<f;p++)l.push(o(e[p],n,c));var m=a[0].substring(1,a[0].length-1);e=""===m?l:l.join(m);break}if(s)u[d]=u[d].replace(ge,""),e=e[u[d]]();else{if(null===e||e[u[d]]===i)return i;e=e[u[d]]}}return e};return function(t,n){return o(t,n,e)}}function A(e){if(t.isPlainObject(e))return A(e._);if(null===e)return function(){};if("function"==typeof e)return function(t,n,i){e(t,"set",n,i)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,n){t[e]=n};var n=function(e,o,r){for(var a,s,l,c,u,d=E(r),h=d[d.length-1],p=0,f=d.length-1;p<f;p++){if(s=d[p].match(me),l=d[p].match(ge),s){if(d[p]=d[p].replace(me,""),e[d[p]]=[],a=d.slice(),a.splice(0,p+1),u=a.join("."),t.isArray(o))for(var m=0,g=o.length;m<g;m++)c={},n(c,o[m],u),e[d[p]].push(c);else e[d[p]]=o;return}l&&(d[p]=d[p].replace(ge,""),e=e[d[p]](o)),null!==e[d[p]]&&e[d[p]]!==i||(e[d[p]]={}),e=e[d[p]]}h.match(ge)?e=e[h.replace(ge,"")](o):e[h.replace(me,"")]=o};return function(t,i){return n(t,i,e)}}function N(t){return se(t.aoData,"_aData")}function k(t){t.aoData.length=0,t.aiDisplayMaster.length=0,t.aiDisplay.length=0,t.aIds={}}function R(t,e,n){for(var o=-1,r=0,a=t.length;r<a;r++)t[r]==e?o=r:t[r]>e&&t[r]--;-1!=o&&n===i&&t.splice(o,1)}function O(t,e,n,o){var r,a,s=t.aoData[e],l=function(n,i){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=S(t,e,i,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==s.src)){var c=s.anCells;if(c)if(o!==i)l(c[o],o);else for(r=0,a=c.length;r<a;r++)l(c[r],r)}else s._aData=I(t,s,o,o===i?i:s._aData).data;s._aSortData=null,s._aFilterData=null;var u=t.aoColumns;if(o!==i)u[o].sType=null;else{for(r=0,a=u.length;r<a;r++)u[r].sType=null;P(t,s)}}function I(e,n,o,r){var a,s,l,c=[],u=n.firstChild,d=0,h=e.aoColumns,p=e._rowReadObject;r=r!==i?r:p?{}:[];var f=function(t,e){if("string"==typeof t){var n=t.indexOf("@");if(-1!==n){var i=t.substring(n+1);A(t)(r,e.getAttribute(i))}}},m=function(e){if(o===i||o===d)if(s=h[d],l=t.trim(e.innerHTML),s&&s._bAttrSrc){var n=A(s.mData._);n(r,l),f(s.mData.sort,e),f(s.mData.type,e),f(s.mData.filter,e)}else p?(s._setter||(s._setter=A(s.mData)),s._setter(r,l)):r[d]=l;d++};if(u)for(;u;)a=u.nodeName.toUpperCase(),"TD"!=a&&"TH"!=a||(m(u),c.push(u)),u=u.nextSibling;else{c=n.anCells;for(var g=0,v=c.length;g<v;g++)m(c[g])}var _=n.firstChild?n:n.nTr;if(_){var w=_.getAttribute("id");w&&A(e.rowId)(r,w)}return{data:r,cells:c}}function L(e,i,o,r){var a,s,l,c,u,d=e.aoData[i],h=d._aData,p=[];if(null===d.nTr){for(a=o||n.createElement("tr"),d.nTr=a,d.anCells=p,a._DT_RowIndex=i,P(e,d),c=0,u=e.aoColumns.length;c<u;c++)l=e.aoColumns[c],s=o?r[c]:n.createElement(l.sCellType),s._DT_CellIndex={row:i,column:c},p.push(s),o&&!l.mRender&&l.mData===c||t.isPlainObject(l.mData)&&l.mData._===c+".display"||(s.innerHTML=S(e,i,c,"display")),l.sClass&&(s.className+=" "+l.sClass),l.bVisible&&!o?a.appendChild(s):!l.bVisible&&o&&s.parentNode.removeChild(s),l.fnCreatedCell&&l.fnCreatedCell.call(e.oInstance,s,S(e,i,c),h,i,c);$t(e,"aoRowCreatedCallback",null,[a,h,i])}d.nTr.setAttribute("role","row")}function P(e,n){var i=n.nTr,o=n._aData;if(i){var r=e.rowIdFn(o);if(r&&(i.id=r),o.DT_RowClass){var a=o.DT_RowClass.split(" ");n.__rowc=n.__rowc?pe(n.__rowc.concat(a)):a,t(i).removeClass(n.__rowc.join(" ")).addClass(o.DT_RowClass)}o.DT_RowAttr&&t(i).attr(o.DT_RowAttr),o.DT_RowData&&t(i).data(o.DT_RowData)}}function M(e){var n,i,o,r,a,s=e.nTHead,l=e.nTFoot,c=0===t("th, td",s).length,u=e.oClasses,d=e.aoColumns;for(c&&(r=t("<tr/>").appendTo(s)),n=0,i=d.length;n<i;n++)a=d[n],o=t(a.nTh).addClass(a.sClass),c&&o.appendTo(r),e.oFeatures.bSort&&(o.addClass(a.sSortingClass),!1!==a.bSortable&&(o.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),Et(e,a.nTh,n))),a.sTitle!=o[0].innerHTML&&o.html(a.sTitle),Ht(e,"header")(e,o,a,u);if(c&&j(e.aoHeader,s),t(s).find(">tr").attr("role","row"),t(s).find(">tr>th, >tr>td").addClass(u.sHeaderTH),t(l).find(">tr>th, >tr>td").addClass(u.sFooterTH),null!==l){var h=e.aoFooter[0];for(n=0,i=h.length;n<i;n++)a=d[n],a.nTf=h[n].cell,a.sClass&&t(a.nTf).addClass(a.sClass)}}function $(e,n,o){var r,a,s,l,c,u,d,h,p,f=[],m=[],g=e.aoColumns.length;if(n){for(o===i&&(o=!1),r=0,a=n.length;r<a;r++){for(f[r]=n[r].slice(),f[r].nTr=n[r].nTr,s=g-1;s>=0;s--)e.aoColumns[s].bVisible||o||f[r].splice(s,1);m.push([])}for(r=0,a=f.length;r<a;r++){if(d=f[r].nTr)for(;u=d.firstChild;)d.removeChild(u);for(s=0,l=f[r].length;s<l;s++)if(h=1,p=1,m[r][s]===i){for(d.appendChild(f[r][s].cell),m[r][s]=1;f[r+h]!==i&&f[r][s].cell==f[r+h][s].cell;)m[r+h][s]=1,h++;for(;f[r][s+p]!==i&&f[r][s].cell==f[r][s+p].cell;){for(c=0;c<h;c++)m[r+c][s+p]=1;p++}t(f[r][s].cell).attr("rowspan",h).attr("colspan",p)}}}}function F(e){var n=$t(e,"aoPreDrawCallback","preDraw",[e]);if(-1!==t.inArray(!1,n))return void pt(e,!1);var o=[],r=0,a=e.asStripeClasses,s=a.length,l=(e.aoOpenRows.length,e.oLanguage),c=e.iInitDisplayStart,u="ssp"==Bt(e),d=e.aiDisplay;e.bDrawing=!0,c!==i&&-1!==c&&(e._iDisplayStart=u?c:c>=e.fnRecordsDisplay()?0:c,e.iInitDisplayStart=-1);var h=e._iDisplayStart,p=e.fnDisplayEnd();if(e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,pt(e,!1);else if(u){if(!e.bDestroying&&!q(e))return}else e.iDraw++;if(0!==d.length)for(var f=u?0:h,m=u?e.aoData.length:p,v=f;v<m;v++){var _=d[v],w=e.aoData[_];null===w.nTr&&L(e,_);var b=w.nTr;if(0!==s){var y=a[r%s];w._sRowStripe!=y&&(t(b).removeClass(w._sRowStripe).addClass(y),w._sRowStripe=y)}$t(e,"aoRowCallback",null,[b,w._aData,r,v]),o.push(b),r++}else{var C=l.sZeroRecords;1==e.iDraw&&"ajax"==Bt(e)?C=l.sLoadingRecords:l.sEmptyTable&&0===e.fnRecordsTotal()&&(C=l.sEmptyTable),o[0]=t("<tr/>",{class:s?a[0]:""}).append(t("<td />",{valign:"top",colSpan:g(e),class:e.oClasses.sRowEmpty}).html(C))[0]}$t(e,"aoHeaderCallback","header",[t(e.nTHead).children("tr")[0],N(e),h,p,d]),$t(e,"aoFooterCallback","footer",[t(e.nTFoot).children("tr")[0],N(e),h,p,d]);var x=t(e.nTBody);x.children().detach(),x.append(t(o)),$t(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}function H(t,e){var n=t.oFeatures,i=n.bSort,o=n.bFilter;i&&xt(t),o?Y(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,F(t),t._drawHold=!1}function B(e){var n=e.oClasses,i=t(e.nTable),o=t("<div/>").insertBefore(i),r=e.oFeatures,a=t("<div/>",{id:e.sTableId+"_wrapper",class:n.sWrapper+(e.nTFoot?"":" "+n.sNoFooter)});e.nHolding=o[0],e.nTableWrapper=a[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var s,l,c,u,d,h,p=e.sDom.split(""),f=0;f<p.length;f++){if(s=null,"<"==(l=p[f])){if(c=t("<div/>")[0],"'"==(u=p[f+1])||'"'==u){for(d="",h=2;p[f+h]!=u;)d+=p[f+h],h++;if("H"==d?d=n.sJUIHeader:"F"==d&&(d=n.sJUIFooter),-1!=d.indexOf(".")){var m=d.split(".");c.id=m[0].substr(1,m[0].length-1),c.className=m[1]}else"#"==d.charAt(0)?c.id=d.substr(1,d.length-1):c.className=d;f+=h}a.append(c),a=t(c)}else if(">"==l)a=a.parent();else if("l"==l&&r.bPaginate&&r.bLengthChange)s=ct(e);else if("f"==l&&r.bFilter)s=G(e);else if("r"==l&&r.bProcessing)s=ht(e);else if("t"==l)s=ft(e);else if("i"==l&&r.bInfo)s=it(e);else if("p"==l&&r.bPaginate)s=ut(e);else if(0!==Gt.ext.feature.length)for(var g=Gt.ext.feature,v=0,_=g.length;v<_;v++)if(l==g[v].cFeature){s=g[v].fnInit(e);break}if(s){var w=e.aanFeatures;w[l]||(w[l]=[]),w[l].push(s),a.append(s)}}o.replaceWith(a),e.nHolding=null}function j(e,n){var i,o,r,a,s,l,c,u,d,h,p,f=t(n).children("tr");for(e.splice(0,e.length),r=0,l=f.length;r<l;r++)e.push([]);for(r=0,l=f.length;r<l;r++)for(i=f[r],u=0,o=i.firstChild;o;){if("TD"==o.nodeName.toUpperCase()||"TH"==o.nodeName.toUpperCase())for(d=1*o.getAttribute("colspan"),h=1*o.getAttribute("rowspan"),d=d&&0!==d&&1!==d?d:1,h=h&&0!==h&&1!==h?h:1,c=function(t,e,n){for(var i=t[e];i[n];)n++;return n}(e,r,u),p=1===d,s=0;s<d;s++)for(a=0;a<h;a++)e[r+a][c+s]={cell:o,unique:p},e[r+a].nTr=i;o=o.nextSibling}}function z(t,e,n){var i=[];n||(n=t.aoHeader,e&&(n=[],j(n,e)));for(var o=0,r=n.length;o<r;o++)for(var a=0,s=n[o].length;a<s;a++)!n[o][a].unique||i[a]&&t.bSortCellsTop||(i[a]=n[o][a].cell);return i}function W(e,n,i){if($t(e,"aoServerParams","serverParams",[n]),n&&t.isArray(n)){var o={},r=/(.*?)\[\]$/;t.each(n,function(t,e){var n=e.name.match(r);if(n){var i=n[0];o[i]||(o[i]=[]),o[i].push(e.value)}else o[e.name]=e.value}),n=o}var a,s=e.ajax,l=e.oInstance,c=function(t){$t(e,null,"xhr",[e,t,e.jqXHR]),i(t)};if(t.isPlainObject(s)&&s.data){a=s.data;var u=t.isFunction(a)?a(n,e):a;n=t.isFunction(a)&&u?u:t.extend(!0,n,u),delete s.data}var d={data:n,success:function(t){var n=t.error||t.sError;n&&Ot(e,0,n),e.json=t,c(t)},dataType:"json",cache:!1,type:e.sServerMethod,error:function(n,i,o){var r=$t(e,null,"xhr",[e,null,e.jqXHR]);-1===t.inArray(!0,r)&&("parsererror"==i?Ot(e,0,"Invalid JSON response",1):4===n.readyState&&Ot(e,0,"Ajax error",7)),pt(e,!1)}};e.oAjaxData=n,$t(e,null,"preXhr",[e,n]),e.fnServerData?e.fnServerData.call(l,e.sAjaxSource,t.map(n,function(t,e){return{name:e,value:t}}),c,e):e.sAjaxSource||"string"==typeof s?e.jqXHR=t.ajax(t.extend(d,{url:s||e.sAjaxSource})):t.isFunction(s)?e.jqXHR=s.call(l,n,c,e):(e.jqXHR=t.ajax(t.extend(d,s)),s.data=a)}function q(t){return!t.bAjaxDataGet||(t.iDraw++,pt(t,!0),W(t,U(t),function(e){K(t,e)}),!1)}function U(e){var n,i,o,r,a=e.aoColumns,s=a.length,l=e.oFeatures,c=e.oPreviousSearch,u=e.aoPreSearchCols,d=[],h=Ct(e),p=e._iDisplayStart,f=!1!==l.bPaginate?e._iDisplayLength:-1,m=function(t,e){d.push({name:t,value:e})};m("sEcho",e.iDraw),m("iColumns",s),m("sColumns",se(a,"sName").join(",")),m("iDisplayStart",p),m("iDisplayLength",f);var g={draw:e.iDraw,columns:[],order:[],start:p,length:f,search:{value:c.sSearch,regex:c.bRegex}};for(n=0;n<s;n++)o=a[n],r=u[n],i="function"==typeof o.mData?"function":o.mData,g.columns.push({data:i,name:o.sName,searchable:o.bSearchable,orderable:o.bSortable,search:{value:r.sSearch,regex:r.bRegex}}),m("mDataProp_"+n,i),l.bFilter&&(m("sSearch_"+n,r.sSearch),m("bRegex_"+n,r.bRegex),m("bSearchable_"+n,o.bSearchable)),l.bSort&&m("bSortable_"+n,o.bSortable);l.bFilter&&(m("sSearch",c.sSearch),m("bRegex",c.bRegex)),l.bSort&&(t.each(h,function(t,e){g.order.push({column:e.col,dir:e.dir}),m("iSortCol_"+t,e.col),m("sSortDir_"+t,e.dir)}),m("iSortingCols",h.length));var v=Gt.ext.legacy.ajax;return null===v?e.sAjaxSource?d:g:v?d:g}function K(t,e){var n=function(t,n){return e[t]!==i?e[t]:e[n]},o=V(t,e),r=n("sEcho","draw"),a=n("iTotalRecords","recordsTotal"),s=n("iTotalDisplayRecords","recordsFiltered");if(r){if(1*r<t.iDraw)return;t.iDraw=1*r}k(t),t._iRecordsTotal=parseInt(a,10),t._iRecordsDisplay=parseInt(s,10);for(var l=0,c=o.length;l<c;l++)b(t,o[l]);t.aiDisplay=t.aiDisplayMaster.slice(),t.bAjaxDataGet=!1,F(t),t._bInitComplete||st(t,e),t.bAjaxDataGet=!0,pt(t,!1)}function V(e,n){var o=t.isPlainObject(e.ajax)&&e.ajax.dataSrc!==i?e.ajax.dataSrc:e.sAjaxDataProp;return"data"===o?n.aaData||n[o]:""!==o?D(o)(n):n}function G(e){var i=e.oClasses,o=e.sTableId,r=e.oLanguage,a=e.oPreviousSearch,s=e.aanFeatures,l='<input type="search" class="'+i.sFilterInput+'"/>',c=r.sSearch;c=c.match(/_INPUT_/)?c.replace("_INPUT_",l):c+l;var u=t("<div/>",{id:s.f?null:o+"_filter",class:i.sFilter}).append(t("<label/>").append(c)),d=function(){var t=(s.f,this.value?this.value:"");t!=a.sSearch&&(Y(e,{sSearch:t,bRegex:a.bRegex,bSmart:a.bSmart,bCaseInsensitive:a.bCaseInsensitive}),e._iDisplayStart=0,F(e))},h=null!==e.searchDelay?e.searchDelay:"ssp"===Bt(e)?400:0,p=t("input",u).val(a.sSearch).attr("placeholder",r.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?ye(d,h):d).on("keypress.DT",function(t){if(13==t.keyCode)return!1}).attr("aria-controls",o);return t(e.nTable).on("search.dt.DT",function(t,i){if(e===i)try{p[0]!==n.activeElement&&p.val(a.sSearch)}catch(t){}}),u[0]}function Y(t,e,n){var o=t.oPreviousSearch,r=t.aoPreSearchCols,a=function(t){o.sSearch=t.sSearch,o.bRegex=t.bRegex,o.bSmart=t.bSmart,o.bCaseInsensitive=t.bCaseInsensitive},s=function(t){return t.bEscapeRegex!==i?!t.bEscapeRegex:t.bRegex};if(_(t),"ssp"!=Bt(t)){Q(t,e.sSearch,n,s(e),e.bSmart,e.bCaseInsensitive),a(e);for(var l=0;l<r.length;l++)J(t,r[l].sSearch,l,s(r[l]),r[l].bSmart,r[l].bCaseInsensitive);X(t)}else a(e);t.bFiltered=!0,$t(t,null,"search",[t])}function X(e){for(var n,i,o=Gt.ext.search,r=e.aiDisplay,a=0,s=o.length;a<s;a++){for(var l=[],c=0,u=r.length;c<u;c++)i=r[c],n=e.aoData[i],o[a](e,n._aFilterData,i,n._aData,c)&&l.push(i);r.length=0,t.merge(r,l)}}function J(t,e,n,i,o,r){if(""!==e){for(var a,s=[],l=t.aiDisplay,c=Z(e,i,o,r),u=0;u<l.length;u++)a=t.aoData[l[u]]._aFilterData[n],c.test(a)&&s.push(l[u]);t.aiDisplay=s}}function Q(t,e,n,i,o,r){var a,s,l,c=Z(e,i,o,r),u=t.oPreviousSearch.sSearch,d=t.aiDisplayMaster,h=[];if(0!==Gt.ext.search.length&&(n=!0),s=tt(t),e.length<=0)t.aiDisplay=d.slice();else{for((s||n||u.length>e.length||0!==e.indexOf(u)||t.bSorted)&&(t.aiDisplay=d.slice()),a=t.aiDisplay,l=0;l<a.length;l++)c.test(t.aoData[a[l]]._sFilterRow)&&h.push(a[l]);t.aiDisplay=h}}function Z(e,n,i,o){return e=n?e:ve(e),i&&(e="^(?=.*?"+t.map(e.match(/"[^"]+"|[^ ]+/g)||[""],function(t){if('"'===t.charAt(0)){var e=t.match(/^"(.*)"$/);t=e?e[1]:t}return t.replace('"',"")}).join(")(?=.*?")+").*$"),new RegExp(e,o?"i":"")}function tt(t){var e,n,i,o,r,a,s,l,c=t.aoColumns,u=Gt.ext.type.search,d=!1;for(n=0,o=t.aoData.length;n<o;n++)if(l=t.aoData[n],!l._aFilterData){for(a=[],i=0,r=c.length;i<r;i++)e=c[i],e.bSearchable?(s=S(t,n,i,"filter"),u[e.sType]&&(s=u[e.sType](s)),null===s&&(s=""),"string"!=typeof s&&s.toString&&(s=s.toString())):s="",s.indexOf&&-1!==s.indexOf("&")&&(_e.innerHTML=s,s=we?_e.textContent:_e.innerText),s.replace&&(s=s.replace(/[\r\n]/g,"")),a.push(s);l._aFilterData=a,l._sFilterRow=a.join(" "),d=!0}return d}function et(t){return{search:t.sSearch,smart:t.bSmart,regex:t.bRegex,caseInsensitive:t.bCaseInsensitive}}function nt(t){return{sSearch:t.search,bSmart:t.smart,bRegex:t.regex,bCaseInsensitive:t.caseInsensitive}}function it(e){var n=e.sTableId,i=e.aanFeatures.i,o=t("<div/>",{class:e.oClasses.sInfo,id:i?null:n+"_info"});return i||(e.aoDrawCallback.push({fn:ot,sName:"information"}),o.attr("role","status").attr("aria-live","polite"),t(e.nTable).attr("aria-describedby",n+"_info")),o[0]}function ot(e){var n=e.aanFeatures.i;if(0!==n.length){var i=e.oLanguage,o=e._iDisplayStart+1,r=e.fnDisplayEnd(),a=e.fnRecordsTotal(),s=e.fnRecordsDisplay(),l=s?i.sInfo:i.sInfoEmpty;s!==a&&(l+=" "+i.sInfoFiltered),l+=i.sInfoPostFix,l=rt(e,l);var c=i.fnInfoCallback;null!==c&&(l=c.call(e.oInstance,e,o,r,a,s,l)),t(n).html(l)}}function rt(t,e){var n=t.fnFormatNumber,i=t._iDisplayStart+1,o=t._iDisplayLength,r=t.fnRecordsDisplay(),a=-1===o;return e.replace(/_START_/g,n.call(t,i)).replace(/_END_/g,n.call(t,t.fnDisplayEnd())).replace(/_MAX_/g,n.call(t,t.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(t,r)).replace(/_PAGE_/g,n.call(t,a?1:Math.ceil(i/o))).replace(/_PAGES_/g,n.call(t,a?1:Math.ceil(r/o)))}function at(t){var e,n,i,o=t.iInitDisplayStart,r=t.aoColumns,a=t.oFeatures,s=t.bDeferLoading;if(!t.bInitialised)return void setTimeout(function(){at(t)},200);for(B(t),M(t),$(t,t.aoHeader),$(t,t.aoFooter),pt(t,!0),a.bAutoWidth&&vt(t),e=0,n=r.length;e<n;e++)i=r[e],i.sWidth&&(i.nTh.style.width=yt(i.sWidth));$t(t,null,"preInit",[t]),H(t);var l=Bt(t);("ssp"!=l||s)&&("ajax"==l?W(t,[],function(n){var i=V(t,n);for(e=0;e<i.length;e++)b(t,i[e]);t.iInitDisplayStart=o,H(t),pt(t,!1),st(t,n)},t):(pt(t,!1),st(t)))}function st(t,e){t._bInitComplete=!0,(e||t.oInit.aaData)&&p(t),$t(t,null,"plugin-init",[t,e]),$t(t,"aoInitComplete","init",[t,e])}function lt(t,e){var n=parseInt(e,10);t._iDisplayLength=n,Ft(t),$t(t,null,"length",[t,n])}function ct(e){for(var n=e.oClasses,i=e.sTableId,o=e.aLengthMenu,r=t.isArray(o[0]),a=r?o[0]:o,s=r?o[1]:o,l=t("<select/>",{name:i+"_length","aria-controls":i,class:n.sLengthSelect}),c=0,u=a.length;c<u;c++)l[0][c]=new Option("number"==typeof s[c]?e.fnFormatNumber(s[c]):s[c],a[c]);var d=t("<div><label/></div>").addClass(n.sLength);return e.aanFeatures.l||(d[0].id=i+"_length"),d.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML)),t("select",d).val(e._iDisplayLength).on("change.DT",function(n){lt(e,t(this).val()),F(e)}),t(e.nTable).on("length.dt.DT",function(n,i,o){e===i&&t("select",d).val(o)}),d[0]}function ut(e){var n=e.sPaginationType,i=Gt.ext.pager[n],o="function"==typeof i,r=function(t){F(t)},a=t("<div/>").addClass(e.oClasses.sPaging+n)[0],s=e.aanFeatures;return o||i.fnInit(e,a,r),s.p||(a.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(t){if(o){var e,n,a=t._iDisplayStart,l=t._iDisplayLength,c=t.fnRecordsDisplay(),u=-1===l,d=u?0:Math.ceil(a/l),h=u?1:Math.ceil(c/l),p=i(d,h);for(e=0,n=s.p.length;e<n;e++)Ht(t,"pageButton")(t,s.p[e],e,p,d,h)}else i.fnUpdate(t,r)},sName:"pagination"})),a}function dt(t,e,n){var i=t._iDisplayStart,o=t._iDisplayLength,r=t.fnRecordsDisplay();0===r||-1===o?i=0:"number"==typeof e?(i=e*o)>r&&(i=0):"first"==e?i=0:"previous"==e?(i=o>=0?i-o:0)<0&&(i=0):"next"==e?i+o<r&&(i+=o):"last"==e?i=Math.floor((r-1)/o)*o:Ot(t,0,"Unknown paging action: "+e,5);var a=t._iDisplayStart!==i;return t._iDisplayStart=i,a&&($t(t,null,"page",[t]),n&&F(t)),a}function ht(e){return t("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).insertBefore(e.nTable)[0]}function pt(e,n){e.oFeatures.bProcessing&&t(e.aanFeatures.r).css("display",n?"block":"none"),$t(e,null,"processing",[e,n])}function ft(e){var n=t(e.nTable);n.attr("role","grid");var i=e.oScroll;if(""===i.sX&&""===i.sY)return e.nTable;var o=i.sX,r=i.sY,a=e.oClasses,s=n.children("caption"),l=s.length?s[0]._captionSide:null,c=t(n[0].cloneNode(!1)),u=t(n[0].cloneNode(!1)),d=n.children("tfoot"),h="<div/>",p=function(t){return t?yt(t):null};d.length||(d=null);var f=t(h,{class:a.sScrollWrapper}).append(t(h,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:o?p(o):"100%"}).append(t(h,{class:a.sScrollHeadInner}).css({"box-sizing":"content-box",width:i.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===l?s:null).append(n.children("thead"))))).append(t(h,{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:p(o)}).append(n));d&&f.append(t(h,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:o?p(o):"100%"}).append(t(h,{class:a.sScrollFootInner}).append(u.removeAttr("id").css("margin-left",0).append("bottom"===l?s:null).append(n.children("tfoot")))));var m=f.children(),g=m[0],v=m[1],_=d?m[2]:null;return o&&t(v).on("scroll.DT",function(t){var e=this.scrollLeft;g.scrollLeft=e,d&&(_.scrollLeft=e)}),t(v).css(r&&i.bCollapse?"max-height":"height",r),e.nScrollHead=g,e.nScrollBody=v,e.nScrollFoot=_,e.aoDrawCallback.push({fn:mt,sName:"scrolling"}),f[0]}function mt(e){var n,o,r,a,s,l,c,u,d,h=e.oScroll,m=h.sX,g=h.sXInner,v=h.sY,_=h.iBarWidth,w=t(e.nScrollHead),b=w[0].style,y=w.children("div"),C=y[0].style,x=y.children("table"),S=e.nScrollBody,T=t(S),E=S.style,D=t(e.nScrollFoot),A=D.children("div"),N=A.children("table"),k=t(e.nTHead),R=t(e.nTable),O=R[0],I=O.style,L=e.nTFoot?t(e.nTFoot):null,P=e.oBrowser,M=P.bScrollOversize,$=se(e.aoColumns,"nTh"),F=[],H=[],B=[],j=[],W=function(t){var e=t.style;e.paddingTop="0",e.paddingBottom="0",e.borderTopWidth="0",e.borderBottomWidth="0",e.height=0},q=S.scrollHeight>S.clientHeight;if(e.scrollBarVis!==q&&e.scrollBarVis!==i)return e.scrollBarVis=q,void p(e);e.scrollBarVis=q,R.children("thead, tfoot").remove(),L&&(l=L.clone().prependTo(R),o=L.find("tr"),a=l.find("tr")),s=k.clone().prependTo(R),n=k.find("tr"),r=s.find("tr"),s.find("th, td").removeAttr("tabindex"),m||(E.width="100%",w[0].style.width="100%"),t.each(z(e,s),function(t,n){c=f(e,t),n.style.width=e.aoColumns[c].sWidth}),L&>(function(t){t.style.width=""},a),d=R.outerWidth(),""===m?(I.width="100%",M&&(R.find("tbody").height()>S.offsetHeight||"scroll"==T.css("overflow-y"))&&(I.width=yt(R.outerWidth()-_)),d=R.outerWidth()):""!==g&&(I.width=yt(g),d=R.outerWidth()),gt(W,r),gt(function(e){B.push(e.innerHTML),F.push(yt(t(e).css("width")))},r),gt(function(e,n){-1!==t.inArray(e,$)&&(e.style.width=F[n])},n),t(r).height(0),L&&(gt(W,a),gt(function(e){j.push(e.innerHTML),H.push(yt(t(e).css("width")))},a),gt(function(t,e){t.style.width=H[e]},o),t(a).height(0)),gt(function(t,e){t.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+B[e]+"</div>",t.style.width=F[e]},r),L&>(function(t,e){t.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+j[e]+"</div>",t.style.width=H[e]},a),R.outerWidth()<d?(u=S.scrollHeight>S.offsetHeight||"scroll"==T.css("overflow-y")?d+_:d,M&&(S.scrollHeight>S.offsetHeight||"scroll"==T.css("overflow-y"))&&(I.width=yt(u-_)),""!==m&&""===g||Ot(e,1,"Possible column misalignment",6)):u="100%",E.width=yt(u),b.width=yt(u),L&&(e.nScrollFoot.style.width=yt(u)),v||M&&(E.height=yt(O.offsetHeight+_));var U=R.outerWidth();x[0].style.width=yt(U),C.width=yt(U);var K=R.height()>S.clientHeight||"scroll"==T.css("overflow-y"),V="padding"+(P.bScrollbarLeft?"Left":"Right");C[V]=K?_+"px":"0px",L&&(N[0].style.width=yt(U),A[0].style.width=yt(U),A[0].style[V]=K?_+"px":"0px"),R.children("colgroup").insertBefore(R.children("thead")),T.scroll(),!e.bSorted&&!e.bFiltered||e._drawHold||(S.scrollTop=0)}function gt(t,e,n){for(var i,o,r=0,a=0,s=e.length;a<s;){for(i=e[a].firstChild,o=n?n[a].firstChild:null;i;)1===i.nodeType&&(n?t(i,o,r):t(i,r),r++),i=i.nextSibling,o=n?o.nextSibling:null;a++}}function vt(n){var i,o,r,a=n.nTable,s=n.aoColumns,l=n.oScroll,c=l.sY,u=l.sX,d=l.sXInner,h=s.length,m=v(n,"bVisible"),_=t("th",n.nTHead),w=a.getAttribute("width"),b=a.parentNode,y=!1,C=n.oBrowser,x=C.bScrollOversize,S=a.style.width;for(S&&-1!==S.indexOf("%")&&(w=S),i=0;i<m.length;i++)o=s[m[i]],null!==o.sWidth&&(o.sWidth=_t(o.sWidthOrig,b),y=!0);if(x||!y&&!u&&!c&&h==g(n)&&h==_.length)for(i=0;i<h;i++){var T=f(n,i);null!==T&&(s[T].sWidth=yt(_.eq(i).width()))}else{var E=t(a).clone().css("visibility","hidden").removeAttr("id");E.find("tbody tr").remove();var D=t("<tr/>").appendTo(E.find("tbody"));for(E.find("thead, tfoot").remove(),E.append(t(n.nTHead).clone()).append(t(n.nTFoot).clone()),E.find("tfoot th, tfoot td").css("width",""),_=z(n,E.find("thead")[0]),i=0;i<m.length;i++)o=s[m[i]],_[i].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?yt(o.sWidthOrig):"",o.sWidthOrig&&u&&t(_[i]).append(t("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(i=0;i<m.length;i++)r=m[i],o=s[r],t(wt(n,r)).clone(!1).append(o.sContentPadding).appendTo(D);t("[name]",E).removeAttr("name");var A=t("<div/>").css(u||c?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(E).appendTo(b);u&&d?E.width(d):u?(E.css("width","auto"),E.removeAttr("width"),E.width()<b.clientWidth&&w&&E.width(b.clientWidth)):c?E.width(b.clientWidth):w&&E.width(w);var N=0;for(i=0;i<m.length;i++){var k=t(_[i]),R=k.outerWidth()-k.width(),O=C.bBounding?Math.ceil(_[i].getBoundingClientRect().width):k.outerWidth();N+=O,s[m[i]].sWidth=yt(O-R)}a.style.width=yt(N),A.remove()}if(w&&(a.style.width=yt(w)),(w||u)&&!n._reszEvt){var I=function(){t(e).on("resize.DT-"+n.sInstance,ye(function(){p(n)}))};x?setTimeout(I,1e3):I(),n._reszEvt=!0}}function _t(e,i){if(!e)return 0;var o=t("<div/>").css("width",yt(e)).appendTo(i||n.body),r=o[0].offsetWidth;return o.remove(),r}function wt(e,n){var i=bt(e,n);if(i<0)return null;var o=e.aoData[i];return o.nTr?o.anCells[n]:t("<td/>").html(S(e,i,n,"display"))[0]}function bt(t,e){for(var n,i=-1,o=-1,r=0,a=t.aoData.length;r<a;r++)n=S(t,r,e,"display")+"",n=n.replace(be,""),n=n.replace(/ /g," "),n.length>i&&(i=n.length,o=r);return o}function yt(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function Ct(e){var n,o,r,a,s,l,c,u=[],d=e.aoColumns,h=e.aaSortingFixed,p=t.isPlainObject(h),f=[],m=function(e){e.length&&!t.isArray(e[0])?f.push(e):t.merge(f,e)};for(t.isArray(h)&&m(h),p&&h.pre&&m(h.pre),m(e.aaSorting),p&&h.post&&m(h.post),n=0;n<f.length;n++)for(c=f[n][0],a=d[c].aDataSort,o=0,r=a.length;o<r;o++)s=a[o],l=d[s].sType||"string",f[n]._idx===i&&(f[n]._idx=t.inArray(f[n][1],d[s].asSorting)),u.push({src:c,col:s,dir:f[n][1],index:f[n]._idx,type:l,formatter:Gt.ext.type.order[l+"-pre"]});return u}function xt(t){var e,n,i,o,r,a=[],s=Gt.ext.type.order,l=t.aoData,c=(t.aoColumns,0),u=t.aiDisplayMaster;for(_(t),r=Ct(t),e=0,n=r.length;e<n;e++)o=r[e],o.formatter&&c++,At(t,o.col);if("ssp"!=Bt(t)&&0!==r.length){for(e=0,i=u.length;e<i;e++)a[u[e]]=e;c===r.length?u.sort(function(t,e){var n,i,o,s,c,u=r.length,d=l[t]._aSortData,h=l[e]._aSortData;for(o=0;o<u;o++)if(c=r[o],n=d[c.col],i=h[c.col],0!=(s=n<i?-1:n>i?1:0))return"asc"===c.dir?s:-s;return n=a[t],i=a[e],n<i?-1:n>i?1:0}):u.sort(function(t,e){var n,i,o,c,u,d,h=r.length,p=l[t]._aSortData,f=l[e]._aSortData;for(o=0;o<h;o++)if(u=r[o],n=p[u.col],i=f[u.col],d=s[u.type+"-"+u.dir]||s["string-"+u.dir],0!==(c=d(n,i)))return c;return n=a[t],i=a[e],n<i?-1:n>i?1:0})}t.bSorted=!0}function St(t){for(var e,n,i=t.aoColumns,o=Ct(t),r=t.oLanguage.oAria,a=0,s=i.length;a<s;a++){var l=i[a],c=l.asSorting,u=l.sTitle.replace(/<.*?>/g,""),d=l.nTh;d.removeAttribute("aria-sort"),l.bSortable?(o.length>0&&o[0].col==a?(d.setAttribute("aria-sort","asc"==o[0].dir?"ascending":"descending"),n=c[o[0].index+1]||c[0]):n=c[0],e=u+("asc"===n?r.sSortAscending:r.sSortDescending)):e=u,d.setAttribute("aria-label",e)}}function Tt(e,n,o,r){var a,s=e.aoColumns[n],l=e.aaSorting,c=s.asSorting,u=function(e,n){var o=e._idx;return o===i&&(o=t.inArray(e[1],c)),o+1<c.length?o+1:n?null:0};if("number"==typeof l[0]&&(l=e.aaSorting=[l]),o&&e.oFeatures.bSortMulti){var d=t.inArray(n,se(l,"0"));-1!==d?(a=u(l[d],!0),null===a&&1===l.length&&(a=0),null===a?l.splice(d,1):(l[d][1]=c[a],l[d]._idx=a)):(l.push([n,c[0],0]),l[l.length-1]._idx=0)}else l.length&&l[0][0]==n?(a=u(l[0]),l.length=1,l[0][1]=c[a],l[0]._idx=a):(l.length=0,l.push([n,c[0]]),l[0]._idx=0);H(e),"function"==typeof r&&r(e)}function Et(t,e,n,i){var o=t.aoColumns[n];Pt(e,{},function(e){!1!==o.bSortable&&(t.oFeatures.bProcessing?(pt(t,!0),setTimeout(function(){Tt(t,n,e.shiftKey,i),"ssp"!==Bt(t)&&pt(t,!1)},0)):Tt(t,n,e.shiftKey,i))})}function Dt(e){var n,i,o,r=e.aLastSort,a=e.oClasses.sSortColumn,s=Ct(e),l=e.oFeatures;if(l.bSort&&l.bSortClasses){for(n=0,i=r.length;n<i;n++)o=r[n].src,t(se(e.aoData,"anCells",o)).removeClass(a+(n<2?n+1:3));for(n=0,i=s.length;n<i;n++)o=s[n].src,t(se(e.aoData,"anCells",o)).addClass(a+(n<2?n+1:3))}e.aLastSort=s}function At(t,e){var n,i=t.aoColumns[e],o=Gt.ext.order[i.sSortDataType];o&&(n=o.call(t.oInstance,t,e,m(t,e)));for(var r,a,s=Gt.ext.type.order[i.sType+"-pre"],l=0,c=t.aoData.length;l<c;l++)r=t.aoData[l],r._aSortData||(r._aSortData=[]),r._aSortData[e]&&!o||(a=o?n[l]:S(t,l,e,"sort"),r._aSortData[e]=s?s(a):a)}function Nt(e){if(e.oFeatures.bStateSave&&!e.bDestroying){var n={time:+new Date,start:e._iDisplayStart,length:e._iDisplayLength,order:t.extend(!0,[],e.aaSorting),search:et(e.oPreviousSearch),columns:t.map(e.aoColumns,function(t,n){return{visible:t.bVisible,search:et(e.aoPreSearchCols[n])}})};$t(e,"aoStateSaveParams","stateSaveParams",[e,n]),e.oSavedState=n,e.fnStateSaveCallback.call(e.oInstance,e,n)}}function kt(e,n,o){var r,a,s=e.aoColumns,l=function(n){if(!n||!n.time)return void o();var l=$t(e,"aoStateLoadParams","stateLoadParams",[e,n]);if(-1!==t.inArray(!1,l))return void o();var c=e.iStateDuration;if(c>0&&n.time<+new Date-1e3*c)return void o();if(n.columns&&s.length!==n.columns.length)return void o();if(e.oLoadedState=t.extend(!0,{},n),n.start!==i&&(e._iDisplayStart=n.start,e.iInitDisplayStart=n.start),n.length!==i&&(e._iDisplayLength=n.length),n.order!==i&&(e.aaSorting=[],t.each(n.order,function(t,n){e.aaSorting.push(n[0]>=s.length?[0,n[1]]:n)})),n.search!==i&&t.extend(e.oPreviousSearch,nt(n.search)),n.columns)for(r=0,a=n.columns.length;r<a;r++){var u=n.columns[r];u.visible!==i&&(s[r].bVisible=u.visible),u.search!==i&&t.extend(e.aoPreSearchCols[r],nt(u.search))}$t(e,"aoStateLoaded","stateLoaded",[e,n]),o()};if(!e.oFeatures.bStateSave)return void o();var c=e.fnStateLoadCallback.call(e.oInstance,e,l);c!==i&&l(c)}function Rt(e){var n=Gt.settings,i=t.inArray(e,se(n,"nTable"));return-1!==i?n[i]:null}function Ot(t,n,i,o){if(i="DataTables warning: "+(t?"table id="+t.sTableId+" - ":"")+i,o&&(i+=". For more information about this error, please see http://datatables.net/tn/"+o),n)e.console&&console.log&&console.log(i);else{var r=Gt.ext,a=r.sErrMode||r.errMode;if(t&&$t(t,null,"error",[t,o,i]),"alert"==a)alert(i);else{if("throw"==a)throw new Error(i);"function"==typeof a&&a(t,o,i)}}}function It(e,n,o,r){if(t.isArray(o))return void t.each(o,function(i,o){t.isArray(o)?It(e,n,o[0],o[1]):It(e,n,o)});r===i&&(r=o),n[o]!==i&&(e[r]=n[o])}function Lt(e,n,i){var o;for(var r in n)n.hasOwnProperty(r)&&(o=n[r],t.isPlainObject(o)?(t.isPlainObject(e[r])||(e[r]={}),t.extend(!0,e[r],o)):i&&"data"!==r&&"aaData"!==r&&t.isArray(o)?e[r]=o.slice():e[r]=o);return e}function Pt(e,n,i){t(e).on("click.DT",n,function(t){e.blur(),i(t)}).on("keypress.DT",n,function(t){13===t.which&&(t.preventDefault(),i(t))}).on("selectstart.DT",function(){return!1})}function Mt(t,e,n,i){n&&t[e].push({fn:n,sName:i})}function $t(e,n,i,o){var r=[];if(n&&(r=t.map(e[n].slice().reverse(),function(t,n){return t.fn.apply(e.oInstance,o)})),null!==i){var a=t.Event(i+".dt");t(e.nTable).trigger(a,o),r.push(a.result)}return r}function Ft(t){var e=t._iDisplayStart,n=t.fnDisplayEnd(),i=t._iDisplayLength;e>=n&&(e=n-i),e-=e%i,(-1===i||e<0)&&(e=0),t._iDisplayStart=e}function Ht(e,n){var i=e.renderer,o=Gt.ext.renderer[n];return t.isPlainObject(i)&&i[n]?o[i[n]]||o._:"string"==typeof i?o[i]||o._:o._}function Bt(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}function jt(t,e){var n=[],i=je.numbers_length,o=Math.floor(i/2);return e<=i?n=ce(0,e):t<=o?(n=ce(0,i-2),n.push("ellipsis"),n.push(e-1)):t>=e-1-o?(n=ce(e-(i-2),e),n.splice(0,0,"ellipsis"),n.splice(0,0,0)):(n=ce(t-o+2,t+o-1),n.push("ellipsis"),n.push(e-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}function zt(e){t.each({num:function(t){return ze(t,e)},"num-fmt":function(t){return ze(t,e,te)},"html-num":function(t){return ze(t,e,Jt)},"html-num-fmt":function(t){return ze(t,e,Jt,te)}},function(t,n){qt.type.order[t+e+"-pre"]=n,t.match(/^html\-/)&&(qt.type.search[t+e]=qt.type.search.html)})}function Wt(t){return function(){var e=[Rt(this[Gt.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Gt.ext.internal[t].apply(this,e)}}var qt,Ut,Kt,Vt,Gt=function(e){this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new Ut(t?Rt(this[qt.iApiIndex]):this)},this.fnAddData=function(e,n){var o=this.api(!0),r=t.isArray(e)&&(t.isArray(e[0])||t.isPlainObject(e[0]))?o.rows.add(e):o.row.add(e);return(n===i||n)&&o.draw(),r.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),n=e.settings()[0],o=n.oScroll;t===i||t?e.draw(!1):""===o.sX&&""===o.sY||mt(n)},this.fnClearTable=function(t){var e=this.api(!0).clear();(t===i||t)&&e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,n){var o=this.api(!0),r=o.rows(t),a=r.settings()[0],s=a.aoData[r[0][0]];return r.remove(),e&&e.call(this,a,s),(n===i||n)&&o.draw(),s},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,n,o,r,a){var s=this.api(!0);null===e||e===i?s.search(t,n,o,a):s.column(e).search(t,n,o,a),s.draw()},this.fnGetData=function(t,e){var n=this.api(!0);if(t!==i){var o=t.nodeName?t.nodeName.toLowerCase():"";return e!==i||"td"==o||"th"==o?n.cell(t,e).data():n.row(t).data()||null}return n.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==i?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),n=t.nodeName.toUpperCase();if("TR"==n)return e.row(t).index();if("TD"==n||"TH"==n){var i=e.cell(t).index();return[i.row,i.columnVisible,i.column]}return null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,n){return this.api(!0).row(t).child(e,n).show().child()[0]},this.fnPageChange=function(t,e){var n=this.api(!0).page(t);(e===i||e)&&n.draw(!1)},this.fnSetColumnVis=function(t,e,n){var o=this.api(!0).column(t).visible(e);(n===i||n)&&o.columns.adjust().draw()},this.fnSettings=function(){return Rt(this[qt.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,n){this.api(!0).order.listener(t,e,n)},this.fnUpdate=function(t,e,n,o,r){var a=this.api(!0);return n===i||null===n?a.row(e).data(t):a.cell(e,n).data(t),(r===i||r)&&a.columns.adjust(),(o===i||o)&&a.draw(),0},this.fnVersionCheck=qt.fnVersionCheck;var n=this,o=e===i,u=this.length;o&&(e={}),this.oApi=this.internal=qt.internal;for(var p in Gt.ext.internal)p&&(this[p]=Wt(p));return this.each(function(){var p,f={},m=u>1?Lt(f,e,!0):e,g=0,v=this.getAttribute("id"),_=!1,C=Gt.defaults,x=t(this);if("table"!=this.nodeName.toLowerCase())return void Ot(null,0,"Non-table node initialisation ("+this.nodeName+")",2);s(C),l(C.column),r(C,C,!0),r(C.column,C.column,!0),r(C,t.extend(m,x.data()));var S=Gt.settings;for(g=0,p=S.length;g<p;g++){var T=S[g];if(T.nTable==this||T.nTHead.parentNode==this||T.nTFoot&&T.nTFoot.parentNode==this){var E=m.bRetrieve!==i?m.bRetrieve:C.bRetrieve,A=m.bDestroy!==i?m.bDestroy:C.bDestroy;if(o||E)return T.oInstance;if(A){T.oInstance.fnDestroy();break}return void Ot(T,0,"Cannot reinitialise DataTable",3)}if(T.sTableId==this.id){S.splice(g,1);break}}null!==v&&""!==v||(v="DataTables_Table_"+Gt.ext._unique++,this.id=v);var N=t.extend(!0,{},Gt.models.oSettings,{sDestroyWidth:x[0].style.width,sInstance:v,sTableId:v});N.nTable=this,N.oApi=n.internal,N.oInit=m,S.push(N),N.oInstance=1===n.length?n:x.dataTable(),s(m),m.oLanguage&&a(m.oLanguage),m.aLengthMenu&&!m.iDisplayLength&&(m.iDisplayLength=t.isArray(m.aLengthMenu[0])?m.aLengthMenu[0][0]:m.aLengthMenu[0]),m=Lt(t.extend(!0,{},C),m),It(N.oFeatures,m,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),It(N,m,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),It(N.oScroll,m,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),It(N.oLanguage,m,"fnInfoCallback"),Mt(N,"aoDrawCallback",m.fnDrawCallback,"user"),Mt(N,"aoServerParams",m.fnServerParams,"user"),Mt(N,"aoStateSaveParams",m.fnStateSaveParams,"user"),Mt(N,"aoStateLoadParams",m.fnStateLoadParams,"user"),Mt(N,"aoStateLoaded",m.fnStateLoaded,"user"),Mt(N,"aoRowCallback",m.fnRowCallback,"user"),Mt(N,"aoRowCreatedCallback",m.fnCreatedRow,"user"),Mt(N,"aoHeaderCallback",m.fnHeaderCallback,"user"),Mt(N,"aoFooterCallback",m.fnFooterCallback,"user"),Mt(N,"aoInitComplete",m.fnInitComplete,"user"),Mt(N,"aoPreDrawCallback",m.fnPreDrawCallback,"user"),N.rowIdFn=D(m.rowId),c(N);var k=N.oClasses;if(t.extend(k,Gt.ext.classes,m.oClasses),x.addClass(k.sTable),N.iInitDisplayStart===i&&(N.iInitDisplayStart=m.iDisplayStart,N._iDisplayStart=m.iDisplayStart),null!==m.iDeferLoading){N.bDeferLoading=!0;var R=t.isArray(m.iDeferLoading);N._iRecordsDisplay=R?m.iDeferLoading[0]:m.iDeferLoading,N._iRecordsTotal=R?m.iDeferLoading[1]:m.iDeferLoading}var O=N.oLanguage;t.extend(!0,O,m.oLanguage),O.sUrl&&(t.ajax({dataType:"json",url:O.sUrl,success:function(e){a(e),r(C.oLanguage,e),t.extend(!0,O,e),at(N)},error:function(){at(N)}}),_=!0),null===m.asStripeClasses&&(N.asStripeClasses=[k.sStripeOdd,k.sStripeEven]);var I=N.asStripeClasses,L=x.children("tbody").find("tr").eq(0);-1!==t.inArray(!0,t.map(I,function(t,e){return L.hasClass(t)}))&&(t("tbody tr",this).removeClass(I.join(" ")),N.asDestroyStripes=I.slice());var P,M=[],$=this.getElementsByTagName("thead");if(0!==$.length&&(j(N.aoHeader,$[0]),M=z(N)),null===m.aoColumns)for(P=[],g=0,p=M.length;g<p;g++)P.push(null);else P=m.aoColumns;for(g=0,p=P.length;g<p;g++)d(N,M?M[g]:null);if(w(N,m.aoColumnDefs,P,function(t,e){h(N,t,e)}),L.length){var F=function(t,e){return null!==t.getAttribute("data-"+e)?e:null};t(L[0]).children("th, td").each(function(t,e){var n=N.aoColumns[t];if(n.mData===t){var o=F(e,"sort")||F(e,"order"),r=F(e,"filter")||F(e,"search");null===o&&null===r||(n.mData={_:t+".display",sort:null!==o?t+".@data-"+o:i,type:null!==o?t+".@data-"+o:i,filter:null!==r?t+".@data-"+r:i},h(N,t))}})}var H=N.oFeatures,B=function(){if(m.aaSorting===i){var e=N.aaSorting;for(g=0,p=e.length;g<p;g++)e[g][1]=N.aoColumns[g].asSorting[0]}Dt(N),H.bSort&&Mt(N,"aoDrawCallback",function(){if(N.bSorted){var e=Ct(N),n={};t.each(e,function(t,e){n[e.src]=e.dir}),$t(N,null,"order",[N,e,n]),St(N)}}),Mt(N,"aoDrawCallback",function(){(N.bSorted||"ssp"===Bt(N)||H.bDeferRender)&&Dt(N)},"sc");var n=x.children("caption").each(function(){this._captionSide=t(this).css("caption-side")}),o=x.children("thead");0===o.length&&(o=t("<thead/>").appendTo(x)),N.nTHead=o[0];var r=x.children("tbody");0===r.length&&(r=t("<tbody/>").appendTo(x)),N.nTBody=r[0];var a=x.children("tfoot");if(0===a.length&&n.length>0&&(""!==N.oScroll.sX||""!==N.oScroll.sY)&&(a=t("<tfoot/>").appendTo(x)),0===a.length||0===a.children().length?x.addClass(k.sNoFooter):a.length>0&&(N.nTFoot=a[0],j(N.aoFooter,N.nTFoot)),m.aaData)for(g=0;g<m.aaData.length;g++)b(N,m.aaData[g]);else(N.bDeferLoading||"dom"==Bt(N))&&y(N,t(N.nTBody).children("tr"));N.aiDisplay=N.aiDisplayMaster.slice(),N.bInitialised=!0,!1===_&&at(N)};m.bStateSave?(H.bStateSave=!0,Mt(N,"aoDrawCallback",Nt,"state_save"),kt(N,m,B)):B()}),n=null,this},Yt={},Xt=/[\r\n]/g,Jt=/<.*?>/g,Qt=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Zt=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),te=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,ee=function(t){return!t||!0===t||"-"===t},ne=function(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null},ie=function(t,e){return Yt[e]||(Yt[e]=new RegExp(ve(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(Yt[e],"."):t},oe=function(t,e,n){var i="string"==typeof t;return!!ee(t)||(e&&i&&(t=ie(t,e)),n&&i&&(t=t.replace(te,"")),!isNaN(parseFloat(t))&&isFinite(t))},re=function(t){return ee(t)||"string"==typeof t},ae=function(t,e,n){return!!ee(t)||(re(t)?!!oe(de(t),e,n)||null:null)},se=function(t,e,n){var o=[],r=0,a=t.length;if(n!==i)for(;r<a;r++)t[r]&&t[r][e]&&o.push(t[r][e][n]);else for(;r<a;r++)t[r]&&o.push(t[r][e]);return o},le=function(t,e,n,o){var r=[],a=0,s=e.length;if(o!==i)for(;a<s;a++)t[e[a]][n]&&r.push(t[e[a]][n][o]);else for(;a<s;a++)r.push(t[e[a]][n]);return r},ce=function(t,e){var n,o=[];e===i?(e=0,n=t):(n=e,e=t);for(var r=e;r<n;r++)o.push(r);return o},ue=function(t){for(var e=[],n=0,i=t.length;n<i;n++)t[n]&&e.push(t[n]);return e},de=function(t){return t.replace(Jt,"")},he=function(t){if(t.length<2)return!0;for(var e=t.slice().sort(),n=e[0],i=1,o=e.length;i<o;i++){if(e[i]===n)return!1;n=e[i]}return!0},pe=function(t){if(he(t))return t.slice();var e,n,i,o=[],r=t.length,a=0;t:for(n=0;n<r;n++){for(e=t[n],i=0;i<a;i++)if(o[i]===e)continue t;o.push(e),a++}return o};Gt.util={throttle:function(t,e){var n,o,r=e!==i?e:200;return function(){var e=this,a=+new Date,s=arguments;n&&a<n+r?(clearTimeout(o),o=setTimeout(function(){n=i,t.apply(e,s)},r)):(n=a,t.apply(e,s))}},escapeRegex:function(t){return t.replace(Zt,"\\$1")}};var fe=function(t,e,n){t[e]!==i&&(t[n]=t[e])},me=/\[.*?\]$/,ge=/\(\)$/,ve=Gt.util.escapeRegex,_e=t("<div>")[0],we=_e.textContent!==i,be=/<.*?>/g,ye=Gt.util.throttle,Ce=[],xe=Array.prototype,Se=function(e){var n,i,o=Gt.settings,r=t.map(o,function(t,e){return t.nTable});return e?e.nTable&&e.oApi?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?(n=t.inArray(e,r),-1!==n?[o[n]]:null):e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?i=t(e):e instanceof t&&(i=e),i?i.map(function(e){return n=t.inArray(this,r),-1!==n?o[n]:null}).toArray():void 0):[]};Ut=function(e,n){if(!(this instanceof Ut))return new Ut(e,n);var i=[],o=function(t){var e=Se(t);e&&(i=i.concat(e))};if(t.isArray(e))for(var r=0,a=e.length;r<a;r++)o(e[r]);else o(e);this.context=pe(i),n&&t.merge(this,n),this.selector={rows:null,cols:null,opts:null},Ut.extend(this,this,Ce)},Gt.Api=Ut,t.extend(Ut.prototype,{any:function(){return 0!==this.count()},concat:xe.concat,context:[],count:function(){return this.flatten().length},each:function(t){for(var e=0,n=this.length;e<n;e++)t.call(this,this[e],e,this);return this},eq:function(t){var e=this.context;return e.length>t?new Ut(e[t],this[t]):null},filter:function(t){var e=[];if(xe.filter)e=xe.filter.call(this,t,this);else for(var n=0,i=this.length;n<i;n++)t.call(this,this[n],n,this)&&e.push(this[n]);return new Ut(this.context,e)},flatten:function(){var t=[];return new Ut(this.context,t.concat.apply(t,this.toArray()))},join:xe.join,indexOf:xe.indexOf||function(t,e){for(var n=e||0,i=this.length;n<i;n++)if(this[n]===t)return n;return-1},iterator:function(t,e,n,o){var r,a,s,l,c,u,d,h,p=[],f=this.context,m=this.selector;for("string"==typeof t&&(o=n,n=e,e=t,t=!1),a=0,s=f.length;a<s;a++){var g=new Ut(f[a]);if("table"===e)(r=n.call(g,f[a],a))!==i&&p.push(r);else if("columns"===e||"rows"===e)(r=n.call(g,f[a],this[a],a))!==i&&p.push(r);else if("column"===e||"column-rows"===e||"row"===e||"cell"===e)for(d=this[a],"column-rows"===e&&(u=ke(f[a],m.opts)),l=0,c=d.length;l<c;l++)h=d[l],(r="cell"===e?n.call(g,f[a],h.row,h.column,a,l):n.call(g,f[a],h,a,l,u))!==i&&p.push(r)}if(p.length||o){var v=new Ut(f,t?p.concat.apply([],p):p),_=v.selector;return _.rows=m.rows,_.cols=m.cols,_.opts=m.opts,v}return this},lastIndexOf:xe.lastIndexOf||function(t,e){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(t){var e=[];if(xe.map)e=xe.map.call(this,t,this);else for(var n=0,i=this.length;n<i;n++)e.push(t.call(this,this[n],n));return new Ut(this.context,e)},pluck:function(t){return this.map(function(e){return e[t]})},pop:xe.pop,push:xe.push,reduce:xe.reduce||function(t,e){return u(this,t,e,0,this.length,1)},reduceRight:xe.reduceRight||function(t,e){return u(this,t,e,this.length-1,-1,-1)},reverse:xe.reverse,selector:null,shift:xe.shift,slice:function(){return new Ut(this.context,this)},sort:xe.sort,splice:xe.splice,toArray:function(){return xe.slice.call(this)},to$:function(){return t(this)},toJQuery:function(){return t(this)},unique:function(){return new Ut(this.context,pe(this))},unshift:xe.unshift}),Ut.extend=function(e,n,i){if(i.length&&n&&(n instanceof Ut||n.__dt_wrapper)){var o,r,a;for(o=0,r=i.length;o<r;o++)a=i[o],n[a.name]="function"==typeof a.val?function(t,e,n){return function(){var i=e.apply(t,arguments);return Ut.extend(i,i,n.methodExt),i}}(e,a.val,a):t.isPlainObject(a.val)?{}:a.val,n[a.name].__dt_wrapper=!0,Ut.extend(e,n[a.name],a.propExt)}},Ut.register=Kt=function(e,n){if(t.isArray(e))for(var i=0,o=e.length;i<o;i++)Ut.register(e[i],n);else{var r,a,s,l,c=e.split("."),u=Ce;for(r=0,a=c.length;r<a;r++){l=-1!==c[r].indexOf("()"),s=l?c[r].replace("()",""):c[r];var d=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n].name===e)return t[n];return null}(u,s);d||(d={name:s,val:{},methodExt:[],propExt:[]},u.push(d)),r===a-1?d.val=n:u=l?d.methodExt:d.propExt}}},Ut.registerPlural=Vt=function(e,n,o){Ut.register(e,o),Ut.register(n,function(){var e=o.apply(this,arguments);return e===this?this:e instanceof Ut?e.length?t.isArray(e[0])?new Ut(e.context,e[0]):e[0]:i:e})};var Te=function(e,n){if("number"==typeof e)return[n[e]];var i=t.map(n,function(t,e){return t.nTable});return t(i).filter(e).map(function(e){var o=t.inArray(this,i);return n[o]}).toArray()};Kt("tables()",function(t){return t?new Ut(Te(t,this.context)):this}),Kt("table()",function(t){var e=this.tables(t),n=e.context;return n.length?new Ut(n[0]):e}),Vt("tables().nodes()","table().node()",function(){return this.iterator("table",function(t){return t.nTable},1)}),Vt("tables().body()","table().body()",function(){return this.iterator("table",function(t){return t.nTBody},1)}),Vt("tables().header()","table().header()",function(){return this.iterator("table",function(t){return t.nTHead},1)}),Vt("tables().footer()","table().footer()",function(){return this.iterator("table",function(t){return t.nTFoot},1)}),Vt("tables().containers()","table().container()",function(){return this.iterator("table",function(t){return t.nTableWrapper},1)}),Kt("draw()",function(t){return this.iterator("table",function(e){"page"===t?F(e):("string"==typeof t&&(t="full-hold"!==t),H(e,!1===t))})}),Kt("page()",function(t){return t===i?this.page.info().page:this.iterator("table",function(e){dt(e,t)})}),Kt("page.info()",function(t){if(0===this.context.length)return i;var e=this.context[0],n=e._iDisplayStart,o=e.oFeatures.bPaginate?e._iDisplayLength:-1,r=e.fnRecordsDisplay(),a=-1===o;return{page:a?0:Math.floor(n/o),pages:a?1:Math.ceil(r/o),start:n,end:e.fnDisplayEnd(),length:o,recordsTotal:e.fnRecordsTotal(),recordsDisplay:r,serverSide:"ssp"===Bt(e)}}),Kt("page.len()",function(t){return t===i?0!==this.context.length?this.context[0]._iDisplayLength:i:this.iterator("table",function(e){lt(e,t)})});var Ee=function(t,e,n){if(n){var i=new Ut(t);i.one("draw",function(){n(i.ajax.json())})}if("ssp"==Bt(t))H(t,e);else{pt(t,!0);var o=t.jqXHR;o&&4!==o.readyState&&o.abort(),W(t,[],function(n){k(t);for(var i=V(t,n),o=0,r=i.length;o<r;o++)b(t,i[o]);H(t,e),pt(t,!1)})}};Kt("ajax.json()",function(){var t=this.context;if(t.length>0)return t[0].json}),Kt("ajax.params()",function(){var t=this.context;if(t.length>0)return t[0].oAjaxData}),Kt("ajax.reload()",function(t,e){return this.iterator("table",function(n){Ee(n,!1===e,t)})}),Kt("ajax.url()",function(e){var n=this.context;return e===i?0===n.length?i:(n=n[0],n.ajax?t.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource):this.iterator("table",function(n){t.isPlainObject(n.ajax)?n.ajax.url=e:n.ajax=e})}),Kt("ajax.url().load()",function(t,e){return this.iterator("table",function(n){Ee(n,!1===e,t)})});var De=function(e,n,o,r,a){var s,l,c,u,d,h,p=[],f=typeof n;for(n&&"string"!==f&&"function"!==f&&n.length!==i||(n=[n]),c=0,u=n.length;c<u;c++)for(l=n[c]&&n[c].split&&!n[c].match(/[\[\(:]/)?n[c].split(","):[n[c]],d=0,h=l.length;d<h;d++)(s=o("string"==typeof l[d]?t.trim(l[d]):l[d]))&&s.length&&(p=p.concat(s));var m=qt.selector[e];if(m.length)for(c=0,u=m.length;c<u;c++)p=m[c](r,a,p);return pe(p)},Ae=function(e){return e||(e={}),e.filter&&e.search===i&&(e.search=e.filter),t.extend({search:"none",order:"current",page:"all"},e)},Ne=function(t){for(var e=0,n=t.length;e<n;e++)if(t[e].length>0)return t[0]=t[e],t[0].length=1,t.length=1,t.context=[t.context[e]],t;return t.length=0,t},ke=function(e,n){var i,o,r,a=[],s=e.aiDisplay,l=e.aiDisplayMaster,c=n.search,u=n.order,d=n.page;if("ssp"==Bt(e))return"removed"===c?[]:ce(0,l.length);if("current"==d)for(i=e._iDisplayStart,o=e.fnDisplayEnd();i<o;i++)a.push(s[i]);else if("current"==u||"applied"==u)a="none"==c?l.slice():"applied"==c?s.slice():t.map(l,function(e,n){return-1===t.inArray(e,s)?e:null});else if("index"==u||"original"==u)for(i=0,o=e.aoData.length;i<o;i++)"none"==c?a.push(i):(-1===(r=t.inArray(i,s))&&"removed"==c||r>=0&&"applied"==c)&&a.push(i);return a},Re=function(e,n,o){var r;return De("row",n,function(n){var a=ne(n);if(null!==a&&!o)return[a];if(r||(r=ke(e,o)),null!==a&&-1!==t.inArray(a,r))return[a];if(null===n||n===i||""===n)return r;if("function"==typeof n)return t.map(r,function(t){var i=e.aoData[t];return n(t,i._aData,i.nTr)?t:null});var s=ue(le(e.aoData,r,"nTr"));if(n.nodeName){if(n._DT_RowIndex!==i)return[n._DT_RowIndex];if(n._DT_CellIndex)return[n._DT_CellIndex.row];var l=t(n).closest("*[data-dt-row]");return l.length?[l.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var c=e.aIds[n.replace(/^#/,"")];if(c!==i)return[c.idx]}return t(s).filter(n).map(function(){return this._DT_RowIndex}).toArray()},e,o)};Kt("rows()",function(e,n){e===i?e="":t.isPlainObject(e)&&(n=e,e=""),n=Ae(n);var o=this.iterator("table",function(t){return Re(t,e,n)},1);return o.selector.rows=e,o.selector.opts=n,o}),Kt("rows().nodes()",function(){return this.iterator("row",function(t,e){return t.aoData[e].nTr||i},1)}),Kt("rows().data()",function(){return this.iterator(!0,"rows",function(t,e){return le(t.aoData,e,"_aData")},1)}),Vt("rows().cache()","row().cache()",function(t){return this.iterator("row",function(e,n){var i=e.aoData[n];return"search"===t?i._aFilterData:i._aSortData},1)}),Vt("rows().invalidate()","row().invalidate()",function(t){return this.iterator("row",function(e,n){O(e,n,t)})}),Vt("rows().indexes()","row().index()",function(){return this.iterator("row",function(t,e){return e},1)}),Vt("rows().ids()","row().id()",function(t){for(var e=[],n=this.context,i=0,o=n.length;i<o;i++)for(var r=0,a=this[i].length;r<a;r++){var s=n[i].rowIdFn(n[i].aoData[this[i][r]]._aData);e.push((!0===t?"#":"")+s)}return new Ut(n,e)}),Vt("rows().remove()","row().remove()",function(){var t=this;return this.iterator("row",function(e,n,o){var r,a,s,l,c,u,d=e.aoData,h=d[n];for(d.splice(n,1),r=0,a=d.length;r<a;r++)if(c=d[r],u=c.anCells,null!==c.nTr&&(c.nTr._DT_RowIndex=r),null!==u)for(s=0,l=u.length;s<l;s++)u[s]._DT_CellIndex.row=r;R(e.aiDisplayMaster,n),R(e.aiDisplay,n),R(t[o],n,!1),e._iRecordsDisplay>0&&e._iRecordsDisplay--,Ft(e);var p=e.rowIdFn(h._aData);p!==i&&delete e.aIds[p]}),this.iterator("table",function(t){for(var e=0,n=t.aoData.length;e<n;e++)t.aoData[e].idx=e}),this}),Kt("rows.add()",function(e){var n=this.iterator("table",function(t){var n,i,o,r=[];for(i=0,o=e.length;i<o;i++)n=e[i],n.nodeName&&"TR"===n.nodeName.toUpperCase()?r.push(y(t,n)[0]):r.push(b(t,n));return r},1),i=this.rows(-1);return i.pop(),t.merge(i,n),i}),Kt("row()",function(t,e){return Ne(this.rows(t,e))}),Kt("row().data()",function(t){var e=this.context;return t===i?e.length&&this.length?e[0].aoData[this[0]]._aData:i:(e[0].aoData[this[0]]._aData=t,O(e[0],this[0],"data"),this)}),Kt("row().node()",function(){var t=this.context;return t.length&&this.length?t[0].aoData[this[0]].nTr||null:null}),Kt("row.add()",function(e){e instanceof t&&e.length&&(e=e[0]);var n=this.iterator("table",function(t){return e.nodeName&&"TR"===e.nodeName.toUpperCase()?y(t,e)[0]:b(t,e)});return this.row(n[0])});var Oe=function(e,n,i,o){var r=[],a=function(n,i){if(t.isArray(n)||n instanceof t)for(var o=0,s=n.length;o<s;o++)a(n[o],i);else if(n.nodeName&&"tr"===n.nodeName.toLowerCase())r.push(n);else{var l=t("<tr><td/></tr>").addClass(i);t("td",l).addClass(i).html(n)[0].colSpan=g(e),r.push(l[0])}};a(i,o),n._details&&n._details.detach(),n._details=t(r),n._detailsShow&&n._details.insertAfter(n.nTr)},Ie=function(t,e){var n=t.context;if(n.length){var o=n[0].aoData[e!==i?e:t[0]];o&&o._details&&(o._details.remove(),o._detailsShow=i,o._details=i)}},Le=function(t,e){var n=t.context;if(n.length&&t.length){var i=n[0].aoData[t[0]];i._details&&(i._detailsShow=e,e?i._details.insertAfter(i.nTr):i._details.detach(),Pe(n[0]))}},Pe=function(t){var e=new Ut(t),n=t.aoData;e.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"),se(n,"_details").length>0&&(e.on("draw.dt.DT_details",function(i,o){t===o&&e.rows({page:"current"}).eq(0).each(function(t){var e=n[t];e._detailsShow&&e._details.insertAfter(e.nTr)})}),e.on("column-visibility.dt.DT_details",function(e,i,o,r){if(t===i)for(var a,s=g(i),l=0,c=n.length;l<c;l++)a=n[l],a._details&&a._details.children("td[colspan]").attr("colspan",s)}),e.on("destroy.dt.DT_details",function(i,o){if(t===o)for(var r=0,a=n.length;r<a;r++)n[r]._details&&Ie(e,r)}))};Kt("row().child()",function(t,e){var n=this.context;return t===i?n.length&&this.length?n[0].aoData[this[0]]._details:i:(!0===t?this.child.show():!1===t?Ie(this):n.length&&this.length&&Oe(n[0],n[0].aoData[this[0]],t,e),this)}),Kt(["row().child.show()","row().child().show()"],function(t){return Le(this,!0),this}),Kt(["row().child.hide()","row().child().hide()"],function(){return Le(this,!1),this}),Kt(["row().child.remove()","row().child().remove()"],function(){return Ie(this),this}),Kt("row().child.isShown()",function(){var t=this.context;return!(!t.length||!this.length)&&(t[0].aoData[this[0]]._detailsShow||!1)});var Me=/^([^:]+):(name|visIdx|visible)$/,$e=function(t,e,n,i,o){for(var r=[],a=0,s=o.length;a<s;a++)r.push(S(t,o[a],e));return r},Fe=function(e,n,i){var o=e.aoColumns,r=se(o,"sName"),a=se(o,"nTh");return De("column",n,function(n){var s=ne(n);if(""===n)return ce(o.length);if(null!==s)return[s>=0?s:o.length+s];if("function"==typeof n){var l=ke(e,i);return t.map(o,function(t,i){return n(i,$e(e,i,0,0,l),a[i])?i:null})}var c="string"==typeof n?n.match(Me):"";if(c)switch(c[2]){case"visIdx":case"visible":var u=parseInt(c[1],10);if(u<0){var d=t.map(o,function(t,e){return t.bVisible?e:null});return[d[d.length+u]]}return[f(e,u)];case"name":return t.map(r,function(t,e){return t===c[1]?e:null});default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var h=t(a).filter(n).map(function(){return t.inArray(this,a)}).toArray();if(h.length||!n.nodeName)return h;var p=t(n).closest("*[data-dt-column]");return p.length?[p.data("dt-column")]:[]},e,i)},He=function(e,n,o){var r,a,s,l,c=e.aoColumns,u=c[n],d=e.aoData;if(o===i)return u.bVisible;if(u.bVisible!==o){if(o){var h=t.inArray(!0,se(c,"bVisible"),n+1);for(a=0,s=d.length;a<s;a++)l=d[a].nTr,r=d[a].anCells,l&&l.insertBefore(r[n],r[h]||null)}else t(se(e.aoData,"anCells",n)).detach();u.bVisible=o,$(e,e.aoHeader),$(e,e.aoFooter),Nt(e)}};Kt("columns()",function(e,n){e===i?e="":t.isPlainObject(e)&&(n=e,e=""),n=Ae(n);var o=this.iterator("table",function(t){return Fe(t,e,n)},1);return o.selector.cols=e,o.selector.opts=n,o}),Vt("columns().header()","column().header()",function(t,e){return this.iterator("column",function(t,e){return t.aoColumns[e].nTh},1)}),Vt("columns().footer()","column().footer()",function(t,e){return this.iterator("column",function(t,e){return t.aoColumns[e].nTf},1)}),Vt("columns().data()","column().data()",function(){return this.iterator("column-rows",$e,1)}),Vt("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(t,e){return t.aoColumns[e].mData},1)}),Vt("columns().cache()","column().cache()",function(t){return this.iterator("column-rows",function(e,n,i,o,r){return le(e.aoData,r,"search"===t?"_aFilterData":"_aSortData",n)},1)}),Vt("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(t,e,n,i,o){return le(t.aoData,o,"anCells",e)},1)}),Vt("columns().visible()","column().visible()",function(t,e){var n=this.iterator("column",function(e,n){if(t===i)return e.aoColumns[n].bVisible;He(e,n,t)});return t!==i&&(this.iterator("column",function(n,i){$t(n,null,"column-visibility",[n,i,t,e])}),(e===i||e)&&this.columns.adjust()),n}),Vt("columns().indexes()","column().index()",function(t){return this.iterator("column",function(e,n){return"visible"===t?m(e,n):n},1)}),Kt("columns.adjust()",function(){return this.iterator("table",function(t){p(t)},1)}),Kt("column.index()",function(t,e){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===t||"toData"===t)return f(n,e);if("fromData"===t||"toVisible"===t)return m(n,e)}}),Kt("column()",function(t,e){return Ne(this.columns(t,e))});var Be=function(e,n,o){var r,a,s,l,c,u,d,h=e.aoData,p=ke(e,o),f=ue(le(h,p,"anCells")),m=t([].concat.apply([],f)),g=e.aoColumns.length;return De("cell",n,function(n){var o="function"==typeof n;if(null===n||n===i||o){for(a=[],s=0,l=p.length;s<l;s++)for(r=p[s],c=0;c<g;c++)u={row:r,column:c},o?(d=h[r],n(u,S(e,r,c),d.anCells?d.anCells[c]:null)&&a.push(u)):a.push(u);return a}if(t.isPlainObject(n))return[n];var f=m.filter(n).map(function(t,e){return{row:e._DT_CellIndex.row,column:e._DT_CellIndex.column}}).toArray();return f.length||!n.nodeName?f:(d=t(n).closest("*[data-dt-row]"),d.length?[{row:d.data("dt-row"),column:d.data("dt-column")}]:[])},e,o)};Kt("cells()",function(e,n,o){if(t.isPlainObject(e)&&(e.row===i?(o=e,e=null):(o=n,n=null)),t.isPlainObject(n)&&(o=n,n=null),null===n||n===i)return this.iterator("table",function(t){return Be(t,e,Ae(o))});var r,a,s,l,c,u=this.columns(n,o),d=this.rows(e,o),h=this.iterator("table",function(t,e){for(r=[],a=0,s=d[e].length;a<s;a++)for(l=0,c=u[e].length;l<c;l++)r.push({row:d[e][a],column:u[e][l]});return r},1);return t.extend(h.selector,{cols:n,rows:e,opts:o}),h}),Vt("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(t,e,n){var o=t.aoData[e];return o&&o.anCells?o.anCells[n]:i},1)}),Kt("cells().data()",function(){return this.iterator("cell",function(t,e,n){return S(t,e,n)},1)}),Vt("cells().cache()","cell().cache()",function(t){return t="search"===t?"_aFilterData":"_aSortData",this.iterator("cell",function(e,n,i){return e.aoData[n][t][i]},1)}),Vt("cells().render()","cell().render()",function(t){return this.iterator("cell",function(e,n,i){return S(e,n,i,t)},1)}),Vt("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(t,e,n){return{row:e,column:n,columnVisible:m(t,n)}},1)}),Vt("cells().invalidate()","cell().invalidate()",function(t){return this.iterator("cell",function(e,n,i){O(e,n,t,i)})}),Kt("cell()",function(t,e,n){return Ne(this.cells(t,e,n))}),Kt("cell().data()",function(t){var e=this.context,n=this[0];return t===i?e.length&&n.length?S(e[0],n[0].row,n[0].column):i:(T(e[0],n[0].row,n[0].column,t),O(e[0],n[0].row,"data",n[0].column),this)}),Kt("order()",function(e,n){var o=this.context;return e===i?0!==o.length?o[0].aaSorting:i:("number"==typeof e?e=[[e,n]]:e.length&&!t.isArray(e[0])&&(e=Array.prototype.slice.call(arguments)),this.iterator("table",function(t){t.aaSorting=e.slice()}))}),Kt("order.listener()",function(t,e,n){return this.iterator("table",function(i){Et(i,t,e,n)})}),Kt("order.fixed()",function(e){if(!e){var n=this.context,o=n.length?n[0].aaSortingFixed:i;return t.isArray(o)?{pre:o}:o}return this.iterator("table",function(n){n.aaSortingFixed=t.extend(!0,{},e)})}),Kt(["columns().order()","column().order()"],function(e){var n=this;return this.iterator("table",function(i,o){var r=[];t.each(n[o],function(t,n){r.push([n,e])}),i.aaSorting=r})}),Kt("search()",function(e,n,o,r){var a=this.context;return e===i?0!==a.length?a[0].oPreviousSearch.sSearch:i:this.iterator("table",function(i){i.oFeatures.bFilter&&Y(i,t.extend({},i.oPreviousSearch,{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===o||o,bCaseInsensitive:null===r||r}),1)})}),Vt("columns().search()","column().search()",function(e,n,o,r){return this.iterator("column",function(a,s){var l=a.aoPreSearchCols;if(e===i)return l[s].sSearch;a.oFeatures.bFilter&&(t.extend(l[s],{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===o||o,bCaseInsensitive:null===r||r}),Y(a,a.oPreviousSearch,1))})}),Kt("state()",function(){return this.context.length?this.context[0].oSavedState:null}),Kt("state.clear()",function(){return this.iterator("table",function(t){t.fnStateSaveCallback.call(t.oInstance,t,{})})}),Kt("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),Kt("state.save()",function(){return this.iterator("table",function(t){Nt(t)})}),Gt.versionCheck=Gt.fnVersionCheck=function(t){for(var e,n,i=Gt.version.split("."),o=t.split("."),r=0,a=o.length;r<a;r++)if(e=parseInt(i[r],10)||0,n=parseInt(o[r],10)||0,e!==n)return e>n;return!0},Gt.isDataTable=Gt.fnIsDataTable=function(e){var n=t(e).get(0),i=!1;return e instanceof Gt.Api||(t.each(Gt.settings,function(e,o){var r=o.nScrollHead?t("table",o.nScrollHead)[0]:null,a=o.nScrollFoot?t("table",o.nScrollFoot)[0]:null;o.nTable!==n&&r!==n&&a!==n||(i=!0)}),i)},Gt.tables=Gt.fnTables=function(e){var n=!1;t.isPlainObject(e)&&(n=e.api,e=e.visible);var i=t.map(Gt.settings,function(n){if(!e||e&&t(n.nTable).is(":visible"))return n.nTable});return n?new Ut(i):i},Gt.camelToHungarian=r,Kt("$()",function(e,n){var i=this.rows(n).nodes(),o=t(i);return t([].concat(o.filter(e).toArray(),o.find(e).toArray()))}),t.each(["on","one","off"],function(e,n){Kt(n+"()",function(){var e=Array.prototype.slice.call(arguments);e[0]=t.map(e[0].split(/\s/),function(t){return t.match(/\.dt\b/)?t:t+".dt"}).join(" ");var i=t(this.tables().nodes());return i[n].apply(i,e),this})}),Kt("clear()",function(){return this.iterator("table",function(t){k(t)})}),Kt("settings()",function(){return new Ut(this.context,this.context)}),Kt("init()",function(){var t=this.context;return t.length?t[0].oInit:null}),Kt("data()",function(){return this.iterator("table",function(t){return se(t.aoData,"_aData")}).flatten()}),Kt("destroy()",function(n){return n=n||!1,this.iterator("table",function(i){var o,r=i.nTableWrapper.parentNode,a=i.oClasses,s=i.nTable,l=i.nTBody,c=i.nTHead,u=i.nTFoot,d=t(s),h=t(l),p=t(i.nTableWrapper),f=t.map(i.aoData,function(t){return t.nTr});i.bDestroying=!0,$t(i,"aoDestroyCallback","destroy",[i]),n||new Ut(i).columns().visible(!0),p.off(".DT").find(":not(tbody *)").off(".DT"),t(e).off(".DT-"+i.sInstance),s!=c.parentNode&&(d.children("thead").detach(),d.append(c)),u&&s!=u.parentNode&&(d.children("tfoot").detach(),d.append(u)),i.aaSorting=[],i.aaSortingFixed=[],Dt(i),t(f).removeClass(i.asStripeClasses.join(" ")),t("th, td",c).removeClass(a.sSortable+" "+a.sSortableAsc+" "+a.sSortableDesc+" "+a.sSortableNone),h.children().detach(),h.append(f);var m=n?"remove":"detach";d[m](),p[m](),!n&&r&&(r.insertBefore(s,i.nTableReinsertBefore),d.css("width",i.sDestroyWidth).removeClass(a.sTable),(o=i.asDestroyStripes.length)&&h.children().each(function(e){t(this).addClass(i.asDestroyStripes[e%o])}));var g=t.inArray(i,Gt.settings);-1!==g&&Gt.settings.splice(g,1)})}),t.each(["column","row","cell"],function(t,e){Kt(e+"s().every()",function(t){var n=this.selector.opts,o=this;return this.iterator(e,function(r,a,s,l,c){t.call(o[e](a,"cell"===e?s:n,"cell"===e?n:i),a,s,l,c)})})}),Kt("i18n()",function(e,n,o){var r=this.context[0],a=D(e)(r.oLanguage);return a===i&&(a=n),o!==i&&t.isPlainObject(a)&&(a=a[o]!==i?a[o]:a._),a.replace("%d",o)}),Gt.version="1.10.16",Gt.settings=[],Gt.models={},Gt.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},Gt.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},Gt.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},Gt.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch(t){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,e){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(e))}catch(t){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:t.extend({},Gt.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},o(Gt.defaults),Gt.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},o(Gt.defaults.column),Gt.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:i,oAjaxData:i,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Bt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Bt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,e=this._iDisplayStart,n=e+t,i=this.aiDisplay.length,o=this.oFeatures,r=o.bPaginate;return o.bServerSide?!1===r||-1===t?e+i:Math.min(e+t,this._iRecordsDisplay):!r||n>i||-1===t?i:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},Gt.ext=qt={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Gt.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Gt.version},t.extend(qt,{afnFiltering:qt.search,aTypes:qt.type.detect,ofnSearch:qt.type.search,oSort:qt.type.order,afnSortData:qt.order,aoFeatures:qt.feature,oApi:qt.internal,oStdClasses:qt.classes,oPagination:qt.pager}),t.extend(Gt.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var je=Gt.ext.pager;t.extend(je,{simple:function(t,e){return["previous","next"]},full:function(t,e){return["first","previous","next","last"]},numbers:function(t,e){return[jt(t,e)]},simple_numbers:function(t,e){return["previous",jt(t,e),"next"]},full_numbers:function(t,e){return["first","previous",jt(t,e),"next","last"]},first_last_numbers:function(t,e){return["first",jt(t,e),"last"]},_numbers:jt,numbers_length:7}),t.extend(!0,Gt.ext.renderer,{pageButton:{_:function(e,o,r,a,s,l){var c,u,d,h=e.oClasses,p=e.oLanguage.oPaginate,f=e.oLanguage.oAria.paginate||{},m=0,g=function(n,i){var o,a,d,v,_=function(t){dt(e,t.data.action,!0)};for(o=0,a=i.length;o<a;o++)if(v=i[o],t.isArray(v)){var w=t("<"+(v.DT_el||"div")+"/>").appendTo(n);g(w,v)}else{switch(c=null,u="",v){case"ellipsis":n.append('<span class="ellipsis">…</span>');break;case"first":c=p.sFirst,u=v+(s>0?"":" "+h.sPageButtonDisabled);break;case"previous":c=p.sPrevious,u=v+(s>0?"":" "+h.sPageButtonDisabled);break;case"next":c=p.sNext,u=v+(s<l-1?"":" "+h.sPageButtonDisabled);break;case"last":c=p.sLast,u=v+(s<l-1?"":" "+h.sPageButtonDisabled);break;default:c=v+1,u=s===v?h.sPageButtonActive:""}null!==c&&(d=t("<a>",{class:h.sPageButton+" "+u,"aria-controls":e.sTableId,"aria-label":f[v],"data-dt-idx":m,tabindex:e.iTabIndex,id:0===r&&"string"==typeof v?e.sTableId+"_"+v:null}).html(c).appendTo(n),Pt(d,{action:v},_),m++)}};try{d=t(o).find(n.activeElement).data("dt-idx")}catch(t){}g(t(o).empty(),a),d!==i&&t(o).find("[data-dt-idx="+d+"]").focus()}}}),t.extend(Gt.ext.type.detect,[function(t,e){var n=e.oLanguage.sDecimal;return oe(t,n)?"num"+n:null},function(t,e){if(t&&!(t instanceof Date)&&!Qt.test(t))return null;var n=Date.parse(t);return null!==n&&!isNaN(n)||ee(t)?"date":null},function(t,e){var n=e.oLanguage.sDecimal;return oe(t,n,!0)?"num-fmt"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return ae(t,n)?"html-num"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return ae(t,n,!0)?"html-num-fmt"+n:null},function(t,e){return ee(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),t.extend(Gt.ext.type.search,{html:function(t){return ee(t)?t:"string"==typeof t?t.replace(Xt," ").replace(Jt,""):""},string:function(t){return ee(t)?t:"string"==typeof t?t.replace(Xt," "):t}});var ze=function(t,e,n,i){return 0===t||t&&"-"!==t?(e&&(t=ie(t,e)),t.replace&&(n&&(t=t.replace(n,"")),i&&(t=t.replace(i,""))),1*t):-1/0};t.extend(qt.type.order,{"date-pre":function(t){return Date.parse(t)||-1/0},"html-pre":function(t){return ee(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return ee(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,e){return t<e?-1:t>e?1:0},"string-desc":function(t,e){return t<e?1:t>e?-1:0}}),zt(""),t.extend(!0,Gt.ext.renderer,{header:{_:function(e,n,i,o){t(e.nTable).on("order.dt.DT",function(t,r,a,s){if(e===r){var l=i.idx;n.removeClass(i.sSortingClass+" "+o.sSortAsc+" "+o.sSortDesc).addClass("asc"==s[l]?o.sSortAsc:"desc"==s[l]?o.sSortDesc:i.sSortingClass)}})},jqueryui:function(e,n,i,o){t("<div/>").addClass(o.sSortJUIWrapper).append(n.contents()).append(t("<span/>").addClass(o.sSortIcon+" "+i.sSortingClassJUI)).appendTo(n),t(e.nTable).on("order.dt.DT",function(t,r,a,s){if(e===r){var l=i.idx;n.removeClass(o.sSortAsc+" "+o.sSortDesc).addClass("asc"==s[l]?o.sSortAsc:"desc"==s[l]?o.sSortDesc:i.sSortingClass),n.find("span."+o.sSortIcon).removeClass(o.sSortJUIAsc+" "+o.sSortJUIDesc+" "+o.sSortJUI+" "+o.sSortJUIAscAllowed+" "+o.sSortJUIDescAllowed).addClass("asc"==s[l]?o.sSortJUIAsc:"desc"==s[l]?o.sSortJUIDesc:i.sSortingClassJUI)}})}}});var We=function(t){return"string"==typeof t?t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):t};return Gt.render={number:function(t,e,n,i,o){return{display:function(r){if("number"!=typeof r&&"string"!=typeof r)return r;var a=r<0?"-":"",s=parseFloat(r);if(isNaN(s))return We(r);s=s.toFixed(n),r=Math.abs(s);var l=parseInt(r,10),c=n?e+(r-l).toFixed(n).substring(2):"";return a+(i||"")+l.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+c+(o||"")}}},text:function(){return{display:We}}},t.extend(Gt.ext.internal,{_fnExternApiFunc:Wt,_fnBuildAjax:W,_fnAjaxUpdate:q,_fnAjaxParameters:U,_fnAjaxUpdateDraw:K,_fnAjaxDataSrc:V,_fnAddColumn:d,_fnColumnOptions:h,_fnAdjustColumnSizing:p,_fnVisibleToColumnIndex:f,_fnColumnIndexToVisible:m,_fnVisbleColumns:g,_fnGetColumns:v,_fnColumnTypes:_,_fnApplyColumnDefs:w,_fnHungarianMap:o,_fnCamelToHungarian:r,_fnLanguageCompat:a,_fnBrowserDetect:c,_fnAddData:b,_fnAddTr:y,_fnNodeToDataIndex:C,_fnNodeToColumnIndex:x,_fnGetCellData:S,_fnSetCellData:T,_fnSplitObjNotation:E,_fnGetObjectDataFn:D,_fnSetObjectDataFn:A,_fnGetDataMaster:N,_fnClearTable:k,_fnDeleteIndex:R,_fnInvalidate:O,_fnGetRowElements:I,_fnCreateTr:L,_fnBuildHead:M,_fnDrawHead:$,_fnDraw:F,_fnReDraw:H,_fnAddOptionsHtml:B,_fnDetectHeader:j,_fnGetUniqueThs:z,_fnFeatureHtmlFilter:G,_fnFilterComplete:Y,_fnFilterCustom:X,_fnFilterColumn:J,_fnFilter:Q,_fnFilterCreateSearch:Z,_fnEscapeRegex:ve,_fnFilterData:tt,_fnFeatureHtmlInfo:it,_fnUpdateInfo:ot,_fnInfoMacros:rt,_fnInitialise:at,_fnInitComplete:st,_fnLengthChange:lt,_fnFeatureHtmlLength:ct,_fnFeatureHtmlPaginate:ut,_fnPageChange:dt,_fnFeatureHtmlProcessing:ht,_fnProcessingDisplay:pt,_fnFeatureHtmlTable:ft,_fnScrollDraw:mt,_fnApplyToChildren:gt,_fnCalculateColumnWidths:vt,_fnThrottle:ye,_fnConvertToWidth:_t,_fnGetWidestNode:wt,_fnGetMaxLenString:bt,_fnStringToCss:yt,_fnSortFlatten:Ct,_fnSort:xt,_fnSortAria:St,_fnSortListener:Tt,_fnSortAttachListener:Et,_fnSortingClasses:Dt,_fnSortData:At,_fnSaveState:Nt,_fnLoadState:kt,_fnSettingsFromNode:Rt,_fnLog:Ot,_fnMap:It,_fnBindAction:Pt,_fnCallbackReg:Mt,_fnCallbackFire:$t,_fnLengthOverflow:Ft,_fnRenderer:Ht,_fnDataSource:Bt,_fnRowAttributes:P,_fnCalculateEnd:function(){}}),t.fn.dataTable=Gt,Gt.$=t,t.fn.dataTableSettings=Gt.settings,t.fn.dataTableExt=Gt.ext,t.fn.DataTable=function(e){return t(this).dataTable(e).api()},t.each(Gt,function(e,n){t.fn.DataTable[e]=n}),t.fn.dataTable})},,,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=(n(18),n(26)),o=(n.n(i),n(27),n(32),n(40),n(46),n(48),n(50)),r=(n.n(o),n(51)),a=(n.n(r),n(52)),s=(n.n(a),n(4)),l=(n.n(s),n(1)),c=n(2),u=n(3);n.d(e,"Modal",function(){return l.a}),n.d(e,"Recipe",function(){return c.a}),n.d(e,"utils",function(){return u})},function(t,e,n){"use strict";(function(t){var e=n(1);t(document).ready(function(n){t(document).on("click",".wprm-modal-button",function(){var n=t(this).data("editor");e.a.open(n)}),t(document).on("click",".wprm-modal-edit-button",function(){var n=t(this).data("editor"),i=t(this).data("recipe");e.a.open(n,{recipe_id:i})})})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){function i(e){t(".wprm-modal").on("change","input, textarea, #wprm-recipe-author-display, .wprm-recipe-tags, #wprm-ingredient-links-type",function(){s.a.changes_made=!0}),t(".wprm-recipe-details-form, .wprm-recipe-instructions-form").on("click",".wprm-recipe-image-add",function(e){a.select_media_image(t(this).parents(".wprm-recipe-image-container"))}),t(".wprm-recipe-details-form, .wprm-recipe-instructions-form").on("click",".wprm-recipe-image-remove",function(e){a.remove_media_image(t(this).parents(".wprm-recipe-image-container"))}),c.a.init(),t("#wprm-recipe-author-display").select2_wprm({width:"95%"}),t(document).on("change","#wprm-recipe-author-display",function(){var e=t(this).val(),n=t(this).find("option:first").data("default");"custom"==e||"default"==e&&"custom"==n?(t("#wprm-recipe-author-name-container").show(),t("#wprm-recipe-author-link-container").show()):(t("#wprm-recipe-author-name-container").hide(),t("#wprm-recipe-author-link-container").hide())}),t("#wprm-recipe-author-display").change(),t(".wprm-recipe-time").on("keyup change",function(){var e=t(this),n=t("#wprm-recipe-prep-time"),i=n.val(),o=t("#wprm-recipe-cook-time"),r=o.val(),a=t("#wprm-recipe-total-time"),s=a.val();e.is("#wprm-recipe-prep-time")&&(l.a.prep_time_set=!0),e.is("#wprm-recipe-cook-time")&&(l.a.cook_time_set=!0),e.is("#wprm-recipe-total-time")&&(l.a.total_time_set=!0),i&&r&&!l.a.total_time_set&&a.val(parseInt(i)+parseInt(r)),s&&i&&!l.a.cook_time_set&&o.val(parseInt(s)-parseInt(i)),s&&r&&!l.a.prep_time_set&&n.val(parseInt(s)-parseInt(r))}),t(".wprm-recipe-tags").select2_wprm({width:"95%",tags:!0}),t(".wprm-recipe-ingredients-add").on("click",function(){l.a.addIngredient()}),t(".wprm-recipe-ingredients-add-group").on("click",function(){l.a.addIngredientGroup()}),t(".wprm-recipe-instructions-add").on("click",function(){l.a.addInstruction()}),t(".wprm-recipe-instructions-add-group").on("click",function(){l.a.addInstructionGroup()}),t(".wprm-recipe-ingredients").on("keydown",".wprm-recipe-ingredient-notes, .wprm-recipe-ingredient-group-name",function(e){var n=e.keyCode||e.which;t(this),!e.shiftKey&&9==n&&t(this).parents("tr").is("tr:last-child")&&(e.preventDefault(),l.a.addIngredient())}),t(".wprm-recipe-instructions").on("keydown",".wprm-recipe-instruction-text, .wprm-recipe-instruction-group-name",function(e){var n=e.keyCode||e.which;t(this),!e.shiftKey&&9==n&&t(this).parents("tr").is("tr:last-child")&&(e.preventDefault(),l.a.addInstruction())}),t(".wprm-recipe-ingredients-instructions-form").on("click",".wprm-recipe-ingredients-instructions-delete",function(){t(this).parents("tr").remove()}),t(".wprm-recipe-ingredients, .wprm-recipe-instructions").sortable({opacity:.6,revert:!0,cursor:"move",handle:".wprm-recipe-ingredients-instructions-sort"}),t(".wprm-button-action-save").on("click",function(){s.a.actions.insert_update_recipe(t(this))})}e.a=i;var o=n(7),r=(n.n(o),n(8)),a=(n.n(r),n(3)),s=n(1),l=n(2),c=n(9)}).call(e,n(0))},function(t,e,n){var i,o;!function(r,a){i=r,void 0!==(o="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=o)}(function(){function t(t,e){var n=typeof t[e];return n==b||!(n!=w||!t[e])||"unknown"==n}function e(t,e){return!(typeof t[e]!=w||!t[e])}function n(t,e){return typeof t[e]!=y}function i(t){return function(e,n){for(var i=n.length;i--;)if(!t(e,n[i]))return!1;return!0}}function o(t){return t&&E(t,T)&&A(t,S)}function r(t){return e(t,"body")?t.body:t.getElementsByTagName("body")[0]}function a(e){typeof console!=y&&t(console,"log")&&console.log(e)}function s(t,e){R&&e?alert(t):a(t)}function l(t){I.initialized=!0,I.supported=!1,s("Rangy is not supported in this environment. Reason: "+t,I.config.alertOnFail)}function c(t){s("Rangy warning: "+t,I.config.alertOnWarn)}function u(t){return t.message||t.description||String(t)}function d(){if(R&&!I.initialized){var e,n=!1,i=!1;t(document,"createRange")&&(e=document.createRange(),E(e,x)&&A(e,C)&&(n=!0));var s=r(document);if(!s||"body"!=s.nodeName.toLowerCase())return void l("No body element found");if(s&&t(s,"createTextRange")&&(e=s.createTextRange(),o(e)&&(i=!0)),!n&&!i)return void l("Neither Range nor TextRange are available");I.initialized=!0,I.features={implementsDomRange:n,implementsTextRange:i};var c,d;for(var h in k)(c=k[h])instanceof m&&c.init(c,I);for(var p=0,f=M.length;p<f;++p)try{M[p](I)}catch(t){d="Rangy init listener threw an exception. Continuing. Detail: "+u(t),a(d)}}}function h(t,e,n){n&&(t+=" in module "+n.name),I.warn("DEPRECATED: "+t+" is deprecated. Please use "+e+" instead.")}function p(t,e,n,i){t[e]=function(){return h(e,n,i),t[n].apply(t,O.toArray(arguments))}}function f(t){t=t||window,d();for(var e=0,n=$.length;e<n;++e)$[e](t)}function m(t,e,n){this.name=t,this.dependencies=e,this.initialized=!1,this.supported=!1,this.initializer=n}function g(t,e,n){var i=new m(t,e,function(e){if(!e.initialized){e.initialized=!0;try{n(I,e),e.supported=!0}catch(e){var i="Module '"+t+"' failed to load: "+u(e);a(i),e.stack&&a(e.stack)}}});return k[t]=i,i}function v(){}function _(){}var w="object",b="function",y="undefined",C=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],S=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],T=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],E=i(t),D=i(e),A=i(n),N=[].forEach?function(t,e){t.forEach(e)}:function(t,e){for(var n=0,i=t.length;n<i;++n)e(t[n],n)},k={},R=typeof window!=y&&typeof document!=y,O={isHostMethod:t,isHostObject:e,isHostProperty:n,areHostMethods:E,areHostObjects:D,areHostProperties:A,isTextRange:o,getBody:r,forEach:N},I={version:"1.3.0",initialized:!1,isBrowser:R,supported:!0,util:O,features:{},modules:k,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==y||rangyAutoInitialize}};I.fail=l,I.warn=c;var L;!{}.hasOwnProperty?l("hasOwnProperty not supported"):(O.extend=L=function(t,e,n){var i,o;for(var r in e)e.hasOwnProperty(r)&&(i=t[r],o=e[r],n&&null!==i&&"object"==typeof i&&null!==o&&"object"==typeof o&&L(i,o,!0),t[r]=o);return e.hasOwnProperty("toString")&&(t.toString=e.toString),t},O.createOptions=function(t,e){var n={};return L(n,e),t&&L(n,t),n}),R||l("Rangy can only run in a browser"),function(){var t;if(R){var e=document.createElement("div");e.appendChild(document.createElement("span"));var n=[].slice;try{1==n.call(e.childNodes,0)[0].nodeType&&(t=function(t){return n.call(t,0)})}catch(t){}}t||(t=function(t){for(var e=[],n=0,i=t.length;n<i;++n)e[n]=t[n];return e}),O.toArray=t}();var P;R&&(t(document,"addEventListener")?P=function(t,e,n){t.addEventListener(e,n,!1)}:t(document,"attachEvent")?P=function(t,e,n){t.attachEvent("on"+e,n)}:l("Document does not have required addEventListener or attachEvent method"),O.addListener=P);var M=[];O.deprecationNotice=h,O.createAliasForDeprecatedMethod=p,I.init=d,I.addInitListener=function(t){I.initialized?t(I):M.push(t)};var $=[];I.addShimListener=function(t){$.push(t)},R&&(I.shim=I.createMissingNativeApi=f,p(I,"createMissingNativeApi","shim")),m.prototype={init:function(){for(var t,e,n=this.dependencies||[],i=0,o=n.length;i<o;++i){if(e=n[i],!((t=k[e])&&t instanceof m))throw new Error("required module '"+e+"' not found");if(t.init(),!t.supported)throw new Error("required module '"+e+"' not supported")}this.initializer(this)},fail:function(t){throw this.initialized=!0,this.supported=!1,new Error(t)},warn:function(t){I.warn("Module "+this.name+": "+t)},deprecationNotice:function(t,e){I.warn("DEPRECATED: "+t+" in module "+this.name+" is deprecated. Please use "+e+" instead")},createError:function(t){return new Error("Error in Rangy "+this.name+" module: "+t)}},I.createModule=function(t){var e,n;2==arguments.length?(e=arguments[1],n=[]):(e=arguments[2],n=arguments[1]);var i=g(t,n,e);I.initialized&&I.supported&&i.init()},I.createCoreModule=function(t,e,n){g(t,e,n)},I.RangePrototype=v,I.rangePrototype=new v,I.selectionPrototype=new _,I.createCoreModule("DomUtil",[],function(t,e){function n(t){var e;return typeof t.namespaceURI==R||null===(e=t.namespaceURI)||"http://www.w3.org/1999/xhtml"==e}function i(t){var e=t.parentNode;return 1==e.nodeType?e:null}function o(t){for(var e=0;t=t.previousSibling;)++e;return e}function r(t){switch(t.nodeType){case 7:case 10:return 0;case 3:case 8:return t.length;default:return t.childNodes.length}}function a(t,e){var n,i=[];for(n=t;n;n=n.parentNode)i.push(n);for(n=e;n;n=n.parentNode)if(M(i,n))return n;return null}function s(t,e,n){for(var i=n?e:e.parentNode;i;){if(i===t)return!0;i=i.parentNode}return!1}function l(t,e){return s(t,e,!0)}function c(t,e,n){for(var i,o=n?t:t.parentNode;o;){if((i=o.parentNode)===e)return o;o=i}return null}function u(t){var e=t.nodeType;return 3==e||4==e||8==e}function d(t){if(!t)return!1;var e=t.nodeType;return 3==e||8==e}function h(t,e){var n=e.nextSibling,i=e.parentNode;return n?i.insertBefore(t,n):i.appendChild(t),t}function p(t,e,n){var i=t.cloneNode(!1);if(i.deleteData(0,e),t.deleteData(e,t.length-e),h(i,t),n)for(var r,a=0;r=n[a++];)r.node==t&&r.offset>e?(r.node=i,r.offset-=e):r.node==t.parentNode&&r.offset>o(t)&&++r.offset;return i}function f(t){if(9==t.nodeType)return t;if(typeof t.ownerDocument!=R)return t.ownerDocument;if(typeof t.document!=R)return t.document;if(t.parentNode)return f(t.parentNode);throw e.createError("getDocument: no document found for node")}function m(t){var n=f(t);if(typeof n.defaultView!=R)return n.defaultView;if(typeof n.parentWindow!=R)return n.parentWindow;throw e.createError("Cannot get a window object for node")}function g(t){if(typeof t.contentDocument!=R)return t.contentDocument;if(typeof t.contentWindow!=R)return t.contentWindow.document;throw e.createError("getIframeDocument: No Document object found for iframe element")}function v(t){if(typeof t.contentWindow!=R)return t.contentWindow;if(typeof t.contentDocument!=R)return t.contentDocument.defaultView;throw e.createError("getIframeWindow: No Window object found for iframe element")}function _(t){return t&&O.isHostMethod(t,"setTimeout")&&O.isHostObject(t,"document")}function w(t,e,n){var i;if(t?O.isHostProperty(t,"nodeType")?i=1==t.nodeType&&"iframe"==t.tagName.toLowerCase()?g(t):f(t):_(t)&&(i=t.document):i=document,!i)throw e.createError(n+"(): Parameter must be a Window object or DOM node");return i}function b(t){for(var e;e=t.parentNode;)t=e;return t}function y(t,n,i,r){var s,l,u,d,h;if(t==i)return n===r?0:n<r?-1:1;if(s=c(i,t,!0))return n<=o(s)?-1:1;if(s=c(t,i,!0))return o(s)<r?-1:1;if(!(l=a(t,i)))throw new Error("comparePoints error: nodes have no common ancestor");if(u=t===l?l:c(t,l,!0),d=i===l?l:c(i,l,!0),u===d)throw e.createError("comparePoints got to case 4 and childA and childB are the same!");for(h=l.firstChild;h;){if(h===u)return-1;if(h===d)return 1;h=h.nextSibling}}function C(t){try{return t.parentNode,!1}catch(t){return!0}}function x(t){if(!t)return"[No node]";if($&&C(t))return"[Broken node]";if(u(t))return'"'+t.data+'"';if(1==t.nodeType){var e=t.id?' id="'+t.id+'"':"";return"<"+t.nodeName+e+">[index:"+o(t)+",length:"+t.childNodes.length+"]["+(t.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return t.nodeName}function S(t){for(var e,n=f(t).createDocumentFragment();e=t.firstChild;)n.appendChild(e);return n}function T(t,e,n){var i=I(t),o=t.createElement("div");o.contentEditable=""+!!n,e&&(o.innerHTML=e);var r=i.firstChild;return r?i.insertBefore(o,r):i.appendChild(o),o}function E(t){return t.parentNode.removeChild(t)}function D(t){this.root=t,this._next=t}function A(t){return new D(t)}function N(t,e){this.node=t,this.offset=e}function k(t){this.code=this[t],this.codeName=t,this.message="DOMException: "+this.codeName}var R="undefined",O=t.util,I=O.getBody;O.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||e.fail("document missing a Node creation method"),O.isHostMethod(document,"getElementsByTagName")||e.fail("document missing getElementsByTagName method");var L=document.createElement("div");O.areHostMethods(L,["insertBefore","appendChild","cloneNode"]||!O.areHostObjects(L,["previousSibling","nextSibling","childNodes","parentNode"]))||e.fail("Incomplete Element implementation"),O.isHostProperty(L,"innerHTML")||e.fail("Element is missing innerHTML property");var P=document.createTextNode("test");O.areHostMethods(P,["splitText","deleteData","insertData","appendData","cloneNode"]||!O.areHostObjects(L,["previousSibling","nextSibling","childNodes","parentNode"])||!O.areHostProperties(P,["data"]))||e.fail("Incomplete Text Node implementation");var M=function(t,e){for(var n=t.length;n--;)if(t[n]===e)return!0;return!1},$=!1;!function(){var e=document.createElement("b");e.innerHTML="1";var n=e.firstChild;e.innerHTML="<br />",$=C(n),t.features.crashyTextNodes=$}();var F;typeof window.getComputedStyle!=R?F=function(t,e){return m(t).getComputedStyle(t,null)[e]}:typeof document.documentElement.currentStyle!=R?F=function(t,e){return t.currentStyle?t.currentStyle[e]:""}:e.fail("No means of obtaining computed style properties found"),D.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var t,e,n=this._current=this._next;if(this._current)if(t=n.firstChild)this._next=t;else{for(e=null;n!==this.root&&!(e=n.nextSibling);)n=n.parentNode;this._next=e}return this._current},detach:function(){this._current=this._next=this.root=null}},N.prototype={equals:function(t){return!!t&&this.node===t.node&&this.offset==t.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},k.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},k.prototype.toString=function(){return this.message},t.dom={arrayContains:M,isHtmlNamespace:n,parentElement:i,getNodeIndex:o,getNodeLength:r,getCommonAncestor:a,isAncestorOf:s,isOrIsAncestorOf:l,getClosestAncestorIn:c,isCharacterDataNode:u,isTextOrCommentNode:d,insertAfter:h,splitDataNode:p,getDocument:f,getWindow:m,getIframeWindow:v,getIframeDocument:g,getBody:I,isWindow:_,getContentDocument:w,getRootContainer:b,comparePoints:y,isBrokenNode:C,inspectNode:x,getComputedStyleProperty:F,createTestElement:T,removeNode:E,fragmentFromNodeChildren:S,createIterator:A,DomPosition:N},t.DOMException=k}),I.createCoreModule("DomRange",["DomUtil"],function(t,e){function n(t,e){return 3!=t.nodeType&&(j(t,e.startContainer)||j(t,e.endContainer))}function i(t){return t.document||z(t.startContainer)}function o(t){return G(t.startContainer)}function r(t){return new $(t.parentNode,B(t))}function a(t){return new $(t.parentNode,B(t)+1)}function s(t,e,n){var i=11==t.nodeType?t.firstChild:t;return H(e)?n==e.length?P.insertAfter(t,e):e.parentNode.insertBefore(t,0==n?e:q(e,n)):n>=e.childNodes.length?e.appendChild(t):e.insertBefore(t,e.childNodes[n]),i}function l(t,e,n){if(T(t),T(e),i(e)!=i(t))throw new F("WRONG_DOCUMENT_ERR");var o=W(t.startContainer,t.startOffset,e.endContainer,e.endOffset),r=W(t.endContainer,t.endOffset,e.startContainer,e.startOffset);return n?o<=0&&r>=0:o<0&&r>0}function c(t){for(var e,n,o,r=i(t.range).createDocumentFragment();n=t.next();){if(e=t.isPartiallySelectedSubtree(),n=n.cloneNode(!e),e&&(o=t.getSubtreeIterator(),n.appendChild(c(o)),o.detach()),10==n.nodeType)throw new F("HIERARCHY_REQUEST_ERR");r.appendChild(n)}return r}function u(t,e,n){var i,o;n=n||{stop:!1};for(var r,a;r=t.next();)if(t.isPartiallySelectedSubtree()){if(!1===e(r))return void(n.stop=!0);if(a=t.getSubtreeIterator(),u(a,e,n),a.detach(),n.stop)return}else for(i=P.createIterator(r);o=i.next();)if(!1===e(o))return void(n.stop=!0)}function d(t){for(var e;t.next();)t.isPartiallySelectedSubtree()?(e=t.getSubtreeIterator(),d(e),e.detach()):t.remove()}function h(t){for(var e,n,o=i(t.range).createDocumentFragment();e=t.next();){if(t.isPartiallySelectedSubtree()?(e=e.cloneNode(!1),n=t.getSubtreeIterator(),e.appendChild(h(n)),n.detach()):t.remove(),10==e.nodeType)throw new F("HIERARCHY_REQUEST_ERR");o.appendChild(e)}return o}function p(t,e,n){var i,o=!(!e||!e.length),r=!!n;o&&(i=new RegExp("^("+e.join("|")+")$"));var a=[];return u(new m(t,!1),function(e){if((!o||i.test(e.nodeType))&&(!r||n(e))){var s=t.startContainer;if(e!=s||!H(s)||t.startOffset!=s.length){var l=t.endContainer;e==l&&H(l)&&0==t.endOffset||a.push(e)}}}),a}function f(t){return"["+(void 0===t.getName?"Range":t.getName())+"("+P.inspectNode(t.startContainer)+":"+t.startOffset+", "+P.inspectNode(t.endContainer)+":"+t.endOffset+")]"}function m(t,e){if(this.range=t,this.clonePartiallySelectedTextNodes=e,!t.collapsed){this.sc=t.startContainer,this.so=t.startOffset,this.ec=t.endContainer,this.eo=t.endOffset;var n=t.commonAncestorContainer;this.sc===this.ec&&H(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==n||H(this.sc)?U(this.sc,n,!0):this.sc.childNodes[this.so],this._last=this.ec!==n||H(this.ec)?U(this.ec,n,!0):this.ec.childNodes[this.eo-1])}}function g(t){return function(e,n){for(var i,o=n?e:e.parentNode;o;){if(i=o.nodeType,V(t,i))return o;o=o.parentNode}return null}}function v(t,e){if(ot(t,e))throw new F("INVALID_NODE_TYPE_ERR")}function _(t,e){if(!V(e,t.nodeType))throw new F("INVALID_NODE_TYPE_ERR")}function w(t,e){if(e<0||e>(H(t)?t.length:t.childNodes.length))throw new F("INDEX_SIZE_ERR")}function b(t,e){if(nt(t,!0)!==nt(e,!0))throw new F("WRONG_DOCUMENT_ERR")}function y(t){if(it(t,!0))throw new F("NO_MODIFICATION_ALLOWED_ERR")}function C(t,e){if(!t)throw new F(e)}function x(t,e){return e<=(H(t)?t.length:t.childNodes.length)}function S(t){return!!t.startContainer&&!!t.endContainer&&!(Y&&(P.isBrokenNode(t.startContainer)||P.isBrokenNode(t.endContainer)))&&G(t.startContainer)==G(t.endContainer)&&x(t.startContainer,t.startOffset)&&x(t.endContainer,t.endOffset)}function T(t){if(!S(t))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+t.inspect()+")")}function E(t,e){T(t);var n=t.startContainer,i=t.startOffset,o=t.endContainer,r=t.endOffset,a=n===o;H(o)&&r>0&&r<o.length&&q(o,r,e),H(n)&&i>0&&i<n.length&&(n=q(n,i,e),a?(r-=i,o=n):o==n.parentNode&&r>=B(n)&&r++,i=0),t.setStartAndEnd(n,i,o,r)}function D(t){T(t);var e=t.commonAncestorContainer.parentNode.cloneNode(!1);return e.appendChild(t.cloneContents()),e.innerHTML}function A(t){t.START_TO_START=ct,t.START_TO_END=ut,t.END_TO_END=dt,t.END_TO_START=ht,t.NODE_BEFORE=pt,t.NODE_AFTER=ft,t.NODE_BEFORE_AND_AFTER=mt,t.NODE_INSIDE=gt}function N(t){A(t),A(t.prototype)}function k(t,e){return function(){T(this);var n,i,o=this.startContainer,r=this.startOffset,s=this.commonAncestorContainer,l=new m(this,!0);o!==s&&(n=U(o,s,!0),i=a(n),o=i.node,r=i.offset),u(l,y),l.reset();var c=t(l);return l.detach(),e(this,o,r,o,r),c}}function R(e,i){function o(t,e){return function(n){_(n,J),_(G(n),Q);var i=(t?r:a)(n);(e?s:l)(this,i.node,i.offset)}}function s(t,e,n){var o=t.endContainer,r=t.endOffset;e===t.startContainer&&n===t.startOffset||(G(e)==G(o)&&1!=W(e,n,o,r)||(o=e,r=n),i(t,e,n,o,r))}function l(t,e,n){var o=t.startContainer,r=t.startOffset;e===t.endContainer&&n===t.endOffset||(G(e)==G(o)&&-1!=W(e,n,o,r)||(o=e,r=n),i(t,o,r,e,n))}var c=function(){};c.prototype=t.rangePrototype,e.prototype=new c,M.extend(e.prototype,{setStart:function(t,e){v(t,!0),w(t,e),s(this,t,e)},setEnd:function(t,e){v(t,!0),w(t,e),l(this,t,e)},setStartAndEnd:function(){var t=arguments,e=t[0],n=t[1],o=e,r=n;switch(t.length){case 3:r=t[2];break;case 4:o=t[2],r=t[3]}i(this,e,n,o,r)},setBoundary:function(t,e,n){this["set"+(n?"Start":"End")](t,e)},setStartBefore:o(!0,!0),setStartAfter:o(!1,!0),setEndBefore:o(!0,!1),setEndAfter:o(!1,!1),collapse:function(t){T(this),t?i(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):i(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(t){v(t,!0),i(this,t,0,t,K(t))},selectNode:function(t){v(t,!1),_(t,J);var e=r(t),n=a(t);i(this,e.node,e.offset,n.node,n.offset)},extractContents:k(h,i),deleteContents:k(d,i),canSurroundContents:function(){T(this),y(this.startContainer),y(this.endContainer);var t=new m(this,!0),e=t._first&&n(t._first,this)||t._last&&n(t._last,this);return t.detach(),!e},splitBoundaries:function(){E(this)},splitBoundariesPreservingPositions:function(t){E(this,t)},normalizeBoundaries:function(){T(this);var t,e=this.startContainer,n=this.startOffset,o=this.endContainer,r=this.endOffset,a=function(t){var e=t.nextSibling;e&&e.nodeType==t.nodeType&&(o=t,r=t.length,t.appendData(e.data),X(e))},s=function(t){var i=t.previousSibling;if(i&&i.nodeType==t.nodeType){e=t;var a=t.length;if(n=i.length,t.insertData(0,i.data),X(i),e==o)r+=n,o=e;else if(o==t.parentNode){var s=B(t);r==s?(o=t,r=a):r>s&&r--}}},l=!0;if(H(o))r==o.length?a(o):0==r&&(t=o.previousSibling)&&t.nodeType==o.nodeType&&(r=t.length,e==o&&(l=!1),t.appendData(o.data),X(o),o=t);else{if(r>0){var c=o.childNodes[r-1];c&&H(c)&&a(c)}l=!this.collapsed}if(l){if(H(e))0==n?s(e):n==e.length&&(t=e.nextSibling)&&t.nodeType==e.nodeType&&(o==t&&(o=e,r+=e.length),e.appendData(t.data),X(t));else if(n<e.childNodes.length){var u=e.childNodes[n];u&&H(u)&&s(u)}}else e=o,n=r;i(this,e,n,o,r)},collapseToPoint:function(t,e){v(t,!0),w(t,e),this.setStartAndEnd(t,e)}}),N(e)}function O(t){t.collapsed=t.startContainer===t.endContainer&&t.startOffset===t.endOffset,t.commonAncestorContainer=t.collapsed?t.startContainer:P.getCommonAncestor(t.startContainer,t.endContainer)}function I(t,e,n,i,o){t.startContainer=e,t.startOffset=n,t.endContainer=i,t.endOffset=o,t.document=P.getDocument(e),O(t)}function L(t){this.startContainer=t,this.startOffset=0,this.endContainer=t,this.endOffset=0,this.document=t,O(this)}var P=t.dom,M=t.util,$=P.DomPosition,F=t.DOMException,H=P.isCharacterDataNode,B=P.getNodeIndex,j=P.isOrIsAncestorOf,z=P.getDocument,W=P.comparePoints,q=P.splitDataNode,U=P.getClosestAncestorIn,K=P.getNodeLength,V=P.arrayContains,G=P.getRootContainer,Y=t.features.crashyTextNodes,X=P.removeNode;m.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var t=this._current=this._next;return t&&(this._next=t!==this._last?t.nextSibling:null,H(t)&&this.clonePartiallySelectedTextNodes&&(t===this.ec&&(t=t.cloneNode(!0)).deleteData(this.eo,t.length-this.eo),this._current===this.sc&&(t=t.cloneNode(!0)).deleteData(0,this.so))),t},remove:function(){var t,e,n=this._current;!H(n)||n!==this.sc&&n!==this.ec?n.parentNode&&X(n):(t=n===this.sc?this.so:0,e=n===this.ec?this.eo:n.length,t!=e&&n.deleteData(t,e-t))},isPartiallySelectedSubtree:function(){return n(this._current,this.range)},getSubtreeIterator:function(){var t;if(this.isSingleCharacterDataNode)t=this.range.cloneRange(),t.collapse(!1);else{t=new L(i(this.range));var e=this._current,n=e,o=0,r=e,a=K(e);j(e,this.sc)&&(n=this.sc,o=this.so),j(e,this.ec)&&(r=this.ec,a=this.eo),I(t,n,o,r,a)}return new m(t,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var J=[1,3,4,5,7,8,10],Q=[2,9,11],Z=[5,6,10,12],tt=[1,3,4,5,7,8,10,11],et=[1,3,4,5,7,8],nt=g([9,11]),it=g(Z),ot=g([6,10,12]),rt=document.createElement("style"),at=!1;try{rt.innerHTML="<b>x</b>",at=3==rt.firstChild.nodeType}catch(t){}t.features.htmlParsingConforms=at;var st=at?function(t){var e=this.startContainer,n=z(e);if(!e)throw new F("INVALID_STATE_ERR");var i=null;return 1==e.nodeType?i=e:H(e)&&(i=P.parentElement(e)),i=null===i||"HTML"==i.nodeName&&P.isHtmlNamespace(z(i).documentElement)&&P.isHtmlNamespace(i)?n.createElement("body"):i.cloneNode(!1),i.innerHTML=t,P.fragmentFromNodeChildren(i)}:function(t){var e=i(this),n=e.createElement("body");return n.innerHTML=t,P.fragmentFromNodeChildren(n)},lt=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ct=0,ut=1,dt=2,ht=3,pt=0,ft=1,mt=2,gt=3;M.extend(t.rangePrototype,{compareBoundaryPoints:function(t,e){T(this),b(this.startContainer,e.startContainer);var n,i,o,r,a=t==ht||t==ct?"start":"end",s=t==ut||t==ct?"start":"end";return n=this[a+"Container"],i=this[a+"Offset"],o=e[s+"Container"],r=e[s+"Offset"],W(n,i,o,r)},insertNode:function(t){if(T(this),_(t,tt),y(this.startContainer),j(t,this.startContainer))throw new F("HIERARCHY_REQUEST_ERR");var e=s(t,this.startContainer,this.startOffset);this.setStartBefore(e)},cloneContents:function(){T(this);var t,e;if(this.collapsed)return i(this).createDocumentFragment();if(this.startContainer===this.endContainer&&H(this.startContainer))return t=this.startContainer.cloneNode(!0),t.data=t.data.slice(this.startOffset,this.endOffset),e=i(this).createDocumentFragment(),e.appendChild(t),e;var n=new m(this,!0);return t=c(n),n.detach(),t},canSurroundContents:function(){T(this),y(this.startContainer),y(this.endContainer);var t=new m(this,!0),e=t._first&&n(t._first,this)||t._last&&n(t._last,this);return t.detach(),!e},surroundContents:function(t){if(_(t,et),!this.canSurroundContents())throw new F("INVALID_STATE_ERR");var e=this.extractContents();if(t.hasChildNodes())for(;t.lastChild;)t.removeChild(t.lastChild);s(t,this.startContainer,this.startOffset),t.appendChild(e),this.selectNode(t)},cloneRange:function(){T(this);for(var t,e=new L(i(this)),n=lt.length;n--;)t=lt[n],e[t]=this[t];return e},toString:function(){T(this);var t=this.startContainer;if(t===this.endContainer&&H(t))return 3==t.nodeType||4==t.nodeType?t.data.slice(this.startOffset,this.endOffset):"";var e=[],n=new m(this,!0);return u(n,function(t){3!=t.nodeType&&4!=t.nodeType||e.push(t.data)}),n.detach(),e.join("")},compareNode:function(t){T(this);var e=t.parentNode,n=B(t);if(!e)throw new F("NOT_FOUND_ERR");var i=this.comparePoint(e,n),o=this.comparePoint(e,n+1);return i<0?o>0?mt:pt:o>0?ft:gt},comparePoint:function(t,e){return T(this),C(t,"HIERARCHY_REQUEST_ERR"),b(t,this.startContainer),W(t,e,this.startContainer,this.startOffset)<0?-1:W(t,e,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:st,toHtml:function(){return D(this)},intersectsNode:function(t,e){if(T(this),G(t)!=o(this))return!1;var n=t.parentNode,i=B(t);if(!n)return!0;var r=W(n,i,this.endContainer,this.endOffset),a=W(n,i+1,this.startContainer,this.startOffset);return e?r<=0&&a>=0:r<0&&a>0},isPointInRange:function(t,e){return T(this),C(t,"HIERARCHY_REQUEST_ERR"),b(t,this.startContainer),W(t,e,this.startContainer,this.startOffset)>=0&&W(t,e,this.endContainer,this.endOffset)<=0},intersectsRange:function(t){return l(this,t,!1)},intersectsOrTouchesRange:function(t){return l(this,t,!0)},intersection:function(t){if(this.intersectsRange(t)){var e=W(this.startContainer,this.startOffset,t.startContainer,t.startOffset),n=W(this.endContainer,this.endOffset,t.endContainer,t.endOffset),i=this.cloneRange();return-1==e&&i.setStart(t.startContainer,t.startOffset),1==n&&i.setEnd(t.endContainer,t.endOffset),i}return null},union:function(t){if(this.intersectsOrTouchesRange(t)){var e=this.cloneRange();return-1==W(t.startContainer,t.startOffset,this.startContainer,this.startOffset)&&e.setStart(t.startContainer,t.startOffset),1==W(t.endContainer,t.endOffset,this.endContainer,this.endOffset)&&e.setEnd(t.endContainer,t.endOffset),e}throw new F("Ranges do not intersect")},containsNode:function(t,e){return e?this.intersectsNode(t,!1):this.compareNode(t)==gt},containsNodeContents:function(t){return this.comparePoint(t,0)>=0&&this.comparePoint(t,K(t))<=0},containsRange:function(t){var e=this.intersection(t);return null!==e&&t.equals(e)},containsNodeText:function(t){var e=this.cloneRange();e.selectNode(t);var n=e.getNodes([3]);if(n.length>0){e.setStart(n[0],0);var i=n.pop();return e.setEnd(i,i.length),this.containsRange(e)}return this.containsNodeContents(t)},getNodes:function(t,e){return T(this),p(this,t,e)},getDocument:function(){return i(this)},collapseBefore:function(t){this.setEndBefore(t),this.collapse(!1)},collapseAfter:function(t){this.setStartAfter(t),this.collapse(!0)},getBookmark:function(e){var n=i(this),o=t.createRange(n);e=e||P.getBody(n),o.selectNodeContents(e);var r=this.intersection(o),a=0,s=0;return r&&(o.setEnd(r.startContainer,r.startOffset),a=o.toString().length,s=a+r.toString().length),{start:a,end:s,containerNode:e}},moveToBookmark:function(t){var e=t.containerNode,n=0;this.setStart(e,0),this.collapse(!0);for(var i,o,r,a,s=[e],l=!1,c=!1;!c&&(i=s.pop());)if(3==i.nodeType)o=n+i.length,!l&&t.start>=n&&t.start<=o&&(this.setStart(i,t.start-n),l=!0),l&&t.end>=n&&t.end<=o&&(this.setEnd(i,t.end-n),c=!0),n=o;else for(a=i.childNodes,r=a.length;r--;)s.push(a[r])},getName:function(){return"DomRange"},equals:function(t){return L.rangesEqual(this,t)},isValid:function(){return S(this)},inspect:function(){return f(this)},detach:function(){}}),R(L,I),M.extend(L,{rangeProperties:lt,RangeIterator:m,copyComparisonConstants:N,createPrototypeRange:R,inspect:f,toHtml:D,getRangeDocument:i,rangesEqual:function(t,e){return t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset}}),t.DomRange=L}),I.createCoreModule("WrappedRange",["DomRange"],function(t,e){var n,i,o=t.dom,r=t.util,a=o.DomPosition,s=t.DomRange,l=o.getBody,c=o.getContentDocument,u=o.isCharacterDataNode;if(t.features.implementsDomRange&&function(){function i(t){for(var e,n=h.length;n--;)e=h[n],t[e]=t.nativeRange[e];t.collapsed=t.startContainer===t.endContainer&&t.startOffset===t.endOffset}function a(t,e,n,i,o){var r=t.startContainer!==e||t.startOffset!=n,a=t.endContainer!==i||t.endOffset!=o,s=!t.equals(t.nativeRange);(r||a||s)&&(t.setEnd(i,o),t.setStart(e,n))}var u,d,h=s.rangeProperties;n=function(t){if(!t)throw e.createError("WrappedRange: Range must be specified");this.nativeRange=t,i(this)},s.createPrototypeRange(n,a),u=n.prototype,u.selectNode=function(t){this.nativeRange.selectNode(t),i(this)},u.cloneContents=function(){return this.nativeRange.cloneContents()},u.surroundContents=function(t){this.nativeRange.surroundContents(t),i(this)},u.collapse=function(t){this.nativeRange.collapse(t),i(this)},u.cloneRange=function(){return new n(this.nativeRange.cloneRange())},u.refresh=function(){i(this)},u.toString=function(){return this.nativeRange.toString()};var p=document.createTextNode("test");l(document).appendChild(p);var f=document.createRange();f.setStart(p,0),f.setEnd(p,0);try{f.setStart(p,1),u.setStart=function(t,e){this.nativeRange.setStart(t,e),i(this)},u.setEnd=function(t,e){this.nativeRange.setEnd(t,e),i(this)},d=function(t){return function(e){this.nativeRange[t](e),i(this)}}}catch(t){u.setStart=function(t,e){try{this.nativeRange.setStart(t,e)}catch(n){this.nativeRange.setEnd(t,e),this.nativeRange.setStart(t,e)}i(this)},u.setEnd=function(t,e){try{this.nativeRange.setEnd(t,e)}catch(n){this.nativeRange.setStart(t,e),this.nativeRange.setEnd(t,e)}i(this)},d=function(t,e){return function(n){try{this.nativeRange[t](n)}catch(i){this.nativeRange[e](n),this.nativeRange[t](n)}i(this)}}}u.setStartBefore=d("setStartBefore","setEndBefore"),u.setStartAfter=d("setStartAfter","setEndAfter"),u.setEndBefore=d("setEndBefore","setStartBefore"),u.setEndAfter=d("setEndAfter","setStartAfter"),u.selectNodeContents=function(t){this.setStartAndEnd(t,0,o.getNodeLength(t))},f.selectNodeContents(p),f.setEnd(p,3);var m=document.createRange();m.selectNodeContents(p),m.setEnd(p,4),m.setStart(p,2),-1==f.compareBoundaryPoints(f.START_TO_END,m)&&1==f.compareBoundaryPoints(f.END_TO_START,m)?u.compareBoundaryPoints=function(t,e){return e=e.nativeRange||e,t==e.START_TO_END?t=e.END_TO_START:t==e.END_TO_START&&(t=e.START_TO_END),this.nativeRange.compareBoundaryPoints(t,e)}:u.compareBoundaryPoints=function(t,e){return this.nativeRange.compareBoundaryPoints(t,e.nativeRange||e)};var g=document.createElement("div");g.innerHTML="123";var v=g.firstChild,_=l(document);_.appendChild(g),f.setStart(v,1),f.setEnd(v,2),f.deleteContents(),"13"==v.data&&(u.deleteContents=function(){this.nativeRange.deleteContents(),i(this)},u.extractContents=function(){var t=this.nativeRange.extractContents();return i(this),t}),_.removeChild(g),_=null,r.isHostMethod(f,"createContextualFragment")&&(u.createContextualFragment=function(t){return this.nativeRange.createContextualFragment(t)}),l(document).removeChild(p),u.getName=function(){return"WrappedRange"},t.WrappedRange=n,t.createNativeRange=function(t){return t=c(t,e,"createNativeRange"),t.createRange()}}(),t.features.implementsTextRange){var d=function(t){var e=t.parentElement(),n=t.duplicate();n.collapse(!0);var i=n.parentElement();n=t.duplicate(),n.collapse(!1);var r=n.parentElement(),a=i==r?i:o.getCommonAncestor(i,r);return a==e?a:o.getCommonAncestor(e,a)},h=function(t){return 0==t.compareEndPoints("StartToEnd",t)},p=function(t,e,n,i,r){var s=t.duplicate();s.collapse(n);var l=s.parentElement();if(o.isOrIsAncestorOf(e,l)||(l=e),!l.canHaveHTML){var c=new a(l.parentNode,o.getNodeIndex(l));return{boundaryPosition:c,nodeInfo:{nodeIndex:c.offset,containerElement:c.node}}}var d=o.getDocument(l).createElement("span");d.parentNode&&o.removeNode(d);for(var h,p,f,m,g,v=n?"StartToStart":"StartToEnd",_=r&&r.containerElement==l?r.nodeIndex:0,w=l.childNodes.length,b=w,y=b;y==w?l.appendChild(d):l.insertBefore(d,l.childNodes[y]),s.moveToElementText(d),0!=(h=s.compareEndPoints(v,t))&&_!=b;){if(-1==h){if(b==_+1)break;_=y}else b=b==_+1?_:y;y=Math.floor((_+b)/2),l.removeChild(d)}if(g=d.nextSibling,-1==h&&g&&u(g)){s.setEndPoint(n?"EndToStart":"EndToEnd",t);var C;if(/[\r\n]/.test(g.data)){var x=s.duplicate(),S=x.text.replace(/\r\n/g,"\r").length;for(C=x.moveStart("character",S);-1==(h=x.compareEndPoints("StartToEnd",x));)C++,x.moveStart("character",1)}else C=s.text.length;m=new a(g,C)}else p=(i||!n)&&d.previousSibling,f=(i||n)&&d.nextSibling,m=f&&u(f)?new a(f,0):p&&u(p)?new a(p,p.data.length):new a(l,o.getNodeIndex(d));return o.removeNode(d),{boundaryPosition:m,nodeInfo:{nodeIndex:y,containerElement:l}}},f=function(t,e){var n,i,r,a,s=t.offset,c=o.getDocument(t.node),d=l(c).createTextRange(),h=u(t.node);return h?(n=t.node,i=n.parentNode):(a=t.node.childNodes,n=s<a.length?a[s]:null,i=t.node),r=c.createElement("span"),r.innerHTML="&#feff;",n?i.insertBefore(r,n):i.appendChild(r),d.moveToElementText(r),d.collapse(!e),i.removeChild(r),h&&d[e?"moveStart":"moveEnd"]("character",s),d};i=function(t){this.textRange=t,this.refresh()},i.prototype=new s(document),i.prototype.refresh=function(){var t,e,n,i=d(this.textRange);h(this.textRange)?e=t=p(this.textRange,i,!0,!0).boundaryPosition:(n=p(this.textRange,i,!0,!1),t=n.boundaryPosition,e=p(this.textRange,i,!1,!1,n.nodeInfo).boundaryPosition),this.setStart(t.node,t.offset),this.setEnd(e.node,e.offset)},i.prototype.getName=function(){return"WrappedTextRange"},s.copyComparisonConstants(i);var m=function(t){if(t.collapsed)return f(new a(t.startContainer,t.startOffset),!0);var e=f(new a(t.startContainer,t.startOffset),!0),n=f(new a(t.endContainer,t.endOffset),!1),i=l(s.getRangeDocument(t)).createTextRange();return i.setEndPoint("StartToStart",e),i.setEndPoint("EndToEnd",n),i};if(i.rangeToTextRange=m,i.prototype.toTextRange=function(){return m(this)},t.WrappedTextRange=i,!t.features.implementsDomRange||t.config.preferTextRange){var g=function(t){return t("return this;")()}(Function);void 0===g.Range&&(g.Range=i),t.createNativeRange=function(t){return t=c(t,e,"createNativeRange"),l(t).createTextRange()},t.WrappedRange=i}}t.createRange=function(n){return n=c(n,e,"createRange"),new t.WrappedRange(t.createNativeRange(n))},t.createRangyRange=function(t){return t=c(t,e,"createRangyRange"),new s(t)},r.createAliasForDeprecatedMethod(t,"createIframeRange","createRange"),r.createAliasForDeprecatedMethod(t,"createIframeRangyRange","createRangyRange"),t.addShimListener(function(e){var n=e.document;void 0===n.createRange&&(n.createRange=function(){return t.createRange(n)}),n=e=null})}),I.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function(t,e){function n(t){return"string"==typeof t?/^backward(s)?$/i.test(t):!!t}function i(t,n){if(t){if(E.isWindow(t))return t;if(t instanceof v)return t.win;var i=E.getContentDocument(t,e,n);return E.getWindow(i)}return window}function o(t){return i(t,"getWinSelection").getSelection()}function r(t){return i(t,"getDocSelection").document.selection}function a(t){var e=!1;return t.anchorNode&&(e=1==E.comparePoints(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)),e}function s(t,e,n){var i=n?"end":"start",o=n?"start":"end";t.anchorNode=e[i+"Container"],t.anchorOffset=e[i+"Offset"],t.focusNode=e[o+"Container"],t.focusOffset=e[o+"Offset"]}function l(t){var e=t.nativeSelection;t.anchorNode=e.anchorNode,t.anchorOffset=e.anchorOffset,t.focusNode=e.focusNode,t.focusOffset=e.focusOffset}function c(t){t.anchorNode=t.focusNode=null,t.anchorOffset=t.focusOffset=0,t.rangeCount=0,t.isCollapsed=!0,t._ranges.length=0}function u(e){var n;return e instanceof N?(n=t.createNativeRange(e.getDocument()),n.setEnd(e.endContainer,e.endOffset),n.setStart(e.startContainer,e.startOffset)):e instanceof k?n=e.nativeRange:I.implementsDomRange&&e instanceof E.getWindow(e.startContainer).Range&&(n=e),n}function d(t){if(!t.length||1!=t[0].nodeType)return!1;for(var e=1,n=t.length;e<n;++e)if(!E.isAncestorOf(t[0],t[e]))return!1;return!0}function h(t){var n=t.getNodes();if(!d(n))throw e.createError("getSingleElementFromRange: range "+t.inspect()+" did not consist of a single element");return n[0]}function p(t){return!!t&&void 0!==t.text}function f(t,e){var n=new k(e);t._ranges=[n],s(t,n,!1),t.rangeCount=1,t.isCollapsed=n.collapsed}function m(e){if(e._ranges.length=0,"None"==e.docSelection.type)c(e);else{var n=e.docSelection.createRange();if(p(n))f(e,n);else{e.rangeCount=n.length;for(var i,o=L(n.item(0)),r=0;r<e.rangeCount;++r)i=t.createRange(o),i.selectNode(n.item(r)),e._ranges.push(i);e.isCollapsed=1==e.rangeCount&&e._ranges[0].collapsed,s(e,e._ranges[e.rangeCount-1],!1)}}}function g(t,n){for(var i=t.docSelection.createRange(),o=h(n),r=L(i.item(0)),a=P(r).createControlRange(),s=0,l=i.length;s<l;++s)a.add(i.item(s));try{a.add(o)}catch(t){throw e.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}a.select(),m(t)}function v(t,e,n){this.nativeSelection=t,this.docSelection=e,this._ranges=[],this.win=n,this.refresh()}function _(t){t.win=t.anchorNode=t.focusNode=t._ranges=null,t.rangeCount=t.anchorOffset=t.focusOffset=0,t.detached=!0}function w(t,e){for(var n,i,o=Q.length;o--;)if(n=Q[o],i=n.selection,"deleteAll"==e)_(i);else if(n.win==t)return"delete"==e?(Q.splice(o,1),!0):i;return"deleteAll"==e&&(Q.length=0),null}function b(t,n){for(var i,o=L(n[0].startContainer),r=P(o).createControlRange(),a=0,s=n.length;a<s;++a){i=h(n[a]);try{r.add(i)}catch(t){throw e.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}r.select(),m(t)}function y(t,e){if(t.win.document!=L(e))throw new R("WRONG_DOCUMENT_ERR")}function C(e){return function(n,i){var o;this.rangeCount?(o=this.getRangeAt(0),o["set"+(e?"Start":"End")](n,i)):(o=t.createRange(this.win.document),o.setStartAndEnd(n,i)),this.setSingleRange(o,this.isBackward())}}function x(t){var e=[],n=new O(t.anchorNode,t.anchorOffset),i=new O(t.focusNode,t.focusOffset),o="function"==typeof t.getName?t.getName():"Selection";if(void 0!==t.rangeCount)for(var r=0,a=t.rangeCount;r<a;++r)e[r]=N.inspect(t.getRangeAt(r));return"["+o+"(Ranges: "+e.join(", ")+")(anchor: "+n.inspect()+", focus: "+i.inspect()+"]"}t.config.checkSelectionRanges=!0;var S,T,E=t.dom,D=t.util,A=D.isHostMethod,N=t.DomRange,k=t.WrappedRange,R=t.DOMException,O=E.DomPosition,I=t.features,L=E.getDocument,P=E.getBody,M=N.rangesEqual,$=A(window,"getSelection"),F=D.isHostObject(document,"selection");I.implementsWinGetSelection=$,I.implementsDocSelection=F;var H=F&&(!$||t.config.preferTextRange);if(H)S=r,t.isSelectionValid=function(t){var e=i(t,"isSelectionValid").document,n=e.selection;return"None"!=n.type||L(n.createRange().parentElement())==e};else{if(!$)return e.fail("Neither document.selection or window.getSelection() detected."),!1;S=o,t.isSelectionValid=function(){return!0}}t.getNativeSelection=S;var B=S();if(!B)return e.fail("Native selection was null (possibly issue 138?)"),!1;var j=t.createNativeRange(document),z=P(document),W=D.areHostProperties(B,["anchorNode","focusNode","anchorOffset","focusOffset"]);I.selectionHasAnchorAndFocus=W;var q=A(B,"extend");I.selectionHasExtend=q;var U="number"==typeof B.rangeCount;I.selectionHasRangeCount=U;var K=!1,V=!0,G=q?function(e,n){var i=N.getRangeDocument(n),o=t.createRange(i);o.collapseToPoint(n.endContainer,n.endOffset),e.addRange(u(o)),e.extend(n.startContainer,n.startOffset)}:null;D.areHostMethods(B,["addRange","getRangeAt","removeAllRanges"])&&"number"==typeof B.rangeCount&&I.implementsDomRange&&function(){var e=window.getSelection();if(e){for(var n=e.rangeCount,i=n>1,o=[],r=a(e),s=0;s<n;++s)o[s]=e.getRangeAt(s);var l=E.createTestElement(document,"",!1),c=l.appendChild(document.createTextNode(" ")),u=document.createRange();if(u.setStart(c,1),u.collapse(!0),e.removeAllRanges(),e.addRange(u),V=1==e.rangeCount,e.removeAllRanges(),!i){var d=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(d&&parseInt(d[1])>=36)K=!1;else{var h=u.cloneRange();u.setStart(c,0),h.setEnd(c,3),h.setStart(c,2),e.addRange(u),e.addRange(h),K=2==e.rangeCount}}for(E.removeNode(l),e.removeAllRanges(),s=0;s<n;++s)0==s&&r?G?G(e,o[s]):(t.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),e.addRange(o[s])):e.addRange(o[s])}}(),I.selectionSupportsMultipleRanges=K,I.collapsedNonEditableSelectionsSupported=V;var Y,X=!1;z&&A(z,"createControlRange")&&(Y=z.createControlRange(),D.areHostProperties(Y,["item","add"])&&(X=!0)),I.implementsControlRange=X,T=W?function(t){return t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset}:function(t){return!!t.rangeCount&&t.getRangeAt(t.rangeCount-1).collapsed};var J;A(B,"getRangeAt")?J=function(t,e){try{return t.getRangeAt(e)}catch(t){return null}}:W&&(J=function(e){var n=L(e.anchorNode),i=t.createRange(n);return i.setStartAndEnd(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset),i.collapsed!==this.isCollapsed&&i.setStartAndEnd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset),i}),v.prototype=t.selectionPrototype;var Q=[],Z=function(t){if(t&&t instanceof v)return t.refresh(),t;t=i(t,"getNativeSelection");var e=w(t),n=S(t),o=F?r(t):null;return e?(e.nativeSelection=n,e.docSelection=o,e.refresh()):(e=new v(n,o,t),Q.push({win:t,selection:e})),e};t.getSelection=Z,D.createAliasForDeprecatedMethod(t,"getIframeSelection","getSelection");var tt=v.prototype;if(!H&&W&&D.areHostMethods(B,["removeAllRanges","addRange"])){tt.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),c(this)};var et=function(t,e){G(t.nativeSelection,e),t.refresh()};tt.addRange=U?function(e,i){if(X&&F&&"Control"==this.docSelection.type)g(this,e);else if(n(i)&&q)et(this,e);else{var o;K?o=this.rangeCount:(this.removeAllRanges(),o=0);var r=u(e).cloneRange();try{this.nativeSelection.addRange(r)}catch(t){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==o+1){if(t.config.checkSelectionRanges){var a=J(this.nativeSelection,this.rangeCount-1);a&&!M(a,e)&&(e=new k(a))}this._ranges[this.rangeCount-1]=e,s(this,e,ot(this.nativeSelection)),this.isCollapsed=T(this)}else this.refresh()}}:function(t,e){n(e)&&q?et(this,t):(this.nativeSelection.addRange(u(t)),this.refresh())},tt.setRanges=function(t){if(X&&F&&t.length>1)b(this,t);else{this.removeAllRanges();for(var e=0,n=t.length;e<n;++e)this.addRange(t[e])}}}else{if(!(A(B,"empty")&&A(j,"select")&&X&&H))return e.fail("No means of selecting a Range or TextRange was found"),!1;tt.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var t;if(this.anchorNode)t=L(this.anchorNode);else if("Control"==this.docSelection.type){var e=this.docSelection.createRange();e.length&&(t=L(e.item(0)))}t&&(P(t).createTextRange().select(),this.docSelection.empty())}}catch(t){}c(this)},tt.addRange=function(e){"Control"==this.docSelection.type?g(this,e):(t.WrappedTextRange.rangeToTextRange(e).select(),this._ranges[0]=e,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,s(this,e,!1))},tt.setRanges=function(t){this.removeAllRanges();var e=t.length;e>1?b(this,t):e&&this.addRange(t[0])}}tt.getRangeAt=function(t){if(t<0||t>=this.rangeCount)throw new R("INDEX_SIZE_ERR");return this._ranges[t].cloneRange()};var nt;if(H)nt=function(e){var n;t.isSelectionValid(e.win)?n=e.docSelection.createRange():(n=P(e.win.document).createTextRange(),n.collapse(!0)),"Control"==e.docSelection.type?m(e):p(n)?f(e,n):c(e)};else if(A(B,"getRangeAt")&&"number"==typeof B.rangeCount)nt=function(e){if(X&&F&&"Control"==e.docSelection.type)m(e);else if(e._ranges.length=e.rangeCount=e.nativeSelection.rangeCount,e.rangeCount){for(var n=0,i=e.rangeCount;n<i;++n)e._ranges[n]=new t.WrappedRange(e.nativeSelection.getRangeAt(n));s(e,e._ranges[e.rangeCount-1],ot(e.nativeSelection)),e.isCollapsed=T(e)}else c(e)};else{if(!W||"boolean"!=typeof B.isCollapsed||"boolean"!=typeof j.collapsed||!I.implementsDomRange)return e.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;nt=function(t){var e,n=t.nativeSelection;n.anchorNode?(e=J(n,0),t._ranges=[e],t.rangeCount=1,l(t),t.isCollapsed=T(t)):c(t)}}tt.refresh=function(t){var e=t?this._ranges.slice(0):null,n=this.anchorNode,i=this.anchorOffset;if(nt(this),t){var o=e.length;if(o!=this._ranges.length)return!0;if(this.anchorNode!=n||this.anchorOffset!=i)return!0;for(;o--;)if(!M(e[o],this._ranges[o]))return!0;return!1}};var it=function(t,e){var n=t.getAllRanges();t.removeAllRanges();for(var i=0,o=n.length;i<o;++i)M(e,n[i])||t.addRange(n[i]);t.rangeCount||c(t)};tt.removeRange=X&&F?function(t){if("Control"==this.docSelection.type){for(var e,n=this.docSelection.createRange(),i=h(t),o=L(n.item(0)),r=P(o).createControlRange(),a=!1,s=0,l=n.length;s<l;++s)e=n.item(s),e!==i||a?r.add(n.item(s)):a=!0;r.select(),m(this)}else it(this,t)}:function(t){it(this,t)};var ot;!H&&W&&I.implementsDomRange?(ot=a,tt.isBackward=function(){return ot(this)}):ot=tt.isBackward=function(){return!1},tt.isBackwards=tt.isBackward,tt.toString=function(){for(var t=[],e=0,n=this.rangeCount;e<n;++e)t[e]=""+this._ranges[e];return t.join("")},tt.collapse=function(e,n){y(this,e);var i=t.createRange(e);i.collapseToPoint(e,n),this.setSingleRange(i),this.isCollapsed=!0},tt.collapseToStart=function(){if(!this.rangeCount)throw new R("INVALID_STATE_ERR");var t=this._ranges[0];this.collapse(t.startContainer,t.startOffset)},tt.collapseToEnd=function(){if(!this.rangeCount)throw new R("INVALID_STATE_ERR");var t=this._ranges[this.rangeCount-1];this.collapse(t.endContainer,t.endOffset)},tt.selectAllChildren=function(e){y(this,e);var n=t.createRange(e);n.selectNodeContents(e),this.setSingleRange(n)},tt.deleteFromDocument=function(){if(X&&F&&"Control"==this.docSelection.type){for(var t,e=this.docSelection.createRange();e.length;)t=e.item(0),e.remove(t),E.removeNode(t);this.refresh()}else if(this.rangeCount){var n=this.getAllRanges();if(n.length){this.removeAllRanges();for(var i=0,o=n.length;i<o;++i)n[i].deleteContents();this.addRange(n[o-1])}}},tt.eachRange=function(t,e){for(var n=0,i=this._ranges.length;n<i;++n)if(t(this.getRangeAt(n)))return e},tt.getAllRanges=function(){var t=[];return this.eachRange(function(e){t.push(e)}),t},tt.setSingleRange=function(t,e){this.removeAllRanges(),this.addRange(t,e)},tt.callMethodOnEachRange=function(t,e){var n=[];return this.eachRange(function(i){n.push(i[t].apply(i,e||[]))}),n},tt.setStart=C(!0),tt.setEnd=C(!1),t.rangePrototype.select=function(t){Z(this.getDocument()).setSingleRange(this,t)},tt.changeEachRange=function(t){var e=[],n=this.isBackward();this.eachRange(function(n){t(n),e.push(n)}),this.removeAllRanges(),n&&1==e.length?this.addRange(e[0],"backward"):this.setRanges(e)},tt.containsNode=function(t,e){return this.eachRange(function(n){return n.containsNode(t,e)},!0)||!1},tt.getBookmark=function(t){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[t])}},tt.moveToBookmark=function(e){for(var n,i,o=[],r=0;n=e.rangeBookmarks[r++];)i=t.createRange(this.win),i.moveToBookmark(n),o.push(i);e.backward?this.setSingleRange(o[0],"backward"):this.setRanges(o)},tt.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},tt.restoreRanges=function(t){this.removeAllRanges();for(var e,n=0;e=t.ranges[n];++n)this.addRange(e,t.backward&&0==n)},tt.toHtml=function(){var t=[];return this.eachRange(function(e){t.push(N.toHtml(e))}),t.join("")},I.implementsTextRange&&(tt.getNativeTextRange=function(){var n;if(n=this.docSelection){var i=n.createRange();if(p(i))return i;throw e.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return t.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw e.createError("getNativeTextRange: selection contains no range")}),tt.getName=function(){return"WrappedSelection"},tt.inspect=function(){return x(this)},tt.detach=function(){w(this.win,"delete"),_(this)},v.detachAll=function(){w(null,"deleteAll")},v.inspect=x,v.isDirectionBackward=n,t.Selection=v,t.selectionPrototype=tt,t.addShimListener(function(t){void 0===t.getSelection&&(t.getSelection=function(){return Z(t)}),t=null})});var F=!1,H=function(t){F||(F=!0,!I.initialized&&I.config.autoInitialize&&d())};return R&&("complete"==document.readyState?H():(t(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",H,!1),P(window,"load",H))),I})},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function r(t){if(d===clearTimeout)return clearTimeout(t);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){m&&p&&(m=!1,p.length?f=p.concat(f):g=-1,f.length&&s())}function s(){if(!m){var t=o(a);m=!0;for(var e=f.length;e;){for(p=f,f=[];++g<e;)p&&p[g].run();g=-1,e=f.length}p=null,m=!1,r(t)}}function l(t,e){this.fun=t,this.array=e}function c(){}var u,d,h=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(t){u=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(t){d=i}}();var p,f=[],m=!1,g=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new l(t,e)),1!==f.length||m||o(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e){},function(t,e){},function(t,e,n){"use strict";function i(){r.a.prototype.createLink=function(t){var e,n=r.a.selection.getSelectionElement(this.options.contentWindow),i={};if(-1!==this.elements.indexOf(n)){try{if(this.events.disableCustomEvent("editableInput"),t.url&&r.a.util.deprecated(".url option for createLink",".value","6.0.0"),(e=t.url||t.value)&&e.trim().length>0){var o=this.options.contentWindow.getSelection();if(o){var a,s,l,c,u=o.getRangeAt(0),d=u.commonAncestorContainer;if(3===u.endContainer.nodeType&&3!==u.startContainer.nodeType&&0===u.startOffset&&u.startContainer.firstChild===u.endContainer&&(d=u.endContainer),s=r.a.util.getClosestBlockContainer(u.startContainer),l=r.a.util.getClosestBlockContainer(u.endContainer),3!==d.nodeType&&0!==d.textContent.length&&s===l){var h=s||n,p=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),a=this.exportSelection(),p.appendChild(h.cloneNode(!0)),n===h?r.a.selection.select(this.options.ownerDocument,h.firstChild,0,h.lastChild,3===h.lastChild.nodeType?h.lastChild.nodeValue.length:h.lastChild.childNodes.length):r.a.selection.select(this.options.ownerDocument,h,0,h,h.childNodes.length);var f=this.exportSelection();c=r.a.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,p,{start:a.start-f.start,end:a.end-f.start,editableElementIndex:a.editableElementIndex}),0===c.length&&(p=this.options.ownerDocument.createDocumentFragment(),p.appendChild(d.cloneNode(!0)),c=[p.firstChild.firstChild,p.firstChild.lastChild]),r.a.util.createLink(this.options.ownerDocument,c,e.trim());var m=(p.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;r.a.util.insertHTMLCommand(this.options.ownerDocument,p.firstChild.innerHTML.replace(/^\s+/,"")),a.start-=m,a.end-=m,this.importSelection(a)}else this.options.ownerDocument.execCommand("createLink",!1,e);this.options.targetBlank||"_blank"===t.target?r.a.util.setTargetBlank(r.a.selection.getSelectionStart(this.options.ownerDocument),e):r.a.util.removeTargetBlank(r.a.selection.getSelectionStart(this.options.ownerDocument),e),"nofollow"===t.rel?r.a.util.setNofollow(r.a.selection.getSelectionStart(this.options.ownerDocument),e):r.a.util.removeNofollow(r.a.selection.getSelectionStart(this.options.ownerDocument),e),t.buttonClass&&r.a.util.addClassToAnchors(r.a.selection.getSelectionStart(this.options.ownerDocument),t.buttonClass)}}if(this.options.targetBlank||"_blank"===t.target||"nofollow"===t.rel||t.buttonClass){i=this.options.ownerDocument.createEvent("HTMLEvents"),i.initEvent("input",!0,!0,this.options.contentWindow);for(var g=0,v=this.elements.length;g<v;g+=1)this.elements[g].dispatchEvent(i)}}finally{this.events.enableCustomEvent("editableInput")}this.events.triggerCustomEvent("editableInput",i,n)}},r.a.util.setNofollow=function(t,e){var n,i=e||!1;if("a"===t.nodeName.toLowerCase())t.rel="nofollow";else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)!1!==i&&i!==t[n].attributes.href.value||(t[n].rel="nofollow")},r.a.util.removeNofollow=function(t,e){var n;if("a"===t.nodeName.toLowerCase())t.removeAttribute("rel");else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)e===t[n].attributes.href.value&&t[n].removeAttribute("rel")}}e.b=i,n.d(e,"a",function(){return a});var o=n(10),r=n.n(o),a=r.a.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!0,targetCheckboxText:"Open in new tab",nofollowCheckbox:!0,nofollowCheckboxText:"Use nofollow",name:"links",action:"createLink",aria:"link",tagNames:["a"],contentDefault:'<span class="dashicons dashicons-admin-links"></span>',contentFA:'<i class="fa fa-link"></i>',init:function(){r.a.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(t){t.preventDefault(),t.stopPropagation();var e=r.a.selection.getSelectionRange(this.document);return"a"===e.startContainer.nodeName.toLowerCase()||"a"===e.endContainer.nodeName.toLowerCase()||r.a.util.getClosestTag(r.a.selection.getSelectedParentElement(e),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(t){r.a.util.isKey(t,r.a.util.keyCode.K)&&r.a.util.isMetaCtrlKey(t)&&!t.shiftKey&&this.handleClick(t)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var t=['<input type="text" class="medium-editor-toolbar-input" placeholder="',this.placeholderText,'" style="padding-left: 25px; width: 265px;">'];return t.push('<a href="#" class="medium-editor-toolbar-save">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':this.formSaveLabel,"</a>"),t.push('<a href="#" class="medium-editor-toolbar-close">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':this.formCloseLabel,"</a>"),this.targetCheckbox&&t.push('<div class="medium-editor-toolbar-form-row" style="padding-left: 20px;">','<input type="checkbox" class="medium-editor-toolbar-anchor-target">',"<label>",this.targetCheckboxText,"</label>","</div>"),this.nofollowCheckbox&&t.push('<div class="medium-editor-toolbar-form-row" style="padding-left: 20px;">','<input type="checkbox" class="medium-editor-toolbar-anchor-nofollow">',"<label>",this.nofollowCheckboxText,"</label>","</div>"),this.customClassOption&&t.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-button">',"<label>",this.customClassOptionText,"</label>","</div>"),t.join("")},isDisplayed:function(){return r.a.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){r.a.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(t){var e=this.getInput(),n=this.getAnchorTargetCheckbox(),i=this.getAnchorNofollowCheckbox(),o=this.getAnchorButtonCheckbox();if(t=t||{value:""},"string"==typeof t&&(t={value:t}),this.base.saveSelection(),this.hideToolbarDefaultActions(),r.a.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),e.value=t.value,e.focus(),n&&(n.checked="_blank"===t.target),i&&(i.checked="nofollow"===t.rel),o){var a=t.buttonClass?t.buttonClass.split(" "):[];o.checked=-1!==a.indexOf(this.customClassOption)}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var t=this.getAnchorTargetCheckbox(),e=this.getAnchorNofollowCheckbox(),n=this.getAnchorButtonCheckbox(),i={value:this.getInput().value.trim()};return this.linkValidation&&(i.value=this.checkLinkFormat(i.value)),i.target="_self",t&&t.checked&&(i.target="_blank"),i.rel="",e&&e.checked&&(i.rel="nofollow"),n&&n.checked&&(i.buttonClass=this.customClassOption),i},doFormSave:function(){var t=this.getFormOpts();this.completeFormSave(t)},completeFormSave:function(t){this.base.restoreSelection(),this.execAction(this.action,t),this.base.checkSelection()},ensureEncodedUri:function(t){return t===decodeURI(t)?encodeURI(t):t},ensureEncodedUriComponent:function(t){return t===decodeURIComponent(t)?encodeURIComponent(t):t},ensureEncodedParam:function(t){var e=t.split("="),n=e[0],i=e[1];return n+(void 0===i?"":"="+this.ensureEncodedUriComponent(i))},ensureEncodedQuery:function(t){return t.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(t){var e=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,n=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,i=t.split("?"),o=i[0],r=i[1];return n.test(t)?"tel:"+t:(e.test(t)?"":"http://")+this.ensureEncodedUri(o)+(void 0===r?"":"?"+this.ensureEncodedQuery(r))},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(t){var e=t.querySelector(".medium-editor-toolbar-close"),n=t.querySelector(".medium-editor-toolbar-save"),i=t.querySelector(".medium-editor-toolbar-input");this.on(t,"click",this.handleFormClick.bind(this)),this.on(i,"keyup",this.handleTextboxKeyup.bind(this)),this.on(e,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var t=this.document,e=t.createElement("div");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),e.innerHTML=this.getTemplate(),this.attachFormEvents(e),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorNofollowCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-nofollow")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(t){if(t.keyCode===r.a.util.keyCode.ENTER)return t.preventDefault(),void this.doFormSave();t.keyCode===r.a.util.keyCode.ESCAPE&&(t.preventDefault(),this.doFormCancel())},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}})},function(t,e,n){"use strict";(function(t){function n(e){t(e.container).on("click",".wprm-modal-close, .wprm-modal-backdrop",function(){e.changes_made&&!confirm(wprm_temp_admin.modal.text.modal_close_confirm)||e.close()}),t(".wprm-menu").on("click",".wprm-menu-item",function(){var e=t(this),n=e.data("menu"),i=e.data("tab");t(".wprm-menu").removeClass("visible"),t(".wprm-menu").find(".wprm-menu-item").removeClass("active"),e.addClass("active"),t(".wprm-frame-router").find(".wprm-router").removeClass("active"),t(".wprm-frame-router").find("#wprm-menu-"+n).addClass("active");var o=!1;t(".wprm-router").find(".wprm-menu-item").removeClass("active"),t(".wprm-frame-router").find("#wprm-menu-"+n).find(".wprm-menu-item").each(function(e){0!==e&&t(this).data("tab")!=i||(o=t(this))}),o&&o.click(),t(".wprm-frame-title").find("h1").text(e.text())}),t(e.container).on("click",".wprm-frame-title",function(){t(".wprm-menu").toggleClass("visible")}),t(".wprm-router").on("click",".wprm-menu-item",function(){var e=t(this),n=e.data("tab"),i=e.data("button");t(".wprm-router").find(".wprm-menu-item").removeClass("active"),e.addClass("active"),e.data("callback")?(t(".wprm-button-action").text(i).show(),"wprm-menu-recipe"==e.parents(".wprm-router").attr("id")?t(".wprm-button-action-save").show():t(".wprm-button-action-save").hide()):(t(".wprm-button-action").hide(),t(".wprm-button-action-save").hide()),t(".wprm-frame-content").find(".wprm-frame-content-tab").removeClass("active"),t(".wprm-frame-content").find("#wprm-tab-"+n).addClass("active")}),t(".wprm-button-action").on("click",function(){var n=t(".wprm-router.active").find(".wprm-menu-item.active"),i=n.data("callback");i&&"function"==typeof e.actions[i]&&e.actions[i](t(this))}),t(e.container).keydown(function(t){t.stopPropagation()}),t(".wprm-recipes-dropdown").select2_wprm({width:"250px",ajax:{type:"POST",url:wprm_temp_admin.ajax_url,dataType:"json",delay:250,data:function(t){return{action:"wprm_search_recipes",security:wprm_temp_admin.nonce,search:t.term}},processResults:function(t,e){return{results:t.data.recipes_with_id}},cache:!0},minimumInputLength:1}),t(".wprm-recipes-dropdown-with-first").select2_wprm({width:"250px",ajax:{type:"POST",url:wprm_temp_admin.ajax_url,dataType:"json",delay:250,data:function(t){return{action:"wprm_search_recipes",security:wprm_temp_admin.nonce,search:t.term}},processResults:function(t,e){return{results:[{id:"0",text:wprm_temp_admin.modal.text.first_recipe_on_page}].concat(t.data.recipes_with_id)}},cache:!0},minimumInputLength:1})}e.a=n}).call(e,n(0))},function(t,e,n){(function(t){function e(e){var n={action:"wprm_feedback",security:wprm_temp_admin.nonce,answer:e};t.post(wprm_temp_admin.ajax_url,n)}t(document).ready(function(n){var i=t(".wprm-feedback-notice");i.length>0&&(t("#wprm-feedback-stop").on("click",function(){e("stop"),i.slideUp()}),t("#wprm-feedback-no").on("click",function(){e("no");var t="<strong>How could we make it better?</strong><br/>";t+='Please send any issues or suggestions you have to <a href="mailto:support@bootstrapped.ventures?subject=WP%20Recipe%20Maker%20feedback">support@bootstrapped.ventures</a> and we\'ll see what we can do!',i.html(t)}),t("#wprm-feedback-yes").on("click",function(){e("yes");var t="<strong>Happy to hear!</strong><br/>";t+='It would be really helpful if you could leave us an honest review over at <a href="https://wordpress.org/support/plugin/wp-recipe-maker/reviews/#new-post" target="_blank">wordpress.org</a><br/>',t+='Suggestions to make the plugin even better are also very welcome at <a href="mailto:support@bootstrapped.ventures?subject=WP%20Recipe%20Maker%20suggestions">support@bootstrapped.ventures</a>',i.html(t)}))})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(28),o=(n.n(i),n(29)),r=(n.n(o),n(30));n.n(r),n(31)},function(t,e){},function(t,e,n){(function(t){var e=!1;t(document).ready(function(n){t(".wprm-import-recipes-select-all").on("click",function(e){e.preventDefault(),t(".wprm-import-recipes").find(":checkbox").each(function(){t(this).prop("checked",!0)})}),t(".wprm-import-recipes-select-none").on("click",function(e){e.preventDefault(),t(".wprm-import-recipes").find(":checkbox").each(function(){t(this).prop("checked",!1)})}),t(".wprm-import-recipes").on("click",":checkbox",function(n){if(e&&n.shiftKey){var i=t(".wprm-import-recipes").find(":checkbox"),o=i.index(this),r=i.index(e);i.slice(Math.min(o,r),Math.max(o,r)+1).prop("checked",e.checked)}e=this}),t(".wprm-import-next-page").on("click",function(){var t=window.location.href,e=/(&|\?)p=(\d+)/,n=e.exec(t);if(n){var i=parseInt(n[2]),o="p="+i,r="p="+(i+1);t=t.replace("?"+o,"?"+r),t=t.replace("&"+o,"&"+r)}window.location=t}),t(".wprm-import-reset-page").on("click",function(){var t=window.location.href,e=/(&|\?)p=(\d+)/,n=e.exec(t);if(n){var i=parseInt(n[2]),o="p="+i;t=t.replace("?"+o,"?p=0"),t=t.replace("&"+o,"&p=0")}window.location=t})})}).call(e,n(0))},function(t,e,n){(function(t){function e(){var o={action:"wprm_import_recipes",security:wprm_temp_admin.nonce,importer_uid:wprm_import.importer_uid,post_data:wprm_import.post_data,recipes:i};t.post(wprm_temp_admin.ajax_url,o,function(o){o.success?(i=o.data.recipes_left,n(),i.length>0?e():t("#wprm-import-finished").show()):window.location=o.data.redirect},"json")}function n(){var e=100*(1-i.length/o);t("#wprm-import-progress-bar").css("width",e+"%")}var i=[],o=0;t(document).ready(function(t){void 0!==window.wprm_import&&(i=wprm_import.recipes,o=wprm_import.recipes.length,e())})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e=n(1);t(document).ready(function(n){t(document).on("click",".wprm-import-recipes-actions-edit",function(n){n.preventDefault();var i=t(this).data("id");e.a.open(!1,{recipe_id:i})})})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e=n(33),i=n(37),o=n(39);n.n(o),t(document).ready(function(n){t(".wprm-manage-datatable").length>0&&(Object(e.a)(),Object(i.a)())})}).call(e,n(0))},function(t,e,n){"use strict";(function(t,i){function o(){for(var t,e={},n=location.search.slice(1),i=/([^&=]+)=([^&]*)/g;t=i.exec(n);)e[decodeURIComponent(t[1])]=decodeURIComponent(t[2]);return e}function r(e){var n=o();t(".wprm-manage-recipes-filter").on("change",function(){e.search("").draw()}).each(function(){var e=t(this).data("taxonomy");n.hasOwnProperty(e)&&t(this).find("option[value='"+n[e]+"']").length>0&&t(this).val(n[e])}).select2_wprm().trigger("change")}function a(){var e="";t(".wprm-manage-datatable").each(function(){e=t(this).attr("id")}),i.fn.dataTable.ext.errMode="throw",r(t(".wprm-manage-datatable").DataTable({pageLength:10,order:[0,"desc"],serverSide:!0,ajax:{url:wprm_temp_admin.ajax_url,type:"POST",data:function(n){n.action="wprm_manage_datatable",n.security=wprm_temp_admin.nonce,n.table=e;var i=t(".wprm-manage-recipes-filter");if(i.length>0){var o=t("#wprm-manage-recipes_wrapper").find('input[type="search"]').val();i.each(function(){var e=t(this).data("taxonomy"),n=parseInt(t(this).val());n>0&&(o+="{{"+e+"="+n+"}}")}),n.search.value=o}}},drawCallback:function(){t(".wprm-manage-datatable").find("select").select2_wprm(),t(".wprm-manage-ingredients-actions").tooltipster({content:'<div class="wprm-manage-ingredients-actions-tooltip">'+wprm_temp_admin.manage.tooltip.ingredients+"</div>",contentAsHTML:!0,functionBefore:function(){var e=t.tooltipster.instances();t.each(e,function(t,e){e.close()})},functionReady:function(e,n){var i=parseInt(t(n.origin).data("id")),o=parseInt(t(n.origin).data("count")),r=t("#wprm-manage-ingredients-name-"+i).text();t(n.tooltip).find("a").data("id",i),t(n.tooltip).find(".tooltip-header").text("#"+i+" - "+r),o>0&&t(n.tooltip).find(".wprm-manage-ingredients-actions-delete").remove();var a=t(n.tooltip).find(".tooltipster-content > div");t(n.tooltip).height(a.outerHeight(!0)+15)},interactive:!0,delay:0,side:"left",trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{click:!0,tap:!0}}),t(".wprm-manage-taxonomies-actions").tooltipster({content:'<div class="wprm-manage-taxonomies-actions-tooltip">'+wprm_temp_admin.manage.tooltip.taxonomies+"</div>",contentAsHTML:!0,functionBefore:function(){var e=t.tooltipster.instances();t.each(e,function(t,e){e.close()})},functionReady:function(e,n){var i=parseInt(t(n.origin).data("id")),o=(parseInt(t(n.origin).data("count")),t("#wprm-manage-taxonomies-name-"+i).text());t(n.tooltip).find("a").data("id",i),t(n.tooltip).find(".tooltip-header").text("#"+i+" - "+o);var r=t(n.tooltip).find(".tooltipster-content > div");t(n.tooltip).height(r.outerHeight(!0)+15)},interactive:!0,delay:0,side:"left",trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{click:!0,tap:!0}}),t(".wprm-manage-recipes-actions").tooltipster({content:'<div class="wprm-manage-recipes-actions-tooltip">'+wprm_temp_admin.manage.tooltip.recipes+"</div>",contentAsHTML:!0,functionBefore:function(){var e=t.tooltipster.instances();t.each(e,function(t,e){e.close()})},functionReady:function(e,n){var i=parseInt(t(n.origin).data("id")),o=t("#wprm-manage-recipes-name-"+i).text();t(n.tooltip).find(".tooltip-header").text("#"+i+" - "+o),t(n.tooltip).find("a").data("id",i);var r=t(n.tooltip).find(".tooltipster-content > div");t(n.tooltip).height(r.outerHeight(!0)+15)},interactive:!0,delay:0,side:"left",trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{click:!0,tap:!0}}),t(".wprm-manage-recipes-seo").tooltipster({delay:0,side:"left"})}}))}e.a=a;var s=n(7),l=(n.n(s),n(8)),c=(n.n(l),n(11)),u=(n.n(c),n(34)),d=(n.n(u),n(35)),h=(n.n(d),n(36));n.n(h)}).call(e,n(0),n(0))},function(t,e){},function(t,e,n){var i,o;/*! tooltipster v4.2.5 */!function(r,a){i=[n(0)],void 0!==(o=function(t){return a(t)}.apply(e,i))&&(t.exports=o)}(0,function(t){function e(t){this.$container,this.constraints=null,this.__$tooltip,this.__init(t)}function n(e,n){var i=!0;return t.each(e,function(t,o){return void 0===n[t]||e[t]!==n[t]?(i=!1,!1):void 0}),i}function i(e){var n=e.attr("id"),i=n?a.window.document.getElementById(n):null;return i?i===e[0]:t.contains(a.window.document.body,e[0])}var o={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},r="undefined"!=typeof window?window:null,a={hasTouchCapability:!(!r||!("ontouchstart"in r||r.DocumentTouch&&r.document instanceof r.DocumentTouch||r.navigator.maxTouchPoints)),hasTransitions:function(){if(!r)return!1;var t=r.document.body||r.document.documentElement,e=t.style,n="transition",i=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof e[n])return!0;n=n.charAt(0).toUpperCase()+n.substr(1);for(var o=0;o<i.length;o++)if("string"==typeof e[i[o]+n])return!0;return!1}(),IE:!1,semVer:"4.2.5",window:r},s=function(){this.__$emitterPrivate=t({}),this.__$emitterPublic=t({}),this.__instancesLatestArr=[],this.__plugins={},this._env=a};s.prototype={__bridge:function(e,n,i){if(!n[i]){var r=function(){};r.prototype=e;var a=new r;a.__init&&a.__init(n),t.each(e,function(t,e){0!=t.indexOf("__")&&(n[t]?o.debug&&console.log("The "+t+" method of the "+i+" plugin conflicts with another plugin or native methods"):(n[t]=function(){return a[t].apply(a,Array.prototype.slice.apply(arguments))},n[t].bridged=a))}),n[i]=a}return this},__setWindow:function(t){return a.window=t,this},_getRuler:function(t){return new e(t)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(e){var n=this;if("string"==typeof e){var i=e,o=null;return i.indexOf(".")>0?o=n.__plugins[i]:t.each(n.__plugins,function(t,e){return e.name.substring(e.name.length-i.length-1)=="."+i?(o=e,!1):void 0}),o}if(e.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return n.__plugins[e.name]=e,e.core&&n.__bridge(e.core,n,e.name),this},_trigger:function(){var t=Array.prototype.slice.apply(arguments);return"string"==typeof t[0]&&(t[0]={type:t[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,t),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,t),this},instances:function(e){var n=[];return t(e||".tooltipstered").each(function(){var e=t(this),i=e.data("tooltipster-ns");i&&t.each(i,function(t,i){n.push(e.data(i))})}),n},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(e){return t((e?e+" ":"")+".tooltipstered").toArray()},setDefaults:function(e){return t.extend(o,e),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},t.tooltipster=new s,t.Tooltipster=function(e,n){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=t({}),this.__$emitterPublic=t({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(e,n)},t.Tooltipster.prototype={__init:function(e,n){var i=this;if(i._$origin=t(e),i.__options=t.extend(!0,{},o,n),i.__optionsFormat(),!a.IE||a.IE>=i.__options.IEmin){var r=null;if(void 0===i._$origin.data("tooltipster-initialTitle")&&(r=i._$origin.attr("title"),void 0===r&&(r=null),i._$origin.data("tooltipster-initialTitle",r)),null!==i.__options.content)i.__contentSet(i.__options.content);else{var s,l=i._$origin.attr("data-tooltip-content");l&&(s=t(l)),s&&s[0]?i.__contentSet(s.first()):i.__contentSet(r)}i._$origin.removeAttr("title").addClass("tooltipstered"),i.__prepareOrigin(),i.__prepareGC(),t.each(i.__options.plugins,function(t,e){i._plug(e)}),a.hasTouchCapability&&t(a.window.document.body).on("touchmove."+i.__namespace+"-triggerOpen",function(t){i._touchRecordEvent(t)}),i._on("created",function(){i.__prepareTooltip()})._on("repositioned",function(t){i.__lastPosition=t.position})}else i.__options.disabled=!0},__contentInsert:function(){var t=this,e=t._$tooltip.find(".tooltipster-content"),n=t.__Content,i=function(t){n=t};return t._trigger({type:"format",content:t.__Content,format:i}),t.__options.functionFormat&&(n=t.__options.functionFormat.call(t,t,{origin:t._$origin[0]},t.__Content)),"string"!=typeof n||t.__options.contentAsHTML?e.empty().append(n):e.text(n),t},__contentSet:function(e){return e instanceof t&&this.__options.contentCloning&&(e=e.clone(!0)),this.__Content=e,this._trigger({type:"updated",content:e}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var e=this,n=e._$origin,i=e._$origin.is("area");if(i){var o=e._$origin.parent().attr("name");n=t('img[usemap="#'+o+'"]')}var r=n[0].getBoundingClientRect(),s=t(a.window.document),l=t(a.window),c=n,u={available:{document:null,window:null},document:{size:{height:s.height(),width:s.width()}},window:{scroll:{left:a.window.scrollX||a.window.document.documentElement.scrollLeft,top:a.window.scrollY||a.window.document.documentElement.scrollTop},size:{height:l.height(),width:l.width()}},origin:{fixedLineage:!1,offset:{},size:{height:r.bottom-r.top,width:r.right-r.left},usemapImage:i?n[0]:null,windowOffset:{bottom:r.bottom,left:r.left,right:r.right,top:r.top}}};if(i){var d=e._$origin.attr("shape"),h=e._$origin.attr("coords");if(h&&(h=h.split(","),t.map(h,function(t,e){h[e]=parseInt(t)})),"default"!=d)switch(d){case"circle":var p=h[0],f=h[1],m=h[2],g=f-m,v=p-m;u.origin.size.height=2*m,u.origin.size.width=u.origin.size.height,u.origin.windowOffset.left+=v,u.origin.windowOffset.top+=g;break;case"rect":var _=h[0],w=h[1],b=h[2],y=h[3];u.origin.size.height=y-w,u.origin.size.width=b-_,u.origin.windowOffset.left+=_,u.origin.windowOffset.top+=w;break;case"poly":for(var C=0,x=0,S=0,T=0,E="even",D=0;D<h.length;D++){var A=h[D];"even"==E?(A>S&&(S=A,0===D&&(C=S)),C>A&&(C=A),E="odd"):(A>T&&(T=A,1==D&&(x=T)),x>A&&(x=A),E="even")}u.origin.size.height=T-x,u.origin.size.width=S-C,u.origin.windowOffset.left+=C,u.origin.windowOffset.top+=x}}var N=function(t){u.origin.size.height=t.height,u.origin.windowOffset.left=t.left,u.origin.windowOffset.top=t.top,u.origin.size.width=t.width};for(e._trigger({type:"geometry",edit:N,geometry:{height:u.origin.size.height,left:u.origin.windowOffset.left,top:u.origin.windowOffset.top,width:u.origin.size.width}}),u.origin.windowOffset.right=u.origin.windowOffset.left+u.origin.size.width,u.origin.windowOffset.bottom=u.origin.windowOffset.top+u.origin.size.height,u.origin.offset.left=u.origin.windowOffset.left+u.window.scroll.left,u.origin.offset.top=u.origin.windowOffset.top+u.window.scroll.top,u.origin.offset.bottom=u.origin.offset.top+u.origin.size.height,u.origin.offset.right=u.origin.offset.left+u.origin.size.width,u.available.document={bottom:{height:u.document.size.height-u.origin.offset.bottom,width:u.document.size.width},left:{height:u.document.size.height,width:u.origin.offset.left},right:{height:u.document.size.height,width:u.document.size.width-u.origin.offset.right},top:{height:u.origin.offset.top,width:u.document.size.width}},u.available.window={bottom:{height:Math.max(u.window.size.height-Math.max(u.origin.windowOffset.bottom,0),0),width:u.window.size.width},left:{height:u.window.size.height,width:Math.max(u.origin.windowOffset.left,0)},right:{height:u.window.size.height,width:Math.max(u.window.size.width-Math.max(u.origin.windowOffset.right,0),0)},top:{height:Math.max(u.origin.windowOffset.top,0),width:u.window.size.width}};"html"!=c[0].tagName.toLowerCase();){if("fixed"==c.css("position")){u.origin.fixedLineage=!0;break}c=c.parent()}return u},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=t(a.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=t(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var e=this;return e.__options.selfDestruction?e.__garbageCollector=setInterval(function(){var n=(new Date).getTime();e.__touchEvents=t.grep(e.__touchEvents,function(t,e){return n-t.time>6e4}),i(e._$origin)||e.close(function(){e.destroy()})},2e4):clearInterval(e.__garbageCollector),e},__prepareOrigin:function(){var t=this;if(t._$origin.off("."+t.__namespace+"-triggerOpen"),a.hasTouchCapability&&t._$origin.on("touchstart."+t.__namespace+"-triggerOpen touchend."+t.__namespace+"-triggerOpen touchcancel."+t.__namespace+"-triggerOpen",function(e){t._touchRecordEvent(e)}),t.__options.triggerOpen.click||t.__options.triggerOpen.tap&&a.hasTouchCapability){var e="";t.__options.triggerOpen.click&&(e+="click."+t.__namespace+"-triggerOpen "),t.__options.triggerOpen.tap&&a.hasTouchCapability&&(e+="touchend."+t.__namespace+"-triggerOpen"),t._$origin.on(e,function(e){t._touchIsMeaningfulEvent(e)&&t._open(e)})}if(t.__options.triggerOpen.mouseenter||t.__options.triggerOpen.touchstart&&a.hasTouchCapability){var e="";t.__options.triggerOpen.mouseenter&&(e+="mouseenter."+t.__namespace+"-triggerOpen "),t.__options.triggerOpen.touchstart&&a.hasTouchCapability&&(e+="touchstart."+t.__namespace+"-triggerOpen"),t._$origin.on(e,function(e){!t._touchIsTouchEvent(e)&&t._touchIsEmulatedEvent(e)||(t.__pointerIsOverOrigin=!0,t._openShortly(e))})}if(t.__options.triggerClose.mouseleave||t.__options.triggerClose.touchleave&&a.hasTouchCapability){var e="";t.__options.triggerClose.mouseleave&&(e+="mouseleave."+t.__namespace+"-triggerOpen "),t.__options.triggerClose.touchleave&&a.hasTouchCapability&&(e+="touchend."+t.__namespace+"-triggerOpen touchcancel."+t.__namespace+"-triggerOpen"),t._$origin.on(e,function(e){t._touchIsMeaningfulEvent(e)&&(t.__pointerIsOverOrigin=!1)})}return t},__prepareTooltip:function(){var e=this,n=e.__options.interactive?"auto":"";return e._$tooltip.attr("id",e.__namespace).css({"pointer-events":n,zIndex:e.__options.zIndex}),t.each(e.__previousThemes,function(t,n){e._$tooltip.removeClass(n)}),t.each(e.__options.theme,function(t,n){e._$tooltip.addClass(n)}),e.__previousThemes=t.merge([],e.__options.theme),e},__scrollHandler:function(e){var n=this;if(n.__options.triggerClose.scroll)n._close(e);else if(i(n._$origin)&&i(n._$tooltip)){var o=null;if(e.target===a.window.document)n.__Geometry.origin.fixedLineage||n.__options.repositionOnScroll&&n.reposition(e);else{o=n.__geometry();var r=!1;if("fixed"!=n._$origin.css("position")&&n.__$originParents.each(function(e,n){var i=t(n),a=i.css("overflow-x"),s=i.css("overflow-y");if("visible"!=a||"visible"!=s){var l=n.getBoundingClientRect();if("visible"!=a&&(o.origin.windowOffset.left<l.left||o.origin.windowOffset.right>l.right))return r=!0,!1;if("visible"!=s&&(o.origin.windowOffset.top<l.top||o.origin.windowOffset.bottom>l.bottom))return r=!0,!1}return"fixed"!=i.css("position")&&void 0}),r)n._$tooltip.css("visibility","hidden");else if(n._$tooltip.css("visibility","visible"),n.__options.repositionOnScroll)n.reposition(e);else{var s=o.origin.offset.left-n.__Geometry.origin.offset.left,l=o.origin.offset.top-n.__Geometry.origin.offset.top;n._$tooltip.css({left:n.__lastPosition.coord.left+s,top:n.__lastPosition.coord.top+l})}}n._trigger({type:"scroll",event:e,geo:o})}return n},__stateSet:function(t){return this.__state=t,this._trigger({type:"state",state:t}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,t.each(this.__timeouts.close,function(t,e){clearTimeout(e)}),this.__timeouts.close=[],this},__trackerStart:function(){var t=this,e=t._$tooltip.find(".tooltipster-content");return t.__options.trackTooltip&&(t.__contentBcr=e[0].getBoundingClientRect()),t.__tracker=setInterval(function(){if(i(t._$origin)&&i(t._$tooltip)){if(t.__options.trackOrigin){var o=t.__geometry(),r=!1;n(o.origin.size,t.__Geometry.origin.size)&&(t.__Geometry.origin.fixedLineage?n(o.origin.windowOffset,t.__Geometry.origin.windowOffset)&&(r=!0):n(o.origin.offset,t.__Geometry.origin.offset)&&(r=!0)),r||(t.__options.triggerClose.mouseleave?t._close():t.reposition())}if(t.__options.trackTooltip){var a=e[0].getBoundingClientRect();a.height===t.__contentBcr.height&&a.width===t.__contentBcr.width||(t.reposition(),t.__contentBcr=a)}}else t._close()},t.__options.trackerInterval),t},_close:function(e,n,i){var o=this,r=!0;if(o._trigger({type:"close",event:e,stop:function(){r=!1}}),r||i){n&&o.__callbacks.close.push(n),o.__callbacks.open=[],o.__timeoutsClear();var s=function(){t.each(o.__callbacks.close,function(t,n){n.call(o,o,{event:e,origin:o._$origin[0]})}),o.__callbacks.close=[]};if("closed"!=o.__state){var l=!0,c=new Date,u=c.getTime(),d=u+o.__options.animationDuration[1];if("disappearing"==o.__state&&d>o.__closingTime&&o.__options.animationDuration[1]>0&&(l=!1),l){o.__closingTime=d,"disappearing"!=o.__state&&o.__stateSet("disappearing");var h=function(){clearInterval(o.__tracker),o._trigger({type:"closing",event:e}),o._$tooltip.off("."+o.__namespace+"-triggerClose").removeClass("tooltipster-dying"),t(a.window).off("."+o.__namespace+"-triggerClose"),o.__$originParents.each(function(e,n){t(n).off("scroll."+o.__namespace+"-triggerClose")}),o.__$originParents=null,t(a.window.document.body).off("."+o.__namespace+"-triggerClose"),o._$origin.off("."+o.__namespace+"-triggerClose"),o._off("dismissable"),o.__stateSet("closed"),o._trigger({type:"after",event:e}),o.__options.functionAfter&&o.__options.functionAfter.call(o,o,{event:e,origin:o._$origin[0]}),s()};a.hasTransitions?(o._$tooltip.css({"-moz-animation-duration":o.__options.animationDuration[1]+"ms","-ms-animation-duration":o.__options.animationDuration[1]+"ms","-o-animation-duration":o.__options.animationDuration[1]+"ms","-webkit-animation-duration":o.__options.animationDuration[1]+"ms","animation-duration":o.__options.animationDuration[1]+"ms","transition-duration":o.__options.animationDuration[1]+"ms"}),o._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),o.__options.animationDuration[1]>0&&o._$tooltip.delay(o.__options.animationDuration[1]),o._$tooltip.queue(h)):o._$tooltip.stop().fadeOut(o.__options.animationDuration[1],h)}}else s()}return o},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(e,n){var o=this;if(!o.__destroying&&i(o._$origin)&&o.__enabled){var r=!0;if("closed"==o.__state&&(o._trigger({type:"before",event:e,stop:function(){r=!1}}),r&&o.__options.functionBefore&&(r=o.__options.functionBefore.call(o,o,{event:e,origin:o._$origin[0]}))),!1!==r&&null!==o.__Content){n&&o.__callbacks.open.push(n),o.__callbacks.close=[],o.__timeoutsClear();var s,l=function(){"stable"!=o.__state&&o.__stateSet("stable"),t.each(o.__callbacks.open,function(t,e){e.call(o,o,{origin:o._$origin[0],tooltip:o._$tooltip[0]})}),o.__callbacks.open=[]};if("closed"!==o.__state)s=0,"disappearing"===o.__state?(o.__stateSet("appearing"),a.hasTransitions?(o._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),o.__options.animationDuration[0]>0&&o._$tooltip.delay(o.__options.animationDuration[0]),o._$tooltip.queue(l)):o._$tooltip.stop().fadeIn(l)):"stable"==o.__state&&l();else{if(o.__stateSet("appearing"),s=o.__options.animationDuration[0],o.__contentInsert(),o.reposition(e,!0),a.hasTransitions?(o._$tooltip.addClass("tooltipster-"+o.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":o.__options.animationDuration[0]+"ms","-ms-animation-duration":o.__options.animationDuration[0]+"ms","-o-animation-duration":o.__options.animationDuration[0]+"ms","-webkit-animation-duration":o.__options.animationDuration[0]+"ms","animation-duration":o.__options.animationDuration[0]+"ms","transition-duration":o.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=o.__state&&(o._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),o.__options.animationDuration[0]>0&&o._$tooltip.delay(o.__options.animationDuration[0]),o._$tooltip.queue(l))},0)):o._$tooltip.css("display","none").fadeIn(o.__options.animationDuration[0],l),o.__trackerStart(),t(a.window).on("resize."+o.__namespace+"-triggerClose",function(e){var n=t(document.activeElement);(n.is("input")||n.is("textarea"))&&t.contains(o._$tooltip[0],n[0])||o.reposition(e)}).on("scroll."+o.__namespace+"-triggerClose",function(t){o.__scrollHandler(t)}),o.__$originParents=o._$origin.parents(),o.__$originParents.each(function(e,n){t(n).on("scroll."+o.__namespace+"-triggerClose",function(t){o.__scrollHandler(t)})}),o.__options.triggerClose.mouseleave||o.__options.triggerClose.touchleave&&a.hasTouchCapability){o._on("dismissable",function(t){t.dismissable?t.delay?(h=setTimeout(function(){o._close(t.event)},t.delay),o.__timeouts.close.push(h)):o._close(t):clearTimeout(h)});var c=o._$origin,u="",d="",h=null;o.__options.interactive&&(c=c.add(o._$tooltip)),o.__options.triggerClose.mouseleave&&(u+="mouseenter."+o.__namespace+"-triggerClose ",d+="mouseleave."+o.__namespace+"-triggerClose "),o.__options.triggerClose.touchleave&&a.hasTouchCapability&&(u+="touchstart."+o.__namespace+"-triggerClose",d+="touchend."+o.__namespace+"-triggerClose touchcancel."+o.__namespace+"-triggerClose"),c.on(d,function(t){if(o._touchIsTouchEvent(t)||!o._touchIsEmulatedEvent(t)){var e="mouseleave"==t.type?o.__options.delay:o.__options.delayTouch;o._trigger({delay:e[1],dismissable:!0,event:t,type:"dismissable"})}}).on(u,function(t){!o._touchIsTouchEvent(t)&&o._touchIsEmulatedEvent(t)||o._trigger({dismissable:!1,event:t,type:"dismissable"})})}o.__options.triggerClose.originClick&&o._$origin.on("click."+o.__namespace+"-triggerClose",function(t){o._touchIsTouchEvent(t)||o._touchIsEmulatedEvent(t)||o._close(t)}),(o.__options.triggerClose.click||o.__options.triggerClose.tap&&a.hasTouchCapability)&&setTimeout(function(){if("closed"!=o.__state){var e="",n=t(a.window.document.body);o.__options.triggerClose.click&&(e+="click."+o.__namespace+"-triggerClose "),o.__options.triggerClose.tap&&a.hasTouchCapability&&(e+="touchend."+o.__namespace+"-triggerClose"),n.on(e,function(e){o._touchIsMeaningfulEvent(e)&&(o._touchRecordEvent(e),o.__options.interactive&&t.contains(o._$tooltip[0],e.target)||o._close(e))}),o.__options.triggerClose.tap&&a.hasTouchCapability&&n.on("touchstart."+o.__namespace+"-triggerClose",function(t){o._touchRecordEvent(t)})}},0),o._trigger("ready"),o.__options.functionReady&&o.__options.functionReady.call(o,o,{origin:o._$origin[0],tooltip:o._$tooltip[0]})}if(o.__options.timer>0){var h=setTimeout(function(){o._close()},o.__options.timer+s);o.__timeouts.close.push(h)}}}return o},_openShortly:function(t){var e=this,n=!0;if("stable"!=e.__state&&"appearing"!=e.__state&&!e.__timeouts.open&&(e._trigger({type:"start",event:t,stop:function(){n=!1}}),n)){var i=0==t.type.indexOf("touch")?e.__options.delayTouch:e.__options.delay;i[0]?e.__timeouts.open=setTimeout(function(){e.__timeouts.open=null,e.__pointerIsOverOrigin&&e._touchIsMeaningfulEvent(t)?(e._trigger("startend"),e._open(t)):e._trigger("startcancel")},i[0]):(e._trigger("startend"),e._open(t))}return e},_optionsExtract:function(e,n){var i=this,o=t.extend(!0,{},n),r=i.__options[e];return r||(r={},t.each(n,function(t,e){var n=i.__options[t];void 0!==n&&(r[t]=n)})),t.each(o,function(e,n){void 0!==r[e]&&("object"!=typeof n||n instanceof Array||null==n||"object"!=typeof r[e]||r[e]instanceof Array||null==r[e]?o[e]=r[e]:t.extend(o[e],r[e]))}),o},_plug:function(e){var n=t.tooltipster._plugin(e);if(!n)throw new Error('The "'+e+'" plugin is not defined');return n.instance&&t.tooltipster.__bridge(n.instance,this,n.name),this},_touchIsEmulatedEvent:function(t){for(var e=!1,n=(new Date).getTime(),i=this.__touchEvents.length-1;i>=0;i--){var o=this.__touchEvents[i];if(!(n-o.time<500))break;o.target===t.target&&(e=!0)}return e},_touchIsMeaningfulEvent:function(t){return this._touchIsTouchEvent(t)&&!this._touchSwiped(t.target)||!this._touchIsTouchEvent(t)&&!this._touchIsEmulatedEvent(t)},_touchIsTouchEvent:function(t){return 0==t.type.indexOf("touch")},_touchRecordEvent:function(t){return this._touchIsTouchEvent(t)&&(t.time=(new Date).getTime(),this.__touchEvents.push(t)),this},_touchSwiped:function(t){for(var e=!1,n=this.__touchEvents.length-1;n>=0;n--){var i=this.__touchEvents[n];if("touchmove"==i.type){e=!0;break}if("touchstart"==i.type&&t===i.target)break}return e},_trigger:function(){var e=Array.prototype.slice.apply(arguments);return"string"==typeof e[0]&&(e[0]={type:e[0]}),e[0].instance=this,e[0].origin=this._$origin?this._$origin[0]:null,e[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,e),t.tooltipster._trigger.apply(t.tooltipster,e),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,e),this},_unplug:function(e){var n=this;if(n[e]){var i=t.tooltipster._plugin(e);i.instance&&t.each(i.instance,function(t,i){n[t]&&n[t].bridged===n[e]&&delete n[t]}),n[e].__destroy&&n[e].__destroy(),delete n[e]}return n},close:function(t){return this.__destroyed?this.__destroyError():this._close(null,t),this},content:function(t){var e=this;if(void 0===t)return e.__Content;if(e.__destroyed)e.__destroyError();else if(e.__contentSet(t),null!==e.__Content){if("closed"!==e.__state&&(e.__contentInsert(),e.reposition(),e.__options.updateAnimation))if(a.hasTransitions){var n=e.__options.updateAnimation;e._$tooltip.addClass("tooltipster-update-"+n),setTimeout(function(){"closed"!=e.__state&&e._$tooltip.removeClass("tooltipster-update-"+n)},1e3)}else e._$tooltip.fadeTo(200,.5,function(){"closed"!=e.__state&&e._$tooltip.fadeTo(200,1)})}else e._close();return e},destroy:function(){var e=this;if(e.__destroyed)e.__destroyError();else{"closed"!=e.__state?e.option("animationDuration",0)._close(null,null,!0):e.__timeoutsClear(),e._trigger("destroy"),e.__destroyed=!0,e._$origin.removeData(e.__namespace).off("."+e.__namespace+"-triggerOpen"),t(a.window.document.body).off("."+e.__namespace+"-triggerOpen");var n=e._$origin.data("tooltipster-ns");if(n)if(1===n.length){var i=null;"previous"==e.__options.restoration?i=e._$origin.data("tooltipster-initialTitle"):"current"==e.__options.restoration&&(i="string"==typeof e.__Content?e.__Content:t("<div></div>").append(e.__Content).html()),i&&e._$origin.attr("title",i),e._$origin.removeClass("tooltipstered"),e._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else n=t.grep(n,function(t,n){return t!==e.__namespace}),e._$origin.data("tooltipster-ns",n);e._trigger("destroyed"),e._off(),e.off(),e.__Content=null,e.__$emitterPrivate=null,e.__$emitterPublic=null,e.__options.parent=null,e._$origin=null,e._$tooltip=null,t.tooltipster.__instancesLatestArr=t.grep(t.tooltipster.__instancesLatestArr,function(t,n){return e!==t}),clearInterval(e.__garbageCollector)}return e},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return this.__destroyed?void this.__destroyError():this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(t){return this.close(t)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(t){return this.__destroyed?this.__destroyError():this._open(null,t),this},option:function(e,n){return void 0===n?this.__options[e]:(this.__destroyed?this.__destroyError():(this.__options[e]=n,this.__optionsFormat(),t.inArray(e,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===e&&this.__prepareGC()),this)},reposition:function(t,e){var n=this;return n.__destroyed?n.__destroyError():"closed"!=n.__state&&i(n._$origin)&&(e||i(n._$tooltip))&&(e||n._$tooltip.detach(),n.__Geometry=n.__geometry(),n._trigger({type:"reposition",event:t,helper:{geo:n.__Geometry}})),n},show:function(t){return this.open(t)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},t.fn.tooltipster=function(){var e=Array.prototype.slice.apply(arguments),n="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";if(0===this.length)return this;if("string"==typeof e[0]){var i="#*$~&";return this.each(function(){var o=t(this).data("tooltipster-ns"),r=o?t(this).data(o[0]):null;if(!r)throw new Error("You called Tooltipster's \""+e[0]+'" method on an uninitialized element');if("function"!=typeof r[e[0]])throw new Error('Unknown method "'+e[0]+'"');this.length>1&&"content"==e[0]&&(e[1]instanceof t||"object"==typeof e[1]&&null!=e[1]&&e[1].tagName)&&!r.__options.contentCloning&&r.__options.debug&&console.log(n);var a=r[e[0]](e[1],e[2]);return a!==r||"instance"===e[0]?(i=a,!1):void 0}),"#*$~&"!==i?i:this}t.tooltipster.__instancesLatestArr=[];var r=e[0]&&void 0!==e[0].multiple,a=r&&e[0].multiple||!r&&o.multiple,s=e[0]&&void 0!==e[0].content,l=s&&e[0].content||!s&&o.content,c=e[0]&&void 0!==e[0].contentCloning,u=c&&e[0].contentCloning||!c&&o.contentCloning,d=e[0]&&void 0!==e[0].debug,h=d&&e[0].debug||!d&&o.debug;return this.length>1&&(l instanceof t||"object"==typeof l&&null!=l&&l.tagName)&&!u&&h&&console.log(n),this.each(function(){var n=!1,i=t(this),o=i.data("tooltipster-ns"),r=null;o?a?n=!0:h&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):n=!0,n&&(r=new t.Tooltipster(this,e[0]),o||(o=[]),o.push(r.__namespace),i.data("tooltipster-ns",o),i.data(r.__namespace,r),r.__options.functionInit&&r.__options.functionInit.call(r,r,{origin:this}),r._trigger("init")),t.tooltipster.__instancesLatestArr.push(r)}),this},e.prototype={__init:function(e){this.__$tooltip=e,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=t('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(a.window.document.body)},__forceRedraw:function(){var t=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(t)},constrain:function(t,e){return this.constraints={width:t,height:e},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:t}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var t=this.__$tooltip[0].getBoundingClientRect(),e={size:{height:t.height||t.bottom-t.top,width:t.width||t.right-t.left}};if(this.constraints){var n=this.__$tooltip.find(".tooltipster-content"),i=this.__$tooltip.outerHeight(),o=n[0].getBoundingClientRect(),r={height:i<=this.constraints.height,width:t.width<=this.constraints.width&&o.width>=n[0].scrollWidth-1};e.fits=r.height&&r.width}return a.IE&&a.IE<=11&&e.size.width!==a.window.document.documentElement.clientWidth&&(e.size.width=Math.ceil(e.size.width)+1),e}};var l=navigator.userAgent.toLowerCase();-1!=l.indexOf("msie")?a.IE=parseInt(l.split("msie")[1]):-1!==l.toLowerCase().indexOf("trident")&&-1!==l.indexOf(" rv:11")?a.IE=11:-1!=l.toLowerCase().indexOf("edge/")&&(a.IE=parseInt(l.toLowerCase().split("edge/")[1]));var c="tooltipster.sideTip";return t.tooltipster._plugin({name:c,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(t){var e=this;e.__instance=t,e.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),e.__previousState="closed",e.__options,e.__optionsFormat(),e.__instance._on("state."+e.__namespace,function(t){"closed"==t.state?e.__close():"appearing"==t.state&&"closed"==e.__previousState&&e.__create(),e.__previousState=t.state}),e.__instance._on("options."+e.__namespace,function(){e.__optionsFormat()}),e.__instance._on("reposition."+e.__namespace,function(t){e.__reposition(t.event,t.helper)})},__close:function(){this.__instance.content()instanceof t&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var e=t('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||e.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&e.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&e.css("max-width",this.__options.maxWidth+"px"),this.__instance._$tooltip=e,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var e=this;if(e.__options=e.__instance._optionsExtract(c,e.__defaults()),e.__options.position&&(e.__options.side=e.__options.position),"object"!=typeof e.__options.distance&&(e.__options.distance=[e.__options.distance]),e.__options.distance.length<4&&(void 0===e.__options.distance[1]&&(e.__options.distance[1]=e.__options.distance[0]),void 0===e.__options.distance[2]&&(e.__options.distance[2]=e.__options.distance[0]),void 0===e.__options.distance[3]&&(e.__options.distance[3]=e.__options.distance[1]),e.__options.distance={top:e.__options.distance[0],right:e.__options.distance[1],bottom:e.__options.distance[2],left:e.__options.distance[3]}),"string"==typeof e.__options.side){var n={top:"bottom",right:"left",bottom:"top",left:"right"};e.__options.side=[e.__options.side,n[e.__options.side]],"left"==e.__options.side[0]||"right"==e.__options.side[0]?e.__options.side.push("top","bottom"):e.__options.side.push("right","left")}6===t.tooltipster._env.IE&&!0!==e.__options.arrow&&(e.__options.arrow=!1)},__reposition:function(e,n){var i,o=this,r=o.__targetFind(n),a=[];o.__instance._$tooltip.detach();var s=o.__instance._$tooltip.clone(),l=t.tooltipster._getRuler(s),c=!1,u=o.__instance.option("animation");switch(u&&s.removeClass("tooltipster-"+u),t.each(["window","document"],function(i,u){var d=null;if(o.__instance._trigger({container:u,helper:n,satisfied:c,takeTest:function(t){d=t},results:a,type:"positionTest"}),1==d||0!=d&&0==c&&("window"!=u||o.__options.viewportAware))for(var i=0;i<o.__options.side.length;i++){var h={horizontal:0,vertical:0},p=o.__options.side[i];"top"==p||"bottom"==p?h.vertical=o.__options.distance[p]:h.horizontal=o.__options.distance[p],o.__sideChange(s,p),t.each(["natural","constrained"],function(t,i){if(d=null,o.__instance._trigger({container:u,event:e,helper:n,mode:i,results:a,satisfied:c,side:p,takeTest:function(t){d=t},type:"positionTest"}),1==d||0!=d&&0==c){var s={container:u,distance:h,fits:null,mode:i,outerSize:null,side:p,size:null,target:r[p],whole:null},f="natural"==i?l.free():l.constrain(n.geo.available[u][p].width-h.horizontal,n.geo.available[u][p].height-h.vertical),m=f.measure();if(s.size=m.size,s.outerSize={height:m.size.height+h.vertical,width:m.size.width+h.horizontal},"natural"==i?n.geo.available[u][p].width>=s.outerSize.width&&n.geo.available[u][p].height>=s.outerSize.height?s.fits=!0:s.fits=!1:s.fits=m.fits,"window"==u&&(s.fits?s.whole="top"==p||"bottom"==p?n.geo.origin.windowOffset.right>=o.__options.minIntersection&&n.geo.window.size.width-n.geo.origin.windowOffset.left>=o.__options.minIntersection:n.geo.origin.windowOffset.bottom>=o.__options.minIntersection&&n.geo.window.size.height-n.geo.origin.windowOffset.top>=o.__options.minIntersection:s.whole=!1),a.push(s),s.whole)c=!0;else if("natural"==s.mode&&(s.fits||s.size.width<=n.geo.available[u][p].width))return!1}})}}),o.__instance._trigger({edit:function(t){a=t},event:e,helper:n,results:a,type:"positionTested"}),a.sort(function(t,e){if(t.whole&&!e.whole)return-1;if(!t.whole&&e.whole)return 1;if(t.whole&&e.whole){var n=o.__options.side.indexOf(t.side),i=o.__options.side.indexOf(e.side);return i>n?-1:n>i?1:"natural"==t.mode?-1:1}if(t.fits&&!e.fits)return-1;if(!t.fits&&e.fits)return 1;if(t.fits&&e.fits){var n=o.__options.side.indexOf(t.side),i=o.__options.side.indexOf(e.side);return i>n?-1:n>i?1:"natural"==t.mode?-1:1}return"document"==t.container&&"bottom"==t.side&&"natural"==t.mode?-1:1}),i=a[0],i.coord={},i.side){case"left":case"right":i.coord.top=Math.floor(i.target-i.size.height/2);break;case"bottom":case"top":i.coord.left=Math.floor(i.target-i.size.width/2)}switch(i.side){case"left":i.coord.left=n.geo.origin.windowOffset.left-i.outerSize.width;break;case"right":i.coord.left=n.geo.origin.windowOffset.right+i.distance.horizontal;break;case"top":i.coord.top=n.geo.origin.windowOffset.top-i.outerSize.height;break;case"bottom":i.coord.top=n.geo.origin.windowOffset.bottom+i.distance.vertical}"window"==i.container?"top"==i.side||"bottom"==i.side?i.coord.left<0?n.geo.origin.windowOffset.right-this.__options.minIntersection>=0?i.coord.left=0:i.coord.left=n.geo.origin.windowOffset.right-this.__options.minIntersection-1:i.coord.left>n.geo.window.size.width-i.size.width&&(n.geo.origin.windowOffset.left+this.__options.minIntersection<=n.geo.window.size.width?i.coord.left=n.geo.window.size.width-i.size.width:i.coord.left=n.geo.origin.windowOffset.left+this.__options.minIntersection+1-i.size.width):i.coord.top<0?n.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?i.coord.top=0:i.coord.top=n.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:i.coord.top>n.geo.window.size.height-i.size.height&&(n.geo.origin.windowOffset.top+this.__options.minIntersection<=n.geo.window.size.height?i.coord.top=n.geo.window.size.height-i.size.height:i.coord.top=n.geo.origin.windowOffset.top+this.__options.minIntersection+1-i.size.height):(i.coord.left>n.geo.window.size.width-i.size.width&&(i.coord.left=n.geo.window.size.width-i.size.width),i.coord.left<0&&(i.coord.left=0)),o.__sideChange(s,i.side),n.tooltipClone=s[0],n.tooltipParent=o.__instance.option("parent").parent[0],n.mode=i.mode,n.whole=i.whole,n.origin=o.__instance._$origin[0],n.tooltip=o.__instance._$tooltip[0],delete i.container,delete i.fits,delete i.mode,delete i.outerSize,delete i.whole,i.distance=i.distance.horizontal||i.distance.vertical;var d=t.extend(!0,{},i);if(o.__instance._trigger({edit:function(t){i=t},event:e,helper:n,position:d,type:"position"}),o.__options.functionPosition){var h=o.__options.functionPosition.call(o,o.__instance,n,d);h&&(i=h)}l.destroy();var p,f;"top"==i.side||"bottom"==i.side?(p={prop:"left",val:i.target-i.coord.left},f=i.size.width-this.__options.minIntersection):(p={prop:"top",val:i.target-i.coord.top},f=i.size.height-this.__options.minIntersection),p.val<this.__options.minIntersection?p.val=this.__options.minIntersection:p.val>f&&(p.val=f);var m;m=n.geo.origin.fixedLineage?n.geo.origin.windowOffset:{left:n.geo.origin.windowOffset.left+n.geo.window.scroll.left,top:n.geo.origin.windowOffset.top+n.geo.window.scroll.top},i.coord={left:m.left+(i.coord.left-n.geo.origin.windowOffset.left),top:m.top+(i.coord.top-n.geo.origin.windowOffset.top)},o.__sideChange(o.__instance._$tooltip,i.side),n.geo.origin.fixedLineage?o.__instance._$tooltip.css("position","fixed"):o.__instance._$tooltip.css("position",""),o.__instance._$tooltip.css({left:i.coord.left,top:i.coord.top,height:i.size.height,width:i.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(p.prop,p.val),o.__instance._$tooltip.appendTo(o.__instance.option("parent")),o.__instance._trigger({type:"repositioned",event:e,position:i})},__sideChange:function(t,e){t.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+e)},__targetFind:function(t){var e={},n=this.__instance._$origin[0].getClientRects();if(n.length>1&&1==this.__instance._$origin.css("opacity")&&(this.__instance._$origin.css("opacity",.99),n=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1)),n.length<2)e.top=Math.floor(t.geo.origin.windowOffset.left+t.geo.origin.size.width/2),e.bottom=e.top,e.left=Math.floor(t.geo.origin.windowOffset.top+t.geo.origin.size.height/2),e.right=e.left;else{var i=n[0];e.top=Math.floor(i.left+(i.right-i.left)/2),i=n.length>2?n[Math.ceil(n.length/2)-1]:n[0],e.right=Math.floor(i.top+(i.bottom-i.top)/2),i=n[n.length-1],e.bottom=Math.floor(i.left+(i.right-i.left)/2),i=n.length>2?n[Math.ceil((n.length+1)/2)-1]:n[n.length-1],e.left=Math.floor(i.top+(i.bottom-i.top)/2)}return e}}}),t})},function(t,e){},function(t,e,n){"use strict";(function(t){function i(){t(document).on("click",".wprm-manage-recipes-seo",function(e){e.preventDefault();var n=t(this).data("id");r.a.open(!1,{recipe_id:n})}),t(document).on("change",".wprm-manage-ingredients-link-nofollow",function(e){e.preventDefault();var n=t(this).data("id"),i=t(this).val();o.e(n,"ingredient_link_nofollow",i)}),t(document).on("click",".wprm-manage-ingredients-actions-rename",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-ingredients-name-"+n).text(),r=prompt('What do you want to rename "'+i+'" to?',i).trim();r&&o.d(n,"ingredient",r)}),t(document).on("click",".wprm-manage-ingredients-actions-link",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-ingredients-name-"+n).text(),r=t("#wprm-manage-ingredients-link-"+n),a=r.text(),s=prompt('What do you want the link for "'+i+'" to be?',a).trim();o.e(n,"ingredient_link",s)}),t(document).on("click",".wprm-manage-ingredients-actions-merge",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-ingredients-name-"+n).text(),r=parseInt(prompt('What is the ID of the ingredient that you want to merge "'+i+'" into?',""));r&&o.a(n,"ingredient",r)}),t(document).on("click",".wprm-manage-taxonomies-actions-rename",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-taxonomies-name-"+n).text(),r=t(".wprm-manage-taxonomies").data("taxonomy"),a=prompt('What do you want to rename "'+i+'" to?',i).trim();a&&o.d(n,r,a)}),t(document).on("click",".wprm-manage-taxonomies-actions-merge",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-taxonomies-name-"+n).text(),r=t(".wprm-manage-taxonomies").data("taxonomy"),a=parseInt(prompt('What is the ID of the term that you want to merge "'+i+'" into?',""));a&&o.a(n,r,a)}),t(document).on("click",".wprm-manage-ingredients-actions-delete",function(e){e.preventDefault();var n=t(this).data("id");o.a(n,"ingredient",0)}),t(document).on("click",".wprm-manage-taxonomies-actions-delete",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-taxonomies-name-"+n).text(),r=t(".wprm-manage-taxonomies").data("taxonomy");confirm('Are you sure you want to delete "'+i+'"?')&&o.a(n,r,0)}),t(document).on("click",".wprm-manage-recipes-actions-edit",function(e){e.preventDefault();var n=t(this).data("id");r.a.open(!1,{recipe_id:n})}),t(document).on("click",".wprm-manage-recipes-actions-delete",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-recipes-name-"+n).text();confirm('Are you sure you want to delete "'+i+'"?')&&o.b(n)}),t(document).on("click",".wprm-manage-ingredients-bulk-delete",function(e){e.preventDefault();var n=t(".wprm-manage-ingredients-bulk:checkbox:checked"),i=[];n.each(function(){i.push(parseInt(t(this).val()))}),i.length>0&&o.c(i,"ingredient",0)})}e.a=i;var o=n(38),r=n(1)}).call(e,n(0))},function(t,e,n){"use strict";(function(t){function n(e,n,i){var o={action:"wprm_rename_term",security:wprm_temp_admin.nonce,term_id:e,taxonomy:n,new_name:i};t.post(wprm_temp_admin.ajax_url,o,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}function i(e,n,i){var o={action:"wprm_update_term_metadata",security:wprm_temp_admin.nonce,term_id:e,field:n,value:i};t.post(wprm_temp_admin.ajax_url,o,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}function o(e,n,i){var o={action:"wprm_delete_or_merge_term",security:wprm_temp_admin.nonce,term_id:e,taxonomy:n,new_term_id:i};t.post(wprm_temp_admin.ajax_url,o,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}function r(e,n){var i={action:"wprm_delete_terms",security:wprm_temp_admin.nonce,term_ids:e,taxonomy:n};t.post(wprm_temp_admin.ajax_url,i,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}function a(e){var n={action:"wprm_delete_recipe",security:wprm_temp_admin.nonce,recipe_id:e};t.post(wprm_temp_admin.ajax_url,n,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}e.d=n,e.e=i,e.a=o,e.c=r,e.b=a}).call(e,n(0))},function(t,e){},function(t,e,n){"use strict";(function(t){var e=n(1),i=(n(41),n(43),n(44),n(45));n.n(i),t(document).ready(function(n){var i=t(".wprm-modal-container");i&&e.a.init(i)})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){function e(){t(".wprm-button-import-text-reset").removeAttr("disabled"),t(".wprm-button-import-text-clear").removeAttr("disabled"),t(".wprm-button-import-text-next").removeAttr("disabled"),h="input",t("#import-text-highlight-sandbox").textHighlighter(),p=t("#import-text-highlight-sandbox").getHighlighter()}function i(){o(!0),t("#import-text-highlight-sandbox").text(""),f={},m=!1,t(".wprm-button-import-text-reset").attr("disabled","disabled"),t(".wprm-button-import-text-clear").attr("disabled","disabled"),t(".wprm-button-import-text-next").attr("disabled","disabled"),t(".import-text-step").hide(),t("#import-text-step-input").show(),t("#import-text-highlight-sandbox").hide()}function o(e){(e||"input"==h)&&t("#import-text-input-recipe").val(""),(e||"ingredient-groups"==h)&&t("#import-text-ingredient-groups").find("input").attr("checked",!1),(e||"instruction-groups"==h)&&t("#import-text-instruction-groups").find("input").attr("checked",!1),p.removeHighlights()}function r(){if("input"==h)f.raw=t("#import-text-input-recipe").val(),t("#import-text-highlight-sandbox").html(f.raw.replace(/\r?\n/g,"<br/>")).show(),h="name";else if("name"==h)f.name=s(),h="summary";else if("summary"==h)f.summary=s(),t("#import-text-highlight-sandbox").show(),h="ingredients";else if("ingredients"==h){var e=p.getHighlights();f.ingredients_raw=e,t("#import-text-ingredient-groups").html("");for(var n=0,i=e.length;n<i;n++){var o=t(e[n]).text().trim();o=o.replace(/^(\d\.\s+|[a-z]\)\s+|•\s+|[A-Z]\.\s+|[IVX]+\.\s+)/g,"");var r='<div class="import-text-ingredient"><input type="checkbox" id="ingredient-'+n+'"> <label for="ingredient-'+n+'">'+o+"</label></div>";t("#import-text-ingredient-groups").append(r)}t(".import-text-group-warning").hide(),0==e.length?(t("#import-text-highlight-sandbox").show(),f.ingredients=[],h="instructions"):(t("#import-text-highlight-sandbox").hide(),h="ingredient-groups")}else if("ingredient-groups"==h){var e=[],c={name:"",ingredients:[]};t("#import-text-ingredient-groups").find(".import-text-ingredient").each(function(){var n=t(this).find("input").is(":checked"),i=t(this).find("label").text();n?(e.push(c),c={name:i,ingredients:[]}):c.ingredients.push({raw:i})}),e.push(c),f.ingredients=[];var u={action:"wprm_parse_ingredients",security:wprm_temp_admin.nonce,ingredients:e};m=!0,t.post(wprm_temp_admin.ajax_url,u,function(t){m=!1,t.success&&(f.ingredients=t.data.ingredients)},"json"),t("#import-text-highlight-sandbox").show(),h="instructions"}else if("instructions"==h){var d=p.getHighlights();f.instructions_raw=d,t("#import-text-instruction-groups").html("");for(var n=0,i=d.length;n<i;n++){var o=t(d[n]).text().trim();o=o.replace(/^(\d\.\s+|[a-z]\)\s+|•\s+|[A-Z]\.\s+|[IVX]+\.\s+)/g,"");var g='<div class="import-text-instruction"><input type="checkbox" id="instruction-'+n+'"> <label for="instruction-'+n+'">'+o+"</label></div>";t("#import-text-instruction-groups").append(g)}t(".import-text-group-warning").hide(),0==d.length?(t("#import-text-highlight-sandbox").show(),f.instructions=[],h="notes"):(t("#import-text-highlight-sandbox").hide(),h="instruction-groups")}else if("instruction-groups"==h){var d=[],v={name:"",instructions:[]};t("#import-text-instruction-groups").find(".import-text-instruction").each(function(){var e=t(this).find("input").is(":checked"),n=t(this).find("label").text();e?(d.push(v),v={name:n,instructions:[]}):v.instructions.push({text:n})}),d.push(v),f.instructions=d,t("#import-text-highlight-sandbox").show(),h="notes"}else"notes"==h?(f.notes=s(),t("#import-text-highlight-sandbox").hide(),t(".wprm-button-import-text-reset").attr("disabled","disabled"),t(".wprm-button-import-text-clear").attr("disabled","disabled"),t(".wprm-button-import-text-next").attr("disabled","disabled"),m?(h="waiting",a()):(t(".wprm-button-import-text-reset").removeAttr("disabled"),l(),h="finished")):"waiting"==h&&(m||(t(".wprm-button-import-text-reset").removeAttr("disabled"),l(),h="finished"));t(".import-text-step").hide(),t("#import-text-step-"+h).show(),p.removeHighlights()}function a(){m?setTimeout(a,200):r()}function s(){for(var e=p.getHighlights(),n="",i=0,o=e.length;i<o;i++)i>0&&(n+=" "),n+=t(e[i]).text().trim();return n}function l(){f.name&&t("#wprm-recipe-name").val(f.name),f.summary&&d.a.set(f.summary),f.notes&&("undefined"!=typeof tinyMCE&&tinyMCE.get("wprm_recipe_notes")&&!tinyMCE.get("wprm_recipe_notes").isHidden()?(tinyMCE.get("wprm_recipe_notes").focus(!0),tinyMCE.activeEditor.setContent(f.notes)):t("#wprm_recipe_notes").val(f.notes)),f.instructions.length>0&&u.a.setInstructions(f.instructions),f.ingredients.length>0&&u.a.setIngredients(f.ingredients)}var c=n(42),u=(n.n(c),n(1),n(2)),d=n(9),h="",p=void 0,f={},m=!1;t(document).ready(function(n){t("#import-text-input-recipe").on("keydown change",function(){e()}),t(".wprm-button-import-text-reset").on("click",function(){confirm(wprm_temp_admin.modal.text.import_text_reset)&&i()}),t(".wprm-button-import-text-clear").on("click",function(){o(!1)}),t(".wprm-button-import-text-next").on("click",function(){r()}),t(".import-text-input-groups").on("change","input",function(){var e=t(this).parents(".import-text-input-groups");e.find("input").length==e.find("input:checked").length&&t(".import-text-group-warning").show()})})}).call(e,n(0))},function(t,e,n){(function(t){!function(t){function e(t,e){return c(t).color()===c(e).color()}function n(t,e){t=t||{};for(var n in e)e.hasOwnProperty(n)&&void 0===t[n]&&(t[n]=e[n]);return t}function i(t){return t.filter(function(t,e,n){return n.indexOf(t)===e})}function o(t,e){t.sort(function(t,n){return c(e?n:t).parents().length-c(e?t:n).parents().length})}function r(t){var e=[],n={},i=[];return t.forEach(function(t){var i=t.getAttribute("data-timestamp");void 0===n[i]&&(n[i]=[],e.push(i)),n[i].push(t)}),e.forEach(function(t){var e=n[t];i.push({chunks:e,timestamp:t,toString:function(){return e.map(function(t){return t.textContent}).join("")}})}),i}function a(t,e){t.addEventListener("mouseup",e.highlightHandler.bind(e)),t.addEventListener("touchend",e.highlightHandler.bind(e))}function s(t,e){if(!t)throw"Missing anchor element";this.el=t,this.options=n(e,{color:"#ffff7b",highlightedClass:"highlighted",contextClass:"highlighter-context",onRemoveHighlight:function(){return!0},onBeforeHighlight:function(){return!0},onAfterHighlight:function(){}}),c(this.el).addClass(this.options.contextClass),a(this.el,this)}var l="SCRIPT STYLE SELECT OPTION BUTTON OBJECT APPLET VIDEO AUDIO CANVAS EMBED PARAM METER PROGRESS".split(" "),c=function t(e){return{addClass:function(t){e.classList?e.classList.add(t):e.className+=" "+t},removeClass:function(t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t+"(\\b|$)","gi")," ")},prepend:function(t){t=Array.prototype.slice.call(t);for(var n=t.length;n--;)e.insertBefore(t[n],e.firstChild)},append:function(t){t=Array.prototype.slice.call(t);for(var n=0,i=t.length;n<i;++n)e.appendChild(t[n])},insertAfter:function(t){return t.parentNode.insertBefore(e,t.nextSibling)},insertBefore:function(t){return t.parentNode.insertBefore(e,t)},remove:function(){e.parentNode.removeChild(e),e=null},contains:function(t){return e!==t&&e.contains(t)},wrap:function(t){return e.parentNode&&e.parentNode.insertBefore(t,e),t.appendChild(e),t},unwrap:function(){var n,i=Array.prototype.slice.call(e.childNodes);return i.forEach(function(e){n=e.parentNode,t(e).insertBefore(e.parentNode),t(n).remove()}),i},parents:function(){for(var t,n=[];t=e.parentNode;)n.push(t),e=t;return n},normalizeTextNodes:function(){if(e){if(3===e.nodeType)for(;e.nextSibling&&3===e.nextSibling.nodeType;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else t(e.firstChild).normalizeTextNodes();t(e.nextSibling).normalizeTextNodes()}},color:function(){return e.style.backgroundColor},fromHTML:function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes},getRange:function(){var n,i=t(e).getSelection();return 0<i.rangeCount&&(n=i.getRangeAt(0)),n},removeAllRanges:function(){t(e).getSelection().removeAllRanges()},getSelection:function(){return t(e).getWindow().getSelection()},getWindow:function(){return t(e).getDocument().defaultView},getDocument:function(){return e.ownerDocument||e}}};s.prototype.destroy=function(){var t=this.el;t.removeEventListener("mouseup",this.highlightHandler.bind(this)),t.removeEventListener("touchend",this.highlightHandler.bind(this)),c(this.el).removeClass(this.options.contextClass)},s.prototype.highlightHandler=function(){this.doHighlight()},s.prototype.doHighlight=function(t){var e,n,i=c(this.el).getRange();i&&!i.collapsed&&(!0===this.options.onBeforeHighlight(i)&&(n=+new Date,e=s.createWrapper(this.options),e.setAttribute("data-timestamp",n),e=this.highlightRange(i,e),e=this.normalizeHighlights(e),this.options.onAfterHighlight(i,e,n)),t||c(this.el).removeAllRanges())},s.prototype.highlightRange=function(t,e){var n;if(!t||t.collapsed)return[];var i=t.startContainer;n=t.endContainer;var o=t.commonAncestorContainer,r=!0;if(0===t.endOffset){for(;!n.previousSibling&&n.parentNode!==o;)n=n.parentNode;n=n.previousSibling}else 3===n.nodeType?t.endOffset<n.nodeValue.length&&n.splitText(t.endOffset):0<t.endOffset&&(n=n.childNodes.item(t.endOffset-1));3===i.nodeType?t.startOffset===i.nodeValue.length?r=!1:0<t.startOffset&&(i=i.splitText(t.startOffset),n===i.previousSibling&&(n=i)):i=t.startOffset<i.childNodes.length?i.childNodes.item(t.startOffset):i.nextSibling;var a,s=r,r=!1,o=[];do{s&&3===i.nodeType&&(-1===l.indexOf(i.parentNode.tagName)&&""!==i.nodeValue.trim()&&(s=e.cloneNode(!0),s.setAttribute("data-highlighted",!0),a=i.parentNode,c(this.el).contains(a)||a===this.el)&&(s=c(i).wrap(s),o.push(s)),s=!1),i!==n||n.hasChildNodes()&&s||(r=!0),i.tagName&&-1<l.indexOf(i.tagName)&&(n.parentNode===i&&(r=!0),s=!1),s&&i.hasChildNodes()?i=i.firstChild:i.nextSibling?(i=i.nextSibling,s=!0):(i=i.parentNode,s=!1)}while(!r);return o},s.prototype.normalizeHighlights=function(t){return this.flattenNestedHighlights(t),this.mergeSiblingHighlights(t),t=t.filter(function(t){return t.parentElement?t:null}),t=i(t),t.sort(function(t,e){return t.offsetTop-e.offsetTop||t.offsetLeft-e.offsetLeft}),t},s.prototype.flattenNestedHighlights=function(t){var n,i=this;o(t,!0);do{n=function(){var n=!1;return t.forEach(function(o,r){var a=o.parentElement,s=a.previousSibling,l=a.nextSibling;i.isHighlight(a)&&(e(a,o)?(a.replaceChild(o.firstChild,o),t[r]=a,n=!0):(o.nextSibling||(c(o).insertBefore(l||a),n=!0),o.previousSibling||(c(o).insertAfter(s||a),n=!0),a.hasChildNodes()||c(a).remove()))}),n}()}while(n)},s.prototype.mergeSiblingHighlights=function(t){function n(t,n){return n&&1===n.nodeType&&e(t,n)&&i.isHighlight(n)}var i=this;t.forEach(function(t){var e=t.previousSibling,i=t.nextSibling;n(t,e)&&(c(t).prepend(e.childNodes),c(e).remove()),n(t,i)&&(c(t).append(i.childNodes),c(i).remove()),c(t).normalizeTextNodes()})},s.prototype.setColor=function(t){this.options.color=t},s.prototype.getColor=function(){return this.options.color},s.prototype.removeHighlights=function(t){function e(t){c(t).unwrap().forEach(function(t){var e=t.previousSibling,n=t.nextSibling;e&&3===e.nodeType&&(t.nodeValue=e.nodeValue+t.nodeValue,c(e).remove()),n&&3===n.nodeType&&(t.nodeValue+=n.nodeValue,c(n).remove())})}t=this.getHighlights({container:t||this.el});var n=this;o(t,!0),t.forEach(function(t){!0===n.options.onRemoveHighlight(t)&&e(t)})},s.prototype.getHighlights=function(t){t=n(t,{container:this.el,andSelf:!0,grouped:!1});var e=t.container.querySelectorAll("[data-highlighted]"),e=Array.prototype.slice.call(e);return!0===t.andSelf&&t.container.hasAttribute("data-highlighted")&&e.push(t.container),t.grouped&&(e=r(e)),e},s.prototype.isHighlight=function(t){return t&&1===t.nodeType&&t.hasAttribute("data-highlighted")},s.prototype.serializeHighlights=function(){var t=this.getHighlights(),e=this.el,n=[];return o(t,!1),t.forEach(function(t){var i,o=0,r=t.textContent.length,a=t,s=[];do{i=Array.prototype.slice.call(a.parentNode.childNodes),s.unshift(i.indexOf(a)),a=a.parentNode}while(a!==e||!a);a=t.cloneNode(!0),a.innerHTML="",a=a.outerHTML,t.previousSibling&&3===t.previousSibling.nodeType&&(o=t.previousSibling.length),n.push([a,t.textContent,s.join(":"),o,r])}),JSON.stringify(n)},s.prototype.deserializeHighlights=function(t){var e,n=[],i=this;if(!t)return n;try{e=JSON.parse(t)}catch(t){throw"Can't parse JSON: "+t}return e.forEach(function(t){try{for(var e,o,r,a=t[0],s=t[2].split(":"),l=t[3],u=t[4],d=s.pop(),h=i.el;r=s.shift();)h=h.childNodes[r];h.childNodes[d-1]&&3===h.childNodes[d-1].nodeType&&--d,h=h.childNodes[d],e=h.splitText(l),e.splitText(u),e.nextSibling&&!e.nextSibling.nodeValue&&c(e.nextSibling).remove(),e.previousSibling&&!e.previousSibling.nodeValue&&c(e.previousSibling).remove(),o=c(e).wrap(c().fromHTML(a)[0]),n.push(o)}catch(t){console&&console.warn&&console.warn("Can't deserialize highlight descriptor. Cause: "+t)}}),n},s.prototype.find=function(t,e){var n=c(this.el).getWindow(),i=n.scrollX,o=n.scrollY,r=void 0===e||e;if(c(this.el).removeAllRanges(),n.find)for(;n.find(t,r);)this.doHighlight(!0);else if(n.document.body.createTextRange){var a=n.document.body.createTextRange();for(a.moveToElementText(this.el);a.findText(t,1,r?4:0)&&(c(this.el).contains(a.parentElement())||a.parentElement()===this.el);)a.select(),this.doHighlight(!0),a.collapse(!1)}c(this.el).removeAllRanges(),n.scrollTo(i,o)},s.createWrapper=function(t){var e=document.createElement("span");return e.style.backgroundColor=t.color,e.className=t.highlightedClass,e},t.TextHighlighter=s}(window),function(t){function e(t,e){return function(){e.call(this,t)}}t.fn.getHighlighter=function(){return this.data("textHighlighter")},t.fn.textHighlighter=function(n){return this.each(function(){var i,o=this;t.data(o,"textHighlighter")||(i=new TextHighlighter(o,n),i.destroy=e(i.destroy,function(e){e.call(i),t(o).removeData("textHighlighter")}),t.data(o,"textHighlighter",i))})}}(t)}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e=n(1),i=n(3);e.a.actions.reset_snippets=function(e){t("#wprm-recipe-jump-id").val("0").trigger("change"),t("#wprm-recipe-jump-text").val(""),t("#wprm-recipe-print-id").val("0").trigger("change"),t("#wprm-recipe-print-text").val("")},e.a.actions.insert_jump_to_recipe=function(n){var o=parseInt(t("#wprm-recipe-jump-id").val()),r=i.shortcode_escape(t("#wprm-recipe-jump-text").val()),a="[wprm-recipe-jump";o>0&&(a+=' id="'+o+'"'),r&&(a+=' text="'+r+'"'),a+="]",i.add_text_to_editor(a),e.a.close()},e.a.actions.insert_print_recipe=function(n){var o=parseInt(t("#wprm-recipe-print-id").val()),r=i.shortcode_escape(t("#wprm-recipe-print-text").val()),a="[wprm-recipe-print";o>0&&(a+=' id="'+o+'"'),r&&(a+=' text="'+r+'"'),a+="]",i.add_text_to_editor(a),e.a.close()}}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e=n(3),i=n(1),o=n(2);i.a.actions.set_recipe=function(n){var r=n.recipe_id?n.recipe_id:0,a=n.clone_recipe_id?n.clone_recipe_id:0;if(o.a.id=r,o.a.type=0===r?"insert":"update",o.a.fields=!1,o.a.ingredients={},o.a.instructions={},o.a.clear(),"insert"===o.a.type){var s=t(".wprm-button-action"),l=t(".wprm-button-action-save");if(t(".wprm-router.active").find(".wprm-menu-item").each(function(){t(this).data("button",wprm_temp_admin.modal.text.action_button_insert)}),s.text(wprm_temp_admin.modal.text.action_button_insert),l.show(),a){var c={action:"wprm_get_recipe",security:wprm_temp_admin.nonce,recipe_id:a};e.start_loader(s),e.start_loader(l),t.post(wprm_temp_admin.ajax_url,c,function(t){e.stop_loader(s),e.stop_loader(l),t.success&&(o.a.fields=t.data.recipe,o.a.set(t.data.recipe),i.a.changes_made=!1)},"json")}}else{var s=t(".wprm-button-action"),l=t(".wprm-button-action-save");t(".wprm-router.active").find(".wprm-menu-item").each(function(){t(this).data("button",wprm_temp_admin.modal.text.action_button_update)}),s.text(wprm_temp_admin.modal.text.action_button_update),l.show(),i.a.disable_menu();var c={action:"wprm_get_recipe",security:wprm_temp_admin.nonce,recipe_id:r};e.start_loader(s),e.start_loader(l),t.post(wprm_temp_admin.ajax_url,c,function(n){e.stop_loader(s),e.stop_loader(l),n.success&&(o.a.fields=n.data.recipe,o.a.set(n.data.recipe),i.a.changes_made=!1,t(".wprm-frame-title").find("h1").text(wprm_temp_admin.modal.text.edit_recipe))},"json")}},i.a.actions.insert_update_recipe=function(n){var r=o.a.get(),a={action:"wprm_save_recipe",security:wprm_temp_admin.nonce,recipe_id:o.a.id,recipe:r};t(".wprm-button-action-save").prop("disabled",!0),e.start_loader(n),t.post(wprm_temp_admin.ajax_url,a,function(r){e.stop_loader(n),t(".wprm-button-action-save").prop("disabled",!1),r.success&&(0===o.a.id&&(o.a.id=r.data.id),n.hasClass("wprm-button-action-save")||("insert"===o.a.type?e.add_text_to_editor('[wprm-recipe id="'+r.data.id+'"]'):i.a.active_editor_id&&"undefined"!=typeof tinyMCE&&tinyMCE.get(i.a.active_editor_id)&&!tinyMCE.get(i.a.active_editor_id).isHidden()&&(tinyMCE.get(i.a.active_editor_id).focus(!0),tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent())),t(".wprm-manage-datatable").length>0&&t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1),i.a.close()))},"json")},i.a.actions.edit_recipe=function(e){var n=parseInt(t("#wprm-edit-recipe-id").val());if(0!=n){var o=i.a.active_editor_id;i.a.close(),i.a.open(o,{recipe_id:n})}},i.a.actions.insert_recipe=function(n){var o=parseInt(t("#wprm-insert-recipe-id").val());if(0!=o){var r='[wprm-recipe id="'+o+'"]';e.add_text_to_editor(r),i.a.close()}}}).call(e,n(0))},function(t,e){},function(t,e,n){"use strict";(function(t){var e=n(7),i=(n.n(e),n(8)),o=(n.n(i),n(47));n.n(o),t(document).ready(function(e){t(".wprm-settings").find("select").select2_wprm(),t(".wprm-settings").find(".wprm-color").wpColorPicker(),t("#reset_settings_to_default").on("click",function(){t(this).is(":checked")&&alert("Warning: having this checked will reset all your settings to default again")})})}).call(e,n(0))},function(t,e){},function(t,e,n){"use strict";(function(t){function e(){var n={action:"wprm_"+r,security:wprm_temp_admin.nonce,posts:JSON.stringify(a)};t.post(wprm_temp_admin.ajax_url,n,function(n){n.success?(a=n.data.posts_left,i(),a.length>0?e():t("#wprm-tools-finished").show()):window.location=n.data.redirect},"json")}function i(){var e=100*(1-a.length/s);t("#wprm-tools-progress-bar").css("width",e+"%")}var o=n(49),r=(n.n(o),!1),a=[],s=0;t(document).ready(function(t){void 0!==window.wprm_tools&&(r=wprm_tools.action,a=wprm_tools.posts,s=wprm_tools.posts.length,e())})}).call(e,n(0))},function(t,e){},function(t,e){},function(t,e){},function(t,e){}]);
|
1 |
+
var WPRecipeMaker=WPRecipeMaker||{};WPRecipeMaker.admin=function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=17)}([function(t,e){t.exports=window.jQuery},function(t,e,n){"use strict";(function(t){var i=n(2),o=n(25),r={changes_made:!1,container:!1,active_editor_id:!1,actions:{},recipe:i.a,init:function(t){this.container=t,Object(o.a)(this),this.recipe.init()},open:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(".wprm-menu-item").show(),t(".wprm-menu-hidden").hide(),this.active_editor_id=e,t(".wprm-modal-container").show();var i=t(".wprm-router").find(".wprm-menu-item");t(i).each(function(){var e=t(this).data("init");e&&"function"==typeof r.actions[e]&&r.actions[e](n)}),t(".wprm-menu").find(".wprm-menu-item").first().click(),this.changes_made=!1},close:function(){this.active_editor_id=!1,t(".wprm-menu").removeClass("visible"),t(".wprm-modal-container").hide()},disable_menu:function(){t(".wprm-frame-menu").find(".wprm-menu-item").hide(),t(".wprm-menu-hidden").show()}};e.a=r}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var i=n(3),o=n(19),r=n(9),a={id:0,type:"insert",fields:!1,ingredient:{},instructions:{},prep_time_set:!1,cook_time_set:!1,total_time_set:!1,init:function(){Object(o.a)(this)},clear:function(){t("#wprm-recipe-type").val("food").change(),i.remove_media_image(t(".wprm-recipe-image-container")),t("#wprm-recipe-name").val(""),r.a.clear(),t("#wprm-recipe-author-display").val("default").change(),t("#wprm-recipe-author-link").val(""),t("#wprm-recipe-servings").val(""),t("#wprm-recipe-servings-unit").val(""),t("#wprm-recipe-calories").val(""),t("#wprm-recipe-prep-time").val(""),t("#wprm-recipe-cook-time").val(""),t("#wprm-recipe-total-time").val(""),t("#wprm-recipe-custom-time").val(""),t("#wprm-recipe-custom-time-label").val(""),this.prep_time_set=!1,this.cook_time_set=!1,this.total_time_set=!1,t(".wprm-recipe-tags").val(null).trigger("change");var e=t("#wprm-recipe-author-name");if(e.val(e.data("default")),t(".wprm-recipe-ingredients .wprm-recipe-ingredients-instructions-delete, .wprm-recipe-instructions .wprm-recipe-ingredients-instructions-delete").each(function(){t(this).click()}),t(".wprm-recipe-ingredients-add").click(),t(".wprm-recipe-instructions-add").click(),"undefined"!=typeof tinyMCE&&tinyMCE.get("wprm_recipe_notes")&&!tinyMCE.get("wprm_recipe_notes").isHidden()){tinyMCE.get("wprm_recipe_notes").focus(!0),t(".wprm-easyrecipe-warning").hide();try{tinyMCE.activeEditor.setContent("")}catch(e){t(".wprm-easyrecipe-warning").show()}}else t("#wprm_recipe_notes").val("")},set:function(e){parseInt(e.image_id)>0&&i.set_media_image(t(".wprm-recipe-details-form .wprm-recipe-image-container"),e.image_id,e.image_url),t("#wprm-recipe-type").val(e.type).change(),t("#wprm-recipe-name").val(e.name),r.a.set(e.summary),t("#wprm-recipe-servings-unit").val(e.servings_unit),t("#wprm-recipe-custom-time-label").val(e.custom_time_label),t("#wprm-recipe-author-display").val(e.author_display).change(),t("#wprm-recipe-author-name").val(e.author_name),t("#wprm-recipe-author-link").val(e.author_link);var n=parseInt(e.servings)>0?parseInt(e.servings):"",o=e.nutrition.calories?parseFloat(e.nutrition.calories):"",a=parseInt(e.prep_time)>0?parseInt(e.prep_time):"",s=parseInt(e.cook_time)>0?parseInt(e.cook_time):"",l=parseInt(e.total_time)>0?parseInt(e.total_time):"",c=parseInt(e.custom_time)>0?parseInt(e.custom_time):"";t("#wprm-recipe-servings").val(n),t("#wprm-recipe-calories").val(o),t("#wprm-recipe-prep-time").val(a),t("#wprm-recipe-cook-time").val(s),t("#wprm-recipe-total-time").val(l),t("#wprm-recipe-custom-time").val(c),a&&(this.prep_time_set=!0),s&&(this.cook_time_set=!0),l&&(this.total_time_set=!0);for(var u in e.tags)e.tags.hasOwnProperty(u)&&this.setTags(e,u);this.setIngredients(e.ingredients),this.setInstructions(e.instructions),"undefined"!=typeof tinyMCE&&tinyMCE.get("wprm_recipe_notes")&&!tinyMCE.get("wprm_recipe_notes").isHidden()?(tinyMCE.get("wprm_recipe_notes").focus(!0),tinyMCE.activeEditor.setContent(e.notes)):t("#wprm_recipe_notes").val(e.notes)},setTags:function(e,n){for(var i=[],o=t("#wprm-recipe-tag-"+n),r=0,a=e.tags[n].length;r<a;r++){var s=e.tags[n][r];i.push(s.term_id),0===o.find("option[value="+s.term_id+"]").length&&o.append('<option value="'+s.term_id+'">'+s.name+"</option>")}o.val(i).trigger("change")},setIngredients:function(e){t(".wprm-recipe-ingredients .wprm-recipe-ingredients-instructions-delete").each(function(){t(this).click()});var n,i,o,r,s;for(n=0,i=e.length;n<i;n++)for(o=e[n],(n>0||""!==o.name)&&a.addIngredientGroup(o.name),r=0,s=o.ingredients.length;r<s;r++){var l=o.ingredients[r],c=a.addIngredient(l.amount,l.unit,l.name,l.notes);a.ingredients[c]=l}},setInstructions:function(e){t(".wprm-recipe-instructions .wprm-recipe-ingredients-instructions-delete").each(function(){t(this).click()});var n,i,o,r,s;for(n=0,i=e.length;n<i;n++)for(o=e[n],(n>0||""!==o.name)&&a.addInstructionGroup(o.name),r=0,s=o.instructions.length;r<s;r++){var l=o.instructions[r],c=a.addInstruction(l.text,l.image);a.instructions[c]=l}},get:function(){var e=t("#wprm-recipe-author-display").val();"default"==e&&(e=t("#wprm-recipe-author-display").find("option:first").data("default"));var n={type:t("#wprm-recipe-type").val(),image_id:t("#wprm-recipe-image-id").val(),name:t("#wprm-recipe-name").val(),summary:t("#wprm-recipe-summary").val(),author_display:e,author_name:t("#wprm-recipe-author-name").val(),author_link:t("#wprm-recipe-author-link").val(),servings:t("#wprm-recipe-servings").val(),servings_unit:t("#wprm-recipe-servings-unit").val(),prep_time:t("#wprm-recipe-prep-time").val(),cook_time:t("#wprm-recipe-cook-time").val(),total_time:t("#wprm-recipe-total-time").val(),custom_time:t("#wprm-recipe-custom-time").val(),custom_time_label:t("#wprm-recipe-custom-time-label").val(),nutrition:{calories:t("#wprm-recipe-calories").val()},tags:{course:t("#wprm-recipe-tag-course").val(),cuisine:t("#wprm-recipe-tag-cuisine").val()}};n.tags={},t(".wprm-recipe-tags").each(function(){n.tags[t(this).data("key")]=t(this).val()}),n.ingredients=this.getIngredients();var i=[],o={name:"",instructions:[]};return t(".wprm-recipe-instructions").find("tr").each(function(){var e=t(this);e.hasClass("wprm-recipe-instruction-group")?(i.push(o),o={name:e.find(".wprm-recipe-instruction-group-name").val(),instructions:[]}):o.instructions.push({text:e.find("textarea.wprm-recipe-instruction-text").val(),image:e.find(".wprm-recipe-instruction-image").val()})}),i.push(o),n.instructions=i,"undefined"!=typeof tinyMCE&&tinyMCE.get("wprm_recipe_notes")&&!tinyMCE.get("wprm_recipe_notes").isHidden()?n.notes=tinyMCE.get("wprm_recipe_notes").getContent():n.notes=t("#wprm_recipe_notes").val(),n},getIngredients:function(){var e=[],n={name:"",ingredients:[]};return t(".wprm-recipe-ingredients").find("tr").each(function(){var i=t(this);if(i.hasClass("wprm-recipe-ingredient-group"))e.push(n),n={name:i.find(".wprm-recipe-ingredient-group-name").val(),ingredients:[]};else{var o=i.data("uid"),r={};a.ingredients.hasOwnProperty(o)&&(r=a.ingredients[o]),r.amount=i.find(".wprm-recipe-ingredient-amount").val(),r.unit=i.find(".wprm-recipe-ingredient-unit").val(),r.name=i.find(".wprm-recipe-ingredient-name").val(),r.notes=i.find(".wprm-recipe-ingredient-notes").val();var s=t("#wprm-ingredient-conversion-"+o);if(s.length>0){var l=s.find(".wprmuc-system-2-amount").val(),c=s.find(".wprmuc-system-2-unit").val();r.converted={2:{amount:l,unit:c}}}n.ingredients.push(r)}}),e.push(n),e},addIngredient:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=t(".wprm-recipe-ingredients-placeholder").find(".wprm-recipe-ingredient").clone();for(t(".wprm-recipe-ingredients").append(s),s.find(".wprm-recipe-ingredient-amount").val(i.decode_html_entities(e)).focus(),s.find(".wprm-recipe-ingredient-unit").val(i.decode_html_entities(n)),s.find(".wprm-recipe-ingredient-name").val(i.decode_html_entities(o)),s.find(".wprm-recipe-ingredient-notes").val(i.decode_html_entities(r));;){var l=Math.floor(99999*Math.random());if(!a.ingredients.hasOwnProperty(l))return s.data("uid",l),a.ingredients[l]={},l}},addIngredientGroup:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t(".wprm-recipe-ingredients-placeholder").find(".wprm-recipe-ingredient-group").clone();t(".wprm-recipe-ingredients").append(n),n.find("input:first").val(e).focus()},addInstruction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=t(".wprm-recipe-instructions-placeholder").find(".wprm-recipe-instruction").clone();if(o.find(".wprm-recipe-instruction-text").addClass("wprm-rich-editor"),t(".wprm-recipe-instructions").append(o),o.find(".wprm-recipe-instruction-text").val(e),r.a.init(),o.find(".wprm-recipe-instruction-text").focus(),parseInt(n)>0){var s=o.find(".wprm-recipe-image-container"),l=s.find(".wprm-recipe-image-add"),c={action:"wprm_get_thumbnail",security:wprm_temp_admin.nonce,image_id:n};i.start_loader(l),t.post(wprm_temp_admin.ajax_url,c,function(t){i.stop_loader(l),t.success&&i.set_media_image(s,n,t.data.image_url)},"json")}for(;;){var u=Math.floor(99999*Math.random());if(!a.instructions.hasOwnProperty(u))return o.data("uid",u),a.instructions[u]={},u}},addInstructionGroup:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t(".wprm-recipe-instructions-placeholder").find(".wprm-recipe-instruction-group").clone();t(".wprm-recipe-instructions").append(n),n.find("input:first").val(e).focus()}};e.a=a}).call(e,n(0))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){function i(t){return String(t).replace(/["]/g,function(t){return h[t]})}function o(e){if(e=" "+e+" ",d.a.active_editor_id)if("undefined"==typeof tinyMCE||!tinyMCE.get(d.a.active_editor_id)||tinyMCE.get(d.a.active_editor_id).isHidden()){var n=t("textarea#"+d.a.active_editor_id).val();t("textarea#"+d.a.active_editor_id).val(n+e)}else tinyMCE.get(d.a.active_editor_id).focus(!0),tinyMCE.activeEditor.selection.collapse(!1),tinyMCE.activeEditor.execCommand("mceInsertContent",!1,e)}function r(t){var e=wp.media({title:wprm_temp_admin.modal.text.media_title,button:{text:wprm_temp_admin.modal.text.media_button},multiple:!1});e.on("select",function(){var n=e.state().get("selection").first().toJSON();a(t,n.id,n.url)}),e.open()}function a(t,e,n){t.find(".wprm-recipe-image-preview").html(""),t.find(".wprm-recipe-image-preview").append('<img src="'+n+'" />'),t.find("input").val(e),t.find(".wprm-recipe-image-add").addClass("hidden"),t.find(".wprm-recipe-image-remove").removeClass("hidden"),d.a.changes_made=!0}function s(t){t.find(".wprm-recipe-image-preview").html(""),t.find("input").val(""),t.find(".wprm-recipe-image-add").removeClass("hidden"),t.find(".wprm-recipe-image-remove").addClass("hidden"),d.a.changes_made=!0}function l(t){t.prop("disabled",!0).css("width",t.outerWidth()).data("text",t.html()).html("...")}function c(t){t.prop("disabled",!1).css("width","").html(t.data("text"))}function u(t){var e=document.createElement("textarea");return e.innerHTML=t,e.value}e.shortcode_escape=i,e.add_text_to_editor=o,e.select_media_image=r,e.set_media_image=a,e.remove_media_image=s,e.start_loader=l,e.stop_loader=c,e.decode_html_entities=u;var d=n(1),h={'"':"'","[":"{","]":"}"}}.call(e,n(0))},function(t,e,n){(function(t){(void 0!==window.wprm_public?wprm_public.settings.features_comment_ratings:wprm_temp_admin.settings.features_comment_ratings)&&t(document).ready(function(e){if(t(".wprm-recipe-container").length>0||t("body.wp-admin").length>0){t(".comment-form-wprm-rating").show();var n=t(".comment-form-wprm-rating").data("color");t(document).on("mouseenter",".comment-form-wprm-rating .wprm-rating-star",function(){t(this).prevAll().andSelf().each(function(){t(this).find("polygon").css("fill",n)}),t(this).nextAll().each(function(){t(this).find("polygon").css("fill","none")})}),t(document).on("mouseleave",".comment-form-wprm-rating .wprm-rating-star",function(){t(this).siblings().andSelf().each(function(){t(this).find("polygon").css("fill","")})}),t(document).on("click",".comment-form-wprm-rating .wprm-rating-star",function(){var e=t(this),n=e.data("rating"),i=e.parents(".comment-form-wprm-rating").find("#wprm-comment-rating");i.val()==n?(i.val(""),t(this).siblings("").andSelf().each(function(){t(this).removeClass("rated")})):(i.val(n),t(this).prevAll().andSelf().each(function(){t(this).addClass("rated")}),t(this).nextAll().each(function(){t(this).removeClass("rated")}))})}else t(".comment-form-wprm-rating").hide()})}).call(e,n(0))},,,function(t,e,n){(function(i){var o,r,a,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};/*! select2_wprm 4.0.3 | https://github.com/select2_wprm/select2_wprm/blob/master/LICENSE.md */
|
2 |
!function(i){r=[n(0)],o=i,void 0!==(a="function"==typeof o?o.apply(e,r):o)&&(t.exports=a)}(function(t){var e=function(){if(t&&t.fn&&t.fn.select2_wprm&&t.fn.select2_wprm.amd)var e=t.fn.select2_wprm.amd;var e;return function(){if(!e||!e.requirejs){e?n=e:e={};var t,n,i;!function(e){function o(t,e){return y.call(t,e)}function r(t,e){var n,i,o,r,a,s,l,c,u,d,h,p=e&&e.split("/"),f=w.map,m=f&&f["*"]||{};if(t&&"."===t.charAt(0))if(e){for(t=t.split("/"),a=t.length-1,w.nodeIdCompat&&x.test(t[a])&&(t[a]=t[a].replace(x,"")),t=p.slice(0,p.length-1).concat(t),u=0;u<t.length;u+=1)if("."===(h=t[u]))t.splice(u,1),u-=1;else if(".."===h){if(1===u&&(".."===t[2]||".."===t[0]))break;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((p||m)&&f){for(n=t.split("/"),u=n.length;u>0;u-=1){if(i=n.slice(0,u).join("/"),p)for(d=p.length;d>0;d-=1)if((o=f[p.slice(0,d).join("/")])&&(o=o[i])){r=o,s=u;break}if(r)break;!l&&m&&m[i]&&(l=m[i],c=u)}!r&&l&&(r=l,s=c),r&&(n.splice(0,s,r),t=n.join("/"))}return t}function a(t,n){return function(){var i=C.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),f.apply(e,i.concat([t,n]))}}function l(t){return function(e){return r(e,t)}}function c(t){return function(e){v[t]=e}}function u(t){if(o(_,t)){var n=_[t];delete _[t],b[t]=!0,p.apply(e,n)}if(!o(v,t)&&!o(b,t))throw new Error("No "+t);return v[t]}function d(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function h(t){return function(){return w&&w.config&&w.config[t]||{}}}var p,f,m,g,v={},_={},w={},b={},y=Object.prototype.hasOwnProperty,C=[].slice,x=/\.js$/;m=function(t,e){var n,i=d(t),o=i[0];return t=i[1],o&&(o=r(o,e),n=u(o)),o?t=n&&n.normalize?n.normalize(t,l(e)):r(t,e):(t=r(t,e),i=d(t),o=i[0],t=i[1],o&&(n=u(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:n}},g={require:function(t){return a(t)},exports:function(t){var e=v[t];return void 0!==e?e:v[t]={}},module:function(t){return{id:t,uri:"",exports:v[t],config:h(t)}}},p=function(t,n,i,r){var l,d,h,p,f,w,y=[],C=void 0===i?"undefined":s(i);if(r=r||t,"undefined"===C||"function"===C){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if(p=m(n[f],r),"require"===(d=p.f))y[f]=g.require(t);else if("exports"===d)y[f]=g.exports(t),w=!0;else if("module"===d)l=y[f]=g.module(t);else if(o(v,d)||o(_,d)||o(b,d))y[f]=u(d);else{if(!p.p)throw new Error(t+" missing "+d);p.p.load(p.n,a(r,!0),c(d),{}),y[f]=v[d]}h=i?i.apply(v[t],y):void 0,t&&(l&&l.exports!==e&&l.exports!==v[t]?v[t]=l.exports:h===e&&w||(v[t]=h))}else t&&(v[t]=i)},t=n=f=function(t,n,i,o,r){if("string"==typeof t)return g[t]?g[t](n):u(m(t,n).f);if(!t.splice){if(w=t,w.deps&&f(w.deps,w.callback),!n)return;n.splice?(t=n,n=i,i=null):t=e}return n=n||function(){},"function"==typeof i&&(i=o,o=r),o?p(e,t,n,i):setTimeout(function(){p(e,t,n,i)},4),f},f.config=function(t){return f(t)},t._defined=v,i=function(t,e,n){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(n=e,e=[]),o(v,t)||o(_,t)||(_[t]=[t,e,n])},i.amd={jQuery:!0}}(),e.requirejs=t,e.require=n,e.define=i}}(),e.define("almond",function(){}),e.define("jquery",[],function(){var e=t||i;return null==e&&console&&console.error&&console.error("select2_wprm: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before select2_wprm on your web page."),e}),e.define("select2_wprm/utils",["jquery"],function(t){function e(t){var e=t.prototype,n=[];for(var i in e)"function"==typeof e[i]&&"constructor"!==i&&n.push(i);return n}var n={};n.Extend=function(t,e){function n(){this.constructor=t}var i={}.hasOwnProperty;for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},n.Decorate=function(t,n){function i(){var e=Array.prototype.unshift,i=n.prototype.constructor.length,o=t.prototype.constructor;i>0&&(e.call(arguments,t.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=i}var r=e(n),a=e(t);n.displayName=t.displayName,i.prototype=new o;for(var s=0;s<a.length;s++){var l=a[s];i.prototype[l]=t.prototype[l]}for(var c=0;c<r.length;c++){var u=r[c];i.prototype[u]=function(t){var e=function(){};t in i.prototype&&(e=i.prototype[t]);var o=n.prototype[t];return function(){return Array.prototype.unshift.call(arguments,e),o.apply(this,arguments)}}(u)}return i};var i=function(){this.listeners={}};return i.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},i.prototype.trigger=function(t){var e=Array.prototype.slice,n=e.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(t,e){for(var n=0,i=t.length;i>n;n++)t[n].apply(this,e)},n.Observable=i,n.generateChars=function(t){for(var e="",n=0;t>n;n++)e+=Math.floor(36*Math.random()).toString(36);return e},n.bind=function(t,e){return function(){t.apply(e,arguments)}},n._convertData=function(t){for(var e in t){var n=e.split("-"),i=t;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];r=r.substring(0,1).toLowerCase()+r.substring(1),r in i||(i[r]={}),o==n.length-1&&(i[r]=t[e]),i=i[r]}delete t[e]}}return t},n.hasScroll=function(e,n){var i=t(n),o=n.style.overflowX,r=n.style.overflowY;return(o!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===o||"scroll"===r||i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth)},n.escapeMarkup=function(t){var e={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},n.appendMany=function(e,n){if("1.7"===t.fn.jquery.substr(0,3)){var i=t();t.map(n,function(t){i=i.add(t)}),n=i}e.append(n)},n}),e.define("select2_wprm/results",["jquery","./utils"],function(t,e){function n(t,e,i){this.$element=t,this.data=i,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<ul class="select2_wprm-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(e){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=t('<li role="treeitem" aria-live="assertive" class="select2_wprm-results__option"></li>'),o=this.options.get("translations").get(e.message);i.append(n(o(e.args))),i[0].className+=" select2_wprm-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2_wprm-results__message").remove()},n.prototype.append=function(t){this.hideLoading();var e=[];if(null==t.results||0===t.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));t.results=this.sort(t.results);for(var n=0;n<t.results.length;n++){var i=t.results[n],o=this.option(i);e.push(o)}this.$results.append(e)},n.prototype.position=function(t,e){e.find(".select2_wprm-results").append(t)},n.prototype.sort=function(t){return this.options.get("sorter")(t)},n.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2_wprm-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var e=this;this.data.current(function(n){var i=t.map(n,function(t){return t.id.toString()});e.$results.find(".select2_wprm-results__option[aria-selected]").each(function(){var e=t(this),n=t.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&t.inArray(o,i)>-1?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},n.prototype.showLoading=function(t){this.hideLoading();var e=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:e(t)},i=this.option(n);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(e){var n=document.createElement("li");n.className="select2_wprm-results__option";var i={role:"treeitem","aria-selected":"false"};e.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==e.id&&delete i["aria-selected"],null!=e._resultId&&(n.id=e._resultId),e.title&&(n.title=e.title),e.children&&(i.role="group",i["aria-label"]=e.text,delete i["aria-selected"]);for(var o in i){var r=i[o];n.setAttribute(o,r)}if(e.children){var a=t(n),s=document.createElement("strong");s.className="select2_wprm-results__group",t(s),this.template(e,s);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var h=t("<ul></ul>",{class:"select2_wprm-results__options select2_wprm-results__options--nested"});h.append(l),a.append(s),a.append(h)}else this.template(e,n);return t.data(n,"data",e),n},n.prototype.bind=function(e,n){var i=this,o=e.id+"-results";this.$results.attr("id",o),e.on("results:all",function(t){i.clear(),i.append(t.data),e.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),e.on("results:append",function(t){i.append(t.data),e.isOpen()&&i.setClasses()}),e.on("query",function(t){i.hideMessages(),i.showLoading(t)}),e.on("select",function(){e.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),e.on("unselect",function(){e.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),e.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),e.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),e.on("results:toggle",function(){var t=i.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),e.on("results:select",function(){var t=i.getHighlightedResults();if(0!==t.length){var e=t.data("data");"true"==t.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:e})}}),e.on("results:previous",function(){var t=i.getHighlightedResults(),e=i.$results.find("[aria-selected]"),n=e.index(t);if(0!==n){var o=n-1;0===t.length&&(o=0);var r=e.eq(o);r.trigger("mouseenter");var a=i.$results.offset().top,s=r.offset().top,l=i.$results.scrollTop()+(s-a);0===o?i.$results.scrollTop(0):0>s-a&&i.$results.scrollTop(l)}}),e.on("results:next",function(){var t=i.getHighlightedResults(),e=i.$results.find("[aria-selected]"),n=e.index(t),o=n+1;if(!(o>=e.length)){var r=e.eq(o);r.trigger("mouseenter");var a=i.$results.offset().top+i.$results.outerHeight(!1),s=r.offset().top+r.outerHeight(!1),l=i.$results.scrollTop()+s-a;0===o?i.$results.scrollTop(0):s>a&&i.$results.scrollTop(l)}}),e.on("results:focus",function(t){t.element.addClass("select2_wprm-results__option--highlighted")}),e.on("results:message",function(t){i.displayMessage(t)}),t.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-e+t.deltaY,o=t.deltaY>0&&e-t.deltaY<=0,r=t.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):r&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2_wprm-results__option[aria-selected]",function(e){var n=t(this),o=n.data("data");return"true"===n.attr("aria-selected")?void(i.options.get("multiple")?i.trigger("unselect",{originalEvent:e,data:o}):i.trigger("close",{})):void i.trigger("select",{originalEvent:e,data:o})}),this.$results.on("mouseenter",".select2_wprm-results__option[aria-selected]",function(e){var n=t(this).data("data");i.getHighlightedResults().removeClass("select2_wprm-results__option--highlighted"),i.trigger("results:focus",{data:n,element:t(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2_wprm-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]"),n=e.index(t),i=this.$results.offset().top,o=t.offset().top,r=this.$results.scrollTop()+(o-i),a=o-i;r-=2*t.outerHeight(!1),2>=n?this.$results.scrollTop(0):(a>this.$results.outerHeight()||0>a)&&this.$results.scrollTop(r)}},n.prototype.template=function(e,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=i(e,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=o(r):t(n).append(r)},n}),e.define("select2_wprm/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2_wprm/selection/base",["jquery","../utils","../keys"],function(t,e,n){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<span class="select2_wprm-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e,e},i.prototype.bind=function(t,e){var i=this,o=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",function(t){i.trigger("focus",t)}),this.$selection.on("blur",function(t){i._handleBlur(t)}),this.$selection.on("keydown",function(t){i.trigger("keypress",t),t.which===n.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){i.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){i.update(t.data)}),t.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",o),i._attachCloseHandler(t)}),t.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(t)}),t.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),t.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||t.contains(n.$selection[0],document.activeElement)||n.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){t(document.body).on("mousedown.select2_wprm."+e.id,function(e){var n=t(e.target),i=n.closest(".select2_wprm");t(".select2_wprm.select2_wprm-container--open").each(function(){var e=t(this);this!=i[0]&&e.data("element").select2_wprm("close")})})},i.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2_wprm."+e.id)},i.prototype.position=function(t,e){e.find(".selection").append(t)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("select2_wprm/selection/single",["jquery","./base","../utils","../keys"],function(t,e,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,e),o.prototype.render=function(){var t=o.__super__.render.call(this);return t.addClass("select2_wprm-selection--single"),t.html('<span class="select2_wprm-selection__rendered"></span><span class="select2_wprm-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},o.prototype.bind=function(t,e){var n=this;o.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2_wprm-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(t){1===t.which&&n.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(t){}),this.$selection.on("blur",function(t){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(t){n.update(t.data)})},o.prototype.clear=function(){this.$selection.find(".select2_wprm-selection__rendered").empty()},o.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},o.prototype.selectionContainer=function(){return t("<span></span>")},o.prototype.update=function(t){if(0===t.length)return void this.clear();var e=t[0],n=this.$selection.find(".select2_wprm-selection__rendered"),i=this.display(e,n);n.empty().append(i),n.prop("title",e.title||e.text)},o}),e.define("select2_wprm/selection/multiple",["jquery","./base","../utils"],function(t,e,n){function i(t,e){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,e),i.prototype.render=function(){var t=i.__super__.render.call(this);return t.addClass("select2_wprm-selection--multiple"),t.html('<ul class="select2_wprm-selection__rendered"></ul>'),t},i.prototype.bind=function(e,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){o.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2_wprm-selection__choice__remove",function(e){if(!o.options.get("disabled")){var n=t(this),i=n.parent(),r=i.data("data");o.trigger("unselect",{originalEvent:e,data:r})}})},i.prototype.clear=function(){this.$selection.find(".select2_wprm-selection__rendered").empty()},i.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},i.prototype.selectionContainer=function(){return t('<li class="select2_wprm-selection__choice"><span class="select2_wprm-selection__choice__remove" role="presentation">×</span></li>')},i.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],i=0;i<t.length;i++){var o=t[i],r=this.selectionContainer(),a=this.display(o,r);r.append(a),r.prop("title",o.title||o.text),r.data("data",o),e.push(r)}var s=this.$selection.find(".select2_wprm-selection__rendered");n.appendMany(s,e)}},i}),e.define("select2_wprm/selection/placeholder",["../utils"],function(t){function e(t,e,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n)}return e.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},e.prototype.createPlaceholder=function(t,e){var n=this.selectionContainer();return n.html(this.display(e)),n.addClass("select2_wprm-selection__placeholder").removeClass("select2_wprm-selection__choice"),n},e.prototype.update=function(t,e){var n=1==e.length&&e[0].id!=this.placeholder.id;if(e.length>1||n)return t.call(this,e);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2_wprm-selection__rendered").append(i)},e}),e.define("select2_wprm/selection/allowClear",["jquery","../keys"],function(t,e){function n(){}return n.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("select2_wprm: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2_wprm-selection__clear",function(t){i._handleClear(t)}),e.on("keypress",function(t){i._handleKeyboardClear(t,e)})},n.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var n=this.$selection.find(".select2_wprm-selection__clear");if(0!==n.length){e.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(t,n,i){i.isOpen()||(n.which==e.DELETE||n.which==e.BACKSPACE)&&this._handleClear(n)},n.prototype.update=function(e,n){if(e.call(this,n),!(this.$selection.find(".select2_wprm-selection__placeholder").length>0||0===n.length)){var i=t('<span class="select2_wprm-selection__clear">×</span>');i.data("data",n),this.$selection.find(".select2_wprm-selection__rendered").prepend(i)}},n}),e.define("select2_wprm/selection/search",["jquery","../utils","../keys"],function(t,e,n){function i(t,e,n){t.call(this,e,n)}return i.prototype.render=function(e){var n=t('<li class="select2_wprm-search select2_wprm-search--inline"><input class="select2_wprm-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=e.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(t,e,i){var o=this;t.call(this,e,i),e.on("open",function(){o.$search.trigger("focus")}),e.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),e.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),e.on("disable",function(){o.$search.prop("disabled",!0)}),e.on("focus",function(t){o.$search.trigger("focus")}),e.on("results:focus",function(t){o.$search.attr("aria-activedescendant",t.id)}),this.$selection.on("focusin",".select2_wprm-search--inline",function(t){o.trigger("focus",t)}),this.$selection.on("focusout",".select2_wprm-search--inline",function(t){o._handleBlur(t)}),this.$selection.on("keydown",".select2_wprm-search--inline",function(t){if(t.stopPropagation(),o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented(),t.which===n.BACKSPACE&&""===o.$search.val()){var e=o.$searchContainer.prev(".select2_wprm-selection__choice");if(e.length>0){var i=e.data("data");o.searchRemoveChoice(i),t.preventDefault()}}});var r=document.documentMode,a=r&&11>=r;this.$selection.on("input.searchcheck",".select2_wprm-search--inline",function(t){return a?void o.$selection.off("input.search input.searchcheck"):void o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2_wprm-search--inline",function(t){if(a&&"input"===t.type)return void o.$selection.off("input.search input.searchcheck");var e=t.which;e!=n.SHIFT&&e!=n.CTRL&&e!=n.ALT&&e!=n.TAB&&o.handleSearch(t)})},i.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},i.prototype.update=function(t,e){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2_wprm-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";t=""!==this.$search.attr("placeholder")?this.$selection.find(".select2_wprm-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",t)},i}),e.define("select2_wprm/selection/eventRelay",["jquery"],function(t){function e(){}return e.prototype.bind=function(e,n,i){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],a=["opening","closing","selecting","unselecting"];e.call(this,n,i),n.on("*",function(e,n){if(-1!==t.inArray(e,r)){n=n||{};var i=t.Event("select2_wprm:"+e,{params:n});o.$element.trigger(i),-1!==t.inArray(e,a)&&(n.prevented=i.isDefaultPrevented())}})},e}),e.define("select2_wprm/translation",["jquery","require"],function(t,e){function n(t){this.dict=t||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(t){return this.dict[t]},n.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},n._cache={},n.loadPath=function(t){if(!(t in n._cache)){var i=e(t);n._cache[t]=i}return new n(n._cache[t])},n}),e.define("select2_wprm/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("select2_wprm/data/base",["../utils"],function(t){function e(t,n){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,n){var i=e.id+"-result-";return i+=t.generateChars(4),i+=null!=n.id?"-"+n.id.toString():"-"+t.generateChars(4)},e}),e.define("select2_wprm/data/select",["./base","../utils","jquery"],function(t,e,n){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,t),i.prototype.current=function(t){var e=[],i=this;this.$element.find(":selected").each(function(){var t=n(this),o=i.item(t);e.push(o)}),t(e)},i.prototype.select=function(t){var e=this;if(t.selected=!0,n(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var o=[];t=[t],t.push.apply(t,i);for(var r=0;r<t.length;r++){var a=t[r].id;-1===n.inArray(a,o)&&o.push(a)}e.$element.val(o),e.$element.trigger("change")});else{var i=t.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple"))return t.selected=!1,n(t.element).is("option")?(t.element.selected=!1,void this.$element.trigger("change")):void this.current(function(i){for(var o=[],r=0;r<i.length;r++){var a=i[r].id;a!==t.id&&-1===n.inArray(a,o)&&o.push(a)}e.$element.val(o),e.$element.trigger("change")})},i.prototype.bind=function(t,e){var n=this;this.container=t,t.on("select",function(t){n.select(t.data)}),t.on("unselect",function(t){n.unselect(t.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(t,e){var i=[],o=this;this.$element.children().each(function(){var e=n(this);if(e.is("option")||e.is("optgroup")){var r=o.item(e),a=o.matches(t,r);null!==a&&i.push(a)}}),e({results:i})},i.prototype.addOptions=function(t){e.appendMany(this.$element,t)},i.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup"),e.label=t.text):(e=document.createElement("option"),void 0!==e.textContent?e.textContent=t.text:e.innerText=t.text),t.id&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var i=n(e),o=this._normalizeItem(t);return o.element=e,n.data(e,"data",o),i},i.prototype.item=function(t){var e={};if(null!=(e=n.data(t[0],"data")))return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var i=t.children("option"),o=[],r=0;r<i.length;r++){var a=n(i[r]),s=this.item(a);o.push(s)}e.children=o}return e=this._normalizeItem(e),e.element=t[0],n.data(t[0],"data",e),e},i.prototype._normalizeItem=function(t){n.isPlainObject(t)||(t={id:t,text:t}),t=n.extend({},{text:""},t);var e={selected:!1,disabled:!1};return null!=t.id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),n.extend({},e,t)},i.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},i}),e.define("select2_wprm/data/array",["./select","../utils","jquery"],function(t,e,n){function i(t,e){var n=e.get("data")||[];i.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(n))}return e.Extend(i,t),i.prototype.select=function(t){var e=this.$element.find("option").filter(function(e,n){return n.value==t.id.toString()});0===e.length&&(e=this.option(t),this.addOptions(e)),i.__super__.select.call(this,t)},i.prototype.convertToOptions=function(t){for(var i=this,o=this.$element.find("option"),r=o.map(function(){return i.item(n(this)).id}).get(),a=[],s=0;s<t.length;s++){var l=this._normalizeItem(t[s]);if(n.inArray(l.id,r)>=0){var c=o.filter(function(t){return function(){return n(this).val()==t.id}}(l)),u=this.item(c),d=n.extend(!0,{},l,u),h=this.option(d);c.replaceWith(h)}else{var p=this.option(l);if(l.children){var f=this.convertToOptions(l.children);e.appendMany(p,f)}a.push(p)}}return a},i}),e.define("select2_wprm/data/ajax",["./array","../utils","jquery"],function(t,e,n){function i(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,t,e)}return e.Extend(i,t),i.prototype._applyDefaults=function(t){var e={data:function(t){return n.extend({},t,{q:t.term})},transport:function(t,e,i){var o=n.ajax(t);return o.then(e),o.fail(i),o}};return n.extend({},e,t,!0)},i.prototype.processResults=function(t){return t},i.prototype.query=function(t,e){function i(){var i=r.transport(r,function(i){var r=o.processResults(i,t);o.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("select2_wprm: The AJAX results did not return an array in the `results` key of the response.")),e(r)},function(){i.status&&"0"===i.status||o.trigger("results:message",{message:"errorLoading"})});o._request=i}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,t)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i}),e.define("select2_wprm/data/tags",["jquery"],function(t){function e(e,n,i){var o=i.get("tags"),r=i.get("createTag");void 0!==r&&(this.createTag=r);var a=i.get("insertTag");if(void 0!==a&&(this.insertTag=a),e.call(this,n,i),t.isArray(o))for(var s=0;s<o.length;s++){var l=o[s],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return e.prototype.query=function(t,e,n){function i(t,r){for(var a=t.results,s=0;s<a.length;s++){var l=a[s],c=null!=l.children&&!i({results:l.children},!0);if(l.text===e.term||c)return!r&&(t.data=a,void n(t))}if(r)return!0;var u=o.createTag(e);if(null!=u){var d=o.option(u);d.attr("data-select2_wprm-tag",!0),o.addOptions([d]),o.insertTag(a,u)}t.results=a,n(t)}var o=this;return this._removeOldTags(),null==e.term||null!=e.page?void t.call(this,e,n):void t.call(this,e,i)},e.prototype.createTag=function(e,n){var i=t.trim(n.term);return""===i?null:{id:i,text:i}},e.prototype.insertTag=function(t,e,n){e.unshift(n)},e.prototype._removeOldTags=function(e){(this._lastTag,this.$element.find("option[data-select2_wprm-tag]")).each(function(){this.selected||t(this).remove()})},e}),e.define("select2_wprm/data/tokenizer",["jquery"],function(t){function e(t,e,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),t.call(this,e,n)}return e.prototype.bind=function(t,e,n){t.call(this,e,n),this.$search=e.dropdown.$search||e.selection.$search||n.find(".select2_wprm-search__field")},e.prototype.query=function(e,n,i){function o(e){var n=a._normalizeItem(e);if(!a.$element.find("option").filter(function(){return t(this).val()===n.id}).length){var i=a.option(n);i.attr("data-select2_wprm-tag",!0),a._removeOldTags(),a.addOptions([i])}r(n)}function r(t){a.trigger("select",{data:t})}var a=this;n.term=n.term||"";var s=this.tokenizer(n,this.options,o);s.term!==n.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.focus()),n.term=s.term),e.call(this,n,i)},e.prototype.tokenizer=function(e,n,i,o){for(var r=i.get("tokenSeparators")||[],a=n.term,s=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};s<a.length;){var c=a[s];if(-1!==t.inArray(c,r)){var u=a.substr(0,s),d=t.extend({},n,{term:u}),h=l(d);null!=h?(o(h),a=a.substr(s+1)||"",s=0):s++}else s++}return{term:a}},e}),e.define("select2_wprm/data/minimumInputLength",[],function(){function t(t,e,n){this.minimumInputLength=n.get("minimumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){return e.term=e.term||"",e.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):void t.call(this,e,n)},t}),e.define("select2_wprm/data/maximumInputLength",[],function(){function t(t,e,n){this.maximumInputLength=n.get("maximumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){return e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):void t.call(this,e,n)},t}),e.define("select2_wprm/data/maximumSelectionLength",[],function(){function t(t,e,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){var i=this;this.current(function(o){var r=null!=o?o.length:0;return i.maximumSelectionLength>0&&r>=i.maximumSelectionLength?void i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):void t.call(i,e,n)})},t}),e.define("select2_wprm/dropdown",["jquery","./utils"],function(t,e){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2_wprm-dropdown"><span class="select2_wprm-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},n.prototype.bind=function(){},n.prototype.position=function(t,e){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2_wprm/dropdown/search",["jquery","../utils"],function(t,e){function n(){}return n.prototype.render=function(e){var n=e.call(this),i=t('<span class="select2_wprm-search select2_wprm-search--dropdown"><input class="select2_wprm-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(e,n,i){var o=this;e.call(this,n,i),this.$search.on("keydown",function(t){o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(e){t(this).off("keyup")}),this.$search.on("keyup input",function(t){o.handleSearch(t)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),n.on("focus",function(){n.isOpen()&&o.$search.focus()}),n.on("results:all",function(t){null!=t.query.term&&""!==t.query.term||(o.showSearch(t)?o.$searchContainer.removeClass("select2_wprm-search--hide"):o.$searchContainer.addClass("select2_wprm-search--hide"))})},n.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},n.prototype.showSearch=function(t,e){return!0},n}),e.define("select2_wprm/dropdown/hidePlaceholder",[],function(){function t(t,e,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n,i)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var n=e.slice(0),i=e.length-1;i>=0;i--){var o=e[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},t}),e.define("select2_wprm/dropdown/infiniteScroll",["jquery"],function(t){function e(t,e,n,i){this.lastParams={},t.call(this,e,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,n,i){var o=this;e.call(this,n,i),n.on("query",function(t){o.lastParams=t,o.loading=!0}),n.on("query:append",function(t){o.lastParams=t,o.loading=!0}),this.$results.on("scroll",function(){var e=t.contains(document.documentElement,o.$loadingMore[0]);!o.loading&&e&&o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore()})},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2_wprm-results__option select2_wprm-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return e.html(n(this.lastParams)),e},e}),e.define("select2_wprm/dropdown/attachBody",["jquery","../utils"],function(t,e){function n(e,n,i){this.$dropdownParent=i.get("dropdownParent")||t(document.body),e.call(this,n,i)}return n.prototype.bind=function(t,e,n){var i=this,o=!1;t.call(this,e,n),e.on("open",function(){i._showDropdown(),i._attachPositioningHandler(e),o||(o=!0,e.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),e.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),e.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},n.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(t,e,n){e.attr("class",n.attr("class")),e.removeClass("select2_wprm"),e.addClass("select2_wprm-container--open"),e.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(e){var n=t("<span></span>"),i=e.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,r="scroll.select2_wprm."+i.id,a="resize.select2_wprm."+i.id,s="orientationchange.select2_wprm."+i.id,l=this.$container.parents().filter(e.hasScroll);l.each(function(){t(this).data("select2_wprm-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})}),l.on(r,function(e){var n=t(this).data("select2_wprm-scroll-position");t(this).scrollTop(n.y)}),t(window).on(r+" "+a+" "+s,function(t){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.select2_wprm."+i.id,r="resize.select2_wprm."+i.id,a="orientationchange.select2_wprm."+i.id;this.$container.parents().filter(e.hasScroll).off(o),t(window).off(o+" "+r+" "+a)},n.prototype._positionDropdown=function(){var e=t(window),n=this.$dropdown.hasClass("select2_wprm-dropdown--above"),i=this.$dropdown.hasClass("select2_wprm-dropdown--below"),o=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=r.top,a.bottom=r.top+a.height;var s={height:this.$dropdown.outerHeight(!1)},l={top:e.scrollTop(),bottom:e.scrollTop()+e.height()},c=l.top<r.top-s.height,u=l.bottom>r.bottom+s.height,d={left:r.left,top:a.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var p=h.offset();d.top-=p.top,d.left-=p.left,n||i||(o="below"),u||!c||n?!c&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(d.top=a.top-p.top-s.height),null!=o&&(this.$dropdown.removeClass("select2_wprm-dropdown--below select2_wprm-dropdown--above").addClass("select2_wprm-dropdown--"+o),this.$container.removeClass("select2_wprm-container--below select2_wprm-container--above").addClass("select2_wprm-container--"+o)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},n.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),e.define("select2_wprm/dropdown/minimumResultsForSearch",[],function(){function t(e){for(var n=0,i=0;i<e.length;i++){var o=e[i];o.children?n+=t(o.children):n++}return n}function e(t,e,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,n,i)}return e.prototype.showSearch=function(e,n){return!(t(n.data.results)<this.minimumResultsForSearch)&&e.call(this,n)},e}),e.define("select2_wprm/dropdown/selectOnClose",[],function(){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("close",function(t){i._handleSelectOnClose(t)})},t.prototype._handleSelectOnClose=function(t,e){if(e&&null!=e.originalselect2_wprmEvent){var n=e.originalselect2_wprmEvent;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},t}),e.define("select2_wprm/dropdown/closeOnSelect",[],function(){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("select",function(t){i._selectTriggered(t)}),e.on("unselect",function(t){i._selectTriggered(t)})},t.prototype._selectTriggered=function(t,e){var n=e.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalselect2_wprmEvent:e})},t}),e.define("select2_wprm/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,n="Please delete "+e+" character";return 1!=e&&(n+="s"),n},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("select2_wprm/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(t,e,n,i,o,r,a,s,l,c,u,d,h,p,f,m,g,v,_,w,b,y,C,x,S,T,E,D,A){function N(){this.reset()}return N.prototype.apply=function(d){if(d=t.extend(!0,{},this.defaults,d),null==d.dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=p:d.dataAdapter=h,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,_)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,w)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,m)),(null!=d.tokenSeparators||null!=d.tokenizer)&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null!=d.query){var A=e(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,A)}if(null!=d.initSelection){var N=e(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,N)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,x)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,C)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,E))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=b;else{var k=c.Decorate(b,y);d.dropdownAdapter=k}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,T)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,D)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var R=e(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,R)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,S)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=o:d.selectionAdapter=i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var O=e(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,O)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var I=d.language.split("-"),L=I[0];d.language=[d.language,L]}else d.language=[d.language];if(t.isArray(d.language)){var P=new u;d.language.push("en");for(var M=d.language,$=0;$<M.length;$++){var F=M[$],H={};try{H=u.loadPath(F)}catch(t){try{F=this.defaults.amdLanguageBase+F,H=u.loadPath(F)}catch(t){d.debug&&window.console&&console.warn&&console.warn('select2_wprm: The language file for "'+F+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(H)}d.translations=P}else{var B=u.loadPath(this.defaults.amdLanguageBase+"en"),j=new u(d.language);j.extend(B),d.translations=j}return d},N.prototype.reset=function(){function e(t){function e(t){return d[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function n(i,o){if(""===t.trim(i.term))return o;if(o.children&&o.children.length>0){for(var r=t.extend(!0,{},o),a=o.children.length-1;a>=0;a--)null==n(i,o.children[a])&&r.children.splice(a,1);return r.children.length>0?r:n(i,r)}var s=e(o.text).toUpperCase(),l=e(i.term).toUpperCase();return s.indexOf(l)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:A,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},N.prototype.set=function(e,n){var i=t.camelCase(e),o={};o[i]=n;var r=c._convertData(o);t.extend(this.defaults,r)},new N}),e.define("select2_wprm/options",["require","jquery","./defaults","./utils"],function(t,e,n,i){function o(e,o){if(this.options=e,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var r=t(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,r)}}return o.prototype.fromElement=function(t){var n=["select2_wprm"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),t.data("select2_wprmTags")&&(this.options.debug&&window.console&&console.warn&&console.warn('select2_wprm: The `data-select2_wprm-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of select2_wprm.'),t.data("data",t.data("select2_wprmTags")),t.data("tags",!0)),t.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("select2_wprm: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of select2_wprm."),t.attr("ajax--url",t.data("ajaxUrl")),t.data("ajax--url",t.data("ajaxUrl")));var o={};o=e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset?e.extend(!0,{},t[0].dataset,t.data()):t.data();var r=e.extend(!0,{},o);r=i._convertData(r);for(var a in r)e.inArray(a,n)>-1||(e.isPlainObject(this.options[a])?e.extend(this.options[a],r[a]):this.options[a]=r[a]);return this},o.prototype.get=function(t){return this.options[t]},o.prototype.set=function(t,e){this.options[t]=e},o}),e.define("select2_wprm/core",["jquery","./options","./utils","./keys"],function(t,e,n,i){var o=function t(n,i){null!=n.data("select2_wprm")&&n.data("select2_wprm").destroy(),this.$element=n,this.id=this._generateId(n),i=i||{},this.options=new e(i,n),t.__super__.constructor.call(this);var o=n.attr("tabindex")||0;n.data("old-tabindex",o),n.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(n,this.options);var a=this.render();this._placeContainer(a);var s=this.options.get("selectionAdapter");this.selection=new s(n,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var l=this.options.get("dropdownAdapter");this.dropdown=new l(n,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var c=this.options.get("resultsAdapter");this.results=new c(n,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){u.trigger("selection:update",{data:t})}),n.addClass("select2_wprm-hidden-accessible"),n.attr("aria-hidden","true"),this._syncAttributes(),n.data("select2_wprm",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(t){var e="";return e=null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+n.generateChars(2):n.generateChars(4),e=e.replace(/(:|\.|\[|\]|,)/g,""),e="select2_wprm-"+e},o.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},o.prototype._resolveWidth=function(t,e){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var i=this._resolveWidth(t,"style");return null!=i?i:this._resolveWidth(t,"element")}if("element"==e){var o=t.outerWidth(!1);return 0>=o?"auto":o+"px"}if("style"==e){var r=t.attr("style");if("string"!=typeof r)return null;for(var a=r.split(";"),s=0,l=a.length;l>s;s+=1){var c=a[s].replace(/\s/g,""),u=c.match(n);if(null!==u&&u.length>=1)return u[1]}return null}return e},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2_wprm",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2_wprm",function(t){e.trigger("focus",t)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){t.each(n,e._syncA),t.each(n,e._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},o.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",function(e,n){t.trigger(e,n)})},o.prototype._registerSelectionEvents=function(){var e=this,n=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(t){e.focus(t)}),this.selection.on("*",function(i,o){-1===t.inArray(i,n)&&e.trigger(i,o)})},o.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",function(e,n){t.trigger(e,n)})},o.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",function(e,n){t.trigger(e,n)})},o.prototype._registerEvents=function(){var t=this;this.on("open",function(){t.$container.addClass("select2_wprm-container--open")}),this.on("close",function(){t.$container.removeClass("select2_wprm-container--open")}),this.on("enable",function(){t.$container.removeClass("select2_wprm-container--disabled")}),this.on("disable",function(){t.$container.addClass("select2_wprm-container--disabled")}),this.on("blur",function(){t.$container.removeClass("select2_wprm-container--focus")}),this.on("query",function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,function(n){t.trigger("results:all",{data:n,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(n){t.trigger("results:append",{data:n,query:e})})}),this.on("keypress",function(e){var n=e.which;t.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&e.altKey?(t.close(),e.preventDefault()):n===i.ENTER?(t.trigger("results:select",{}),e.preventDefault()):n===i.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):n===i.UP?(t.trigger("results:previous",{}),e.preventDefault()):n===i.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&e.altKey)&&(t.open(),e.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(t,e){var n=!1,i=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&e.addedNodes.length>0)for(var o=0;o<e.addedNodes.length;o++){var r=e.addedNodes[o];r.selected&&(n=!0)}else e.removedNodes&&e.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(t){i.trigger("selection:update",{data:t})})}},o.prototype.trigger=function(t,e){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===e&&(e={}),t in i){var r=i[t],a={prevented:!1,name:t,args:e};if(n.call(this,r,a),a.prevented)return void(e.prevented=!0)}n.call(this,t,e)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2_wprm-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2_wprm-container--focus")},o.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2_wprm-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('select2_wprm: The `select2_wprm("enable")` method has been deprecated and will be removed in later select2_wprm versions. Use $element.prop("disabled") instead.'),(null==t||0===t.length)&&(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('select2_wprm: Data can no longer be set using `select2_wprm("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('select2_wprm: The `select2_wprm("val")` method has been deprecated and will be removed in later select2_wprm versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var n=e[0];t.isArray(n)&&(n=t.map(n,function(t){return t.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2_wprm"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2_wprm-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2_wprm"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=t('<span class="select2_wprm select2_wprm-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2_wprm-container--"+this.options.get("theme")),e.data("element",this.$element),e},o}),e.define("jquery-mousewheel",["jquery"],function(t){return t}),e.define("jquery.select2_wprm",["jquery","jquery-mousewheel","./select2_wprm/core","./select2_wprm/defaults"],function(t,e,n,i){if(null==t.fn.select2_wprm){var o=["open","close","destroy"];t.fn.select2_wprm=function(e){if(e=e||{},"object"==(void 0===e?"undefined":s(e)))return this.each(function(){var i=t.extend(!0,{},e);new n(t(this),i)}),this;if("string"==typeof e){var i,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=t(this).data("select2_wprm");null==n&&window.console&&console.error&&console.error("The select2_wprm('"+e+"') method was called on an element that is not using select2_wprm."),i=n[e].apply(n,r)}),t.inArray(e,o)>-1?this:i}throw new Error("Invalid arguments for select2_wprm: "+e)}}return null==t.fn.select2_wprm.defaults&&(t.fn.select2_wprm.defaults=i),n}),{define:e.define,require:e.require}}(),n=e.require("jquery.select2_wprm");return t.fn.select2_wprm.amd=e,n})}).call(e,n(0))},function(t,e){},function(t,e,n){"use strict";var i=n(20),o=n.n(i),r=n(10),a=n.n(r),s=n(22),l=(n.n(s),n(23)),c=(n.n(l),n(24)),u=n(1),d={editor:!1,clear:function(){this.editor.resetContent()},set:function(t){this.editor.setContent(t)},init:function(){if(this.editor)this.editor.addElements(".wprm-rich-editor");else{o.a.init(),Object(c.b)();var t={placeholder:{text:wprm_temp_admin.modal.text.medium_editor_placeholder,hideOnClick:!0},autoLink:!0,anchorPreview:{showWhenToolbarIsVisible:!1},imageDragging:!1,toolbar:{buttons:["bold","italic","underline","subscript","superscript"]},extensions:{}};t.toolbar.buttons.push("links"),t.extensions.links=new this.extensions.links,wprm_temp_admin.addons.premium&&(t.toolbar.buttons.push("adjustable_servings"),t.toolbar.buttons.push("timer"),t.extensions.adjustable_servings=new this.extensions.adjustable_servings,t.extensions.timer=new this.extensions.timer),this.editor=new a.a(".wprm-rich-editor",t),this.editor.subscribe("editableInput",function(){u.a.changes_made=!0})}},extensions:{adjustable_servings:a.a.Extension.extend({name:"adjustable_servings",init:function(){this.button=this.document.createElement("button"),this.button.classList.add("medium-editor-action"),this.button.innerHTML="<b>Adjustable</b>",this.button.title="Adjustable Quantity",this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},handleClick:function(t){var e=o.a.getSelection(),n=e.getRangeAt(0),i=n.cloneRange(),r=n.cloneRange(),a=n.getDocument().createTextNode("[adjustable]"),s=n.getDocument().createTextNode("[/adjustable]");r.collapse(!1),r.insertNode(s),r.detach(),n.setEndAfter(s),n.insertNode(a),o.a.getSelection().setSingleRange(i)}}),timer:a.a.Extension.extend({name:"timer",init:function(){this.button=this.document.createElement("button"),this.button.classList.add("medium-editor-action"),this.button.innerHTML="<b>Timer</b>",this.button.title="Timer",this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},handleClick:function(t){var e=o.a.getSelection(),n=e.getRangeAt(0),i=n.cloneRange(),r=n.cloneRange(),a=n.getDocument().createTextNode("[timer minutes=0]"),s=n.getDocument().createTextNode("[/timer]");r.collapse(!1),r.insertNode(s),r.detach(),n.setEndAfter(s),n.insertNode(a),o.a.getSelection().setSingleRange(i)}}),links:c.a}};e.a=d},function(t,e,n){(function(i){var o;/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
|
3 |
"classList"in document.createElement("_")||function(t){"use strict";if("Element"in t){var e=t.Element.prototype,n=Object,i=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array.prototype.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},r=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},a=function(t,e){if(""===e)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(t,e)},s=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,r=n.length;o<r;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=s.prototype=[],c=function(){return new s(this)};if(r.prototype=Error.prototype,l.item=function(t){return this[t]||null},l.contains=function(t){return t+="",-1!==a(this,t)},l.add=function(){var t,e=arguments,n=0,i=e.length,o=!1;do{t=e[n]+"",-1===a(this,t)&&(this.push(t),o=!0)}while(++n<i);o&&this._updateClassName()},l.remove=function(){var t,e,n=arguments,i=0,o=n.length,r=!1;do{for(t=n[i]+"",e=a(this,t);-1!==e;)this.splice(e,1),r=!0,e=a(this,t)}while(++i<o);r&&this._updateClassName()},l.toggle=function(t,e){t+="";var n=this.contains(t),i=n?!0!==e&&"remove":!1!==e&&"add";return i&&this[i](t),!0===e||!1===e?e:!n},l.toString=function(){return this.join(" ")},n.defineProperty){var u={get:c,enumerable:!0,configurable:!0};try{n.defineProperty(e,"classList",u)}catch(t){-2146823252===t.number&&(u.enumerable=!1,n.defineProperty(e,"classList",u))}}else n.prototype.__defineGetter__&&e.__defineGetter__("classList",c)}}(self),/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
|
4 |
function(t){"use strict";if(t.URL=t.URL||t.webkitURL,t.Blob&&t.URL)try{return void new Blob}catch(t){}var e=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||function(t){var e=function(t){return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},i=function(t,e,n){this.data=t,this.size=t.length,this.type=e,this.encoding=n},o=n.prototype,r=i.prototype,a=t.FileReaderSync,s=function(t){this.code=this[this.name=t]},l="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=l.length,u=t.URL||t.webkitURL||t,d=u.createObjectURL,h=u.revokeObjectURL,p=u,f=t.btoa,m=t.atob,g=t.ArrayBuffer,v=t.Uint8Array,_=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(i.fake=r.fake=!0;c--;)s.prototype[l[c]]=c+1;return u.createObjectURL||(p=t.URL=function(t){var e,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");return n.href=t,"origin"in n||("data:"===n.protocol.toLowerCase()?n.origin=null:(e=t.match(_),n.origin=e&&e[1])),n}),p.createObjectURL=function(t){var e,n=t.type;return null===n&&(n="application/octet-stream"),t instanceof i?(e="data:"+n,"base64"===t.encoding?e+";base64,"+t.data:"URI"===t.encoding?e+","+decodeURIComponent(t.data):f?e+";base64,"+f(t.data):e+","+encodeURIComponent(t.data)):d?d.call(u,t):void 0},p.revokeObjectURL=function(t){"data:"!==t.substring(0,5)&&h&&h.call(u,t)},o.append=function(t){var n=this.data;if(v&&(t instanceof g||t instanceof v)){for(var o="",r=new v(t),l=0,c=r.length;l<c;l++)o+=String.fromCharCode(r[l]);n.push(o)}else if("Blob"===e(t)||"File"===e(t)){if(!a)throw new s("NOT_READABLE_ERR");var u=new a;n.push(u.readAsBinaryString(t))}else t instanceof i?"base64"===t.encoding&&m?n.push(m(t.data)):"URI"===t.encoding?n.push(decodeURIComponent(t.data)):"raw"===t.encoding&&n.push(t.data):("string"!=typeof t&&(t+=""),n.push(unescape(encodeURIComponent(t))))},o.getBlob=function(t){return arguments.length||(t=null),new i(this.data.join(""),t,"raw")},o.toString=function(){return"[object BlobBuilder]"},r.slice=function(t,e,n){var o=arguments.length;return o<3&&(n=null),new i(this.data.slice(t,o>1?e:this.data.length),n,this.encoding)},r.toString=function(){return"[object Blob]"},r.close=function(){this.size=0,delete this.data},n}(t);t.Blob=function(t,n){var i=n?n.type||"":"",o=new e;if(t)for(var r=0,a=t.length;r<a;r++)Uint8Array&&t[r]instanceof Uint8Array?o.append(t[r].buffer):o.append(t[r]);var s=o.getBlob(i);return!s.slice&&s.webkitSlice&&(s.slice=s.webkitSlice),s};var n=Object.getPrototypeOf||function(t){return t.__proto__};t.Blob.prototype=n(new t.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this),function(r,a){"use strict";"object"==typeof t&&void 0!==i&&i&&i.versions&&i.versions.electron||"object"!=typeof t?void 0!==(o=function(){return a}.call(e,n,e,t))&&(t.exports=o):t.exports=a}(0,function(){"use strict";function t(t,e){return this.init(t,e)}return t.extensions={},function(e){function n(t,e){var n,i=Array.prototype.slice.call(arguments,2);e=e||{};for(var o=0;o<i.length;o++){var r=i[o];if(r)for(n in r)r.hasOwnProperty(n)&&void 0!==r[n]&&(t||!1===e.hasOwnProperty(n))&&(e[n]=r[n])}return e}var i=!1;try{var o=document.createElement("div"),r=document.createTextNode(" ");o.appendChild(r),i=o.contains(r)}catch(t){}var a={isIE:"Microsoft Internet Explorer"===navigator.appName||"Netscape"===navigator.appName&&null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent),isEdge:null!==/Edge\/\d+/.exec(navigator.userAgent),isFF:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isMac:e.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(t){return!!(a.isMac&&t.metaKey||!a.isMac&&t.ctrlKey)},isKey:function(t,e){var n=a.getKeyCode(t);return!1===Array.isArray(e)?n===e:-1!==e.indexOf(n)},getKeyCode:function(t){var e=t.which;return null===e&&(e=null!==t.charCode?t.charCode:t.keyCode),e},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var t=[!0].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},defaults:function(){var t=[!1].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},createLink:function(t,e,n,i){var o=t.createElement("a");return a.moveTextRangeIntoElement(e[0],e[e.length-1],o),o.setAttribute("href",n),i&&("_blank"===i&&o.setAttribute("rel","noopener noreferrer"),o.setAttribute("target",i)),o},findOrCreateMatchingTextNodes:function(t,e,n){for(var i=t.createTreeWalker(e,NodeFilter.SHOW_ALL,null,!1),o=[],r=0,s=!1,l=null,c=null;null!==(l=i.nextNode());)if(!(l.nodeType>3))if(3===l.nodeType){if(!s&&n.start<r+l.nodeValue.length&&(s=!0,c=a.splitStartNodeIfNeeded(l,n.start,r)),s&&a.splitEndNodeIfNeeded(l,c,n.end,r),s&&r===n.end)break;if(s&&r>n.end+1)throw new Error("PerformLinking overshot the target!");s&&o.push(c||l),r+=l.nodeValue.length,null!==c&&(r+=c.nodeValue.length,i.nextNode()),c=null}else"img"===l.tagName.toLowerCase()&&(!s&&n.start<=r&&(s=!0),s&&o.push(l));return o},splitStartNodeIfNeeded:function(t,e,n){return e!==n?t.splitText(e-n):null},splitEndNodeIfNeeded:function(t,e,n,i){var o,r;o=i+t.nodeValue.length+(e?e.nodeValue.length:0)-1,r=n-i-(e?t.nodeValue.length:0),o>=n&&i!==o&&0!==r&&(e||t).splitText(r)},splitByBlockElements:function(e){if(3!==e.nodeType&&1!==e.nodeType)return[];var n=[],i=t.util.blockContainerElementNames.join(",");if(3===e.nodeType||0===e.querySelectorAll(i).length)return[e];for(var o=0;o<e.childNodes.length;o++){var r=e.childNodes[o];if(3===r.nodeType)n.push(r);else if(1===r.nodeType){var a=r.querySelectorAll(i);0===a.length?n.push(r):n=n.concat(t.util.splitByBlockElements(r))}}return n},findAdjacentTextNodeWithContent:function(t,e,n){var i,o=!1,r=n.createNodeIterator(t,NodeFilter.SHOW_TEXT,null,!1);for(i=r.nextNode();i;){if(i===e)o=!0;else if(o&&3===i.nodeType&&i.nodeValue&&i.nodeValue.trim().length>0)break;i=r.nextNode()}return i},findPreviousSibling:function(t){if(!t||a.isMediumEditorElement(t))return!1;for(var e=t.previousSibling;!e&&!a.isMediumEditorElement(t.parentNode);)t=t.parentNode,e=t.previousSibling;return e},isDescendant:function(t,e,n){if(!t||!e)return!1;if(t===e)return!!n;if(1!==t.nodeType)return!1;if(i||3!==e.nodeType)return t.contains(e);for(var o=e.parentNode;null!==o;){if(o===t)return!0;o=o.parentNode}return!1},isElement:function(t){return!(!t||1!==t.nodeType)},throttle:function(t,e){var n,i,o,r=null,a=0,s=function(){a=Date.now(),r=null,o=t.apply(n,i),r||(n=i=null)};return e||0===e||(e=50),function(){var l=Date.now(),c=e-(l-a);return n=this,i=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),a=l,o=t.apply(n,i),r||(n=i=null)):r||(r=setTimeout(s,c)),o}},traverseUp:function(t,e){if(!t)return!1;do{if(1===t.nodeType){if(e(t))return t;if(a.isMediumEditorElement(t))return!1}t=t.parentNode}while(t);return!1},htmlEntities:function(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},insertHTMLCommand:function(e,n){var i,o,r,s,l,c,u,d=!1,h=["insertHTML",!1,n];if(!t.util.isEdge&&e.queryCommandSupported("insertHTML"))try{return e.execCommand.apply(e,h)}catch(t){}if(i=e.getSelection(),i.rangeCount){if(o=i.getRangeAt(0),u=o.commonAncestorContainer,a.isMediumEditorElement(u)&&!u.firstChild)o.selectNode(u.appendChild(e.createTextNode("")));else if(3===u.nodeType&&0===o.startOffset&&o.endOffset===u.nodeValue.length||3!==u.nodeType&&u.innerHTML===o.toString()){for(;!a.isMediumEditorElement(u)&&u.parentNode&&1===u.parentNode.childNodes.length&&!a.isMediumEditorElement(u.parentNode);)u=u.parentNode;o.selectNode(u)}for(o.deleteContents(),r=e.createElement("div"),r.innerHTML=n,s=e.createDocumentFragment();r.firstChild;)l=r.firstChild,c=s.appendChild(l);o.insertNode(s),c&&(o=o.cloneRange(),o.setStartAfter(c),o.collapse(!0),t.selection.selectRange(e,o)),d=!0}return e.execCommand.callListeners&&e.execCommand.callListeners(h,d),d},execFormatBlock:function(e,n){var i,o=a.getTopBlockContainer(t.selection.getSelectionStart(e));if("blockquote"===n){if(o&&(i=Array.prototype.slice.call(o.childNodes),i.some(function(t){return a.isBlockContainer(t)})))return e.execCommand("outdent",!1,null);if(a.isIE)return e.execCommand("indent",!1,n)}if(o&&n===o.nodeName.toLowerCase()&&(n="p"),a.isIE&&(n="<"+n+">"),o&&"blockquote"===o.nodeName.toLowerCase()){if(a.isIE&&"<p>"===n)return e.execCommand("outdent",!1,n);if((a.isFF||a.isEdge)&&"p"===n)return i=Array.prototype.slice.call(o.childNodes),i.some(function(t){return!a.isBlockContainer(t)})&&e.execCommand("formatBlock",!1,n),e.execCommand("outdent",!1,n)}return e.execCommand("formatBlock",!1,n)},setTargetBlank:function(t,e){var n,i=e||!1;if("a"===t.nodeName.toLowerCase())t.target="_blank",t.rel="noopener noreferrer";else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)!1!==i&&i!==t[n].attributes.href.value||(t[n].target="_blank",t[n].rel="noopener noreferrer")},removeTargetBlank:function(t,e){var n;if("a"===t.nodeName.toLowerCase())t.removeAttribute("target"),t.removeAttribute("rel");else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)e===t[n].attributes.href.value&&(t[n].removeAttribute("target"),t[n].removeAttribute("rel"))},addClassToAnchors:function(t,e){var n,i,o=e.split(" ");if("a"===t.nodeName.toLowerCase())for(i=0;i<o.length;i+=1)t.classList.add(o[i]);else{var r=t.getElementsByTagName("a");if(0===r.length){var s=a.getClosestTag(t,"a");t=s?[s]:[]}else t=r;for(n=0;n<t.length;n+=1)for(i=0;i<o.length;i+=1)t[n].classList.add(o[i])}},isListItem:function(t){if(!t)return!1;if("li"===t.nodeName.toLowerCase())return!0;for(var e=t.parentNode,n=e.nodeName.toLowerCase();"li"===n||!a.isBlockContainer(e)&&"div"!==n;){if("li"===n)return!0;if(!(e=e.parentNode))return!1;n=e.nodeName.toLowerCase()}return!1},cleanListDOM:function(e,n){if("li"===n.nodeName.toLowerCase()){var i=n.parentElement;"p"===i.parentElement.nodeName.toLowerCase()&&(a.unwrap(i.parentElement,e),t.selection.moveCursor(e,n.firstChild,n.firstChild.textContent.length))}},splitOffDOMTree:function(t,e,n){for(var i=e,o=null,r=!n;i!==t;){var a,s=i.parentNode,l=s.cloneNode(!1),c=r?i:s.firstChild;for(o&&(r?l.appendChild(o):a=o),o=l;c;){var u=c.nextSibling;c===i?(c.hasChildNodes()?c=c.cloneNode(!1):c.parentNode.removeChild(c),c.textContent&&o.appendChild(c),c=r?u:null):(c.parentNode.removeChild(c),(c.hasChildNodes()||c.textContent)&&o.appendChild(c),c=u)}a&&o.appendChild(a),i=s}return o},moveTextRangeIntoElement:function(t,e,n){if(!t||!e)return!1;var i=a.findCommonRoot(t,e);if(!i)return!1;if(e===t){var o=t.parentNode,r=t.nextSibling;return o.removeChild(t),n.appendChild(t),r?o.insertBefore(n,r):o.appendChild(n),n.hasChildNodes()}for(var s,l,c,u=[],d=0;d<i.childNodes.length;d++)if(c=i.childNodes[d],s){if(a.isDescendant(c,e,!0)){l=c;break}u.push(c)}else a.isDescendant(c,t,!0)&&(s=c);var h=l.nextSibling,p=i.ownerDocument.createDocumentFragment();return s===t?(s.parentNode.removeChild(s),p.appendChild(s)):p.appendChild(a.splitOffDOMTree(s,t)),u.forEach(function(t){t.parentNode.removeChild(t),p.appendChild(t)}),l===e?(l.parentNode.removeChild(l),p.appendChild(l)):p.appendChild(a.splitOffDOMTree(l,e,!0)),n.appendChild(p),l.parentNode===i?i.insertBefore(n,l):h?i.insertBefore(n,h):i.appendChild(n),n.hasChildNodes()},depthOfNode:function(t){for(var e=0,n=t;null!==n.parentNode;)n=n.parentNode,e++;return e},findCommonRoot:function(t,e){for(var n=a.depthOfNode(t),i=a.depthOfNode(e),o=t,r=e;n!==i;)n>i?(o=o.parentNode,n-=1):(r=r.parentNode,i-=1);for(;o!==r;)o=o.parentNode,r=r.parentNode;return o},isElementAtBeginningOfBlock:function(t){for(var e,n;!a.isBlockContainer(t)&&!a.isMediumEditorElement(t);){for(n=t;n=n.previousSibling;)if(e=3===n.nodeType?n.nodeValue:n.textContent,e.length>0)return!1;t=t.parentNode}return!0},isMediumEditorElement:function(t){return t&&t.getAttribute&&!!t.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(t){return a.traverseUp(t,function(t){return a.isMediumEditorElement(t)})},isBlockContainer:function(t){return t&&3!==t.nodeType&&-1!==a.blockContainerElementNames.indexOf(t.nodeName.toLowerCase())},getClosestBlockContainer:function(t){return a.traverseUp(t,function(t){return a.isBlockContainer(t)||a.isMediumEditorElement(t)})},getTopBlockContainer:function(t){var e=!!a.isBlockContainer(t)&&t;return a.traverseUp(t,function(t){return a.isBlockContainer(t)&&(e=t),!(e||!a.isMediumEditorElement(t)||(e=t,0))}),e},getFirstSelectableLeafNode:function(t){for(;t&&t.firstChild;)t=t.firstChild;if(t=a.traverseUp(t,function(t){return-1===a.emptyElementNames.indexOf(t.nodeName.toLowerCase())}),"table"===t.nodeName.toLowerCase()){var e=t.querySelector("th, td");e&&(t=e)}return t},getFirstTextNode:function(t){return a.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),a._getFirstTextNode(t)},_getFirstTextNode:function(t){if(3===t.nodeType)return t;for(var e=0;e<t.childNodes.length;e++){var n=a._getFirstTextNode(t.childNodes[e]);if(null!==n)return n}return null},ensureUrlHasProtocol:function(t){return-1===t.indexOf("://")?"http://"+t:t},warn:function(){void 0!==e.console&&"function"==typeof e.console.warn&&e.console.warn.apply(e.console,arguments)},deprecated:function(t,e,n){var i=t+" is deprecated, please use "+e+" instead.";n&&(i+=" Will be removed in "+n),a.warn(i)},deprecatedMethod:function(t,e,n,i){a.deprecated(t,e,i),"function"==typeof this[e]&&this[e].apply(this,n)},cleanupAttrs:function(t,e){e.forEach(function(e){t.removeAttribute(e)})},cleanupTags:function(t,e){-1!==e.indexOf(t.nodeName.toLowerCase())&&t.parentNode.removeChild(t)},unwrapTags:function(e,n){-1!==n.indexOf(e.nodeName.toLowerCase())&&t.util.unwrap(e,document)},getClosestTag:function(t,e){return a.traverseUp(t,function(t){return t.nodeName.toLowerCase()===e.toLowerCase()})},unwrap:function(t,e){for(var n=e.createDocumentFragment(),i=Array.prototype.slice.call(t.childNodes),o=0;o<i.length;o++)n.appendChild(i[o]);n.childNodes.length?t.parentNode.replaceChild(n,t):t.parentNode.removeChild(t)},guid:function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}};t.util=a}(window),function(){var e=function(e){t.util.extend(this,e)};e.extend=function(e){var n,i=this;n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return i.apply(this,arguments)},t.util.extend(n,i);var o=function(){this.constructor=n};return o.prototype=i.prototype,n.prototype=new o,e&&t.util.extend(n.prototype,e),n},e.prototype={init:function(){},base:void 0,name:void 0,checkState:void 0,destroy:void 0,queryCommandState:void 0,isActive:void 0,isAlreadyApplied:void 0,setActive:void 0,setInactive:void 0,getInteractionElements:void 0,window:void 0,document:void 0,getEditorElements:function(){return this.base.elements},getEditorId:function(){return this.base.id},getEditorOption:function(t){return this.base.options[t]}},["execAction","on","off","subscribe","trigger"].forEach(function(t){e.prototype[t]=function(){return this.base[t].apply(this.base,arguments)}}),t.Extension=e}(),function(){function e(e){return t.util.isBlockContainer(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}var n={findMatchingSelectionParent:function(e,n){var i,o,r=n.getSelection();return 0!==r.rangeCount&&(i=r.getRangeAt(0),o=i.commonAncestorContainer,t.util.traverseUp(o,e))},getSelectionElement:function(e){return this.findMatchingSelectionParent(function(e){return t.util.isMediumEditorElement(e)},e)},exportSelection:function(t,e){if(!t)return null;var n=null,i=e.getSelection();if(i.rangeCount>0){var o,r=i.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(t),a.setEnd(r.startContainer,r.startOffset),o=a.toString().length,n={start:o,end:o+r.toString().length},this.doesRangeStartWithImages(r,e)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(t,n,r.endContainer,r.endOffset);if(s&&(n.trailingImageCount=s),0!==o){var l=this.getIndexRelativeToAdjacentEmptyBlocks(e,t,r.startContainer,r.startOffset);-1!==l&&(n.emptyBlocksIndex=l)}}return n},importSelection:function(t,e,n,i){if(t&&e){var o=n.createRange();o.setStart(e,0),o.collapse(!0);var r,a=e,s=[],l=0,c=!1,u=!1,d=0,h=!1,p=!1,f=null;for((i||t.startsWithImage||void 0!==t.emptyBlocksIndex)&&(p=!0);!h&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||u){if(t.trailingImageCount&&u&&("img"===a.nodeName.toLowerCase()&&d++,d===t.trailingImageCount)){for(var m=0;a.parentNode.childNodes[m]!==a;)m++;o.setEnd(a.parentNode,m+1),h=!0}if(!h&&1===a.nodeType)for(var g=a.childNodes.length-1;g>=0;)s.push(a.childNodes[g]),g-=1}else r=l+a.length,!c&&t.start>=l&&t.start<=r&&(p||t.start<r?(o.setStart(a,t.start-l),c=!0):f=a),c&&t.end>=l&&t.end<=r&&(t.trailingImageCount?u=!0:(o.setEnd(a,t.end-l),h=!0)),l=r;h||(a=s.pop())}!c&&f&&(o.setStart(f,f.length),o.setEnd(f,f.length)),void 0!==t.emptyBlocksIndex&&(o=this.importSelectionMoveCursorPastBlocks(n,e,t.emptyBlocksIndex,o)),i&&(o=this.importSelectionMoveCursorPastAnchor(t,o)),this.selectRange(n,o)}},importSelectionMoveCursorPastAnchor:function(e,n){var i=function(t){return"a"===t.nodeName.toLowerCase()};if(e.start===e.end&&3===n.startContainer.nodeType&&n.startOffset===n.startContainer.nodeValue.length&&t.util.traverseUp(n.startContainer,i)){for(var o=n.startContainer,r=n.startContainer.parentNode;null!==r&&"a"!==r.nodeName.toLowerCase();)r.childNodes[r.childNodes.length-1]!==o?r=null:(o=r,r=r.parentNode);if(null!==r&&"a"===r.nodeName.toLowerCase()){for(var a=null,s=0;null===a&&s<r.parentNode.childNodes.length;s++)r.parentNode.childNodes[s]===r&&(a=s);n.setStart(r.parentNode,a+1),n.collapse(!0)}}return n},importSelectionMoveCursorPastBlocks:function(n,i,o,r){var a,s,l=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,e,!1),c=r.startContainer,u=0;for(o=o||1,a=3===c.nodeType&&t.util.isBlockContainer(c.previousSibling)?c.previousSibling:t.util.getClosestBlockContainer(c);l.nextNode();)if(s){if(s=l.currentNode,++u===o)break;if(s.textContent.length>0)break}else a===l.currentNode&&(s=l.currentNode);return s||(s=a),r.setStart(t.util.getFirstSelectableLeafNode(s),0),r},getIndexRelativeToAdjacentEmptyBlocks:function(n,i,o,r){if(o.textContent.length>0&&r>0)return-1;var a=o;if(3!==a.nodeType&&(a=o.childNodes[r]),a){if(!t.util.isElementAtBeginningOfBlock(a))return-1;var s=t.util.findPreviousSibling(a);if(!s)return-1;if(s.nodeValue)return-1}for(var l=t.util.getClosestBlockContainer(o),c=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,e,!1),u=0;c.nextNode();){var d=""===c.currentNode.textContent;if((d||u>0)&&(u+=1),c.currentNode===l)return u;d||(u=0)}return u},doesRangeStartWithImages:function(t,e){if(0!==t.startOffset||1!==t.startContainer.nodeType)return!1;if("img"===t.startContainer.nodeName.toLowerCase())return!0;var n=t.startContainer.querySelector("img");if(!n)return!1;for(var i=e.createTreeWalker(t.startContainer,NodeFilter.SHOW_ALL,null,!1);i.nextNode();){var o=i.currentNode;if(o===n)break;if(o.nodeValue)return!1}return!0},getTrailingImageCount:function(t,e,n,i){if(0===i||1!==n.nodeType)return 0;if("img"!==n.nodeName.toLowerCase()&&!n.querySelector("img"))return 0;for(var o=n.childNodes[i-1];o.hasChildNodes();)o=o.lastChild;for(var r,a=t,s=[],l=0,c=!1,u=!1,d=!1,h=0;!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||u){if("img"===a.nodeName.toLowerCase()&&h++,a===o)d=!0;else if(1===a.nodeType)for(var p=a.childNodes.length-1;p>=0;)s.push(a.childNodes[p]),p-=1}else h=0,r=l+a.length,!c&&e.start>=l&&e.start<=r&&(c=!0),c&&e.end>=l&&e.end<=r&&(u=!0),l=r;d||(a=s.pop())}return h},selectionContainsContent:function(t){var e=t.getSelection();if(!e||e.isCollapsed||!e.rangeCount)return!1;if(""!==e.toString().trim())return!0;var n=this.getSelectedParentElement(e.getRangeAt(0));return!(!n||!("img"===n.nodeName.toLowerCase()||1===n.nodeType&&n.querySelector("img")))},selectionInContentEditableFalse:function(t){var e,n=this.findMatchingSelectionParent(function(t){var n=t&&t.getAttribute("contenteditable");return"true"===n&&(e=!0),"#text"!==t.nodeName&&"false"===n},t);return!e&&n},getSelectionHtml:function(t){var e,n,i,o="",r=t.getSelection();if(r.rangeCount){for(i=t.createElement("div"),e=0,n=r.rangeCount;e<n;e+=1)i.appendChild(r.getRangeAt(e).cloneContents());o=i.innerHTML}return o},getCaretOffsets:function(t,e){var n,i;return e||(e=window.getSelection().getRangeAt(0)),n=e.cloneRange(),i=e.cloneRange(),n.selectNodeContents(t),n.setEnd(e.endContainer,e.endOffset),i.selectNodeContents(t),i.setStart(e.endContainer,e.endOffset),{left:n.toString().length,right:i.toString().length}},rangeSelectsSingleNode:function(t){var e=t.startContainer;return e===t.endContainer&&e.hasChildNodes()&&t.endOffset===t.startOffset+1},getSelectedParentElement:function(t){return t?this.rangeSelectsSingleNode(t)&&3!==t.startContainer.childNodes[t.startOffset].nodeType?t.startContainer.childNodes[t.startOffset]:3===t.startContainer.nodeType?t.startContainer.parentNode:t.startContainer:null},getSelectedElements:function(t){var e,n,i,o=t.getSelection();if(!o.rangeCount||o.isCollapsed||!o.getRangeAt(0).commonAncestorContainer)return[];if(e=o.getRangeAt(0),3===e.commonAncestorContainer.nodeType){for(n=[],i=e.commonAncestorContainer;i.parentNode&&1===i.parentNode.childNodes.length;)n.push(i.parentNode),i=i.parentNode;return n}return[].filter.call(e.commonAncestorContainer.getElementsByTagName("*"),function(t){return"function"!=typeof o.containsNode||o.containsNode(t,!0)})},selectNode:function(t,e){var n=e.createRange();n.selectNodeContents(t),this.selectRange(e,n)},select:function(t,e,n,i,o){var r=t.createRange();return r.setStart(e,n),i?r.setEnd(i,o):r.collapse(!0),this.selectRange(t,r),r},clearSelection:function(t,e){e?t.getSelection().collapseToStart():t.getSelection().collapseToEnd()},moveCursor:function(t,e,n){this.select(t,e,n)},getSelectionRange:function(t){var e=t.getSelection();return 0===e.rangeCount?null:e.getRangeAt(0)},selectRange:function(t,e){var n=t.getSelection();n.removeAllRanges(),n.addRange(e)},getSelectionStart:function(t){var e=t.getSelection().anchorNode;return e&&3===e.nodeType?e.parentNode:e}};t.selection=n}(),function(){function e(e,n){return!!e&&e.some(function(e){if("function"!=typeof e.getInteractionElements)return!1;var i=e.getInteractionElements();return!!i&&(Array.isArray(i)||(i=[i]),i.some(function(e){return t.util.isDescendant(e,n,!0)}))})}var n=function(t){this.base=t,this.options=this.base.options,this.events=[],this.disabledEvents={},this.customEvents={},this.listeners={}};n.prototype={InputEventOnContenteditableSupported:!t.util.isIE&&!t.util.isEdge,attachDOMEvent:function(e,n,i,o){var r=this.base.options.contentWindow,a=this.base.options.ownerDocument;e=t.util.isElement(e)||[r,a].indexOf(e)>-1?[e]:e,Array.prototype.forEach.call(e,function(t){t.addEventListener(n,i,o),this.events.push([t,n,i,o])}.bind(this))},detachDOMEvent:function(e,n,i,o){var r,a,s=this.base.options.contentWindow,l=this.base.options.ownerDocument;e&&(e=t.util.isElement(e)||[s,l].indexOf(e)>-1?[e]:e,Array.prototype.forEach.call(e,function(t){-1!==(r=this.indexOfListener(t,n,i,o))&&(a=this.events.splice(r,1)[0],a[0].removeEventListener(a[1],a[2],a[3]))}.bind(this)))},indexOfListener:function(t,e,n,i){var o,r,a;for(o=0,r=this.events.length;o<r;o+=1)if(a=this.events[o],a[0]===t&&a[1]===e&&a[2]===n&&a[3]===i)return o;return-1},detachAllDOMEvents:function(){for(var t=this.events.pop();t;)t[0].removeEventListener(t[1],t[2],t[3]),t=this.events.pop()},detachAllEventsFromElement:function(t){for(var e=this.events.filter(function(e){return e&&e[0].getAttribute&&e[0].getAttribute("medium-editor-index")===t.getAttribute("medium-editor-index")}),n=0,i=e.length;n<i;n++){var o=e[n];this.detachDOMEvent(o[0],o[1],o[2],o[3])}},attachAllEventsToElement:function(t){this.listeners.editableInput&&(this.contentCache[t.getAttribute("medium-editor-index")]=t.innerHTML),this.eventsCache&&this.eventsCache.forEach(function(e){this.attachDOMEvent(t,e.name,e.handler.bind(this))},this)},enableCustomEvent:function(t){void 0!==this.disabledEvents[t]&&delete this.disabledEvents[t]},disableCustomEvent:function(t){this.disabledEvents[t]=!0},attachCustomEvent:function(t,e){this.setupListener(t),this.customEvents[t]||(this.customEvents[t]=[]),this.customEvents[t].push(e)},detachCustomEvent:function(t,e){var n=this.indexOfCustomListener(t,e);-1!==n&&this.customEvents[t].splice(n,1)},indexOfCustomListener:function(t,e){return this.customEvents[t]&&this.customEvents[t].length?this.customEvents[t].indexOf(e):-1},detachAllCustomEvents:function(){this.customEvents={}},triggerCustomEvent:function(t,e,n){this.customEvents[t]&&!this.disabledEvents[t]&&this.customEvents[t].forEach(function(t){t(e,n)})},destroy:function(){this.detachAllDOMEvents(),this.detachAllCustomEvents(),this.detachExecCommand(),this.base.elements&&this.base.elements.forEach(function(t){t.removeAttribute("data-medium-focused")})},attachToExecCommand:function(){this.execCommandListener||(this.execCommandListener=function(t){this.handleDocumentExecCommand(t)}.bind(this),this.wrapExecCommand(),this.options.ownerDocument.execCommand.listeners.push(this.execCommandListener))},detachExecCommand:function(){var t=this.options.ownerDocument;if(this.execCommandListener&&t.execCommand.listeners){var e=t.execCommand.listeners.indexOf(this.execCommandListener);-1!==e&&t.execCommand.listeners.splice(e,1),t.execCommand.listeners.length||this.unwrapExecCommand()}},wrapExecCommand:function(){var t=this.options.ownerDocument;if(!t.execCommand.listeners){var e=function(e,n){t.execCommand.listeners&&t.execCommand.listeners.forEach(function(t){t({command:e[0],value:e[2],args:e,result:n})})},n=function(){var n=t.execCommand.orig.apply(this,arguments);if(!t.execCommand.listeners)return n;var i=Array.prototype.slice.call(arguments);return e(i,n),n};n.orig=t.execCommand,n.listeners=[],n.callListeners=e,t.execCommand=n}},unwrapExecCommand:function(){var t=this.options.ownerDocument;t.execCommand.orig&&(t.execCommand=t.execCommand.orig)},setupListener:function(t){if(!this.listeners[t]){switch(t){case"externalInteraction":this.attachDOMEvent(this.options.ownerDocument.body,"mousedown",this.handleBodyMousedown.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"click",this.handleBodyClick.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"focus",this.handleBodyFocus.bind(this),!0);break;case"blur":case"focus":this.setupListener("externalInteraction");break;case"editableInput":this.contentCache={},this.base.elements.forEach(function(t){this.contentCache[t.getAttribute("medium-editor-index")]=t.innerHTML},this),this.InputEventOnContenteditableSupported&&this.attachToEachElement("input",this.handleInput),this.InputEventOnContenteditableSupported||(this.setupListener("editableKeypress"),this.keypressUpdateInput=!0,this.attachDOMEvent(document,"selectionchange",this.handleDocumentSelectionChange.bind(this)),this.attachToExecCommand());break;case"editableClick":this.attachToEachElement("click",this.handleClick);break;case"editableBlur":this.attachToEachElement("blur",this.handleBlur);break;case"editableKeypress":this.attachToEachElement("keypress",this.handleKeypress);break;case"editableKeyup":this.attachToEachElement("keyup",this.handleKeyup);break;case"editableKeydown":this.attachToEachElement("keydown",this.handleKeydown);break;case"editableKeydownSpace":case"editableKeydownEnter":case"editableKeydownTab":case"editableKeydownDelete":this.setupListener("editableKeydown");break;case"editableMouseover":this.attachToEachElement("mouseover",this.handleMouseover);break;case"editableDrag":this.attachToEachElement("dragover",this.handleDragging),this.attachToEachElement("dragleave",this.handleDragging);break;case"editableDrop":this.attachToEachElement("drop",this.handleDrop);break;case"editablePaste":this.attachToEachElement("paste",this.handlePaste)}this.listeners[t]=!0}},attachToEachElement:function(t,e){this.eventsCache||(this.eventsCache=[]),this.base.elements.forEach(function(n){this.attachDOMEvent(n,t,e.bind(this))},this),this.eventsCache.push({name:t,handler:e})},cleanupElement:function(t){var e=t.getAttribute("medium-editor-index");e&&(this.detachAllEventsFromElement(t),this.contentCache&&delete this.contentCache[e])},focusElement:function(t){t.focus(),this.updateFocus(t,{target:t,type:"focus"})},updateFocus:function(n,i){var o,r=this.base.getFocusedElement();r&&"click"===i.type&&this.lastMousedownTarget&&(t.util.isDescendant(r,this.lastMousedownTarget,!0)||e(this.base.extensions,this.lastMousedownTarget))&&(o=r),o||this.base.elements.some(function(e){return!o&&t.util.isDescendant(e,n,!0)&&(o=e),!!o},this);var a=!t.util.isDescendant(r,n,!0)&&!e(this.base.extensions,n);o!==r&&(r&&a&&(r.removeAttribute("data-medium-focused"),this.triggerCustomEvent("blur",i,r)),o&&(o.setAttribute("data-medium-focused",!0),this.triggerCustomEvent("focus",i,o))),a&&this.triggerCustomEvent("externalInteraction",i)},updateInput:function(t,e){if(this.contentCache){var n=t.getAttribute("medium-editor-index"),i=t.innerHTML;i!==this.contentCache[n]&&this.triggerCustomEvent("editableInput",e,t),this.contentCache[n]=i}},handleDocumentSelectionChange:function(e){if(e.currentTarget&&e.currentTarget.activeElement){var n,i=e.currentTarget.activeElement;this.base.elements.some(function(e){return!!t.util.isDescendant(e,i,!0)&&(n=e,!0)},this),n&&this.updateInput(n,{target:i,currentTarget:n})}},handleDocumentExecCommand:function(){var t=this.base.getFocusedElement();t&&this.updateInput(t,{target:t,currentTarget:t})},handleBodyClick:function(t){this.updateFocus(t.target,t)},handleBodyFocus:function(t){this.updateFocus(t.target,t)},handleBodyMousedown:function(t){this.lastMousedownTarget=t.target},handleInput:function(t){this.updateInput(t.currentTarget,t)},handleClick:function(t){this.triggerCustomEvent("editableClick",t,t.currentTarget)},handleBlur:function(t){this.triggerCustomEvent("editableBlur",t,t.currentTarget)},handleKeypress:function(t){if(this.triggerCustomEvent("editableKeypress",t,t.currentTarget),this.keypressUpdateInput){var e={target:t.target,currentTarget:t.currentTarget};setTimeout(function(){this.updateInput(e.currentTarget,e)}.bind(this),0)}},handleKeyup:function(t){this.triggerCustomEvent("editableKeyup",t,t.currentTarget)},handleMouseover:function(t){this.triggerCustomEvent("editableMouseover",t,t.currentTarget)},handleDragging:function(t){this.triggerCustomEvent("editableDrag",t,t.currentTarget)},handleDrop:function(t){this.triggerCustomEvent("editableDrop",t,t.currentTarget)},handlePaste:function(t){this.triggerCustomEvent("editablePaste",t,t.currentTarget)},handleKeydown:function(e){return this.triggerCustomEvent("editableKeydown",e,e.currentTarget),t.util.isKey(e,t.util.keyCode.SPACE)?this.triggerCustomEvent("editableKeydownSpace",e,e.currentTarget):t.util.isKey(e,t.util.keyCode.ENTER)||e.ctrlKey&&t.util.isKey(e,t.util.keyCode.M)?this.triggerCustomEvent("editableKeydownEnter",e,e.currentTarget):t.util.isKey(e,t.util.keyCode.TAB)?this.triggerCustomEvent("editableKeydownTab",e,e.currentTarget):t.util.isKey(e,[t.util.keyCode.DELETE,t.util.keyCode.BACKSPACE])?this.triggerCustomEvent("editableKeydownDelete",e,e.currentTarget):void 0}},t.Events=n}(),function(){var e=t.Extension.extend({action:void 0,aria:void 0,tagNames:void 0,style:void 0,useQueryState:void 0,contentDefault:void 0,contentFA:void 0,classList:void 0,attrs:void 0,constructor:function(n){e.isBuiltInButton(n)?t.Extension.call(this,this.defaults[n]):t.Extension.call(this,n)},init:function(){t.Extension.prototype.init.apply(this,arguments),this.button=this.createButton(),this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},getAction:function(){return"function"==typeof this.action?this.action(this.base.options):this.action},getAria:function(){return"function"==typeof this.aria?this.aria(this.base.options):this.aria},getTagNames:function(){return"function"==typeof this.tagNames?this.tagNames(this.base.options):this.tagNames},createButton:function(){var t=this.document.createElement("button"),e=this.contentDefault,n=this.getAria(),i=this.getEditorOption("buttonLabels");return t.classList.add("medium-editor-action"),t.classList.add("medium-editor-action-"+this.name),this.classList&&this.classList.forEach(function(e){t.classList.add(e)}),t.setAttribute("data-action",this.getAction()),n&&(t.setAttribute("title",n),t.setAttribute("aria-label",n)),this.attrs&&Object.keys(this.attrs).forEach(function(e){t.setAttribute(e,this.attrs[e])},this),"fontawesome"===i&&this.contentFA&&(e=this.contentFA),t.innerHTML=e,t},handleClick:function(t){t.preventDefault(),t.stopPropagation();var e=this.getAction();e&&this.execAction(e)},isActive:function(){return this.button.classList.contains(this.getEditorOption("activeButtonClass"))},setInactive:function(){this.button.classList.remove(this.getEditorOption("activeButtonClass")),delete this.knownState},setActive:function(){this.button.classList.add(this.getEditorOption("activeButtonClass")),delete this.knownState},queryCommandState:function(){var t=null;return this.useQueryState&&(t=this.base.queryCommandState(this.getAction())),t},isAlreadyApplied:function(t){var e,n,i=!1,o=this.getTagNames();return!1===this.knownState||!0===this.knownState?this.knownState:(o&&o.length>0&&(i=-1!==o.indexOf(t.nodeName.toLowerCase())),!i&&this.style&&(e=this.style.value.split("|"),n=this.window.getComputedStyle(t,null).getPropertyValue(this.style.prop),e.forEach(function(t){this.knownState||((i=-1!==n.indexOf(t))||"text-decoration"!==this.style.prop)&&(this.knownState=i)},this)),i)}});e.isBuiltInButton=function(e){return"string"==typeof e&&t.extensions.button.prototype.defaults.hasOwnProperty(e)},t.extensions.button=e}(),function(){t.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"<b>B</b>",contentFA:'<i class="fa fa-bold"></i>'},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"<b><i>I</i></b>",contentFA:'<i class="fa fa-italic"></i>'},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"<b><u>U</u></b>",contentFA:'<i class="fa fa-underline"></i>'},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"<s>A</s>",contentFA:'<i class="fa fa-strikethrough"></i>'},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"<b>x<sup>1</sup></b>",contentFA:'<i class="fa fa-superscript"></i>'},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"<b>x<sub>1</sub></b>",contentFA:'<i class="fa fa-subscript"></i>'},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"<b>image</b>",contentFA:'<i class="fa fa-picture-o"></i>'},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"<b>html</b>",contentFA:'<i class="fa fa-code"></i>'},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"<b>1.</b>",contentFA:'<i class="fa fa-list-ol"></i>'},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"<b>•</b>",contentFA:'<i class="fa fa-list-ul"></i>'},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"<b>→</b>",contentFA:'<i class="fa fa-indent"></i>'},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"<b>←</b>",contentFA:'<i class="fa fa-outdent"></i>'},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"<b>C</b>",contentFA:'<i class="fa fa-align-center"></i>'},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"<b>J</b>",contentFA:'<i class="fa fa-align-justify"></i>'},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"<b>L</b>",contentFA:'<i class="fa fa-align-left"></i>'},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"<b>R</b>",contentFA:'<i class="fa fa-align-right"></i>'},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"<b>X</b>",contentFA:'<i class="fa fa-eraser"></i>'},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"<b>“</b>",contentFA:'<i class="fa fa-quote-right"></i>'},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"<b>0101</b>",contentFA:'<i class="fa fa-code fa-lg"></i>'},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"<b>H1</b>",contentFA:'<i class="fa fa-header"><sup>1</sup>'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"<b>H2</b>",contentFA:'<i class="fa fa-header"><sup>2</sup>'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"<b>H3</b>",contentFA:'<i class="fa fa-header"><sup>3</sup>'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"<b>H4</b>",contentFA:'<i class="fa fa-header"><sup>4</sup>'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"<b>H5</b>",contentFA:'<i class="fa fa-header"><sup>5</sup>'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"<b>H6</b>",contentFA:'<i class="fa fa-header"><sup>6</sup>'}}}(),function(){var e=t.extensions.button.extend({init:function(){t.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return!!this.hasForm&&this.getForm().classList.contains(this.activeClass)},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.hideToolbarDefaultActions()},setToolbarPosition:function(){var t=this.base.getExtensionByName("toolbar");t&&t.setToolbarPosition()}});t.extensions.form=e}(),function(){var e=t.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"<b>#</b>",contentFA:'<i class="fa fa-link"></i>',init:function(){t.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(e){e.preventDefault(),e.stopPropagation();var n=t.selection.getSelectionRange(this.document);return"a"===n.startContainer.nodeName.toLowerCase()||"a"===n.endContainer.nodeName.toLowerCase()||t.util.getClosestTag(t.selection.getSelectedParentElement(n),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(e){t.util.isKey(e,t.util.keyCode.K)&&t.util.isMetaCtrlKey(e)&&!e.shiftKey&&this.handleClick(e)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var t=['<input type="text" class="medium-editor-toolbar-input" placeholder="',this.placeholderText,'">'];return t.push('<a href="#" class="medium-editor-toolbar-save">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':this.formSaveLabel,"</a>"),t.push('<a href="#" class="medium-editor-toolbar-close">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':this.formCloseLabel,"</a>"),this.targetCheckbox&&t.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-target" id="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">','<label for="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">',this.targetCheckboxText,"</label>","</div>"),this.customClassOption&&t.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-button">',"<label>",this.customClassOptionText,"</label>","</div>"),t.join("")},isDisplayed:function(){return t.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){t.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(e){var n=this.getInput(),i=this.getAnchorTargetCheckbox(),o=this.getAnchorButtonCheckbox();if(e=e||{value:""},"string"==typeof e&&(e={value:e}),this.base.saveSelection(),this.hideToolbarDefaultActions(),t.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),n.value=e.value,n.focus(),i&&(i.checked="_blank"===e.target),o){var r=e.buttonClass?e.buttonClass.split(" "):[];o.checked=-1!==r.indexOf(this.customClassOption)}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var t=this.getAnchorTargetCheckbox(),e=this.getAnchorButtonCheckbox(),n={value:this.getInput().value.trim()};return this.linkValidation&&(n.value=this.checkLinkFormat(n.value)),n.target="_self",t&&t.checked&&(n.target="_blank"),e&&e.checked&&(n.buttonClass=this.customClassOption),n},doFormSave:function(){var t=this.getFormOpts();this.completeFormSave(t)},completeFormSave:function(t){this.base.restoreSelection(),this.execAction(this.action,t),this.base.checkSelection()},ensureEncodedUri:function(t){return t===decodeURI(t)?encodeURI(t):t},ensureEncodedUriComponent:function(t){return t===decodeURIComponent(t)?encodeURIComponent(t):t},ensureEncodedParam:function(t){var e=t.split("="),n=e[0],i=e[1];return n+(void 0===i?"":"="+this.ensureEncodedUriComponent(i))},ensureEncodedQuery:function(t){return t.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(t){var e=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,n=e.test(t),i="",o=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,r=t.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),a=r[1],s=r[2],l=r[3];if(o.test(t))return"tel:"+t;if(!n){var c=a.split("/")[0];(c.match(/.+(\.|:).+/)||"localhost"===c)&&(i="http://")}return i+this.ensureEncodedUri(a)+(void 0===s?"":"?"+this.ensureEncodedQuery(s))+(void 0===l?"":"#"+l)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(t){var e=t.querySelector(".medium-editor-toolbar-close"),n=t.querySelector(".medium-editor-toolbar-save"),i=t.querySelector(".medium-editor-toolbar-input");this.on(t,"click",this.handleFormClick.bind(this)),this.on(i,"keyup",this.handleTextboxKeyup.bind(this)),this.on(e,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var t=this.document,e=t.createElement("div");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),e.innerHTML=this.getTemplate(),this.attachFormEvents(e),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(e){if(e.keyCode===t.util.keyCode.ENTER)return e.preventDefault(),void this.doFormSave();e.keyCode===t.util.keyCode.ESCAPE&&(e.preventDefault(),this.doFormCancel())},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.anchor=e}(),function(){var e=t.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var t=this.document.createElement("div");return t.id="medium-editor-anchor-preview-"+this.getEditorId(),t.className="medium-editor-anchor-preview",t.innerHTML=this.getTemplate(),this.on(t,"click",this.handleClick.bind(this)),t},getTemplate:function(){return'<div class="medium-editor-toolbar-anchor-preview" id="medium-editor-toolbar-anchor-preview"> <a class="medium-editor-toolbar-anchor-preview-inner"></a></div>'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(t){return!(!this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")&&!t.getAttribute("data-disable-preview"))||(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=t.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=t.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=t,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(t){t=t||this.activeAnchor;var e,n,i,o,r,a=this.window.innerWidth,s=this.anchorPreview.offsetHeight,l=t.getBoundingClientRect(),c=this.diffLeft,u=this.diffTop,d=this.getEditorOption("elementsContainer"),h=["absolute","fixed"].indexOf(window.getComputedStyle(d).getPropertyValue("position"))>-1,p={};e=this.anchorPreview.offsetWidth/2;var f=this.base.getExtensionByName("toolbar");f&&(c=f.diffLeft,u=f.diffTop),n=c-e,h?(o=d.getBoundingClientRect(),["top","left"].forEach(function(t){p[t]=l[t]-o[t]}),p.width=l.width,p.height=l.height,l=p,a=o.width,r=d.scrollTop):r=this.window.pageYOffset,i=l.left+l.width/2,r+=s+l.top+l.height-u-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(r)+"px",this.anchorPreview.style.right="initial",i<e?(this.anchorPreview.style.left=n+e+"px",this.anchorPreview.style.right="initial"):a-i<e?(this.anchorPreview.style.left="auto",this.anchorPreview.style.right=0):(this.anchorPreview.style.left=n+i+"px",this.anchorPreview.style.right="initial")},attachToEditables:function(){this.subscribe("editableMouseover",this.handleEditableMouseover.bind(this)),this.subscribe("positionedToolbar",this.handlePositionedToolbar.bind(this))},handlePositionedToolbar:function(){this.showWhenToolbarIsVisible||this.hidePreview()},handleClick:function(t){var e=this.base.getExtensionByName("anchor"),n=this.activeAnchor;e&&n&&(t.preventDefault(),this.base.selectElement(this.activeAnchor),this.base.delay(function(){if(n){var t={value:n.attributes.href.value,target:n.getAttribute("target"),buttonClass:n.getAttribute("class")};e.showForm(t),n=null}}.bind(this))),this.hidePreview()},handleAnchorMouseout:function(){this.anchorToPreview=null,this.off(this.activeAnchor,"mouseout",this.instanceHandleAnchorMouseout),this.instanceHandleAnchorMouseout=null},handleEditableMouseover:function(e){var n=t.util.getClosestTag(e.target,"a");if(!1!==n){if(!this.showOnEmptyLinks&&(!/href=["']\S+["']/.test(n.outerHTML)||/href=["']#\S+["']/.test(n.outerHTML)))return!0;var i=this.base.getExtensionByName("toolbar");if(!this.showWhenToolbarIsVisible&&i&&i.isDisplayed&&i.isDisplayed())return!0;this.activeAnchor&&this.activeAnchor!==n&&this.detachPreviewHandlers(),this.anchorToPreview=n,this.instanceHandleAnchorMouseout=this.handleAnchorMouseout.bind(this),this.on(this.anchorToPreview,"mouseout",this.instanceHandleAnchorMouseout),this.base.delay(function(){this.anchorToPreview&&this.showPreview(this.anchorToPreview)}.bind(this))}},handlePreviewMouseover:function(){this.lastOver=(new Date).getTime(),this.hovering=!0},handlePreviewMouseout:function(t){t.relatedTarget&&/anchor-preview/.test(t.relatedTarget.className)||(this.hovering=!1)},updatePreview:function(){if(this.hovering)return!0;(new Date).getTime()-this.lastOver>this.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=(new Date).getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});t.extensions.anchorPreview=e}(),function(){function e(e){return!t.util.getClosestTag(e,"a")}var n,i,o,r,a;n=[" ","\t","\n","\r"," "," "," "," "," ","\u2028","\u2029"],i="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",o="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+i+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+i+"))",r=new RegExp("^("+i+")$","i"),a=new RegExp(o,"gi");var s=t.Extension.extend({init:function(){t.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var t=0,e=0;e<this.window._mediumEditors.length;e++){var n=this.window._mediumEditors[e];null!==n&&void 0!==n.getExtensionByName("autoLink")&&t++}return 1===t},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.isLastInstance()&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(t,e){this.performLinking(e)},onKeypress:function(e){this.disableEventHandling||t.util.isKey(e,[t.util.keyCode.SPACE,t.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout(function(){try{var t=this.base.exportSelection();this.performLinking(e.target)&&this.base.importSelection(t,!0)}catch(t){window.console&&window.console.error("Failed to perform linking",t),this.disableEventHandling=!0}}.bind(this),0))},performLinking:function(e){var n=t.util.splitByBlockElements(e),i=!1;0===n.length&&(n=[e]);for(var o=0;o<n.length;o++)i=this.removeObsoleteAutoLinkSpans(n[o])||i,i=this.performLinkingWithinElement(n[o])||i;return this.base.events.updateInput(e,{target:e,currentTarget:e}),i},removeObsoleteAutoLinkSpans:function(n){if(!n||3===n.nodeType)return!1;for(var i=n.querySelectorAll('span[data-auto-link="true"]'),o=!1,r=0;r<i.length;r++){var a=i[r].textContent;if(-1===a.indexOf("://")&&(a=t.util.ensureUrlHasProtocol(a)),i[r].getAttribute("data-href")!==a&&e(i[r])){o=!0;var s=a.replace(/\s+$/,"");if(i[r].getAttribute("data-href")===s){var l=a.length-s.length,c=t.util.splitOffDOMTree(i[r],this.splitTextBeforeEnd(i[r],l));i[r].parentNode.insertBefore(c,i[r].nextSibling)}else t.util.unwrap(i[r],this.document)}}return o},splitTextBeforeEnd:function(t,e){for(var n=this.document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),i=!0;i;)i=null!==n.lastChild();for(var o,r,a;e>0&&null!==a;)o=n.currentNode,r=o.nodeValue,r.length>e?(a=o.splitText(r.length-e),e=0):(a=n.previousNode(),e-=r.length);return a},performLinkingWithinElement:function(e){for(var n=this.findLinkableText(e),i=0;i<n.length;i++){var o=t.util.findOrCreateMatchingTextNodes(this.document,e,n[i]);this.shouldNotLink(o)||this.createAutoLink(o,n[i].href)}return!1},shouldNotLink:function(e){for(var n=!1,i=0;i<e.length&&!1===n;i++)n=!!t.util.traverseUp(e[i],function(t){return"a"===t.nodeName.toLowerCase()||t.getAttribute&&"true"===t.getAttribute("data-auto-link")});return n},findLinkableText:function(t){for(var e=t.textContent,i=null,o=[];null!==(i=a.exec(e));){var s=!0,l=i.index+i[0].length;s=!(0!==i.index&&-1===n.indexOf(e[i.index-1])||l!==e.length&&-1===n.indexOf(e[l])),(s=s&&(-1!==i[0].indexOf("/")||r.test(i[0].split(".").pop().split("?").shift())))&&o.push({href:i[0],start:i.index,end:l})}return o},createAutoLink:function(e,n){n=t.util.ensureUrlHasProtocol(n);var i=t.util.createLink(this.document,e,n,this.getEditorOption("targetBlank")?"_blank":null),o=this.document.createElement("span");for(o.setAttribute("data-auto-link","true"),o.setAttribute("data-href",n),i.insertBefore(o,i.firstChild);i.childNodes.length>1;)o.appendChild(i.childNodes[1])}});t.extensions.autoLink=s}(),function(){function e(e){var i=t.util.getContainerEditorElement(e);Array.prototype.slice.call(i.parentElement.querySelectorAll("."+n)).forEach(function(t){t.classList.remove(n)})}var n="medium-editor-dragover",i=t.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(t){t.preventDefault(),t.dataTransfer.dropEffect="copy";var i=t.target.classList?t.target:t.target.parentElement;e(i),"dragover"===t.type&&i.classList.add(n)},handleDrop:function(t){t.preventDefault(),t.stopPropagation(),this.base.selectElement(t.target);var n=this.base.exportSelection();n.start=n.end,this.base.importSelection(n),t.dataTransfer.files&&Array.prototype.slice.call(t.dataTransfer.files).forEach(function(t){this.isAllowedFile(t)&&t.type.match("image")&&this.insertImageFile(t)},this),e(t.target)},isAllowedFile:function(t){return this.allowedTypes.some(function(e){return!!t.type.match(e)})},insertImageFile:function(e){if("function"==typeof FileReader){var n=new FileReader;n.readAsDataURL(e),n.addEventListener("load",function(e){var n=this.document.createElement("img");n.src=e.target.result,t.util.insertHTMLCommand(this.document,n.outerHTML)}.bind(this))}}});t.extensions.fileDragging=i}(),function(){var e=t.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(t){var e=t.key.charCodeAt(0);this.keys[e]||(this.keys[e]=[]),this.keys[e].push(t)},this)},handleKeydown:function(e){var n=t.util.getKeyCode(e);if(this.keys[n]){var i=t.util.isMetaCtrlKey(e),o=!!e.shiftKey,r=!!e.altKey;this.keys[n].forEach(function(t){t.meta!==i||t.shift!==o||t.alt!==r&&void 0!==t.alt||(e.preventDefault(),e.stopPropagation(),"function"==typeof t.command?t.command.apply(this):!1!==t.command&&this.execAction(t.command))},this)}}});t.extensions.keyboardCommands=e}(),function(){var e=t.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'<i class="fa fa-font"></i>',fonts:["","Arial","Verdana","Times New Roman"],init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontName")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(t){var e=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var t,e=this.document,n=e.createElement("div"),i=e.createElement("select"),o=e.createElement("a"),r=e.createElement("a");n.className="medium-editor-toolbar-form",n.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(n,"click",this.handleFormClick.bind(this));for(var a=0;a<this.fonts.length;a++)t=e.createElement("option"),t.innerHTML=this.fonts[a],t.value=this.fonts[a],i.appendChild(t);return i.className="medium-editor-toolbar-select",n.appendChild(i),this.on(i,"change",this.handleFontChange.bind(this)),r.setAttribute("href","#"),r.className="medium-editor-toobar-save",r.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"✓",n.appendChild(r),this.on(r,"click",this.handleSaveClick.bind(this),!0),o.setAttribute("href","#"),o.className="medium-editor-toobar-close",o.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':"×",n.appendChild(o),this.on(o,"click",this.handleCloseClick.bind(this)),n},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){t.selection.getSelectedElements(this.document).forEach(function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("face")&&t.removeAttribute("face")})},handleFontChange:function(){var t=this.getSelect().value;""===t?this.clearFontName():this.execAction("fontName",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.fontName=e}(),function(){var e=t.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'<i class="fa fa-text-height"></i>',init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontSize")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(t){var e=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var t=this.document,e=t.createElement("div"),n=t.createElement("input"),i=t.createElement("a"),o=t.createElement("a");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(e,"click",this.handleFormClick.bind(this)),n.setAttribute("type","range"),n.setAttribute("min","1"),n.setAttribute("max","7"),n.className="medium-editor-toolbar-input",e.appendChild(n),this.on(n,"change",this.handleSliderChange.bind(this)),o.setAttribute("href","#"),o.className="medium-editor-toobar-save",o.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"✓",e.appendChild(o),this.on(o,"click",this.handleSaveClick.bind(this),!0),i.setAttribute("href","#"),i.className="medium-editor-toobar-close",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':"×",e.appendChild(i),this.on(i,"click",this.handleCloseClick.bind(this)),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){t.selection.getSelectedElements(this.document).forEach(function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("size")&&t.removeAttribute("size")})},handleSliderChange:function(){var t=this.getInput().value;"4"===t?this.clearFontSize():this.execAction("fontSize",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.fontSize=e}(),function(){function e(){return[[new RegExp(/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/<!--StartFragment-->|<!--EndFragment-->/g),""],[new RegExp(/<br>$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(<br[^>]*>)?$/gi),""],[new RegExp(/<span class="Apple-converted-space">\s+<\/span>/g)," "],[new RegExp(/<br class="Apple-interchange-newline">/g),"<br>"],[new RegExp(/<span[^>]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),'<span class="replace-with italic bold">'],[new RegExp(/<span[^>]*font-style:italic[^>]*>/gi),'<span class="replace-with italic">'],[new RegExp(/<span[^>]*font-weight:(bold|700)[^>]*>/gi),'<span class="replace-with bold">'],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),'<a href="$1">'],[new RegExp(/<\/p>\n+/gi),"</p>"],[new RegExp(/\n+<p/gi),"<p"],[new RegExp(/<\/?o:[a-z]*>/gi),""],[new RegExp(/<!\[if !supportLists\]>(((?!<!).)*)<!\[endif]\>/gi),"$1"]]}function n(t,e,n){var i=t.clipboardData||e.clipboardData||n.dataTransfer,o={};if(!i)return o;if(i.getData){var r=i.getData("Text");r&&r.length>0&&(o["text/plain"]=r)}if(i.types)for(var a=0;a<i.types.length;a++){var s=i.types[a];o[s]=i.getData(s)}return o}var i=null,o=null,r=function(t){t.stopPropagation()},a=t.Extension.extend({forcePlainText:!0,cleanPastedHTML:!1,preCleanReplacements:[],cleanReplacements:[],cleanAttrs:["class","style","dir"],cleanTags:["meta"],unwrapTags:[],init:function(){t.Extension.prototype.init.apply(this,arguments),(this.forcePlainText||this.cleanPastedHTML)&&(this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.getEditorElements().forEach(function(t){this.on(t,"paste",this.handlePaste.bind(this))},this),this.subscribe("addElement",this.handleAddElement.bind(this)))},handleAddElement:function(t,e){this.on(e,"paste",this.handlePaste.bind(this))},destroy:function(){(this.forcePlainText||this.cleanPastedHTML)&&this.removePasteBin()},handlePaste:function(t,e){if(!t.defaultPrevented){var i=n(t,this.window,this.document),o=i["text/html"],r=i["text/plain"];this.window.clipboardData&&void 0===t.clipboardData&&!o&&(o=r),(o||r)&&(t.preventDefault(),this.doPaste(o,r,e))}},doPaste:function(e,n,i){var o,r,a="";if(this.cleanPastedHTML&&e)return this.cleanPaste(e);if(n){if(this.getEditorOption("disableReturn")||i&&i.getAttribute("data-disable-return"))a=t.util.htmlEntities(n);else if(o=n.split(/[\r\n]+/g),o.length>1)for(r=0;r<o.length;r+=1)""!==o[r]&&(a+="<p>"+t.util.htmlEntities(o[r])+"</p>");else a=t.util.htmlEntities(o[0]);t.util.insertHTMLCommand(this.document,a)}},handlePasteBinPaste:function(t){if(t.defaultPrevented)return void this.removePasteBin();var e=n(t,this.window,this.document),i=e["text/html"],r=e["text/plain"],a=o;if(!this.cleanPastedHTML||i)return t.preventDefault(),this.removePasteBin(),this.doPaste(i,r,a),void this.trigger("editablePaste",{currentTarget:a,target:a},a);setTimeout(function(){this.cleanPastedHTML&&(i=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(i,r,a),this.trigger("editablePaste",{currentTarget:a,target:a},a)}.bind(this),0)},handleKeydown:function(e,n){t.util.isKey(e,t.util.keyCode.V)&&t.util.isMetaCtrlKey(e)&&(e.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(n))},createPasteBin:function(e){var n,a=t.selection.getSelectionRange(this.document),s=this.window.pageYOffset;o=e,a&&(n=a.getClientRects(),n.length?s+=n[0].top:void 0!==a.startContainer.getBoundingClientRect?s+=a.startContainer.getBoundingClientRect().top:s+=a.getBoundingClientRect().top),i=a;var l=this.document.createElement("div");l.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),l.setAttribute("style","border: 1px red solid; position: absolute; top: "+s+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),l.setAttribute("contentEditable",!0),l.innerHTML="%ME_PASTEBIN%",this.document.body.appendChild(l),this.on(l,"focus",r),this.on(l,"focusin",r),this.on(l,"focusout",r),l.focus(),t.selection.selectNode(l,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(l,"paste",this.boundHandlePaste)},removePasteBin:function(){null!==i&&(t.selection.selectRange(this.document,i),i=null),null!==o&&(o=null);var e=this.getPasteBin();e&&e&&(this.off(e,"focus",r),this.off(e,"focusin",r),this.off(e,"focusout",r),this.off(e,"paste",this.boundHandlePaste),e.parentElement.removeChild(e))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var t=this.getPasteBin();if(!t)return!1;if(t.firstChild&&"mcepastebin"===t.firstChild.id)return!1;var e=t.innerHTML;return!(!e||"%ME_PASTEBIN%"===e)&&e},cleanPaste:function(t){var n,i,o,r,a=/<p|<br|<div/.test(t),s=[].concat(this.preCleanReplacements||[],e(),this.cleanReplacements||[]);for(n=0;n<s.length;n+=1)t=t.replace(s[n][0],s[n][1]);if(!a)return this.pasteHTML(t);for(o=this.document.createElement("div"),o.innerHTML="<p>"+t.split("<br><br>").join("</p><p>")+"</p>",i=o.querySelectorAll("a,p,div,br"),n=0;n<i.length;n+=1)switch(r=i[n],r.innerHTML=r.innerHTML.replace(/\n/gi," "),r.nodeName.toLowerCase()){case"p":case"div":this.filterCommonBlocks(r);break;case"br":this.filterLineBreak(r)}this.pasteHTML(o.innerHTML)},pasteHTML:function(e,n){n=t.util.defaults({},n,{cleanAttrs:this.cleanAttrs,cleanTags:this.cleanTags,unwrapTags:this.unwrapTags});var i,o,r,a,s=this.document.createDocumentFragment();for(s.appendChild(this.document.createElement("body")),a=s.querySelector("body"),a.innerHTML=e,this.cleanupSpans(a),i=a.querySelectorAll("*"),r=0;r<i.length;r+=1)o=i[r],"a"===o.nodeName.toLowerCase()&&this.getEditorOption("targetBlank")&&t.util.setTargetBlank(o),t.util.cleanupAttrs(o,n.cleanAttrs),t.util.cleanupTags(o,n.cleanTags),t.util.unwrapTags(o,n.unwrapTags);t.util.insertHTMLCommand(this.document,a.innerHTML.replace(/ /g," "))},isCommonBlock:function(t){return t&&("p"===t.nodeName.toLowerCase()||"div"===t.nodeName.toLowerCase())},filterCommonBlocks:function(t){/^\s*$/.test(t.textContent)&&t.parentNode&&t.parentNode.removeChild(t)},filterLineBreak:function(t){this.isCommonBlock(t.previousElementSibling)?this.removeWithParent(t):!this.isCommonBlock(t.parentNode)||t.parentNode.firstChild!==t&&t.parentNode.lastChild!==t?t.parentNode&&1===t.parentNode.childElementCount&&""===t.parentNode.textContent&&this.removeWithParent(t):this.removeWithParent(t)},removeWithParent:function(t){t&&t.parentNode&&(t.parentNode.parentNode&&1===t.parentNode.childElementCount?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t))},cleanupSpans:function(e){var n,i,o,r=e.querySelectorAll(".replace-with"),a=function(t){return t&&"#text"!==t.nodeName&&"false"===t.getAttribute("contenteditable")};for(n=0;n<r.length;n+=1)i=r[n],o=this.document.createElement(i.classList.contains("bold")?"b":"i"),i.classList.contains("bold")&&i.classList.contains("italic")?o.innerHTML="<i>"+i.innerHTML+"</i>":o.innerHTML=i.innerHTML,i.parentNode.replaceChild(o,i);for(r=e.querySelectorAll("span"),n=0;n<r.length;n+=1){if(i=r[n],t.util.traverseUp(i,a))return!1;t.util.unwrap(i,this.document)}}});t.extensions.paste=a}(),function(){var e=t.Extension.extend({name:"placeholder",text:"Type your text",hideOnClick:!0,init:function(){t.Extension.prototype.init.apply(this,arguments),this.initPlaceholders(),this.attachEventHandlers()},initPlaceholders:function(){this.getEditorElements().forEach(this.initElement,this)},handleAddElement:function(t,e){this.initElement(e)},initElement:function(t){t.getAttribute("data-placeholder")||t.setAttribute("data-placeholder",this.text),this.updatePlaceholder(t)},destroy:function(){this.getEditorElements().forEach(this.cleanupElement,this)},handleRemoveElement:function(t,e){this.cleanupElement(e)},cleanupElement:function(t){t.getAttribute("data-placeholder")===this.text&&t.removeAttribute("data-placeholder")},showPlaceholder:function(e){e&&(t.util.isFF&&0===e.childNodes.length?(e.classList.add("medium-editor-placeholder-relative"),e.classList.remove("medium-editor-placeholder")):(e.classList.add("medium-editor-placeholder"),e.classList.remove("medium-editor-placeholder-relative")))},hidePlaceholder:function(t){t&&(t.classList.remove("medium-editor-placeholder"),t.classList.remove("medium-editor-placeholder-relative"))},updatePlaceholder:function(t,e){if(t.querySelector("img, blockquote, ul, ol, table")||""!==t.textContent.replace(/^\s+|\s+$/g,""))return this.hidePlaceholder(t);e||this.showPlaceholder(t)},attachEventHandlers:function(){this.hideOnClick&&this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableInput",this.handleInput.bind(this)),this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("addElement",this.handleAddElement.bind(this)),this.subscribe("removeElement",this.handleRemoveElement.bind(this))},handleInput:function(t,e){var n=this.hideOnClick&&e===this.base.getFocusedElement();this.updatePlaceholder(e,n)},handleFocus:function(t,e){this.hidePlaceholder(e)},handleBlur:function(t,e){this.updatePlaceholder(e)}});t.extensions.placeholder=e}(),function(){var e=t.Extension.extend({name:"toolbar",align:"center",allowMultiParagraphSelection:!0,buttons:["bold","italic","underline","anchor","h2","h3","quote"],diffLeft:0,diffTop:-10,firstButtonClass:"medium-editor-button-first",lastButtonClass:"medium-editor-button-last",standardizeSelectionStart:!1,static:!1,sticky:!1,stickyTopOffset:0,updateOnEmptySelection:!1,relativeContainer:null,init:function(){t.Extension.prototype.init.apply(this,arguments),this.initThrottledMethods(),this.relativeContainer?this.relativeContainer.appendChild(this.getToolbarElement()):this.getEditorOption("elementsContainer").appendChild(this.getToolbarElement())},forEachExtension:function(t,e){return this.base.extensions.forEach(function(n){if(n!==this)return t.apply(e||this,arguments)},this)},createToolbar:function(){var t=this.document.createElement("div");return t.id="medium-editor-toolbar-"+this.getEditorId(),t.className="medium-editor-toolbar",this.static?t.className+=" static-toolbar":this.relativeContainer?t.className+=" medium-editor-relative-toolbar":t.className+=" medium-editor-stalker-toolbar",t.appendChild(this.createToolbarButtons()),this.forEachExtension(function(e){e.hasForm&&t.appendChild(e.getForm())}),this.attachEventHandlers(),t},createToolbarButtons:function(){var e,n,i,o,r,a,s=this.document.createElement("ul");return s.id="medium-editor-toolbar-actions"+this.getEditorId(),s.className="medium-editor-toolbar-actions",s.style.display="block",this.buttons.forEach(function(i){"string"==typeof i?(r=i,a=null):(r=i.name,a=i),(o=this.base.addBuiltInExtension(r,a))&&"function"==typeof o.getButton&&(n=o.getButton(this.base),e=this.document.createElement("li"),t.util.isElement(n)?e.appendChild(n):e.innerHTML=n,s.appendChild(e))},this),i=s.querySelectorAll("button"),i.length>0&&(i[0].classList.add(this.firstButtonClass),i[i.length-1].classList.add(this.lastButtonClass)),s},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=t.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(e){if(e&&e.target&&t.util.isDescendant(this.getToolbarElement(),e.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return"block"===this.getToolbarActionsElement().style.display},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(t){t.hasForm&&t.isDisplayed()&&t.hideForm()})},multipleBlockElementsSelected:function(){var e=/<[^\/>][^>]*><\/[^>]+>/gim,n=new RegExp("<("+t.util.blockContainerElementNames.join("|")+")[^>]*>","g"),i=t.selection.getSelectionHtml(this.document).replace(e,""),o=i.match(n);return!!o&&o.length>1},modifySelection:function(){var e=this.window.getSelection(),n=e.getRangeAt(0);if(this.standardizeSelectionStart&&n.startContainer.nodeValue&&n.startOffset===n.startContainer.nodeValue.length){var i=t.util.findAdjacentTextNodeWithContent(t.selection.getSelectionElement(this.window),n.startContainer,this.document);if(i){for(var o=0;0===i.nodeValue.substr(o,1).trim().length;)o+=1;n=t.selection.select(this.document,i,o,n.endContainer,n.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||t.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var e=t.selection.getSelectionElement(this.window);return!e||-1===this.getEditorElements().indexOf(e)||e.getAttribute("data-disable-toolbar")?this.hideToolbar():this.updateOnEmptySelection&&this.static?this.showAndUpdateToolbar():!t.selection.selectionContainsContent(this.document)||!1===this.allowMultiParagraphSelection&&this.multipleBlockElementsSelected()?this.hideToolbar():void this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(t){"function"==typeof t.isActive&&"function"==typeof t.setInactive&&t.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var e,n=[],i=null,o=t.selection.getSelectionRange(this.document),r=function(t){"function"==typeof t.checkState?t.checkState(e):"function"==typeof t.isActive&&"function"==typeof t.isAlreadyApplied&&"function"==typeof t.setActive&&!t.isActive()&&t.isAlreadyApplied(e)&&t.setActive()};if(o&&(this.forEachExtension(function(t){if("function"==typeof t.queryCommandState&&null!==(i=t.queryCommandState()))return void(i&&"function"==typeof t.setActive&&t.setActive());n.push(t)}),e=t.selection.getSelectedParentElement(o),this.getEditorElements().some(function(n){return t.util.isDescendant(n,e,!0)})))for(;e&&(n.forEach(r),!t.util.isMediumEditorElement(e));)e=e.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var t=this.base.getFocusedElement(),e=this.window.getSelection();if(!t)return this;!this.static&&e.isCollapsed||(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(t):this.positionToolbar(e)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(t){this.getToolbarElement().style.left="0";var e,n=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,i=this.window.innerWidth,o=this.getToolbarElement(),r=t.getBoundingClientRect(),a=r.top+n,s=r.left+r.width/2,l=o.offsetHeight,c=o.offsetWidth,u=c/2;switch(this.sticky?n>a+t.offsetHeight-l-this.stickyTopOffset?(o.style.top=a+t.offsetHeight-l+"px",o.classList.remove("medium-editor-sticky-toolbar")):n>a-l-this.stickyTopOffset?(o.classList.add("medium-editor-sticky-toolbar"),o.style.top=this.stickyTopOffset+"px"):(o.classList.remove("medium-editor-sticky-toolbar"),o.style.top=a-l+"px"):o.style.top=a-l+"px",this.align){case"left":e=r.left;break;case"right":e=r.right-c;break;case"center":e=s-u}e<0?e=0:e+c>i&&(e=i-Math.ceil(c)-1),o.style.left=e+"px"},positionToolbar:function(t){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var e=t.getRangeAt(0),n=e.getBoundingClientRect();(!n||0===n.height&&0===n.width&&e.startContainer===e.endContainer)&&(n=1===e.startContainer.nodeType&&e.startContainer.querySelector("img")?e.startContainer.querySelector("img").getBoundingClientRect():e.startContainer.getBoundingClientRect());var i,o,r=this.window.innerWidth,a=this.getToolbarElement(),s=a.offsetHeight,l=a.offsetWidth,c=l/2,u=this.diffLeft-c,d=this.getEditorOption("elementsContainer"),h=["absolute","fixed"].indexOf(window.getComputedStyle(d).getPropertyValue("position"))>-1,p={},f={};h?(o=d.getBoundingClientRect(),["top","left"].forEach(function(t){f[t]=n[t]-o[t]}),f.width=n.width,f.height=n.height,n=f,r=o.width,p.top=d.scrollTop):p.top=this.window.pageYOffset,i=n.left+n.width/2,p.top+=n.top-s,n.top<50?(a.classList.add("medium-toolbar-arrow-over"),a.classList.remove("medium-toolbar-arrow-under"),p.top+=50+n.height-this.diffTop):(a.classList.add("medium-toolbar-arrow-under"),a.classList.remove("medium-toolbar-arrow-over"),p.top+=this.diffTop),i<c?(p.left=u+c,p.right="initial"):r-i<c?(p.left="auto",p.right=0):(p.left=u+i,p.right="initial"),["top","left","right"].forEach(function(t){a.style[t]=p[t]+(isNaN(p[t])?"":"px")})}});t.extensions.toolbar=e}(),function(){var e=t.Extension.extend({init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(t){t.preventDefault(),t.dataTransfer.dropEffect="copy","dragover"===t.type?t.target.classList.add("medium-editor-dragover"):"dragleave"===t.type&&t.target.classList.remove("medium-editor-dragover")},handleDrop:function(e){var n;e.preventDefault(),e.stopPropagation(),e.dataTransfer.files&&(n=Array.prototype.slice.call(e.dataTransfer.files,0),n.some(function(e){if(e.type.match("image")){var n,i;n=new FileReader,n.readAsDataURL(e),i="medium-img-"+ +new Date,t.util.insertHTMLCommand(this.document,'<img class="medium-editor-image-loading" id="'+i+'" />'),n.onload=function(){var t=this.document.getElementById(i);t&&(t.removeAttribute("id"),t.removeAttribute("class"),t.src=n.result)}.bind(this)}}.bind(this))),e.target.classList.remove("medium-editor-dragover")}});t.extensions.imageDragging=e}(),function(){function e(e){var n=t.selection.getSelectionStart(this.options.ownerDocument),i=n.textContent,o=t.selection.getCaretOffsets(n);(void 0===i[o.left-1]||""===i[o.left-1].trim()||void 0!==i[o.left]&&""===i[o.left].trim())&&e.preventDefault()}function n(e,n){if(this.options.disableReturn||n.getAttribute("data-disable-return"))e.preventDefault();else if(this.options.disableDoubleReturn||n.getAttribute("data-disable-double-return")){var i=t.selection.getSelectionStart(this.options.ownerDocument);(i&&""===i.textContent.trim()&&"li"!==i.nodeName.toLowerCase()||i.previousElementSibling&&"br"!==i.previousElementSibling.nodeName.toLowerCase()&&""===i.previousElementSibling.textContent.trim())&&e.preventDefault()}}function i(e){var n=t.selection.getSelectionStart(this.options.ownerDocument);"pre"===(n&&n.nodeName.toLowerCase())&&(e.preventDefault(),t.util.insertHTMLCommand(this.options.ownerDocument," ")),t.util.isListItem(n)&&(e.preventDefault(),e.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function o(e){var n,i=t.selection.getSelectionStart(this.options.ownerDocument),o=i.nodeName.toLowerCase(),r=/^(\s+|<br\/?>)?$/i,a=/h\d/i;t.util.isKey(e,[t.util.keyCode.BACKSPACE,t.util.keyCode.ENTER])&&i.previousElementSibling&&a.test(o)&&0===t.selection.getCaretOffsets(i).left?t.util.isKey(e,t.util.keyCode.BACKSPACE)&&r.test(i.previousElementSibling.innerHTML)?(i.previousElementSibling.parentNode.removeChild(i.previousElementSibling),e.preventDefault()):!this.options.disableDoubleReturn&&t.util.isKey(e,t.util.keyCode.ENTER)&&(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.previousElementSibling.parentNode.insertBefore(n,i),e.preventDefault()):t.util.isKey(e,t.util.keyCode.DELETE)&&i.nextElementSibling&&i.previousElementSibling&&!a.test(o)&&r.test(i.innerHTML)&&a.test(i.nextElementSibling.nodeName.toLowerCase())?(t.selection.moveCursor(this.options.ownerDocument,i.nextElementSibling),i.previousElementSibling.parentNode.removeChild(i),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&"li"===o&&r.test(i.innerHTML)&&!i.previousElementSibling&&!i.parentElement.previousElementSibling&&i.nextElementSibling&&"li"===i.nextElementSibling.nodeName.toLowerCase()?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.parentElement.parentElement.insertBefore(n,i.parentElement),t.selection.moveCursor(this.options.ownerDocument,n),i.parentElement.removeChild(i),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&!1!==t.util.getClosestTag(i,"blockquote")&&0===t.selection.getCaretOffsets(i).left?(e.preventDefault(),t.util.execFormatBlock(this.options.ownerDocument,"p")):t.util.isKey(e,t.util.keyCode.ENTER)&&!1!==t.util.getClosestTag(i,"blockquote")&&0===t.selection.getCaretOffsets(i).right?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.parentElement.insertBefore(n,i.nextSibling),t.selection.moveCursor(this.options.ownerDocument,n),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&t.util.isMediumEditorElement(i.parentElement)&&!i.previousElementSibling&&i.nextElementSibling&&r.test(i.innerHTML)&&(e.preventDefault(),t.selection.moveCursor(this.options.ownerDocument,i.nextSibling),i.parentElement.removeChild(i))}function r(e){var n,i=t.selection.getSelectionStart(this.options.ownerDocument);i&&(t.util.isMediumEditorElement(i)&&0===i.children.length&&!t.util.isBlockContainer(i)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),!t.util.isKey(e,t.util.keyCode.ENTER)||t.util.isListItem(i)||t.util.isBlockContainer(i)||(n=i.nodeName.toLowerCase(),"a"===n?this.options.ownerDocument.execCommand("unlink",!1,null):e.shiftKey||e.ctrlKey||this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function a(t,e){var n=e.parentNode.querySelector('textarea[medium-editor-textarea-id="'+e.getAttribute("medium-editor-textarea-id")+'"]');n&&(n.value=e.innerHTML.trim())}function s(t){t._mediumEditors||(t._mediumEditors=[null]),this.id||(this.id=t._mediumEditors.length),t._mediumEditors[this.id]=this}function l(t){t._mediumEditors&&t._mediumEditors[this.id]&&(t._mediumEditors[this.id]=null)}function c(e,n,i){var o=[];if(e||(e=[]),"string"==typeof e&&(e=n.querySelectorAll(e)),t.util.isElement(e)&&(e=[e]),i)for(var r=0;r<e.length;r++){var a=e[r];!t.util.isElement(a)||a.getAttribute("data-medium-editor-element")||a.getAttribute("medium-editor-textarea-id")||o.push(a)}else o=Array.prototype.slice.apply(e);return o}function u(t){var e=t.parentNode.querySelector('textarea[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]');e&&(e.classList.remove("medium-editor-hidden"),e.removeAttribute("medium-editor-textarea-id")),t.parentNode&&t.parentNode.removeChild(t)}function d(t,e){return Object.keys(e).forEach(function(n){void 0===t[n]&&(t[n]=e[n])}),t}function h(t,e,n){return t=d(t,{window:n.options.contentWindow,document:n.options.ownerDocument,base:n}),"function"==typeof t.init&&t.init(),t.name||(t.name=e),t}function p(){return!this.elements.every(function(t){return!!t.getAttribute("data-disable-toolbar")})&&!1!==this.options.toolbar}function f(){return!!p.call(this)&&!1!==this.options.anchorPreview}function m(){return!1!==this.options.placeholder}function g(){return!1!==this.options.autoLink}function v(){return!1!==this.options.imageDragging}function _(){return!1!==this.options.keyboardCommands}function w(){return!this.options.extensions.imageDragging}function b(t){for(var e=this.options.ownerDocument.createElement("div"),n=Date.now(),i="medium-editor-"+n,o=t.attributes;this.options.ownerDocument.getElementById(i);)n++,i="medium-editor-"+n;e.className=t.className,e.id=i,e.innerHTML=t.value,t.setAttribute("medium-editor-textarea-id",i);for(var r=0,a=o.length;r<a;r++)e.hasAttribute(o[r].nodeName)||e.setAttribute(o[r].nodeName,o[r].value);return t.form&&this.on(t.form,"reset",function(t){t.defaultPrevented||this.resetContent(this.options.ownerDocument.getElementById(i))}.bind(this)),t.classList.add("medium-editor-hidden"),t.parentNode.insertBefore(e,t),e}function y(e,i){if(!e.getAttribute("data-medium-editor-element")){"textarea"===e.nodeName.toLowerCase()&&(e=b.call(this,e),this.instanceHandleEditableInput||(this.instanceHandleEditableInput=a.bind(this),this.subscribe("editableInput",this.instanceHandleEditableInput))),this.options.disableEditing||e.getAttribute("data-disable-editing")||(e.setAttribute("contentEditable",!0),e.setAttribute("spellcheck",this.options.spellcheck)),this.instanceHandleEditableKeydownEnter||(e.getAttribute("data-disable-return")||e.getAttribute("data-disable-double-return"))&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter)),this.options.disableReturn||e.getAttribute("data-disable-return")||this.on(e,"keyup",r.bind(this));var o=t.util.guid();e.setAttribute("data-medium-editor-element",!0),e.classList.add("medium-editor-element"),e.setAttribute("role","textbox"),e.setAttribute("aria-multiline",!0),e.setAttribute("data-medium-editor-editor-index",i),e.setAttribute("medium-editor-index",o),D[o]=e.innerHTML,this.events.attachAllEventsToElement(e)}return e}function C(){this.subscribe("editableKeydownTab",i.bind(this)),this.subscribe("editableKeydownDelete",o.bind(this)),this.subscribe("editableKeydownEnter",o.bind(this)),this.options.disableExtraSpaces&&this.subscribe("editableKeydownSpace",e.bind(this)),this.instanceHandleEditableKeydownEnter||(this.options.disableReturn||this.options.disableDoubleReturn)&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter))}function x(){if(this.extensions=[],Object.keys(this.options.extensions).forEach(function(t){"toolbar"!==t&&this.options.extensions[t]&&this.extensions.push(h(this.options.extensions[t],t,this))},this),w.call(this)){var e=this.options.fileDragging;e||(e={},v.call(this)||(e.allowedTypes=[])),this.addBuiltInExtension("fileDragging",e)}var n={paste:!0,"anchor-preview":f.call(this),autoLink:g.call(this),keyboardCommands:_.call(this),placeholder:m.call(this)};Object.keys(n).forEach(function(t){n[t]&&this.addBuiltInExtension(t)},this);var i=this.options.extensions.toolbar;if(!i&&p.call(this)){var o=t.util.extend({},this.options.toolbar,{allowMultiParagraphSelection:this.options.allowMultiParagraphSelection});i=new t.extensions.toolbar(o)}i&&this.extensions.push(h(i,"toolbar",this))}function S(e,n){var i=[["allowMultiParagraphSelection","toolbar.allowMultiParagraphSelection"]];return n&&i.forEach(function(e){n.hasOwnProperty(e[0])&&void 0!==n[e[0]]&&t.util.deprecated(e[0],e[1],"v6.0.0")}),t.util.defaults({},n,e)}function T(e,n){var i,o,r=/^append-(.+)$/gi,a=/justify([A-Za-z]*)$/g;if(i=r.exec(e))return t.util.execFormatBlock(this.options.ownerDocument,i[1]);if("fontSize"===e)return n.size&&t.util.deprecated(".size option for fontSize command",".value","6.0.0"),o=n.value||n.size,this.options.ownerDocument.execCommand("fontSize",!1,o);if("fontName"===e)return n.name&&t.util.deprecated(".name option for fontName command",".value","6.0.0"),o=n.value||n.name,this.options.ownerDocument.execCommand("fontName",!1,o);if("createLink"===e)return this.createLink(n);if("image"===e){var s=this.options.contentWindow.getSelection().toString().trim();return this.options.ownerDocument.execCommand("insertImage",!1,s)}if("html"===e){var l=this.options.contentWindow.getSelection().toString().trim();return t.util.insertHTMLCommand(this.options.ownerDocument,l)}if(a.exec(e)){var c=this.options.ownerDocument.execCommand(e,!1,null),u=t.selection.getSelectedParentElement(t.selection.getSelectionRange(this.options.ownerDocument));return u&&E.call(this,t.util.getTopBlockContainer(u)),c}return o=n&&n.value,this.options.ownerDocument.execCommand(e,!1,o)}function E(e){if(e){var n,i=Array.prototype.slice.call(e.childNodes).filter(function(t){var e="div"===t.nodeName.toLowerCase();return e&&!n&&(n=t.style.textAlign),e});i.length&&(this.saveSelection(),i.forEach(function(e){if(e.style.textAlign===n){var i=e.lastChild;if(i){t.util.unwrap(e,this.options.ownerDocument);var o=this.options.ownerDocument.createElement("BR");i.parentNode.insertBefore(o,i.nextSibling)}}},this),e.style.textAlign=n,this.restoreSelection())}}var D={};t.prototype={init:function(t,e){return this.options=S.call(this,this.defaults,e),this.origElements=t,this.options.elementsContainer||(this.options.elementsContainer=this.options.ownerDocument.body),this.setup()},setup:function(){this.isActive||(s.call(this,this.options.contentWindow),this.events=new t.Events(this),this.elements=[],this.addElements(this.origElements),0!==this.elements.length&&(this.isActive=!0,x.call(this),C.call(this)))},destroy:function(){this.isActive&&(this.isActive=!1,this.extensions.forEach(function(t){"function"==typeof t.destroy&&t.destroy()},this),this.events.destroy(),this.elements.forEach(function(t){this.options.spellcheck&&(t.innerHTML=t.innerHTML),t.removeAttribute("contentEditable"),t.removeAttribute("spellcheck"),t.removeAttribute("data-medium-editor-element"),t.classList.remove("medium-editor-element"),t.removeAttribute("role"),t.removeAttribute("aria-multiline"),t.removeAttribute("medium-editor-index"),t.removeAttribute("data-medium-editor-editor-index"),t.getAttribute("medium-editor-textarea-id")&&u(t)},this),this.elements=[],this.instanceHandleEditableKeydownEnter=null,this.instanceHandleEditableInput=null,l.call(this,this.options.contentWindow))},on:function(t,e,n,i){return this.events.attachDOMEvent(t,e,n,i),this},off:function(t,e,n,i){return this.events.detachDOMEvent(t,e,n,i),this},subscribe:function(t,e){return this.events.attachCustomEvent(t,e),this},unsubscribe:function(t,e){return this.events.detachCustomEvent(t,e),this},trigger:function(t,e,n){return this.events.triggerCustomEvent(t,e,n),this},delay:function(t){var e=this;return setTimeout(function(){e.isActive&&t()},this.options.delay)},serialize:function(){var t,e,n={},i=this.elements.length;for(t=0;t<i;t+=1)e=""!==this.elements[t].id?this.elements[t].id:"element-"+t,n[e]={value:this.elements[t].innerHTML.trim()};return n},getExtensionByName:function(t){var e;return this.extensions&&this.extensions.length&&this.extensions.some(function(n){return n.name===t&&(e=n,!0)}),e},addBuiltInExtension:function(e,n){var i,o=this.getExtensionByName(e);if(o)return o;switch(e){case"anchor":i=t.util.extend({},this.options.anchor,n),o=new t.extensions.anchor(i);break;case"anchor-preview":o=new t.extensions.anchorPreview(this.options.anchorPreview);break;case"autoLink":o=new t.extensions.autoLink;break;case"fileDragging":o=new t.extensions.fileDragging(n);break;case"fontname":o=new t.extensions.fontName(this.options.fontName);break;case"fontsize":o=new t.extensions.fontSize(n);break;case"keyboardCommands":o=new t.extensions.keyboardCommands(this.options.keyboardCommands);break;case"paste":o=new t.extensions.paste(this.options.paste);break;case"placeholder":o=new t.extensions.placeholder(this.options.placeholder);break;default:t.extensions.button.isBuiltInButton(e)&&(n?(i=t.util.defaults({},n,t.extensions.button.prototype.defaults[e]),o=new t.extensions.button(i)):o=new t.extensions.button(e))}return o&&this.extensions.push(h(o,e,this)),o},stopSelectionUpdates:function(){this.preventSelectionUpdates=!0},startSelectionUpdates:function(){this.preventSelectionUpdates=!1},checkSelection:function(){var t=this.getExtensionByName("toolbar");return t&&t.checkState(),this},queryCommandState:function(t){var e,n=/^full-(.+)$/gi,i=null;(e=n.exec(t))&&(t=e[1]);try{i=this.options.ownerDocument.queryCommandState(t)}catch(t){i=null}return i},execAction:function(e,n){var i,o;return i=/^full-(.+)$/gi.exec(e),i?(this.saveSelection(),this.selectAllContents(),o=T.call(this,i[1],n),this.restoreSelection()):o=T.call(this,e,n),"insertunorderedlist"!==e&&"insertorderedlist"!==e||t.util.cleanListDOM(this.options.ownerDocument,this.getSelectedParentElement()),this.checkSelection(),o},getSelectedParentElement:function(e){return void 0===e&&(e=this.options.contentWindow.getSelection().getRangeAt(0)),t.selection.getSelectedParentElement(e)},selectAllContents:function(){var e=t.selection.getSelectionElement(this.options.contentWindow);if(e){for(;1===e.children.length;)e=e.children[0];this.selectElement(e)}},selectElement:function(e){t.selection.selectNode(e,this.options.ownerDocument);var n=t.selection.getSelectionElement(this.options.contentWindow);n&&this.events.focusElement(n)},getFocusedElement:function(){var t;return this.elements.some(function(e){return!t&&e.getAttribute("data-medium-focused")&&(t=e),!!t},this),t},exportSelection:function(){var e=t.selection.getSelectionElement(this.options.contentWindow),n=this.elements.indexOf(e),i=null;return n>=0&&(i=t.selection.exportSelection(e,this.options.ownerDocument)),null!==i&&0!==n&&(i.editableElementIndex=n),i},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(e,n){if(e){var i=this.elements[e.editableElementIndex||0];t.selection.importSelection(e,i,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(e){var n,i=t.selection.getSelectionElement(this.options.contentWindow),o={};if(-1!==this.elements.indexOf(i)){try{if(this.events.disableCustomEvent("editableInput"),e.url&&t.util.deprecated(".url option for createLink",".value","6.0.0"),(n=e.url||e.value)&&n.trim().length>0){var r=this.options.contentWindow.getSelection();if(r){var a,s,l,c,u=r.getRangeAt(0),d=u.commonAncestorContainer;if(3===u.endContainer.nodeType&&3!==u.startContainer.nodeType&&0===u.startOffset&&u.startContainer.firstChild===u.endContainer&&(d=u.endContainer),s=t.util.getClosestBlockContainer(u.startContainer),l=t.util.getClosestBlockContainer(u.endContainer),3!==d.nodeType&&0!==d.textContent.length&&s===l){var h=s||i,p=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),a=this.exportSelection(),p.appendChild(h.cloneNode(!0)),i===h?t.selection.select(this.options.ownerDocument,h.firstChild,0,h.lastChild,3===h.lastChild.nodeType?h.lastChild.nodeValue.length:h.lastChild.childNodes.length):t.selection.select(this.options.ownerDocument,h,0,h,h.childNodes.length);var f=this.exportSelection();c=t.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,p,{start:a.start-f.start,end:a.end-f.start,editableElementIndex:a.editableElementIndex}),0===c.length&&(p=this.options.ownerDocument.createDocumentFragment(),p.appendChild(d.cloneNode(!0)),c=[p.firstChild.firstChild,p.firstChild.lastChild]),t.util.createLink(this.options.ownerDocument,c,n.trim());var m=(p.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;t.util.insertHTMLCommand(this.options.ownerDocument,p.firstChild.innerHTML.replace(/^\s+/,"")),a.start-=m,a.end-=m,this.importSelection(a)}else this.options.ownerDocument.execCommand("createLink",!1,n);this.options.targetBlank||"_blank"===e.target?t.util.setTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n):t.util.removeTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n),e.buttonClass&&t.util.addClassToAnchors(t.selection.getSelectionStart(this.options.ownerDocument),e.buttonClass)}}if(this.options.targetBlank||"_blank"===e.target||e.buttonClass){o=this.options.ownerDocument.createEvent("HTMLEvents"),o.initEvent("input",!0,!0,this.options.contentWindow);for(var g=0,v=this.elements.length;g<v;g+=1)this.elements[g].dispatchEvent(o)}}finally{this.events.enableCustomEvent("editableInput")}this.events.triggerCustomEvent("editableInput",o,i)}},cleanPaste:function(t){this.getExtensionByName("paste").cleanPaste(t)},pasteHTML:function(t,e){this.getExtensionByName("paste").pasteHTML(t,e)},setContent:function(t,e){if(e=e||0,this.elements[e]){var n=this.elements[e];n.innerHTML=t,this.checkContentChanged(n)}},getContent:function(t){return t=t||0,this.elements[t]?this.elements[t].innerHTML.trim():null},checkContentChanged:function(e){e=e||t.selection.getSelectionElement(this.options.contentWindow),this.events.updateInput(e,{target:e,currentTarget:e})},resetContent:function(t){if(t){var e=this.elements.indexOf(t);return void(-1!==e&&this.setContent(D[t.getAttribute("medium-editor-index")],e))}this.elements.forEach(function(t,e){this.setContent(D[t.getAttribute("medium-editor-index")],e)},this)},addElements:function(t){var e=c(t,this.options.ownerDocument,!0);if(0===e.length)return!1;e.forEach(function(t){t=y.call(this,t,this.id),this.elements.push(t),this.trigger("addElement",{target:t,currentTarget:t},t)},this)},removeElements:function(t){var e=c(t,this.options.ownerDocument),n=e.map(function(t){return t.getAttribute("medium-editor-textarea-id")&&t.parentNode?t.parentNode.querySelector('div[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]'):t});this.elements=this.elements.filter(function(t){return-1===n.indexOf(t)||(this.events.cleanupElement(t),t.getAttribute("medium-editor-textarea-id")&&u(t),this.trigger("removeElement",{target:t,currentTarget:t},t),!1)},this)}},t.getEditorFromElement=function(t){var e=t.getAttribute("data-medium-editor-editor-index"),n=t&&t.ownerDocument&&(t.ownerDocument.defaultView||t.ownerDocument.parentWindow);return n&&n._mediumEditors&&n._mediumEditors[e]?n._mediumEditors[e]:null}}(),function(){t.prototype.defaults={activeButtonClass:"medium-editor-button-active",buttonLabels:!1,delay:0,disableReturn:!1,disableDoubleReturn:!1,disableExtraSpaces:!1,disableEditing:!1,autoLink:!1,elementsContainer:!1,contentWindow:window,ownerDocument:document,targetBlank:!1,extensions:{},spellcheck:!0}}(),t.parseVersionString=function(t){var e=t.split("-"),n=e[0].split("."),i=e.length>1?e[1]:"";return{major:parseInt(n[0],10),minor:parseInt(n[1],10),revision:parseInt(n[2],10),preRelease:i,toString:function(){return[n[0],n[1],n[2]].join(".")+(i?"-"+i:"")}}},t.version=t.parseVersionString.call(this,{version:"5.23.3"}.version),t}())}).call(e,n(21))},function(t,e,n){var i,o;/*! DataTables 1.10.16
|
5 |
* ©2008-2017 SpryMedia Ltd - datatables.net/license
|
6 |
*/
|
7 |
+
!function(r){"use strict";i=[n(0)],void 0!==(o=function(t){return r(t,window,document)}.apply(e,i))&&(t.exports=o)}(function(t,e,n,i){"use strict";function o(e){var n,i,r={};t.each(e,function(t,a){(n=t.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(i=t.replace(n[0],n[2].toLowerCase()),r[i]=t,"o"===n[1]&&o(e[t]))}),e._hungarianMap=r}function r(e,n,a){e._hungarianMap||o(e);var s;t.each(n,function(o,l){(s=e._hungarianMap[o])===i||!a&&n[s]!==i||("o"===s.charAt(0)?(n[s]||(n[s]={}),t.extend(!0,n[s],n[o]),r(e[s],n[s],a)):n[s]=n[o])})}function a(t){var e=Gt.defaults.oLanguage,n=t.sZeroRecords;!t.sEmptyTable&&n&&"No data available in table"===e.sEmptyTable&&It(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&n&&"Loading..."===e.sLoadingRecords&&It(t,t,"sZeroRecords","sLoadingRecords"),t.sInfoThousands&&(t.sThousands=t.sInfoThousands);var i=t.sDecimal;i&&zt(i)}function s(t){fe(t,"ordering","bSort"),fe(t,"orderMulti","bSortMulti"),fe(t,"orderClasses","bSortClasses"),fe(t,"orderCellsTop","bSortCellsTop"),fe(t,"order","aaSorting"),fe(t,"orderFixed","aaSortingFixed"),fe(t,"paging","bPaginate"),fe(t,"pagingType","sPaginationType"),fe(t,"pageLength","iDisplayLength"),fe(t,"searching","bFilter"),"boolean"==typeof t.sScrollX&&(t.sScrollX=t.sScrollX?"100%":""),"boolean"==typeof t.scrollX&&(t.scrollX=t.scrollX?"100%":"");var e=t.aoSearchCols;if(e)for(var n=0,i=e.length;n<i;n++)e[n]&&r(Gt.models.oSearch,e[n])}function l(e){fe(e,"orderable","bSortable"),fe(e,"orderData","aDataSort"),fe(e,"orderSequence","asSorting"),fe(e,"orderDataType","sortDataType");var n=e.aDataSort;"number"!=typeof n||t.isArray(n)||(e.aDataSort=[n])}function c(n){if(!Gt.__browser){var i={};Gt.__browser=i;var o=t("<div/>").css({position:"fixed",top:0,left:-1*t(e).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(t("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(t("<div/>").css({width:"100%",height:10}))).appendTo("body"),r=o.children(),a=r.children();i.barWidth=r[0].offsetWidth-r[0].clientWidth,i.bScrollOversize=100===a[0].offsetWidth&&100!==r[0].clientWidth,i.bScrollbarLeft=1!==Math.round(a.offset().left),i.bBounding=!!o[0].getBoundingClientRect().width,o.remove()}t.extend(n.oBrowser,Gt.__browser),n.oScroll.iBarWidth=Gt.__browser.barWidth}function u(t,e,n,o,r,a){var s,l=o,c=!1;for(n!==i&&(s=n,c=!0);l!==r;)t.hasOwnProperty(l)&&(s=c?e(s,t[l],l,t):t[l],c=!0,l+=a);return s}function d(e,i){var o=Gt.defaults.column,r=e.aoColumns.length,a=t.extend({},Gt.models.oColumn,o,{nTh:i||n.createElement("th"),sTitle:o.sTitle?o.sTitle:i?i.innerHTML:"",aDataSort:o.aDataSort?o.aDataSort:[r],mData:o.mData?o.mData:r,idx:r});e.aoColumns.push(a);var s=e.aoPreSearchCols;s[r]=t.extend({},Gt.models.oSearch,s[r]),h(e,r,t(i).data())}function h(e,n,o){var a=e.aoColumns[n],s=e.oClasses,c=t(a.nTh);if(!a.sWidthOrig){a.sWidthOrig=c.attr("width")||null;var u=(c.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);u&&(a.sWidthOrig=u[1])}o!==i&&null!==o&&(l(o),r(Gt.defaults.column,o),o.mDataProp===i||o.mData||(o.mData=o.mDataProp),o.sType&&(a._sManualType=o.sType),o.className&&!o.sClass&&(o.sClass=o.className),o.sClass&&c.addClass(o.sClass),t.extend(a,o),It(a,o,"sWidth","sWidthOrig"),o.iDataSort!==i&&(a.aDataSort=[o.iDataSort]),It(a,o,"aDataSort"));var d=a.mData,h=D(d),p=a.mRender?D(a.mRender):null,f=function(t){return"string"==typeof t&&-1!==t.indexOf("@")};a._bAttrSrc=t.isPlainObject(d)&&(f(d.sort)||f(d.type)||f(d.filter)),a._setter=null,a.fnGetData=function(t,e,n){var o=h(t,e,i,n);return p&&e?p(o,e,t,n):o},a.fnSetData=function(t,e,n){return A(d)(t,e,n)},"number"!=typeof d&&(e._rowReadObject=!0),e.oFeatures.bSort||(a.bSortable=!1,c.addClass(s.sSortableNone));var m=-1!==t.inArray("asc",a.asSorting),g=-1!==t.inArray("desc",a.asSorting);a.bSortable&&(m||g)?m&&!g?(a.sSortingClass=s.sSortableAsc,a.sSortingClassJUI=s.sSortJUIAscAllowed):!m&&g?(a.sSortingClass=s.sSortableDesc,a.sSortingClassJUI=s.sSortJUIDescAllowed):(a.sSortingClass=s.sSortable,a.sSortingClassJUI=s.sSortJUI):(a.sSortingClass=s.sSortableNone,a.sSortingClassJUI="")}function p(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;vt(t);for(var n=0,i=e.length;n<i;n++)e[n].nTh.style.width=e[n].sWidth}var o=t.oScroll;""===o.sY&&""===o.sX||mt(t),$t(t,null,"column-sizing",[t])}function f(t,e){var n=v(t,"bVisible");return"number"==typeof n[e]?n[e]:null}function m(e,n){var i=v(e,"bVisible"),o=t.inArray(n,i);return-1!==o?o:null}function g(e){var n=0;return t.each(e.aoColumns,function(e,i){i.bVisible&&"none"!==t(i.nTh).css("display")&&n++}),n}function v(e,n){var i=[];return t.map(e.aoColumns,function(t,e){t[n]&&i.push(e)}),i}function _(t){var e,n,o,r,a,s,l,c,u,d=t.aoColumns,h=t.aoData,p=Gt.ext.type.detect;for(e=0,n=d.length;e<n;e++)if(l=d[e],u=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(o=0,r=p.length;o<r;o++){for(a=0,s=h.length;a<s&&(u[a]===i&&(u[a]=S(t,a,e,"type")),(c=p[o](u[a],t))||o===p.length-1)&&"html"!==c;a++);if(c){l.sType=c;break}}l.sType||(l.sType="string")}}function w(e,n,o,r){var a,s,l,c,u,h,p,f=e.aoColumns;if(n)for(a=n.length-1;a>=0;a--){p=n[a];var m=p.targets!==i?p.targets:p.aTargets;for(t.isArray(m)||(m=[m]),l=0,c=m.length;l<c;l++)if("number"==typeof m[l]&&m[l]>=0){for(;f.length<=m[l];)d(e);r(m[l],p)}else if("number"==typeof m[l]&&m[l]<0)r(f.length+m[l],p);else if("string"==typeof m[l])for(u=0,h=f.length;u<h;u++)("_all"==m[l]||t(f[u].nTh).hasClass(m[l]))&&r(u,p)}if(o)for(a=0,s=o.length;a<s;a++)r(a,o[a])}function b(e,n,o,r){var a=e.aoData.length,s=t.extend(!0,{},Gt.models.oRow,{src:o?"dom":"data",idx:a});s._aData=n,e.aoData.push(s);for(var l=e.aoColumns,c=0,u=l.length;c<u;c++)l[c].sType=null;e.aiDisplayMaster.push(a);var d=e.rowIdFn(n);return d!==i&&(e.aIds[d]=s),!o&&e.oFeatures.bDeferRender||L(e,a,o,r),a}function y(e,n){var i;return n instanceof t||(n=t(n)),n.map(function(t,n){return i=I(e,n),b(e,i.data,n,i.cells)})}function C(t,e){return e._DT_RowIndex!==i?e._DT_RowIndex:null}function x(e,n,i){return t.inArray(i,e.aoData[n].anCells)}function S(t,e,n,o){var r=t.iDraw,a=t.aoColumns[n],s=t.aoData[e]._aData,l=a.sDefaultContent,c=a.fnGetData(s,o,{settings:t,row:e,col:n});if(c===i)return t.iDrawError!=r&&null===l&&(Ot(t,0,"Requested unknown parameter "+("function"==typeof a.mData?"{function}":"'"+a.mData+"'")+" for row "+e+", column "+n,4),t.iDrawError=r),l;if(c!==s&&null!==c||null===l||o===i){if("function"==typeof c)return c.call(s)}else c=l;return null===c&&"display"==o?"":c}function T(t,e,n,i){var o=t.aoColumns[n],r=t.aoData[e]._aData;o.fnSetData(r,i,{settings:t,row:e,col:n})}function E(e){return t.map(e.match(/(\\.|[^\.])+/g)||[""],function(t){return t.replace(/\\\./g,".")})}function D(e){if(t.isPlainObject(e)){var n={};return t.each(e,function(t,e){e&&(n[t]=D(e))}),function(t,e,o,r){var a=n[e]||n._;return a!==i?a(t,e,o,r):t}}if(null===e)return function(t){return t};if("function"==typeof e)return function(t,n,i,o){return e(t,n,i,o)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,n){return t[e]};var o=function(e,n,r){var a,s,l,c;if(""!==r)for(var u=E(r),d=0,h=u.length;d<h;d++){if(a=u[d].match(me),s=u[d].match(ge),a){if(u[d]=u[d].replace(me,""),""!==u[d]&&(e=e[u[d]]),l=[],u.splice(0,d+1),c=u.join("."),t.isArray(e))for(var p=0,f=e.length;p<f;p++)l.push(o(e[p],n,c));var m=a[0].substring(1,a[0].length-1);e=""===m?l:l.join(m);break}if(s)u[d]=u[d].replace(ge,""),e=e[u[d]]();else{if(null===e||e[u[d]]===i)return i;e=e[u[d]]}}return e};return function(t,n){return o(t,n,e)}}function A(e){if(t.isPlainObject(e))return A(e._);if(null===e)return function(){};if("function"==typeof e)return function(t,n,i){e(t,"set",n,i)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,n){t[e]=n};var n=function(e,o,r){for(var a,s,l,c,u,d=E(r),h=d[d.length-1],p=0,f=d.length-1;p<f;p++){if(s=d[p].match(me),l=d[p].match(ge),s){if(d[p]=d[p].replace(me,""),e[d[p]]=[],a=d.slice(),a.splice(0,p+1),u=a.join("."),t.isArray(o))for(var m=0,g=o.length;m<g;m++)c={},n(c,o[m],u),e[d[p]].push(c);else e[d[p]]=o;return}l&&(d[p]=d[p].replace(ge,""),e=e[d[p]](o)),null!==e[d[p]]&&e[d[p]]!==i||(e[d[p]]={}),e=e[d[p]]}h.match(ge)?e=e[h.replace(ge,"")](o):e[h.replace(me,"")]=o};return function(t,i){return n(t,i,e)}}function N(t){return se(t.aoData,"_aData")}function k(t){t.aoData.length=0,t.aiDisplayMaster.length=0,t.aiDisplay.length=0,t.aIds={}}function R(t,e,n){for(var o=-1,r=0,a=t.length;r<a;r++)t[r]==e?o=r:t[r]>e&&t[r]--;-1!=o&&n===i&&t.splice(o,1)}function O(t,e,n,o){var r,a,s=t.aoData[e],l=function(n,i){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=S(t,e,i,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==s.src)){var c=s.anCells;if(c)if(o!==i)l(c[o],o);else for(r=0,a=c.length;r<a;r++)l(c[r],r)}else s._aData=I(t,s,o,o===i?i:s._aData).data;s._aSortData=null,s._aFilterData=null;var u=t.aoColumns;if(o!==i)u[o].sType=null;else{for(r=0,a=u.length;r<a;r++)u[r].sType=null;P(t,s)}}function I(e,n,o,r){var a,s,l,c=[],u=n.firstChild,d=0,h=e.aoColumns,p=e._rowReadObject;r=r!==i?r:p?{}:[];var f=function(t,e){if("string"==typeof t){var n=t.indexOf("@");if(-1!==n){var i=t.substring(n+1);A(t)(r,e.getAttribute(i))}}},m=function(e){if(o===i||o===d)if(s=h[d],l=t.trim(e.innerHTML),s&&s._bAttrSrc){var n=A(s.mData._);n(r,l),f(s.mData.sort,e),f(s.mData.type,e),f(s.mData.filter,e)}else p?(s._setter||(s._setter=A(s.mData)),s._setter(r,l)):r[d]=l;d++};if(u)for(;u;)a=u.nodeName.toUpperCase(),"TD"!=a&&"TH"!=a||(m(u),c.push(u)),u=u.nextSibling;else{c=n.anCells;for(var g=0,v=c.length;g<v;g++)m(c[g])}var _=n.firstChild?n:n.nTr;if(_){var w=_.getAttribute("id");w&&A(e.rowId)(r,w)}return{data:r,cells:c}}function L(e,i,o,r){var a,s,l,c,u,d=e.aoData[i],h=d._aData,p=[];if(null===d.nTr){for(a=o||n.createElement("tr"),d.nTr=a,d.anCells=p,a._DT_RowIndex=i,P(e,d),c=0,u=e.aoColumns.length;c<u;c++)l=e.aoColumns[c],s=o?r[c]:n.createElement(l.sCellType),s._DT_CellIndex={row:i,column:c},p.push(s),o&&!l.mRender&&l.mData===c||t.isPlainObject(l.mData)&&l.mData._===c+".display"||(s.innerHTML=S(e,i,c,"display")),l.sClass&&(s.className+=" "+l.sClass),l.bVisible&&!o?a.appendChild(s):!l.bVisible&&o&&s.parentNode.removeChild(s),l.fnCreatedCell&&l.fnCreatedCell.call(e.oInstance,s,S(e,i,c),h,i,c);$t(e,"aoRowCreatedCallback",null,[a,h,i])}d.nTr.setAttribute("role","row")}function P(e,n){var i=n.nTr,o=n._aData;if(i){var r=e.rowIdFn(o);if(r&&(i.id=r),o.DT_RowClass){var a=o.DT_RowClass.split(" ");n.__rowc=n.__rowc?pe(n.__rowc.concat(a)):a,t(i).removeClass(n.__rowc.join(" ")).addClass(o.DT_RowClass)}o.DT_RowAttr&&t(i).attr(o.DT_RowAttr),o.DT_RowData&&t(i).data(o.DT_RowData)}}function M(e){var n,i,o,r,a,s=e.nTHead,l=e.nTFoot,c=0===t("th, td",s).length,u=e.oClasses,d=e.aoColumns;for(c&&(r=t("<tr/>").appendTo(s)),n=0,i=d.length;n<i;n++)a=d[n],o=t(a.nTh).addClass(a.sClass),c&&o.appendTo(r),e.oFeatures.bSort&&(o.addClass(a.sSortingClass),!1!==a.bSortable&&(o.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),Et(e,a.nTh,n))),a.sTitle!=o[0].innerHTML&&o.html(a.sTitle),Ht(e,"header")(e,o,a,u);if(c&&j(e.aoHeader,s),t(s).find(">tr").attr("role","row"),t(s).find(">tr>th, >tr>td").addClass(u.sHeaderTH),t(l).find(">tr>th, >tr>td").addClass(u.sFooterTH),null!==l){var h=e.aoFooter[0];for(n=0,i=h.length;n<i;n++)a=d[n],a.nTf=h[n].cell,a.sClass&&t(a.nTf).addClass(a.sClass)}}function $(e,n,o){var r,a,s,l,c,u,d,h,p,f=[],m=[],g=e.aoColumns.length;if(n){for(o===i&&(o=!1),r=0,a=n.length;r<a;r++){for(f[r]=n[r].slice(),f[r].nTr=n[r].nTr,s=g-1;s>=0;s--)e.aoColumns[s].bVisible||o||f[r].splice(s,1);m.push([])}for(r=0,a=f.length;r<a;r++){if(d=f[r].nTr)for(;u=d.firstChild;)d.removeChild(u);for(s=0,l=f[r].length;s<l;s++)if(h=1,p=1,m[r][s]===i){for(d.appendChild(f[r][s].cell),m[r][s]=1;f[r+h]!==i&&f[r][s].cell==f[r+h][s].cell;)m[r+h][s]=1,h++;for(;f[r][s+p]!==i&&f[r][s].cell==f[r][s+p].cell;){for(c=0;c<h;c++)m[r+c][s+p]=1;p++}t(f[r][s].cell).attr("rowspan",h).attr("colspan",p)}}}}function F(e){var n=$t(e,"aoPreDrawCallback","preDraw",[e]);if(-1!==t.inArray(!1,n))return void pt(e,!1);var o=[],r=0,a=e.asStripeClasses,s=a.length,l=(e.aoOpenRows.length,e.oLanguage),c=e.iInitDisplayStart,u="ssp"==Bt(e),d=e.aiDisplay;e.bDrawing=!0,c!==i&&-1!==c&&(e._iDisplayStart=u?c:c>=e.fnRecordsDisplay()?0:c,e.iInitDisplayStart=-1);var h=e._iDisplayStart,p=e.fnDisplayEnd();if(e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,pt(e,!1);else if(u){if(!e.bDestroying&&!q(e))return}else e.iDraw++;if(0!==d.length)for(var f=u?0:h,m=u?e.aoData.length:p,v=f;v<m;v++){var _=d[v],w=e.aoData[_];null===w.nTr&&L(e,_);var b=w.nTr;if(0!==s){var y=a[r%s];w._sRowStripe!=y&&(t(b).removeClass(w._sRowStripe).addClass(y),w._sRowStripe=y)}$t(e,"aoRowCallback",null,[b,w._aData,r,v]),o.push(b),r++}else{var C=l.sZeroRecords;1==e.iDraw&&"ajax"==Bt(e)?C=l.sLoadingRecords:l.sEmptyTable&&0===e.fnRecordsTotal()&&(C=l.sEmptyTable),o[0]=t("<tr/>",{class:s?a[0]:""}).append(t("<td />",{valign:"top",colSpan:g(e),class:e.oClasses.sRowEmpty}).html(C))[0]}$t(e,"aoHeaderCallback","header",[t(e.nTHead).children("tr")[0],N(e),h,p,d]),$t(e,"aoFooterCallback","footer",[t(e.nTFoot).children("tr")[0],N(e),h,p,d]);var x=t(e.nTBody);x.children().detach(),x.append(t(o)),$t(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}function H(t,e){var n=t.oFeatures,i=n.bSort,o=n.bFilter;i&&xt(t),o?Y(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,F(t),t._drawHold=!1}function B(e){var n=e.oClasses,i=t(e.nTable),o=t("<div/>").insertBefore(i),r=e.oFeatures,a=t("<div/>",{id:e.sTableId+"_wrapper",class:n.sWrapper+(e.nTFoot?"":" "+n.sNoFooter)});e.nHolding=o[0],e.nTableWrapper=a[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var s,l,c,u,d,h,p=e.sDom.split(""),f=0;f<p.length;f++){if(s=null,"<"==(l=p[f])){if(c=t("<div/>")[0],"'"==(u=p[f+1])||'"'==u){for(d="",h=2;p[f+h]!=u;)d+=p[f+h],h++;if("H"==d?d=n.sJUIHeader:"F"==d&&(d=n.sJUIFooter),-1!=d.indexOf(".")){var m=d.split(".");c.id=m[0].substr(1,m[0].length-1),c.className=m[1]}else"#"==d.charAt(0)?c.id=d.substr(1,d.length-1):c.className=d;f+=h}a.append(c),a=t(c)}else if(">"==l)a=a.parent();else if("l"==l&&r.bPaginate&&r.bLengthChange)s=ct(e);else if("f"==l&&r.bFilter)s=G(e);else if("r"==l&&r.bProcessing)s=ht(e);else if("t"==l)s=ft(e);else if("i"==l&&r.bInfo)s=it(e);else if("p"==l&&r.bPaginate)s=ut(e);else if(0!==Gt.ext.feature.length)for(var g=Gt.ext.feature,v=0,_=g.length;v<_;v++)if(l==g[v].cFeature){s=g[v].fnInit(e);break}if(s){var w=e.aanFeatures;w[l]||(w[l]=[]),w[l].push(s),a.append(s)}}o.replaceWith(a),e.nHolding=null}function j(e,n){var i,o,r,a,s,l,c,u,d,h,p,f=t(n).children("tr");for(e.splice(0,e.length),r=0,l=f.length;r<l;r++)e.push([]);for(r=0,l=f.length;r<l;r++)for(i=f[r],u=0,o=i.firstChild;o;){if("TD"==o.nodeName.toUpperCase()||"TH"==o.nodeName.toUpperCase())for(d=1*o.getAttribute("colspan"),h=1*o.getAttribute("rowspan"),d=d&&0!==d&&1!==d?d:1,h=h&&0!==h&&1!==h?h:1,c=function(t,e,n){for(var i=t[e];i[n];)n++;return n}(e,r,u),p=1===d,s=0;s<d;s++)for(a=0;a<h;a++)e[r+a][c+s]={cell:o,unique:p},e[r+a].nTr=i;o=o.nextSibling}}function z(t,e,n){var i=[];n||(n=t.aoHeader,e&&(n=[],j(n,e)));for(var o=0,r=n.length;o<r;o++)for(var a=0,s=n[o].length;a<s;a++)!n[o][a].unique||i[a]&&t.bSortCellsTop||(i[a]=n[o][a].cell);return i}function W(e,n,i){if($t(e,"aoServerParams","serverParams",[n]),n&&t.isArray(n)){var o={},r=/(.*?)\[\]$/;t.each(n,function(t,e){var n=e.name.match(r);if(n){var i=n[0];o[i]||(o[i]=[]),o[i].push(e.value)}else o[e.name]=e.value}),n=o}var a,s=e.ajax,l=e.oInstance,c=function(t){$t(e,null,"xhr",[e,t,e.jqXHR]),i(t)};if(t.isPlainObject(s)&&s.data){a=s.data;var u=t.isFunction(a)?a(n,e):a;n=t.isFunction(a)&&u?u:t.extend(!0,n,u),delete s.data}var d={data:n,success:function(t){var n=t.error||t.sError;n&&Ot(e,0,n),e.json=t,c(t)},dataType:"json",cache:!1,type:e.sServerMethod,error:function(n,i,o){var r=$t(e,null,"xhr",[e,null,e.jqXHR]);-1===t.inArray(!0,r)&&("parsererror"==i?Ot(e,0,"Invalid JSON response",1):4===n.readyState&&Ot(e,0,"Ajax error",7)),pt(e,!1)}};e.oAjaxData=n,$t(e,null,"preXhr",[e,n]),e.fnServerData?e.fnServerData.call(l,e.sAjaxSource,t.map(n,function(t,e){return{name:e,value:t}}),c,e):e.sAjaxSource||"string"==typeof s?e.jqXHR=t.ajax(t.extend(d,{url:s||e.sAjaxSource})):t.isFunction(s)?e.jqXHR=s.call(l,n,c,e):(e.jqXHR=t.ajax(t.extend(d,s)),s.data=a)}function q(t){return!t.bAjaxDataGet||(t.iDraw++,pt(t,!0),W(t,U(t),function(e){K(t,e)}),!1)}function U(e){var n,i,o,r,a=e.aoColumns,s=a.length,l=e.oFeatures,c=e.oPreviousSearch,u=e.aoPreSearchCols,d=[],h=Ct(e),p=e._iDisplayStart,f=!1!==l.bPaginate?e._iDisplayLength:-1,m=function(t,e){d.push({name:t,value:e})};m("sEcho",e.iDraw),m("iColumns",s),m("sColumns",se(a,"sName").join(",")),m("iDisplayStart",p),m("iDisplayLength",f);var g={draw:e.iDraw,columns:[],order:[],start:p,length:f,search:{value:c.sSearch,regex:c.bRegex}};for(n=0;n<s;n++)o=a[n],r=u[n],i="function"==typeof o.mData?"function":o.mData,g.columns.push({data:i,name:o.sName,searchable:o.bSearchable,orderable:o.bSortable,search:{value:r.sSearch,regex:r.bRegex}}),m("mDataProp_"+n,i),l.bFilter&&(m("sSearch_"+n,r.sSearch),m("bRegex_"+n,r.bRegex),m("bSearchable_"+n,o.bSearchable)),l.bSort&&m("bSortable_"+n,o.bSortable);l.bFilter&&(m("sSearch",c.sSearch),m("bRegex",c.bRegex)),l.bSort&&(t.each(h,function(t,e){g.order.push({column:e.col,dir:e.dir}),m("iSortCol_"+t,e.col),m("sSortDir_"+t,e.dir)}),m("iSortingCols",h.length));var v=Gt.ext.legacy.ajax;return null===v?e.sAjaxSource?d:g:v?d:g}function K(t,e){var n=function(t,n){return e[t]!==i?e[t]:e[n]},o=V(t,e),r=n("sEcho","draw"),a=n("iTotalRecords","recordsTotal"),s=n("iTotalDisplayRecords","recordsFiltered");if(r){if(1*r<t.iDraw)return;t.iDraw=1*r}k(t),t._iRecordsTotal=parseInt(a,10),t._iRecordsDisplay=parseInt(s,10);for(var l=0,c=o.length;l<c;l++)b(t,o[l]);t.aiDisplay=t.aiDisplayMaster.slice(),t.bAjaxDataGet=!1,F(t),t._bInitComplete||st(t,e),t.bAjaxDataGet=!0,pt(t,!1)}function V(e,n){var o=t.isPlainObject(e.ajax)&&e.ajax.dataSrc!==i?e.ajax.dataSrc:e.sAjaxDataProp;return"data"===o?n.aaData||n[o]:""!==o?D(o)(n):n}function G(e){var i=e.oClasses,o=e.sTableId,r=e.oLanguage,a=e.oPreviousSearch,s=e.aanFeatures,l='<input type="search" class="'+i.sFilterInput+'"/>',c=r.sSearch;c=c.match(/_INPUT_/)?c.replace("_INPUT_",l):c+l;var u=t("<div/>",{id:s.f?null:o+"_filter",class:i.sFilter}).append(t("<label/>").append(c)),d=function(){var t=(s.f,this.value?this.value:"");t!=a.sSearch&&(Y(e,{sSearch:t,bRegex:a.bRegex,bSmart:a.bSmart,bCaseInsensitive:a.bCaseInsensitive}),e._iDisplayStart=0,F(e))},h=null!==e.searchDelay?e.searchDelay:"ssp"===Bt(e)?400:0,p=t("input",u).val(a.sSearch).attr("placeholder",r.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?ye(d,h):d).on("keypress.DT",function(t){if(13==t.keyCode)return!1}).attr("aria-controls",o);return t(e.nTable).on("search.dt.DT",function(t,i){if(e===i)try{p[0]!==n.activeElement&&p.val(a.sSearch)}catch(t){}}),u[0]}function Y(t,e,n){var o=t.oPreviousSearch,r=t.aoPreSearchCols,a=function(t){o.sSearch=t.sSearch,o.bRegex=t.bRegex,o.bSmart=t.bSmart,o.bCaseInsensitive=t.bCaseInsensitive},s=function(t){return t.bEscapeRegex!==i?!t.bEscapeRegex:t.bRegex};if(_(t),"ssp"!=Bt(t)){Q(t,e.sSearch,n,s(e),e.bSmart,e.bCaseInsensitive),a(e);for(var l=0;l<r.length;l++)J(t,r[l].sSearch,l,s(r[l]),r[l].bSmart,r[l].bCaseInsensitive);X(t)}else a(e);t.bFiltered=!0,$t(t,null,"search",[t])}function X(e){for(var n,i,o=Gt.ext.search,r=e.aiDisplay,a=0,s=o.length;a<s;a++){for(var l=[],c=0,u=r.length;c<u;c++)i=r[c],n=e.aoData[i],o[a](e,n._aFilterData,i,n._aData,c)&&l.push(i);r.length=0,t.merge(r,l)}}function J(t,e,n,i,o,r){if(""!==e){for(var a,s=[],l=t.aiDisplay,c=Z(e,i,o,r),u=0;u<l.length;u++)a=t.aoData[l[u]]._aFilterData[n],c.test(a)&&s.push(l[u]);t.aiDisplay=s}}function Q(t,e,n,i,o,r){var a,s,l,c=Z(e,i,o,r),u=t.oPreviousSearch.sSearch,d=t.aiDisplayMaster,h=[];if(0!==Gt.ext.search.length&&(n=!0),s=tt(t),e.length<=0)t.aiDisplay=d.slice();else{for((s||n||u.length>e.length||0!==e.indexOf(u)||t.bSorted)&&(t.aiDisplay=d.slice()),a=t.aiDisplay,l=0;l<a.length;l++)c.test(t.aoData[a[l]]._sFilterRow)&&h.push(a[l]);t.aiDisplay=h}}function Z(e,n,i,o){return e=n?e:ve(e),i&&(e="^(?=.*?"+t.map(e.match(/"[^"]+"|[^ ]+/g)||[""],function(t){if('"'===t.charAt(0)){var e=t.match(/^"(.*)"$/);t=e?e[1]:t}return t.replace('"',"")}).join(")(?=.*?")+").*$"),new RegExp(e,o?"i":"")}function tt(t){var e,n,i,o,r,a,s,l,c=t.aoColumns,u=Gt.ext.type.search,d=!1;for(n=0,o=t.aoData.length;n<o;n++)if(l=t.aoData[n],!l._aFilterData){for(a=[],i=0,r=c.length;i<r;i++)e=c[i],e.bSearchable?(s=S(t,n,i,"filter"),u[e.sType]&&(s=u[e.sType](s)),null===s&&(s=""),"string"!=typeof s&&s.toString&&(s=s.toString())):s="",s.indexOf&&-1!==s.indexOf("&")&&(_e.innerHTML=s,s=we?_e.textContent:_e.innerText),s.replace&&(s=s.replace(/[\r\n]/g,"")),a.push(s);l._aFilterData=a,l._sFilterRow=a.join(" "),d=!0}return d}function et(t){return{search:t.sSearch,smart:t.bSmart,regex:t.bRegex,caseInsensitive:t.bCaseInsensitive}}function nt(t){return{sSearch:t.search,bSmart:t.smart,bRegex:t.regex,bCaseInsensitive:t.caseInsensitive}}function it(e){var n=e.sTableId,i=e.aanFeatures.i,o=t("<div/>",{class:e.oClasses.sInfo,id:i?null:n+"_info"});return i||(e.aoDrawCallback.push({fn:ot,sName:"information"}),o.attr("role","status").attr("aria-live","polite"),t(e.nTable).attr("aria-describedby",n+"_info")),o[0]}function ot(e){var n=e.aanFeatures.i;if(0!==n.length){var i=e.oLanguage,o=e._iDisplayStart+1,r=e.fnDisplayEnd(),a=e.fnRecordsTotal(),s=e.fnRecordsDisplay(),l=s?i.sInfo:i.sInfoEmpty;s!==a&&(l+=" "+i.sInfoFiltered),l+=i.sInfoPostFix,l=rt(e,l);var c=i.fnInfoCallback;null!==c&&(l=c.call(e.oInstance,e,o,r,a,s,l)),t(n).html(l)}}function rt(t,e){var n=t.fnFormatNumber,i=t._iDisplayStart+1,o=t._iDisplayLength,r=t.fnRecordsDisplay(),a=-1===o;return e.replace(/_START_/g,n.call(t,i)).replace(/_END_/g,n.call(t,t.fnDisplayEnd())).replace(/_MAX_/g,n.call(t,t.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(t,r)).replace(/_PAGE_/g,n.call(t,a?1:Math.ceil(i/o))).replace(/_PAGES_/g,n.call(t,a?1:Math.ceil(r/o)))}function at(t){var e,n,i,o=t.iInitDisplayStart,r=t.aoColumns,a=t.oFeatures,s=t.bDeferLoading;if(!t.bInitialised)return void setTimeout(function(){at(t)},200);for(B(t),M(t),$(t,t.aoHeader),$(t,t.aoFooter),pt(t,!0),a.bAutoWidth&&vt(t),e=0,n=r.length;e<n;e++)i=r[e],i.sWidth&&(i.nTh.style.width=yt(i.sWidth));$t(t,null,"preInit",[t]),H(t);var l=Bt(t);("ssp"!=l||s)&&("ajax"==l?W(t,[],function(n){var i=V(t,n);for(e=0;e<i.length;e++)b(t,i[e]);t.iInitDisplayStart=o,H(t),pt(t,!1),st(t,n)},t):(pt(t,!1),st(t)))}function st(t,e){t._bInitComplete=!0,(e||t.oInit.aaData)&&p(t),$t(t,null,"plugin-init",[t,e]),$t(t,"aoInitComplete","init",[t,e])}function lt(t,e){var n=parseInt(e,10);t._iDisplayLength=n,Ft(t),$t(t,null,"length",[t,n])}function ct(e){for(var n=e.oClasses,i=e.sTableId,o=e.aLengthMenu,r=t.isArray(o[0]),a=r?o[0]:o,s=r?o[1]:o,l=t("<select/>",{name:i+"_length","aria-controls":i,class:n.sLengthSelect}),c=0,u=a.length;c<u;c++)l[0][c]=new Option("number"==typeof s[c]?e.fnFormatNumber(s[c]):s[c],a[c]);var d=t("<div><label/></div>").addClass(n.sLength);return e.aanFeatures.l||(d[0].id=i+"_length"),d.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML)),t("select",d).val(e._iDisplayLength).on("change.DT",function(n){lt(e,t(this).val()),F(e)}),t(e.nTable).on("length.dt.DT",function(n,i,o){e===i&&t("select",d).val(o)}),d[0]}function ut(e){var n=e.sPaginationType,i=Gt.ext.pager[n],o="function"==typeof i,r=function(t){F(t)},a=t("<div/>").addClass(e.oClasses.sPaging+n)[0],s=e.aanFeatures;return o||i.fnInit(e,a,r),s.p||(a.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(t){if(o){var e,n,a=t._iDisplayStart,l=t._iDisplayLength,c=t.fnRecordsDisplay(),u=-1===l,d=u?0:Math.ceil(a/l),h=u?1:Math.ceil(c/l),p=i(d,h);for(e=0,n=s.p.length;e<n;e++)Ht(t,"pageButton")(t,s.p[e],e,p,d,h)}else i.fnUpdate(t,r)},sName:"pagination"})),a}function dt(t,e,n){var i=t._iDisplayStart,o=t._iDisplayLength,r=t.fnRecordsDisplay();0===r||-1===o?i=0:"number"==typeof e?(i=e*o)>r&&(i=0):"first"==e?i=0:"previous"==e?(i=o>=0?i-o:0)<0&&(i=0):"next"==e?i+o<r&&(i+=o):"last"==e?i=Math.floor((r-1)/o)*o:Ot(t,0,"Unknown paging action: "+e,5);var a=t._iDisplayStart!==i;return t._iDisplayStart=i,a&&($t(t,null,"page",[t]),n&&F(t)),a}function ht(e){return t("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).insertBefore(e.nTable)[0]}function pt(e,n){e.oFeatures.bProcessing&&t(e.aanFeatures.r).css("display",n?"block":"none"),$t(e,null,"processing",[e,n])}function ft(e){var n=t(e.nTable);n.attr("role","grid");var i=e.oScroll;if(""===i.sX&&""===i.sY)return e.nTable;var o=i.sX,r=i.sY,a=e.oClasses,s=n.children("caption"),l=s.length?s[0]._captionSide:null,c=t(n[0].cloneNode(!1)),u=t(n[0].cloneNode(!1)),d=n.children("tfoot"),h="<div/>",p=function(t){return t?yt(t):null};d.length||(d=null);var f=t(h,{class:a.sScrollWrapper}).append(t(h,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:o?p(o):"100%"}).append(t(h,{class:a.sScrollHeadInner}).css({"box-sizing":"content-box",width:i.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===l?s:null).append(n.children("thead"))))).append(t(h,{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:p(o)}).append(n));d&&f.append(t(h,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:o?p(o):"100%"}).append(t(h,{class:a.sScrollFootInner}).append(u.removeAttr("id").css("margin-left",0).append("bottom"===l?s:null).append(n.children("tfoot")))));var m=f.children(),g=m[0],v=m[1],_=d?m[2]:null;return o&&t(v).on("scroll.DT",function(t){var e=this.scrollLeft;g.scrollLeft=e,d&&(_.scrollLeft=e)}),t(v).css(r&&i.bCollapse?"max-height":"height",r),e.nScrollHead=g,e.nScrollBody=v,e.nScrollFoot=_,e.aoDrawCallback.push({fn:mt,sName:"scrolling"}),f[0]}function mt(e){var n,o,r,a,s,l,c,u,d,h=e.oScroll,m=h.sX,g=h.sXInner,v=h.sY,_=h.iBarWidth,w=t(e.nScrollHead),b=w[0].style,y=w.children("div"),C=y[0].style,x=y.children("table"),S=e.nScrollBody,T=t(S),E=S.style,D=t(e.nScrollFoot),A=D.children("div"),N=A.children("table"),k=t(e.nTHead),R=t(e.nTable),O=R[0],I=O.style,L=e.nTFoot?t(e.nTFoot):null,P=e.oBrowser,M=P.bScrollOversize,$=se(e.aoColumns,"nTh"),F=[],H=[],B=[],j=[],W=function(t){var e=t.style;e.paddingTop="0",e.paddingBottom="0",e.borderTopWidth="0",e.borderBottomWidth="0",e.height=0},q=S.scrollHeight>S.clientHeight;if(e.scrollBarVis!==q&&e.scrollBarVis!==i)return e.scrollBarVis=q,void p(e);e.scrollBarVis=q,R.children("thead, tfoot").remove(),L&&(l=L.clone().prependTo(R),o=L.find("tr"),a=l.find("tr")),s=k.clone().prependTo(R),n=k.find("tr"),r=s.find("tr"),s.find("th, td").removeAttr("tabindex"),m||(E.width="100%",w[0].style.width="100%"),t.each(z(e,s),function(t,n){c=f(e,t),n.style.width=e.aoColumns[c].sWidth}),L&>(function(t){t.style.width=""},a),d=R.outerWidth(),""===m?(I.width="100%",M&&(R.find("tbody").height()>S.offsetHeight||"scroll"==T.css("overflow-y"))&&(I.width=yt(R.outerWidth()-_)),d=R.outerWidth()):""!==g&&(I.width=yt(g),d=R.outerWidth()),gt(W,r),gt(function(e){B.push(e.innerHTML),F.push(yt(t(e).css("width")))},r),gt(function(e,n){-1!==t.inArray(e,$)&&(e.style.width=F[n])},n),t(r).height(0),L&&(gt(W,a),gt(function(e){j.push(e.innerHTML),H.push(yt(t(e).css("width")))},a),gt(function(t,e){t.style.width=H[e]},o),t(a).height(0)),gt(function(t,e){t.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+B[e]+"</div>",t.style.width=F[e]},r),L&>(function(t,e){t.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+j[e]+"</div>",t.style.width=H[e]},a),R.outerWidth()<d?(u=S.scrollHeight>S.offsetHeight||"scroll"==T.css("overflow-y")?d+_:d,M&&(S.scrollHeight>S.offsetHeight||"scroll"==T.css("overflow-y"))&&(I.width=yt(u-_)),""!==m&&""===g||Ot(e,1,"Possible column misalignment",6)):u="100%",E.width=yt(u),b.width=yt(u),L&&(e.nScrollFoot.style.width=yt(u)),v||M&&(E.height=yt(O.offsetHeight+_));var U=R.outerWidth();x[0].style.width=yt(U),C.width=yt(U);var K=R.height()>S.clientHeight||"scroll"==T.css("overflow-y"),V="padding"+(P.bScrollbarLeft?"Left":"Right");C[V]=K?_+"px":"0px",L&&(N[0].style.width=yt(U),A[0].style.width=yt(U),A[0].style[V]=K?_+"px":"0px"),R.children("colgroup").insertBefore(R.children("thead")),T.scroll(),!e.bSorted&&!e.bFiltered||e._drawHold||(S.scrollTop=0)}function gt(t,e,n){for(var i,o,r=0,a=0,s=e.length;a<s;){for(i=e[a].firstChild,o=n?n[a].firstChild:null;i;)1===i.nodeType&&(n?t(i,o,r):t(i,r),r++),i=i.nextSibling,o=n?o.nextSibling:null;a++}}function vt(n){var i,o,r,a=n.nTable,s=n.aoColumns,l=n.oScroll,c=l.sY,u=l.sX,d=l.sXInner,h=s.length,m=v(n,"bVisible"),_=t("th",n.nTHead),w=a.getAttribute("width"),b=a.parentNode,y=!1,C=n.oBrowser,x=C.bScrollOversize,S=a.style.width;for(S&&-1!==S.indexOf("%")&&(w=S),i=0;i<m.length;i++)o=s[m[i]],null!==o.sWidth&&(o.sWidth=_t(o.sWidthOrig,b),y=!0);if(x||!y&&!u&&!c&&h==g(n)&&h==_.length)for(i=0;i<h;i++){var T=f(n,i);null!==T&&(s[T].sWidth=yt(_.eq(i).width()))}else{var E=t(a).clone().css("visibility","hidden").removeAttr("id");E.find("tbody tr").remove();var D=t("<tr/>").appendTo(E.find("tbody"));for(E.find("thead, tfoot").remove(),E.append(t(n.nTHead).clone()).append(t(n.nTFoot).clone()),E.find("tfoot th, tfoot td").css("width",""),_=z(n,E.find("thead")[0]),i=0;i<m.length;i++)o=s[m[i]],_[i].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?yt(o.sWidthOrig):"",o.sWidthOrig&&u&&t(_[i]).append(t("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(i=0;i<m.length;i++)r=m[i],o=s[r],t(wt(n,r)).clone(!1).append(o.sContentPadding).appendTo(D);t("[name]",E).removeAttr("name");var A=t("<div/>").css(u||c?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(E).appendTo(b);u&&d?E.width(d):u?(E.css("width","auto"),E.removeAttr("width"),E.width()<b.clientWidth&&w&&E.width(b.clientWidth)):c?E.width(b.clientWidth):w&&E.width(w);var N=0;for(i=0;i<m.length;i++){var k=t(_[i]),R=k.outerWidth()-k.width(),O=C.bBounding?Math.ceil(_[i].getBoundingClientRect().width):k.outerWidth();N+=O,s[m[i]].sWidth=yt(O-R)}a.style.width=yt(N),A.remove()}if(w&&(a.style.width=yt(w)),(w||u)&&!n._reszEvt){var I=function(){t(e).on("resize.DT-"+n.sInstance,ye(function(){p(n)}))};x?setTimeout(I,1e3):I(),n._reszEvt=!0}}function _t(e,i){if(!e)return 0;var o=t("<div/>").css("width",yt(e)).appendTo(i||n.body),r=o[0].offsetWidth;return o.remove(),r}function wt(e,n){var i=bt(e,n);if(i<0)return null;var o=e.aoData[i];return o.nTr?o.anCells[n]:t("<td/>").html(S(e,i,n,"display"))[0]}function bt(t,e){for(var n,i=-1,o=-1,r=0,a=t.aoData.length;r<a;r++)n=S(t,r,e,"display")+"",n=n.replace(be,""),n=n.replace(/ /g," "),n.length>i&&(i=n.length,o=r);return o}function yt(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function Ct(e){var n,o,r,a,s,l,c,u=[],d=e.aoColumns,h=e.aaSortingFixed,p=t.isPlainObject(h),f=[],m=function(e){e.length&&!t.isArray(e[0])?f.push(e):t.merge(f,e)};for(t.isArray(h)&&m(h),p&&h.pre&&m(h.pre),m(e.aaSorting),p&&h.post&&m(h.post),n=0;n<f.length;n++)for(c=f[n][0],a=d[c].aDataSort,o=0,r=a.length;o<r;o++)s=a[o],l=d[s].sType||"string",f[n]._idx===i&&(f[n]._idx=t.inArray(f[n][1],d[s].asSorting)),u.push({src:c,col:s,dir:f[n][1],index:f[n]._idx,type:l,formatter:Gt.ext.type.order[l+"-pre"]});return u}function xt(t){var e,n,i,o,r,a=[],s=Gt.ext.type.order,l=t.aoData,c=(t.aoColumns,0),u=t.aiDisplayMaster;for(_(t),r=Ct(t),e=0,n=r.length;e<n;e++)o=r[e],o.formatter&&c++,At(t,o.col);if("ssp"!=Bt(t)&&0!==r.length){for(e=0,i=u.length;e<i;e++)a[u[e]]=e;c===r.length?u.sort(function(t,e){var n,i,o,s,c,u=r.length,d=l[t]._aSortData,h=l[e]._aSortData;for(o=0;o<u;o++)if(c=r[o],n=d[c.col],i=h[c.col],0!=(s=n<i?-1:n>i?1:0))return"asc"===c.dir?s:-s;return n=a[t],i=a[e],n<i?-1:n>i?1:0}):u.sort(function(t,e){var n,i,o,c,u,d,h=r.length,p=l[t]._aSortData,f=l[e]._aSortData;for(o=0;o<h;o++)if(u=r[o],n=p[u.col],i=f[u.col],d=s[u.type+"-"+u.dir]||s["string-"+u.dir],0!==(c=d(n,i)))return c;return n=a[t],i=a[e],n<i?-1:n>i?1:0})}t.bSorted=!0}function St(t){for(var e,n,i=t.aoColumns,o=Ct(t),r=t.oLanguage.oAria,a=0,s=i.length;a<s;a++){var l=i[a],c=l.asSorting,u=l.sTitle.replace(/<.*?>/g,""),d=l.nTh;d.removeAttribute("aria-sort"),l.bSortable?(o.length>0&&o[0].col==a?(d.setAttribute("aria-sort","asc"==o[0].dir?"ascending":"descending"),n=c[o[0].index+1]||c[0]):n=c[0],e=u+("asc"===n?r.sSortAscending:r.sSortDescending)):e=u,d.setAttribute("aria-label",e)}}function Tt(e,n,o,r){var a,s=e.aoColumns[n],l=e.aaSorting,c=s.asSorting,u=function(e,n){var o=e._idx;return o===i&&(o=t.inArray(e[1],c)),o+1<c.length?o+1:n?null:0};if("number"==typeof l[0]&&(l=e.aaSorting=[l]),o&&e.oFeatures.bSortMulti){var d=t.inArray(n,se(l,"0"));-1!==d?(a=u(l[d],!0),null===a&&1===l.length&&(a=0),null===a?l.splice(d,1):(l[d][1]=c[a],l[d]._idx=a)):(l.push([n,c[0],0]),l[l.length-1]._idx=0)}else l.length&&l[0][0]==n?(a=u(l[0]),l.length=1,l[0][1]=c[a],l[0]._idx=a):(l.length=0,l.push([n,c[0]]),l[0]._idx=0);H(e),"function"==typeof r&&r(e)}function Et(t,e,n,i){var o=t.aoColumns[n];Pt(e,{},function(e){!1!==o.bSortable&&(t.oFeatures.bProcessing?(pt(t,!0),setTimeout(function(){Tt(t,n,e.shiftKey,i),"ssp"!==Bt(t)&&pt(t,!1)},0)):Tt(t,n,e.shiftKey,i))})}function Dt(e){var n,i,o,r=e.aLastSort,a=e.oClasses.sSortColumn,s=Ct(e),l=e.oFeatures;if(l.bSort&&l.bSortClasses){for(n=0,i=r.length;n<i;n++)o=r[n].src,t(se(e.aoData,"anCells",o)).removeClass(a+(n<2?n+1:3));for(n=0,i=s.length;n<i;n++)o=s[n].src,t(se(e.aoData,"anCells",o)).addClass(a+(n<2?n+1:3))}e.aLastSort=s}function At(t,e){var n,i=t.aoColumns[e],o=Gt.ext.order[i.sSortDataType];o&&(n=o.call(t.oInstance,t,e,m(t,e)));for(var r,a,s=Gt.ext.type.order[i.sType+"-pre"],l=0,c=t.aoData.length;l<c;l++)r=t.aoData[l],r._aSortData||(r._aSortData=[]),r._aSortData[e]&&!o||(a=o?n[l]:S(t,l,e,"sort"),r._aSortData[e]=s?s(a):a)}function Nt(e){if(e.oFeatures.bStateSave&&!e.bDestroying){var n={time:+new Date,start:e._iDisplayStart,length:e._iDisplayLength,order:t.extend(!0,[],e.aaSorting),search:et(e.oPreviousSearch),columns:t.map(e.aoColumns,function(t,n){return{visible:t.bVisible,search:et(e.aoPreSearchCols[n])}})};$t(e,"aoStateSaveParams","stateSaveParams",[e,n]),e.oSavedState=n,e.fnStateSaveCallback.call(e.oInstance,e,n)}}function kt(e,n,o){var r,a,s=e.aoColumns,l=function(n){if(!n||!n.time)return void o();var l=$t(e,"aoStateLoadParams","stateLoadParams",[e,n]);if(-1!==t.inArray(!1,l))return void o();var c=e.iStateDuration;if(c>0&&n.time<+new Date-1e3*c)return void o();if(n.columns&&s.length!==n.columns.length)return void o();if(e.oLoadedState=t.extend(!0,{},n),n.start!==i&&(e._iDisplayStart=n.start,e.iInitDisplayStart=n.start),n.length!==i&&(e._iDisplayLength=n.length),n.order!==i&&(e.aaSorting=[],t.each(n.order,function(t,n){e.aaSorting.push(n[0]>=s.length?[0,n[1]]:n)})),n.search!==i&&t.extend(e.oPreviousSearch,nt(n.search)),n.columns)for(r=0,a=n.columns.length;r<a;r++){var u=n.columns[r];u.visible!==i&&(s[r].bVisible=u.visible),u.search!==i&&t.extend(e.aoPreSearchCols[r],nt(u.search))}$t(e,"aoStateLoaded","stateLoaded",[e,n]),o()};if(!e.oFeatures.bStateSave)return void o();var c=e.fnStateLoadCallback.call(e.oInstance,e,l);c!==i&&l(c)}function Rt(e){var n=Gt.settings,i=t.inArray(e,se(n,"nTable"));return-1!==i?n[i]:null}function Ot(t,n,i,o){if(i="DataTables warning: "+(t?"table id="+t.sTableId+" - ":"")+i,o&&(i+=". For more information about this error, please see http://datatables.net/tn/"+o),n)e.console&&console.log&&console.log(i);else{var r=Gt.ext,a=r.sErrMode||r.errMode;if(t&&$t(t,null,"error",[t,o,i]),"alert"==a)alert(i);else{if("throw"==a)throw new Error(i);"function"==typeof a&&a(t,o,i)}}}function It(e,n,o,r){if(t.isArray(o))return void t.each(o,function(i,o){t.isArray(o)?It(e,n,o[0],o[1]):It(e,n,o)});r===i&&(r=o),n[o]!==i&&(e[r]=n[o])}function Lt(e,n,i){var o;for(var r in n)n.hasOwnProperty(r)&&(o=n[r],t.isPlainObject(o)?(t.isPlainObject(e[r])||(e[r]={}),t.extend(!0,e[r],o)):i&&"data"!==r&&"aaData"!==r&&t.isArray(o)?e[r]=o.slice():e[r]=o);return e}function Pt(e,n,i){t(e).on("click.DT",n,function(t){e.blur(),i(t)}).on("keypress.DT",n,function(t){13===t.which&&(t.preventDefault(),i(t))}).on("selectstart.DT",function(){return!1})}function Mt(t,e,n,i){n&&t[e].push({fn:n,sName:i})}function $t(e,n,i,o){var r=[];if(n&&(r=t.map(e[n].slice().reverse(),function(t,n){return t.fn.apply(e.oInstance,o)})),null!==i){var a=t.Event(i+".dt");t(e.nTable).trigger(a,o),r.push(a.result)}return r}function Ft(t){var e=t._iDisplayStart,n=t.fnDisplayEnd(),i=t._iDisplayLength;e>=n&&(e=n-i),e-=e%i,(-1===i||e<0)&&(e=0),t._iDisplayStart=e}function Ht(e,n){var i=e.renderer,o=Gt.ext.renderer[n];return t.isPlainObject(i)&&i[n]?o[i[n]]||o._:"string"==typeof i?o[i]||o._:o._}function Bt(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}function jt(t,e){var n=[],i=je.numbers_length,o=Math.floor(i/2);return e<=i?n=ce(0,e):t<=o?(n=ce(0,i-2),n.push("ellipsis"),n.push(e-1)):t>=e-1-o?(n=ce(e-(i-2),e),n.splice(0,0,"ellipsis"),n.splice(0,0,0)):(n=ce(t-o+2,t+o-1),n.push("ellipsis"),n.push(e-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}function zt(e){t.each({num:function(t){return ze(t,e)},"num-fmt":function(t){return ze(t,e,te)},"html-num":function(t){return ze(t,e,Jt)},"html-num-fmt":function(t){return ze(t,e,Jt,te)}},function(t,n){qt.type.order[t+e+"-pre"]=n,t.match(/^html\-/)&&(qt.type.search[t+e]=qt.type.search.html)})}function Wt(t){return function(){var e=[Rt(this[Gt.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Gt.ext.internal[t].apply(this,e)}}var qt,Ut,Kt,Vt,Gt=function(e){this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new Ut(t?Rt(this[qt.iApiIndex]):this)},this.fnAddData=function(e,n){var o=this.api(!0),r=t.isArray(e)&&(t.isArray(e[0])||t.isPlainObject(e[0]))?o.rows.add(e):o.row.add(e);return(n===i||n)&&o.draw(),r.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),n=e.settings()[0],o=n.oScroll;t===i||t?e.draw(!1):""===o.sX&&""===o.sY||mt(n)},this.fnClearTable=function(t){var e=this.api(!0).clear();(t===i||t)&&e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,n){var o=this.api(!0),r=o.rows(t),a=r.settings()[0],s=a.aoData[r[0][0]];return r.remove(),e&&e.call(this,a,s),(n===i||n)&&o.draw(),s},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,n,o,r,a){var s=this.api(!0);null===e||e===i?s.search(t,n,o,a):s.column(e).search(t,n,o,a),s.draw()},this.fnGetData=function(t,e){var n=this.api(!0);if(t!==i){var o=t.nodeName?t.nodeName.toLowerCase():"";return e!==i||"td"==o||"th"==o?n.cell(t,e).data():n.row(t).data()||null}return n.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==i?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),n=t.nodeName.toUpperCase();if("TR"==n)return e.row(t).index();if("TD"==n||"TH"==n){var i=e.cell(t).index();return[i.row,i.columnVisible,i.column]}return null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,n){return this.api(!0).row(t).child(e,n).show().child()[0]},this.fnPageChange=function(t,e){var n=this.api(!0).page(t);(e===i||e)&&n.draw(!1)},this.fnSetColumnVis=function(t,e,n){var o=this.api(!0).column(t).visible(e);(n===i||n)&&o.columns.adjust().draw()},this.fnSettings=function(){return Rt(this[qt.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,n){this.api(!0).order.listener(t,e,n)},this.fnUpdate=function(t,e,n,o,r){var a=this.api(!0);return n===i||null===n?a.row(e).data(t):a.cell(e,n).data(t),(r===i||r)&&a.columns.adjust(),(o===i||o)&&a.draw(),0},this.fnVersionCheck=qt.fnVersionCheck;var n=this,o=e===i,u=this.length;o&&(e={}),this.oApi=this.internal=qt.internal;for(var p in Gt.ext.internal)p&&(this[p]=Wt(p));return this.each(function(){var p,f={},m=u>1?Lt(f,e,!0):e,g=0,v=this.getAttribute("id"),_=!1,C=Gt.defaults,x=t(this);if("table"!=this.nodeName.toLowerCase())return void Ot(null,0,"Non-table node initialisation ("+this.nodeName+")",2);s(C),l(C.column),r(C,C,!0),r(C.column,C.column,!0),r(C,t.extend(m,x.data()));var S=Gt.settings;for(g=0,p=S.length;g<p;g++){var T=S[g];if(T.nTable==this||T.nTHead.parentNode==this||T.nTFoot&&T.nTFoot.parentNode==this){var E=m.bRetrieve!==i?m.bRetrieve:C.bRetrieve,A=m.bDestroy!==i?m.bDestroy:C.bDestroy;if(o||E)return T.oInstance;if(A){T.oInstance.fnDestroy();break}return void Ot(T,0,"Cannot reinitialise DataTable",3)}if(T.sTableId==this.id){S.splice(g,1);break}}null!==v&&""!==v||(v="DataTables_Table_"+Gt.ext._unique++,this.id=v);var N=t.extend(!0,{},Gt.models.oSettings,{sDestroyWidth:x[0].style.width,sInstance:v,sTableId:v});N.nTable=this,N.oApi=n.internal,N.oInit=m,S.push(N),N.oInstance=1===n.length?n:x.dataTable(),s(m),m.oLanguage&&a(m.oLanguage),m.aLengthMenu&&!m.iDisplayLength&&(m.iDisplayLength=t.isArray(m.aLengthMenu[0])?m.aLengthMenu[0][0]:m.aLengthMenu[0]),m=Lt(t.extend(!0,{},C),m),It(N.oFeatures,m,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),It(N,m,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),It(N.oScroll,m,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),It(N.oLanguage,m,"fnInfoCallback"),Mt(N,"aoDrawCallback",m.fnDrawCallback,"user"),Mt(N,"aoServerParams",m.fnServerParams,"user"),Mt(N,"aoStateSaveParams",m.fnStateSaveParams,"user"),Mt(N,"aoStateLoadParams",m.fnStateLoadParams,"user"),Mt(N,"aoStateLoaded",m.fnStateLoaded,"user"),Mt(N,"aoRowCallback",m.fnRowCallback,"user"),Mt(N,"aoRowCreatedCallback",m.fnCreatedRow,"user"),Mt(N,"aoHeaderCallback",m.fnHeaderCallback,"user"),Mt(N,"aoFooterCallback",m.fnFooterCallback,"user"),Mt(N,"aoInitComplete",m.fnInitComplete,"user"),Mt(N,"aoPreDrawCallback",m.fnPreDrawCallback,"user"),N.rowIdFn=D(m.rowId),c(N);var k=N.oClasses;if(t.extend(k,Gt.ext.classes,m.oClasses),x.addClass(k.sTable),N.iInitDisplayStart===i&&(N.iInitDisplayStart=m.iDisplayStart,N._iDisplayStart=m.iDisplayStart),null!==m.iDeferLoading){N.bDeferLoading=!0;var R=t.isArray(m.iDeferLoading);N._iRecordsDisplay=R?m.iDeferLoading[0]:m.iDeferLoading,N._iRecordsTotal=R?m.iDeferLoading[1]:m.iDeferLoading}var O=N.oLanguage;t.extend(!0,O,m.oLanguage),O.sUrl&&(t.ajax({dataType:"json",url:O.sUrl,success:function(e){a(e),r(C.oLanguage,e),t.extend(!0,O,e),at(N)},error:function(){at(N)}}),_=!0),null===m.asStripeClasses&&(N.asStripeClasses=[k.sStripeOdd,k.sStripeEven]);var I=N.asStripeClasses,L=x.children("tbody").find("tr").eq(0);-1!==t.inArray(!0,t.map(I,function(t,e){return L.hasClass(t)}))&&(t("tbody tr",this).removeClass(I.join(" ")),N.asDestroyStripes=I.slice());var P,M=[],$=this.getElementsByTagName("thead");if(0!==$.length&&(j(N.aoHeader,$[0]),M=z(N)),null===m.aoColumns)for(P=[],g=0,p=M.length;g<p;g++)P.push(null);else P=m.aoColumns;for(g=0,p=P.length;g<p;g++)d(N,M?M[g]:null);if(w(N,m.aoColumnDefs,P,function(t,e){h(N,t,e)}),L.length){var F=function(t,e){return null!==t.getAttribute("data-"+e)?e:null};t(L[0]).children("th, td").each(function(t,e){var n=N.aoColumns[t];if(n.mData===t){var o=F(e,"sort")||F(e,"order"),r=F(e,"filter")||F(e,"search");null===o&&null===r||(n.mData={_:t+".display",sort:null!==o?t+".@data-"+o:i,type:null!==o?t+".@data-"+o:i,filter:null!==r?t+".@data-"+r:i},h(N,t))}})}var H=N.oFeatures,B=function(){if(m.aaSorting===i){var e=N.aaSorting;for(g=0,p=e.length;g<p;g++)e[g][1]=N.aoColumns[g].asSorting[0]}Dt(N),H.bSort&&Mt(N,"aoDrawCallback",function(){if(N.bSorted){var e=Ct(N),n={};t.each(e,function(t,e){n[e.src]=e.dir}),$t(N,null,"order",[N,e,n]),St(N)}}),Mt(N,"aoDrawCallback",function(){(N.bSorted||"ssp"===Bt(N)||H.bDeferRender)&&Dt(N)},"sc");var n=x.children("caption").each(function(){this._captionSide=t(this).css("caption-side")}),o=x.children("thead");0===o.length&&(o=t("<thead/>").appendTo(x)),N.nTHead=o[0];var r=x.children("tbody");0===r.length&&(r=t("<tbody/>").appendTo(x)),N.nTBody=r[0];var a=x.children("tfoot");if(0===a.length&&n.length>0&&(""!==N.oScroll.sX||""!==N.oScroll.sY)&&(a=t("<tfoot/>").appendTo(x)),0===a.length||0===a.children().length?x.addClass(k.sNoFooter):a.length>0&&(N.nTFoot=a[0],j(N.aoFooter,N.nTFoot)),m.aaData)for(g=0;g<m.aaData.length;g++)b(N,m.aaData[g]);else(N.bDeferLoading||"dom"==Bt(N))&&y(N,t(N.nTBody).children("tr"));N.aiDisplay=N.aiDisplayMaster.slice(),N.bInitialised=!0,!1===_&&at(N)};m.bStateSave?(H.bStateSave=!0,Mt(N,"aoDrawCallback",Nt,"state_save"),kt(N,m,B)):B()}),n=null,this},Yt={},Xt=/[\r\n]/g,Jt=/<.*?>/g,Qt=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Zt=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),te=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,ee=function(t){return!t||!0===t||"-"===t},ne=function(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null},ie=function(t,e){return Yt[e]||(Yt[e]=new RegExp(ve(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(Yt[e],"."):t},oe=function(t,e,n){var i="string"==typeof t;return!!ee(t)||(e&&i&&(t=ie(t,e)),n&&i&&(t=t.replace(te,"")),!isNaN(parseFloat(t))&&isFinite(t))},re=function(t){return ee(t)||"string"==typeof t},ae=function(t,e,n){return!!ee(t)||(re(t)?!!oe(de(t),e,n)||null:null)},se=function(t,e,n){var o=[],r=0,a=t.length;if(n!==i)for(;r<a;r++)t[r]&&t[r][e]&&o.push(t[r][e][n]);else for(;r<a;r++)t[r]&&o.push(t[r][e]);return o},le=function(t,e,n,o){var r=[],a=0,s=e.length;if(o!==i)for(;a<s;a++)t[e[a]][n]&&r.push(t[e[a]][n][o]);else for(;a<s;a++)r.push(t[e[a]][n]);return r},ce=function(t,e){var n,o=[];e===i?(e=0,n=t):(n=e,e=t);for(var r=e;r<n;r++)o.push(r);return o},ue=function(t){for(var e=[],n=0,i=t.length;n<i;n++)t[n]&&e.push(t[n]);return e},de=function(t){return t.replace(Jt,"")},he=function(t){if(t.length<2)return!0;for(var e=t.slice().sort(),n=e[0],i=1,o=e.length;i<o;i++){if(e[i]===n)return!1;n=e[i]}return!0},pe=function(t){if(he(t))return t.slice();var e,n,i,o=[],r=t.length,a=0;t:for(n=0;n<r;n++){for(e=t[n],i=0;i<a;i++)if(o[i]===e)continue t;o.push(e),a++}return o};Gt.util={throttle:function(t,e){var n,o,r=e!==i?e:200;return function(){var e=this,a=+new Date,s=arguments;n&&a<n+r?(clearTimeout(o),o=setTimeout(function(){n=i,t.apply(e,s)},r)):(n=a,t.apply(e,s))}},escapeRegex:function(t){return t.replace(Zt,"\\$1")}};var fe=function(t,e,n){t[e]!==i&&(t[n]=t[e])},me=/\[.*?\]$/,ge=/\(\)$/,ve=Gt.util.escapeRegex,_e=t("<div>")[0],we=_e.textContent!==i,be=/<.*?>/g,ye=Gt.util.throttle,Ce=[],xe=Array.prototype,Se=function(e){var n,i,o=Gt.settings,r=t.map(o,function(t,e){return t.nTable});return e?e.nTable&&e.oApi?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?(n=t.inArray(e,r),-1!==n?[o[n]]:null):e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?i=t(e):e instanceof t&&(i=e),i?i.map(function(e){return n=t.inArray(this,r),-1!==n?o[n]:null}).toArray():void 0):[]};Ut=function(e,n){if(!(this instanceof Ut))return new Ut(e,n);var i=[],o=function(t){var e=Se(t);e&&(i=i.concat(e))};if(t.isArray(e))for(var r=0,a=e.length;r<a;r++)o(e[r]);else o(e);this.context=pe(i),n&&t.merge(this,n),this.selector={rows:null,cols:null,opts:null},Ut.extend(this,this,Ce)},Gt.Api=Ut,t.extend(Ut.prototype,{any:function(){return 0!==this.count()},concat:xe.concat,context:[],count:function(){return this.flatten().length},each:function(t){for(var e=0,n=this.length;e<n;e++)t.call(this,this[e],e,this);return this},eq:function(t){var e=this.context;return e.length>t?new Ut(e[t],this[t]):null},filter:function(t){var e=[];if(xe.filter)e=xe.filter.call(this,t,this);else for(var n=0,i=this.length;n<i;n++)t.call(this,this[n],n,this)&&e.push(this[n]);return new Ut(this.context,e)},flatten:function(){var t=[];return new Ut(this.context,t.concat.apply(t,this.toArray()))},join:xe.join,indexOf:xe.indexOf||function(t,e){for(var n=e||0,i=this.length;n<i;n++)if(this[n]===t)return n;return-1},iterator:function(t,e,n,o){var r,a,s,l,c,u,d,h,p=[],f=this.context,m=this.selector;for("string"==typeof t&&(o=n,n=e,e=t,t=!1),a=0,s=f.length;a<s;a++){var g=new Ut(f[a]);if("table"===e)(r=n.call(g,f[a],a))!==i&&p.push(r);else if("columns"===e||"rows"===e)(r=n.call(g,f[a],this[a],a))!==i&&p.push(r);else if("column"===e||"column-rows"===e||"row"===e||"cell"===e)for(d=this[a],"column-rows"===e&&(u=ke(f[a],m.opts)),l=0,c=d.length;l<c;l++)h=d[l],(r="cell"===e?n.call(g,f[a],h.row,h.column,a,l):n.call(g,f[a],h,a,l,u))!==i&&p.push(r)}if(p.length||o){var v=new Ut(f,t?p.concat.apply([],p):p),_=v.selector;return _.rows=m.rows,_.cols=m.cols,_.opts=m.opts,v}return this},lastIndexOf:xe.lastIndexOf||function(t,e){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(t){var e=[];if(xe.map)e=xe.map.call(this,t,this);else for(var n=0,i=this.length;n<i;n++)e.push(t.call(this,this[n],n));return new Ut(this.context,e)},pluck:function(t){return this.map(function(e){return e[t]})},pop:xe.pop,push:xe.push,reduce:xe.reduce||function(t,e){return u(this,t,e,0,this.length,1)},reduceRight:xe.reduceRight||function(t,e){return u(this,t,e,this.length-1,-1,-1)},reverse:xe.reverse,selector:null,shift:xe.shift,slice:function(){return new Ut(this.context,this)},sort:xe.sort,splice:xe.splice,toArray:function(){return xe.slice.call(this)},to$:function(){return t(this)},toJQuery:function(){return t(this)},unique:function(){return new Ut(this.context,pe(this))},unshift:xe.unshift}),Ut.extend=function(e,n,i){if(i.length&&n&&(n instanceof Ut||n.__dt_wrapper)){var o,r,a;for(o=0,r=i.length;o<r;o++)a=i[o],n[a.name]="function"==typeof a.val?function(t,e,n){return function(){var i=e.apply(t,arguments);return Ut.extend(i,i,n.methodExt),i}}(e,a.val,a):t.isPlainObject(a.val)?{}:a.val,n[a.name].__dt_wrapper=!0,Ut.extend(e,n[a.name],a.propExt)}},Ut.register=Kt=function(e,n){if(t.isArray(e))for(var i=0,o=e.length;i<o;i++)Ut.register(e[i],n);else{var r,a,s,l,c=e.split("."),u=Ce;for(r=0,a=c.length;r<a;r++){l=-1!==c[r].indexOf("()"),s=l?c[r].replace("()",""):c[r];var d=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n].name===e)return t[n];return null}(u,s);d||(d={name:s,val:{},methodExt:[],propExt:[]},u.push(d)),r===a-1?d.val=n:u=l?d.methodExt:d.propExt}}},Ut.registerPlural=Vt=function(e,n,o){Ut.register(e,o),Ut.register(n,function(){var e=o.apply(this,arguments);return e===this?this:e instanceof Ut?e.length?t.isArray(e[0])?new Ut(e.context,e[0]):e[0]:i:e})};var Te=function(e,n){if("number"==typeof e)return[n[e]];var i=t.map(n,function(t,e){return t.nTable});return t(i).filter(e).map(function(e){var o=t.inArray(this,i);return n[o]}).toArray()};Kt("tables()",function(t){return t?new Ut(Te(t,this.context)):this}),Kt("table()",function(t){var e=this.tables(t),n=e.context;return n.length?new Ut(n[0]):e}),Vt("tables().nodes()","table().node()",function(){return this.iterator("table",function(t){return t.nTable},1)}),Vt("tables().body()","table().body()",function(){return this.iterator("table",function(t){return t.nTBody},1)}),Vt("tables().header()","table().header()",function(){return this.iterator("table",function(t){return t.nTHead},1)}),Vt("tables().footer()","table().footer()",function(){return this.iterator("table",function(t){return t.nTFoot},1)}),Vt("tables().containers()","table().container()",function(){return this.iterator("table",function(t){return t.nTableWrapper},1)}),Kt("draw()",function(t){return this.iterator("table",function(e){"page"===t?F(e):("string"==typeof t&&(t="full-hold"!==t),H(e,!1===t))})}),Kt("page()",function(t){return t===i?this.page.info().page:this.iterator("table",function(e){dt(e,t)})}),Kt("page.info()",function(t){if(0===this.context.length)return i;var e=this.context[0],n=e._iDisplayStart,o=e.oFeatures.bPaginate?e._iDisplayLength:-1,r=e.fnRecordsDisplay(),a=-1===o;return{page:a?0:Math.floor(n/o),pages:a?1:Math.ceil(r/o),start:n,end:e.fnDisplayEnd(),length:o,recordsTotal:e.fnRecordsTotal(),recordsDisplay:r,serverSide:"ssp"===Bt(e)}}),Kt("page.len()",function(t){return t===i?0!==this.context.length?this.context[0]._iDisplayLength:i:this.iterator("table",function(e){lt(e,t)})});var Ee=function(t,e,n){if(n){var i=new Ut(t);i.one("draw",function(){n(i.ajax.json())})}if("ssp"==Bt(t))H(t,e);else{pt(t,!0);var o=t.jqXHR;o&&4!==o.readyState&&o.abort(),W(t,[],function(n){k(t);for(var i=V(t,n),o=0,r=i.length;o<r;o++)b(t,i[o]);H(t,e),pt(t,!1)})}};Kt("ajax.json()",function(){var t=this.context;if(t.length>0)return t[0].json}),Kt("ajax.params()",function(){var t=this.context;if(t.length>0)return t[0].oAjaxData}),Kt("ajax.reload()",function(t,e){return this.iterator("table",function(n){Ee(n,!1===e,t)})}),Kt("ajax.url()",function(e){var n=this.context;return e===i?0===n.length?i:(n=n[0],n.ajax?t.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource):this.iterator("table",function(n){t.isPlainObject(n.ajax)?n.ajax.url=e:n.ajax=e})}),Kt("ajax.url().load()",function(t,e){return this.iterator("table",function(n){Ee(n,!1===e,t)})});var De=function(e,n,o,r,a){var s,l,c,u,d,h,p=[],f=typeof n;for(n&&"string"!==f&&"function"!==f&&n.length!==i||(n=[n]),c=0,u=n.length;c<u;c++)for(l=n[c]&&n[c].split&&!n[c].match(/[\[\(:]/)?n[c].split(","):[n[c]],d=0,h=l.length;d<h;d++)(s=o("string"==typeof l[d]?t.trim(l[d]):l[d]))&&s.length&&(p=p.concat(s));var m=qt.selector[e];if(m.length)for(c=0,u=m.length;c<u;c++)p=m[c](r,a,p);return pe(p)},Ae=function(e){return e||(e={}),e.filter&&e.search===i&&(e.search=e.filter),t.extend({search:"none",order:"current",page:"all"},e)},Ne=function(t){for(var e=0,n=t.length;e<n;e++)if(t[e].length>0)return t[0]=t[e],t[0].length=1,t.length=1,t.context=[t.context[e]],t;return t.length=0,t},ke=function(e,n){var i,o,r,a=[],s=e.aiDisplay,l=e.aiDisplayMaster,c=n.search,u=n.order,d=n.page;if("ssp"==Bt(e))return"removed"===c?[]:ce(0,l.length);if("current"==d)for(i=e._iDisplayStart,o=e.fnDisplayEnd();i<o;i++)a.push(s[i]);else if("current"==u||"applied"==u)a="none"==c?l.slice():"applied"==c?s.slice():t.map(l,function(e,n){return-1===t.inArray(e,s)?e:null});else if("index"==u||"original"==u)for(i=0,o=e.aoData.length;i<o;i++)"none"==c?a.push(i):(-1===(r=t.inArray(i,s))&&"removed"==c||r>=0&&"applied"==c)&&a.push(i);return a},Re=function(e,n,o){var r;return De("row",n,function(n){var a=ne(n);if(null!==a&&!o)return[a];if(r||(r=ke(e,o)),null!==a&&-1!==t.inArray(a,r))return[a];if(null===n||n===i||""===n)return r;if("function"==typeof n)return t.map(r,function(t){var i=e.aoData[t];return n(t,i._aData,i.nTr)?t:null});var s=ue(le(e.aoData,r,"nTr"));if(n.nodeName){if(n._DT_RowIndex!==i)return[n._DT_RowIndex];if(n._DT_CellIndex)return[n._DT_CellIndex.row];var l=t(n).closest("*[data-dt-row]");return l.length?[l.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var c=e.aIds[n.replace(/^#/,"")];if(c!==i)return[c.idx]}return t(s).filter(n).map(function(){return this._DT_RowIndex}).toArray()},e,o)};Kt("rows()",function(e,n){e===i?e="":t.isPlainObject(e)&&(n=e,e=""),n=Ae(n);var o=this.iterator("table",function(t){return Re(t,e,n)},1);return o.selector.rows=e,o.selector.opts=n,o}),Kt("rows().nodes()",function(){return this.iterator("row",function(t,e){return t.aoData[e].nTr||i},1)}),Kt("rows().data()",function(){return this.iterator(!0,"rows",function(t,e){return le(t.aoData,e,"_aData")},1)}),Vt("rows().cache()","row().cache()",function(t){return this.iterator("row",function(e,n){var i=e.aoData[n];return"search"===t?i._aFilterData:i._aSortData},1)}),Vt("rows().invalidate()","row().invalidate()",function(t){return this.iterator("row",function(e,n){O(e,n,t)})}),Vt("rows().indexes()","row().index()",function(){return this.iterator("row",function(t,e){return e},1)}),Vt("rows().ids()","row().id()",function(t){for(var e=[],n=this.context,i=0,o=n.length;i<o;i++)for(var r=0,a=this[i].length;r<a;r++){var s=n[i].rowIdFn(n[i].aoData[this[i][r]]._aData);e.push((!0===t?"#":"")+s)}return new Ut(n,e)}),Vt("rows().remove()","row().remove()",function(){var t=this;return this.iterator("row",function(e,n,o){var r,a,s,l,c,u,d=e.aoData,h=d[n];for(d.splice(n,1),r=0,a=d.length;r<a;r++)if(c=d[r],u=c.anCells,null!==c.nTr&&(c.nTr._DT_RowIndex=r),null!==u)for(s=0,l=u.length;s<l;s++)u[s]._DT_CellIndex.row=r;R(e.aiDisplayMaster,n),R(e.aiDisplay,n),R(t[o],n,!1),e._iRecordsDisplay>0&&e._iRecordsDisplay--,Ft(e);var p=e.rowIdFn(h._aData);p!==i&&delete e.aIds[p]}),this.iterator("table",function(t){for(var e=0,n=t.aoData.length;e<n;e++)t.aoData[e].idx=e}),this}),Kt("rows.add()",function(e){var n=this.iterator("table",function(t){var n,i,o,r=[];for(i=0,o=e.length;i<o;i++)n=e[i],n.nodeName&&"TR"===n.nodeName.toUpperCase()?r.push(y(t,n)[0]):r.push(b(t,n));return r},1),i=this.rows(-1);return i.pop(),t.merge(i,n),i}),Kt("row()",function(t,e){return Ne(this.rows(t,e))}),Kt("row().data()",function(t){var e=this.context;return t===i?e.length&&this.length?e[0].aoData[this[0]]._aData:i:(e[0].aoData[this[0]]._aData=t,O(e[0],this[0],"data"),this)}),Kt("row().node()",function(){var t=this.context;return t.length&&this.length?t[0].aoData[this[0]].nTr||null:null}),Kt("row.add()",function(e){e instanceof t&&e.length&&(e=e[0]);var n=this.iterator("table",function(t){return e.nodeName&&"TR"===e.nodeName.toUpperCase()?y(t,e)[0]:b(t,e)});return this.row(n[0])});var Oe=function(e,n,i,o){var r=[],a=function(n,i){if(t.isArray(n)||n instanceof t)for(var o=0,s=n.length;o<s;o++)a(n[o],i);else if(n.nodeName&&"tr"===n.nodeName.toLowerCase())r.push(n);else{var l=t("<tr><td/></tr>").addClass(i);t("td",l).addClass(i).html(n)[0].colSpan=g(e),r.push(l[0])}};a(i,o),n._details&&n._details.detach(),n._details=t(r),n._detailsShow&&n._details.insertAfter(n.nTr)},Ie=function(t,e){var n=t.context;if(n.length){var o=n[0].aoData[e!==i?e:t[0]];o&&o._details&&(o._details.remove(),o._detailsShow=i,o._details=i)}},Le=function(t,e){var n=t.context;if(n.length&&t.length){var i=n[0].aoData[t[0]];i._details&&(i._detailsShow=e,e?i._details.insertAfter(i.nTr):i._details.detach(),Pe(n[0]))}},Pe=function(t){var e=new Ut(t),n=t.aoData;e.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"),se(n,"_details").length>0&&(e.on("draw.dt.DT_details",function(i,o){t===o&&e.rows({page:"current"}).eq(0).each(function(t){var e=n[t];e._detailsShow&&e._details.insertAfter(e.nTr)})}),e.on("column-visibility.dt.DT_details",function(e,i,o,r){if(t===i)for(var a,s=g(i),l=0,c=n.length;l<c;l++)a=n[l],a._details&&a._details.children("td[colspan]").attr("colspan",s)}),e.on("destroy.dt.DT_details",function(i,o){if(t===o)for(var r=0,a=n.length;r<a;r++)n[r]._details&&Ie(e,r)}))};Kt("row().child()",function(t,e){var n=this.context;return t===i?n.length&&this.length?n[0].aoData[this[0]]._details:i:(!0===t?this.child.show():!1===t?Ie(this):n.length&&this.length&&Oe(n[0],n[0].aoData[this[0]],t,e),this)}),Kt(["row().child.show()","row().child().show()"],function(t){return Le(this,!0),this}),Kt(["row().child.hide()","row().child().hide()"],function(){return Le(this,!1),this}),Kt(["row().child.remove()","row().child().remove()"],function(){return Ie(this),this}),Kt("row().child.isShown()",function(){var t=this.context;return!(!t.length||!this.length)&&(t[0].aoData[this[0]]._detailsShow||!1)});var Me=/^([^:]+):(name|visIdx|visible)$/,$e=function(t,e,n,i,o){for(var r=[],a=0,s=o.length;a<s;a++)r.push(S(t,o[a],e));return r},Fe=function(e,n,i){var o=e.aoColumns,r=se(o,"sName"),a=se(o,"nTh");return De("column",n,function(n){var s=ne(n);if(""===n)return ce(o.length);if(null!==s)return[s>=0?s:o.length+s];if("function"==typeof n){var l=ke(e,i);return t.map(o,function(t,i){return n(i,$e(e,i,0,0,l),a[i])?i:null})}var c="string"==typeof n?n.match(Me):"";if(c)switch(c[2]){case"visIdx":case"visible":var u=parseInt(c[1],10);if(u<0){var d=t.map(o,function(t,e){return t.bVisible?e:null});return[d[d.length+u]]}return[f(e,u)];case"name":return t.map(r,function(t,e){return t===c[1]?e:null});default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var h=t(a).filter(n).map(function(){return t.inArray(this,a)}).toArray();if(h.length||!n.nodeName)return h;var p=t(n).closest("*[data-dt-column]");return p.length?[p.data("dt-column")]:[]},e,i)},He=function(e,n,o){var r,a,s,l,c=e.aoColumns,u=c[n],d=e.aoData;if(o===i)return u.bVisible;if(u.bVisible!==o){if(o){var h=t.inArray(!0,se(c,"bVisible"),n+1);for(a=0,s=d.length;a<s;a++)l=d[a].nTr,r=d[a].anCells,l&&l.insertBefore(r[n],r[h]||null)}else t(se(e.aoData,"anCells",n)).detach();u.bVisible=o,$(e,e.aoHeader),$(e,e.aoFooter),Nt(e)}};Kt("columns()",function(e,n){e===i?e="":t.isPlainObject(e)&&(n=e,e=""),n=Ae(n);var o=this.iterator("table",function(t){return Fe(t,e,n)},1);return o.selector.cols=e,o.selector.opts=n,o}),Vt("columns().header()","column().header()",function(t,e){return this.iterator("column",function(t,e){return t.aoColumns[e].nTh},1)}),Vt("columns().footer()","column().footer()",function(t,e){return this.iterator("column",function(t,e){return t.aoColumns[e].nTf},1)}),Vt("columns().data()","column().data()",function(){return this.iterator("column-rows",$e,1)}),Vt("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(t,e){return t.aoColumns[e].mData},1)}),Vt("columns().cache()","column().cache()",function(t){return this.iterator("column-rows",function(e,n,i,o,r){return le(e.aoData,r,"search"===t?"_aFilterData":"_aSortData",n)},1)}),Vt("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(t,e,n,i,o){return le(t.aoData,o,"anCells",e)},1)}),Vt("columns().visible()","column().visible()",function(t,e){var n=this.iterator("column",function(e,n){if(t===i)return e.aoColumns[n].bVisible;He(e,n,t)});return t!==i&&(this.iterator("column",function(n,i){$t(n,null,"column-visibility",[n,i,t,e])}),(e===i||e)&&this.columns.adjust()),n}),Vt("columns().indexes()","column().index()",function(t){return this.iterator("column",function(e,n){return"visible"===t?m(e,n):n},1)}),Kt("columns.adjust()",function(){return this.iterator("table",function(t){p(t)},1)}),Kt("column.index()",function(t,e){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===t||"toData"===t)return f(n,e);if("fromData"===t||"toVisible"===t)return m(n,e)}}),Kt("column()",function(t,e){return Ne(this.columns(t,e))});var Be=function(e,n,o){var r,a,s,l,c,u,d,h=e.aoData,p=ke(e,o),f=ue(le(h,p,"anCells")),m=t([].concat.apply([],f)),g=e.aoColumns.length;return De("cell",n,function(n){var o="function"==typeof n;if(null===n||n===i||o){for(a=[],s=0,l=p.length;s<l;s++)for(r=p[s],c=0;c<g;c++)u={row:r,column:c},o?(d=h[r],n(u,S(e,r,c),d.anCells?d.anCells[c]:null)&&a.push(u)):a.push(u);return a}if(t.isPlainObject(n))return[n];var f=m.filter(n).map(function(t,e){return{row:e._DT_CellIndex.row,column:e._DT_CellIndex.column}}).toArray();return f.length||!n.nodeName?f:(d=t(n).closest("*[data-dt-row]"),d.length?[{row:d.data("dt-row"),column:d.data("dt-column")}]:[])},e,o)};Kt("cells()",function(e,n,o){if(t.isPlainObject(e)&&(e.row===i?(o=e,e=null):(o=n,n=null)),t.isPlainObject(n)&&(o=n,n=null),null===n||n===i)return this.iterator("table",function(t){return Be(t,e,Ae(o))});var r,a,s,l,c,u=this.columns(n,o),d=this.rows(e,o),h=this.iterator("table",function(t,e){for(r=[],a=0,s=d[e].length;a<s;a++)for(l=0,c=u[e].length;l<c;l++)r.push({row:d[e][a],column:u[e][l]});return r},1);return t.extend(h.selector,{cols:n,rows:e,opts:o}),h}),Vt("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(t,e,n){var o=t.aoData[e];return o&&o.anCells?o.anCells[n]:i},1)}),Kt("cells().data()",function(){return this.iterator("cell",function(t,e,n){return S(t,e,n)},1)}),Vt("cells().cache()","cell().cache()",function(t){return t="search"===t?"_aFilterData":"_aSortData",this.iterator("cell",function(e,n,i){return e.aoData[n][t][i]},1)}),Vt("cells().render()","cell().render()",function(t){return this.iterator("cell",function(e,n,i){return S(e,n,i,t)},1)}),Vt("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(t,e,n){return{row:e,column:n,columnVisible:m(t,n)}},1)}),Vt("cells().invalidate()","cell().invalidate()",function(t){return this.iterator("cell",function(e,n,i){O(e,n,t,i)})}),Kt("cell()",function(t,e,n){return Ne(this.cells(t,e,n))}),Kt("cell().data()",function(t){var e=this.context,n=this[0];return t===i?e.length&&n.length?S(e[0],n[0].row,n[0].column):i:(T(e[0],n[0].row,n[0].column,t),O(e[0],n[0].row,"data",n[0].column),this)}),Kt("order()",function(e,n){var o=this.context;return e===i?0!==o.length?o[0].aaSorting:i:("number"==typeof e?e=[[e,n]]:e.length&&!t.isArray(e[0])&&(e=Array.prototype.slice.call(arguments)),this.iterator("table",function(t){t.aaSorting=e.slice()}))}),Kt("order.listener()",function(t,e,n){return this.iterator("table",function(i){Et(i,t,e,n)})}),Kt("order.fixed()",function(e){if(!e){var n=this.context,o=n.length?n[0].aaSortingFixed:i;return t.isArray(o)?{pre:o}:o}return this.iterator("table",function(n){n.aaSortingFixed=t.extend(!0,{},e)})}),Kt(["columns().order()","column().order()"],function(e){var n=this;return this.iterator("table",function(i,o){var r=[];t.each(n[o],function(t,n){r.push([n,e])}),i.aaSorting=r})}),Kt("search()",function(e,n,o,r){var a=this.context;return e===i?0!==a.length?a[0].oPreviousSearch.sSearch:i:this.iterator("table",function(i){i.oFeatures.bFilter&&Y(i,t.extend({},i.oPreviousSearch,{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===o||o,bCaseInsensitive:null===r||r}),1)})}),Vt("columns().search()","column().search()",function(e,n,o,r){return this.iterator("column",function(a,s){var l=a.aoPreSearchCols;if(e===i)return l[s].sSearch;a.oFeatures.bFilter&&(t.extend(l[s],{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===o||o,bCaseInsensitive:null===r||r}),Y(a,a.oPreviousSearch,1))})}),Kt("state()",function(){return this.context.length?this.context[0].oSavedState:null}),Kt("state.clear()",function(){return this.iterator("table",function(t){t.fnStateSaveCallback.call(t.oInstance,t,{})})}),Kt("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),Kt("state.save()",function(){return this.iterator("table",function(t){Nt(t)})}),Gt.versionCheck=Gt.fnVersionCheck=function(t){for(var e,n,i=Gt.version.split("."),o=t.split("."),r=0,a=o.length;r<a;r++)if(e=parseInt(i[r],10)||0,n=parseInt(o[r],10)||0,e!==n)return e>n;return!0},Gt.isDataTable=Gt.fnIsDataTable=function(e){var n=t(e).get(0),i=!1;return e instanceof Gt.Api||(t.each(Gt.settings,function(e,o){var r=o.nScrollHead?t("table",o.nScrollHead)[0]:null,a=o.nScrollFoot?t("table",o.nScrollFoot)[0]:null;o.nTable!==n&&r!==n&&a!==n||(i=!0)}),i)},Gt.tables=Gt.fnTables=function(e){var n=!1;t.isPlainObject(e)&&(n=e.api,e=e.visible);var i=t.map(Gt.settings,function(n){if(!e||e&&t(n.nTable).is(":visible"))return n.nTable});return n?new Ut(i):i},Gt.camelToHungarian=r,Kt("$()",function(e,n){var i=this.rows(n).nodes(),o=t(i);return t([].concat(o.filter(e).toArray(),o.find(e).toArray()))}),t.each(["on","one","off"],function(e,n){Kt(n+"()",function(){var e=Array.prototype.slice.call(arguments);e[0]=t.map(e[0].split(/\s/),function(t){return t.match(/\.dt\b/)?t:t+".dt"}).join(" ");var i=t(this.tables().nodes());return i[n].apply(i,e),this})}),Kt("clear()",function(){return this.iterator("table",function(t){k(t)})}),Kt("settings()",function(){return new Ut(this.context,this.context)}),Kt("init()",function(){var t=this.context;return t.length?t[0].oInit:null}),Kt("data()",function(){return this.iterator("table",function(t){return se(t.aoData,"_aData")}).flatten()}),Kt("destroy()",function(n){return n=n||!1,this.iterator("table",function(i){var o,r=i.nTableWrapper.parentNode,a=i.oClasses,s=i.nTable,l=i.nTBody,c=i.nTHead,u=i.nTFoot,d=t(s),h=t(l),p=t(i.nTableWrapper),f=t.map(i.aoData,function(t){return t.nTr});i.bDestroying=!0,$t(i,"aoDestroyCallback","destroy",[i]),n||new Ut(i).columns().visible(!0),p.off(".DT").find(":not(tbody *)").off(".DT"),t(e).off(".DT-"+i.sInstance),s!=c.parentNode&&(d.children("thead").detach(),d.append(c)),u&&s!=u.parentNode&&(d.children("tfoot").detach(),d.append(u)),i.aaSorting=[],i.aaSortingFixed=[],Dt(i),t(f).removeClass(i.asStripeClasses.join(" ")),t("th, td",c).removeClass(a.sSortable+" "+a.sSortableAsc+" "+a.sSortableDesc+" "+a.sSortableNone),h.children().detach(),h.append(f);var m=n?"remove":"detach";d[m](),p[m](),!n&&r&&(r.insertBefore(s,i.nTableReinsertBefore),d.css("width",i.sDestroyWidth).removeClass(a.sTable),(o=i.asDestroyStripes.length)&&h.children().each(function(e){t(this).addClass(i.asDestroyStripes[e%o])}));var g=t.inArray(i,Gt.settings);-1!==g&&Gt.settings.splice(g,1)})}),t.each(["column","row","cell"],function(t,e){Kt(e+"s().every()",function(t){var n=this.selector.opts,o=this;return this.iterator(e,function(r,a,s,l,c){t.call(o[e](a,"cell"===e?s:n,"cell"===e?n:i),a,s,l,c)})})}),Kt("i18n()",function(e,n,o){var r=this.context[0],a=D(e)(r.oLanguage);return a===i&&(a=n),o!==i&&t.isPlainObject(a)&&(a=a[o]!==i?a[o]:a._),a.replace("%d",o)}),Gt.version="1.10.16",Gt.settings=[],Gt.models={},Gt.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},Gt.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},Gt.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},Gt.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch(t){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,e){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(e))}catch(t){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:t.extend({},Gt.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},o(Gt.defaults),Gt.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},o(Gt.defaults.column),Gt.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:i,oAjaxData:i,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Bt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Bt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,e=this._iDisplayStart,n=e+t,i=this.aiDisplay.length,o=this.oFeatures,r=o.bPaginate;return o.bServerSide?!1===r||-1===t?e+i:Math.min(e+t,this._iRecordsDisplay):!r||n>i||-1===t?i:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},Gt.ext=qt={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Gt.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Gt.version},t.extend(qt,{afnFiltering:qt.search,aTypes:qt.type.detect,ofnSearch:qt.type.search,oSort:qt.type.order,afnSortData:qt.order,aoFeatures:qt.feature,oApi:qt.internal,oStdClasses:qt.classes,oPagination:qt.pager}),t.extend(Gt.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var je=Gt.ext.pager;t.extend(je,{simple:function(t,e){return["previous","next"]},full:function(t,e){return["first","previous","next","last"]},numbers:function(t,e){return[jt(t,e)]},simple_numbers:function(t,e){return["previous",jt(t,e),"next"]},full_numbers:function(t,e){return["first","previous",jt(t,e),"next","last"]},first_last_numbers:function(t,e){return["first",jt(t,e),"last"]},_numbers:jt,numbers_length:7}),t.extend(!0,Gt.ext.renderer,{pageButton:{_:function(e,o,r,a,s,l){var c,u,d,h=e.oClasses,p=e.oLanguage.oPaginate,f=e.oLanguage.oAria.paginate||{},m=0,g=function(n,i){var o,a,d,v,_=function(t){dt(e,t.data.action,!0)};for(o=0,a=i.length;o<a;o++)if(v=i[o],t.isArray(v)){var w=t("<"+(v.DT_el||"div")+"/>").appendTo(n);g(w,v)}else{switch(c=null,u="",v){case"ellipsis":n.append('<span class="ellipsis">…</span>');break;case"first":c=p.sFirst,u=v+(s>0?"":" "+h.sPageButtonDisabled);break;case"previous":c=p.sPrevious,u=v+(s>0?"":" "+h.sPageButtonDisabled);break;case"next":c=p.sNext,u=v+(s<l-1?"":" "+h.sPageButtonDisabled);break;case"last":c=p.sLast,u=v+(s<l-1?"":" "+h.sPageButtonDisabled);break;default:c=v+1,u=s===v?h.sPageButtonActive:""}null!==c&&(d=t("<a>",{class:h.sPageButton+" "+u,"aria-controls":e.sTableId,"aria-label":f[v],"data-dt-idx":m,tabindex:e.iTabIndex,id:0===r&&"string"==typeof v?e.sTableId+"_"+v:null}).html(c).appendTo(n),Pt(d,{action:v},_),m++)}};try{d=t(o).find(n.activeElement).data("dt-idx")}catch(t){}g(t(o).empty(),a),d!==i&&t(o).find("[data-dt-idx="+d+"]").focus()}}}),t.extend(Gt.ext.type.detect,[function(t,e){var n=e.oLanguage.sDecimal;return oe(t,n)?"num"+n:null},function(t,e){if(t&&!(t instanceof Date)&&!Qt.test(t))return null;var n=Date.parse(t);return null!==n&&!isNaN(n)||ee(t)?"date":null},function(t,e){var n=e.oLanguage.sDecimal;return oe(t,n,!0)?"num-fmt"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return ae(t,n)?"html-num"+n:null},function(t,e){var n=e.oLanguage.sDecimal;return ae(t,n,!0)?"html-num-fmt"+n:null},function(t,e){return ee(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),t.extend(Gt.ext.type.search,{html:function(t){return ee(t)?t:"string"==typeof t?t.replace(Xt," ").replace(Jt,""):""},string:function(t){return ee(t)?t:"string"==typeof t?t.replace(Xt," "):t}});var ze=function(t,e,n,i){return 0===t||t&&"-"!==t?(e&&(t=ie(t,e)),t.replace&&(n&&(t=t.replace(n,"")),i&&(t=t.replace(i,""))),1*t):-1/0};t.extend(qt.type.order,{"date-pre":function(t){return Date.parse(t)||-1/0},"html-pre":function(t){return ee(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return ee(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,e){return t<e?-1:t>e?1:0},"string-desc":function(t,e){return t<e?1:t>e?-1:0}}),zt(""),t.extend(!0,Gt.ext.renderer,{header:{_:function(e,n,i,o){t(e.nTable).on("order.dt.DT",function(t,r,a,s){if(e===r){var l=i.idx;n.removeClass(i.sSortingClass+" "+o.sSortAsc+" "+o.sSortDesc).addClass("asc"==s[l]?o.sSortAsc:"desc"==s[l]?o.sSortDesc:i.sSortingClass)}})},jqueryui:function(e,n,i,o){t("<div/>").addClass(o.sSortJUIWrapper).append(n.contents()).append(t("<span/>").addClass(o.sSortIcon+" "+i.sSortingClassJUI)).appendTo(n),t(e.nTable).on("order.dt.DT",function(t,r,a,s){if(e===r){var l=i.idx;n.removeClass(o.sSortAsc+" "+o.sSortDesc).addClass("asc"==s[l]?o.sSortAsc:"desc"==s[l]?o.sSortDesc:i.sSortingClass),n.find("span."+o.sSortIcon).removeClass(o.sSortJUIAsc+" "+o.sSortJUIDesc+" "+o.sSortJUI+" "+o.sSortJUIAscAllowed+" "+o.sSortJUIDescAllowed).addClass("asc"==s[l]?o.sSortJUIAsc:"desc"==s[l]?o.sSortJUIDesc:i.sSortingClassJUI)}})}}});var We=function(t){return"string"==typeof t?t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):t};return Gt.render={number:function(t,e,n,i,o){return{display:function(r){if("number"!=typeof r&&"string"!=typeof r)return r;var a=r<0?"-":"",s=parseFloat(r);if(isNaN(s))return We(r);s=s.toFixed(n),r=Math.abs(s);var l=parseInt(r,10),c=n?e+(r-l).toFixed(n).substring(2):"";return a+(i||"")+l.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+c+(o||"")}}},text:function(){return{display:We}}},t.extend(Gt.ext.internal,{_fnExternApiFunc:Wt,_fnBuildAjax:W,_fnAjaxUpdate:q,_fnAjaxParameters:U,_fnAjaxUpdateDraw:K,_fnAjaxDataSrc:V,_fnAddColumn:d,_fnColumnOptions:h,_fnAdjustColumnSizing:p,_fnVisibleToColumnIndex:f,_fnColumnIndexToVisible:m,_fnVisbleColumns:g,_fnGetColumns:v,_fnColumnTypes:_,_fnApplyColumnDefs:w,_fnHungarianMap:o,_fnCamelToHungarian:r,_fnLanguageCompat:a,_fnBrowserDetect:c,_fnAddData:b,_fnAddTr:y,_fnNodeToDataIndex:C,_fnNodeToColumnIndex:x,_fnGetCellData:S,_fnSetCellData:T,_fnSplitObjNotation:E,_fnGetObjectDataFn:D,_fnSetObjectDataFn:A,_fnGetDataMaster:N,_fnClearTable:k,_fnDeleteIndex:R,_fnInvalidate:O,_fnGetRowElements:I,_fnCreateTr:L,_fnBuildHead:M,_fnDrawHead:$,_fnDraw:F,_fnReDraw:H,_fnAddOptionsHtml:B,_fnDetectHeader:j,_fnGetUniqueThs:z,_fnFeatureHtmlFilter:G,_fnFilterComplete:Y,_fnFilterCustom:X,_fnFilterColumn:J,_fnFilter:Q,_fnFilterCreateSearch:Z,_fnEscapeRegex:ve,_fnFilterData:tt,_fnFeatureHtmlInfo:it,_fnUpdateInfo:ot,_fnInfoMacros:rt,_fnInitialise:at,_fnInitComplete:st,_fnLengthChange:lt,_fnFeatureHtmlLength:ct,_fnFeatureHtmlPaginate:ut,_fnPageChange:dt,_fnFeatureHtmlProcessing:ht,_fnProcessingDisplay:pt,_fnFeatureHtmlTable:ft,_fnScrollDraw:mt,_fnApplyToChildren:gt,_fnCalculateColumnWidths:vt,_fnThrottle:ye,_fnConvertToWidth:_t,_fnGetWidestNode:wt,_fnGetMaxLenString:bt,_fnStringToCss:yt,_fnSortFlatten:Ct,_fnSort:xt,_fnSortAria:St,_fnSortListener:Tt,_fnSortAttachListener:Et,_fnSortingClasses:Dt,_fnSortData:At,_fnSaveState:Nt,_fnLoadState:kt,_fnSettingsFromNode:Rt,_fnLog:Ot,_fnMap:It,_fnBindAction:Pt,_fnCallbackReg:Mt,_fnCallbackFire:$t,_fnLengthOverflow:Ft,_fnRenderer:Ht,_fnDataSource:Bt,_fnRowAttributes:P,_fnCalculateEnd:function(){}}),t.fn.dataTable=Gt,Gt.$=t,t.fn.dataTableSettings=Gt.settings,t.fn.dataTableExt=Gt.ext,t.fn.DataTable=function(e){return t(this).dataTable(e).api()},t.each(Gt,function(e,n){t.fn.DataTable[e]=n}),t.fn.dataTable})},,,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=(n(18),n(26)),o=(n.n(i),n(27),n(32),n(40),n(46),n(48),n(50)),r=(n.n(o),n(51)),a=(n.n(r),n(52)),s=(n.n(a),n(4)),l=(n.n(s),n(1)),c=n(2),u=n(3);n.d(e,"Modal",function(){return l.a}),n.d(e,"Recipe",function(){return c.a}),n.d(e,"utils",function(){return u})},function(t,e,n){"use strict";(function(t){var e=n(1);t(document).ready(function(n){t(document).on("click",".wprm-modal-button",function(){var n=t(this).data("editor");e.a.open(n)}),t(document).on("click",".wprm-modal-edit-button",function(){var n=t(this).data("editor"),i=t(this).data("recipe");e.a.open(n,{recipe_id:i})})})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){function i(e){t(".wprm-modal").on("change","input, textarea, #wprm-recipe-author-display, .wprm-recipe-tags, #wprm-ingredient-links-type",function(){s.a.changes_made=!0}),t(".wprm-recipe-details-form, .wprm-recipe-instructions-form").on("click",".wprm-recipe-image-add",function(e){a.select_media_image(t(this).parents(".wprm-recipe-image-container"))}),t(".wprm-recipe-details-form, .wprm-recipe-instructions-form").on("click",".wprm-recipe-image-remove",function(e){a.remove_media_image(t(this).parents(".wprm-recipe-image-container"))}),c.a.init(),t("#wprm-recipe-type").select2_wprm({width:"95%"}),t("#wprm-recipe-author-display").select2_wprm({width:"95%"}),t(document).on("change","#wprm-recipe-author-display",function(){var e=t(this).val(),n=t(this).find("option:first").data("default");"custom"==e||"default"==e&&"custom"==n?(t("#wprm-recipe-author-name-container").show(),t("#wprm-recipe-author-link-container").show()):(t("#wprm-recipe-author-name-container").hide(),t("#wprm-recipe-author-link-container").hide())}),t("#wprm-recipe-author-display").change(),t(".wprm-recipe-time").on("keyup change",function(){var e=t(this),n=t("#wprm-recipe-prep-time"),i=n.val(),o=t("#wprm-recipe-cook-time"),r=o.val(),a=t("#wprm-recipe-total-time"),s=a.val();e.is("#wprm-recipe-prep-time")&&(l.a.prep_time_set=!0),e.is("#wprm-recipe-cook-time")&&(l.a.cook_time_set=!0),e.is("#wprm-recipe-total-time")&&(l.a.total_time_set=!0),i&&r&&!l.a.total_time_set&&a.val(parseInt(i)+parseInt(r)),s&&i&&!l.a.cook_time_set&&o.val(parseInt(s)-parseInt(i)),s&&r&&!l.a.prep_time_set&&n.val(parseInt(s)-parseInt(r))}),t(".wprm-recipe-tags").select2_wprm({width:"95%",tags:!0}),t(".wprm-recipe-ingredients-add").on("click",function(){l.a.addIngredient()}),t(".wprm-recipe-ingredients-add-group").on("click",function(){l.a.addIngredientGroup()}),t(".wprm-recipe-instructions-add").on("click",function(){l.a.addInstruction()}),t(".wprm-recipe-instructions-add-group").on("click",function(){l.a.addInstructionGroup()}),t(".wprm-recipe-ingredients").on("keydown",".wprm-recipe-ingredient-notes, .wprm-recipe-ingredient-group-name",function(e){var n=e.keyCode||e.which;t(this),!e.shiftKey&&9==n&&t(this).parents("tr").is("tr:last-child")&&(e.preventDefault(),l.a.addIngredient())}),t(".wprm-recipe-instructions").on("keydown",".wprm-recipe-instruction-text, .wprm-recipe-instruction-group-name",function(e){var n=e.keyCode||e.which;t(this),!e.shiftKey&&9==n&&t(this).parents("tr").is("tr:last-child")&&(e.preventDefault(),l.a.addInstruction())}),t(".wprm-recipe-ingredients-instructions-form").on("click",".wprm-recipe-ingredients-instructions-delete",function(){t(this).parents("tr").remove()}),t(".wprm-recipe-ingredients, .wprm-recipe-instructions").sortable({opacity:.6,revert:!0,cursor:"move",handle:".wprm-recipe-ingredients-instructions-sort"}),t(".wprm-button-action-save").on("click",function(){s.a.actions.insert_update_recipe(t(this))})}e.a=i;var o=n(7),r=(n.n(o),n(8)),a=(n.n(r),n(3)),s=n(1),l=n(2),c=n(9)}).call(e,n(0))},function(t,e,n){var i,o;!function(r,a){i=r,void 0!==(o="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=o)}(function(){function t(t,e){var n=typeof t[e];return n==b||!(n!=w||!t[e])||"unknown"==n}function e(t,e){return!(typeof t[e]!=w||!t[e])}function n(t,e){return typeof t[e]!=y}function i(t){return function(e,n){for(var i=n.length;i--;)if(!t(e,n[i]))return!1;return!0}}function o(t){return t&&E(t,T)&&A(t,S)}function r(t){return e(t,"body")?t.body:t.getElementsByTagName("body")[0]}function a(e){typeof console!=y&&t(console,"log")&&console.log(e)}function s(t,e){R&&e?alert(t):a(t)}function l(t){I.initialized=!0,I.supported=!1,s("Rangy is not supported in this environment. Reason: "+t,I.config.alertOnFail)}function c(t){s("Rangy warning: "+t,I.config.alertOnWarn)}function u(t){return t.message||t.description||String(t)}function d(){if(R&&!I.initialized){var e,n=!1,i=!1;t(document,"createRange")&&(e=document.createRange(),E(e,x)&&A(e,C)&&(n=!0));var s=r(document);if(!s||"body"!=s.nodeName.toLowerCase())return void l("No body element found");if(s&&t(s,"createTextRange")&&(e=s.createTextRange(),o(e)&&(i=!0)),!n&&!i)return void l("Neither Range nor TextRange are available");I.initialized=!0,I.features={implementsDomRange:n,implementsTextRange:i};var c,d;for(var h in k)(c=k[h])instanceof m&&c.init(c,I);for(var p=0,f=M.length;p<f;++p)try{M[p](I)}catch(t){d="Rangy init listener threw an exception. Continuing. Detail: "+u(t),a(d)}}}function h(t,e,n){n&&(t+=" in module "+n.name),I.warn("DEPRECATED: "+t+" is deprecated. Please use "+e+" instead.")}function p(t,e,n,i){t[e]=function(){return h(e,n,i),t[n].apply(t,O.toArray(arguments))}}function f(t){t=t||window,d();for(var e=0,n=$.length;e<n;++e)$[e](t)}function m(t,e,n){this.name=t,this.dependencies=e,this.initialized=!1,this.supported=!1,this.initializer=n}function g(t,e,n){var i=new m(t,e,function(e){if(!e.initialized){e.initialized=!0;try{n(I,e),e.supported=!0}catch(e){var i="Module '"+t+"' failed to load: "+u(e);a(i),e.stack&&a(e.stack)}}});return k[t]=i,i}function v(){}function _(){}var w="object",b="function",y="undefined",C=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],S=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],T=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],E=i(t),D=i(e),A=i(n),N=[].forEach?function(t,e){t.forEach(e)}:function(t,e){for(var n=0,i=t.length;n<i;++n)e(t[n],n)},k={},R=typeof window!=y&&typeof document!=y,O={isHostMethod:t,isHostObject:e,isHostProperty:n,areHostMethods:E,areHostObjects:D,areHostProperties:A,isTextRange:o,getBody:r,forEach:N},I={version:"1.3.0",initialized:!1,isBrowser:R,supported:!0,util:O,features:{},modules:k,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==y||rangyAutoInitialize}};I.fail=l,I.warn=c;var L;!{}.hasOwnProperty?l("hasOwnProperty not supported"):(O.extend=L=function(t,e,n){var i,o;for(var r in e)e.hasOwnProperty(r)&&(i=t[r],o=e[r],n&&null!==i&&"object"==typeof i&&null!==o&&"object"==typeof o&&L(i,o,!0),t[r]=o);return e.hasOwnProperty("toString")&&(t.toString=e.toString),t},O.createOptions=function(t,e){var n={};return L(n,e),t&&L(n,t),n}),R||l("Rangy can only run in a browser"),function(){var t;if(R){var e=document.createElement("div");e.appendChild(document.createElement("span"));var n=[].slice;try{1==n.call(e.childNodes,0)[0].nodeType&&(t=function(t){return n.call(t,0)})}catch(t){}}t||(t=function(t){for(var e=[],n=0,i=t.length;n<i;++n)e[n]=t[n];return e}),O.toArray=t}();var P;R&&(t(document,"addEventListener")?P=function(t,e,n){t.addEventListener(e,n,!1)}:t(document,"attachEvent")?P=function(t,e,n){t.attachEvent("on"+e,n)}:l("Document does not have required addEventListener or attachEvent method"),O.addListener=P);var M=[];O.deprecationNotice=h,O.createAliasForDeprecatedMethod=p,I.init=d,I.addInitListener=function(t){I.initialized?t(I):M.push(t)};var $=[];I.addShimListener=function(t){$.push(t)},R&&(I.shim=I.createMissingNativeApi=f,p(I,"createMissingNativeApi","shim")),m.prototype={init:function(){for(var t,e,n=this.dependencies||[],i=0,o=n.length;i<o;++i){if(e=n[i],!((t=k[e])&&t instanceof m))throw new Error("required module '"+e+"' not found");if(t.init(),!t.supported)throw new Error("required module '"+e+"' not supported")}this.initializer(this)},fail:function(t){throw this.initialized=!0,this.supported=!1,new Error(t)},warn:function(t){I.warn("Module "+this.name+": "+t)},deprecationNotice:function(t,e){I.warn("DEPRECATED: "+t+" in module "+this.name+" is deprecated. Please use "+e+" instead")},createError:function(t){return new Error("Error in Rangy "+this.name+" module: "+t)}},I.createModule=function(t){var e,n;2==arguments.length?(e=arguments[1],n=[]):(e=arguments[2],n=arguments[1]);var i=g(t,n,e);I.initialized&&I.supported&&i.init()},I.createCoreModule=function(t,e,n){g(t,e,n)},I.RangePrototype=v,I.rangePrototype=new v,I.selectionPrototype=new _,I.createCoreModule("DomUtil",[],function(t,e){function n(t){var e;return typeof t.namespaceURI==R||null===(e=t.namespaceURI)||"http://www.w3.org/1999/xhtml"==e}function i(t){var e=t.parentNode;return 1==e.nodeType?e:null}function o(t){for(var e=0;t=t.previousSibling;)++e;return e}function r(t){switch(t.nodeType){case 7:case 10:return 0;case 3:case 8:return t.length;default:return t.childNodes.length}}function a(t,e){var n,i=[];for(n=t;n;n=n.parentNode)i.push(n);for(n=e;n;n=n.parentNode)if(M(i,n))return n;return null}function s(t,e,n){for(var i=n?e:e.parentNode;i;){if(i===t)return!0;i=i.parentNode}return!1}function l(t,e){return s(t,e,!0)}function c(t,e,n){for(var i,o=n?t:t.parentNode;o;){if((i=o.parentNode)===e)return o;o=i}return null}function u(t){var e=t.nodeType;return 3==e||4==e||8==e}function d(t){if(!t)return!1;var e=t.nodeType;return 3==e||8==e}function h(t,e){var n=e.nextSibling,i=e.parentNode;return n?i.insertBefore(t,n):i.appendChild(t),t}function p(t,e,n){var i=t.cloneNode(!1);if(i.deleteData(0,e),t.deleteData(e,t.length-e),h(i,t),n)for(var r,a=0;r=n[a++];)r.node==t&&r.offset>e?(r.node=i,r.offset-=e):r.node==t.parentNode&&r.offset>o(t)&&++r.offset;return i}function f(t){if(9==t.nodeType)return t;if(typeof t.ownerDocument!=R)return t.ownerDocument;if(typeof t.document!=R)return t.document;if(t.parentNode)return f(t.parentNode);throw e.createError("getDocument: no document found for node")}function m(t){var n=f(t);if(typeof n.defaultView!=R)return n.defaultView;if(typeof n.parentWindow!=R)return n.parentWindow;throw e.createError("Cannot get a window object for node")}function g(t){if(typeof t.contentDocument!=R)return t.contentDocument;if(typeof t.contentWindow!=R)return t.contentWindow.document;throw e.createError("getIframeDocument: No Document object found for iframe element")}function v(t){if(typeof t.contentWindow!=R)return t.contentWindow;if(typeof t.contentDocument!=R)return t.contentDocument.defaultView;throw e.createError("getIframeWindow: No Window object found for iframe element")}function _(t){return t&&O.isHostMethod(t,"setTimeout")&&O.isHostObject(t,"document")}function w(t,e,n){var i;if(t?O.isHostProperty(t,"nodeType")?i=1==t.nodeType&&"iframe"==t.tagName.toLowerCase()?g(t):f(t):_(t)&&(i=t.document):i=document,!i)throw e.createError(n+"(): Parameter must be a Window object or DOM node");return i}function b(t){for(var e;e=t.parentNode;)t=e;return t}function y(t,n,i,r){var s,l,u,d,h;if(t==i)return n===r?0:n<r?-1:1;if(s=c(i,t,!0))return n<=o(s)?-1:1;if(s=c(t,i,!0))return o(s)<r?-1:1;if(!(l=a(t,i)))throw new Error("comparePoints error: nodes have no common ancestor");if(u=t===l?l:c(t,l,!0),d=i===l?l:c(i,l,!0),u===d)throw e.createError("comparePoints got to case 4 and childA and childB are the same!");for(h=l.firstChild;h;){if(h===u)return-1;if(h===d)return 1;h=h.nextSibling}}function C(t){try{return t.parentNode,!1}catch(t){return!0}}function x(t){if(!t)return"[No node]";if($&&C(t))return"[Broken node]";if(u(t))return'"'+t.data+'"';if(1==t.nodeType){var e=t.id?' id="'+t.id+'"':"";return"<"+t.nodeName+e+">[index:"+o(t)+",length:"+t.childNodes.length+"]["+(t.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return t.nodeName}function S(t){for(var e,n=f(t).createDocumentFragment();e=t.firstChild;)n.appendChild(e);return n}function T(t,e,n){var i=I(t),o=t.createElement("div");o.contentEditable=""+!!n,e&&(o.innerHTML=e);var r=i.firstChild;return r?i.insertBefore(o,r):i.appendChild(o),o}function E(t){return t.parentNode.removeChild(t)}function D(t){this.root=t,this._next=t}function A(t){return new D(t)}function N(t,e){this.node=t,this.offset=e}function k(t){this.code=this[t],this.codeName=t,this.message="DOMException: "+this.codeName}var R="undefined",O=t.util,I=O.getBody;O.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||e.fail("document missing a Node creation method"),O.isHostMethod(document,"getElementsByTagName")||e.fail("document missing getElementsByTagName method");var L=document.createElement("div");O.areHostMethods(L,["insertBefore","appendChild","cloneNode"]||!O.areHostObjects(L,["previousSibling","nextSibling","childNodes","parentNode"]))||e.fail("Incomplete Element implementation"),O.isHostProperty(L,"innerHTML")||e.fail("Element is missing innerHTML property");var P=document.createTextNode("test");O.areHostMethods(P,["splitText","deleteData","insertData","appendData","cloneNode"]||!O.areHostObjects(L,["previousSibling","nextSibling","childNodes","parentNode"])||!O.areHostProperties(P,["data"]))||e.fail("Incomplete Text Node implementation");var M=function(t,e){for(var n=t.length;n--;)if(t[n]===e)return!0;return!1},$=!1;!function(){var e=document.createElement("b");e.innerHTML="1";var n=e.firstChild;e.innerHTML="<br />",$=C(n),t.features.crashyTextNodes=$}();var F;typeof window.getComputedStyle!=R?F=function(t,e){return m(t).getComputedStyle(t,null)[e]}:typeof document.documentElement.currentStyle!=R?F=function(t,e){return t.currentStyle?t.currentStyle[e]:""}:e.fail("No means of obtaining computed style properties found"),D.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var t,e,n=this._current=this._next;if(this._current)if(t=n.firstChild)this._next=t;else{for(e=null;n!==this.root&&!(e=n.nextSibling);)n=n.parentNode;this._next=e}return this._current},detach:function(){this._current=this._next=this.root=null}},N.prototype={equals:function(t){return!!t&&this.node===t.node&&this.offset==t.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},k.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},k.prototype.toString=function(){return this.message},t.dom={arrayContains:M,isHtmlNamespace:n,parentElement:i,getNodeIndex:o,getNodeLength:r,getCommonAncestor:a,isAncestorOf:s,isOrIsAncestorOf:l,getClosestAncestorIn:c,isCharacterDataNode:u,isTextOrCommentNode:d,insertAfter:h,splitDataNode:p,getDocument:f,getWindow:m,getIframeWindow:v,getIframeDocument:g,getBody:I,isWindow:_,getContentDocument:w,getRootContainer:b,comparePoints:y,isBrokenNode:C,inspectNode:x,getComputedStyleProperty:F,createTestElement:T,removeNode:E,fragmentFromNodeChildren:S,createIterator:A,DomPosition:N},t.DOMException=k}),I.createCoreModule("DomRange",["DomUtil"],function(t,e){function n(t,e){return 3!=t.nodeType&&(j(t,e.startContainer)||j(t,e.endContainer))}function i(t){return t.document||z(t.startContainer)}function o(t){return G(t.startContainer)}function r(t){return new $(t.parentNode,B(t))}function a(t){return new $(t.parentNode,B(t)+1)}function s(t,e,n){var i=11==t.nodeType?t.firstChild:t;return H(e)?n==e.length?P.insertAfter(t,e):e.parentNode.insertBefore(t,0==n?e:q(e,n)):n>=e.childNodes.length?e.appendChild(t):e.insertBefore(t,e.childNodes[n]),i}function l(t,e,n){if(T(t),T(e),i(e)!=i(t))throw new F("WRONG_DOCUMENT_ERR");var o=W(t.startContainer,t.startOffset,e.endContainer,e.endOffset),r=W(t.endContainer,t.endOffset,e.startContainer,e.startOffset);return n?o<=0&&r>=0:o<0&&r>0}function c(t){for(var e,n,o,r=i(t.range).createDocumentFragment();n=t.next();){if(e=t.isPartiallySelectedSubtree(),n=n.cloneNode(!e),e&&(o=t.getSubtreeIterator(),n.appendChild(c(o)),o.detach()),10==n.nodeType)throw new F("HIERARCHY_REQUEST_ERR");r.appendChild(n)}return r}function u(t,e,n){var i,o;n=n||{stop:!1};for(var r,a;r=t.next();)if(t.isPartiallySelectedSubtree()){if(!1===e(r))return void(n.stop=!0);if(a=t.getSubtreeIterator(),u(a,e,n),a.detach(),n.stop)return}else for(i=P.createIterator(r);o=i.next();)if(!1===e(o))return void(n.stop=!0)}function d(t){for(var e;t.next();)t.isPartiallySelectedSubtree()?(e=t.getSubtreeIterator(),d(e),e.detach()):t.remove()}function h(t){for(var e,n,o=i(t.range).createDocumentFragment();e=t.next();){if(t.isPartiallySelectedSubtree()?(e=e.cloneNode(!1),n=t.getSubtreeIterator(),e.appendChild(h(n)),n.detach()):t.remove(),10==e.nodeType)throw new F("HIERARCHY_REQUEST_ERR");o.appendChild(e)}return o}function p(t,e,n){var i,o=!(!e||!e.length),r=!!n;o&&(i=new RegExp("^("+e.join("|")+")$"));var a=[];return u(new m(t,!1),function(e){if((!o||i.test(e.nodeType))&&(!r||n(e))){var s=t.startContainer;if(e!=s||!H(s)||t.startOffset!=s.length){var l=t.endContainer;e==l&&H(l)&&0==t.endOffset||a.push(e)}}}),a}function f(t){return"["+(void 0===t.getName?"Range":t.getName())+"("+P.inspectNode(t.startContainer)+":"+t.startOffset+", "+P.inspectNode(t.endContainer)+":"+t.endOffset+")]"}function m(t,e){if(this.range=t,this.clonePartiallySelectedTextNodes=e,!t.collapsed){this.sc=t.startContainer,this.so=t.startOffset,this.ec=t.endContainer,this.eo=t.endOffset;var n=t.commonAncestorContainer;this.sc===this.ec&&H(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==n||H(this.sc)?U(this.sc,n,!0):this.sc.childNodes[this.so],this._last=this.ec!==n||H(this.ec)?U(this.ec,n,!0):this.ec.childNodes[this.eo-1])}}function g(t){return function(e,n){for(var i,o=n?e:e.parentNode;o;){if(i=o.nodeType,V(t,i))return o;o=o.parentNode}return null}}function v(t,e){if(ot(t,e))throw new F("INVALID_NODE_TYPE_ERR")}function _(t,e){if(!V(e,t.nodeType))throw new F("INVALID_NODE_TYPE_ERR")}function w(t,e){if(e<0||e>(H(t)?t.length:t.childNodes.length))throw new F("INDEX_SIZE_ERR")}function b(t,e){if(nt(t,!0)!==nt(e,!0))throw new F("WRONG_DOCUMENT_ERR")}function y(t){if(it(t,!0))throw new F("NO_MODIFICATION_ALLOWED_ERR")}function C(t,e){if(!t)throw new F(e)}function x(t,e){return e<=(H(t)?t.length:t.childNodes.length)}function S(t){return!!t.startContainer&&!!t.endContainer&&!(Y&&(P.isBrokenNode(t.startContainer)||P.isBrokenNode(t.endContainer)))&&G(t.startContainer)==G(t.endContainer)&&x(t.startContainer,t.startOffset)&&x(t.endContainer,t.endOffset)}function T(t){if(!S(t))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+t.inspect()+")")}function E(t,e){T(t);var n=t.startContainer,i=t.startOffset,o=t.endContainer,r=t.endOffset,a=n===o;H(o)&&r>0&&r<o.length&&q(o,r,e),H(n)&&i>0&&i<n.length&&(n=q(n,i,e),a?(r-=i,o=n):o==n.parentNode&&r>=B(n)&&r++,i=0),t.setStartAndEnd(n,i,o,r)}function D(t){T(t);var e=t.commonAncestorContainer.parentNode.cloneNode(!1);return e.appendChild(t.cloneContents()),e.innerHTML}function A(t){t.START_TO_START=ct,t.START_TO_END=ut,t.END_TO_END=dt,t.END_TO_START=ht,t.NODE_BEFORE=pt,t.NODE_AFTER=ft,t.NODE_BEFORE_AND_AFTER=mt,t.NODE_INSIDE=gt}function N(t){A(t),A(t.prototype)}function k(t,e){return function(){T(this);var n,i,o=this.startContainer,r=this.startOffset,s=this.commonAncestorContainer,l=new m(this,!0);o!==s&&(n=U(o,s,!0),i=a(n),o=i.node,r=i.offset),u(l,y),l.reset();var c=t(l);return l.detach(),e(this,o,r,o,r),c}}function R(e,i){function o(t,e){return function(n){_(n,J),_(G(n),Q);var i=(t?r:a)(n);(e?s:l)(this,i.node,i.offset)}}function s(t,e,n){var o=t.endContainer,r=t.endOffset;e===t.startContainer&&n===t.startOffset||(G(e)==G(o)&&1!=W(e,n,o,r)||(o=e,r=n),i(t,e,n,o,r))}function l(t,e,n){var o=t.startContainer,r=t.startOffset;e===t.endContainer&&n===t.endOffset||(G(e)==G(o)&&-1!=W(e,n,o,r)||(o=e,r=n),i(t,o,r,e,n))}var c=function(){};c.prototype=t.rangePrototype,e.prototype=new c,M.extend(e.prototype,{setStart:function(t,e){v(t,!0),w(t,e),s(this,t,e)},setEnd:function(t,e){v(t,!0),w(t,e),l(this,t,e)},setStartAndEnd:function(){var t=arguments,e=t[0],n=t[1],o=e,r=n;switch(t.length){case 3:r=t[2];break;case 4:o=t[2],r=t[3]}i(this,e,n,o,r)},setBoundary:function(t,e,n){this["set"+(n?"Start":"End")](t,e)},setStartBefore:o(!0,!0),setStartAfter:o(!1,!0),setEndBefore:o(!0,!1),setEndAfter:o(!1,!1),collapse:function(t){T(this),t?i(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):i(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(t){v(t,!0),i(this,t,0,t,K(t))},selectNode:function(t){v(t,!1),_(t,J);var e=r(t),n=a(t);i(this,e.node,e.offset,n.node,n.offset)},extractContents:k(h,i),deleteContents:k(d,i),canSurroundContents:function(){T(this),y(this.startContainer),y(this.endContainer);var t=new m(this,!0),e=t._first&&n(t._first,this)||t._last&&n(t._last,this);return t.detach(),!e},splitBoundaries:function(){E(this)},splitBoundariesPreservingPositions:function(t){E(this,t)},normalizeBoundaries:function(){T(this);var t,e=this.startContainer,n=this.startOffset,o=this.endContainer,r=this.endOffset,a=function(t){var e=t.nextSibling;e&&e.nodeType==t.nodeType&&(o=t,r=t.length,t.appendData(e.data),X(e))},s=function(t){var i=t.previousSibling;if(i&&i.nodeType==t.nodeType){e=t;var a=t.length;if(n=i.length,t.insertData(0,i.data),X(i),e==o)r+=n,o=e;else if(o==t.parentNode){var s=B(t);r==s?(o=t,r=a):r>s&&r--}}},l=!0;if(H(o))r==o.length?a(o):0==r&&(t=o.previousSibling)&&t.nodeType==o.nodeType&&(r=t.length,e==o&&(l=!1),t.appendData(o.data),X(o),o=t);else{if(r>0){var c=o.childNodes[r-1];c&&H(c)&&a(c)}l=!this.collapsed}if(l){if(H(e))0==n?s(e):n==e.length&&(t=e.nextSibling)&&t.nodeType==e.nodeType&&(o==t&&(o=e,r+=e.length),e.appendData(t.data),X(t));else if(n<e.childNodes.length){var u=e.childNodes[n];u&&H(u)&&s(u)}}else e=o,n=r;i(this,e,n,o,r)},collapseToPoint:function(t,e){v(t,!0),w(t,e),this.setStartAndEnd(t,e)}}),N(e)}function O(t){t.collapsed=t.startContainer===t.endContainer&&t.startOffset===t.endOffset,t.commonAncestorContainer=t.collapsed?t.startContainer:P.getCommonAncestor(t.startContainer,t.endContainer)}function I(t,e,n,i,o){t.startContainer=e,t.startOffset=n,t.endContainer=i,t.endOffset=o,t.document=P.getDocument(e),O(t)}function L(t){this.startContainer=t,this.startOffset=0,this.endContainer=t,this.endOffset=0,this.document=t,O(this)}var P=t.dom,M=t.util,$=P.DomPosition,F=t.DOMException,H=P.isCharacterDataNode,B=P.getNodeIndex,j=P.isOrIsAncestorOf,z=P.getDocument,W=P.comparePoints,q=P.splitDataNode,U=P.getClosestAncestorIn,K=P.getNodeLength,V=P.arrayContains,G=P.getRootContainer,Y=t.features.crashyTextNodes,X=P.removeNode;m.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var t=this._current=this._next;return t&&(this._next=t!==this._last?t.nextSibling:null,H(t)&&this.clonePartiallySelectedTextNodes&&(t===this.ec&&(t=t.cloneNode(!0)).deleteData(this.eo,t.length-this.eo),this._current===this.sc&&(t=t.cloneNode(!0)).deleteData(0,this.so))),t},remove:function(){var t,e,n=this._current;!H(n)||n!==this.sc&&n!==this.ec?n.parentNode&&X(n):(t=n===this.sc?this.so:0,e=n===this.ec?this.eo:n.length,t!=e&&n.deleteData(t,e-t))},isPartiallySelectedSubtree:function(){return n(this._current,this.range)},getSubtreeIterator:function(){var t;if(this.isSingleCharacterDataNode)t=this.range.cloneRange(),t.collapse(!1);else{t=new L(i(this.range));var e=this._current,n=e,o=0,r=e,a=K(e);j(e,this.sc)&&(n=this.sc,o=this.so),j(e,this.ec)&&(r=this.ec,a=this.eo),I(t,n,o,r,a)}return new m(t,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var J=[1,3,4,5,7,8,10],Q=[2,9,11],Z=[5,6,10,12],tt=[1,3,4,5,7,8,10,11],et=[1,3,4,5,7,8],nt=g([9,11]),it=g(Z),ot=g([6,10,12]),rt=document.createElement("style"),at=!1;try{rt.innerHTML="<b>x</b>",at=3==rt.firstChild.nodeType}catch(t){}t.features.htmlParsingConforms=at;var st=at?function(t){var e=this.startContainer,n=z(e);if(!e)throw new F("INVALID_STATE_ERR");var i=null;return 1==e.nodeType?i=e:H(e)&&(i=P.parentElement(e)),i=null===i||"HTML"==i.nodeName&&P.isHtmlNamespace(z(i).documentElement)&&P.isHtmlNamespace(i)?n.createElement("body"):i.cloneNode(!1),i.innerHTML=t,P.fragmentFromNodeChildren(i)}:function(t){var e=i(this),n=e.createElement("body");return n.innerHTML=t,P.fragmentFromNodeChildren(n)},lt=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ct=0,ut=1,dt=2,ht=3,pt=0,ft=1,mt=2,gt=3;M.extend(t.rangePrototype,{compareBoundaryPoints:function(t,e){T(this),b(this.startContainer,e.startContainer);var n,i,o,r,a=t==ht||t==ct?"start":"end",s=t==ut||t==ct?"start":"end";return n=this[a+"Container"],i=this[a+"Offset"],o=e[s+"Container"],r=e[s+"Offset"],W(n,i,o,r)},insertNode:function(t){if(T(this),_(t,tt),y(this.startContainer),j(t,this.startContainer))throw new F("HIERARCHY_REQUEST_ERR");var e=s(t,this.startContainer,this.startOffset);this.setStartBefore(e)},cloneContents:function(){T(this);var t,e;if(this.collapsed)return i(this).createDocumentFragment();if(this.startContainer===this.endContainer&&H(this.startContainer))return t=this.startContainer.cloneNode(!0),t.data=t.data.slice(this.startOffset,this.endOffset),e=i(this).createDocumentFragment(),e.appendChild(t),e;var n=new m(this,!0);return t=c(n),n.detach(),t},canSurroundContents:function(){T(this),y(this.startContainer),y(this.endContainer);var t=new m(this,!0),e=t._first&&n(t._first,this)||t._last&&n(t._last,this);return t.detach(),!e},surroundContents:function(t){if(_(t,et),!this.canSurroundContents())throw new F("INVALID_STATE_ERR");var e=this.extractContents();if(t.hasChildNodes())for(;t.lastChild;)t.removeChild(t.lastChild);s(t,this.startContainer,this.startOffset),t.appendChild(e),this.selectNode(t)},cloneRange:function(){T(this);for(var t,e=new L(i(this)),n=lt.length;n--;)t=lt[n],e[t]=this[t];return e},toString:function(){T(this);var t=this.startContainer;if(t===this.endContainer&&H(t))return 3==t.nodeType||4==t.nodeType?t.data.slice(this.startOffset,this.endOffset):"";var e=[],n=new m(this,!0);return u(n,function(t){3!=t.nodeType&&4!=t.nodeType||e.push(t.data)}),n.detach(),e.join("")},compareNode:function(t){T(this);var e=t.parentNode,n=B(t);if(!e)throw new F("NOT_FOUND_ERR");var i=this.comparePoint(e,n),o=this.comparePoint(e,n+1);return i<0?o>0?mt:pt:o>0?ft:gt},comparePoint:function(t,e){return T(this),C(t,"HIERARCHY_REQUEST_ERR"),b(t,this.startContainer),W(t,e,this.startContainer,this.startOffset)<0?-1:W(t,e,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:st,toHtml:function(){return D(this)},intersectsNode:function(t,e){if(T(this),G(t)!=o(this))return!1;var n=t.parentNode,i=B(t);if(!n)return!0;var r=W(n,i,this.endContainer,this.endOffset),a=W(n,i+1,this.startContainer,this.startOffset);return e?r<=0&&a>=0:r<0&&a>0},isPointInRange:function(t,e){return T(this),C(t,"HIERARCHY_REQUEST_ERR"),b(t,this.startContainer),W(t,e,this.startContainer,this.startOffset)>=0&&W(t,e,this.endContainer,this.endOffset)<=0},intersectsRange:function(t){return l(this,t,!1)},intersectsOrTouchesRange:function(t){return l(this,t,!0)},intersection:function(t){if(this.intersectsRange(t)){var e=W(this.startContainer,this.startOffset,t.startContainer,t.startOffset),n=W(this.endContainer,this.endOffset,t.endContainer,t.endOffset),i=this.cloneRange();return-1==e&&i.setStart(t.startContainer,t.startOffset),1==n&&i.setEnd(t.endContainer,t.endOffset),i}return null},union:function(t){if(this.intersectsOrTouchesRange(t)){var e=this.cloneRange();return-1==W(t.startContainer,t.startOffset,this.startContainer,this.startOffset)&&e.setStart(t.startContainer,t.startOffset),1==W(t.endContainer,t.endOffset,this.endContainer,this.endOffset)&&e.setEnd(t.endContainer,t.endOffset),e}throw new F("Ranges do not intersect")},containsNode:function(t,e){return e?this.intersectsNode(t,!1):this.compareNode(t)==gt},containsNodeContents:function(t){return this.comparePoint(t,0)>=0&&this.comparePoint(t,K(t))<=0},containsRange:function(t){var e=this.intersection(t);return null!==e&&t.equals(e)},containsNodeText:function(t){var e=this.cloneRange();e.selectNode(t);var n=e.getNodes([3]);if(n.length>0){e.setStart(n[0],0);var i=n.pop();return e.setEnd(i,i.length),this.containsRange(e)}return this.containsNodeContents(t)},getNodes:function(t,e){return T(this),p(this,t,e)},getDocument:function(){return i(this)},collapseBefore:function(t){this.setEndBefore(t),this.collapse(!1)},collapseAfter:function(t){this.setStartAfter(t),this.collapse(!0)},getBookmark:function(e){var n=i(this),o=t.createRange(n);e=e||P.getBody(n),o.selectNodeContents(e);var r=this.intersection(o),a=0,s=0;return r&&(o.setEnd(r.startContainer,r.startOffset),a=o.toString().length,s=a+r.toString().length),{start:a,end:s,containerNode:e}},moveToBookmark:function(t){var e=t.containerNode,n=0;this.setStart(e,0),this.collapse(!0);for(var i,o,r,a,s=[e],l=!1,c=!1;!c&&(i=s.pop());)if(3==i.nodeType)o=n+i.length,!l&&t.start>=n&&t.start<=o&&(this.setStart(i,t.start-n),l=!0),l&&t.end>=n&&t.end<=o&&(this.setEnd(i,t.end-n),c=!0),n=o;else for(a=i.childNodes,r=a.length;r--;)s.push(a[r])},getName:function(){return"DomRange"},equals:function(t){return L.rangesEqual(this,t)},isValid:function(){return S(this)},inspect:function(){return f(this)},detach:function(){}}),R(L,I),M.extend(L,{rangeProperties:lt,RangeIterator:m,copyComparisonConstants:N,createPrototypeRange:R,inspect:f,toHtml:D,getRangeDocument:i,rangesEqual:function(t,e){return t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset}}),t.DomRange=L}),I.createCoreModule("WrappedRange",["DomRange"],function(t,e){var n,i,o=t.dom,r=t.util,a=o.DomPosition,s=t.DomRange,l=o.getBody,c=o.getContentDocument,u=o.isCharacterDataNode;if(t.features.implementsDomRange&&function(){function i(t){for(var e,n=h.length;n--;)e=h[n],t[e]=t.nativeRange[e];t.collapsed=t.startContainer===t.endContainer&&t.startOffset===t.endOffset}function a(t,e,n,i,o){var r=t.startContainer!==e||t.startOffset!=n,a=t.endContainer!==i||t.endOffset!=o,s=!t.equals(t.nativeRange);(r||a||s)&&(t.setEnd(i,o),t.setStart(e,n))}var u,d,h=s.rangeProperties;n=function(t){if(!t)throw e.createError("WrappedRange: Range must be specified");this.nativeRange=t,i(this)},s.createPrototypeRange(n,a),u=n.prototype,u.selectNode=function(t){this.nativeRange.selectNode(t),i(this)},u.cloneContents=function(){return this.nativeRange.cloneContents()},u.surroundContents=function(t){this.nativeRange.surroundContents(t),i(this)},u.collapse=function(t){this.nativeRange.collapse(t),i(this)},u.cloneRange=function(){return new n(this.nativeRange.cloneRange())},u.refresh=function(){i(this)},u.toString=function(){return this.nativeRange.toString()};var p=document.createTextNode("test");l(document).appendChild(p);var f=document.createRange();f.setStart(p,0),f.setEnd(p,0);try{f.setStart(p,1),u.setStart=function(t,e){this.nativeRange.setStart(t,e),i(this)},u.setEnd=function(t,e){this.nativeRange.setEnd(t,e),i(this)},d=function(t){return function(e){this.nativeRange[t](e),i(this)}}}catch(t){u.setStart=function(t,e){try{this.nativeRange.setStart(t,e)}catch(n){this.nativeRange.setEnd(t,e),this.nativeRange.setStart(t,e)}i(this)},u.setEnd=function(t,e){try{this.nativeRange.setEnd(t,e)}catch(n){this.nativeRange.setStart(t,e),this.nativeRange.setEnd(t,e)}i(this)},d=function(t,e){return function(n){try{this.nativeRange[t](n)}catch(i){this.nativeRange[e](n),this.nativeRange[t](n)}i(this)}}}u.setStartBefore=d("setStartBefore","setEndBefore"),u.setStartAfter=d("setStartAfter","setEndAfter"),u.setEndBefore=d("setEndBefore","setStartBefore"),u.setEndAfter=d("setEndAfter","setStartAfter"),u.selectNodeContents=function(t){this.setStartAndEnd(t,0,o.getNodeLength(t))},f.selectNodeContents(p),f.setEnd(p,3);var m=document.createRange();m.selectNodeContents(p),m.setEnd(p,4),m.setStart(p,2),-1==f.compareBoundaryPoints(f.START_TO_END,m)&&1==f.compareBoundaryPoints(f.END_TO_START,m)?u.compareBoundaryPoints=function(t,e){return e=e.nativeRange||e,t==e.START_TO_END?t=e.END_TO_START:t==e.END_TO_START&&(t=e.START_TO_END),this.nativeRange.compareBoundaryPoints(t,e)}:u.compareBoundaryPoints=function(t,e){return this.nativeRange.compareBoundaryPoints(t,e.nativeRange||e)};var g=document.createElement("div");g.innerHTML="123";var v=g.firstChild,_=l(document);_.appendChild(g),f.setStart(v,1),f.setEnd(v,2),f.deleteContents(),"13"==v.data&&(u.deleteContents=function(){this.nativeRange.deleteContents(),i(this)},u.extractContents=function(){var t=this.nativeRange.extractContents();return i(this),t}),_.removeChild(g),_=null,r.isHostMethod(f,"createContextualFragment")&&(u.createContextualFragment=function(t){return this.nativeRange.createContextualFragment(t)}),l(document).removeChild(p),u.getName=function(){return"WrappedRange"},t.WrappedRange=n,t.createNativeRange=function(t){return t=c(t,e,"createNativeRange"),t.createRange()}}(),t.features.implementsTextRange){var d=function(t){var e=t.parentElement(),n=t.duplicate();n.collapse(!0);var i=n.parentElement();n=t.duplicate(),n.collapse(!1);var r=n.parentElement(),a=i==r?i:o.getCommonAncestor(i,r);return a==e?a:o.getCommonAncestor(e,a)},h=function(t){return 0==t.compareEndPoints("StartToEnd",t)},p=function(t,e,n,i,r){var s=t.duplicate();s.collapse(n);var l=s.parentElement();if(o.isOrIsAncestorOf(e,l)||(l=e),!l.canHaveHTML){var c=new a(l.parentNode,o.getNodeIndex(l));return{boundaryPosition:c,nodeInfo:{nodeIndex:c.offset,containerElement:c.node}}}var d=o.getDocument(l).createElement("span");d.parentNode&&o.removeNode(d);for(var h,p,f,m,g,v=n?"StartToStart":"StartToEnd",_=r&&r.containerElement==l?r.nodeIndex:0,w=l.childNodes.length,b=w,y=b;y==w?l.appendChild(d):l.insertBefore(d,l.childNodes[y]),s.moveToElementText(d),0!=(h=s.compareEndPoints(v,t))&&_!=b;){if(-1==h){if(b==_+1)break;_=y}else b=b==_+1?_:y;y=Math.floor((_+b)/2),l.removeChild(d)}if(g=d.nextSibling,-1==h&&g&&u(g)){s.setEndPoint(n?"EndToStart":"EndToEnd",t);var C;if(/[\r\n]/.test(g.data)){var x=s.duplicate(),S=x.text.replace(/\r\n/g,"\r").length;for(C=x.moveStart("character",S);-1==(h=x.compareEndPoints("StartToEnd",x));)C++,x.moveStart("character",1)}else C=s.text.length;m=new a(g,C)}else p=(i||!n)&&d.previousSibling,f=(i||n)&&d.nextSibling,m=f&&u(f)?new a(f,0):p&&u(p)?new a(p,p.data.length):new a(l,o.getNodeIndex(d));return o.removeNode(d),{boundaryPosition:m,nodeInfo:{nodeIndex:y,containerElement:l}}},f=function(t,e){var n,i,r,a,s=t.offset,c=o.getDocument(t.node),d=l(c).createTextRange(),h=u(t.node);return h?(n=t.node,i=n.parentNode):(a=t.node.childNodes,n=s<a.length?a[s]:null,i=t.node),r=c.createElement("span"),r.innerHTML="&#feff;",n?i.insertBefore(r,n):i.appendChild(r),d.moveToElementText(r),d.collapse(!e),i.removeChild(r),h&&d[e?"moveStart":"moveEnd"]("character",s),d};i=function(t){this.textRange=t,this.refresh()},i.prototype=new s(document),i.prototype.refresh=function(){var t,e,n,i=d(this.textRange);h(this.textRange)?e=t=p(this.textRange,i,!0,!0).boundaryPosition:(n=p(this.textRange,i,!0,!1),t=n.boundaryPosition,e=p(this.textRange,i,!1,!1,n.nodeInfo).boundaryPosition),this.setStart(t.node,t.offset),this.setEnd(e.node,e.offset)},i.prototype.getName=function(){return"WrappedTextRange"},s.copyComparisonConstants(i);var m=function(t){if(t.collapsed)return f(new a(t.startContainer,t.startOffset),!0);var e=f(new a(t.startContainer,t.startOffset),!0),n=f(new a(t.endContainer,t.endOffset),!1),i=l(s.getRangeDocument(t)).createTextRange();return i.setEndPoint("StartToStart",e),i.setEndPoint("EndToEnd",n),i};if(i.rangeToTextRange=m,i.prototype.toTextRange=function(){return m(this)},t.WrappedTextRange=i,!t.features.implementsDomRange||t.config.preferTextRange){var g=function(t){return t("return this;")()}(Function);void 0===g.Range&&(g.Range=i),t.createNativeRange=function(t){return t=c(t,e,"createNativeRange"),l(t).createTextRange()},t.WrappedRange=i}}t.createRange=function(n){return n=c(n,e,"createRange"),new t.WrappedRange(t.createNativeRange(n))},t.createRangyRange=function(t){return t=c(t,e,"createRangyRange"),new s(t)},r.createAliasForDeprecatedMethod(t,"createIframeRange","createRange"),r.createAliasForDeprecatedMethod(t,"createIframeRangyRange","createRangyRange"),t.addShimListener(function(e){var n=e.document;void 0===n.createRange&&(n.createRange=function(){return t.createRange(n)}),n=e=null})}),I.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function(t,e){function n(t){return"string"==typeof t?/^backward(s)?$/i.test(t):!!t}function i(t,n){if(t){if(E.isWindow(t))return t;if(t instanceof v)return t.win;var i=E.getContentDocument(t,e,n);return E.getWindow(i)}return window}function o(t){return i(t,"getWinSelection").getSelection()}function r(t){return i(t,"getDocSelection").document.selection}function a(t){var e=!1;return t.anchorNode&&(e=1==E.comparePoints(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)),e}function s(t,e,n){var i=n?"end":"start",o=n?"start":"end";t.anchorNode=e[i+"Container"],t.anchorOffset=e[i+"Offset"],t.focusNode=e[o+"Container"],t.focusOffset=e[o+"Offset"]}function l(t){var e=t.nativeSelection;t.anchorNode=e.anchorNode,t.anchorOffset=e.anchorOffset,t.focusNode=e.focusNode,t.focusOffset=e.focusOffset}function c(t){t.anchorNode=t.focusNode=null,t.anchorOffset=t.focusOffset=0,t.rangeCount=0,t.isCollapsed=!0,t._ranges.length=0}function u(e){var n;return e instanceof N?(n=t.createNativeRange(e.getDocument()),n.setEnd(e.endContainer,e.endOffset),n.setStart(e.startContainer,e.startOffset)):e instanceof k?n=e.nativeRange:I.implementsDomRange&&e instanceof E.getWindow(e.startContainer).Range&&(n=e),n}function d(t){if(!t.length||1!=t[0].nodeType)return!1;for(var e=1,n=t.length;e<n;++e)if(!E.isAncestorOf(t[0],t[e]))return!1;return!0}function h(t){var n=t.getNodes();if(!d(n))throw e.createError("getSingleElementFromRange: range "+t.inspect()+" did not consist of a single element");return n[0]}function p(t){return!!t&&void 0!==t.text}function f(t,e){var n=new k(e);t._ranges=[n],s(t,n,!1),t.rangeCount=1,t.isCollapsed=n.collapsed}function m(e){if(e._ranges.length=0,"None"==e.docSelection.type)c(e);else{var n=e.docSelection.createRange();if(p(n))f(e,n);else{e.rangeCount=n.length;for(var i,o=L(n.item(0)),r=0;r<e.rangeCount;++r)i=t.createRange(o),i.selectNode(n.item(r)),e._ranges.push(i);e.isCollapsed=1==e.rangeCount&&e._ranges[0].collapsed,s(e,e._ranges[e.rangeCount-1],!1)}}}function g(t,n){for(var i=t.docSelection.createRange(),o=h(n),r=L(i.item(0)),a=P(r).createControlRange(),s=0,l=i.length;s<l;++s)a.add(i.item(s));try{a.add(o)}catch(t){throw e.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}a.select(),m(t)}function v(t,e,n){this.nativeSelection=t,this.docSelection=e,this._ranges=[],this.win=n,this.refresh()}function _(t){t.win=t.anchorNode=t.focusNode=t._ranges=null,t.rangeCount=t.anchorOffset=t.focusOffset=0,t.detached=!0}function w(t,e){for(var n,i,o=Q.length;o--;)if(n=Q[o],i=n.selection,"deleteAll"==e)_(i);else if(n.win==t)return"delete"==e?(Q.splice(o,1),!0):i;return"deleteAll"==e&&(Q.length=0),null}function b(t,n){for(var i,o=L(n[0].startContainer),r=P(o).createControlRange(),a=0,s=n.length;a<s;++a){i=h(n[a]);try{r.add(i)}catch(t){throw e.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}r.select(),m(t)}function y(t,e){if(t.win.document!=L(e))throw new R("WRONG_DOCUMENT_ERR")}function C(e){return function(n,i){var o;this.rangeCount?(o=this.getRangeAt(0),o["set"+(e?"Start":"End")](n,i)):(o=t.createRange(this.win.document),o.setStartAndEnd(n,i)),this.setSingleRange(o,this.isBackward())}}function x(t){var e=[],n=new O(t.anchorNode,t.anchorOffset),i=new O(t.focusNode,t.focusOffset),o="function"==typeof t.getName?t.getName():"Selection";if(void 0!==t.rangeCount)for(var r=0,a=t.rangeCount;r<a;++r)e[r]=N.inspect(t.getRangeAt(r));return"["+o+"(Ranges: "+e.join(", ")+")(anchor: "+n.inspect()+", focus: "+i.inspect()+"]"}t.config.checkSelectionRanges=!0;var S,T,E=t.dom,D=t.util,A=D.isHostMethod,N=t.DomRange,k=t.WrappedRange,R=t.DOMException,O=E.DomPosition,I=t.features,L=E.getDocument,P=E.getBody,M=N.rangesEqual,$=A(window,"getSelection"),F=D.isHostObject(document,"selection");I.implementsWinGetSelection=$,I.implementsDocSelection=F;var H=F&&(!$||t.config.preferTextRange);if(H)S=r,t.isSelectionValid=function(t){var e=i(t,"isSelectionValid").document,n=e.selection;return"None"!=n.type||L(n.createRange().parentElement())==e};else{if(!$)return e.fail("Neither document.selection or window.getSelection() detected."),!1;S=o,t.isSelectionValid=function(){return!0}}t.getNativeSelection=S;var B=S();if(!B)return e.fail("Native selection was null (possibly issue 138?)"),!1;var j=t.createNativeRange(document),z=P(document),W=D.areHostProperties(B,["anchorNode","focusNode","anchorOffset","focusOffset"]);I.selectionHasAnchorAndFocus=W;var q=A(B,"extend");I.selectionHasExtend=q;var U="number"==typeof B.rangeCount;I.selectionHasRangeCount=U;var K=!1,V=!0,G=q?function(e,n){var i=N.getRangeDocument(n),o=t.createRange(i);o.collapseToPoint(n.endContainer,n.endOffset),e.addRange(u(o)),e.extend(n.startContainer,n.startOffset)}:null;D.areHostMethods(B,["addRange","getRangeAt","removeAllRanges"])&&"number"==typeof B.rangeCount&&I.implementsDomRange&&function(){var e=window.getSelection();if(e){for(var n=e.rangeCount,i=n>1,o=[],r=a(e),s=0;s<n;++s)o[s]=e.getRangeAt(s);var l=E.createTestElement(document,"",!1),c=l.appendChild(document.createTextNode(" ")),u=document.createRange();if(u.setStart(c,1),u.collapse(!0),e.removeAllRanges(),e.addRange(u),V=1==e.rangeCount,e.removeAllRanges(),!i){var d=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(d&&parseInt(d[1])>=36)K=!1;else{var h=u.cloneRange();u.setStart(c,0),h.setEnd(c,3),h.setStart(c,2),e.addRange(u),e.addRange(h),K=2==e.rangeCount}}for(E.removeNode(l),e.removeAllRanges(),s=0;s<n;++s)0==s&&r?G?G(e,o[s]):(t.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),e.addRange(o[s])):e.addRange(o[s])}}(),I.selectionSupportsMultipleRanges=K,I.collapsedNonEditableSelectionsSupported=V;var Y,X=!1;z&&A(z,"createControlRange")&&(Y=z.createControlRange(),D.areHostProperties(Y,["item","add"])&&(X=!0)),I.implementsControlRange=X,T=W?function(t){return t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset}:function(t){return!!t.rangeCount&&t.getRangeAt(t.rangeCount-1).collapsed};var J;A(B,"getRangeAt")?J=function(t,e){try{return t.getRangeAt(e)}catch(t){return null}}:W&&(J=function(e){var n=L(e.anchorNode),i=t.createRange(n);return i.setStartAndEnd(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset),i.collapsed!==this.isCollapsed&&i.setStartAndEnd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset),i}),v.prototype=t.selectionPrototype;var Q=[],Z=function(t){if(t&&t instanceof v)return t.refresh(),t;t=i(t,"getNativeSelection");var e=w(t),n=S(t),o=F?r(t):null;return e?(e.nativeSelection=n,e.docSelection=o,e.refresh()):(e=new v(n,o,t),Q.push({win:t,selection:e})),e};t.getSelection=Z,D.createAliasForDeprecatedMethod(t,"getIframeSelection","getSelection");var tt=v.prototype;if(!H&&W&&D.areHostMethods(B,["removeAllRanges","addRange"])){tt.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),c(this)};var et=function(t,e){G(t.nativeSelection,e),t.refresh()};tt.addRange=U?function(e,i){if(X&&F&&"Control"==this.docSelection.type)g(this,e);else if(n(i)&&q)et(this,e);else{var o;K?o=this.rangeCount:(this.removeAllRanges(),o=0);var r=u(e).cloneRange();try{this.nativeSelection.addRange(r)}catch(t){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==o+1){if(t.config.checkSelectionRanges){var a=J(this.nativeSelection,this.rangeCount-1);a&&!M(a,e)&&(e=new k(a))}this._ranges[this.rangeCount-1]=e,s(this,e,ot(this.nativeSelection)),this.isCollapsed=T(this)}else this.refresh()}}:function(t,e){n(e)&&q?et(this,t):(this.nativeSelection.addRange(u(t)),this.refresh())},tt.setRanges=function(t){if(X&&F&&t.length>1)b(this,t);else{this.removeAllRanges();for(var e=0,n=t.length;e<n;++e)this.addRange(t[e])}}}else{if(!(A(B,"empty")&&A(j,"select")&&X&&H))return e.fail("No means of selecting a Range or TextRange was found"),!1;tt.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var t;if(this.anchorNode)t=L(this.anchorNode);else if("Control"==this.docSelection.type){var e=this.docSelection.createRange();e.length&&(t=L(e.item(0)))}t&&(P(t).createTextRange().select(),this.docSelection.empty())}}catch(t){}c(this)},tt.addRange=function(e){"Control"==this.docSelection.type?g(this,e):(t.WrappedTextRange.rangeToTextRange(e).select(),this._ranges[0]=e,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,s(this,e,!1))},tt.setRanges=function(t){this.removeAllRanges();var e=t.length;e>1?b(this,t):e&&this.addRange(t[0])}}tt.getRangeAt=function(t){if(t<0||t>=this.rangeCount)throw new R("INDEX_SIZE_ERR");return this._ranges[t].cloneRange()};var nt;if(H)nt=function(e){var n;t.isSelectionValid(e.win)?n=e.docSelection.createRange():(n=P(e.win.document).createTextRange(),n.collapse(!0)),"Control"==e.docSelection.type?m(e):p(n)?f(e,n):c(e)};else if(A(B,"getRangeAt")&&"number"==typeof B.rangeCount)nt=function(e){if(X&&F&&"Control"==e.docSelection.type)m(e);else if(e._ranges.length=e.rangeCount=e.nativeSelection.rangeCount,e.rangeCount){for(var n=0,i=e.rangeCount;n<i;++n)e._ranges[n]=new t.WrappedRange(e.nativeSelection.getRangeAt(n));s(e,e._ranges[e.rangeCount-1],ot(e.nativeSelection)),e.isCollapsed=T(e)}else c(e)};else{if(!W||"boolean"!=typeof B.isCollapsed||"boolean"!=typeof j.collapsed||!I.implementsDomRange)return e.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;nt=function(t){var e,n=t.nativeSelection;n.anchorNode?(e=J(n,0),t._ranges=[e],t.rangeCount=1,l(t),t.isCollapsed=T(t)):c(t)}}tt.refresh=function(t){var e=t?this._ranges.slice(0):null,n=this.anchorNode,i=this.anchorOffset;if(nt(this),t){var o=e.length;if(o!=this._ranges.length)return!0;if(this.anchorNode!=n||this.anchorOffset!=i)return!0;for(;o--;)if(!M(e[o],this._ranges[o]))return!0;return!1}};var it=function(t,e){var n=t.getAllRanges();t.removeAllRanges();for(var i=0,o=n.length;i<o;++i)M(e,n[i])||t.addRange(n[i]);t.rangeCount||c(t)};tt.removeRange=X&&F?function(t){if("Control"==this.docSelection.type){for(var e,n=this.docSelection.createRange(),i=h(t),o=L(n.item(0)),r=P(o).createControlRange(),a=!1,s=0,l=n.length;s<l;++s)e=n.item(s),e!==i||a?r.add(n.item(s)):a=!0;r.select(),m(this)}else it(this,t)}:function(t){it(this,t)};var ot;!H&&W&&I.implementsDomRange?(ot=a,tt.isBackward=function(){return ot(this)}):ot=tt.isBackward=function(){return!1},tt.isBackwards=tt.isBackward,tt.toString=function(){for(var t=[],e=0,n=this.rangeCount;e<n;++e)t[e]=""+this._ranges[e];return t.join("")},tt.collapse=function(e,n){y(this,e);var i=t.createRange(e);i.collapseToPoint(e,n),this.setSingleRange(i),this.isCollapsed=!0},tt.collapseToStart=function(){if(!this.rangeCount)throw new R("INVALID_STATE_ERR");var t=this._ranges[0];this.collapse(t.startContainer,t.startOffset)},tt.collapseToEnd=function(){if(!this.rangeCount)throw new R("INVALID_STATE_ERR");var t=this._ranges[this.rangeCount-1];this.collapse(t.endContainer,t.endOffset)},tt.selectAllChildren=function(e){y(this,e);var n=t.createRange(e);n.selectNodeContents(e),this.setSingleRange(n)},tt.deleteFromDocument=function(){if(X&&F&&"Control"==this.docSelection.type){for(var t,e=this.docSelection.createRange();e.length;)t=e.item(0),e.remove(t),E.removeNode(t);this.refresh()}else if(this.rangeCount){var n=this.getAllRanges();if(n.length){this.removeAllRanges();for(var i=0,o=n.length;i<o;++i)n[i].deleteContents();this.addRange(n[o-1])}}},tt.eachRange=function(t,e){for(var n=0,i=this._ranges.length;n<i;++n)if(t(this.getRangeAt(n)))return e},tt.getAllRanges=function(){var t=[];return this.eachRange(function(e){t.push(e)}),t},tt.setSingleRange=function(t,e){this.removeAllRanges(),this.addRange(t,e)},tt.callMethodOnEachRange=function(t,e){var n=[];return this.eachRange(function(i){n.push(i[t].apply(i,e||[]))}),n},tt.setStart=C(!0),tt.setEnd=C(!1),t.rangePrototype.select=function(t){Z(this.getDocument()).setSingleRange(this,t)},tt.changeEachRange=function(t){var e=[],n=this.isBackward();this.eachRange(function(n){t(n),e.push(n)}),this.removeAllRanges(),n&&1==e.length?this.addRange(e[0],"backward"):this.setRanges(e)},tt.containsNode=function(t,e){return this.eachRange(function(n){return n.containsNode(t,e)},!0)||!1},tt.getBookmark=function(t){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[t])}},tt.moveToBookmark=function(e){for(var n,i,o=[],r=0;n=e.rangeBookmarks[r++];)i=t.createRange(this.win),i.moveToBookmark(n),o.push(i);e.backward?this.setSingleRange(o[0],"backward"):this.setRanges(o)},tt.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},tt.restoreRanges=function(t){this.removeAllRanges();for(var e,n=0;e=t.ranges[n];++n)this.addRange(e,t.backward&&0==n)},tt.toHtml=function(){var t=[];return this.eachRange(function(e){t.push(N.toHtml(e))}),t.join("")},I.implementsTextRange&&(tt.getNativeTextRange=function(){var n;if(n=this.docSelection){var i=n.createRange();if(p(i))return i;throw e.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return t.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw e.createError("getNativeTextRange: selection contains no range")}),tt.getName=function(){return"WrappedSelection"},tt.inspect=function(){return x(this)},tt.detach=function(){w(this.win,"delete"),_(this)},v.detachAll=function(){w(null,"deleteAll")},v.inspect=x,v.isDirectionBackward=n,t.Selection=v,t.selectionPrototype=tt,t.addShimListener(function(t){void 0===t.getSelection&&(t.getSelection=function(){return Z(t)}),t=null})});var F=!1,H=function(t){F||(F=!0,!I.initialized&&I.config.autoInitialize&&d())};return R&&("complete"==document.readyState?H():(t(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",H,!1),P(window,"load",H))),I})},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function r(t){if(d===clearTimeout)return clearTimeout(t);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){m&&p&&(m=!1,p.length?f=p.concat(f):g=-1,f.length&&s())}function s(){if(!m){var t=o(a);m=!0;for(var e=f.length;e;){for(p=f,f=[];++g<e;)p&&p[g].run();g=-1,e=f.length}p=null,m=!1,r(t)}}function l(t,e){this.fun=t,this.array=e}function c(){}var u,d,h=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(t){u=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(t){d=i}}();var p,f=[],m=!1,g=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new l(t,e)),1!==f.length||m||o(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e){},function(t,e){},function(t,e,n){"use strict";function i(){r.a.prototype.createLink=function(t){var e,n=r.a.selection.getSelectionElement(this.options.contentWindow),i={};if(-1!==this.elements.indexOf(n)){try{if(this.events.disableCustomEvent("editableInput"),t.url&&r.a.util.deprecated(".url option for createLink",".value","6.0.0"),(e=t.url||t.value)&&e.trim().length>0){var o=this.options.contentWindow.getSelection();if(o){var a,s,l,c,u=o.getRangeAt(0),d=u.commonAncestorContainer;if(3===u.endContainer.nodeType&&3!==u.startContainer.nodeType&&0===u.startOffset&&u.startContainer.firstChild===u.endContainer&&(d=u.endContainer),s=r.a.util.getClosestBlockContainer(u.startContainer),l=r.a.util.getClosestBlockContainer(u.endContainer),3!==d.nodeType&&0!==d.textContent.length&&s===l){var h=s||n,p=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),a=this.exportSelection(),p.appendChild(h.cloneNode(!0)),n===h?r.a.selection.select(this.options.ownerDocument,h.firstChild,0,h.lastChild,3===h.lastChild.nodeType?h.lastChild.nodeValue.length:h.lastChild.childNodes.length):r.a.selection.select(this.options.ownerDocument,h,0,h,h.childNodes.length);var f=this.exportSelection();c=r.a.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,p,{start:a.start-f.start,end:a.end-f.start,editableElementIndex:a.editableElementIndex}),0===c.length&&(p=this.options.ownerDocument.createDocumentFragment(),p.appendChild(d.cloneNode(!0)),c=[p.firstChild.firstChild,p.firstChild.lastChild]),r.a.util.createLink(this.options.ownerDocument,c,e.trim());var m=(p.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;r.a.util.insertHTMLCommand(this.options.ownerDocument,p.firstChild.innerHTML.replace(/^\s+/,"")),a.start-=m,a.end-=m,this.importSelection(a)}else this.options.ownerDocument.execCommand("createLink",!1,e);this.options.targetBlank||"_blank"===t.target?r.a.util.setTargetBlank(r.a.selection.getSelectionStart(this.options.ownerDocument),e):r.a.util.removeTargetBlank(r.a.selection.getSelectionStart(this.options.ownerDocument),e),"nofollow"===t.rel?r.a.util.setNofollow(r.a.selection.getSelectionStart(this.options.ownerDocument),e):r.a.util.removeNofollow(r.a.selection.getSelectionStart(this.options.ownerDocument),e),t.buttonClass&&r.a.util.addClassToAnchors(r.a.selection.getSelectionStart(this.options.ownerDocument),t.buttonClass)}}if(this.options.targetBlank||"_blank"===t.target||"nofollow"===t.rel||t.buttonClass){i=this.options.ownerDocument.createEvent("HTMLEvents"),i.initEvent("input",!0,!0,this.options.contentWindow);for(var g=0,v=this.elements.length;g<v;g+=1)this.elements[g].dispatchEvent(i)}}finally{this.events.enableCustomEvent("editableInput")}this.events.triggerCustomEvent("editableInput",i,n)}},r.a.util.setNofollow=function(t,e){var n,i=e||!1;if("a"===t.nodeName.toLowerCase())t.rel="nofollow";else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)!1!==i&&i!==t[n].attributes.href.value||(t[n].rel="nofollow")},r.a.util.removeNofollow=function(t,e){var n;if("a"===t.nodeName.toLowerCase())t.removeAttribute("rel");else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)e===t[n].attributes.href.value&&t[n].removeAttribute("rel")}}e.b=i,n.d(e,"a",function(){return a});var o=n(10),r=n.n(o),a=r.a.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!0,targetCheckboxText:"Open in new tab",nofollowCheckbox:!0,nofollowCheckboxText:"Use nofollow",name:"links",action:"createLink",aria:"link",tagNames:["a"],contentDefault:'<span class="dashicons dashicons-admin-links"></span>',contentFA:'<i class="fa fa-link"></i>',init:function(){r.a.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(t){t.preventDefault(),t.stopPropagation();var e=r.a.selection.getSelectionRange(this.document);return"a"===e.startContainer.nodeName.toLowerCase()||"a"===e.endContainer.nodeName.toLowerCase()||r.a.util.getClosestTag(r.a.selection.getSelectedParentElement(e),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(t){r.a.util.isKey(t,r.a.util.keyCode.K)&&r.a.util.isMetaCtrlKey(t)&&!t.shiftKey&&this.handleClick(t)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var t=['<input type="text" class="medium-editor-toolbar-input" placeholder="',this.placeholderText,'" style="padding-left: 25px; width: 265px;">'];return t.push('<a href="#" class="medium-editor-toolbar-save">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':this.formSaveLabel,"</a>"),t.push('<a href="#" class="medium-editor-toolbar-close">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':this.formCloseLabel,"</a>"),this.targetCheckbox&&t.push('<div class="medium-editor-toolbar-form-row" style="padding-left: 20px;">','<input type="checkbox" class="medium-editor-toolbar-anchor-target">',"<label>",this.targetCheckboxText,"</label>","</div>"),this.nofollowCheckbox&&t.push('<div class="medium-editor-toolbar-form-row" style="padding-left: 20px;">','<input type="checkbox" class="medium-editor-toolbar-anchor-nofollow">',"<label>",this.nofollowCheckboxText,"</label>","</div>"),this.customClassOption&&t.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-button">',"<label>",this.customClassOptionText,"</label>","</div>"),t.join("")},isDisplayed:function(){return r.a.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){r.a.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(t){var e=this.getInput(),n=this.getAnchorTargetCheckbox(),i=this.getAnchorNofollowCheckbox(),o=this.getAnchorButtonCheckbox();if(t=t||{value:""},"string"==typeof t&&(t={value:t}),this.base.saveSelection(),this.hideToolbarDefaultActions(),r.a.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),e.value=t.value,e.focus(),n&&(n.checked="_blank"===t.target),i&&(i.checked="nofollow"===t.rel),o){var a=t.buttonClass?t.buttonClass.split(" "):[];o.checked=-1!==a.indexOf(this.customClassOption)}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var t=this.getAnchorTargetCheckbox(),e=this.getAnchorNofollowCheckbox(),n=this.getAnchorButtonCheckbox(),i={value:this.getInput().value.trim()};return this.linkValidation&&(i.value=this.checkLinkFormat(i.value)),i.target="_self",t&&t.checked&&(i.target="_blank"),i.rel="",e&&e.checked&&(i.rel="nofollow"),n&&n.checked&&(i.buttonClass=this.customClassOption),i},doFormSave:function(){var t=this.getFormOpts();this.completeFormSave(t)},completeFormSave:function(t){this.base.restoreSelection(),this.execAction(this.action,t),this.base.checkSelection()},ensureEncodedUri:function(t){return t===decodeURI(t)?encodeURI(t):t},ensureEncodedUriComponent:function(t){return t===decodeURIComponent(t)?encodeURIComponent(t):t},ensureEncodedParam:function(t){var e=t.split("="),n=e[0],i=e[1];return n+(void 0===i?"":"="+this.ensureEncodedUriComponent(i))},ensureEncodedQuery:function(t){return t.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(t){var e=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,n=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,i=t.split("?"),o=i[0],r=i[1];return n.test(t)?"tel:"+t:(e.test(t)?"":"http://")+this.ensureEncodedUri(o)+(void 0===r?"":"?"+this.ensureEncodedQuery(r))},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(t){var e=t.querySelector(".medium-editor-toolbar-close"),n=t.querySelector(".medium-editor-toolbar-save"),i=t.querySelector(".medium-editor-toolbar-input");this.on(t,"click",this.handleFormClick.bind(this)),this.on(i,"keyup",this.handleTextboxKeyup.bind(this)),this.on(e,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var t=this.document,e=t.createElement("div");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),e.innerHTML=this.getTemplate(),this.attachFormEvents(e),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorNofollowCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-nofollow")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(t){if(t.keyCode===r.a.util.keyCode.ENTER)return t.preventDefault(),void this.doFormSave();t.keyCode===r.a.util.keyCode.ESCAPE&&(t.preventDefault(),this.doFormCancel())},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}})},function(t,e,n){"use strict";(function(t){function n(e){t(e.container).on("click",".wprm-modal-close, .wprm-modal-backdrop",function(){e.changes_made&&!confirm(wprm_temp_admin.modal.text.modal_close_confirm)||e.close()}),t(".wprm-menu").on("click",".wprm-menu-item",function(){var e=t(this),n=e.data("menu"),i=e.data("tab");t(".wprm-menu").removeClass("visible"),t(".wprm-menu").find(".wprm-menu-item").removeClass("active"),e.addClass("active"),t(".wprm-frame-router").find(".wprm-router").removeClass("active"),t(".wprm-frame-router").find("#wprm-menu-"+n).addClass("active");var o=!1;t(".wprm-router").find(".wprm-menu-item").removeClass("active"),t(".wprm-frame-router").find("#wprm-menu-"+n).find(".wprm-menu-item").each(function(e){0!==e&&t(this).data("tab")!=i||(o=t(this))}),o&&o.click(),t(".wprm-frame-title").find("h1").text(e.text())}),t(e.container).on("click",".wprm-frame-title",function(){t(".wprm-menu").toggleClass("visible")}),t(".wprm-router").on("click",".wprm-menu-item",function(){var e=t(this),n=e.data("tab"),i=e.data("button");t(".wprm-router").find(".wprm-menu-item").removeClass("active"),e.addClass("active"),e.data("callback")?(t(".wprm-button-action").text(i).show(),"wprm-menu-recipe"==e.parents(".wprm-router").attr("id")?t(".wprm-button-action-save").show():t(".wprm-button-action-save").hide()):(t(".wprm-button-action").hide(),t(".wprm-button-action-save").hide()),t(".wprm-frame-content").find(".wprm-frame-content-tab").removeClass("active"),t(".wprm-frame-content").find("#wprm-tab-"+n).addClass("active")}),t(".wprm-button-action").on("click",function(){var n=t(".wprm-router.active").find(".wprm-menu-item.active"),i=n.data("callback");i&&"function"==typeof e.actions[i]&&e.actions[i](t(this))}),t(e.container).keydown(function(t){t.stopPropagation()}),t(".wprm-recipes-dropdown").select2_wprm({width:"250px",ajax:{type:"POST",url:wprm_temp_admin.ajax_url,dataType:"json",delay:250,data:function(t){return{action:"wprm_search_recipes",security:wprm_temp_admin.nonce,search:t.term}},processResults:function(t,e){return{results:t.data.recipes_with_id}},cache:!0},minimumInputLength:1}),t(".wprm-recipes-dropdown-with-first").select2_wprm({width:"250px",ajax:{type:"POST",url:wprm_temp_admin.ajax_url,dataType:"json",delay:250,data:function(t){return{action:"wprm_search_recipes",security:wprm_temp_admin.nonce,search:t.term}},processResults:function(t,e){return{results:[{id:"0",text:wprm_temp_admin.modal.text.first_recipe_on_page}].concat(t.data.recipes_with_id)}},cache:!0},minimumInputLength:1})}e.a=n}).call(e,n(0))},function(t,e,n){(function(t){function e(e){var n={action:"wprm_feedback",security:wprm_temp_admin.nonce,answer:e};t.post(wprm_temp_admin.ajax_url,n)}t(document).ready(function(n){var i=t(".wprm-feedback-notice");i.length>0&&(t("#wprm-feedback-stop").on("click",function(){e("stop"),i.slideUp()}),t("#wprm-feedback-no").on("click",function(){e("no");var t="<strong>How could we make it better?</strong><br/>";t+='Please send any issues or suggestions you have to <a href="mailto:support@bootstrapped.ventures?subject=WP%20Recipe%20Maker%20feedback">support@bootstrapped.ventures</a> and we\'ll see what we can do!',i.html(t)}),t("#wprm-feedback-yes").on("click",function(){e("yes");var t="<strong>Happy to hear!</strong><br/>";t+='It would be really helpful if you could leave us an honest review over at <a href="https://wordpress.org/support/plugin/wp-recipe-maker/reviews/#new-post" target="_blank">wordpress.org</a><br/>',t+='Suggestions to make the plugin even better are also very welcome at <a href="mailto:support@bootstrapped.ventures?subject=WP%20Recipe%20Maker%20suggestions">support@bootstrapped.ventures</a>',i.html(t)}))})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(28),o=(n.n(i),n(29)),r=(n.n(o),n(30));n.n(r),n(31)},function(t,e){},function(t,e,n){(function(t){var e=!1;t(document).ready(function(n){t(".wprm-import-recipes-select-all").on("click",function(e){e.preventDefault(),t(".wprm-import-recipes").find(":checkbox").each(function(){t(this).prop("checked",!0)})}),t(".wprm-import-recipes-select-none").on("click",function(e){e.preventDefault(),t(".wprm-import-recipes").find(":checkbox").each(function(){t(this).prop("checked",!1)})}),t(".wprm-import-recipes").on("click",":checkbox",function(n){if(e&&n.shiftKey){var i=t(".wprm-import-recipes").find(":checkbox"),o=i.index(this),r=i.index(e);i.slice(Math.min(o,r),Math.max(o,r)+1).prop("checked",e.checked)}e=this}),t(".wprm-import-next-page").on("click",function(){var t=window.location.href,e=/(&|\?)p=(\d+)/,n=e.exec(t);if(n){var i=parseInt(n[2]),o="p="+i,r="p="+(i+1);t=t.replace("?"+o,"?"+r),t=t.replace("&"+o,"&"+r)}window.location=t}),t(".wprm-import-reset-page").on("click",function(){var t=window.location.href,e=/(&|\?)p=(\d+)/,n=e.exec(t);if(n){var i=parseInt(n[2]),o="p="+i;t=t.replace("?"+o,"?p=0"),t=t.replace("&"+o,"&p=0")}window.location=t})})}).call(e,n(0))},function(t,e,n){(function(t){function e(){var o={action:"wprm_import_recipes",security:wprm_temp_admin.nonce,importer_uid:wprm_import.importer_uid,post_data:wprm_import.post_data,recipes:i};t.post(wprm_temp_admin.ajax_url,o,function(o){o.success?(i=o.data.recipes_left,n(),i.length>0?e():t("#wprm-import-finished").show()):window.location=o.data.redirect},"json")}function n(){var e=100*(1-i.length/o);t("#wprm-import-progress-bar").css("width",e+"%")}var i=[],o=0;t(document).ready(function(t){void 0!==window.wprm_import&&(i=wprm_import.recipes,o=wprm_import.recipes.length,e())})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e=n(1);t(document).ready(function(n){t(document).on("click",".wprm-import-recipes-actions-edit",function(n){n.preventDefault();var i=t(this).data("id");e.a.open(!1,{recipe_id:i})})})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e=n(33),i=n(37),o=n(39);n.n(o),t(document).ready(function(n){t(".wprm-manage-datatable").length>0&&(Object(e.a)(),Object(i.a)())})}).call(e,n(0))},function(t,e,n){"use strict";(function(t,i){function o(){for(var t,e={},n=location.search.slice(1),i=/([^&=]+)=([^&]*)/g;t=i.exec(n);)e[decodeURIComponent(t[1])]=decodeURIComponent(t[2]);return e}function r(e){var n=o();t(".wprm-manage-recipes-filter").on("change",function(){e.search("").draw()}).each(function(){var e=t(this).data("taxonomy");n.hasOwnProperty(e)&&t(this).find("option[value='"+n[e]+"']").length>0&&t(this).val(n[e])}).select2_wprm().trigger("change")}function a(){var e="";t(".wprm-manage-datatable").each(function(){e=t(this).attr("id")}),i.fn.dataTable.ext.errMode="throw",r(t(".wprm-manage-datatable").DataTable({pageLength:10,order:[0,"desc"],serverSide:!0,ajax:{url:wprm_temp_admin.ajax_url,type:"POST",data:function(n){n.action="wprm_manage_datatable",n.security=wprm_temp_admin.nonce,n.table=e;var i=t(".wprm-manage-recipes-filter");if(i.length>0){var o=t("#wprm-manage-recipes_wrapper").find('input[type="search"]').val();i.each(function(){var e=t(this).data("taxonomy"),n=parseInt(t(this).val());n>0&&(o+="{{"+e+"="+n+"}}")}),n.search.value=o}}},drawCallback:function(){t(".wprm-manage-datatable").find("select").select2_wprm(),t(".wprm-manage-ingredients-actions").tooltipster({content:'<div class="wprm-manage-ingredients-actions-tooltip">'+wprm_temp_admin.manage.tooltip.ingredients+"</div>",contentAsHTML:!0,functionBefore:function(){var e=t.tooltipster.instances();t.each(e,function(t,e){e.close()})},functionReady:function(e,n){var i=parseInt(t(n.origin).data("id")),o=parseInt(t(n.origin).data("count")),r=t("#wprm-manage-ingredients-name-"+i).text();t(n.tooltip).find("a").data("id",i),t(n.tooltip).find(".tooltip-header").text("#"+i+" - "+r),o>0&&t(n.tooltip).find(".wprm-manage-ingredients-actions-delete").remove();var a=t(n.tooltip).find(".tooltipster-content > div");t(n.tooltip).height(a.outerHeight(!0)+15)},interactive:!0,delay:0,side:"left",trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{click:!0,tap:!0}}),t(".wprm-manage-taxonomies-actions").tooltipster({content:'<div class="wprm-manage-taxonomies-actions-tooltip">'+wprm_temp_admin.manage.tooltip.taxonomies+"</div>",contentAsHTML:!0,functionBefore:function(){var e=t.tooltipster.instances();t.each(e,function(t,e){e.close()})},functionReady:function(e,n){var i=parseInt(t(n.origin).data("id")),o=(parseInt(t(n.origin).data("count")),t("#wprm-manage-taxonomies-name-"+i).text());t(n.tooltip).find("a").data("id",i),t(n.tooltip).find(".tooltip-header").text("#"+i+" - "+o);var r=t(n.tooltip).find(".tooltipster-content > div");t(n.tooltip).height(r.outerHeight(!0)+15)},interactive:!0,delay:0,side:"left",trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{click:!0,tap:!0}}),t(".wprm-manage-recipes-actions").tooltipster({content:'<div class="wprm-manage-recipes-actions-tooltip">'+wprm_temp_admin.manage.tooltip.recipes+"</div>",contentAsHTML:!0,functionBefore:function(){var e=t.tooltipster.instances();t.each(e,function(t,e){e.close()})},functionReady:function(e,n){var i=parseInt(t(n.origin).data("id")),o=t("#wprm-manage-recipes-name-"+i).text();t(n.tooltip).find(".tooltip-header").text("#"+i+" - "+o),t(n.tooltip).find("a").data("id",i);var r=t(n.tooltip).find(".tooltipster-content > div");t(n.tooltip).height(r.outerHeight(!0)+15)},interactive:!0,delay:0,side:"left",trigger:"custom",triggerOpen:{mouseenter:!0,touchstart:!0},triggerClose:{click:!0,tap:!0}}),t(".wprm-manage-tooltip").tooltipster({delay:0,side:"left"})}}))}e.a=a;var s=n(7),l=(n.n(s),n(8)),c=(n.n(l),n(11)),u=(n.n(c),n(34)),d=(n.n(u),n(35)),h=(n.n(d),n(36));n.n(h)}).call(e,n(0),n(0))},function(t,e){},function(t,e,n){var i,o;/*! tooltipster v4.2.5 */!function(r,a){i=[n(0)],void 0!==(o=function(t){return a(t)}.apply(e,i))&&(t.exports=o)}(0,function(t){function e(t){this.$container,this.constraints=null,this.__$tooltip,this.__init(t)}function n(e,n){var i=!0;return t.each(e,function(t,o){return void 0===n[t]||e[t]!==n[t]?(i=!1,!1):void 0}),i}function i(e){var n=e.attr("id"),i=n?a.window.document.getElementById(n):null;return i?i===e[0]:t.contains(a.window.document.body,e[0])}var o={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},r="undefined"!=typeof window?window:null,a={hasTouchCapability:!(!r||!("ontouchstart"in r||r.DocumentTouch&&r.document instanceof r.DocumentTouch||r.navigator.maxTouchPoints)),hasTransitions:function(){if(!r)return!1;var t=r.document.body||r.document.documentElement,e=t.style,n="transition",i=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof e[n])return!0;n=n.charAt(0).toUpperCase()+n.substr(1);for(var o=0;o<i.length;o++)if("string"==typeof e[i[o]+n])return!0;return!1}(),IE:!1,semVer:"4.2.5",window:r},s=function(){this.__$emitterPrivate=t({}),this.__$emitterPublic=t({}),this.__instancesLatestArr=[],this.__plugins={},this._env=a};s.prototype={__bridge:function(e,n,i){if(!n[i]){var r=function(){};r.prototype=e;var a=new r;a.__init&&a.__init(n),t.each(e,function(t,e){0!=t.indexOf("__")&&(n[t]?o.debug&&console.log("The "+t+" method of the "+i+" plugin conflicts with another plugin or native methods"):(n[t]=function(){return a[t].apply(a,Array.prototype.slice.apply(arguments))},n[t].bridged=a))}),n[i]=a}return this},__setWindow:function(t){return a.window=t,this},_getRuler:function(t){return new e(t)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(e){var n=this;if("string"==typeof e){var i=e,o=null;return i.indexOf(".")>0?o=n.__plugins[i]:t.each(n.__plugins,function(t,e){return e.name.substring(e.name.length-i.length-1)=="."+i?(o=e,!1):void 0}),o}if(e.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return n.__plugins[e.name]=e,e.core&&n.__bridge(e.core,n,e.name),this},_trigger:function(){var t=Array.prototype.slice.apply(arguments);return"string"==typeof t[0]&&(t[0]={type:t[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,t),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,t),this},instances:function(e){var n=[];return t(e||".tooltipstered").each(function(){var e=t(this),i=e.data("tooltipster-ns");i&&t.each(i,function(t,i){n.push(e.data(i))})}),n},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(e){return t((e?e+" ":"")+".tooltipstered").toArray()},setDefaults:function(e){return t.extend(o,e),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},t.tooltipster=new s,t.Tooltipster=function(e,n){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=t({}),this.__$emitterPublic=t({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(e,n)},t.Tooltipster.prototype={__init:function(e,n){var i=this;if(i._$origin=t(e),i.__options=t.extend(!0,{},o,n),i.__optionsFormat(),!a.IE||a.IE>=i.__options.IEmin){var r=null;if(void 0===i._$origin.data("tooltipster-initialTitle")&&(r=i._$origin.attr("title"),void 0===r&&(r=null),i._$origin.data("tooltipster-initialTitle",r)),null!==i.__options.content)i.__contentSet(i.__options.content);else{var s,l=i._$origin.attr("data-tooltip-content");l&&(s=t(l)),s&&s[0]?i.__contentSet(s.first()):i.__contentSet(r)}i._$origin.removeAttr("title").addClass("tooltipstered"),i.__prepareOrigin(),i.__prepareGC(),t.each(i.__options.plugins,function(t,e){i._plug(e)}),a.hasTouchCapability&&t(a.window.document.body).on("touchmove."+i.__namespace+"-triggerOpen",function(t){i._touchRecordEvent(t)}),i._on("created",function(){i.__prepareTooltip()})._on("repositioned",function(t){i.__lastPosition=t.position})}else i.__options.disabled=!0},__contentInsert:function(){var t=this,e=t._$tooltip.find(".tooltipster-content"),n=t.__Content,i=function(t){n=t};return t._trigger({type:"format",content:t.__Content,format:i}),t.__options.functionFormat&&(n=t.__options.functionFormat.call(t,t,{origin:t._$origin[0]},t.__Content)),"string"!=typeof n||t.__options.contentAsHTML?e.empty().append(n):e.text(n),t},__contentSet:function(e){return e instanceof t&&this.__options.contentCloning&&(e=e.clone(!0)),this.__Content=e,this._trigger({type:"updated",content:e}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var e=this,n=e._$origin,i=e._$origin.is("area");if(i){var o=e._$origin.parent().attr("name");n=t('img[usemap="#'+o+'"]')}var r=n[0].getBoundingClientRect(),s=t(a.window.document),l=t(a.window),c=n,u={available:{document:null,window:null},document:{size:{height:s.height(),width:s.width()}},window:{scroll:{left:a.window.scrollX||a.window.document.documentElement.scrollLeft,top:a.window.scrollY||a.window.document.documentElement.scrollTop},size:{height:l.height(),width:l.width()}},origin:{fixedLineage:!1,offset:{},size:{height:r.bottom-r.top,width:r.right-r.left},usemapImage:i?n[0]:null,windowOffset:{bottom:r.bottom,left:r.left,right:r.right,top:r.top}}};if(i){var d=e._$origin.attr("shape"),h=e._$origin.attr("coords");if(h&&(h=h.split(","),t.map(h,function(t,e){h[e]=parseInt(t)})),"default"!=d)switch(d){case"circle":var p=h[0],f=h[1],m=h[2],g=f-m,v=p-m;u.origin.size.height=2*m,u.origin.size.width=u.origin.size.height,u.origin.windowOffset.left+=v,u.origin.windowOffset.top+=g;break;case"rect":var _=h[0],w=h[1],b=h[2],y=h[3];u.origin.size.height=y-w,u.origin.size.width=b-_,u.origin.windowOffset.left+=_,u.origin.windowOffset.top+=w;break;case"poly":for(var C=0,x=0,S=0,T=0,E="even",D=0;D<h.length;D++){var A=h[D];"even"==E?(A>S&&(S=A,0===D&&(C=S)),C>A&&(C=A),E="odd"):(A>T&&(T=A,1==D&&(x=T)),x>A&&(x=A),E="even")}u.origin.size.height=T-x,u.origin.size.width=S-C,u.origin.windowOffset.left+=C,u.origin.windowOffset.top+=x}}var N=function(t){u.origin.size.height=t.height,u.origin.windowOffset.left=t.left,u.origin.windowOffset.top=t.top,u.origin.size.width=t.width};for(e._trigger({type:"geometry",edit:N,geometry:{height:u.origin.size.height,left:u.origin.windowOffset.left,top:u.origin.windowOffset.top,width:u.origin.size.width}}),u.origin.windowOffset.right=u.origin.windowOffset.left+u.origin.size.width,u.origin.windowOffset.bottom=u.origin.windowOffset.top+u.origin.size.height,u.origin.offset.left=u.origin.windowOffset.left+u.window.scroll.left,u.origin.offset.top=u.origin.windowOffset.top+u.window.scroll.top,u.origin.offset.bottom=u.origin.offset.top+u.origin.size.height,u.origin.offset.right=u.origin.offset.left+u.origin.size.width,u.available.document={bottom:{height:u.document.size.height-u.origin.offset.bottom,width:u.document.size.width},left:{height:u.document.size.height,width:u.origin.offset.left},right:{height:u.document.size.height,width:u.document.size.width-u.origin.offset.right},top:{height:u.origin.offset.top,width:u.document.size.width}},u.available.window={bottom:{height:Math.max(u.window.size.height-Math.max(u.origin.windowOffset.bottom,0),0),width:u.window.size.width},left:{height:u.window.size.height,width:Math.max(u.origin.windowOffset.left,0)},right:{height:u.window.size.height,width:Math.max(u.window.size.width-Math.max(u.origin.windowOffset.right,0),0)},top:{height:Math.max(u.origin.windowOffset.top,0),width:u.window.size.width}};"html"!=c[0].tagName.toLowerCase();){if("fixed"==c.css("position")){u.origin.fixedLineage=!0;break}c=c.parent()}return u},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=t(a.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=t(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var e=this;return e.__options.selfDestruction?e.__garbageCollector=setInterval(function(){var n=(new Date).getTime();e.__touchEvents=t.grep(e.__touchEvents,function(t,e){return n-t.time>6e4}),i(e._$origin)||e.close(function(){e.destroy()})},2e4):clearInterval(e.__garbageCollector),e},__prepareOrigin:function(){var t=this;if(t._$origin.off("."+t.__namespace+"-triggerOpen"),a.hasTouchCapability&&t._$origin.on("touchstart."+t.__namespace+"-triggerOpen touchend."+t.__namespace+"-triggerOpen touchcancel."+t.__namespace+"-triggerOpen",function(e){t._touchRecordEvent(e)}),t.__options.triggerOpen.click||t.__options.triggerOpen.tap&&a.hasTouchCapability){var e="";t.__options.triggerOpen.click&&(e+="click."+t.__namespace+"-triggerOpen "),t.__options.triggerOpen.tap&&a.hasTouchCapability&&(e+="touchend."+t.__namespace+"-triggerOpen"),t._$origin.on(e,function(e){t._touchIsMeaningfulEvent(e)&&t._open(e)})}if(t.__options.triggerOpen.mouseenter||t.__options.triggerOpen.touchstart&&a.hasTouchCapability){var e="";t.__options.triggerOpen.mouseenter&&(e+="mouseenter."+t.__namespace+"-triggerOpen "),t.__options.triggerOpen.touchstart&&a.hasTouchCapability&&(e+="touchstart."+t.__namespace+"-triggerOpen"),t._$origin.on(e,function(e){!t._touchIsTouchEvent(e)&&t._touchIsEmulatedEvent(e)||(t.__pointerIsOverOrigin=!0,t._openShortly(e))})}if(t.__options.triggerClose.mouseleave||t.__options.triggerClose.touchleave&&a.hasTouchCapability){var e="";t.__options.triggerClose.mouseleave&&(e+="mouseleave."+t.__namespace+"-triggerOpen "),t.__options.triggerClose.touchleave&&a.hasTouchCapability&&(e+="touchend."+t.__namespace+"-triggerOpen touchcancel."+t.__namespace+"-triggerOpen"),t._$origin.on(e,function(e){t._touchIsMeaningfulEvent(e)&&(t.__pointerIsOverOrigin=!1)})}return t},__prepareTooltip:function(){var e=this,n=e.__options.interactive?"auto":"";return e._$tooltip.attr("id",e.__namespace).css({"pointer-events":n,zIndex:e.__options.zIndex}),t.each(e.__previousThemes,function(t,n){e._$tooltip.removeClass(n)}),t.each(e.__options.theme,function(t,n){e._$tooltip.addClass(n)}),e.__previousThemes=t.merge([],e.__options.theme),e},__scrollHandler:function(e){var n=this;if(n.__options.triggerClose.scroll)n._close(e);else if(i(n._$origin)&&i(n._$tooltip)){var o=null;if(e.target===a.window.document)n.__Geometry.origin.fixedLineage||n.__options.repositionOnScroll&&n.reposition(e);else{o=n.__geometry();var r=!1;if("fixed"!=n._$origin.css("position")&&n.__$originParents.each(function(e,n){var i=t(n),a=i.css("overflow-x"),s=i.css("overflow-y");if("visible"!=a||"visible"!=s){var l=n.getBoundingClientRect();if("visible"!=a&&(o.origin.windowOffset.left<l.left||o.origin.windowOffset.right>l.right))return r=!0,!1;if("visible"!=s&&(o.origin.windowOffset.top<l.top||o.origin.windowOffset.bottom>l.bottom))return r=!0,!1}return"fixed"!=i.css("position")&&void 0}),r)n._$tooltip.css("visibility","hidden");else if(n._$tooltip.css("visibility","visible"),n.__options.repositionOnScroll)n.reposition(e);else{var s=o.origin.offset.left-n.__Geometry.origin.offset.left,l=o.origin.offset.top-n.__Geometry.origin.offset.top;n._$tooltip.css({left:n.__lastPosition.coord.left+s,top:n.__lastPosition.coord.top+l})}}n._trigger({type:"scroll",event:e,geo:o})}return n},__stateSet:function(t){return this.__state=t,this._trigger({type:"state",state:t}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,t.each(this.__timeouts.close,function(t,e){clearTimeout(e)}),this.__timeouts.close=[],this},__trackerStart:function(){var t=this,e=t._$tooltip.find(".tooltipster-content");return t.__options.trackTooltip&&(t.__contentBcr=e[0].getBoundingClientRect()),t.__tracker=setInterval(function(){if(i(t._$origin)&&i(t._$tooltip)){if(t.__options.trackOrigin){var o=t.__geometry(),r=!1;n(o.origin.size,t.__Geometry.origin.size)&&(t.__Geometry.origin.fixedLineage?n(o.origin.windowOffset,t.__Geometry.origin.windowOffset)&&(r=!0):n(o.origin.offset,t.__Geometry.origin.offset)&&(r=!0)),r||(t.__options.triggerClose.mouseleave?t._close():t.reposition())}if(t.__options.trackTooltip){var a=e[0].getBoundingClientRect();a.height===t.__contentBcr.height&&a.width===t.__contentBcr.width||(t.reposition(),t.__contentBcr=a)}}else t._close()},t.__options.trackerInterval),t},_close:function(e,n,i){var o=this,r=!0;if(o._trigger({type:"close",event:e,stop:function(){r=!1}}),r||i){n&&o.__callbacks.close.push(n),o.__callbacks.open=[],o.__timeoutsClear();var s=function(){t.each(o.__callbacks.close,function(t,n){n.call(o,o,{event:e,origin:o._$origin[0]})}),o.__callbacks.close=[]};if("closed"!=o.__state){var l=!0,c=new Date,u=c.getTime(),d=u+o.__options.animationDuration[1];if("disappearing"==o.__state&&d>o.__closingTime&&o.__options.animationDuration[1]>0&&(l=!1),l){o.__closingTime=d,"disappearing"!=o.__state&&o.__stateSet("disappearing");var h=function(){clearInterval(o.__tracker),o._trigger({type:"closing",event:e}),o._$tooltip.off("."+o.__namespace+"-triggerClose").removeClass("tooltipster-dying"),t(a.window).off("."+o.__namespace+"-triggerClose"),o.__$originParents.each(function(e,n){t(n).off("scroll."+o.__namespace+"-triggerClose")}),o.__$originParents=null,t(a.window.document.body).off("."+o.__namespace+"-triggerClose"),o._$origin.off("."+o.__namespace+"-triggerClose"),o._off("dismissable"),o.__stateSet("closed"),o._trigger({type:"after",event:e}),o.__options.functionAfter&&o.__options.functionAfter.call(o,o,{event:e,origin:o._$origin[0]}),s()};a.hasTransitions?(o._$tooltip.css({"-moz-animation-duration":o.__options.animationDuration[1]+"ms","-ms-animation-duration":o.__options.animationDuration[1]+"ms","-o-animation-duration":o.__options.animationDuration[1]+"ms","-webkit-animation-duration":o.__options.animationDuration[1]+"ms","animation-duration":o.__options.animationDuration[1]+"ms","transition-duration":o.__options.animationDuration[1]+"ms"}),o._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),o.__options.animationDuration[1]>0&&o._$tooltip.delay(o.__options.animationDuration[1]),o._$tooltip.queue(h)):o._$tooltip.stop().fadeOut(o.__options.animationDuration[1],h)}}else s()}return o},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(e,n){var o=this;if(!o.__destroying&&i(o._$origin)&&o.__enabled){var r=!0;if("closed"==o.__state&&(o._trigger({type:"before",event:e,stop:function(){r=!1}}),r&&o.__options.functionBefore&&(r=o.__options.functionBefore.call(o,o,{event:e,origin:o._$origin[0]}))),!1!==r&&null!==o.__Content){n&&o.__callbacks.open.push(n),o.__callbacks.close=[],o.__timeoutsClear();var s,l=function(){"stable"!=o.__state&&o.__stateSet("stable"),t.each(o.__callbacks.open,function(t,e){e.call(o,o,{origin:o._$origin[0],tooltip:o._$tooltip[0]})}),o.__callbacks.open=[]};if("closed"!==o.__state)s=0,"disappearing"===o.__state?(o.__stateSet("appearing"),a.hasTransitions?(o._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),o.__options.animationDuration[0]>0&&o._$tooltip.delay(o.__options.animationDuration[0]),o._$tooltip.queue(l)):o._$tooltip.stop().fadeIn(l)):"stable"==o.__state&&l();else{if(o.__stateSet("appearing"),s=o.__options.animationDuration[0],o.__contentInsert(),o.reposition(e,!0),a.hasTransitions?(o._$tooltip.addClass("tooltipster-"+o.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":o.__options.animationDuration[0]+"ms","-ms-animation-duration":o.__options.animationDuration[0]+"ms","-o-animation-duration":o.__options.animationDuration[0]+"ms","-webkit-animation-duration":o.__options.animationDuration[0]+"ms","animation-duration":o.__options.animationDuration[0]+"ms","transition-duration":o.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=o.__state&&(o._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),o.__options.animationDuration[0]>0&&o._$tooltip.delay(o.__options.animationDuration[0]),o._$tooltip.queue(l))},0)):o._$tooltip.css("display","none").fadeIn(o.__options.animationDuration[0],l),o.__trackerStart(),t(a.window).on("resize."+o.__namespace+"-triggerClose",function(e){var n=t(document.activeElement);(n.is("input")||n.is("textarea"))&&t.contains(o._$tooltip[0],n[0])||o.reposition(e)}).on("scroll."+o.__namespace+"-triggerClose",function(t){o.__scrollHandler(t)}),o.__$originParents=o._$origin.parents(),o.__$originParents.each(function(e,n){t(n).on("scroll."+o.__namespace+"-triggerClose",function(t){o.__scrollHandler(t)})}),o.__options.triggerClose.mouseleave||o.__options.triggerClose.touchleave&&a.hasTouchCapability){o._on("dismissable",function(t){t.dismissable?t.delay?(h=setTimeout(function(){o._close(t.event)},t.delay),o.__timeouts.close.push(h)):o._close(t):clearTimeout(h)});var c=o._$origin,u="",d="",h=null;o.__options.interactive&&(c=c.add(o._$tooltip)),o.__options.triggerClose.mouseleave&&(u+="mouseenter."+o.__namespace+"-triggerClose ",d+="mouseleave."+o.__namespace+"-triggerClose "),o.__options.triggerClose.touchleave&&a.hasTouchCapability&&(u+="touchstart."+o.__namespace+"-triggerClose",d+="touchend."+o.__namespace+"-triggerClose touchcancel."+o.__namespace+"-triggerClose"),c.on(d,function(t){if(o._touchIsTouchEvent(t)||!o._touchIsEmulatedEvent(t)){var e="mouseleave"==t.type?o.__options.delay:o.__options.delayTouch;o._trigger({delay:e[1],dismissable:!0,event:t,type:"dismissable"})}}).on(u,function(t){!o._touchIsTouchEvent(t)&&o._touchIsEmulatedEvent(t)||o._trigger({dismissable:!1,event:t,type:"dismissable"})})}o.__options.triggerClose.originClick&&o._$origin.on("click."+o.__namespace+"-triggerClose",function(t){o._touchIsTouchEvent(t)||o._touchIsEmulatedEvent(t)||o._close(t)}),(o.__options.triggerClose.click||o.__options.triggerClose.tap&&a.hasTouchCapability)&&setTimeout(function(){if("closed"!=o.__state){var e="",n=t(a.window.document.body);o.__options.triggerClose.click&&(e+="click."+o.__namespace+"-triggerClose "),o.__options.triggerClose.tap&&a.hasTouchCapability&&(e+="touchend."+o.__namespace+"-triggerClose"),n.on(e,function(e){o._touchIsMeaningfulEvent(e)&&(o._touchRecordEvent(e),o.__options.interactive&&t.contains(o._$tooltip[0],e.target)||o._close(e))}),o.__options.triggerClose.tap&&a.hasTouchCapability&&n.on("touchstart."+o.__namespace+"-triggerClose",function(t){o._touchRecordEvent(t)})}},0),o._trigger("ready"),o.__options.functionReady&&o.__options.functionReady.call(o,o,{origin:o._$origin[0],tooltip:o._$tooltip[0]})}if(o.__options.timer>0){var h=setTimeout(function(){o._close()},o.__options.timer+s);o.__timeouts.close.push(h)}}}return o},_openShortly:function(t){var e=this,n=!0;if("stable"!=e.__state&&"appearing"!=e.__state&&!e.__timeouts.open&&(e._trigger({type:"start",event:t,stop:function(){n=!1}}),n)){var i=0==t.type.indexOf("touch")?e.__options.delayTouch:e.__options.delay;i[0]?e.__timeouts.open=setTimeout(function(){e.__timeouts.open=null,e.__pointerIsOverOrigin&&e._touchIsMeaningfulEvent(t)?(e._trigger("startend"),e._open(t)):e._trigger("startcancel")},i[0]):(e._trigger("startend"),e._open(t))}return e},_optionsExtract:function(e,n){var i=this,o=t.extend(!0,{},n),r=i.__options[e];return r||(r={},t.each(n,function(t,e){var n=i.__options[t];void 0!==n&&(r[t]=n)})),t.each(o,function(e,n){void 0!==r[e]&&("object"!=typeof n||n instanceof Array||null==n||"object"!=typeof r[e]||r[e]instanceof Array||null==r[e]?o[e]=r[e]:t.extend(o[e],r[e]))}),o},_plug:function(e){var n=t.tooltipster._plugin(e);if(!n)throw new Error('The "'+e+'" plugin is not defined');return n.instance&&t.tooltipster.__bridge(n.instance,this,n.name),this},_touchIsEmulatedEvent:function(t){for(var e=!1,n=(new Date).getTime(),i=this.__touchEvents.length-1;i>=0;i--){var o=this.__touchEvents[i];if(!(n-o.time<500))break;o.target===t.target&&(e=!0)}return e},_touchIsMeaningfulEvent:function(t){return this._touchIsTouchEvent(t)&&!this._touchSwiped(t.target)||!this._touchIsTouchEvent(t)&&!this._touchIsEmulatedEvent(t)},_touchIsTouchEvent:function(t){return 0==t.type.indexOf("touch")},_touchRecordEvent:function(t){return this._touchIsTouchEvent(t)&&(t.time=(new Date).getTime(),this.__touchEvents.push(t)),this},_touchSwiped:function(t){for(var e=!1,n=this.__touchEvents.length-1;n>=0;n--){var i=this.__touchEvents[n];if("touchmove"==i.type){e=!0;break}if("touchstart"==i.type&&t===i.target)break}return e},_trigger:function(){var e=Array.prototype.slice.apply(arguments);return"string"==typeof e[0]&&(e[0]={type:e[0]}),e[0].instance=this,e[0].origin=this._$origin?this._$origin[0]:null,e[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,e),t.tooltipster._trigger.apply(t.tooltipster,e),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,e),this},_unplug:function(e){var n=this;if(n[e]){var i=t.tooltipster._plugin(e);i.instance&&t.each(i.instance,function(t,i){n[t]&&n[t].bridged===n[e]&&delete n[t]}),n[e].__destroy&&n[e].__destroy(),delete n[e]}return n},close:function(t){return this.__destroyed?this.__destroyError():this._close(null,t),this},content:function(t){var e=this;if(void 0===t)return e.__Content;if(e.__destroyed)e.__destroyError();else if(e.__contentSet(t),null!==e.__Content){if("closed"!==e.__state&&(e.__contentInsert(),e.reposition(),e.__options.updateAnimation))if(a.hasTransitions){var n=e.__options.updateAnimation;e._$tooltip.addClass("tooltipster-update-"+n),setTimeout(function(){"closed"!=e.__state&&e._$tooltip.removeClass("tooltipster-update-"+n)},1e3)}else e._$tooltip.fadeTo(200,.5,function(){"closed"!=e.__state&&e._$tooltip.fadeTo(200,1)})}else e._close();return e},destroy:function(){var e=this;if(e.__destroyed)e.__destroyError();else{"closed"!=e.__state?e.option("animationDuration",0)._close(null,null,!0):e.__timeoutsClear(),e._trigger("destroy"),e.__destroyed=!0,e._$origin.removeData(e.__namespace).off("."+e.__namespace+"-triggerOpen"),t(a.window.document.body).off("."+e.__namespace+"-triggerOpen");var n=e._$origin.data("tooltipster-ns");if(n)if(1===n.length){var i=null;"previous"==e.__options.restoration?i=e._$origin.data("tooltipster-initialTitle"):"current"==e.__options.restoration&&(i="string"==typeof e.__Content?e.__Content:t("<div></div>").append(e.__Content).html()),i&&e._$origin.attr("title",i),e._$origin.removeClass("tooltipstered"),e._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else n=t.grep(n,function(t,n){return t!==e.__namespace}),e._$origin.data("tooltipster-ns",n);e._trigger("destroyed"),e._off(),e.off(),e.__Content=null,e.__$emitterPrivate=null,e.__$emitterPublic=null,e.__options.parent=null,e._$origin=null,e._$tooltip=null,t.tooltipster.__instancesLatestArr=t.grep(t.tooltipster.__instancesLatestArr,function(t,n){return e!==t}),clearInterval(e.__garbageCollector)}return e},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return this.__destroyed?void this.__destroyError():this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(t){return this.close(t)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(t){return this.__destroyed?this.__destroyError():this._open(null,t),this},option:function(e,n){return void 0===n?this.__options[e]:(this.__destroyed?this.__destroyError():(this.__options[e]=n,this.__optionsFormat(),t.inArray(e,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===e&&this.__prepareGC()),this)},reposition:function(t,e){var n=this;return n.__destroyed?n.__destroyError():"closed"!=n.__state&&i(n._$origin)&&(e||i(n._$tooltip))&&(e||n._$tooltip.detach(),n.__Geometry=n.__geometry(),n._trigger({type:"reposition",event:t,helper:{geo:n.__Geometry}})),n},show:function(t){return this.open(t)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},t.fn.tooltipster=function(){var e=Array.prototype.slice.apply(arguments),n="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";if(0===this.length)return this;if("string"==typeof e[0]){var i="#*$~&";return this.each(function(){var o=t(this).data("tooltipster-ns"),r=o?t(this).data(o[0]):null;if(!r)throw new Error("You called Tooltipster's \""+e[0]+'" method on an uninitialized element');if("function"!=typeof r[e[0]])throw new Error('Unknown method "'+e[0]+'"');this.length>1&&"content"==e[0]&&(e[1]instanceof t||"object"==typeof e[1]&&null!=e[1]&&e[1].tagName)&&!r.__options.contentCloning&&r.__options.debug&&console.log(n);var a=r[e[0]](e[1],e[2]);return a!==r||"instance"===e[0]?(i=a,!1):void 0}),"#*$~&"!==i?i:this}t.tooltipster.__instancesLatestArr=[];var r=e[0]&&void 0!==e[0].multiple,a=r&&e[0].multiple||!r&&o.multiple,s=e[0]&&void 0!==e[0].content,l=s&&e[0].content||!s&&o.content,c=e[0]&&void 0!==e[0].contentCloning,u=c&&e[0].contentCloning||!c&&o.contentCloning,d=e[0]&&void 0!==e[0].debug,h=d&&e[0].debug||!d&&o.debug;return this.length>1&&(l instanceof t||"object"==typeof l&&null!=l&&l.tagName)&&!u&&h&&console.log(n),this.each(function(){var n=!1,i=t(this),o=i.data("tooltipster-ns"),r=null;o?a?n=!0:h&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):n=!0,n&&(r=new t.Tooltipster(this,e[0]),o||(o=[]),o.push(r.__namespace),i.data("tooltipster-ns",o),i.data(r.__namespace,r),r.__options.functionInit&&r.__options.functionInit.call(r,r,{origin:this}),r._trigger("init")),t.tooltipster.__instancesLatestArr.push(r)}),this},e.prototype={__init:function(e){this.__$tooltip=e,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=t('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(a.window.document.body)},__forceRedraw:function(){var t=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(t)},constrain:function(t,e){return this.constraints={width:t,height:e},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:t}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var t=this.__$tooltip[0].getBoundingClientRect(),e={size:{height:t.height||t.bottom-t.top,width:t.width||t.right-t.left}};if(this.constraints){var n=this.__$tooltip.find(".tooltipster-content"),i=this.__$tooltip.outerHeight(),o=n[0].getBoundingClientRect(),r={height:i<=this.constraints.height,width:t.width<=this.constraints.width&&o.width>=n[0].scrollWidth-1};e.fits=r.height&&r.width}return a.IE&&a.IE<=11&&e.size.width!==a.window.document.documentElement.clientWidth&&(e.size.width=Math.ceil(e.size.width)+1),e}};var l=navigator.userAgent.toLowerCase();-1!=l.indexOf("msie")?a.IE=parseInt(l.split("msie")[1]):-1!==l.toLowerCase().indexOf("trident")&&-1!==l.indexOf(" rv:11")?a.IE=11:-1!=l.toLowerCase().indexOf("edge/")&&(a.IE=parseInt(l.toLowerCase().split("edge/")[1]));var c="tooltipster.sideTip";return t.tooltipster._plugin({name:c,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(t){var e=this;e.__instance=t,e.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),e.__previousState="closed",e.__options,e.__optionsFormat(),e.__instance._on("state."+e.__namespace,function(t){"closed"==t.state?e.__close():"appearing"==t.state&&"closed"==e.__previousState&&e.__create(),e.__previousState=t.state}),e.__instance._on("options."+e.__namespace,function(){e.__optionsFormat()}),e.__instance._on("reposition."+e.__namespace,function(t){e.__reposition(t.event,t.helper)})},__close:function(){this.__instance.content()instanceof t&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var e=t('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||e.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&e.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&e.css("max-width",this.__options.maxWidth+"px"),this.__instance._$tooltip=e,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var e=this;if(e.__options=e.__instance._optionsExtract(c,e.__defaults()),e.__options.position&&(e.__options.side=e.__options.position),"object"!=typeof e.__options.distance&&(e.__options.distance=[e.__options.distance]),e.__options.distance.length<4&&(void 0===e.__options.distance[1]&&(e.__options.distance[1]=e.__options.distance[0]),void 0===e.__options.distance[2]&&(e.__options.distance[2]=e.__options.distance[0]),void 0===e.__options.distance[3]&&(e.__options.distance[3]=e.__options.distance[1]),e.__options.distance={top:e.__options.distance[0],right:e.__options.distance[1],bottom:e.__options.distance[2],left:e.__options.distance[3]}),"string"==typeof e.__options.side){var n={top:"bottom",right:"left",bottom:"top",left:"right"};e.__options.side=[e.__options.side,n[e.__options.side]],"left"==e.__options.side[0]||"right"==e.__options.side[0]?e.__options.side.push("top","bottom"):e.__options.side.push("right","left")}6===t.tooltipster._env.IE&&!0!==e.__options.arrow&&(e.__options.arrow=!1)},__reposition:function(e,n){var i,o=this,r=o.__targetFind(n),a=[];o.__instance._$tooltip.detach();var s=o.__instance._$tooltip.clone(),l=t.tooltipster._getRuler(s),c=!1,u=o.__instance.option("animation");switch(u&&s.removeClass("tooltipster-"+u),t.each(["window","document"],function(i,u){var d=null;if(o.__instance._trigger({container:u,helper:n,satisfied:c,takeTest:function(t){d=t},results:a,type:"positionTest"}),1==d||0!=d&&0==c&&("window"!=u||o.__options.viewportAware))for(var i=0;i<o.__options.side.length;i++){var h={horizontal:0,vertical:0},p=o.__options.side[i];"top"==p||"bottom"==p?h.vertical=o.__options.distance[p]:h.horizontal=o.__options.distance[p],o.__sideChange(s,p),t.each(["natural","constrained"],function(t,i){if(d=null,o.__instance._trigger({container:u,event:e,helper:n,mode:i,results:a,satisfied:c,side:p,takeTest:function(t){d=t},type:"positionTest"}),1==d||0!=d&&0==c){var s={container:u,distance:h,fits:null,mode:i,outerSize:null,side:p,size:null,target:r[p],whole:null},f="natural"==i?l.free():l.constrain(n.geo.available[u][p].width-h.horizontal,n.geo.available[u][p].height-h.vertical),m=f.measure();if(s.size=m.size,s.outerSize={height:m.size.height+h.vertical,width:m.size.width+h.horizontal},"natural"==i?n.geo.available[u][p].width>=s.outerSize.width&&n.geo.available[u][p].height>=s.outerSize.height?s.fits=!0:s.fits=!1:s.fits=m.fits,"window"==u&&(s.fits?s.whole="top"==p||"bottom"==p?n.geo.origin.windowOffset.right>=o.__options.minIntersection&&n.geo.window.size.width-n.geo.origin.windowOffset.left>=o.__options.minIntersection:n.geo.origin.windowOffset.bottom>=o.__options.minIntersection&&n.geo.window.size.height-n.geo.origin.windowOffset.top>=o.__options.minIntersection:s.whole=!1),a.push(s),s.whole)c=!0;else if("natural"==s.mode&&(s.fits||s.size.width<=n.geo.available[u][p].width))return!1}})}}),o.__instance._trigger({edit:function(t){a=t},event:e,helper:n,results:a,type:"positionTested"}),a.sort(function(t,e){if(t.whole&&!e.whole)return-1;if(!t.whole&&e.whole)return 1;if(t.whole&&e.whole){var n=o.__options.side.indexOf(t.side),i=o.__options.side.indexOf(e.side);return i>n?-1:n>i?1:"natural"==t.mode?-1:1}if(t.fits&&!e.fits)return-1;if(!t.fits&&e.fits)return 1;if(t.fits&&e.fits){var n=o.__options.side.indexOf(t.side),i=o.__options.side.indexOf(e.side);return i>n?-1:n>i?1:"natural"==t.mode?-1:1}return"document"==t.container&&"bottom"==t.side&&"natural"==t.mode?-1:1}),i=a[0],i.coord={},i.side){case"left":case"right":i.coord.top=Math.floor(i.target-i.size.height/2);break;case"bottom":case"top":i.coord.left=Math.floor(i.target-i.size.width/2)}switch(i.side){case"left":i.coord.left=n.geo.origin.windowOffset.left-i.outerSize.width;break;case"right":i.coord.left=n.geo.origin.windowOffset.right+i.distance.horizontal;break;case"top":i.coord.top=n.geo.origin.windowOffset.top-i.outerSize.height;break;case"bottom":i.coord.top=n.geo.origin.windowOffset.bottom+i.distance.vertical}"window"==i.container?"top"==i.side||"bottom"==i.side?i.coord.left<0?n.geo.origin.windowOffset.right-this.__options.minIntersection>=0?i.coord.left=0:i.coord.left=n.geo.origin.windowOffset.right-this.__options.minIntersection-1:i.coord.left>n.geo.window.size.width-i.size.width&&(n.geo.origin.windowOffset.left+this.__options.minIntersection<=n.geo.window.size.width?i.coord.left=n.geo.window.size.width-i.size.width:i.coord.left=n.geo.origin.windowOffset.left+this.__options.minIntersection+1-i.size.width):i.coord.top<0?n.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?i.coord.top=0:i.coord.top=n.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:i.coord.top>n.geo.window.size.height-i.size.height&&(n.geo.origin.windowOffset.top+this.__options.minIntersection<=n.geo.window.size.height?i.coord.top=n.geo.window.size.height-i.size.height:i.coord.top=n.geo.origin.windowOffset.top+this.__options.minIntersection+1-i.size.height):(i.coord.left>n.geo.window.size.width-i.size.width&&(i.coord.left=n.geo.window.size.width-i.size.width),i.coord.left<0&&(i.coord.left=0)),o.__sideChange(s,i.side),n.tooltipClone=s[0],n.tooltipParent=o.__instance.option("parent").parent[0],n.mode=i.mode,n.whole=i.whole,n.origin=o.__instance._$origin[0],n.tooltip=o.__instance._$tooltip[0],delete i.container,delete i.fits,delete i.mode,delete i.outerSize,delete i.whole,i.distance=i.distance.horizontal||i.distance.vertical;var d=t.extend(!0,{},i);if(o.__instance._trigger({edit:function(t){i=t},event:e,helper:n,position:d,type:"position"}),o.__options.functionPosition){var h=o.__options.functionPosition.call(o,o.__instance,n,d);h&&(i=h)}l.destroy();var p,f;"top"==i.side||"bottom"==i.side?(p={prop:"left",val:i.target-i.coord.left},f=i.size.width-this.__options.minIntersection):(p={prop:"top",val:i.target-i.coord.top},f=i.size.height-this.__options.minIntersection),p.val<this.__options.minIntersection?p.val=this.__options.minIntersection:p.val>f&&(p.val=f);var m;m=n.geo.origin.fixedLineage?n.geo.origin.windowOffset:{left:n.geo.origin.windowOffset.left+n.geo.window.scroll.left,top:n.geo.origin.windowOffset.top+n.geo.window.scroll.top},i.coord={left:m.left+(i.coord.left-n.geo.origin.windowOffset.left),top:m.top+(i.coord.top-n.geo.origin.windowOffset.top)},o.__sideChange(o.__instance._$tooltip,i.side),n.geo.origin.fixedLineage?o.__instance._$tooltip.css("position","fixed"):o.__instance._$tooltip.css("position",""),o.__instance._$tooltip.css({left:i.coord.left,top:i.coord.top,height:i.size.height,width:i.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(p.prop,p.val),o.__instance._$tooltip.appendTo(o.__instance.option("parent")),o.__instance._trigger({type:"repositioned",event:e,position:i})},__sideChange:function(t,e){t.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+e)},__targetFind:function(t){var e={},n=this.__instance._$origin[0].getClientRects();if(n.length>1&&1==this.__instance._$origin.css("opacity")&&(this.__instance._$origin.css("opacity",.99),n=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1)),n.length<2)e.top=Math.floor(t.geo.origin.windowOffset.left+t.geo.origin.size.width/2),e.bottom=e.top,e.left=Math.floor(t.geo.origin.windowOffset.top+t.geo.origin.size.height/2),e.right=e.left;else{var i=n[0];e.top=Math.floor(i.left+(i.right-i.left)/2),i=n.length>2?n[Math.ceil(n.length/2)-1]:n[0],e.right=Math.floor(i.top+(i.bottom-i.top)/2),i=n[n.length-1],e.bottom=Math.floor(i.left+(i.right-i.left)/2),i=n.length>2?n[Math.ceil((n.length+1)/2)-1]:n[n.length-1],e.left=Math.floor(i.top+(i.bottom-i.top)/2)}return e}}}),t})},function(t,e){},function(t,e,n){"use strict";(function(t){function i(){t(document).on("click",".wprm-manage-recipes-seo",function(e){e.preventDefault();var n=t(this).data("id");r.a.open(!1,{recipe_id:n})}),t(document).on("change",".wprm-manage-ingredients-link-nofollow",function(e){e.preventDefault();var n=t(this).data("id"),i=t(this).val();o.e(n,"ingredient_link_nofollow",i)}),t(document).on("click",".wprm-manage-ingredients-actions-rename",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-ingredients-name-"+n).text(),r=prompt('What do you want to rename "'+i+'" to?',i).trim();r&&o.d(n,"ingredient",r)}),t(document).on("click",".wprm-manage-ingredients-actions-link",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-ingredients-name-"+n).text(),r=t("#wprm-manage-ingredients-link-"+n),a=r.text(),s=prompt('What do you want the link for "'+i+'" to be?',a).trim();o.e(n,"ingredient_link",s)}),t(document).on("click",".wprm-manage-ingredients-actions-merge",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-ingredients-name-"+n).text(),r=parseInt(prompt('What is the ID of the ingredient that you want to merge "'+i+'" into?',""));r&&o.a(n,"ingredient",r)}),t(document).on("click",".wprm-manage-taxonomies-actions-rename",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-taxonomies-name-"+n).text(),r=t(".wprm-manage-taxonomies").data("taxonomy"),a=prompt('What do you want to rename "'+i+'" to?',i).trim();a&&o.d(n,r,a)}),t(document).on("click",".wprm-manage-taxonomies-actions-merge",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-taxonomies-name-"+n).text(),r=t(".wprm-manage-taxonomies").data("taxonomy"),a=parseInt(prompt('What is the ID of the term that you want to merge "'+i+'" into?',""));a&&o.a(n,r,a)}),t(document).on("click",".wprm-manage-ingredients-actions-delete",function(e){e.preventDefault();var n=t(this).data("id");o.a(n,"ingredient",0)}),t(document).on("click",".wprm-manage-taxonomies-actions-delete",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-taxonomies-name-"+n).text(),r=t(".wprm-manage-taxonomies").data("taxonomy");confirm('Are you sure you want to delete "'+i+'"?')&&o.a(n,r,0)}),t(document).on("click",".wprm-manage-recipes-actions-edit",function(e){e.preventDefault();var n=t(this).data("id");r.a.open(!1,{recipe_id:n})}),t(document).on("click",".wprm-manage-recipes-actions-delete",function(e){e.preventDefault();var n=t(this).data("id"),i=t("#wprm-manage-recipes-name-"+n).text();confirm('Are you sure you want to delete "'+i+'"?')&&o.b(n)}),t(document).on("click",".wprm-manage-ingredients-bulk-delete",function(e){e.preventDefault();var n=t(".wprm-manage-ingredients-bulk:checkbox:checked"),i=[];n.each(function(){i.push(parseInt(t(this).val()))}),i.length>0&&o.c(i,"ingredient",0)})}e.a=i;var o=n(38),r=n(1)}).call(e,n(0))},function(t,e,n){"use strict";(function(t){function n(e,n,i){var o={action:"wprm_rename_term",security:wprm_temp_admin.nonce,term_id:e,taxonomy:n,new_name:i};t.post(wprm_temp_admin.ajax_url,o,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}function i(e,n,i){var o={action:"wprm_update_term_metadata",security:wprm_temp_admin.nonce,term_id:e,field:n,value:i};t.post(wprm_temp_admin.ajax_url,o,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}function o(e,n,i){var o={action:"wprm_delete_or_merge_term",security:wprm_temp_admin.nonce,term_id:e,taxonomy:n,new_term_id:i};t.post(wprm_temp_admin.ajax_url,o,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}function r(e,n){var i={action:"wprm_delete_terms",security:wprm_temp_admin.nonce,term_ids:e,taxonomy:n};t.post(wprm_temp_admin.ajax_url,i,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}function a(e){var n={action:"wprm_delete_recipe",security:wprm_temp_admin.nonce,recipe_id:e};t.post(wprm_temp_admin.ajax_url,n,function(){t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1)})}e.d=n,e.e=i,e.a=o,e.c=r,e.b=a}).call(e,n(0))},function(t,e){},function(t,e,n){"use strict";(function(t){var e=n(1),i=(n(41),n(43),n(44),n(45));n.n(i),t(document).ready(function(n){var i=t(".wprm-modal-container");i&&e.a.init(i)})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){function e(){t(".wprm-button-import-text-reset").removeAttr("disabled"),t(".wprm-button-import-text-clear").removeAttr("disabled"),t(".wprm-button-import-text-next").removeAttr("disabled"),h="input",t("#import-text-highlight-sandbox").textHighlighter(),p=t("#import-text-highlight-sandbox").getHighlighter()}function i(){o(!0),t("#import-text-highlight-sandbox").text(""),f={},m=!1,t(".wprm-button-import-text-reset").attr("disabled","disabled"),t(".wprm-button-import-text-clear").attr("disabled","disabled"),t(".wprm-button-import-text-next").attr("disabled","disabled"),t(".import-text-step").hide(),t("#import-text-step-input").show(),t("#import-text-highlight-sandbox").hide()}function o(e){(e||"input"==h)&&t("#import-text-input-recipe").val(""),(e||"ingredient-groups"==h)&&t("#import-text-ingredient-groups").find("input").attr("checked",!1),(e||"instruction-groups"==h)&&t("#import-text-instruction-groups").find("input").attr("checked",!1),p.removeHighlights()}function r(){if("input"==h)f.raw=t("#import-text-input-recipe").val(),t("#import-text-highlight-sandbox").html(f.raw.replace(/\r?\n/g,"<br/>")).show(),h="name";else if("name"==h)f.name=s(),h="summary";else if("summary"==h)f.summary=s(),t("#import-text-highlight-sandbox").show(),h="ingredients";else if("ingredients"==h){var e=p.getHighlights();f.ingredients_raw=e,t("#import-text-ingredient-groups").html("");for(var n=0,i=e.length;n<i;n++){var o=t(e[n]).text().trim();o=o.replace(/^(\d\.\s+|[a-z]\)\s+|•\s+|[A-Z]\.\s+|[IVX]+\.\s+)/g,"");var r='<div class="import-text-ingredient"><input type="checkbox" id="ingredient-'+n+'"> <label for="ingredient-'+n+'">'+o+"</label></div>";t("#import-text-ingredient-groups").append(r)}t(".import-text-group-warning").hide(),0==e.length?(t("#import-text-highlight-sandbox").show(),f.ingredients=[],h="instructions"):(t("#import-text-highlight-sandbox").hide(),h="ingredient-groups")}else if("ingredient-groups"==h){var e=[],c={name:"",ingredients:[]};t("#import-text-ingredient-groups").find(".import-text-ingredient").each(function(){var n=t(this).find("input").is(":checked"),i=t(this).find("label").text();n?(e.push(c),c={name:i,ingredients:[]}):c.ingredients.push({raw:i})}),e.push(c),f.ingredients=[];var u={action:"wprm_parse_ingredients",security:wprm_temp_admin.nonce,ingredients:e};m=!0,t.post(wprm_temp_admin.ajax_url,u,function(t){m=!1,t.success&&(f.ingredients=t.data.ingredients)},"json"),t("#import-text-highlight-sandbox").show(),h="instructions"}else if("instructions"==h){var d=p.getHighlights();f.instructions_raw=d,t("#import-text-instruction-groups").html("");for(var n=0,i=d.length;n<i;n++){var o=t(d[n]).text().trim();o=o.replace(/^(\d\.\s+|[a-z]\)\s+|•\s+|[A-Z]\.\s+|[IVX]+\.\s+)/g,"");var g='<div class="import-text-instruction"><input type="checkbox" id="instruction-'+n+'"> <label for="instruction-'+n+'">'+o+"</label></div>";t("#import-text-instruction-groups").append(g)}t(".import-text-group-warning").hide(),0==d.length?(t("#import-text-highlight-sandbox").show(),f.instructions=[],h="notes"):(t("#import-text-highlight-sandbox").hide(),h="instruction-groups")}else if("instruction-groups"==h){var d=[],v={name:"",instructions:[]};t("#import-text-instruction-groups").find(".import-text-instruction").each(function(){var e=t(this).find("input").is(":checked"),n=t(this).find("label").text();e?(d.push(v),v={name:n,instructions:[]}):v.instructions.push({text:n})}),d.push(v),f.instructions=d,t("#import-text-highlight-sandbox").show(),h="notes"}else"notes"==h?(f.notes=s(),t("#import-text-highlight-sandbox").hide(),t(".wprm-button-import-text-reset").attr("disabled","disabled"),t(".wprm-button-import-text-clear").attr("disabled","disabled"),t(".wprm-button-import-text-next").attr("disabled","disabled"),m?(h="waiting",a()):(t(".wprm-button-import-text-reset").removeAttr("disabled"),l(),h="finished")):"waiting"==h&&(m||(t(".wprm-button-import-text-reset").removeAttr("disabled"),l(),h="finished"));t(".import-text-step").hide(),t("#import-text-step-"+h).show(),p.removeHighlights()}function a(){m?setTimeout(a,200):r()}function s(){for(var e=p.getHighlights(),n="",i=0,o=e.length;i<o;i++)i>0&&(n+=" "),n+=t(e[i]).text().trim();return n}function l(){f.name&&t("#wprm-recipe-name").val(f.name),f.summary&&d.a.set(f.summary),f.notes&&("undefined"!=typeof tinyMCE&&tinyMCE.get("wprm_recipe_notes")&&!tinyMCE.get("wprm_recipe_notes").isHidden()?(tinyMCE.get("wprm_recipe_notes").focus(!0),tinyMCE.activeEditor.setContent(f.notes)):t("#wprm_recipe_notes").val(f.notes)),f.instructions.length>0&&u.a.setInstructions(f.instructions),f.ingredients.length>0&&u.a.setIngredients(f.ingredients)}var c=n(42),u=(n.n(c),n(1),n(2)),d=n(9),h="",p=void 0,f={},m=!1;t(document).ready(function(n){t("#import-text-input-recipe").on("keydown change",function(){e()}),t(".wprm-button-import-text-reset").on("click",function(){confirm(wprm_temp_admin.modal.text.import_text_reset)&&i()}),t(".wprm-button-import-text-clear").on("click",function(){o(!1)}),t(".wprm-button-import-text-next").on("click",function(){r()}),t(".import-text-input-groups").on("change","input",function(){var e=t(this).parents(".import-text-input-groups");e.find("input").length==e.find("input:checked").length&&t(".import-text-group-warning").show()})})}).call(e,n(0))},function(t,e,n){(function(t){!function(t){function e(t,e){return c(t).color()===c(e).color()}function n(t,e){t=t||{};for(var n in e)e.hasOwnProperty(n)&&void 0===t[n]&&(t[n]=e[n]);return t}function i(t){return t.filter(function(t,e,n){return n.indexOf(t)===e})}function o(t,e){t.sort(function(t,n){return c(e?n:t).parents().length-c(e?t:n).parents().length})}function r(t){var e=[],n={},i=[];return t.forEach(function(t){var i=t.getAttribute("data-timestamp");void 0===n[i]&&(n[i]=[],e.push(i)),n[i].push(t)}),e.forEach(function(t){var e=n[t];i.push({chunks:e,timestamp:t,toString:function(){return e.map(function(t){return t.textContent}).join("")}})}),i}function a(t,e){t.addEventListener("mouseup",e.highlightHandler.bind(e)),t.addEventListener("touchend",e.highlightHandler.bind(e))}function s(t,e){if(!t)throw"Missing anchor element";this.el=t,this.options=n(e,{color:"#ffff7b",highlightedClass:"highlighted",contextClass:"highlighter-context",onRemoveHighlight:function(){return!0},onBeforeHighlight:function(){return!0},onAfterHighlight:function(){}}),c(this.el).addClass(this.options.contextClass),a(this.el,this)}var l="SCRIPT STYLE SELECT OPTION BUTTON OBJECT APPLET VIDEO AUDIO CANVAS EMBED PARAM METER PROGRESS".split(" "),c=function t(e){return{addClass:function(t){e.classList?e.classList.add(t):e.className+=" "+t},removeClass:function(t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t+"(\\b|$)","gi")," ")},prepend:function(t){t=Array.prototype.slice.call(t);for(var n=t.length;n--;)e.insertBefore(t[n],e.firstChild)},append:function(t){t=Array.prototype.slice.call(t);for(var n=0,i=t.length;n<i;++n)e.appendChild(t[n])},insertAfter:function(t){return t.parentNode.insertBefore(e,t.nextSibling)},insertBefore:function(t){return t.parentNode.insertBefore(e,t)},remove:function(){e.parentNode.removeChild(e),e=null},contains:function(t){return e!==t&&e.contains(t)},wrap:function(t){return e.parentNode&&e.parentNode.insertBefore(t,e),t.appendChild(e),t},unwrap:function(){var n,i=Array.prototype.slice.call(e.childNodes);return i.forEach(function(e){n=e.parentNode,t(e).insertBefore(e.parentNode),t(n).remove()}),i},parents:function(){for(var t,n=[];t=e.parentNode;)n.push(t),e=t;return n},normalizeTextNodes:function(){if(e){if(3===e.nodeType)for(;e.nextSibling&&3===e.nextSibling.nodeType;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else t(e.firstChild).normalizeTextNodes();t(e.nextSibling).normalizeTextNodes()}},color:function(){return e.style.backgroundColor},fromHTML:function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes},getRange:function(){var n,i=t(e).getSelection();return 0<i.rangeCount&&(n=i.getRangeAt(0)),n},removeAllRanges:function(){t(e).getSelection().removeAllRanges()},getSelection:function(){return t(e).getWindow().getSelection()},getWindow:function(){return t(e).getDocument().defaultView},getDocument:function(){return e.ownerDocument||e}}};s.prototype.destroy=function(){var t=this.el;t.removeEventListener("mouseup",this.highlightHandler.bind(this)),t.removeEventListener("touchend",this.highlightHandler.bind(this)),c(this.el).removeClass(this.options.contextClass)},s.prototype.highlightHandler=function(){this.doHighlight()},s.prototype.doHighlight=function(t){var e,n,i=c(this.el).getRange();i&&!i.collapsed&&(!0===this.options.onBeforeHighlight(i)&&(n=+new Date,e=s.createWrapper(this.options),e.setAttribute("data-timestamp",n),e=this.highlightRange(i,e),e=this.normalizeHighlights(e),this.options.onAfterHighlight(i,e,n)),t||c(this.el).removeAllRanges())},s.prototype.highlightRange=function(t,e){var n;if(!t||t.collapsed)return[];var i=t.startContainer;n=t.endContainer;var o=t.commonAncestorContainer,r=!0;if(0===t.endOffset){for(;!n.previousSibling&&n.parentNode!==o;)n=n.parentNode;n=n.previousSibling}else 3===n.nodeType?t.endOffset<n.nodeValue.length&&n.splitText(t.endOffset):0<t.endOffset&&(n=n.childNodes.item(t.endOffset-1));3===i.nodeType?t.startOffset===i.nodeValue.length?r=!1:0<t.startOffset&&(i=i.splitText(t.startOffset),n===i.previousSibling&&(n=i)):i=t.startOffset<i.childNodes.length?i.childNodes.item(t.startOffset):i.nextSibling;var a,s=r,r=!1,o=[];do{s&&3===i.nodeType&&(-1===l.indexOf(i.parentNode.tagName)&&""!==i.nodeValue.trim()&&(s=e.cloneNode(!0),s.setAttribute("data-highlighted",!0),a=i.parentNode,c(this.el).contains(a)||a===this.el)&&(s=c(i).wrap(s),o.push(s)),s=!1),i!==n||n.hasChildNodes()&&s||(r=!0),i.tagName&&-1<l.indexOf(i.tagName)&&(n.parentNode===i&&(r=!0),s=!1),s&&i.hasChildNodes()?i=i.firstChild:i.nextSibling?(i=i.nextSibling,s=!0):(i=i.parentNode,s=!1)}while(!r);return o},s.prototype.normalizeHighlights=function(t){return this.flattenNestedHighlights(t),this.mergeSiblingHighlights(t),t=t.filter(function(t){return t.parentElement?t:null}),t=i(t),t.sort(function(t,e){return t.offsetTop-e.offsetTop||t.offsetLeft-e.offsetLeft}),t},s.prototype.flattenNestedHighlights=function(t){var n,i=this;o(t,!0);do{n=function(){var n=!1;return t.forEach(function(o,r){var a=o.parentElement,s=a.previousSibling,l=a.nextSibling;i.isHighlight(a)&&(e(a,o)?(a.replaceChild(o.firstChild,o),t[r]=a,n=!0):(o.nextSibling||(c(o).insertBefore(l||a),n=!0),o.previousSibling||(c(o).insertAfter(s||a),n=!0),a.hasChildNodes()||c(a).remove()))}),n}()}while(n)},s.prototype.mergeSiblingHighlights=function(t){function n(t,n){return n&&1===n.nodeType&&e(t,n)&&i.isHighlight(n)}var i=this;t.forEach(function(t){var e=t.previousSibling,i=t.nextSibling;n(t,e)&&(c(t).prepend(e.childNodes),c(e).remove()),n(t,i)&&(c(t).append(i.childNodes),c(i).remove()),c(t).normalizeTextNodes()})},s.prototype.setColor=function(t){this.options.color=t},s.prototype.getColor=function(){return this.options.color},s.prototype.removeHighlights=function(t){function e(t){c(t).unwrap().forEach(function(t){var e=t.previousSibling,n=t.nextSibling;e&&3===e.nodeType&&(t.nodeValue=e.nodeValue+t.nodeValue,c(e).remove()),n&&3===n.nodeType&&(t.nodeValue+=n.nodeValue,c(n).remove())})}t=this.getHighlights({container:t||this.el});var n=this;o(t,!0),t.forEach(function(t){!0===n.options.onRemoveHighlight(t)&&e(t)})},s.prototype.getHighlights=function(t){t=n(t,{container:this.el,andSelf:!0,grouped:!1});var e=t.container.querySelectorAll("[data-highlighted]"),e=Array.prototype.slice.call(e);return!0===t.andSelf&&t.container.hasAttribute("data-highlighted")&&e.push(t.container),t.grouped&&(e=r(e)),e},s.prototype.isHighlight=function(t){return t&&1===t.nodeType&&t.hasAttribute("data-highlighted")},s.prototype.serializeHighlights=function(){var t=this.getHighlights(),e=this.el,n=[];return o(t,!1),t.forEach(function(t){var i,o=0,r=t.textContent.length,a=t,s=[];do{i=Array.prototype.slice.call(a.parentNode.childNodes),s.unshift(i.indexOf(a)),a=a.parentNode}while(a!==e||!a);a=t.cloneNode(!0),a.innerHTML="",a=a.outerHTML,t.previousSibling&&3===t.previousSibling.nodeType&&(o=t.previousSibling.length),n.push([a,t.textContent,s.join(":"),o,r])}),JSON.stringify(n)},s.prototype.deserializeHighlights=function(t){var e,n=[],i=this;if(!t)return n;try{e=JSON.parse(t)}catch(t){throw"Can't parse JSON: "+t}return e.forEach(function(t){try{for(var e,o,r,a=t[0],s=t[2].split(":"),l=t[3],u=t[4],d=s.pop(),h=i.el;r=s.shift();)h=h.childNodes[r];h.childNodes[d-1]&&3===h.childNodes[d-1].nodeType&&--d,h=h.childNodes[d],e=h.splitText(l),e.splitText(u),e.nextSibling&&!e.nextSibling.nodeValue&&c(e.nextSibling).remove(),e.previousSibling&&!e.previousSibling.nodeValue&&c(e.previousSibling).remove(),o=c(e).wrap(c().fromHTML(a)[0]),n.push(o)}catch(t){console&&console.warn&&console.warn("Can't deserialize highlight descriptor. Cause: "+t)}}),n},s.prototype.find=function(t,e){var n=c(this.el).getWindow(),i=n.scrollX,o=n.scrollY,r=void 0===e||e;if(c(this.el).removeAllRanges(),n.find)for(;n.find(t,r);)this.doHighlight(!0);else if(n.document.body.createTextRange){var a=n.document.body.createTextRange();for(a.moveToElementText(this.el);a.findText(t,1,r?4:0)&&(c(this.el).contains(a.parentElement())||a.parentElement()===this.el);)a.select(),this.doHighlight(!0),a.collapse(!1)}c(this.el).removeAllRanges(),n.scrollTo(i,o)},s.createWrapper=function(t){var e=document.createElement("span");return e.style.backgroundColor=t.color,e.className=t.highlightedClass,e},t.TextHighlighter=s}(window),function(t){function e(t,e){return function(){e.call(this,t)}}t.fn.getHighlighter=function(){return this.data("textHighlighter")},t.fn.textHighlighter=function(n){return this.each(function(){var i,o=this;t.data(o,"textHighlighter")||(i=new TextHighlighter(o,n),i.destroy=e(i.destroy,function(e){e.call(i),t(o).removeData("textHighlighter")}),t.data(o,"textHighlighter",i))})}}(t)}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e=n(1),i=n(3);e.a.actions.reset_snippets=function(e){t("#wprm-recipe-jump-id").val("0").trigger("change"),t("#wprm-recipe-jump-text").val(""),t("#wprm-recipe-print-id").val("0").trigger("change"),t("#wprm-recipe-print-text").val("")},e.a.actions.insert_jump_to_recipe=function(n){var o=parseInt(t("#wprm-recipe-jump-id").val()),r=i.shortcode_escape(t("#wprm-recipe-jump-text").val()),a="[wprm-recipe-jump";o>0&&(a+=' id="'+o+'"'),r&&(a+=' text="'+r+'"'),a+="]",i.add_text_to_editor(a),e.a.close()},e.a.actions.insert_print_recipe=function(n){var o=parseInt(t("#wprm-recipe-print-id").val()),r=i.shortcode_escape(t("#wprm-recipe-print-text").val()),a="[wprm-recipe-print";o>0&&(a+=' id="'+o+'"'),r&&(a+=' text="'+r+'"'),a+="]",i.add_text_to_editor(a),e.a.close()}}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e=n(3),i=n(1),o=n(2);i.a.actions.set_recipe=function(n){var r=n.recipe_id?n.recipe_id:0,a=n.clone_recipe_id?n.clone_recipe_id:0;if(o.a.id=r,o.a.type=0===r?"insert":"update",o.a.fields=!1,o.a.ingredients={},o.a.instructions={},o.a.clear(),"insert"===o.a.type){var s=t(".wprm-button-action"),l=t(".wprm-button-action-save");if(t(".wprm-router.active").find(".wprm-menu-item").each(function(){t(this).data("button",wprm_temp_admin.modal.text.action_button_insert)}),s.text(wprm_temp_admin.modal.text.action_button_insert),l.show(),a){var c={action:"wprm_get_recipe",security:wprm_temp_admin.nonce,recipe_id:a};e.start_loader(s),e.start_loader(l),t.post(wprm_temp_admin.ajax_url,c,function(t){e.stop_loader(s),e.stop_loader(l),t.success&&(o.a.fields=t.data.recipe,o.a.set(t.data.recipe),i.a.changes_made=!1)},"json")}}else{var s=t(".wprm-button-action"),l=t(".wprm-button-action-save");t(".wprm-router.active").find(".wprm-menu-item").each(function(){t(this).data("button",wprm_temp_admin.modal.text.action_button_update)}),s.text(wprm_temp_admin.modal.text.action_button_update),l.show(),i.a.disable_menu();var c={action:"wprm_get_recipe",security:wprm_temp_admin.nonce,recipe_id:r};e.start_loader(s),e.start_loader(l),t.post(wprm_temp_admin.ajax_url,c,function(n){e.stop_loader(s),e.stop_loader(l),n.success&&(o.a.fields=n.data.recipe,o.a.set(n.data.recipe),i.a.changes_made=!1,t(".wprm-frame-title").find("h1").text(wprm_temp_admin.modal.text.edit_recipe))},"json")}},i.a.actions.insert_update_recipe=function(n){var r=o.a.get(),a={action:"wprm_save_recipe",security:wprm_temp_admin.nonce,recipe_id:o.a.id,recipe:r};t(".wprm-button-action-save").prop("disabled",!0),e.start_loader(n),t.post(wprm_temp_admin.ajax_url,a,function(r){e.stop_loader(n),t(".wprm-button-action-save").prop("disabled",!1),r.success&&(0===o.a.id&&(o.a.id=r.data.id),n.hasClass("wprm-button-action-save")||("insert"===o.a.type?e.add_text_to_editor('[wprm-recipe id="'+r.data.id+'"]'):i.a.active_editor_id&&"undefined"!=typeof tinyMCE&&tinyMCE.get(i.a.active_editor_id)&&!tinyMCE.get(i.a.active_editor_id).isHidden()&&(tinyMCE.get(i.a.active_editor_id).focus(!0),tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent())),t(".wprm-manage-datatable").length>0&&t(".wprm-manage-datatable").DataTable().ajax.reload(null,!1),i.a.close()))},"json")},i.a.actions.edit_recipe=function(e){var n=parseInt(t("#wprm-edit-recipe-id").val());if(0!=n){var o=i.a.active_editor_id;i.a.close(),i.a.open(o,{recipe_id:n})}},i.a.actions.insert_recipe=function(n){var o=parseInt(t("#wprm-insert-recipe-id").val());if(0!=o){var r='[wprm-recipe id="'+o+'"]';e.add_text_to_editor(r),i.a.close()}}}).call(e,n(0))},function(t,e){},function(t,e,n){"use strict";(function(t){var e=n(7),i=(n.n(e),n(8)),o=(n.n(i),n(47));n.n(o),t(document).ready(function(e){t(".wprm-settings").find("select").select2_wprm(),t(".wprm-settings").find(".wprm-color").wpColorPicker(),t("#reset_settings_to_default").on("click",function(){t(this).is(":checked")&&alert("Warning: having this checked will reset all your settings to default again")})})}).call(e,n(0))},function(t,e){},function(t,e,n){"use strict";(function(t){function e(){var n={action:"wprm_"+r,security:wprm_temp_admin.nonce,posts:JSON.stringify(a)};t.post(wprm_temp_admin.ajax_url,n,function(n){n.success?(a=n.data.posts_left,i(),a.length>0?e():t("#wprm-tools-finished").show()):window.location=n.data.redirect},"json")}function i(){var e=100*(1-a.length/s);t("#wprm-tools-progress-bar").css("width",e+"%")}var o=n(49),r=(n.n(o),!1),a=[],s=0;t(document).ready(function(t){void 0!==window.wprm_tools&&(r=wprm_tools.action,a=wprm_tools.posts,s=wprm_tools.posts.length,e())})}).call(e,n(0))},function(t,e){},function(t,e){},function(t,e){},function(t,e){}]);
|
dist/amp.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var WPRecipeMaker=WPRecipeMaker||{};WPRecipeMaker.amp=function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=
|
1 |
+
var WPRecipeMaker=WPRecipeMaker||{};WPRecipeMaker.amp=function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=54)}({5:function(e,n){},54:function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(5),o=(r.n(t),r(6)),u=(r.n(o),r(55));r.n(u)},55:function(e,n){},6:function(e,n){}});
|
dist/blocks.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
var WPRecipeMaker=WPRecipeMaker||{};WPRecipeMaker.blocks=function(e){function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n={};return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=53)}({53:function(e,r){}});
|
includes/admin/class-wprm-migrations.php
CHANGED
@@ -76,7 +76,7 @@ class WPRM_Migrations {
|
|
76 |
|
77 |
if ( '0.0.0' === $migrated_to_version ) {
|
78 |
self::$notices = array();
|
79 |
-
self::set_migrated_to( '
|
80 |
} else {
|
81 |
// Specific migrations.
|
82 |
if ( ! self::is_migrated_to( 'ratings_db' ) ) {
|
76 |
|
77 |
if ( '0.0.0' === $migrated_to_version ) {
|
78 |
self::$notices = array();
|
79 |
+
self::set_migrated_to( 'ratings_db' );
|
80 |
} else {
|
81 |
// Specific migrations.
|
82 |
if ( ! self::is_migrated_to( 'ratings_db' ) ) {
|
includes/admin/class-wprm-seo-checker.php
CHANGED
@@ -26,6 +26,13 @@ class WPRM_Seo_Checker {
|
|
26 |
* @param mixed $recipe Recipe to check the SEO for.
|
27 |
*/
|
28 |
public static function check_recipe( $recipe ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
$type = 'good';
|
30 |
$message = array();
|
31 |
|
26 |
* @param mixed $recipe Recipe to check the SEO for.
|
27 |
*/
|
28 |
public static function check_recipe( $recipe ) {
|
29 |
+
if ( 'non-food' === $recipe->type() ) {
|
30 |
+
return array(
|
31 |
+
'type' => 'non-food',
|
32 |
+
'message' => 'No metadata will be output as this recipe has been marked as Non-Food',
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
$type = 'good';
|
37 |
$message = array();
|
38 |
|
includes/admin/class-wprm-tools-manager.php
CHANGED
@@ -225,6 +225,11 @@ class WPRM_Tools_Manager {
|
|
225 |
$comment_rating = intval( get_comment_meta( $comment->comment_ID, 'cookbook_comment_rating', true ) );
|
226 |
}
|
227 |
|
|
|
|
|
|
|
|
|
|
|
228 |
if ( $comment_rating ) {
|
229 |
$rating = array(
|
230 |
'date' => $comment->comment_date,
|
225 |
$comment_rating = intval( get_comment_meta( $comment->comment_ID, 'cookbook_comment_rating', true ) );
|
226 |
}
|
227 |
|
228 |
+
if ( ! $comment_rating ) {
|
229 |
+
// Check for SRP rating.
|
230 |
+
$comment_rating = intval( get_comment_meta( $comment->comment_ID, 'recipe_rating', true ) );
|
231 |
+
}
|
232 |
+
|
233 |
if ( $comment_rating ) {
|
234 |
$rating = array(
|
235 |
'date' => $comment->comment_date,
|
includes/admin/manage/class-wprm-manage-recipes.php
CHANGED
@@ -132,7 +132,7 @@ class WPRM_Manage_Recipes {
|
|
132 |
'<span id="wprm-manage-recipes-name-' . esc_attr( $recipe->id() ) . '">' . $recipe->name() . '</span>',
|
133 |
$parent_post_link,
|
134 |
$comment_rating,
|
135 |
-
'<div class="wprm-manage-recipes-seo wprm-manage-recipes-seo-' . esc_attr( $seo['type'] ) . '" data-tooltip-content="#wprm-manage-recipes-seo-' . esc_attr( $recipe->id() ) . '" data-id="' . esc_attr( $recipe->id() ) . '"></div><span class="wprm-manage-recipes-seo-tooltip" id="wprm-manage-recipes-seo-' . esc_attr( $recipe->id() ) . '">' . $seo['message'] . '</span>',
|
136 |
'<span class="dashicons dashicons-admin-tools wprm-icon wprm-manage-recipes-actions" data-id="' . esc_attr( $recipe->id() ) . '"></span>',
|
137 |
);
|
138 |
}
|
132 |
'<span id="wprm-manage-recipes-name-' . esc_attr( $recipe->id() ) . '">' . $recipe->name() . '</span>',
|
133 |
$parent_post_link,
|
134 |
$comment_rating,
|
135 |
+
'<div class="wprm-manage-recipes-seo wprm-manage-tooltip wprm-manage-recipes-seo-' . esc_attr( $seo['type'] ) . '" data-tooltip-content="#wprm-manage-recipes-seo-' . esc_attr( $recipe->id() ) . '" data-id="' . esc_attr( $recipe->id() ) . '"></div><span class="wprm-manage-recipes-seo-tooltip" id="wprm-manage-recipes-seo-' . esc_attr( $recipe->id() ) . '">' . $seo['message'] . '</span>',
|
136 |
'<span class="dashicons dashicons-admin-tools wprm-icon wprm-manage-recipes-actions" data-id="' . esc_attr( $recipe->id() ) . '"></span>',
|
137 |
);
|
138 |
}
|
includes/class-wp-recipe-maker.php
CHANGED
@@ -31,7 +31,7 @@ class WP_Recipe_Maker {
|
|
31 |
* @since 1.0.0
|
32 |
*/
|
33 |
private function define_constants() {
|
34 |
-
define( 'WPRM_VERSION', '2.
|
35 |
define( 'WPRM_PREMIUM_VERSION_REQUIRED', '2.1.0' );
|
36 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
37 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
@@ -74,6 +74,7 @@ class WP_Recipe_Maker {
|
|
74 |
// Public.
|
75 |
require_once( WPRM_DIR . 'includes/public/class-wprm-addons.php' );
|
76 |
require_once( WPRM_DIR . 'includes/public/class-wprm-api.php' );
|
|
|
77 |
require_once( WPRM_DIR . 'includes/public/class-wprm-assets.php' );
|
78 |
|
79 |
if ( WPRM_Settings::get( 'features_comment_ratings' ) ) {
|
31 |
* @since 1.0.0
|
32 |
*/
|
33 |
private function define_constants() {
|
34 |
+
define( 'WPRM_VERSION', '2.4.0' );
|
35 |
define( 'WPRM_PREMIUM_VERSION_REQUIRED', '2.1.0' );
|
36 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
37 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
74 |
// Public.
|
75 |
require_once( WPRM_DIR . 'includes/public/class-wprm-addons.php' );
|
76 |
require_once( WPRM_DIR . 'includes/public/class-wprm-api.php' );
|
77 |
+
require_once( WPRM_DIR . 'includes/public/class-wprm-api-rating.php' );
|
78 |
require_once( WPRM_DIR . 'includes/public/class-wprm-assets.php' );
|
79 |
|
80 |
if ( WPRM_Settings::get( 'features_comment_ratings' ) ) {
|
includes/public/class-wprm-api-rating.php
ADDED
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Open up recipe ratings in the WordPress REST API.
|
4 |
+
*
|
5 |
+
* @link http://bootstrapped.ventures
|
6 |
+
* @since 2.4.0
|
7 |
+
*
|
8 |
+
* @package WP_Recipe_Maker
|
9 |
+
* @subpackage WP_Recipe_Maker/includes/public
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Open up recipe ratings in the WordPress REST API.
|
14 |
+
*
|
15 |
+
* @since 2.4.0
|
16 |
+
* @package WP_Recipe_Maker
|
17 |
+
* @subpackage WP_Recipe_Maker/includes/public
|
18 |
+
* @author Brecht Vandersmissen <brecht@bootstrapped.ventures>
|
19 |
+
*/
|
20 |
+
class WPRM_Api_Rating {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Register actions and filters.
|
24 |
+
*
|
25 |
+
* @since 2.4.0
|
26 |
+
*/
|
27 |
+
public static function init() {
|
28 |
+
add_action( 'rest_api_init', array( __CLASS__, 'api_register_data' ) );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Register data for the REST API.
|
33 |
+
*
|
34 |
+
* @since 2.4.0
|
35 |
+
*/
|
36 |
+
public static function api_register_data() {
|
37 |
+
if ( function_exists( 'register_rest_field' ) ) { // Prevent issue with Jetpack.
|
38 |
+
register_rest_route( 'wp-recipe-maker/v1', '/rating', array(
|
39 |
+
'callback' => array( __CLASS__, 'api_get_ratings' ),
|
40 |
+
'methods' => 'GET',
|
41 |
+
'permission_callback' => array( __CLASS__, 'api_required_permissions' ),
|
42 |
+
));
|
43 |
+
register_rest_route( 'wp-recipe-maker/v1', '/rating', array(
|
44 |
+
'callback' => array( __CLASS__, 'api_add_or_update_rating' ),
|
45 |
+
'methods' => 'POST',
|
46 |
+
'permission_callback' => array( __CLASS__, 'api_required_permissions' ),
|
47 |
+
));
|
48 |
+
register_rest_route( 'wp-recipe-maker/v1', '/rating/(?P<id>\d+)', array(
|
49 |
+
'callback' => array( __CLASS__, 'api_get_rating' ),
|
50 |
+
'methods' => 'GET',
|
51 |
+
'args' => array(
|
52 |
+
'id' => array(
|
53 |
+
'validate_callback' => array( __CLASS__, 'api_validate_numeric' ),
|
54 |
+
),
|
55 |
+
),
|
56 |
+
'permission_callback' => array( __CLASS__, 'api_required_permissions' ),
|
57 |
+
));
|
58 |
+
register_rest_route( 'wp-recipe-maker/v1', '/rating/(?P<id>\d+)', array(
|
59 |
+
'callback' => array( __CLASS__, 'api_delete_rating' ),
|
60 |
+
'methods' => 'DELETE',
|
61 |
+
'args' => array(
|
62 |
+
'id' => array(
|
63 |
+
'validate_callback' => array( __CLASS__, 'api_validate_numeric' ),
|
64 |
+
),
|
65 |
+
),
|
66 |
+
'permission_callback' => array( __CLASS__, 'api_required_permissions' ),
|
67 |
+
));
|
68 |
+
register_rest_route( 'wp-recipe-maker/v1', '/rating/recipe/(?P<id>\d+)', array(
|
69 |
+
'callback' => array( __CLASS__, 'api_get_ratings_for_recipe' ),
|
70 |
+
'methods' => 'GET',
|
71 |
+
'args' => array(
|
72 |
+
'id' => array(
|
73 |
+
'validate_callback' => array( __CLASS__, 'api_validate_numeric' ),
|
74 |
+
),
|
75 |
+
),
|
76 |
+
'permission_callback' => array( __CLASS__, 'api_required_permissions' ),
|
77 |
+
));
|
78 |
+
register_rest_route( 'wp-recipe-maker/v1', '/rating/recipe/(?P<id>\d+)', array(
|
79 |
+
'callback' => array( __CLASS__, 'api_delete_ratings_for_recipe' ),
|
80 |
+
'methods' => 'DELETE',
|
81 |
+
'args' => array(
|
82 |
+
'id' => array(
|
83 |
+
'validate_callback' => array( __CLASS__, 'api_validate_numeric' ),
|
84 |
+
),
|
85 |
+
),
|
86 |
+
'permission_callback' => array( __CLASS__, 'api_required_permissions' ),
|
87 |
+
));
|
88 |
+
register_rest_route( 'wp-recipe-maker/v1', '/rating/comment/(?P<id>\d+)', array(
|
89 |
+
'callback' => array( __CLASS__, 'api_get_rating_for_comment' ),
|
90 |
+
'methods' => 'GET',
|
91 |
+
'args' => array(
|
92 |
+
'id' => array(
|
93 |
+
'validate_callback' => array( __CLASS__, 'api_validate_numeric' ),
|
94 |
+
),
|
95 |
+
),
|
96 |
+
'permission_callback' => array( __CLASS__, 'api_required_permissions' ),
|
97 |
+
));
|
98 |
+
register_rest_route( 'wp-recipe-maker/v1', '/rating/comment/(?P<id>\d+)', array(
|
99 |
+
'callback' => array( __CLASS__, 'api_delete_rating_for_comment' ),
|
100 |
+
'methods' => 'DELETE',
|
101 |
+
'args' => array(
|
102 |
+
'id' => array(
|
103 |
+
'validate_callback' => array( __CLASS__, 'api_validate_numeric' ),
|
104 |
+
),
|
105 |
+
),
|
106 |
+
'permission_callback' => array( __CLASS__, 'api_required_permissions' ),
|
107 |
+
));
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Validate ID in API call.
|
113 |
+
*
|
114 |
+
* @since 2.4.0
|
115 |
+
* @param mixed $param Parameter to validate.
|
116 |
+
* @param WP_REST_Request $request Current request.
|
117 |
+
* @param mixed $key Key.
|
118 |
+
*/
|
119 |
+
public static function api_validate_numeric( $param, $request, $key ) {
|
120 |
+
return is_numeric( $param );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Required permissions for the API.
|
125 |
+
*
|
126 |
+
* @since 2.4.0
|
127 |
+
*/
|
128 |
+
public static function api_required_permissions() {
|
129 |
+
return current_user_can( 'moderate_comments' );
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Handle get ratings call to the REST API.
|
134 |
+
*
|
135 |
+
* @since 2.4.0
|
136 |
+
* @param WP_REST_Request $request Current request.
|
137 |
+
*/
|
138 |
+
public static function api_get_ratings( $request ) {
|
139 |
+
return WPRM_Rating_Database::get_ratings( array() );
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Handle add or update rating call to the REST API.
|
144 |
+
*
|
145 |
+
* @since 2.4.0
|
146 |
+
* @param WP_REST_Request $request Current request.
|
147 |
+
*/
|
148 |
+
public static function api_add_or_update_rating( $request ) {
|
149 |
+
$params = $request->get_params();
|
150 |
+
$rating = isset( $params['rating'] ) ? $params['rating'] : array();
|
151 |
+
return WPRM_Rating_Database::add_or_update_rating( $rating );
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Handle get rating call to the REST API.
|
156 |
+
*
|
157 |
+
* @since 2.4.0
|
158 |
+
* @param WP_REST_Request $request Current request.
|
159 |
+
*/
|
160 |
+
public static function api_get_rating( $request ) {
|
161 |
+
return WPRM_Rating_Database::get_rating(array(
|
162 |
+
'where' => 'id = ' . $request['id'],
|
163 |
+
));
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Handle delete rating call to the REST API.
|
168 |
+
*
|
169 |
+
* @since 2.4.0
|
170 |
+
* @param WP_REST_Request $request Current request.
|
171 |
+
*/
|
172 |
+
public static function api_delete_rating( $request ) {
|
173 |
+
return WPRM_Rating_Database::delete_ratings( array( $request['id'] ) );
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Handle get ratings for recipe call to the REST API.
|
178 |
+
*
|
179 |
+
* @since 2.4.0
|
180 |
+
* @param WP_REST_Request $request Current request.
|
181 |
+
*/
|
182 |
+
public static function api_get_ratings_for_recipe( $request ) {
|
183 |
+
return WPRM_Rating_Database::get_ratings(array(
|
184 |
+
'where' => 'recipe_id = ' . $request['id'],
|
185 |
+
));
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Handle delete ratings for recipe call to the REST API.
|
190 |
+
*
|
191 |
+
* @since 2.4.0
|
192 |
+
* @param WP_REST_Request $request Current request.
|
193 |
+
*/
|
194 |
+
public static function api_delete_ratings_for_recipe( $request ) {
|
195 |
+
return WPRM_Rating_Database::delete_ratings_for( $request['id'] );
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Handle get rating for comment call to the REST API.
|
200 |
+
*
|
201 |
+
* @since 2.4.0
|
202 |
+
* @param WP_REST_Request $request Current request.
|
203 |
+
*/
|
204 |
+
public static function api_get_rating_for_comment( $request ) {
|
205 |
+
return WPRM_Rating_Database::get_rating(array(
|
206 |
+
'where' => 'comment_id = ' . $request['id'],
|
207 |
+
));
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Handle delete rating for comment call to the REST API.
|
212 |
+
*
|
213 |
+
* @since 2.4.0
|
214 |
+
* @param WP_REST_Request $request Current request.
|
215 |
+
*/
|
216 |
+
public static function api_delete_rating_for_comment( $request ) {
|
217 |
+
return WPRM_Rating_Database::delete_ratings_for_comment( $request['id'] );
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
WPRM_Api_Rating::init();
|
includes/public/class-wprm-assets.php
CHANGED
@@ -28,6 +28,7 @@ class WPRM_Assets {
|
|
28 |
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue' ), 1 );
|
29 |
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin' ), 1 );
|
30 |
add_action( 'amp_post_template_css', array( __CLASS__, 'amp_style' ) );
|
|
|
31 |
|
32 |
add_action( 'wp_head', array( __CLASS__, 'custom_css' ) );
|
33 |
}
|
@@ -95,6 +96,15 @@ class WPRM_Assets {
|
|
95 |
));
|
96 |
}
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
/**
|
99 |
* Enqueue template style on AMP pages.
|
100 |
*
|
28 |
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue' ), 1 );
|
29 |
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_admin' ), 1 );
|
30 |
add_action( 'amp_post_template_css', array( __CLASS__, 'amp_style' ) );
|
31 |
+
add_action( 'enqueue_block_editor_assets', array( __CLASS__, 'block_assets' ) );
|
32 |
|
33 |
add_action( 'wp_head', array( __CLASS__, 'custom_css' ) );
|
34 |
}
|
96 |
));
|
97 |
}
|
98 |
|
99 |
+
/**
|
100 |
+
* Enqueue Gutenberg block assets.
|
101 |
+
*
|
102 |
+
* @since 2.4.0
|
103 |
+
*/
|
104 |
+
public static function block_assets() {
|
105 |
+
wp_enqueue_script( 'wprm-blocks', WPRM_URL . 'dist/blocks.js', array( 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components' ), WPRM_VERSION );
|
106 |
+
}
|
107 |
+
|
108 |
/**
|
109 |
* Enqueue template style on AMP pages.
|
110 |
*
|
includes/public/class-wprm-comment-rating.php
CHANGED
@@ -96,18 +96,27 @@ class WPRM_Comment_Rating {
|
|
96 |
* @param int $comment_rating Rating to add for this comment.
|
97 |
*/
|
98 |
public static function add_or_update_rating_for( $comment_id, $comment_rating ) {
|
99 |
-
$
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
}
|
113 |
|
96 |
* @param int $comment_rating Rating to add for this comment.
|
97 |
*/
|
98 |
public static function add_or_update_rating_for( $comment_id, $comment_rating ) {
|
99 |
+
$comment_id = intval( $comment_id );
|
100 |
+
$comment_rating = intval( $comment_rating );
|
101 |
+
|
102 |
+
if ( $comment_id ) {
|
103 |
+
$comment = get_comment( $comment_id );
|
104 |
+
|
105 |
+
if ( $comment ) {
|
106 |
+
if ( $comment_rating ) {
|
107 |
+
$rating = array(
|
108 |
+
'date' => $comment->comment_date,
|
109 |
+
'comment_id' => $comment->comment_ID,
|
110 |
+
'user_id' => $comment->user_id,
|
111 |
+
'ip' => $comment->comment_author_IP,
|
112 |
+
'rating' => $comment_rating,
|
113 |
+
);
|
114 |
+
|
115 |
+
WPRM_Rating_Database::add_or_update_rating( $rating );
|
116 |
+
} else {
|
117 |
+
WPRM_Rating_Database::delete_ratings_for_comment( $comment_id );
|
118 |
+
}
|
119 |
+
}
|
120 |
}
|
121 |
}
|
122 |
|
includes/public/class-wprm-fallback-recipe.php
CHANGED
@@ -30,6 +30,9 @@ class WPRM_Fallback_Recipe {
|
|
30 |
add_filter( 'content_edit_pre', array( __CLASS__, 'replace_fallback_with_shortcode' ) );
|
31 |
|
32 |
add_filter( 'content_save_pre', array( __CLASS__, 'replace_shortcode_with_fallback' ) );
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
/**
|
@@ -85,6 +88,25 @@ class WPRM_Fallback_Recipe {
|
|
85 |
return $content;
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
/**
|
89 |
* Replace imported shortcodes to make sure recipes are displayed.
|
90 |
*
|
30 |
add_filter( 'content_edit_pre', array( __CLASS__, 'replace_fallback_with_shortcode' ) );
|
31 |
|
32 |
add_filter( 'content_save_pre', array( __CLASS__, 'replace_shortcode_with_fallback' ) );
|
33 |
+
|
34 |
+
add_filter( 'rest_prepare_post', array( __CLASS__, 'replace_fallback_rest_api' ), 10, 3 );
|
35 |
+
add_filter( 'rest_prepare_page', array( __CLASS__, 'replace_fallback_rest_api' ), 10, 3 );
|
36 |
}
|
37 |
|
38 |
/**
|
88 |
return $content;
|
89 |
}
|
90 |
|
91 |
+
/**
|
92 |
+
* Replace fallback recipe with shortcode in the rest API.
|
93 |
+
*
|
94 |
+
* @since 2.4.0
|
95 |
+
* @param WP_REST_Response $response The response object.
|
96 |
+
* @param WP_Post $post Post object.
|
97 |
+
* @param WP_REST_Request $request Request object.
|
98 |
+
*/
|
99 |
+
public static function replace_fallback_rest_api( $response, $post, $request ) {
|
100 |
+
$params = $request->get_params();
|
101 |
+
|
102 |
+
if ( isset( $params['context'] ) && 'edit' === $params['context'] ) {
|
103 |
+
if ( isset( $response->data['content']['raw'] ) ) {
|
104 |
+
$response->data['content']['raw'] = self::replace_fallback_with_shortcode( $response->data['content']['raw'] );
|
105 |
+
}
|
106 |
+
}
|
107 |
+
return $response;
|
108 |
+
}
|
109 |
+
|
110 |
/**
|
111 |
* Replace imported shortcodes to make sure recipes are displayed.
|
112 |
*
|
includes/public/class-wprm-metadata.php
CHANGED
@@ -64,8 +64,14 @@ class WPRM_Metadata {
|
|
64 |
* @param object $recipe Recipe to get the metadata for.
|
65 |
*/
|
66 |
public static function get_metadata_output( $recipe ) {
|
|
|
|
|
67 |
$metadata = self::sanitize_metadata( self::get_metadata( $recipe ) );
|
68 |
-
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
|
71 |
/**
|
@@ -93,6 +99,11 @@ class WPRM_Metadata {
|
|
93 |
* @param object $recipe Recipe to get the metadata for.
|
94 |
*/
|
95 |
public static function get_metadata( $recipe ) {
|
|
|
|
|
|
|
|
|
|
|
96 |
// Essentials.
|
97 |
$metadata = array(
|
98 |
'@context' => 'http://schema.org/',
|
64 |
* @param object $recipe Recipe to get the metadata for.
|
65 |
*/
|
66 |
public static function get_metadata_output( $recipe ) {
|
67 |
+
$output = '';
|
68 |
+
|
69 |
$metadata = self::sanitize_metadata( self::get_metadata( $recipe ) );
|
70 |
+
if ( $metadata ) {
|
71 |
+
$output = '<script type="application/ld+json">' . wp_json_encode( $metadata ) . '</script>';
|
72 |
+
}
|
73 |
+
|
74 |
+
return $output;
|
75 |
}
|
76 |
|
77 |
/**
|
99 |
* @param object $recipe Recipe to get the metadata for.
|
100 |
*/
|
101 |
public static function get_metadata( $recipe ) {
|
102 |
+
// Check if non-food recipe.
|
103 |
+
if ( 'non-food' === $recipe->type() ) {
|
104 |
+
return apply_filters( 'wprm_recipe_metadata', array(), $recipe );
|
105 |
+
}
|
106 |
+
|
107 |
// Essentials.
|
108 |
$metadata = array(
|
109 |
'@context' => 'http://schema.org/',
|
includes/public/class-wprm-rating-database.php
CHANGED
@@ -123,30 +123,38 @@ class WPRM_Rating_Database {
|
|
123 |
global $wpdb;
|
124 |
$table_name = self::get_table_name();
|
125 |
|
|
|
|
|
126 |
// Check for existing ratings from this user/ip for this recipe/comment.
|
127 |
if ( $rating['recipe_id'] ) {
|
128 |
if ( $rating['user_id'] ) {
|
129 |
$where = 'recipe_id = ' . $rating['recipe_id'] . ' AND user_id = ' . $rating['user_id'];
|
130 |
-
}
|
131 |
$where = 'recipe_id = ' . $rating['recipe_id'] . ' AND ip = "' . $rating['ip'] . '"';
|
132 |
}
|
133 |
-
}
|
134 |
$where = 'comment_id = ' . $rating['comment_id'];
|
135 |
}
|
136 |
|
137 |
-
//
|
138 |
-
$
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
|
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
|
147 |
-
|
148 |
-
|
|
|
|
|
149 |
}
|
|
|
|
|
150 |
}
|
151 |
|
152 |
/**
|
@@ -235,6 +243,19 @@ class WPRM_Rating_Database {
|
|
235 |
|
236 |
$wpdb->delete( $table_name, array( 'recipe_id' => $recipe_id ), array( '%d' ) );
|
237 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
239 |
|
240 |
WPRM_Rating_Database::init();
|
123 |
global $wpdb;
|
124 |
$table_name = self::get_table_name();
|
125 |
|
126 |
+
$where = false;
|
127 |
+
|
128 |
// Check for existing ratings from this user/ip for this recipe/comment.
|
129 |
if ( $rating['recipe_id'] ) {
|
130 |
if ( $rating['user_id'] ) {
|
131 |
$where = 'recipe_id = ' . $rating['recipe_id'] . ' AND user_id = ' . $rating['user_id'];
|
132 |
+
} elseif ( $rating['ip'] ) {
|
133 |
$where = 'recipe_id = ' . $rating['recipe_id'] . ' AND ip = "' . $rating['ip'] . '"';
|
134 |
}
|
135 |
+
} elseif ( $rating['comment_id'] ) {
|
136 |
$where = 'comment_id = ' . $rating['comment_id'];
|
137 |
}
|
138 |
|
139 |
+
// Only continue if it was a valid rating.
|
140 |
+
if ( $where ) {
|
141 |
+
// Delete existing ratings.
|
142 |
+
$existing_ratings = self::get_ratings(array(
|
143 |
+
'where' => $where,
|
144 |
+
));
|
145 |
+
$existing_ratings_ids = wp_list_pluck( $existing_ratings['ratings'], 'id' );
|
146 |
|
147 |
+
if ( 0 < count( $existing_ratings_ids ) ) {
|
148 |
+
self::delete_ratings( $existing_ratings_ids );
|
149 |
+
}
|
150 |
|
151 |
+
// Insert new rating.
|
152 |
+
$wpdb->insert( $table_name, $rating );
|
153 |
+
return true;
|
154 |
+
}
|
155 |
}
|
156 |
+
|
157 |
+
return false;
|
158 |
}
|
159 |
|
160 |
/**
|
243 |
|
244 |
$wpdb->delete( $table_name, array( 'recipe_id' => $recipe_id ), array( '%d' ) );
|
245 |
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Delete ratings for a specific comment.
|
249 |
+
*
|
250 |
+
* @since 2.4.0
|
251 |
+
* @param int $comment_id Comment to delete the ratings for.
|
252 |
+
*/
|
253 |
+
public static function delete_ratings_for_comment( $comment_id ) {
|
254 |
+
global $wpdb;
|
255 |
+
$table_name = self::get_table_name();
|
256 |
+
|
257 |
+
$wpdb->delete( $table_name, array( 'comment_id' => $comment_id ), array( '%d' ) );
|
258 |
+
}
|
259 |
}
|
260 |
|
261 |
WPRM_Rating_Database::init();
|
includes/public/class-wprm-recipe-sanitizer.php
CHANGED
@@ -46,6 +46,9 @@ class WPRM_Recipe_Sanitizer {
|
|
46 |
$sanitized_recipe['custom_time'] = isset( $recipe['custom_time'] ) ? intval( $recipe['custom_time'] ) : 0;
|
47 |
|
48 |
// Limited options fields.
|
|
|
|
|
|
|
49 |
$options = array( 'default', 'disabled', 'post_author', 'custom' );
|
50 |
$sanitized_recipe['author_display'] = isset( $recipe['author_display'] ) && in_array( $recipe['author_display'], $options, true ) ? sanitize_key( $recipe['author_display'] ) : $options[0];
|
51 |
|
46 |
$sanitized_recipe['custom_time'] = isset( $recipe['custom_time'] ) ? intval( $recipe['custom_time'] ) : 0;
|
47 |
|
48 |
// Limited options fields.
|
49 |
+
$options = array( 'food', 'non-food' );
|
50 |
+
$sanitized_recipe['type'] = isset( $recipe['type'] ) && in_array( $recipe['type'], $options, true ) ? sanitize_key( $recipe['type'] ) : $options[0];
|
51 |
+
|
52 |
$options = array( 'default', 'disabled', 'post_author', 'custom' );
|
53 |
$sanitized_recipe['author_display'] = isset( $recipe['author_display'] ) && in_array( $recipe['author_display'], $options, true ) ? sanitize_key( $recipe['author_display'] ) : $options[0];
|
54 |
|
includes/public/class-wprm-recipe-saver.php
CHANGED
@@ -121,6 +121,7 @@ class WPRM_Recipe_Saver {
|
|
121 |
wp_set_object_terms( $id, $ingredient_ids, 'wprm_ingredient', false );
|
122 |
|
123 |
// Meta Fields.
|
|
|
124 |
update_post_meta( $id, 'wprm_author_display', $recipe['author_display'] );
|
125 |
update_post_meta( $id, 'wprm_author_name', $recipe['author_name'] );
|
126 |
update_post_meta( $id, 'wprm_author_link', $recipe['author_link'] );
|
121 |
wp_set_object_terms( $id, $ingredient_ids, 'wprm_ingredient', false );
|
122 |
|
123 |
// Meta Fields.
|
124 |
+
update_post_meta( $id, 'wprm_type', $recipe['type'] );
|
125 |
update_post_meta( $id, 'wprm_author_display', $recipe['author_display'] );
|
126 |
update_post_meta( $id, 'wprm_author_name', $recipe['author_name'] );
|
127 |
update_post_meta( $id, 'wprm_author_link', $recipe['author_link'] );
|
includes/public/class-wprm-recipe.php
CHANGED
@@ -59,6 +59,7 @@ class WPRM_Recipe {
|
|
59 |
$recipe['id'] = $this->id();
|
60 |
|
61 |
// Recipe Details.
|
|
|
62 |
$recipe['image_id'] = $this->image_id();
|
63 |
$recipe['image_url'] = $this->image_url();
|
64 |
$recipe['name'] = $this->name();
|
@@ -258,6 +259,18 @@ class WPRM_Recipe {
|
|
258 |
return $this->post->ID;
|
259 |
}
|
260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
/**
|
262 |
* Get the recipe image HTML.
|
263 |
*
|
59 |
$recipe['id'] = $this->id();
|
60 |
|
61 |
// Recipe Details.
|
62 |
+
$recipe['type'] = $this->type();
|
63 |
$recipe['image_id'] = $this->image_id();
|
64 |
$recipe['image_url'] = $this->image_url();
|
65 |
$recipe['name'] = $this->name();
|
259 |
return $this->post->ID;
|
260 |
}
|
261 |
|
262 |
+
/**
|
263 |
+
* Get the recipe type.
|
264 |
+
*
|
265 |
+
* @since 2.4.0
|
266 |
+
*/
|
267 |
+
public function type() {
|
268 |
+
if ( ! WPRM_Settings::get( 'metadata_nonfood_allowed' ) ) {
|
269 |
+
return 'food';
|
270 |
+
}
|
271 |
+
return $this->meta( 'wprm_type', 'food' );
|
272 |
+
}
|
273 |
+
|
274 |
/**
|
275 |
* Get the recipe image HTML.
|
276 |
*
|
includes/public/class-wprm-settings.php
CHANGED
@@ -79,6 +79,7 @@ class WPRM_Settings {
|
|
79 |
'features_user_ratings' => false,
|
80 |
// Advanced.
|
81 |
'metadata_pinterest_optout' => false,
|
|
|
82 |
'recipe_css' => '',
|
83 |
'print_css' => '',
|
84 |
);
|
@@ -399,6 +400,7 @@ class WPRM_Settings {
|
|
399 |
public static function form_save_settings_advanced() {
|
400 |
if ( isset( $_POST['wprm_settings'] ) && wp_verify_nonce( sanitize_key( $_POST['wprm_settings'] ), 'wprm_settings' ) ) { // Input var okay.
|
401 |
$metadata_pinterest_optout = isset( $_POST['metadata_pinterest_optout'] ) && sanitize_key( $_POST['metadata_pinterest_optout'] ) ? true : false; // Input var okay.
|
|
|
402 |
$recipe_css = isset( $_POST['recipe_css'] ) ? wp_kses_post( wp_unslash( $_POST['recipe_css'] ) ) : ''; // Input var okay.
|
403 |
$print_css = isset( $_POST['print_css'] ) ? wp_kses_post( wp_unslash( $_POST['print_css'] ) ) : ''; // Input var okay.
|
404 |
$reset_settings_to_default = isset( $_POST['reset_settings_to_default'] ) && sanitize_key( $_POST['reset_settings_to_default'] ) ? true : false; // Input var okay.
|
@@ -406,6 +408,7 @@ class WPRM_Settings {
|
|
406 |
$settings = array();
|
407 |
|
408 |
$settings['metadata_pinterest_optout'] = $metadata_pinterest_optout;
|
|
|
409 |
$settings['recipe_css'] = $recipe_css;
|
410 |
$settings['print_css'] = $print_css;
|
411 |
|
79 |
'features_user_ratings' => false,
|
80 |
// Advanced.
|
81 |
'metadata_pinterest_optout' => false,
|
82 |
+
'metadata_nonfood_allowed' => false,
|
83 |
'recipe_css' => '',
|
84 |
'print_css' => '',
|
85 |
);
|
400 |
public static function form_save_settings_advanced() {
|
401 |
if ( isset( $_POST['wprm_settings'] ) && wp_verify_nonce( sanitize_key( $_POST['wprm_settings'] ), 'wprm_settings' ) ) { // Input var okay.
|
402 |
$metadata_pinterest_optout = isset( $_POST['metadata_pinterest_optout'] ) && sanitize_key( $_POST['metadata_pinterest_optout'] ) ? true : false; // Input var okay.
|
403 |
+
$metadata_nonfood_allowed = isset( $_POST['metadata_nonfood_allowed'] ) && sanitize_key( $_POST['metadata_nonfood_allowed'] ) ? true : false; // Input var okay.
|
404 |
$recipe_css = isset( $_POST['recipe_css'] ) ? wp_kses_post( wp_unslash( $_POST['recipe_css'] ) ) : ''; // Input var okay.
|
405 |
$print_css = isset( $_POST['print_css'] ) ? wp_kses_post( wp_unslash( $_POST['print_css'] ) ) : ''; // Input var okay.
|
406 |
$reset_settings_to_default = isset( $_POST['reset_settings_to_default'] ) && sanitize_key( $_POST['reset_settings_to_default'] ) ? true : false; // Input var okay.
|
408 |
$settings = array();
|
409 |
|
410 |
$settings['metadata_pinterest_optout'] = $metadata_pinterest_optout;
|
411 |
+
$settings['metadata_nonfood_allowed'] = $metadata_nonfood_allowed;
|
412 |
$settings['recipe_css'] = $recipe_css;
|
413 |
$settings['print_css'] = $print_css;
|
414 |
|
readme.txt
CHANGED
@@ -26,6 +26,7 @@ An overview of WP Recipe Maker features:
|
|
26 |
|
27 |
* **Easy workflow** to add recipes to any post or page
|
28 |
* Uses schema.org/Recipe JSON-LD metadata optimised for **Google Recipe search**
|
|
|
29 |
* Compatible with **Pinterest Rich Pins** and a setting to easily opt out
|
30 |
* **Recipe ratings** in the user comments
|
31 |
* Clean **print recipe** version for your visitors with optional credit to your website
|
@@ -112,6 +113,14 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
112 |
|
113 |
== Changelog ==
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
= 2.3.0 =
|
116 |
* Feature: Import support for new Simple Recipe Pro update
|
117 |
* Feature: Allow HTML to be used as text for the print and jump shortcodes
|
@@ -443,6 +452,9 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
443 |
|
444 |
== Upgrade notice ==
|
445 |
|
|
|
|
|
|
|
446 |
= 2.3.0 =
|
447 |
A few new features and improvements
|
448 |
|
26 |
|
27 |
* **Easy workflow** to add recipes to any post or page
|
28 |
* Uses schema.org/Recipe JSON-LD metadata optimised for **Google Recipe search**
|
29 |
+
* Option to **disable metadata per recipe** if you want to publish non-food or DIY recipes
|
30 |
* Compatible with **Pinterest Rich Pins** and a setting to easily opt out
|
31 |
* **Recipe ratings** in the user comments
|
32 |
* Clean **print recipe** version for your visitors with optional credit to your website
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
= 2.4.0 =
|
117 |
+
* Feature: Ability to set recipe type as "Non-Food" and not output metadata
|
118 |
+
* Feature: User and comment ratings accessible via REST API
|
119 |
+
* Feature: Compatible with Classic block in Gutenberg
|
120 |
+
* Improvement: Find Simple Recipe Pro ratings with the "Find Ratings" tool
|
121 |
+
* Fix: Ability to remove comment rating
|
122 |
+
* Fix: Prevent ratings migration from showing up on first install
|
123 |
+
|
124 |
= 2.3.0 =
|
125 |
* Feature: Import support for new Simple Recipe Pro update
|
126 |
* Feature: Allow HTML to be used as text for the print and jump shortcodes
|
452 |
|
453 |
== Upgrade notice ==
|
454 |
|
455 |
+
= 2.4.0 =
|
456 |
+
A few new features and improvements, including basic Gutenberg compatibility (blocks still coming up!)
|
457 |
+
|
458 |
= 2.3.0 =
|
459 |
A few new features and improvements
|
460 |
|
templates/admin/menu/faq/whats_new.php
CHANGED
@@ -11,6 +11,21 @@
|
|
11 |
|
12 |
?>
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
<h3>2018-03-27 | WP Recipe Maker Premium 2.2.0</h3>
|
15 |
<ul>
|
16 |
<li>Feature: Allow 0 values to show up in nutrition label</li>
|
11 |
|
12 |
?>
|
13 |
|
14 |
+
<h3>2018-04-20 | WP Recipe Maker Premium 2.3.0</h3>
|
15 |
+
<ul>
|
16 |
+
<li>Feature: Custom nutrition ingredients on the Manage page</li>
|
17 |
+
</ul>
|
18 |
+
|
19 |
+
<h3>2018-04-20 | WP Recipe Maker 2.4.0</h3>
|
20 |
+
<ul>
|
21 |
+
<li>Feature: Ability to set recipe type as "Non-Food" and not output metadata</li>
|
22 |
+
<li>Feature: User and comment ratings accessible via REST API</li>
|
23 |
+
<li>Feature: Compatible with Classic block in Gutenberg</li>
|
24 |
+
<li>Improvement: Find Simple Recipe Pro ratings with the "Find Ratings" tool</li>
|
25 |
+
<li>Fix: Ability to remove comment rating</li>
|
26 |
+
<li>Fix: Prevent ratings migration from showing up on first install</li>
|
27 |
+
</ul>
|
28 |
+
|
29 |
<h3>2018-03-27 | WP Recipe Maker Premium 2.2.0</h3>
|
30 |
<ul>
|
31 |
<li>Feature: Allow 0 values to show up in nutrition label</li>
|
templates/admin/menu/import/import-overview.php
CHANGED
@@ -20,9 +20,6 @@
|
|
20 |
<p>
|
21 |
<?php esc_html_e( 'If your current plugin uses custom post types and has different permalinks than regular posts you might want to use a redirection plugin to set up 301 redirects. Contact us if you need help!', 'wp-recipe-maker' ); ?>
|
22 |
</p>
|
23 |
-
<p>
|
24 |
-
<?php esc_html_e( 'Importing lots of recipes at once can cause a PHP timeout error. All recipes that were handled up until the error will have been imported correctly.', 'wp-recipe-maker' ); ?>
|
25 |
-
</p>
|
26 |
|
27 |
<h3><?php esc_html_e( 'Recipes to Import', 'wp-recipe-maker' ); ?></h3>
|
28 |
<?php
|
20 |
<p>
|
21 |
<?php esc_html_e( 'If your current plugin uses custom post types and has different permalinks than regular posts you might want to use a redirection plugin to set up 301 redirects. Contact us if you need help!', 'wp-recipe-maker' ); ?>
|
22 |
</p>
|
|
|
|
|
|
|
23 |
|
24 |
<h3><?php esc_html_e( 'Recipes to Import', 'wp-recipe-maker' ); ?></h3>
|
25 |
<?php
|
templates/admin/modal/tabs/recipe-details.php
CHANGED
@@ -18,6 +18,23 @@
|
|
18 |
<p>We're detecting a compatibility problem, potentially breaking some of our functionality. You could try disabling all other plugins for a second to see if you can find the conflict.</p>
|
19 |
<p>Please <a href="http://bootstrapped.ventures/wp-recipe-maker/support/" target="_blank">contact us</a> for more help!</p>
|
20 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
<div class="wprm-recipe-form-container wprm-recipe-image-container">
|
22 |
<label for="wprm-recipe-image-id"><?php esc_html_e( 'Image', 'wp-recipe-maker' ); ?></label>
|
23 |
<button type="button" class="button wprm-recipe-image-add"><?php esc_html_e( 'Add Image', 'wp-recipe-maker' ); ?></button>
|
18 |
<p>We're detecting a compatibility problem, potentially breaking some of our functionality. You could try disabling all other plugins for a second to see if you can find the conflict.</p>
|
19 |
<p>Please <a href="http://bootstrapped.ventures/wp-recipe-maker/support/" target="_blank">contact us</a> for more help!</p>
|
20 |
</div>
|
21 |
+
<?php if ( WPRM_Settings::get( 'metadata_nonfood_allowed' ) ) : ?>
|
22 |
+
<div class="wprm-recipe-form-container wprm-recipe-form-container-halfs">
|
23 |
+
<label for="wprm-recipe-type"><?php esc_html_e( 'Type', 'wp-recipe-maker' ); ?></label>
|
24 |
+
<select id="wprm-recipe-type">
|
25 |
+
<?php
|
26 |
+
$options = array(
|
27 |
+
'food' => __( 'Food Recipe', 'wp-recipe-maker' ),
|
28 |
+
'non-food' => __( 'Non-Food Recipe', 'wp-recipe-maker' ),
|
29 |
+
);
|
30 |
+
|
31 |
+
foreach ( $options as $option => $label ) {
|
32 |
+
echo '<option value="' . esc_attr( $option ) . '">' . esc_html( $label ) . '</option>';
|
33 |
+
}
|
34 |
+
?>
|
35 |
+
</select>
|
36 |
+
</div>
|
37 |
+
<?php endif; // Non-Food Allowed. ?>
|
38 |
<div class="wprm-recipe-form-container wprm-recipe-image-container">
|
39 |
<label for="wprm-recipe-image-id"><?php esc_html_e( 'Image', 'wp-recipe-maker' ); ?></label>
|
40 |
<button type="button" class="button wprm-recipe-image-add"><?php esc_html_e( 'Add Image', 'wp-recipe-maker' ); ?></button>
|
templates/admin/settings/advanced.php
CHANGED
@@ -29,6 +29,21 @@
|
|
29 |
</label>
|
30 |
</td>
|
31 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
</tbody>
|
33 |
</table>
|
34 |
<h2 class="title"><?php esc_html_e( 'Custom Styling', 'wp-recipe-maker' ); ?></h2>
|
29 |
</label>
|
30 |
</td>
|
31 |
</tr>
|
32 |
+
<tr>
|
33 |
+
<th scope="row">
|
34 |
+
<?php esc_html_e( 'Allow non-food recipes', 'wp-recipe-maker' ); ?>
|
35 |
+
</th>
|
36 |
+
<td>
|
37 |
+
<label for="metadata_nonfood_allowed">
|
38 |
+
<?php $checked = WPRM_Settings::get( 'metadata_nonfood_allowed' ) ? ' checked="checked"' : ''; ?>
|
39 |
+
<input name="metadata_nonfood_allowed" type="checkbox" id="metadata_nonfood_allowed"<?php echo esc_html( $checked ); ?> />
|
40 |
+
<?php esc_html_e( 'Get the option to set the recipe type as "Non-Food" for individual recipes', 'wp-recipe-maker' ); ?>
|
41 |
+
</label>
|
42 |
+
<p class="description" id="tagline-metadata_nonfood_allowed">
|
43 |
+
<?php esc_html_e( 'When you set a recipe as "Non-Food" we will NOT output the recipe metadata as per Google\'s guidelines.', 'wp-recipe-maker-premium' ); ?>
|
44 |
+
</p>
|
45 |
+
</td>
|
46 |
+
</tr>
|
47 |
</tbody>
|
48 |
</table>
|
49 |
<h2 class="title"><?php esc_html_e( 'Custom Styling', 'wp-recipe-maker' ); ?></h2>
|
wp-recipe-maker.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: WP Recipe Maker
|
16 |
* Plugin URI: http://bootstrapped.ventures/wp-recipe-maker/
|
17 |
* Description: The easy and user-friendly recipe plugin for everyone. Automatic JSON-LD metadata for better SEO will get you more visitors!
|
18 |
-
* Version: 2.
|
19 |
* Author: Bootstrapped Ventures
|
20 |
* Author URI: http://bootstrapped.ventures/
|
21 |
* License: GPL-2.0+
|
15 |
* Plugin Name: WP Recipe Maker
|
16 |
* Plugin URI: http://bootstrapped.ventures/wp-recipe-maker/
|
17 |
* Description: The easy and user-friendly recipe plugin for everyone. Automatic JSON-LD metadata for better SEO will get you more visitors!
|
18 |
+
* Version: 2.4.0
|
19 |
* Author: Bootstrapped Ventures
|
20 |
* Author URI: http://bootstrapped.ventures/
|
21 |
* License: GPL-2.0+
|