function pageGeneratorProQuickTagsRegister(e){for(const a in e)QTags.addButton("page_generator_pro_"+a,e[a].title,function(){pageGeneratorProQuickTagsLoadModal(e[a],"quicktags")})}function pageGeneratorProQuickTagsLoadModal(e,a){var o;(o=jQuery).post(ajaxurl,{action:"page_generator_pro_output_tinymce_modal",nonce:page_generator_pro_tinymce.nonces.tinymce,editor_type:a,shortcode:e.name},function(a){wpZincModal.open(),o("div.wpzinc-modal div.media-modal.wp-core-ui").css({width:e.modal.width+"px",height:e.modal.height+20+"px"}),o("#wpzinc-modal .media-frame-title h1").text(e.title),o("#wpzinc-modal .media-frame-content").html(a),o("div.wpzinc-modal div.media-modal.wp-core-ui div.wpzinc-vertical-tabbed-ui").css({height:e.modal.height-50+"px"});const i=e.render_callback?"insert":"run";switch(o("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").removeClass("insert"),o("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").removeClass("run"),o("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").addClass(i),i){case"insert":o("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").text("Insert");break;case"run":o("#wpzinc-modal .media-frame-toolbar .media-toolbar .media-toolbar-primary button").text("Run")}wp_zinc_tabs_init(),page_generator_pro_reinit_selectize(),"undefined"!=typeof wp_zinc_autocomplete_initialize&&wp_zinc_autocomplete_initialize(".wpzinc-tinymce-popup"),page_generator_pro_conditional_fields_initialize(),o("select.wpzinc-conditional, .wpzinc-conditional select").trigger("change"),o('form.wpzinc-tinymce-popup select[name="maptype"]').trigger("change.page-generator-pro")})}pageGeneratorProQuickTagsRegister(page_generator_pro_quicktags);