function pageGeneratorProGutenbergRegisterBlockFormatter(e){!function(t,o,n,r){const{BlockControls:a}=t,{registerFormatType:c,getTextContent:i,slice:g}=o,{createElement:l}=n,{ToolbarGroup:_,ToolbarButton:p}=r;let s="dashicons-tablet";void 0!==e.gutenberg_icon&&(s=e.gutenberg_icon.search("svg")>=0?n.RawHTML({children:e.gutenberg_icon}):e.gutenberg_icon),c("page-generator-pro/"+e.name,{title:e.title,tagName:e.tag,className:e.name,edit:function(t){let n=i(g(t.value));return l(a,{},l(_,{},l(p,{key:"page_generator_pro_"+e.name+"_toolbar_button",icon:s,title:e.title,onClick:function(){window[e.click](e,t,n,o)}})))}})}(window.wp.blockEditor,window.wp.richText,window.wp.element,window.wp.components)}function pageGeneratorProGutenbergBlockFormatterGenerateSpintax(e,t,o,n){const{insert:r,create:a}=n;wpzinc_modal_open("Generating..."),jQuery.post(ajaxurl,{action:"page_generator_pro_tinymce_spintax_generate",nonce:e.nonce,content:o},(function(e){return e.success?(wpzinc_modal_show_success_and_exit("Done!"),t.onChange(r(t.value,a({html:e.data.replace(/(<([^>]+)>)/gi,"")})))):wpzinc_modal_show_error_message(e.data)}))}function pageGeneratorProGutenbergBlockFormatterResearch(e,t,o,n){pageGeneratorProQuickTagsLoadModal(e,"gutenberg")}if("undefined"!=typeof wp&&void 0!==wp.blocks)for(const e in page_generator_pro_gutenberg_block_formatters)pageGeneratorProGutenbergRegisterBlockFormatter(page_generator_pro_gutenberg_block_formatters[e]);