diff --git a/ds-live-composer.php b/ds-live-composer.php index b83d5534..a76af347 100644 --- a/ds-live-composer.php +++ b/ds-live-composer.php @@ -4,7 +4,7 @@ * Plugin URI: https://www.livecomposerplugin.com * Description: Page builder for WordPress with drag and drop header/footer editing. * Author: Live Composer Team - * Version: 1.5.32 + * Version: 1.5.33 * Author URI: https://livecomposerplugin.com * License: GPL3 * License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -41,7 +41,7 @@ * Constants */ - define( 'DS_LIVE_COMPOSER_VER', '1.5.32' ); + define( 'DS_LIVE_COMPOSER_VER', '1.5.33' ); define( 'DS_LIVE_COMPOSER_SHORTNAME', __( 'Live Composer', 'live-composer-page-builder' ) ); define( 'DS_LIVE_COMPOSER_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/includes/ajax.php b/includes/ajax.php index 128943e7..2ac4b0e5 100644 --- a/includes/ajax.php +++ b/includes/ajax.php @@ -23,8 +23,6 @@ header( 'HTTP/1.0 403 Forbidden' ); exit; } - - /** * Add/display a new module section * @@ -473,7 +471,11 @@ function dslc_ajax_import_template( $atts ) { // The code of the template. $template_code = stripslashes( $_POST['dslc_template_code'] ); - $template_code = maybe_serialize($template_code); + + if (!dslc_is_json( $template_code ) ) { + return 0; + exit; + } $response['output'] = dslc_render_content( $template_code, true ); @@ -512,6 +514,11 @@ function dslc_ajax_save_template( $atts ) { $template_id = strtolower( str_replace( ' ', '-', $template_title ) ); $template_code = stripslashes( $_POST['dslc_template_code'] ); + if (!dslc_is_json($template_code) ) { + return 0; + exit; + } + // Get current templates. $templates = get_option( 'dslc_templates' ); @@ -526,7 +533,7 @@ function dslc_ajax_save_template( $atts ) { $templates[ $template_id ] = array( 'title' => $template_title, 'id' => $template_id, - 'code' => maybe_serialize($template_code), + 'code' => $template_code, 'section' => 'user', ); @@ -605,9 +612,10 @@ function dslc_ajax_import_modules_section( $atts ) { // The code of the modules section. $code_to_import = stripslashes( $_POST['dslc_modules_section_code'] ); - - $code_to_import = maybe_serialize($code_to_import); - + if (!dslc_is_json($code_to_import) ) { + return 0; + exit; + } $response['output'] = dslc_render_content( $code_to_import, true ); $response['output'] = do_shortcode( $response['output'] ); diff --git a/includes/display-functions.php b/includes/display-functions.php index c4d4c02b..1bd8a5a7 100644 --- a/includes/display-functions.php +++ b/includes/display-functions.php @@ -773,16 +773,9 @@ function dslc_filter_content( $content ) { $rendered_page = $dslc_content_before . $composer_wrapper_before . do_action( 'dslc_output_prepend' ) . $composer_header . '
' . $composer_prepend . $composer_content . '
' . $composer_append . $composer_footer . do_action( 'dslc_output_append' ) . $composer_wrapper_after . $dslc_content_after; if ( ! dslc_is_editor_active() && ! is_singular( 'dslc_hf' ) ) { - global $wpdb; - - $wpdb->query( - $wpdb->prepare( - "UPDATE {$wpdb->prefix}posts SET post_content = %s WHERE ID = %d AND post_type = 'page'", - $rendered_page, - $cache_id - ) - ); + $cache->set_cache( $rendered_page, $cache_id ); + } // We need double do_shortcode as our module shortcodes can contain encoded 3-rd party shortcodes. @@ -797,6 +790,7 @@ function dslc_filter_content( $content ) { } add_filter( 'the_content', 'dslc_filter_content', 101 ); + /** * Check if provided id is template for the custom 404 page. * @@ -942,7 +936,13 @@ function dslc_editor_code() { * @return Bool True if JSON, false otherwise. */ function dslc_is_json( $string ) { - json_decode( $string ); + + try { + json_decode( $string ); + } catch (\Throwable $th) { + return false; + } + return ( function_exists( 'json_last_error' ) && json_last_error() == JSON_ERROR_NONE ); } @@ -955,56 +955,65 @@ function dslc_is_json( $string ) { */ function dslc_json_decode( $raw_code, $ignore_migration = false ) { $decoded = false; + + if (!is_array($raw_code) && dslc_is_json( $raw_code ) ) { + $decoded = json_decode( $raw_code, true ); + + } + else{ + + // $raw_code = maybe_unserialize( stripslashes($raw_code) ); + $raw_code = maybe_unserialize( $raw_code ); + + // Array already provided. Do nothing. + if ( is_array( $raw_code ) ) { + return $raw_code; + } - // $raw_code = maybe_unserialize( stripslashes($raw_code) ); - $raw_code = maybe_unserialize( $raw_code ); - - // Array already provided. Do nothing. - if ( is_array( $raw_code ) ) { - return $raw_code; - } - - // Is it JSON? - if ( ! dslc_is_json( $raw_code ) ) { - // If it's not JSON then: - // 1. it's old code of the module settings serialized + base64. - // 2. it's old code containing both shortocodes + base64. - /** - * Is it's valid base64? - * - * Function base64_decode returns FALSE if input contains - * character from outside the base64 alphabet. - */ - - $decoded_base64 = base64_decode( $raw_code ); - - // Base64 successfull? - if ( ! $decoded_base64 ) { - // 2. it's old code containing both shortocodes + base64 - // We can do nothing with it, so return FALSE. - return false; - } else { + // Is it JSON? + if ( ! dslc_is_json( $raw_code ) ) { + // If it's not JSON then: // 1. it's old code of the module settings serialized + base64. - // Get array out of it. - $decoded = maybe_unserialize( $decoded_base64 ); + // 2. it's old code containing both shortocodes + base64. + /** + * Is it's valid base64? + * + * Function base64_decode returns FALSE if input contains + * character from outside the base64 alphabet. + */ + + $decoded_base64 = base64_decode( $raw_code ); + + // Base64 successfull? + if ( ! $decoded_base64 ) { + // 2. it's old code containing both shortocodes + base64 + // We can do nothing with it, so return FALSE. + return false; + } else { + // 1. it's old code of the module settings serialized + base64. + // Get array out of it. + $decoded = maybe_unserialize( $decoded_base64 ); + + // Add a marker indicating that this module + // was imported from shortcode format. + if ( is_array( $decoded ) ) { + $decoded['code_version'] = 1; + } - // Add a marker indicating that this module - // was imported from shortcode format. - if ( is_array( $decoded ) ) { - $decoded['code_version'] = 1; + // Preset is always being stored in base64 format, + // so we need to ignore code version parameter as it's not relevant. + if ( $ignore_migration ) { + unset( $decoded['code_version'] ); + } } + } else { + // Decode JSON. + $decoded = json_decode( $raw_code, true ); + } // End if(). - // Preset is always being stored in base64 format, - // so we need to ignore code version parameter as it's not relevant. - if ( $ignore_migration ) { - unset( $decoded['code_version'] ); - } - } - } else { - // Decode JSON. - $decoded = json_decode( $raw_code, true ); - } // End if(). + } + return $decoded; } diff --git a/js/dist/editor_backend.min.js b/js/dist/editor_backend.min.js index 0810b697..446065b5 100644 --- a/js/dist/editor_backend.min.js +++ b/js/dist/editor_backend.min.js @@ -1,4 +1,4 @@ -!function(e){var t={};function o(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(i,a,(function(t){return e[t]}).bind(null,a));return i},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=3)}({3:function(e,t,o){"use strict";o.r(t);let i=function(e){if("object"!=typeof e||!0===LiveComposer.Builder.Flags.modalOpen)return!1;var t='
'+e.title+''+e.content+"
";t+=(e.confirm||e.cancel?'
'+(e.confirm_title?e.confirm_title:"Confirm")+''+(e.cancel_title?e.cancel_title:"Cancel")+"
":'")+"
",t=jQuery(t),"function"!=typeof e.confirm&&(e.confirm=function(){}),"function"!=typeof e.cancel&&(e.cancel=function(){}),t.find(".dslca-prompt-modal-confirm-hook").click(function(o){return o.stopPropagation(),t.find(".dslca-prompt-modal-content").animate({top:"55%"},400),t.animate({opacity:0},400,function(){e.confirm(),LiveComposer.Builder.Flags.modalOpen=!1,jQuery(this).remove()}),!1}),t.find(".dslca-prompt-modal-cancel-hook").click(function(o){return o.stopPropagation(),t.find(".dslca-prompt-modal-content").animate({top:"55%"},400),t.animate({opacity:0},400,function(){jQuery(this).remove(),LiveComposer.Builder.Flags.modalOpen=!1,e.cancel()}),!1}),t.hide(),jQuery("body").append(t),t.css({opacity:0}).show().animate({opacity:1},400),t.find(".dslca-prompt-modal-content").css({top:"55%"}).animate({top:"50%"},400),LiveComposer.Builder.Flags.modalOpen=!0},a=()=>{window.dslcDebug&&console.log("updatePreset");var e=jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument),t=e.find('.dslca-module-option-front[data-id="css_load_preset"]').val(),o=e.find(".dslca-module-code").innerText,i=e.data("module");"none"!==t&&""!==t&&jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-save-preset",dslc_preset_name:t,dslc_preset_code:o,dslc_module_id:i},function(t){"enabled"==t.preset_setting&&jQuery(".dslc-module-front:not(#"+e.attr("id")+')[data-module="'+e.data("module")+'"][data-dslc-preset="'+e.data("dslc-preset")+'"]',LiveComposer.Builder.PreviewAreaDocument).each(function(){window.dslc_module_output_reload(jQuery(this))})})};jQuery(document).ready(function(e){jQuery(document).on("keypress",'.dslca-module-edit-field[name="css_save_preset"]',function(e){if(13==e.which){var t=jQuery(this).val().toLowerCase().replace(/\s/g,"-");jQuery("body").addClass("dslca-new-preset-added"),jQuery('.dslca-module-edit-field[name="css_load_preset"]').append('").val(t).trigger("change"),jQuery(this).val(""),jQuery(".dslc-delete-preset").removeClass("dslc-delete-preset-hide")}}),jQuery(document).on("change",'.dslca-module-edit-field[name="css_load_preset"]',function(e){jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument).addClass("dslca-preload-preset")}),jQuery(document).on("click",".dslc-delete-preset",function(e){var t=jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument),o=t.find('.dslca-module-option-front[data-id="css_load_preset"]').val(),i=t.data("module");"none"!==o&&""!==o&&jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-delete-preset",dslc_preset_name:o,dslc_module_id:i},function(e){window.dslc_module_options_show(i)})})}),window.dslc_generate_code=function(){window.dslcDebug&&console.log("dslc_generate_code");var e,t,o="";jQuery("#dslc-main .dslc-modules-area",LiveComposer.Builder.PreviewAreaDocument).each(function(){jQuery(".dslc-module-front",this).length?(jQuery(this).removeClass("dslc-modules-area-empty").addClass("dslc-modules-area-not-empty"),jQuery(".dslca-no-content",this).hide()):(jQuery(this).removeClass("dslc-modules-area-not-empty").addClass("dslc-modules-area-empty"),jQuery(".dslca-no-content:not(:visible)",this).show().css({"-webkit-animation-name":"dslcBounceIn","-moz-animation-name":"dslcBounceIn","animation-name":"dslcBounceIn","animation-duration":"0.6s","-webkit-animation-duration":"0.6s",padding:0}).animate({padding:"35px 0"},300))}),jQuery("#dslc-main .dslc-modules-section",LiveComposer.Builder.PreviewAreaDocument).each(function(){e=jQuery(this),t=s(e),e.find(".dslca-section-code").val(t),o=o+t+","}),o="["+(o=o.slice(0,-1))+"]",jQuery("#dslca-code").val(o),jQuery("#dslca-export-code").val(o);let i=new CustomEvent("pageCodeUpdated");document.dispatchEvent(i)};let s=e=>{window.dslcDebug&&console.log("generateSectionCode");var t,o,i,a,s="",l=0,d="";return jQuery(".dslc-modules-area",o=e).length?o.removeClass("dslc-modules-section-empty").addClass("dslc-modules-section-not-empty"):o.removeClass("dslc-modules-section-not-empty").addClass("dslc-modules-section-empty"),jQuery(".dslc-modules-area.dslc-last-col, .dslc-modules-area.dslc-first-col",void 0).removeClass("dslc-last-col dslc-first-col"),jQuery(".dslc-module-front.dslc-last-col, .dslc-module-front.dslc-first-col",void 0).removeClass("dslc-last-col dslc-first-col"),l=0,a=JSON.parse((i=o.find(".dslca-section-code").val()).replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),d="",jQuery(".dslca-modules-section-settings input",o).each(function(){var e=jQuery(this),t=e.data("id"),o=e.val();d=d+t+'="'+o+'" ',a[t]=o}),void 0!==a.give_new_id&&delete a.give_new_id,a.content=[],jQuery(".dslc-modules-area",o).each(function(){var e=0,o=jQuery(this),i=parseInt(o.data("size")),d=o.data("valign"),n="no",r="no";l+=i,jQuery(this).removeClass("dslc-first-col"),jQuery(this).removeClass("dslc-last-col"),12==l?(jQuery(this).addClass("dslc-last-col").next(".dslc-modules-area").addClass("dslc-first-col"),l=0,n="yes"):l>12&&(jQuery(this).removeClass("dslc-last-col").addClass("dslc-first-col"),l=i,r="yes"),l==i&&(r="yes",jQuery(this).removeClass("dslc-last-col").addClass("dslc-first-col"));var c='{"element_type":"module_area","last":"'+n+'","first":"'+r+'","size":"'+i+'","valign":"'+d+'"}';void 0!==(c=JSON.parse(c)).give_new_id&&delete c.give_new_id,c.content=[],jQuery(".dslc-module-front",o).each(function(){var o=jQuery(this);t=parseInt(o[0].getAttribute("data-dslc-module-size"));var i="no";jQuery(this).removeClass("dslc-first-col"),jQuery(this).removeClass("dslc-last-col"),12==(e+=t)?(jQuery(this).addClass("dslc-last-col"),jQuery(this).next(".dslc-module-front").addClass("dslc-first-col"),e=0,i="yes"):e>12&&(jQuery(this).removeClass("dslc-last-col").addClass("dslc-first-col"),e=t),e==t&&jQuery(this).removeClass("dslc-last-col").addClass("dslc-first-col");try{s=o[0].querySelector(".dslca-module-code").innerText}catch(a){console.info("No DSLC code found in module: "+o[0].getAttribute("id"))}if(""!==s){var l=JSON.parse(s.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"'));l.last=i,jQuery.each(l,function(e,t){!1!==t&&""!==t||delete l[e],"content"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"main_heading_title"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"main_heading_link_title"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"tabs_content"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"tabs_nav"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"accordion_content"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"accordion_nav"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"button_text"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"title"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"button_title"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"label"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_leave_comment"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_comment"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_name"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_url"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_submit_comment"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_gdpr"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"give_new_id"==e&&delete l[e]}),o[0].querySelector(".dslca-module-code").innerText=JSON.stringify(l),c.content.push(l)}s=""}),a.content.push(c)}),JSON.stringify(a)},l=e=>{if(window.dslcDebug&&console.log("editableContentCodeGeneration"),void 0===e)return!1;let t=e.closest(".dslc-module-front")[0],o=e.html().trim().replace(/",confirm:function(){var e;e=jQuery(".dslca-prompt-modal textarea").val(),window.dslcDebug&&console.log("dslc_row_import"),jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-import-modules-section",dslc:"active",dslc_modules_section_code:e},function(e){n(),jQuery("#dslc-main",LiveComposer.Builder.PreviewAreaDocument).append(e.output),LiveComposer.Builder.PreviewAreaWindow.dslc_bg_video(),LiveComposer.Builder.PreviewAreaWindow.dslc_carousel(),LiveComposer.Builder.PreviewAreaWindow.dslc_masonry(),o$(),ov(),om(),window.dslc_generate_code(),window.dslc_show_publish_button()}),jQuery(".dslca-prompt-modal-confirm-hook span").css({opacity:0}),jQuery(".dslca-prompt-modal-confirm-hook .dslca-loading").show()},confirm_title:DSLCString.str_import})}),LiveComposer.Builder.PreviewAreaDocument.on("click",".dslca-export-modules-section-hook",function(t){if(t.preventDefault(),!e())return!1;jQuery(this).hasClass("dslca-action-disabled")||(jQuery(".dslca-prompt-modal-cancel-hook").hide(),jQuery(".dslca-prompt-modal-confirm-hook").html(''+DSLCString.str_ok),i({title:DSLCString.str_export_row_title,content:DSLCString.str_export_row_descr+"

"}))}),LiveComposer.Builder.PreviewAreaDocument.on("click",".dslca-copy-modules-section-hook",function(){var t,o,i,a;if(!e())return!1;jQuery(this).hasClass("dslca-action-disabled")||(t=jQuery(this).closest(".dslc-modules-section"),window.dslcDebug&&console.log("dslc_row_copy"),(o=t.clone().appendTo(jQuery("#dslc-main",LiveComposer.Builder.PreviewAreaDocument)))[0].removeAttribute("data-jsinit"),o.find(".dslc-modules-area").each(function(){var e=jQuery(this).index();jQuery(this).data("size",t.find(".dslc-modules-area:eq( "+e+" )").data("size")),this.removeAttribute("data-jsinit")}),new ob(o),o.find(".dslc-module-front").css({"-webkit-animation-name":"none","-moz-animation-name":"none","animation-name":"none","animation-duration":"0","-webkit-animation-duration":"0",opacity:0}).each(function(){var e=jQuery(this);ou(e[0]),o$(),ov(),window.dslc_generate_code(),om(),jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-module-being-edited"),e.animate({opacity:1},300),window.dslc_show_publish_button()}),i=o[0],window.dslcDebug&&console.log("dslc_section_new_id"),a=LiveComposer.Utils.get_unique_id(),i.setAttribute("data-section-id",a),LiveComposer.Utils.update_section_property_raw(i,"section_instance_id",a))}),LiveComposer.Builder.PreviewAreaDocument.on("click",".dslca-add-modules-section-hook",function(t){if(t.preventDefault(),!e())return!1;var o=jQuery(this);jQuery(this).hasClass("dslca-action-disabled")||(o.find(".dslca-icon").removeClass("dslc-icon-align-justify").addClass("dslc-icon-spinner dslc-icon-spin"),ow(function(){o.find(".dslca-icon").removeClass("dslc-icon-spinner dslc-icon-spin").addClass("dslc-icon-align-justify")}))}),LiveComposer.Builder.PreviewAreaDocument.on("click",".dslca-edit-modules-section-hook",function(){if(!e())return!1;var t,o=jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument).length,i=jQuery(".dslca-modules-section-being-edited",LiveComposer.Builder.PreviewAreaDocument).length;if(LiveComposer.Builder.Flags.uiHidden||o>0||i>0)return!1;jQuery(this).hasClass("dslca-action-disabled")||(t=jQuery(this).closest(".dslc-modules-section"),window.dslcDebug&&console.log("dslc_row_edit"),jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-module-being-edited"),jQuery(".dslca-modules-section-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-modules-section-being-edited").removeClass("dslca-modules-section-change-made"),t.addClass("dslca-modules-section-being-edited"),jQuery(".dslca-header .dslca-go-to-section-hook").hide(),jQuery('.dslca-row-options-filter-hook[data-section="styling"], .dslca-row-options-filter-hook[data-section="responsive"]').show(),jQuery('.dslca-row-options-filter-hook[data-section="styling"]').trigger("click"),jQuery(".dslca-header .dslca-options-filter-hook").hide(),jQuery(".dslca-module-edit-actions").hide(),jQuery(".dslca-row-edit-actions").show(),jQuery(".dslca-modules-section-edit-field").each(function(){if("type"===jQuery(this).data("id")&&(""!==jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="type"]',LiveComposer.Builder.PreviewAreaDocument).val()&&"wrapped"!==jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="type"]',LiveComposer.Builder.PreviewAreaDocument).val()||jQuery('select[data-id="type"]').val("wrapper").change()),"border-top"==jQuery(this).data("id"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="border"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf("top")>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if("border-right"==jQuery(this).data("id"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="border"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf("right")>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if("border-bottom"==jQuery(this).data("id"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="border"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf("bottom")>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if("border-left"==jQuery(this).data("id"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="border"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf("left")>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if(jQuery(this).hasClass("dslca-modules-section-edit-field-checkbox"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="'+jQuery(this).data("id")+'"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf(jQuery(this).data("val"))>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if(jQuery(this).val(jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="'+jQuery(this).data("id")+'"]',LiveComposer.Builder.PreviewAreaDocument).val().trim().replace("%(%","[").replace("%)%","]")),jQuery(this).hasClass("dslca-modules-section-edit-field-colorpicker")){var e=jQuery(this);jQuery(this).closest(".dslca-modules-section-edit-option").find(".sp-preview-inner").removeClass("sp-clear-display").css({"background-color":e.val()}),jQuery(this).css({"background-color":e.val()})}}),jQuery(".dslca-modules-section-edit-field-upload").each(function(){var e=jQuery(this).closest(".dslca-modules-section-edit-option");jQuery(this).val()&&"disabled"!==jQuery(this).val()?(jQuery(".dslca-modules-section-edit-field-image-add-hook",e).hide(),jQuery(".dslca-modules-section-edit-field-image-remove-hook",e).show()):(jQuery(".dslca-modules-section-edit-field-image-remove-hook",e).hide(),jQuery(".dslca-modules-section-edit-field-image-add-hook",e).show())}),tm(".dslca-modules-section-edit"),LiveComposer.Builder.Flags.panelOpened=!0,tp()),jQuery("body",LiveComposer.Builder.PreviewAreaDocument).addClass("section-editing-in-progress")})},ow=e=>{window.dslcDebug&&console.log("dslc_row_add"),e=void 0!==e&&e;var t=jQuery.Deferred(),o=sessionStorage,i=(jQuery(),o.getItem("cache-dslc-ajax-add-modules-section-v2"));if(null!==i&&DSLCMainOptions.section_padding_vertical!==jQuery(i).find('input[data-id="padding"]').val()&&(o.removeItem("cache-dslc-ajax-add-modules-section-v2"),i=null),null!==i)return oy(i),e&&e(),t;jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-add-modules-section",dslc:"active"},function(i){return o.setItem("cache-dslc-ajax-add-modules-section-v2",i.output),oy(i.output),e&&e(),t})};function oy(e){var t=jQuery(e);return t.appendTo(LiveComposer.Builder.PreviewAreaDocument.find("#dslc-main")),om(),window.dslc_generate_code(),window.dslc_show_publish_button(),new ob(t),new oh(t.find(".dslc-modules-area").eq(0)[0]),t.find(".dslc-modules-area").addClass("dslc-modules-area-empty dslc-last-col"),t}let o$=()=>{jQuery("#dslc-main .dslc-modules-section",LiveComposer.Builder.PreviewAreaDocument).each(function(){"initialized"!==jQuery(this).data("jsinit")&&new ob(this)})},oC=()=>{o$(),o8(),jQuery(document).on("click",".dslca-row-edit-save",function(){var e;window.dslcDebug&&console.log("dslc_confirm_row_changes"),e=void 0!==e&&e,jQuery(".dslca-modules-section-being-edited .dslca-modules-section-settings input",LiveComposer.Builder.PreviewAreaDocument).each(function(){jQuery(this).data("def",jQuery(this).val())}),tm(".dslca-modules"),jQuery(".dslca-row-edit-actions").hide(),jQuery(".dslca-row-options-filter-hook").hide(),jQuery(".dslca-header .dslca-go-to-section-hook").show(),jQuery(".dslca-modules-section-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-modules-section-being-edited dslca-modules-section-change-made"),window.dslc_generate_code(),window.dslc_show_publish_button(),e&&e(),LiveComposer.Builder.Flags.panelOpened=!1,jQuery("body",LiveComposer.Builder.PreviewAreaDocument).removeClass("section-editing-in-progress"),jQuery(".dslca-currently-editing").removeAttr("style"),jQuery(".dslca-row-options-filter-hook.dslca-active").removeClass("dslca-active"),LiveComposer.Builder.PreviewAreaWindow.dslc_responsive_classes(!0)}),jQuery(document).on("click",".dslca-row-edit-cancel",function(){var e;window.dslcDebug&&console.log("dslc_row_cancel_changes"),e=void 0!==e&&e,LiveComposer.Builder.Flags.generate_code_after_row_changed=!1,jQuery(".dslca-modules-section-being-edited .dslca-modules-section-settings input",LiveComposer.Builder.PreviewAreaDocument).each(function(){jQuery(this).val(jQuery(this).data("def")),jQuery('.dslca-modules-section-edit-field[data-id="'+jQuery(this).data("id")+'"]').val(jQuery(this).data("def")).trigger("change")}),LiveComposer.Builder.Flags.generate_code_after_row_changed=!0,window.dslc_generate_code(),window.dslc_show_publish_button(),tm(".dslca-modules"),jQuery(".dslca-row-edit-actions").hide(),jQuery(".dslca-row-options-filter-hook").hide(),jQuery(".dslca-header .dslca-go-to-section-hook").show(),dslc_show_publish_button,jQuery(".dslca-modules-section-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-modules-section-being-edited dslca-modules-section-change-made"),e&&e(),LiveComposer.Builder.Flags.panelOpened=!1,jQuery("body",LiveComposer.Builder.PreviewAreaDocument).removeClass("section-editing-in-progress"),jQuery(".dslca-currently-editing").removeAttr("style"),jQuery(".dslca-row-options-filter-hook.dslca-active").removeClass("dslca-active"),LiveComposer.Builder.PreviewAreaWindow.dslc_responsive_classes(!0)})},ok=()=>{document.querySelectorAll(".dslca-template").forEach(function(e){e.addEventListener("click",e=>{var t;e.preventDefault(),t=e.target.closest("[data-id]").dataset.id,window.dslcDebug&&console.log("dslc_load_template"),jQuery("#wpcontent").prepend('
'),jQuery(".lc-template-loader").prepend('
'),jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-load-template",dslc:"active",dslc_template_id:t},function(e){jQuery("#dslc-main",LiveComposer.Builder.PreviewAreaDocument).html(e.output),jQuery(".lc-template-loader").remove(),LiveComposer.Builder.PreviewAreaWindow.dslc_carousel(),o$(),ov(),om(),window.dslc_show_publish_button(),window.dslc_generate_code()})})}),jQuery(".dslca-template-import-form").submit(function(e){e.preventDefault(),window.dslcDebug&&console.log("dslc_import_template"),jQuery(".dslca-modal-templates-import .dslca-modal-title").css({opacity:0}),jQuery(".dslca-modal-templates-import .dslca-loading").show(),jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-import-template",dslc:"active",dslc_template_code:jQuery("#dslca-import-code").val()},function(e){ +!function(e){var t={};function o(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(i,a,(function(t){return e[t]}).bind(null,a));return i},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=3)}({3:function(e,t,o){"use strict";o.r(t);let i=function(e){if("object"!=typeof e||!0===LiveComposer.Builder.Flags.modalOpen)return!1;var t='
'+e.title+''+e.content+"
";t+=(e.confirm||e.cancel?'
'+(e.confirm_title?e.confirm_title:"Confirm")+''+(e.cancel_title?e.cancel_title:"Cancel")+"
":'")+"
",t=jQuery(t),"function"!=typeof e.confirm&&(e.confirm=function(){}),"function"!=typeof e.cancel&&(e.cancel=function(){}),t.find(".dslca-prompt-modal-confirm-hook").click(function(o){return o.stopPropagation(),t.find(".dslca-prompt-modal-content").animate({top:"55%"},400),t.animate({opacity:0},400,function(){e.confirm(),LiveComposer.Builder.Flags.modalOpen=!1,jQuery(this).remove()}),!1}),t.find(".dslca-prompt-modal-cancel-hook").click(function(o){return o.stopPropagation(),t.find(".dslca-prompt-modal-content").animate({top:"55%"},400),t.animate({opacity:0},400,function(){jQuery(this).remove(),LiveComposer.Builder.Flags.modalOpen=!1,e.cancel()}),!1}),t.hide(),jQuery("body").append(t),t.css({opacity:0}).show().animate({opacity:1},400),t.find(".dslca-prompt-modal-content").css({top:"55%"}).animate({top:"50%"},400),LiveComposer.Builder.Flags.modalOpen=!0},a=()=>{window.dslcDebug&&console.log("updatePreset");var e=jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument),t=e.find('.dslca-module-option-front[data-id="css_load_preset"]').val(),o=e.find(".dslca-module-code").innerText,i=e.data("module");"none"!==t&&""!==t&&jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-save-preset",dslc_preset_name:t,dslc_preset_code:o,dslc_module_id:i},function(t){"enabled"==t.preset_setting&&jQuery(".dslc-module-front:not(#"+e.attr("id")+')[data-module="'+e.data("module")+'"][data-dslc-preset="'+e.data("dslc-preset")+'"]',LiveComposer.Builder.PreviewAreaDocument).each(function(){window.dslc_module_output_reload(jQuery(this))})})};jQuery(document).ready(function(e){jQuery(document).on("keypress",'.dslca-module-edit-field[name="css_save_preset"]',function(e){if(13==e.which){var t=jQuery(this).val().toLowerCase().replace(/\s/g,"-");jQuery("body").addClass("dslca-new-preset-added"),jQuery('.dslca-module-edit-field[name="css_load_preset"]').append('").val(t).trigger("change"),jQuery(this).val(""),jQuery(".dslc-delete-preset").removeClass("dslc-delete-preset-hide")}}),jQuery(document).on("change",'.dslca-module-edit-field[name="css_load_preset"]',function(e){jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument).addClass("dslca-preload-preset")}),jQuery(document).on("click",".dslc-delete-preset",function(e){var t=jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument),o=t.find('.dslca-module-option-front[data-id="css_load_preset"]').val(),i=t.data("module");"none"!==o&&""!==o&&jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-delete-preset",dslc_preset_name:o,dslc_module_id:i},function(e){window.dslc_module_options_show(i)})})}),window.dslc_generate_code=function(){window.dslcDebug&&console.log("dslc_generate_code");var e,t,o="";jQuery("#dslc-main .dslc-modules-area",LiveComposer.Builder.PreviewAreaDocument).each(function(){jQuery(".dslc-module-front",this).length?(jQuery(this).removeClass("dslc-modules-area-empty").addClass("dslc-modules-area-not-empty"),jQuery(".dslca-no-content",this).hide()):(jQuery(this).removeClass("dslc-modules-area-not-empty").addClass("dslc-modules-area-empty"),jQuery(".dslca-no-content:not(:visible)",this).show().css({"-webkit-animation-name":"dslcBounceIn","-moz-animation-name":"dslcBounceIn","animation-name":"dslcBounceIn","animation-duration":"0.6s","-webkit-animation-duration":"0.6s",padding:0}).animate({padding:"35px 0"},300))}),jQuery("#dslc-main .dslc-modules-section",LiveComposer.Builder.PreviewAreaDocument).each(function(){e=jQuery(this),t=s(e),e.find(".dslca-section-code").val(t),o=o+t+","}),o="["+(o=o.slice(0,-1))+"]",jQuery("#dslca-code").val(o),jQuery("#dslca-export-code").val(o);let i=new CustomEvent("pageCodeUpdated");document.dispatchEvent(i)};let s=e=>{window.dslcDebug&&console.log("generateSectionCode");var t,o,i,a,s="",l=0,d="";return jQuery(".dslc-modules-area",o=e).length?o.removeClass("dslc-modules-section-empty").addClass("dslc-modules-section-not-empty"):o.removeClass("dslc-modules-section-not-empty").addClass("dslc-modules-section-empty"),jQuery(".dslc-modules-area.dslc-last-col, .dslc-modules-area.dslc-first-col",void 0).removeClass("dslc-last-col dslc-first-col"),jQuery(".dslc-module-front.dslc-last-col, .dslc-module-front.dslc-first-col",void 0).removeClass("dslc-last-col dslc-first-col"),l=0,a=JSON.parse((i=o.find(".dslca-section-code").val()).replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),d="",jQuery(".dslca-modules-section-settings input",o).each(function(){var e=jQuery(this),t=e.data("id"),o=e.val();d=d+t+'="'+o+'" ',a[t]=o}),void 0!==a.give_new_id&&delete a.give_new_id,a.content=[],jQuery(".dslc-modules-area",o).each(function(){var e=0,o=jQuery(this),i=parseInt(o.data("size")),d=o.data("valign"),n="no",r="no";l+=i,jQuery(this).removeClass("dslc-first-col"),jQuery(this).removeClass("dslc-last-col"),12==l?(jQuery(this).addClass("dslc-last-col").next(".dslc-modules-area").addClass("dslc-first-col"),l=0,n="yes"):l>12&&(jQuery(this).removeClass("dslc-last-col").addClass("dslc-first-col"),l=i,r="yes"),l==i&&(r="yes",jQuery(this).removeClass("dslc-last-col").addClass("dslc-first-col"));var c='{"element_type":"module_area","last":"'+n+'","first":"'+r+'","size":"'+i+'","valign":"'+d+'"}';void 0!==(c=JSON.parse(c)).give_new_id&&delete c.give_new_id,c.content=[],jQuery(".dslc-module-front",o).each(function(){var o=jQuery(this);t=parseInt(o[0].getAttribute("data-dslc-module-size"));var i="no";jQuery(this).removeClass("dslc-first-col"),jQuery(this).removeClass("dslc-last-col"),12==(e+=t)?(jQuery(this).addClass("dslc-last-col"),jQuery(this).next(".dslc-module-front").addClass("dslc-first-col"),e=0,i="yes"):e>12&&(jQuery(this).removeClass("dslc-last-col").addClass("dslc-first-col"),e=t),e==t&&jQuery(this).removeClass("dslc-last-col").addClass("dslc-first-col");try{s=o[0].querySelector(".dslca-module-code").innerText}catch(a){console.info("No DSLC code found in module: "+o[0].getAttribute("id"))}if(""!==s){var l=JSON.parse(s.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"'));l.last=i,jQuery.each(l,function(e,t){!1!==t&&""!==t||delete l[e],"content"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"main_heading_title"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"main_heading_link_title"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"tabs_content"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"tabs_nav"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"accordion_content"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"accordion_nav"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"button_text"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"title"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"button_title"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"label"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_leave_comment"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_comment"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_name"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_url"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_submit_comment"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"txt_gdpr"==e&&(l[e]=t.replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"')),"give_new_id"==e&&delete l[e]}),o[0].querySelector(".dslca-module-code").innerText=JSON.stringify(l),c.content.push(l)}s=""}),a.content.push(c)}),JSON.stringify(a)},l=e=>{if(window.dslcDebug&&console.log("editableContentCodeGeneration"),void 0===e)return!1;let t=e.closest(".dslc-module-front")[0],o=e.html().trim().replace(/",confirm:function(){var e;e=jQuery(".dslca-prompt-modal textarea").val(),window.dslcDebug&&console.log("dslc_row_import"),jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-import-modules-section",dslc:"active",dslc_modules_section_code:e},function(e){ if(!e.output) alert("Please Provide valid input"); n(),jQuery("#dslc-main",LiveComposer.Builder.PreviewAreaDocument).append(e.output),LiveComposer.Builder.PreviewAreaWindow.dslc_bg_video(),LiveComposer.Builder.PreviewAreaWindow.dslc_carousel(),LiveComposer.Builder.PreviewAreaWindow.dslc_masonry(),o$(),ov(),om(),window.dslc_generate_code(),window.dslc_show_publish_button()}),jQuery(".dslca-prompt-modal-confirm-hook span").css({opacity:0}),jQuery(".dslca-prompt-modal-confirm-hook .dslca-loading").show()},confirm_title:DSLCString.str_import})}),LiveComposer.Builder.PreviewAreaDocument.on("click",".dslca-export-modules-section-hook",function(t){if(t.preventDefault(),!e())return!1;jQuery(this).hasClass("dslca-action-disabled")||(jQuery(".dslca-prompt-modal-cancel-hook").hide(),jQuery(".dslca-prompt-modal-confirm-hook").html(''+DSLCString.str_ok),i({title:DSLCString.str_export_row_title,content:DSLCString.str_export_row_descr+"

"}))}),LiveComposer.Builder.PreviewAreaDocument.on("click",".dslca-copy-modules-section-hook",function(){var t,o,i,a;if(!e())return!1;jQuery(this).hasClass("dslca-action-disabled")||(t=jQuery(this).closest(".dslc-modules-section"),window.dslcDebug&&console.log("dslc_row_copy"),(o=t.clone().appendTo(jQuery("#dslc-main",LiveComposer.Builder.PreviewAreaDocument)))[0].removeAttribute("data-jsinit"),o.find(".dslc-modules-area").each(function(){var e=jQuery(this).index();jQuery(this).data("size",t.find(".dslc-modules-area:eq( "+e+" )").data("size")),this.removeAttribute("data-jsinit")}),new ob(o),o.find(".dslc-module-front").css({"-webkit-animation-name":"none","-moz-animation-name":"none","animation-name":"none","animation-duration":"0","-webkit-animation-duration":"0",opacity:0}).each(function(){var e=jQuery(this);ou(e[0]),o$(),ov(),window.dslc_generate_code(),om(),jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-module-being-edited"),e.animate({opacity:1},300),window.dslc_show_publish_button()}),i=o[0],window.dslcDebug&&console.log("dslc_section_new_id"),a=LiveComposer.Utils.get_unique_id(),i.setAttribute("data-section-id",a),LiveComposer.Utils.update_section_property_raw(i,"section_instance_id",a))}),LiveComposer.Builder.PreviewAreaDocument.on("click",".dslca-add-modules-section-hook",function(t){if(t.preventDefault(),!e())return!1;var o=jQuery(this);jQuery(this).hasClass("dslca-action-disabled")||(o.find(".dslca-icon").removeClass("dslc-icon-align-justify").addClass("dslc-icon-spinner dslc-icon-spin"),ow(function(){o.find(".dslca-icon").removeClass("dslc-icon-spinner dslc-icon-spin").addClass("dslc-icon-align-justify")}))}),LiveComposer.Builder.PreviewAreaDocument.on("click",".dslca-edit-modules-section-hook",function(){if(!e())return!1;var t,o=jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument).length,i=jQuery(".dslca-modules-section-being-edited",LiveComposer.Builder.PreviewAreaDocument).length;if(LiveComposer.Builder.Flags.uiHidden||o>0||i>0)return!1;jQuery(this).hasClass("dslca-action-disabled")||(t=jQuery(this).closest(".dslc-modules-section"),window.dslcDebug&&console.log("dslc_row_edit"),jQuery(".dslca-module-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-module-being-edited"),jQuery(".dslca-modules-section-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-modules-section-being-edited").removeClass("dslca-modules-section-change-made"),t.addClass("dslca-modules-section-being-edited"),jQuery(".dslca-header .dslca-go-to-section-hook").hide(),jQuery('.dslca-row-options-filter-hook[data-section="styling"], .dslca-row-options-filter-hook[data-section="responsive"]').show(),jQuery('.dslca-row-options-filter-hook[data-section="styling"]').trigger("click"),jQuery(".dslca-header .dslca-options-filter-hook").hide(),jQuery(".dslca-module-edit-actions").hide(),jQuery(".dslca-row-edit-actions").show(),jQuery(".dslca-modules-section-edit-field").each(function(){if("type"===jQuery(this).data("id")&&(""!==jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="type"]',LiveComposer.Builder.PreviewAreaDocument).val()&&"wrapped"!==jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="type"]',LiveComposer.Builder.PreviewAreaDocument).val()||jQuery('select[data-id="type"]').val("wrapper").change()),"border-top"==jQuery(this).data("id"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="border"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf("top")>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if("border-right"==jQuery(this).data("id"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="border"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf("right")>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if("border-bottom"==jQuery(this).data("id"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="border"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf("bottom")>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if("border-left"==jQuery(this).data("id"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="border"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf("left")>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if(jQuery(this).hasClass("dslca-modules-section-edit-field-checkbox"))jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="'+jQuery(this).data("id")+'"]',LiveComposer.Builder.PreviewAreaDocument).val().indexOf(jQuery(this).data("val"))>=0?(jQuery(this).prop("checked",!0),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check-empty").addClass("dslc-icon-check")):(jQuery(this).prop("checked",!1),jQuery(this).siblings(".dslca-modules-section-edit-option-checkbox-hook").find(".dslca-icon").removeClass("dslc-icon-check").addClass("dslc-icon-check-empty"));else if(jQuery(this).val(jQuery('.dslca-modules-section-being-edited .dslca-modules-section-settings input[data-id="'+jQuery(this).data("id")+'"]',LiveComposer.Builder.PreviewAreaDocument).val().trim().replace("%(%","[").replace("%)%","]")),jQuery(this).hasClass("dslca-modules-section-edit-field-colorpicker")){var e=jQuery(this);jQuery(this).closest(".dslca-modules-section-edit-option").find(".sp-preview-inner").removeClass("sp-clear-display").css({"background-color":e.val()}),jQuery(this).css({"background-color":e.val()})}}),jQuery(".dslca-modules-section-edit-field-upload").each(function(){var e=jQuery(this).closest(".dslca-modules-section-edit-option");jQuery(this).val()&&"disabled"!==jQuery(this).val()?(jQuery(".dslca-modules-section-edit-field-image-add-hook",e).hide(),jQuery(".dslca-modules-section-edit-field-image-remove-hook",e).show()):(jQuery(".dslca-modules-section-edit-field-image-remove-hook",e).hide(),jQuery(".dslca-modules-section-edit-field-image-add-hook",e).show())}),tm(".dslca-modules-section-edit"),LiveComposer.Builder.Flags.panelOpened=!0,tp()),jQuery("body",LiveComposer.Builder.PreviewAreaDocument).addClass("section-editing-in-progress")})},ow=e=>{window.dslcDebug&&console.log("dslc_row_add"),e=void 0!==e&&e;var t=jQuery.Deferred(),o=sessionStorage,i=(jQuery(),o.getItem("cache-dslc-ajax-add-modules-section-v2"));if(null!==i&&DSLCMainOptions.section_padding_vertical!==jQuery(i).find('input[data-id="padding"]').val()&&(o.removeItem("cache-dslc-ajax-add-modules-section-v2"),i=null),null!==i)return oy(i),e&&e(),t;jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-add-modules-section",dslc:"active"},function(i){return o.setItem("cache-dslc-ajax-add-modules-section-v2",i.output),oy(i.output),e&&e(),t})};function oy(e){var t=jQuery(e);return t.appendTo(LiveComposer.Builder.PreviewAreaDocument.find("#dslc-main")),om(),window.dslc_generate_code(),window.dslc_show_publish_button(),new ob(t),new oh(t.find(".dslc-modules-area").eq(0)[0]),t.find(".dslc-modules-area").addClass("dslc-modules-area-empty dslc-last-col"),t}let o$=()=>{jQuery("#dslc-main .dslc-modules-section",LiveComposer.Builder.PreviewAreaDocument).each(function(){"initialized"!==jQuery(this).data("jsinit")&&new ob(this)})},oC=()=>{o$(),o8(),jQuery(document).on("click",".dslca-row-edit-save",function(){var e;window.dslcDebug&&console.log("dslc_confirm_row_changes"),e=void 0!==e&&e,jQuery(".dslca-modules-section-being-edited .dslca-modules-section-settings input",LiveComposer.Builder.PreviewAreaDocument).each(function(){jQuery(this).data("def",jQuery(this).val())}),tm(".dslca-modules"),jQuery(".dslca-row-edit-actions").hide(),jQuery(".dslca-row-options-filter-hook").hide(),jQuery(".dslca-header .dslca-go-to-section-hook").show(),jQuery(".dslca-modules-section-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-modules-section-being-edited dslca-modules-section-change-made"),window.dslc_generate_code(),window.dslc_show_publish_button(),e&&e(),LiveComposer.Builder.Flags.panelOpened=!1,jQuery("body",LiveComposer.Builder.PreviewAreaDocument).removeClass("section-editing-in-progress"),jQuery(".dslca-currently-editing").removeAttr("style"),jQuery(".dslca-row-options-filter-hook.dslca-active").removeClass("dslca-active"),LiveComposer.Builder.PreviewAreaWindow.dslc_responsive_classes(!0)}),jQuery(document).on("click",".dslca-row-edit-cancel",function(){var e;window.dslcDebug&&console.log("dslc_row_cancel_changes"),e=void 0!==e&&e,LiveComposer.Builder.Flags.generate_code_after_row_changed=!1,jQuery(".dslca-modules-section-being-edited .dslca-modules-section-settings input",LiveComposer.Builder.PreviewAreaDocument).each(function(){jQuery(this).val(jQuery(this).data("def")),jQuery('.dslca-modules-section-edit-field[data-id="'+jQuery(this).data("id")+'"]').val(jQuery(this).data("def")).trigger("change")}),LiveComposer.Builder.Flags.generate_code_after_row_changed=!0,window.dslc_generate_code(),window.dslc_show_publish_button(),tm(".dslca-modules"),jQuery(".dslca-row-edit-actions").hide(),jQuery(".dslca-row-options-filter-hook").hide(),jQuery(".dslca-header .dslca-go-to-section-hook").show(),dslc_show_publish_button,jQuery(".dslca-modules-section-being-edited",LiveComposer.Builder.PreviewAreaDocument).removeClass("dslca-modules-section-being-edited dslca-modules-section-change-made"),e&&e(),LiveComposer.Builder.Flags.panelOpened=!1,jQuery("body",LiveComposer.Builder.PreviewAreaDocument).removeClass("section-editing-in-progress"),jQuery(".dslca-currently-editing").removeAttr("style"),jQuery(".dslca-row-options-filter-hook.dslca-active").removeClass("dslca-active"),LiveComposer.Builder.PreviewAreaWindow.dslc_responsive_classes(!0)})},ok=()=>{document.querySelectorAll(".dslca-template").forEach(function(e){e.addEventListener("click",e=>{var t;e.preventDefault(),t=e.target.closest("[data-id]").dataset.id,window.dslcDebug&&console.log("dslc_load_template"),jQuery("#wpcontent").prepend('
'),jQuery(".lc-template-loader").prepend('
'),jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-load-template",dslc:"active",dslc_template_id:t},function(e){jQuery("#dslc-main",LiveComposer.Builder.PreviewAreaDocument).html(e.output),jQuery(".lc-template-loader").remove(),LiveComposer.Builder.PreviewAreaWindow.dslc_carousel(),o$(),ov(),om(),window.dslc_show_publish_button(),window.dslc_generate_code()})})}),jQuery(".dslca-template-import-form").submit(function(e){e.preventDefault(),window.dslcDebug&&console.log("dslc_import_template"),jQuery(".dslca-modal-templates-import .dslca-modal-title").css({opacity:0}),jQuery(".dslca-modal-templates-import .dslca-loading").show(),jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-import-template",dslc:"active",dslc_template_code:jQuery("#dslca-import-code").val()},function(e){ if(!e.output) alert("Please Provide valid input"); jQuery("#dslc-main",LiveComposer.Builder.PreviewAreaDocument).html(e.output),jQuery(".dslca-modal-templates-import .dslca-loading").hide(),jQuery(".dslca-modal-templates-import .dslca-modal-title").css({opacity:1}),d(0,".dslca-modal-templates-import"),LiveComposer.Builder.PreviewAreaWindow.dslc_bg_video(),om(),window.dslc_show_publish_button(),window.dslc_generate_code()})}),jQuery(".dslca-template-save-form").submit(function(e){e.preventDefault(),window.dslcDebug&&console.log("dslc_save_template"),jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-save-template",dslc:"active",dslc_template_code:jQuery("#dslca-code").val(),dslc_template_title:jQuery("#dslca-save-template-title").val()},function(e){d(0,".dslca-modal-templates-save")})}),jQuery(document).on("click",".dslca-delete-template-hook",function(e){var t;e.stopPropagation(),t=jQuery(this).data("id"),window.dslcDebug&&console.log("dslc_delete_template"),jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-delete-template",dslc:"active",dslc_template_id:t},function(e){jQuery('.dslca-template[data-id="'+t+'"]').fadeOut(200,function(){jQuery(this).remove()})})})};jQuery(document).ready(function(e){var t=function(e){var t=jQuery(".dslca-section-scroller",e),o=jQuery(".dslca-section-scroller-inner",e)[0];function i(e){e=e<0?-100:100,e*=.75;var i=t.find(".dslca-section-scroller-content").width(),a=t.width();if(i<=a)return!1;var s=i-a+10;e=(e=(e=parseInt(o.style.left||0)-e)>=0?0:e)<=-s?-s:e,o.style.left=e+"px"}t.on("wheel",function(e){return i(e.originalEvent.deltaY||e.originalEvent.deltaX),!1}),jQuery(".dslca-section-scroller-prev",e).click(function(e){e.preventDefault(),i(-500)}),jQuery(".dslca-section-scroller-next",e).click(function(e){e.preventDefault(),i(500)}),jQuery(window).load(function(){jQuery(window).resize(function(){i(0)})})};t(jQuery(".dslca-section.dslca-modules")),t(jQuery(".dslca-section.dslca-templates-load"))});let o_=()=>{LiveComposer.Builder.Flags.windowScroller=!1,jQuery(LiveComposer.Builder.PreviewAreaDocument).on("dragleave",".lc-scroll-top-area, .lc-scroll-bottom-area",function(e){LiveComposer.Builder.UI.stopScroller()}),jQuery(LiveComposer.Builder.PreviewAreaDocument).on("dragenter dragover",".lc-scroll-bottom-area",function(e){if(!1!==LiveComposer.Builder.Flags.windowScroller)return!1;LiveComposer.Utils.publish("LC.sortableOff",{}),LiveComposer.Builder.Flags.windowScroller=setInterval(function(){LiveComposer.Builder.PreviewAreaWindow.scrollBy(0,5)},6)}),jQuery(LiveComposer.Builder.PreviewAreaDocument).on("dragenter",".lc-scroll-top-area",function(e){if(!1!==LiveComposer.Builder.Flags.windowScroller)return!1;LiveComposer.Utils.publish("LC.sortableOff",{}),LiveComposer.Builder.Flags.windowScroller=setInterval(function(){LiveComposer.Builder.PreviewAreaWindow.scrollBy(0,-5)},6)}),jQuery(LiveComposer.Builder.PreviewAreaDocument).on("dragend mouseup","body",function(e){LiveComposer.Builder.Flags.windowScroller&&LiveComposer.Builder.UI.stopScroller()})};jQuery(document).ready(function(e){o_(),LiveComposer.Builder.UI.stopScroller=function(){LiveComposer.Utils.publish("LC.sortableOn",{}),clearInterval(LiveComposer.Builder.Flags.windowScroller),LiveComposer.Builder.Flags.windowScroller=!1},jQuery("#scroller-stopper").on("dragover",function(){LiveComposer.Builder.UI.stopScroller()})});let ox={addslashes:function(e){return(e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/\'/g,"\\'")).replace(/\"/g,'\\"')).replace(/\0/g,"\\0")},basename:function(e){return e.split(/[\\/]/).pop()},msieversion:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");return!!(t>0||navigator.userAgent.match(/Trident.*rv\:11\./))&&parseInt(e.substring(t+5,e.indexOf(".",t)))},checkParams:function(e){if(!Array.isArray(e))throw"Param is not array";var t={integer:function(e){return isNaN(parseInt(e))},float:function(e){return isNaN(parseFloat(e))},string:function(e){return null!=e&&null!=e&&"string"==typeof e},array:function(e){return Array.isArray(e)},object:function(e){return"object"==typeof e}};e.map(function(e){if(!t[e[1]](e[0]))throw"Param "+e[0]+" is not "+e[1]})},utf8_to_b64:function(e){return window.btoa(unescape(encodeURIComponent(e)))},b64_to_utf8:function(e){return decodeURIComponent(escape(window.atob(e)))},get_page_params:function(){return decodeURIComponent(window.location.search.slice(1)).split("&").reduce(function(e,t){return e[(t=t.split("="))[0]]=t[1],e},{})},get_unique_id:function(){return Math.random().toString(32).slice(2)},update_module_property_raw:function(e,t,o){var i=e.getElementsByClassName("dslca-module-code")[0],a=e.querySelector('.dslca-module-option-front[data-id="'+t+'"]'),s=i.value;(s=JSON.parse(s))[t]=o,s=JSON.stringify(s),i.value=s,i.innerText=s,a.value=o,a.innerText=o},update_section_property_raw:function(e,t,o){var i=e.getElementsByClassName("dslca-section-code")[0],a=e.querySelector('.dslca-modules-section-settings input[data-id="'+t+'"]'),s=i.value;(s=JSON.parse(s))[t]=o,s=JSON.stringify(s),i.value=s,i.innerText=s,a.setAttribute("value",o),a.setAttribute("data-def",o)},publish:function(e,t){t=t||{},this.checkParams([[e,"string"],[t,"object"],]),jQuery(document).trigger({type:e,message:{details:t}}),LiveComposer.Builder.PreviewAreaWindow.dslca_publish_event(e,t)}};window.LiveComposer={Builder:{Elements:{},UI:{},Actions:{},Flags:{},PreviewFrame:{},Helpers:{}},Production:{},Utils:{}},LiveComposer.Builder.Flags={windowScroller:!1,panelOpened:!1,uiHidden:!1,modalOpen:!1,generate_code_after_row_changed:!0},LiveComposer.Builder.Actions={postponed_actions_queue:{},add_postponed_action:function(e){void 0!==e&&(isNaN(this.postponed_actions_queue[e])&&(this.postponed_actions_queue[e]=0),this.postponed_actions_queue[e]+=1)},release_postponed_actions:function(){var e=this;jQuery.each(this.postponed_actions_queue,function(t,o){1"+e.innerHTML+""}else i=e.innerHTML;null!==i&&(o+=i.replace(/\s+/g," ").trim()+"\n")}),e.value=o,t!==o&&window.dslc_show_publish_button()}}(),t=jQuery("#dslca-code").val(),o=jQuery("#dslca-content-for-search").val(),i=jQuery(".dslca-container").data("post-id"),jQuery("body").addClass("dslca-saving-in-progress"),jQuery(".dslca-save-composer .dslca-icon").removeClass("dslc-icon-ok").addClass("dslc-icon-spin dslc-icon-spinner"),jQuery.ajax({method:"POST",type:"POST",url:DSLCAjax.ajaxurl,data:{action:"dslc-ajax-save-composer",dslc:"active",dslc_post_id:i,dslc_code:t,dslc_content_for_search:o},timeout:3e4}).done(function(e){"success"==e.status?(jQuery(".dslca-save-composer").fadeOut(250),jQuery(".dslca-save-draft-composer").fadeOut(250),jQuery("body").append(''),jQuery(".lbmn-cache-iframe").each(function(e,t){jQuery(t).load(function(){jQuery(t).remove()})})):alert("Something went wrong, please try to save again. Are you sure to make any changes? Error Code: "+e.status)}).fail(function(e){console.log(e),"timeout"==e.statusText?alert("The request timed out after 30 seconds. Server do not respond in time. Please try again."):alert("Something went wrong. Please try again. Error Code: "+e.statusText)}).always(function(e){jQuery(".dslca-save-composer .dslca-icon").removeClass("dslc-icon-spin dslc-icon-spinner").addClass("dslc-icon-ok"),jQuery("body").removeClass("dslca-saving-in-progress")}))}),jQuery(document).on("click",".dslca-save-draft-composer-hook",function(e){var t,o;e.preventDefault(),jQuery("body").hasClass("dslca-module-saving-in-progress")||jQuery("body").hasClass("dslca-saving-in-progress")||(window.dslcDebug&&console.log("dslc_save_draft_composer"),t=jQuery("#dslca-code").val(),o=jQuery(".dslca-container").data("post-id"),jQuery("body").addClass("dslca-saving-in-progress"),jQuery(".dslca-save-draft-composer .dslca-icon").removeClass("dslc-icon-ok").addClass("dslc-icon-spin dslc-icon-spinner"),jQuery.post(DSLCAjax.ajaxurl,{action:"dslc-ajax-save-draft-composer",dslc:"active",dslc_post_id:o,dslc_code:t},function(e){jQuery(".dslca-save-draft-composer .dslca-icon").removeClass("dslc-icon-spin dslc-icon-spinner").addClass("dslc-icon-save"),"success"==e.status?jQuery(".dslca-save-draft-composer").fadeOut(250):alert("Something went wrong, please try to save again."),jQuery("body").removeClass("dslca-saving-in-progress")}))}),window.dslc_generate_code(),jQuery([document,LiveComposer.Builder.PreviewAreaWindow.document]).unbind("keydown").bind("keydown",function(e){var t,o,a,s;window.dslc_modal_keypress_events(e),function(e){var t=!1;if(8===e.keyCode){var o=e.srcElement||e.target;t=!("INPUT"===o.tagName.toUpperCase()&&("TEXT"===o.type.toUpperCase()||"PASSWORD"===o.type.toUpperCase()||"NUMBER"===o.type.toUpperCase()||"FILE"===o.type.toUpperCase())||"TEXTAREA"===o.tagName.toUpperCase()||jQuery(o).hasClass("dslca-editable-content")||jQuery(o).hasClass("dslc-tabs-nav-hook-title")||jQuery(o).hasClass("dslc-accordion-title"))||o.readOnly||o.disabled}t&&e.preventDefault()}(e),(116==(t=e).which||82===t.which&&t.metaKey)&&(null===jQuery(".dslca-save-composer-hook").offsetParent&&null===jQuery(".dslca-module-edit-save").offsetParent||(t.preventDefault(),i({title:DSLCString.str_refresh_title,content:DSLCString.str_refresh_descr,confirm:function(){window.location.reload()}}))),83==(o=e).which&&(o.metaKey||o.ctrlKey)&&"block"==jQuery(".dslca-save-composer-hook").css("display")&&(dslc_save_composer(),o.preventDefault()),((a=e).metaKey||a.ctrlKey)&&(LiveComposer.Builder.UI.cmdMode=!0,LiveComposer.Builder.PreviewAreaWindow.document.querySelector("body").classList.add("key-press-cmd")),s=e,LiveComposer.Builder.UI.cmdMode&&(s.metaKey||s.ctrlKey||(LiveComposer.Builder.UI.cmdMode=!1,LiveComposer.Builder.PreviewAreaWindow.document.querySelector("body").classList.remove("key-press-cmd")))}),jQuery([document,LiveComposer.Builder.PreviewAreaWindow.document]).unbind("keyup").bind("keyup",function(e){"Meta"===e.key&&(LiveComposer.Builder.UI.cmdMode=!1,LiveComposer.Builder.PreviewAreaWindow.document.querySelector("body").classList.remove("key-press-cmd"))}),o_(),LiveComposer.Builder.PreviewAreaDocument.on({mouseenter:function(e){jQuery(".dslca-modules-section-manage",LiveComposer.Builder.PreviewAreaDocument).css("z-index","99998");let t=e.target.closest("[data-module-id]"),o=t.offsetHeight,i=t.offsetWidth;o<60&&i<300?t.classList.add("dslc-small-height-module"):t.classList.remove("dslc-small-height-module")},mouseleave:function(e){jQuery(".dslca-modules-section-manage",LiveComposer.Builder.PreviewAreaDocument).css("z-index","999999")}},".dslca-change-width-module-hook, .dslc-module-front .dslca-module-manage"),or(),window.LiveComposer.Utils=ox,document.addEventListener("click",function(e){if(e.target.matches('[data-event="modal-wysiwyg-cancel"]')){let t=new CustomEvent("modalWysiwygCancel",{detail:e.target});document.dispatchEvent(t)}if(e.target.matches('[data-event="modal-wysiwyg-confirm"]')){let o=new CustomEvent("modalWysiwygConfirm",{detail:e.target});document.dispatchEvent(o)}if(e.target.matches('[data-event="module-confirm"]')){let i=new CustomEvent("moduleConfirm",{detail:e.target});document.dispatchEvent(i)}if(e.target.matches('[data-event="module-cancel"]')){let a=new CustomEvent("moduleCancel",{detail:e.target});document.dispatchEvent(a)}},!1),LiveComposer.Builder.PreviewAreaWindow.document.addEventListener("click",function(e){if(e.target.matches(".dslca-link")||e.preventDefault(),e.target.matches('[data-event="module-edit"]')){let t=new CustomEvent("moduleEdit",{detail:e.target});document.dispatchEvent(t)}if(e.target.matches('[data-event="module-duplicate"]')){let o=new CustomEvent("moduleDuplicate",{detail:e.target});document.dispatchEvent(o)}if(e.target.matches('[data-event="module-delete"]')){let i=new CustomEvent("moduleDelete",{detail:e.target});document.dispatchEvent(i)}if(e.target.matches(".dslca-change-width-module-options [data-size]")){let a=new CustomEvent("moduleChangeWidth",{detail:e.target});document.dispatchEvent(a)}if(e.target.matches('[data-event="wysiwyg-edit"]')){let s=new CustomEvent("wysiwygEdit",{detail:e.target});document.dispatchEvent(s)}if(e.target.matches('[data-event="module-style-copy"]')){let l=new CustomEvent("copyModuleStyles",{detail:e.target});document.dispatchEvent(l)}if(e.target.matches('[data-event="module-style-paste"]')){let d=new CustomEvent("pasteModuleStyles",{detail:e.target});document.dispatchEvent(d)}},!1),LiveComposer.Builder.PreviewAreaWindow.document.addEventListener("focusout",function(e){if(e.target.matches('[contenteditable="true"]')){let t=new CustomEvent("contentEditableFocusOut",{detail:e.target});document.dispatchEvent(t)}},!1)},window.onbeforeunload=function(){}}}); \ No newline at end of file diff --git a/readme.txt b/readme.txt index a3d9675f..6b88e655 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: LiveComposer Tags: page builder, landing page builder, frontend page builder, drag and drop page builder, website builder Requires at least: 4.7 Tested up to: 6.4.2 -Stable tag: 1.5.32 +Stable tag: 1.5.33 License: GPLv3 Page builder for WordPress with drag and drop header/footer editing, responsive settings, and animations. Compatible with Gutenberg block editor. @@ -58,6 +58,9 @@ In most of the cases, this is because the homepage is not a real WordPress page, * 🦊 [Check out our WooCommerce Page Builder Extension](https://livecomposerplugin.com/downloads/woocommerce-page-builder/?utm_source=wp-admin&utm_medium=changelog&utm_campaign=woo-integration) * 👀 [We keep updating and improving our extensions pack](https://livecomposerplugin.com/downloads/extensions/?utm_source=wp-admin&utm_medium=changelog&utm_campaign=add-ons) ACF + CPT + MegaMenu + 9 more add-ons. += 1.5.33 - Feb 05 2024 = +* Security improvement + = 1.5.32 - Jan 25 2024 = * Reverted changes from Release 1.5.30 and 1.5.31