window.tutor_ajax_counter=0,window.jQuery(document).ajaxStart(function(){window.tutor_ajax_counter++}),window.jQuery(document).ajaxStop(function(){window.tutor_ajax_counter--}),window.jQuery(document).ready(function(o){function e(){setTimeout(function(){var t;0<window.tutor_ajax_counter?e():((t=o("#tutor-course-topics")).find('[name="tutor_wpml_copy_source"]').length||t.append('<input type="hidden" name="tutor_wpml_copy_source" value="1"/>'),o("#save-post").length?o("#save-post").trigger("click"):o("#publish").length?o("#publish").trigger("click"):o(".editor-post-save-draft").length&&(o(".editor-post-save-draft").trigger("click"),wp.data.subscribe(function(){function t(){setTimeout(function(){wp.data.select("core/editor").isSavingPost()?t():window.location.reload()},1e3)}var o=wp.data.select("core/editor").isSavingPost(),e=wp.data.select("core/editor").isAutosavingPost();o&&!e&&t()})))},1e3)}var t=o("#icl_div #icl_cfo").get(0);t&&t.addEventListener("click",function(){e()})});