!function(e){vart={};functionn(r){if(t[r])returnt[r].exports;vari=t[r]={i:r,l:!1,exports:{}};returne[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)returne;if(4&t&&"object"==typeofe&&e&&e.__esModule)returne;varr=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeofe)for(variine)n.d(r,i,function(t){returne[t]}.bind(null,i));returnr},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=61)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.React},function(e,t,n){varr=n(35),i=n(36),s=n(23),a=n(37);e.exports=function(e,t){returnr(e)||i(e,t)||s(e,t)||a()}},function(e,t){functionn(t){returne.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){returne.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=window.wp.apiFetch},function(e,t,n){e.exports=n(29)()},,function(e,t){e.exports=function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}},function(e,t){functionn(e,t){for(varn=0;n<t.length;n++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){returnt&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){varr=n(24);e.exports=function(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){varr=n(14),i=n(13);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeoft?i(e):t}},function(e,t){e.exports=function(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}},function(e,t){functionn(t){return"function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?e.exports=n=function(e){returntypeofe}:e.exports=n=function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},n(t)}e.exports=n},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forceVisible=t.forceCheck=t.lazyload=void0;varr=function(){functione(e,t){for(varn=0;n<t.length;n++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}returnfunction(t,n,r){returnn&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(3),s=u(i),a=u(n(7)),o=n(31),l=u(n(32)),c=u(n(33)),p=u(n(34));functionu(e){returne&&e.__esModule?e:{default:e}}functionm(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionf(e,t){if(!e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeoft&&"function"!=typeoft?e:t}functiong(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function, not "+typeoft);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}varh="data-lazyload-listened",b=[],d=[],O=!1;try{varv=Object.defineProperty({},"passive",{get:function(){O=!0}});window.addEventListener("test",null,v)}catch(e){}vary=!!O&&{capture:!1,passive:!0},j=function(e){vart=e.ref;if(tinstanceofHTMLElement){varn=(0,l.default)(t);(e.props.overflow&&n!==t.ownerDocument&&n!==document&&n!==document.documentElement?function(e,t){varn=e.ref,r=void0,i=void0,s=void0,a=void
Object(j.__)("Requires GP Premium %s.","gp-premium"),o)),!!p&&y(c,l)>0&&Object(d.createElement)("span",{className:"generatepress-site-library-required-version"},Object(j.sprintf)(
/* translators: Site library site built by "author name" */
Object(j.__)("Built by","gp-premium")+" ",Object(d.createElement)("a",{href:this.state.siteData.author_url,target:"_blank",rel:"noreferrer noopener"},this.state.siteData.author_name))),Object(d.createElement)(_.Button,{onClick:function(){e.setState({isAPIWorking:!1,siteOpened:!1,siteData:{},siteSlug:"",sitePlugins:{},hasData:{},hasWidgets:!1,importOptions:!0,importContent:!0,confirmImport:!1,importComplete:!1,installablePlugins:[],activePlugins:[],manualPlugins:[]})}},Object(d.createElement)("svg",{width:"35",height:"35",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},Object(d.createElement)("path",{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})))),Object(d.createElement)("div",{className:"generatepress-site-library-content"},!!this.state.siteData.description&&Object(d.createElement)("p",null,Object(E.decodeEntities)(this.state.siteData.description)),!this.state.importComplete&&Object(d.createElement)(d.Fragment,null,0===Object.keys(this.state.hasData).length&&Object(d.createElement)(d.Fragment,null,gppSiteLibrary.isDebugEnabled&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)("h3",null,Object(j.__)("Debug Mode Enabled","gp-premium")),Object(d.createElement)("p",null,Object(j.__)("WordPress debug mode is currently enabled. With this, any errors from third-party plugins might affect the import process.","gp-premium")),Object(d.createElement)("p",null,Object(j.__)("To disable it, find WP_DEBUG in your wp-config.php file and set it to false like the below.","gp-premium")),Object(d.createElement)("code",null,"define( 'WP_DEBUG', false );"),Object(d.createElement)("p",null,Object(d.createElement)("a",{href:"https://docs.generatepress.com/article/debug-mode-enabled/",target:"_blank",rel:"noreferrer noopener"},Object(j.__)("Learn more here","gp-premium")))),Object.keys(this.state.sitePlugins).length>0&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)("h3",null,Object(j.__)("Plugins","gp-premium")),Object(d.createElement)("p",null,Object(j.__)("This site uses the following plugins.","gp-premium")),Object(d.createElement)("ul",{className:"generatepress-site-library-plugins"},Object.entries(this.state.sitePlugins).map((function(e){vart=i()(e,1)[0];returnObject(d.createElement)("li",{key:t},t)})))),Object(d.createElement)("div",{className:"gpp-library-action-button"},Object(d.createElement)(_.Button,{isPrimary:!0,disabled:this.state.isAPIWorking,onClick:function(t){e.setState({isAPIWorking:!0});varn=t.target.nextElementSibling;n.textContent=Object(j.__)("Gathering information","gp-premium"),P()({path:"/generatepress-site-library/v1/get_site_data",method:"POST",data:{siteData:e.state.siteData}}).then((function(t){varr=[],s=[],a=[];Object.entries(t.response.plugin_data).forEach((function(e){varn=i()(e,1)[0],o=t.response.plugin_data[n];o.repo&&!o.installed?r.push(o.name):o.installed||o.active?s.push(o.name):a.push(o.name)})),e.setState({isAPIWorking:!1,hasData:t.response,sitePlugins:t.response.plugins,hasWidgets:t.response.widgets,installablePlugins:r,activePlugins:s,manualPlugins:a}),n.classList.add("gpp-library-action-message--show"),n.textContent=t.response,t.success&&t.response?setTimeout((function(){n.classList.remove("gpp-library-action-message--show")}),3e3):n.classList.add("gpp-library-action-message--error")}))}},this.state.isAPIWorking&&Object(d.createElement)(_.Spinner,null),!this.state.isAPIWorking&&Object(j.__)("Get Started","gp-premium")),Object(d.createElement)("span",{className:"gpp-library-action-message"}))),Object.keys(this.state.hasData).length>0&&Object.keys(this.state.sitePlugins).length>0&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)("h3",null,Object(j.__)("Plugins","gp-premium")),this.state.installablePlugins.length>0&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)("p",null,Object(j.__)("These plugins can be installed automatically.","gp-premium")),Object(d.createElement)("ul",{className:"generatepress-site-library-plugins"},this.state.inst