Version Description
- Fix: Issue with elementor.
- Update: Starter Install, add optional subscribe.
Download this release
Release Info
Developer | britner |
Plugin | Starter Templates by Kadence WP |
Version | 1.2.6 |
Comparing to | |
See all releases |
Code changes from version 1.2.5 to 1.2.6
- assets/css/starter-templates.css +1 -1
- assets/images/stellar-sale-plugin.png +0 -0
- assets/js/starter-templates.asset.php +1 -1
- assets/js/starter-templates.js +1 -1
- class-kadence-starter-templates.php +121 -46
- inc/class-author-meta.php +48 -0
- inc/class-helpers.php +28 -0
- inc/class-import-actions.php +31 -2
- inc/class-import-give.php +261 -0
- inc/class-importer.php +98 -4
- inc/react/src/index.js +520 -418
- inc/react/src/starter-templates.scss +54 -5
- inc/react/src/subscribe-form.js +73 -0
- kadence-starter-templates.php +1 -1
- readme.txt +5 -1
- vendor/wxr-importer/Importer.php +1 -1
- vendor/wxr-importer/WXRImporter.php +4 -0
assets/css/starter-templates.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.kb-pro-template{padding:4px 10px;position:absolute;z-index:10000;bottom:10px;right:10px;background:#c53030;border-radius:10px;line-height:20px;color:#fff;text-transform:uppercase;font-weight:bold;font-size:11px;text-align:center}.bundle-install-required .plugin-status{color:#c53030}a.components-external-link.kst-upgrade.button-hero.button.button-primary{width:80%;min-height:36px;line-height:2.5;font-size:14px;text-align:center}.kt-upgrade-notice{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;height:70px}.kt-popover-pro-notice{position:absolute;left:0;right:0;top:0;bottom:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;padding:20px;opacity:0;z-index:10;text-align:center;background:rgba(255,255,255,.9);transition:opacity .3s ease-in-out}.kt-popover-pro-notice .components-external-link{background:#007cba;padding:10px 10px;color:#fff;border-radius:4px;text-decoration:none}.kt-popover-pro-notice:hover{opacity:1}.appearance_page_kadence-starter-templates #wpcontent{padding:0}.kadence_theme_dash_back{height:100%}.kst-choose-builder-wrap.adjust-to-three-column{max-width:600px}.kst-choose-builder-wrap.adjust-to-three-column .kst-choose-builder-inner{grid-template-columns:1fr 1fr 1fr}.kadence_theme_dash_head .components-menu-items__item-icon.custom-image-icon-src{margin-right:10px}.kst-choose-builder-inner img.custom-image-icon-src{width:100px;max-height:100px;height:auto}.custom-image-icon-src,.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button img{max-width:100%;width:24px;max-height:24px;height:auto}.kadence_theme_dash_reload .components-button.kt-reload-templates.has-icon{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;height:100%;width:40px;color:#4a5568;border-radius:0;-webkit-justify-content:center;justify-content:center}.kadence_theme_dash_reload .components-button.kt-reload-templates.has-icon svg{margin:0;width:18px;height:18px}.kadence_theme_dash_reload{height:100%}.appearance_page_kadence-starter-templates .wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{bottom:70px}.kadence_theme_dash_back .components-button.kt-import-back{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;height:100%;width:40px;color:#4a5568;border-radius:0}.kst-import-options-title{line-height:20px;padding-top:5px;font-size:12px;text-transform:uppercase;text-align:center;margin:0;color:#4a5568}.appearance_page_kadence-starter-templates .expanded .wp-full-overlay-footer{height:70px}.kadence_theme_dash_back .components-button.kt-import-back:hover{border-left:1px solid #cbd5e0;border-right:1px solid #cbd5e0;background:#f6f9fd}.kadence_theme_dash_back .components-button.kt-import-back svg{width:30px;height:30px;margin:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-button svg.kst-chev{width:16px}.components-modal__frame.kst-import-modal{min-width:460px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12),.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11){padding-top:20px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12) .kst-palette-bg:before,.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11) .kst-palette-bg:before{content:"dark";color:#111}.kst-import-selection-options{padding-bottom:90px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12) .kst-palette-bg,.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11) .kst-palette-bg{position:absolute;left:2px;top:-1px;right:2px;display:block;bottom:auto;opacity:.2;height:1px;border-radius:0}.components-modal__frame.kst-import-modal .components-button.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto}.kst-selected-font-pair{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-bottom:20px}.kst-selected-font-pair img{max-width:50px}h3.kst-selected-font-pair-title{margin-bottom:0}.kadence-starter-templates-preview .install-theme-info p.desc-small,.kadence-starter-templates-preview .kadence-starter-required-plugins p.desc-small{color:#4a5568;font-style:italic}.kadence-starter-templates-preview .install-theme-info .theme-screenshot{width:60px;margin:15px 15px 15px 0}.kadence-starter-templates-preview .theme-info-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.kadence-starter-templates-preview .install-theme-info{padding-bottom:0}.kst-choose-builder-wrap{min-height:calc( 100vh - 180px );max-width:400px;margin:0 auto;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button{box-shadow:none !important}.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button.active-item{border:1px solid #a0aec0}.kst-choose-builder-center{width:100%;background:#fff;padding:30px;border-radius:4px;box-shadow:0px 25px 35px -10px rgba(0,0,0,.05);position:relative}.kst-choose-builder-center .kst-overlay-saving{position:absolute;top:0;left:0;right:0;bottom:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background:rgba(255,255,255,.6);border-radius:4px}.kst-choose-builder-inner{display:grid;grid-template-columns:1fr 1fr;grid-gap:30px}.kst-choose-builder-center h2.kst-choose-builder-title{margin-top:0;text-align:center;text-transform:uppercase;font-weight:300;margin-bottom:30px;font-size:20px;color:#718096}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type{font-size:20px;text-align:center;height:auto;padding:20px;display:-webkit-flex;display:flex;border:1px solid #cbd5e0;border-radius:4px;-webkit-flex-direction:column;flex-direction:column;font-weight:500;text-transform:uppercase;color:#4a5568}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type svg{width:100px;height:100px;margin-bottom:10px;margin-right:0}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type:hover{color:#2d3748;border-color:#007cba}.components-button-group.kst-font-group{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:1em}.components-button-group.kst-font-group .components-button.kst-font-btn{display:block;height:auto;padding:5px 5px 0;border:1px solid #eee;border-radius:0;background:#fff;outline:0;box-shadow:none}.components-button-group.kst-font-group .components-button.kst-font-btn img.font-pairing{max-width:100%}.font-title-wrap,.palette-title-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.font-title-wrap h2,.palette-title-wrap h2{font-size:16px;font-weight:600;color:#4a5568}.kadence-starter-required-plugins{padding:10px 20px 10px}.font-title-wrap,.kadence-starter-required-plugins{border-top:1px solid #e2e8f0;padding-top:6px;margin-top:18px}.kadence-starter-required-plugins h2.kst-required-title{font-size:16px;font-weight:600;color:#4a5568}.components-button-group.kst-font-group .components-button.kst-font-btn.active{border-color:#333}.components-button-group.kst-font-group .components-button.kst-font-btn:hover{border-color:#999}.kadence_theme_starter_dash_inner{margin:90px 20px 0}.kadence_theme_dash_head .st2{fill:#191717}.install-theme-info .components-button.has-icon .dashicons-image-rotate{width:10px;height:10px;font-size:10px}.kadence_theme_dash_head{background:#fff;padding:0px 20px;height:60px;border-bottom:1px solid #ebebeb;box-shadow:0 0 6px -2px rgba(0,0,0,.1);position:fixed;top:32px;left:160px;z-index:100;right:0}.kadence_theme_dash_head h1{color:#2d3748;line-height:50px;padding:0;height:50px;margin:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.kadence_theme_dash_head .subtext{font-size:16px;color:#718096;display:inline-block;padding-left:10px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;display:-webkit-flex;display:flex;height:100%;-webkit-align-items:center;align-items:center}.kadence_theme_dash_head .kadence_theme_dash_logo{width:50px;height:50px;padding-right:10px}.kadence_theme_dash_head .kadence_theme_dash_logo img{width:50px}.kadence_theme_dash_head .kadence_starter_builder_type{-webkit-flex-grow:1;flex-grow:1;text-align:right}.kadence_theme_dash_head .kadence_theme_dash_version span{padding:5px;background:#4a5568;color:#fff}.folded .kadence_theme_dash_head{left:36px}@media only screen and (max-width: 960px){.auto-fold .kadence_theme_dash_head{left:36px}}@media screen and (max-width: 782px){.auto-fold .kadence_theme_dash_head{left:0px}}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar{border-color:#888}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar button.components-button{padding:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar button.components-button svg{width:40px;height:40px}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar .components-dropdown__content button.components-button svg{width:24px;height:24px;margin-left:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown__content{text-align:left}.wrap.kadence_theme_starter_dash{margin:0}.kadence_theme_dashboard{margin:0 auto}.templates-grid{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);grid-gap:2em}.kst-template-item .components-button.kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;overflow:hidden;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-template-item .components-button.kst-import-btn img{max-width:100%;height:auto}.kst-grid-single-item{max-width:800px}.kst-grid-single-item .kst-template-item{overflow:hidden}.kst-grid-single-item .kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-grid-single-item .kst-import-btn img{max-width:100%;height:auto}.components-modal__frame.kst-import-modal{max-width:600px}.components-modal__frame.kst-import-modal .components-button.is-primary{margin-top:20px}.kadence_starter_templates_notice{background:transparent;margin-bottom:20px;border:1px solid #cbd5e0;padding:10px;color:#4a5568;font-weight:normal}.kst-import-modal ul.kadence-required-wrap{margin-bottom:20px}.components-modal__frame.kst-import-modal{-webkit-animation:none !important;animation:none !important}.kst-import-modal h3{font-size:16px}.kadence_starter_templates_response{background:#fffaf0;margin-bottom:20px;border:1px solid #ed8936;padding:20px;color:#c05621;font-weight:bold}.kst-import-selection-title .components-button.kt-import-back{border:1px solid;margin-right:10px}.kst-import-selection-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-bottom:10px}.kst-grid-single-item-single-page .kst-template-item{padding-bottom:90%}.kadence_starter_templates_response h2{margin-bottom:10px;margin-top:0}.kst-template-item{position:relative;height:0;box-shadow:0 1px 2px rgba(0,0,0,.15);padding-bottom:65%}.kst-template-item::after{content:"";position:absolute;z-index:-1;width:100%;height:100%;opacity:0;border-radius:5px;box-shadow:0 15px 15px -10px rgba(0,0,0,.1);transition:opacity .3s ease-in-out}.kst-template-item:hover::after{opacity:1}.sidebar-section .components-panel__body.is-opened{padding:20px}.sidebar-section h2:first-child,.tab-section h2:first-child{margin-top:0}.side-panel .components-panel+.components-panel{margin-top:1rem}.tab-section .components-panel__body.is-opened{padding:25px}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button{border:1px solid transparent;background:transparent;border:none;box-shadow:none;border-radius:0;cursor:pointer;height:48px;padding:3px 16px;margin-left:0;font-weight:500}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:hover{box-shadow:none !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:not(.active-tab):hover{color:#007cba !important;background:transparent !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button.active-tab{background:#fff;border:1px solid #e2e4e7;border-bottom-color:transparent}.kadence-dashboard-tab-panel .components-tab-panel__tabs{margin-bottom:-1px}.two-col-grid{display:grid;grid-gap:1rem;grid-template-columns:1fr 1fr 1fr}h3.section-sub-head{background:#edf2f7;padding:10px;color:#4a5568;font-size:14px;text-transform:uppercase;margin-bottom:1rem;margin-top:2rem}.link-item{border:1px solid #e2e8f0;padding:20px;border-radius:4px;display:-webkit-flex;display:flex;-webkit-flex-flow:column nowrap;flex-flow:column nowrap}.link-item h4{margin:0}.dashboard-pro-settings{margin-top:2rem}.link-item .link-item-foot{margin-top:auto;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.link-item .link-item-foot .components-spinner{margin-top:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field{margin-bottom:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field .components-form-toggle{margin-right:0}.link-item .link-item-foot>*:first-child{-webkit-flex-grow:2;flex-grow:2}.link-item a{display:block;background:transparent;color:#4a5568}.link-item a:hover{color:#007cba}span.kt-license-status{padding:4px;margin-left:10px;font-size:14px;text-transform:uppercase}span.kt-license-status.k-inactive{color:#c05621 !important;background:#fffaf0 !important}span.kt-license-status.k-active{color:#2b6cb0 !important;background:#ebf8ff !important}.license-section h2{display:-webkit-flex;display:flex;margin-top:0;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.license-section table.form-table{display:block}.license-section table.form-table tbody{display:block}.license-section table.form-table td,.license-section table.form-table tr{display:block;padding:0;width:100%}.license-section .form-table th{padding:0;width:100%;margin-bottom:4px;display:block;color:#4a5568}.license-section p.submit{padding:0;margin-top:10px}.license-section table.form-table input[type=text]{width:100%}.kadence-starter-templates-preview .install-theme-info .theme-name{font-size:20px}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button{width:100%;line-height:1;min-height:35px;padding:0}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{padding:5px}.kadence-starter-templates-preview button.components-button.kst-palette-btn{border-radius:4px !important;padding:5px 5px 5px 7px;height:auto;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:flex-end;align-items:flex-end;-webkit-justify-content:center;justify-content:center;border:1px solid transparent;position:relative;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn .kst-palette-bg{display:none}.kst-template-item .components-button.kst-import-btn:hover,.kst-template-item .components-button.kst-import-btn:focus{box-shadow:0 7px 15px 0 rgba(0,0,0,.15) !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn:focus{border:1px solid #999;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:focus{background:#fff;border:1px solid #333;box-shadow:none}.demo-title{height:30px;margin:0;padding:10px 0;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);background:#fff;position:absolute;bottom:0;left:0;width:100%}.demo-title h4{margin:0;font-size:14px;text-align:left;line-height:30px;padding:0 20px;color:#1e1e1e}.kadence-starter-templates-preview .components-button-group.kst-palette-group{display:grid;grid-template-columns:1fr 1fr;grid-gap:5px}@media(max-width: 1860px){.kadence-starter-templates-preview .kadence-swatche-item-wrap{width:22px !important;height:22px !important}h2.palette-title{font-size:15px}}@media(max-width: 1059px){.templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}p.install-third-party-notice{max-width:540px;background:#fffaf0;padding:1em;color:#c05621;border:1px solid #c05621;font-weight:600}.plugin-install-required{display:block;font-style:oblique;font-weight:400;color:#c05621}.kadence-required-wrap{font-weight:bold;list-style:disc;padding-left:1.4em}span.plugin-status{text-transform:uppercase;color:#718096}.kst-palette-btn.kst-selected-color-palette{display:-webkit-flex;display:flex;margin-bottom:20px}.finshed-notice-success .button-primary.button.kadence-starter-templates-finish-button{padding:10px 16px;font-size:18px}.kst-grid-single-site{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);grid-gap:4em}.kst-import-selection{height:100%;max-height:calc(100vh - 140px);overflow-y:scroll}.kst-import-grid-title h2{font-size:14px;line-height:20px;margin:10px 0;color:#4a5568}.kst-import-selection-title h2{font-size:16px;line-height:26px;margin:0 0 10px 0;color:#2d3748}.kst-import-single-selection-options-wrap{background:#fff;padding:35px 35px 35px;max-width:700px;width:100%;box-sizing:border-box}.appearance_page_kadence-starter-templates #wpbody-content{padding-bottom:25px}.desc-small.note-about-colors{font-size:14px;color:#718096;margin:1.5em 0}.kst-import-selection-options .kst-template-item{padding-bottom:126%}.kst-import-selection img{max-width:100%}.kst-import-selection-title h2 span{font-weight:bold;color:#000}.appearance_page_kadence-starter-templates .update-nag.notice,.appearance_page_kadence-starter-templates #wpfooter{display:none}.kadence_theme_starter_dashboard>.notice{display:none}.demo-title h4 span{position:absolute;bottom:100%;right:0;padding:5px 15px;background:rgba(0,0,0,.7);color:#fff;font-size:14px;font-weight:400;opacity:0}.kst-import-btn:hover .demo-title h4 span{opacity:1}.kst-import-selection-options .kst-template-item .components-button.kst-import-btn .LazyLoad{overflow-y:hidden;position:absolute;top:0;left:0;right:0;bottom:40px}.kst-import-single-selection-options-wrap .components-button.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto;margin-top:20px}.kst-import-selection-footer{position:fixed;padding:10px 20px;bottom:0;background:#fff;right:0;left:0;margin-left:160px;z-index:100;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center}button.components-button.kt-import-fullsite.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto}.folded .kst-import-selection-footer{margin-left:36px}@media(max-width: 1059px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1060px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1660px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 2360px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}.kst-import-single-selection-options-wrap .components-base-control.components-toggle-control{margin-bottom:15px;border-top:1px solid #e2e8f0;padding-top:15px}.components-modal__frame.ksp-confirm-modal{max-width:500px}.ksp-override-model-buttons{text-align:right}.ksp-override-model-buttons .components-button{margin-left:10px}.main-panel{margin:0 auto;max-width:1260px}.main-panel .kst-grid-single-site{grid-template-columns:minmax(0, 2fr) minmax(0, 1fr);grid-gap:3em}.kst-import-selection-bottom{text-align:center;margin-top:40px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;max-width:1260px}.kst-template-item{padding-bottom:126%}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{display:-webkit-flex;display:flex}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button:not(.button-primary){margin-right:10px}@media(max-width: 1059px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1060px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1660px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}
|
1 |
+
.kb-pro-template{padding:4px 10px;position:absolute;z-index:10000;bottom:10px;right:10px;background:#c53030;border-radius:10px;line-height:20px;color:#fff;text-transform:uppercase;font-weight:bold;font-size:11px;text-align:center}.bundle-install-required .plugin-status{color:#c53030}a.components-external-link.kst-upgrade.button-hero.button.button-primary{width:80%;min-height:36px;line-height:2.5;font-size:14px;text-align:center}.kt-upgrade-notice{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;height:70px}.kt-popover-pro-notice{position:absolute;left:0;right:0;top:0;bottom:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;padding:20px;opacity:0;z-index:10;text-align:center;background:rgba(255,255,255,.9);transition:opacity .3s ease-in-out}.kt-popover-pro-notice .components-external-link{background:#007cba;padding:10px 10px;color:#fff;border-radius:4px;text-decoration:none}.kt-popover-pro-notice:hover{opacity:1}.appearance_page_kadence-starter-templates #wpcontent{padding:0}.kadence_theme_dash_back{height:100%}.kst-choose-builder-wrap.adjust-to-three-column{max-width:600px}.kst-choose-builder-wrap.adjust-to-three-column .kst-choose-builder-inner{grid-template-columns:1fr 1fr 1fr}.kadence_theme_dash_head .components-menu-items__item-icon.custom-image-icon-src{margin-right:10px}.kst-choose-builder-inner img.custom-image-icon-src{width:100px;max-height:100px;height:auto}.custom-image-icon-src,.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button img{max-width:100%;width:24px;max-height:24px;height:auto}.kadence_theme_dash_reload .components-button.kt-reload-templates.has-icon{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;height:100%;width:40px;color:#4a5568;border-radius:0;-webkit-justify-content:center;justify-content:center}.kadence_theme_dash_reload .components-button.kt-reload-templates.has-icon svg{margin:0;width:18px;height:18px}.kadence_theme_dash_reload{height:100%}.appearance_page_kadence-starter-templates .wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{bottom:70px}.kadence_theme_dash_back .components-button.kt-import-back{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;height:100%;width:40px;color:#4a5568;border-radius:0}.kst-import-options-title{line-height:20px;padding-top:5px;font-size:12px;text-transform:uppercase;text-align:center;margin:0;color:#4a5568}.appearance_page_kadence-starter-templates .expanded .wp-full-overlay-footer{height:70px}.kadence_theme_dash_back .components-button.kt-import-back:hover{border-left:1px solid #cbd5e0;border-right:1px solid #cbd5e0;background:#f6f9fd}.kadence_theme_dash_back .components-button.kt-import-back svg{width:30px;height:30px;margin:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-button svg.kst-chev{width:16px}.components-modal__frame.kst-import-modal{min-width:460px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12),.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11){padding-top:20px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12) .kst-palette-bg:before,.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11) .kst-palette-bg:before{content:"dark";color:#111}.kst-import-selection-options{padding-bottom:90px}.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(12) .kst-palette-bg,.kadence-starter-templates-preview button.components-button.kst-palette-btn:nth-child(11) .kst-palette-bg{position:absolute;left:2px;top:-1px;right:2px;display:block;bottom:auto;opacity:.2;height:1px;border-radius:0}.components-modal__frame.kst-import-modal .components-button.is-primary{padding-left:0px;padding-top:16px;padding-right:0px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto;display:block;width:100%;text-align:center}.kst-import-modal .components-panel__body h3{font-size:14px;line-height:20px;margin:10px 0;color:#4a5568}.kst-selected-font-pair{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-bottom:20px}.kst-selected-font-pair img{max-width:50px}h3.kst-selected-font-pair-title{margin-bottom:0}.kadence-starter-templates-preview .install-theme-info p.desc-small,.kadence-starter-templates-preview .kadence-starter-required-plugins p.desc-small{color:#4a5568;font-style:italic}.kadence-starter-templates-preview .install-theme-info .theme-screenshot{width:60px;margin:15px 15px 15px 0}.kadence-starter-templates-preview .theme-info-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.kadence-starter-templates-preview .install-theme-info{padding-bottom:0}.kst-choose-builder-wrap{min-height:calc( 100vh - 180px );max-width:400px;margin:0 auto;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button{box-shadow:none !important}.kadence_starter_builder_type .components-dropdown__content .components-button.components-menu-item__button.active-item{border:1px solid #a0aec0}.kst-choose-builder-center{width:100%;background:#fff;padding:30px;border-radius:4px;box-shadow:0px 25px 35px -10px rgba(0,0,0,.05);position:relative}.kst-choose-builder-center .kst-overlay-saving{position:absolute;top:0;left:0;right:0;bottom:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background:rgba(255,255,255,.6);border-radius:4px}.kst-choose-builder-inner{display:grid;grid-template-columns:1fr 1fr;grid-gap:30px}.kst-choose-builder-center h2.kst-choose-builder-title{margin-top:0;text-align:center;text-transform:uppercase;font-weight:300;margin-bottom:30px;font-size:20px;color:#718096}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type{font-size:20px;text-align:center;height:auto;padding:20px;display:-webkit-flex;display:flex;border:1px solid #cbd5e0;border-radius:4px;-webkit-flex-direction:column;flex-direction:column;font-weight:500;text-transform:uppercase;color:#4a5568}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type svg{width:100px;height:100px;margin-bottom:10px;margin-right:0}.kst-choose-builder-center .kst-choose-builder-inner .components-button.kt-import-select-type:hover{color:#2d3748;border-color:#007cba}.components-button-group.kst-font-group{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:1em}.components-button-group.kst-font-group .components-button.kst-font-btn{display:block;height:auto;padding:5px 5px 0;border:1px solid #eee;border-radius:0;background:#fff;outline:0;box-shadow:none}.components-button-group.kst-font-group .components-button.kst-font-btn img.font-pairing{max-width:100%}.font-title-wrap,.palette-title-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.font-title-wrap h2,.palette-title-wrap h2{font-size:16px;font-weight:600;color:#4a5568}.kadence-starter-required-plugins{padding:10px 20px 10px}.font-title-wrap,.kadence-starter-required-plugins{border-top:1px solid #e2e8f0;padding-top:6px;margin-top:18px}.kadence-starter-required-plugins h2.kst-required-title{font-size:16px;font-weight:600;color:#4a5568}.components-button-group.kst-font-group .components-button.kst-font-btn.active{border-color:#333}.components-button-group.kst-font-group .components-button.kst-font-btn:hover{border-color:#999}.kadence_theme_starter_dash_inner{margin:90px 20px 0}.kadence_theme_dash_head .st2{fill:#191717}.install-theme-info .components-button.has-icon .dashicons-image-rotate{width:10px;height:10px;font-size:10px}.kadence_theme_dash_head{background:#fff;padding:0px 20px;height:60px;border-bottom:1px solid #ebebeb;box-shadow:0 0 6px -2px rgba(0,0,0,.1);position:fixed;top:32px;left:160px;z-index:100;right:0}.kadence_theme_dash_head h1{color:#2d3748;line-height:50px;padding:0;height:50px;margin:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.kadence_theme_dash_head .subtext{font-size:16px;color:#718096;display:inline-block;padding-left:10px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;display:-webkit-flex;display:flex;height:100%;-webkit-align-items:center;align-items:center}.kadence_theme_dash_head .kadence_theme_dash_logo{width:50px;height:50px;padding-right:10px}.kadence_theme_dash_head .kadence_theme_dash_logo img{width:50px}.kadence_theme_dash_head .kadence_starter_builder_type{-webkit-flex-grow:1;flex-grow:1;text-align:right}.kadence_theme_dash_head .kadence_theme_dash_version span{padding:5px;background:#4a5568;color:#fff}.folded .kadence_theme_dash_head{left:36px}@media only screen and (max-width: 960px){.auto-fold .kadence_theme_dash_head{left:36px}}@media screen and (max-width: 782px){.auto-fold .kadence_theme_dash_head{left:0px}}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar{border-color:#888}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar button.components-button{padding:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar button.components-button svg{width:40px;height:40px}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown.components-dropdown-menu.components-toolbar .components-dropdown__content button.components-button svg{width:24px;height:24px;margin-left:0}.kadence_theme_dash_head .kadence_starter_builder_type .components-dropdown__content{text-align:left}.wrap.kadence_theme_starter_dash{margin:0}.kadence_theme_dashboard{margin:0 auto}.templates-grid{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);grid-gap:2em}.kst-template-item .components-button.kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;overflow:hidden;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-template-item .components-button.kst-import-btn img{max-width:100%;height:auto}.kst-grid-single-item{max-width:800px}.kst-grid-single-item .kst-template-item{overflow:hidden}.kst-grid-single-item .kst-import-btn{height:100%;width:100%;padding:0;display:block;border:0;background:transparent;position:absolute;box-shadow:0 0px 0px 0 rgba(0,0,0,0)}.kst-grid-single-item .kst-import-btn img{max-width:100%;height:auto}.components-modal__frame.kst-import-modal{max-width:600px}.components-modal__frame.kst-import-modal .components-button.is-primary{margin-top:20px}.kadence_starter_templates_notice{background:transparent;margin-bottom:20px;border:1px solid #cbd5e0;padding:10px;color:#4a5568;font-weight:normal}.kst-import-modal ul.kadence-required-wrap{margin-bottom:20px}.components-modal__frame.kst-import-modal{-webkit-animation:none !important;animation:none !important}.kst-import-modal h3{font-size:16px}.kadence_starter_templates_response{background:#fffaf0;margin-bottom:20px;border:1px solid #ed8936;padding:20px;color:#c05621;font-weight:bold;margin-top:30px}.kst-import-selection-title .components-button.kt-import-back{border:1px solid;margin-right:10px}.kst-import-selection-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-bottom:10px}.kst-grid-single-item-single-page .kst-template-item{padding-bottom:90%}.kadence_starter_templates_response h2{margin-bottom:10px;margin-top:0}.kst-template-item{position:relative;height:0;box-shadow:0 1px 2px rgba(0,0,0,.15);padding-bottom:65%}.kst-template-item::after{content:"";position:absolute;z-index:-1;width:100%;height:100%;opacity:0;border-radius:5px;box-shadow:0 15px 15px -10px rgba(0,0,0,.1);transition:opacity .3s ease-in-out}.kst-template-item:hover::after{opacity:1}.sidebar-section .components-panel__body.is-opened{padding:20px}.sidebar-section h2:first-child,.tab-section h2:first-child{margin-top:0}.side-panel .components-panel+.components-panel{margin-top:1rem}.tab-section .components-panel__body.is-opened{padding:25px}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button{border:1px solid transparent;background:transparent;border:none;box-shadow:none;border-radius:0;cursor:pointer;height:48px;padding:3px 16px;margin-left:0;font-weight:500}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:hover{box-shadow:none !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button:not(.active-tab):hover{color:#007cba !important;background:transparent !important}.kadence-dashboard-tab-panel .components-tab-panel__tabs .components-button.active-tab{background:#fff;border:1px solid #e2e4e7;border-bottom-color:transparent}.kadence-dashboard-tab-panel .components-tab-panel__tabs{margin-bottom:-1px}.two-col-grid{display:grid;grid-gap:1rem;grid-template-columns:1fr 1fr 1fr}h3.section-sub-head{background:#edf2f7;padding:10px;color:#4a5568;font-size:14px;text-transform:uppercase;margin-bottom:1rem;margin-top:2rem}.link-item{border:1px solid #e2e8f0;padding:20px;border-radius:4px;display:-webkit-flex;display:flex;-webkit-flex-flow:column nowrap;flex-flow:column nowrap}.link-item h4{margin:0}.dashboard-pro-settings{margin-top:2rem}.link-item .link-item-foot{margin-top:auto;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.link-item .link-item-foot .components-spinner{margin-top:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field{margin-bottom:0}.link-item .link-item-foot .components-toggle-control .components-base-control__field .components-form-toggle{margin-right:0}.link-item .link-item-foot>*:first-child{-webkit-flex-grow:2;flex-grow:2}.link-item a{display:block;background:transparent;color:#4a5568}.link-item a:hover{color:#007cba}span.kt-license-status{padding:4px;margin-left:10px;font-size:14px;text-transform:uppercase}span.kt-license-status.k-inactive{color:#c05621 !important;background:#fffaf0 !important}span.kt-license-status.k-active{color:#2b6cb0 !important;background:#ebf8ff !important}.license-section h2{display:-webkit-flex;display:flex;margin-top:0;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.license-section table.form-table{display:block}.license-section table.form-table tbody{display:block}.license-section table.form-table td,.license-section table.form-table tr{display:block;padding:0;width:100%}.license-section .form-table th{padding:0;width:100%;margin-bottom:4px;display:block;color:#4a5568}.license-section p.submit{padding:0;margin-top:10px}.license-section table.form-table input[type=text]{width:100%}.kadence-starter-templates-preview .install-theme-info .theme-name{font-size:20px}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button{width:100%;line-height:1;min-height:35px;padding:0}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{padding:5px}.kadence-starter-templates-preview button.components-button.kst-palette-btn{border-radius:4px !important;padding:5px 5px 5px 7px;height:auto;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:flex-end;align-items:flex-end;-webkit-justify-content:center;justify-content:center;border:1px solid transparent;position:relative;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn .kst-palette-bg{display:none}.kst-template-item .components-button.kst-import-btn:hover,.kst-template-item .components-button.kst-import-btn:focus{box-shadow:0 7px 15px 0 rgba(0,0,0,.15) !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn:focus{border:1px solid #999;box-shadow:none !important}.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:hover,.kadence-starter-templates-preview button.components-button.kst-palette-btn.is-primary:focus{background:#fff;border:1px solid #333;box-shadow:none}.demo-title{height:30px;margin:0;padding:10px 0;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);background:#fff;position:absolute;bottom:0;left:0;width:100%}.demo-title h4{margin:0;font-size:14px;text-align:left;line-height:30px;padding:0 20px;color:#1e1e1e}.kadence-starter-templates-preview .components-button-group.kst-palette-group{display:grid;grid-template-columns:1fr 1fr;grid-gap:5px}@media(max-width: 1860px){.kadence-starter-templates-preview .kadence-swatche-item-wrap{width:22px !important;height:22px !important}h2.palette-title{font-size:15px}}@media(max-width: 1059px){.templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}p.install-third-party-notice{max-width:540px;background:#fffaf0;padding:1em;color:#c05621;border:1px solid #c05621;font-weight:600}.plugin-install-required{display:block;font-style:oblique;font-weight:400;color:#c05621}.kadence-required-wrap{font-weight:bold;list-style:disc;padding-left:1.4em}span.plugin-status{text-transform:uppercase;color:#718096}.kst-palette-btn.kst-selected-color-palette{display:-webkit-flex;display:flex;margin-bottom:20px}.finshed-notice-success .button-primary.button.kadence-starter-templates-finish-button{padding:10px 16px;font-size:18px}.kst-grid-single-site{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);grid-gap:4em}.kst-import-selection{height:100%;max-height:calc(100vh - 140px);overflow-y:scroll}.kst-import-grid-title h2{font-size:14px;line-height:20px;margin:10px 0;color:#4a5568}.kst-import-selection-title h2{font-size:16px;line-height:26px;margin:0 0 10px 0;color:#2d3748}.kst-import-single-selection-options-wrap{background:#fff;padding:35px 35px 35px;max-width:700px;width:100%;box-sizing:border-box}.appearance_page_kadence-starter-templates #wpbody-content{padding-bottom:25px}.desc-small.note-about-colors{font-size:14px;color:#718096;margin:1.5em 0}.kst-import-selection-options .kst-template-item{padding-bottom:126%}.kst-import-selection img{max-width:100%}.kst-import-selection-title h2 span{font-weight:bold;color:#000}.appearance_page_kadence-starter-templates .update-nag.notice,.appearance_page_kadence-starter-templates #wpfooter{display:none}.kadence_theme_starter_dashboard>.notice{display:none}.demo-title h4 span{position:absolute;bottom:100%;right:0;padding:5px 15px;background:rgba(0,0,0,.7);color:#fff;font-size:14px;font-weight:400;opacity:0}.kst-import-btn:hover .demo-title h4 span{opacity:1}.kst-import-selection-options .kst-template-item .components-button.kst-import-btn .LazyLoad{overflow-y:hidden;position:absolute;top:0;left:0;right:0;bottom:40px}.kst-import-single-selection-options-wrap .components-button.is-primary{padding-top:16px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto;margin-top:20px;padding-left:0;padding-right:0;text-align:center;display:block;width:100%}.kst-import-selection-footer{position:fixed;padding:10px 20px;bottom:0;background:#fff;right:0;left:0;margin-left:160px;z-index:100;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center}button.components-button.kt-import-fullsite.is-primary{padding-left:30px;padding-top:16px;padding-right:30px;font-weight:700;padding-bottom:16px;font-size:16px;height:auto}.folded .kst-import-selection-footer{margin-left:36px}@media(max-width: 1059px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1060px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1660px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 2360px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}.kst-import-single-selection-options-wrap .components-base-control.components-toggle-control{margin-bottom:15px;border-top:1px solid #e2e8f0;padding-top:15px}.components-modal__frame.ksp-confirm-modal{max-width:500px}.ksp-override-model-buttons{text-align:right}.ksp-override-model-buttons .components-button{margin-left:10px}.main-panel{margin:0 auto;max-width:1260px}.main-panel .kst-grid-single-site{grid-template-columns:minmax(0, 2fr) minmax(0, 1fr);grid-gap:3em}.kst-import-selection-bottom{text-align:center;margin-top:40px}.kadence_theme_dash_head .kadence_theme_dash_head_container{margin:0 auto;max-width:1260px}.kst-template-item{padding-bottom:126%}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions{display:-webkit-flex;display:flex}.appearance_page_kadence-starter-templates .kadence-starter-templates-preview-actions .button:not(.button-primary){margin-right:10px}@media(max-width: 1059px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1060px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}@media(min-width: 1660px){.kst-import-selection-options .templates-grid{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)}}.kst-import-modal button.components-button.kb-skip-start.is-primary,.kst-import-selection-options button.components-button.kb-skip-start.is-primary{display:block;width:100%;text-align:center;background:transparent;color:#555;font-size:13px;font-weight:400}.kst-import-modal .components-panel__body-toggle.components-button{padding:10px 48px 10px 16px}.components-base-control.kt-subscribe-email-input .components-base-control__field{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-bottom:20px}.components-base-control.kt-subscribe-email-input .components-base-control__field .components-base-control__label{margin:0 10px 0 0;font-weight:bold}.kt-subscribe-form-box{padding:20px;margin:30px 0px 0;border:1px solid #e0e0e0}.kt-subscribe-form-box h2{margin-top:0}.kb-subscribe-form-error{padding:10px;display:block;margin-bottom:10px;color:#d8000c;background-color:#ffbaba}
|
assets/images/stellar-sale-plugin.png
DELETED
Binary file
|
assets/js/starter-templates.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('react', 'react-dom', 'wp-element', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-element', 'wp-polyfill', 'wp-primitives'), 'version' => 'fc4574294fe51514ad3afa9e28139dee');
|
assets/js/starter-templates.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=145)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,a){var r=a(31),n=a(49),s=a(128),c=a(4);e.exports=function(e,t){return(c(e)?r:s)(e,n(t,3))}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,a){var r=a(35),n="object"==typeof self&&self&&self.Object===Object&&self,s=r||n||Function("return this")();e.exports=s},function(e,t){var a=Array.isArray;e.exports=a},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,a){var r=a(62),n=a(67);e.exports=function(e,t){var a=n(e,t);return r(a)?a:void 0}},function(e,t){function a(t){return e.exports=a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(t)}e.exports=a},function(e,t,a){var r=a(12),n=a(63),s=a(64),c=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?n(e):s(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,a){var r=a(52),n=a(53),s=a(54),c=a(55),o=a(56);function i(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=n,i.prototype.get=s,i.prototype.has=c,i.prototype.set=o,e.exports=i},function(e,t,a){var r=a(33);e.exports=function(e,t){for(var a=e.length;a--;)if(r(e[a][0],t))return a;return-1}},function(e,t,a){var r=a(3).Symbol;e.exports=r},function(e,t,a){var r=a(6)(Object,"create");e.exports=r},function(e,t,a){var r=a(76);e.exports=function(e,t){var a=e.__data__;return r(t)?a["string"==typeof t?"string":"hash"]:a.map}},function(e,t,a){var r=a(30);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function a(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}},function(e,t,a){var r=a(48);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("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,a){var r=a(20),n=a(2);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?n(e):t}},function(e,t){function a(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=a=function(e){return typeof e}:e.exports=a=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(t)}e.exports=a},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),n=a(134),s=d(n),c=d(a(135)),o=a(138),i=a(139),l=d(a(140)),u=d(a(141)),p=d(a(142)),m=d(a(143));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.lazyLoadHandler=a.lazyLoadHandler.bind(a),e.throttle>0&&(e.debounce?a.lazyLoadHandler=(0,l.default)(a.lazyLoadHandler,e.throttle):a.lazyLoadHandler=(0,u.default)(a.lazyLoadHandler,e.throttle)),a.state={visible:!1},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);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)}(t,e),r(t,[{key:"componentDidMount",value:function(){this._mounted=!0;var e=this.getEventNode();this.lazyLoadHandler(),this.lazyLoadHandler.flush&&this.lazyLoadHandler.flush(),(0,i.add)(window,"resize",this.lazyLoadHandler),(0,i.add)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,i.add)(window,"scroll",this.lazyLoadHandler)}},{key:"componentWillReceiveProps",value:function(){this.state.visible||this.lazyLoadHandler()}},{key:"shouldComponentUpdate",value:function(e,t){return t.visible}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this.lazyLoadHandler.cancel&&this.lazyLoadHandler.cancel(),this.detachListeners()}},{key:"getEventNode",value:function(){return(0,p.default)((0,o.findDOMNode)(this))}},{key:"getOffset",value:function(){var e=this.props,t=e.offset,a=e.offsetVertical,r=e.offsetHorizontal,n=e.offsetTop,s=e.offsetBottom,c=e.offsetLeft,o=e.offsetRight,i=e.threshold||t,l=a||i,u=r||i;return{top:n||l,bottom:s||l,left:c||u,right:o||u}}},{key:"lazyLoadHandler",value:function(){if(this._mounted){var e=this.getOffset(),t=(0,o.findDOMNode)(this),a=this.getEventNode();if((0,m.default)(t,a,e)){var r=this.props.onContentVisible;this.setState({visible:!0},(function(){r&&r()})),this.detachListeners()}}}},{key:"detachListeners",value:function(){var e=this.getEventNode();(0,i.remove)(window,"resize",this.lazyLoadHandler),(0,i.remove)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,i.remove)(window,"scroll",this.lazyLoadHandler)}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.className,r=e.height,c=e.width,o=this.state.visible,i={height:r,width:c},l="LazyLoad"+(o?" is-visible":"")+(a?" "+a:"");return s.default.createElement(this.props.elementType,{className:l,style:i},o&&n.Children.only(t))}}]),t}(n.Component);t.default=f,f.propTypes={children:c.default.node.isRequired,className:c.default.string,debounce:c.default.bool,elementType:c.default.string,height:c.default.oneOfType([c.default.string,c.default.number]),offset:c.default.number,offsetBottom:c.default.number,offsetHorizontal:c.default.number,offsetLeft:c.default.number,offsetRight:c.default.number,offsetTop:c.default.number,offsetVertical:c.default.number,threshold:c.default.number,throttle:c.default.number,width:c.default.oneOfType([c.default.string,c.default.number]),onContentVisible:c.default.func},f.defaultProps={elementType:"div",debounce:!0,offset:0,offsetBottom:0,offsetHorizontal:0,offsetLeft:0,offsetRight:0,offsetTop:0,offsetVertical:0,throttle:250}},function(e,t,a){var r=a(6)(a(3),"Map");e.exports=r},function(e,t){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch(e){"object"==typeof window&&(a=window)}e.exports=a},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,a){var r=a(68),n=a(75),s=a(77),c=a(78),o=a(79);function i(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=n,i.prototype.get=s,i.prototype.has=c,i.prototype.set=o,e.exports=i},function(e,t,a){var r=a(97),n=a(104),s=a(28);e.exports=function(e){return s(e)?r(e):n(e)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,a){var r=a(34),n=a(27);e.exports=function(e){return null!=e&&n(e.length)&&!r(e)}},function(e,t,a){var r=a(4),n=a(30),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var a=typeof e;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=e&&!n(e))||(c.test(e)||!s.test(e)||null!=t&&e in Object(t))}},function(e,t,a){var r=a(8),n=a(9);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e,t){for(var a=-1,r=null==e?0:e.length,n=Array(r);++a<r;)n[a]=t(e[a],a,e);return n}},function(e,t,a){var r=a(10),n=a(57),s=a(58),c=a(59),o=a(60),i=a(61);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=n,l.prototype.delete=s,l.prototype.get=c,l.prototype.has=o,l.prototype.set=i,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,a){var r=a(8),n=a(24);e.exports=function(e){if(!n(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,a){(function(t){var a="object"==typeof t&&t&&t.Object===Object&&t;e.exports=a}).call(this,a(23))},function(e,t){var a=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return a.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,a){var r=a(80),n=a(9);e.exports=function e(t,a,s,c,o){return t===a||(null==t||null==a||!n(t)&&!n(a)?t!=t&&a!=a:r(t,a,s,c,e,o))}},function(e,t,a){var r=a(81),n=a(84),s=a(85);e.exports=function(e,t,a,c,o,i){var l=1&a,u=e.length,p=t.length;if(u!=p&&!(l&&p>u))return!1;var m=i.get(e);if(m&&i.get(t))return m==t;var d=-1,f=!0,v=2&a?new r:void 0;for(i.set(e,t),i.set(t,e);++d<u;){var b=e[d],h=t[d];if(c)var g=l?c(h,b,d,t,e,i):c(b,h,d,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(v){if(!n(t,(function(e,t){if(!s(v,t)&&(b===e||o(b,e,a,c,i)))return v.push(t)}))){f=!1;break}}else if(b!==h&&!o(b,h,a,c,i)){f=!1;break}}return i.delete(e),i.delete(t),f}},function(e,t,a){var r=a(99),n=a(9),s=Object.prototype,c=s.hasOwnProperty,o=s.propertyIsEnumerable,i=r(function(){return arguments}())?r:function(e){return n(e)&&c.call(e,"callee")&&!o.call(e,"callee")};e.exports=i},function(e,t,a){(function(e){var r=a(3),n=a(100),s=t&&!t.nodeType&&t,c=s&&"object"==typeof e&&e&&!e.nodeType&&e,o=c&&c.exports===s?r.Buffer:void 0,i=(o?o.isBuffer:void 0)||n;e.exports=i}).call(this,a(41)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var a=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&a.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,a){var r=a(101),n=a(102),s=a(103),c=s&&s.isTypedArray,o=c?n(c):r;e.exports=o},function(e,t,a){var r=a(24);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(a){return null!=a&&(a[e]===t&&(void 0!==t||e in Object(a)))}}},function(e,t,a){var r=a(47),n=a(15);e.exports=function(e,t){for(var a=0,s=(t=r(t,e)).length;null!=e&&a<s;)e=e[n(t[a++])];return a&&a==s?e:void 0}},function(e,t,a){var r=a(4),n=a(29),s=a(116),c=a(119);e.exports=function(e,t){return r(e)?e:n(e,t)?[e]:s(c(e))}},function(e,t){function a(t,r){return e.exports=a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(t,r)}e.exports=a},function(e,t,a){var r=a(50),n=a(114),s=a(124),c=a(4),o=a(125);e.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?c(e)?n(e[0],e[1]):r(e):o(e)}},function(e,t,a){var r=a(51),n=a(113),s=a(45);e.exports=function(e){var t=n(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(a){return a===e||r(a,e,t)}}},function(e,t,a){var r=a(32),n=a(37);e.exports=function(e,t,a,s){var c=a.length,o=c,i=!s;if(null==e)return!o;for(e=Object(e);c--;){var l=a[c];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++c<o;){var u=(l=a[c])[0],p=e[u],m=l[1];if(i&&l[2]){if(void 0===p&&!(u in e))return!1}else{var d=new r;if(s)var f=s(p,m,u,e,t,d);if(!(void 0===f?n(m,p,3,s,d):f))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,a){var r=a(11),n=Array.prototype.splice;e.exports=function(e){var t=this.__data__,a=r(t,e);return!(a<0)&&(a==t.length-1?t.pop():n.call(t,a,1),--this.size,!0)}},function(e,t,a){var r=a(11);e.exports=function(e){var t=this.__data__,a=r(t,e);return a<0?void 0:t[a][1]}},function(e,t,a){var r=a(11);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,a){var r=a(11);e.exports=function(e,t){var a=this.__data__,n=r(a,e);return n<0?(++this.size,a.push([e,t])):a[n][1]=t,this}},function(e,t,a){var r=a(10);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,a){var r=a(10),n=a(22),s=a(25);e.exports=function(e,t){var a=this.__data__;if(a instanceof r){var c=a.__data__;if(!n||c.length<199)return c.push([e,t]),this.size=++a.size,this;a=this.__data__=new s(c)}return a.set(e,t),this.size=a.size,this}},function(e,t,a){var r=a(34),n=a(65),s=a(24),c=a(36),o=/^\[object .+?Constructor\]$/,i=Function.prototype,l=Object.prototype,u=i.toString,p=l.hasOwnProperty,m=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||n(e))&&(r(e)?m:o).test(c(e))}},function(e,t,a){var r=a(12),n=Object.prototype,s=n.hasOwnProperty,c=n.toString,o=r?r.toStringTag:void 0;e.exports=function(e){var t=s.call(e,o),a=e[o];try{e[o]=void 0;var r=!0}catch(e){}var n=c.call(e);return r&&(t?e[o]=a:delete e[o]),n}},function(e,t){var a=Object.prototype.toString;e.exports=function(e){return a.call(e)}},function(e,t,a){var r,n=a(66),s=(r=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!s&&s in e}},function(e,t,a){var r=a(3)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,a){var r=a(69),n=a(10),s=a(22);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||n),string:new r}}},function(e,t,a){var r=a(70),n=a(71),s=a(72),c=a(73),o=a(74);function i(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=n,i.prototype.get=s,i.prototype.has=c,i.prototype.set=o,e.exports=i},function(e,t,a){var r=a(13);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,a){var r=a(13),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var a=t[e];return"__lodash_hash_undefined__"===a?void 0:a}return n.call(t,e)?t[e]:void 0}},function(e,t,a){var r=a(13),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:n.call(t,e)}},function(e,t,a){var r=a(13);e.exports=function(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,a){var r=a(14);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,a){var r=a(14);e.exports=function(e){return r(this,e).get(e)}},function(e,t,a){var r=a(14);e.exports=function(e){return r(this,e).has(e)}},function(e,t,a){var r=a(14);e.exports=function(e,t){var a=r(this,e),n=a.size;return a.set(e,t),this.size+=a.size==n?0:1,this}},function(e,t,a){var r=a(32),n=a(38),s=a(86),c=a(90),o=a(108),i=a(4),l=a(40),u=a(43),p="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,d,f,v){var b=i(e),h=i(t),g=b?"[object Array]":o(e),j=h?"[object Array]":o(t),y=(g="[object Arguments]"==g?p:g)==p,k=(j="[object Arguments]"==j?p:j)==p,O=g==j;if(O&&l(e)){if(!l(t))return!1;b=!0,y=!1}if(O&&!y)return v||(v=new r),b||u(e)?n(e,t,a,d,f,v):s(e,t,g,a,d,f,v);if(!(1&a)){var P=y&&m.call(e,"__wrapped__"),_=k&&m.call(t,"__wrapped__");if(P||_){var E=P?e.value():e,S=_?t.value():t;return v||(v=new r),f(E,S,a,d,v)}}return!!O&&(v||(v=new r),c(e,t,a,d,f,v))}},function(e,t,a){var r=a(25),n=a(82),s=a(83);function c(e){var t=-1,a=null==e?0:e.length;for(this.__data__=new r;++t<a;)this.add(e[t])}c.prototype.add=c.prototype.push=n,c.prototype.has=s,e.exports=c},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var a=-1,r=null==e?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,a){var r=a(12),n=a(87),s=a(33),c=a(38),o=a(88),i=a(89),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,a,r,l,p,m){switch(a){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!p(new n(e),new n(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=o;case"[object Set]":var f=1&r;if(d||(d=i),e.size!=t.size&&!f)return!1;var v=m.get(e);if(v)return v==t;r|=2,m.set(e,t);var b=c(d(e),d(t),r,l,p,m);return m.delete(e),b;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t,a){var r=a(3).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,a=Array(e.size);return e.forEach((function(e,r){a[++t]=[r,e]})),a}},function(e,t){e.exports=function(e){var t=-1,a=Array(e.size);return e.forEach((function(e){a[++t]=e})),a}},function(e,t,a){var r=a(91),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,s,c,o){var i=1&a,l=r(e),u=l.length;if(u!=r(t).length&&!i)return!1;for(var p=u;p--;){var m=l[p];if(!(i?m in t:n.call(t,m)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var f=!0;o.set(e,t),o.set(t,e);for(var v=i;++p<u;){var b=e[m=l[p]],h=t[m];if(s)var g=i?s(h,b,m,t,e,o):s(b,h,m,e,t,o);if(!(void 0===g?b===h||c(b,h,a,s,o):g)){f=!1;break}v||(v="constructor"==m)}if(f&&!v){var j=e.constructor,y=t.constructor;j==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof j&&j instanceof j&&"function"==typeof y&&y instanceof y||(f=!1)}return o.delete(e),o.delete(t),f}},function(e,t,a){var r=a(92),n=a(94),s=a(26);e.exports=function(e){return r(e,s,n)}},function(e,t,a){var r=a(93),n=a(4);e.exports=function(e,t,a){var s=t(e);return n(e)?s:r(s,a(e))}},function(e,t){e.exports=function(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}},function(e,t,a){var r=a(95),n=a(96),s=Object.prototype.propertyIsEnumerable,c=Object.getOwnPropertySymbols,o=c?function(e){return null==e?[]:(e=Object(e),r(c(e),(function(t){return s.call(e,t)})))}:n;e.exports=o},function(e,t){e.exports=function(e,t){for(var a=-1,r=null==e?0:e.length,n=0,s=[];++a<r;){var c=e[a];t(c,a,e)&&(s[n++]=c)}return s}},function(e,t){e.exports=function(){return[]}},function(e,t,a){var r=a(98),n=a(39),s=a(4),c=a(40),o=a(42),i=a(43),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var a=s(e),u=!a&&n(e),p=!a&&!u&&c(e),m=!a&&!u&&!p&&i(e),d=a||u||p||m,f=d?r(e.length,String):[],v=f.length;for(var b in e)!t&&!l.call(e,b)||d&&("length"==b||p&&("offset"==b||"parent"==b)||m&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||o(b,v))||f.push(b);return f}},function(e,t){e.exports=function(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}},function(e,t,a){var r=a(8),n=a(9);e.exports=function(e){return n(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,a){var r=a(8),n=a(27),s=a(9),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1,e.exports=function(e){return s(e)&&n(e.length)&&!!c[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,a){(function(e){var r=a(35),n=t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,c=s&&s.exports===n&&r.process,o=function(){try{var e=s&&s.require&&s.require("util").types;return e||c&&c.binding&&c.binding("util")}catch(e){}}();e.exports=o}).call(this,a(41)(e))},function(e,t,a){var r=a(105),n=a(106),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return n(e);var t=[];for(var a in Object(e))s.call(e,a)&&"constructor"!=a&&t.push(a);return t}},function(e,t){var a=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||a)}},function(e,t,a){var r=a(107)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(a){return e(t(a))}}},function(e,t,a){var r=a(109),n=a(22),s=a(110),c=a(111),o=a(112),i=a(8),l=a(36),u=l(r),p=l(n),m=l(s),d=l(c),f=l(o),v=i;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||n&&"[object Map]"!=v(new n)||s&&"[object Promise]"!=v(s.resolve())||c&&"[object Set]"!=v(new c)||o&&"[object WeakMap]"!=v(new o))&&(v=function(e){var t=i(e),a="[object Object]"==t?e.constructor:void 0,r=a?l(a):"";if(r)switch(r){case u:return"[object DataView]";case p:return"[object Map]";case m:return"[object Promise]";case d:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=v},function(e,t,a){var r=a(6)(a(3),"DataView");e.exports=r},function(e,t,a){var r=a(6)(a(3),"Promise");e.exports=r},function(e,t,a){var r=a(6)(a(3),"Set");e.exports=r},function(e,t,a){var r=a(6)(a(3),"WeakMap");e.exports=r},function(e,t,a){var r=a(44),n=a(26);e.exports=function(e){for(var t=n(e),a=t.length;a--;){var s=t[a],c=e[s];t[a]=[s,c,r(c)]}return t}},function(e,t,a){var r=a(37),n=a(115),s=a(121),c=a(29),o=a(44),i=a(45),l=a(15);e.exports=function(e,t){return c(e)&&o(t)?i(l(e),t):function(a){var c=n(a,e);return void 0===c&&c===t?s(a,e):r(t,c,3)}}},function(e,t,a){var r=a(46);e.exports=function(e,t,a){var n=null==e?void 0:r(e,t);return void 0===n?a:n}},function(e,t,a){var r=a(117),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,c=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(n,(function(e,a,r,n){t.push(r?n.replace(s,"$1"):a||e)})),t}));e.exports=c},function(e,t,a){var r=a(118);e.exports=function(e){var t=r(e,(function(e){return 500===a.size&&a.clear(),e})),a=t.cache;return t}},function(e,t,a){var r=a(25);function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var a=function(){var r=arguments,n=t?t.apply(this,r):r[0],s=a.cache;if(s.has(n))return s.get(n);var c=e.apply(this,r);return a.cache=s.set(n,c)||s,c};return a.cache=new(n.Cache||r),a}n.Cache=r,e.exports=n},function(e,t,a){var r=a(120);e.exports=function(e){return null==e?"":r(e)}},function(e,t,a){var r=a(12),n=a(31),s=a(4),c=a(30),o=r?r.prototype:void 0,i=o?o.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return n(t,e)+"";if(c(t))return i?i.call(t):"";var a=t+"";return"0"==a&&1/t==-1/0?"-0":a}},function(e,t,a){var r=a(122),n=a(123);e.exports=function(e,t){return null!=e&&n(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,a){var r=a(47),n=a(39),s=a(4),c=a(42),o=a(27),i=a(15);e.exports=function(e,t,a){for(var l=-1,u=(t=r(t,e)).length,p=!1;++l<u;){var m=i(t[l]);if(!(p=null!=e&&a(e,m)))break;e=e[m]}return p||++l!=u?p:!!(u=null==e?0:e.length)&&o(u)&&c(m,u)&&(s(e)||n(e))}},function(e,t){e.exports=function(e){return e}},function(e,t,a){var r=a(126),n=a(127),s=a(29),c=a(15);e.exports=function(e){return s(e)?r(c(e)):n(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,a){var r=a(46);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,a){var r=a(129),n=a(28);e.exports=function(e,t){var a=-1,s=n(e)?Array(e.length):[];return r(e,(function(e,r,n){s[++a]=t(e,r,n)})),s}},function(e,t,a){var r=a(130),n=a(133)(r);e.exports=n},function(e,t,a){var r=a(131),n=a(26);e.exports=function(e,t){return e&&r(e,t,n)}},function(e,t,a){var r=a(132)();e.exports=r},function(e,t){e.exports=function(e){return function(t,a,r){for(var n=-1,s=Object(t),c=r(t),o=c.length;o--;){var i=c[e?o:++n];if(!1===a(s[i],i,s))break}return t}}},function(e,t,a){var r=a(28);e.exports=function(e,t){return function(a,n){if(null==a)return a;if(!r(a))return e(a,n);for(var s=a.length,c=t?s:-1,o=Object(a);(t?c--:++c<s)&&!1!==n(o[c],c,o););return a}}},function(e,t){!function(){e.exports=this.React}()},function(e,t,a){e.exports=a(136)()},function(e,t,a){"use strict";var r=a(137);function n(){}function s(){}s.resetWarningCache=n,e.exports=function(){function e(e,t,a,n,s,c){if(c!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var a={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:n};return a.PropTypes=a,a}},function(e,t,a){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,a){var r,n;void 0===(n="function"==typeof(r=function(){function e(e,t){return function(a,r,n,s){a[e]?a[e](r,n,s):a[t]&&a[t]("on"+r,n)}}return{add:e("addEventListener","attachEvent"),remove:e("removeEventListener","detachEvent")}})?r.call(t,a,t,e):r)||(e.exports=n)},function(e,t,a){(function(t){var a=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),u=Object.prototype.toString,p=Math.max,m=Math.min,d=function(){return l.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(f(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=f(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var o=n.test(e);return o||s.test(e)?c(e.slice(2),o?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,a){var r,n,s,c,o,i,l=0,u=!1,b=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var a=r,s=n;return r=n=void 0,l=t,c=e.apply(s,a)}function j(e){return l=e,o=setTimeout(k,t),u?g(e):c}function y(e){var a=e-i;return void 0===i||a>=t||a<0||b&&e-l>=s}function k(){var e=d();if(y(e))return O(e);o=setTimeout(k,function(e){var a=t-(e-i);return b?m(a,s-(e-l)):a}(e))}function O(e){return o=void 0,h&&r?g(e):(r=n=void 0,c)}function P(){var e=d(),a=y(e);if(r=arguments,n=this,i=e,a){if(void 0===o)return j(i);if(b)return o=setTimeout(k,t),g(i)}return void 0===o&&(o=setTimeout(k,t)),c}return t=v(t)||0,f(a)&&(u=!!a.leading,s=(b="maxWait"in a)?p(v(a.maxWait)||0,t):s,h="trailing"in a?!!a.trailing:h),P.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=i=n=o=void 0},P.flush=function(){return void 0===o?c:O(d())},P}}).call(this,a(23))},function(e,t,a){(function(t){var a=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),u=Object.prototype.toString,p=Math.max,m=Math.min,d=function(){return l.Date.now()};function f(e,t,a){var r,n,s,c,o,i,l=0,u=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var a=r,s=n;return r=n=void 0,l=t,c=e.apply(s,a)}function j(e){return l=e,o=setTimeout(k,t),u?g(e):c}function y(e){var a=e-i;return void 0===i||a>=t||a<0||f&&e-l>=s}function k(){var e=d();if(y(e))return O(e);o=setTimeout(k,function(e){var a=t-(e-i);return f?m(a,s-(e-l)):a}(e))}function O(e){return o=void 0,h&&r?g(e):(r=n=void 0,c)}function P(){var e=d(),a=y(e);if(r=arguments,n=this,i=e,a){if(void 0===o)return j(i);if(f)return o=setTimeout(k,t),g(i)}return void 0===o&&(o=setTimeout(k,t)),c}return t=b(t)||0,v(a)&&(u=!!a.leading,s=(f="maxWait"in a)?p(b(a.maxWait)||0,t):s,h="trailing"in a?!!a.trailing:h),P.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=i=n=o=void 0},P.flush=function(){return void 0===o?c:O(d())},P}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var o=n.test(e);return o||s.test(e)?c(e.slice(2),o?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,a){var r=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return v(a)&&(r="leading"in a?!!a.leading:r,n="trailing"in a?!!a.trailing:n),f(e,t,{leading:r,maxWait:t,trailing:n})}}).call(this,a(23))},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},n=function(e){return r(e,"overflow")+r(e,"overflow-y")+r(e,"overflow-x")};t.default=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(n(t)))return t;t=t.parentNode}return window}},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,a,r){if(function(e){return null===e.offsetParent}(t))return!1;var n=void 0,c=void 0,o=void 0,i=void 0;if(void 0===a||a===window)n=window.pageYOffset,o=window.pageXOffset,c=n+window.innerHeight,i=o+window.innerWidth;else{if(!e(a,window,r))return!1;var l=(0,s.default)(a);n=l.top,o=l.left,c=n+a.offsetHeight,i=o+a.offsetWidth}var u=(0,s.default)(t);return n<=u.top+t.offsetHeight+r.top&&c>=u.top-r.bottom&&o<=u.left+t.offsetWidth+r.left&&i>=u.left-r.right};var r,n=a(144),s=(r=n)&&r.__esModule?r:{default:r}},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}},function(e,t,a){"use strict";a.r(t);var r=a(16),n=a.n(r),s=a(17),c=a.n(s),o=a(2),i=a.n(o),l=a(18),u=a.n(l),p=a(19),m=a.n(p),d=a(7),f=a.n(d),v=a(20),b=a.n(v),h=a(0),g=a(1),j=a.n(g),y=a(21),k=a.n(y);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=f()(e);if(t){var n=f()(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return m()(this,a)}}var P=wp.i18n,_=P.__,E=(P.sprintf,wp.element),S=E.Fragment,w=E.Component,x=(E.render,E.PureComponent,wp.components),T=(x.Modal,x.Spinner,x.ButtonGroup),N=(x.Dropdown,x.Button),z=x.ExternalLink,C=(x.ToolbarGroup,x.MenuItem,x.Tooltip),M=function(e){u()(a,e);var t=O(a);function a(){var e;return n()(this,a),(e=t.apply(this,arguments)).state={colorPalette:e.props.colorPalette?e.props.colorPalette:"",fontPair:e.props.fontPair?e.props.fontPair:"",palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[],fonts:kadenceStarterParams.fonts?kadenceStarterParams.fonts:[]},e}return c()(a,[{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"render",value:function(){var e=this,t=this.props.item,a=!0,r=!1,n=!1;return Object(h.createElement)("div",{className:"kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded",style:{display:"block"}},Object(h.createElement)("div",{className:"wp-full-overlay-sidebar"},Object(h.createElement)("div",{className:"wp-full-overlay-header"},Object(h.createElement)("button",{className:"kst-close-focus-btn close-full-overlay",onClick:function(){return e.props.onChange({activeTemplate:"",colorPalette:"",fontPair:"",focusMode:!1})}})),Object(h.createElement)("div",{className:"wp-full-overlay-sidebar-content"},Object(h.createElement)("div",{className:"install-theme-info"},Object(h.createElement)("div",{className:"theme-info-wrap"},Object(h.createElement)("img",{className:"theme-screenshot",src:t.image,alt:t.name}),Object(h.createElement)("div",{className:"theme-info-title-wrap"},Object(h.createElement)("h3",{className:"theme-name"},t.name),Object(h.createElement)("div",{className:"theme-by"},t.categories.map((function(t){return e.capitalizeFirstLetter(t)})).join(", ")))),Object(h.createElement)("div",{className:"palette-title-wrap"},Object(h.createElement)("h2",{className:"palette-title"},_("Optional: Change Color Scheme","kadence-starter-templates")),Object(h.createElement)(N,{label:_("clear"),className:"kst-clear-palette",disabled:!this.state.colorPalette,icon:"image-rotate",iconSize:10,onClick:function(){e.setState({colorPalette:""}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({color:""},"*")}})),Object(h.createElement)(T,{className:"kst-palette-group","aria-label":_("Select a Palette","kadence-starter-templates")},j()(this.state.palettes,(function(t){var a=t.palette,r=t.colors;return Object(h.createElement)(N,{className:"kst-palette-btn",isPrimary:a===e.state.colorPalette,"aria-pressed":a===e.state.colorPalette,onClick:function(){document.getElementById("kadence-starter-preview").contentWindow.postMessage({color:a},"*"),e.setState({colorPalette:a})}},Object(h.createElement)("span",{className:"kst-palette-bg",style:{background:r[4]?r[4]:void 0}}),j()(r,(function(e,t){if(4!==t)return Object(h.createElement)("div",{key:t,style:{width:30,height:30,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(h.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(h.createElement)("p",{className:"desc-small"},_("*You can change this after import.","kadence-starter-templates")),Object(h.createElement)("div",{className:"font-title-wrap"},Object(h.createElement)("h2",{className:"font-title"},_("Optional: Change Font Family","kadence-starter-templates")),Object(h.createElement)(N,{label:_("clear"),className:"kst-clear-font",disabled:!this.state.fontPair,icon:"image-rotate",iconSize:10,onClick:function(){e.setState({fontPair:""}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({font:""},"*")}})),Object(h.createElement)(T,{className:"kst-font-group","aria-label":_("Select a Font","kadence-starter-templates")},j()(this.state.fonts,(function(t){var a=t.font,r=t.img,n=t.name;return Object(h.createElement)(C,{text:n},Object(h.createElement)(N,{className:"kst-font-btn".concat(a===e.state.fontPair?" active":""),"aria-pressed":a===e.state.fontPair,onClick:function(){e.setState({fontPair:a}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({font:a},"*")}},Object(h.createElement)("img",{src:r,className:"font-pairing"})))}))),Object(h.createElement)("p",{className:"desc-small"},_("*You can change this after import.","kadence-starter-templates"))),Object(h.createElement)("div",{className:"kadence-starter-required-plugins"},Object(h.createElement)("h2",{className:"kst-required-title"},_("Required Plugins","kadence-starter-templates")),Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(t.plugins,(function(e){if(kadenceStarterParams.plugins[e])return"active"!==kadenceStarterParams.plugins[e].state&&(a=!1,"thirdparty"===kadenceStarterParams.plugins[e].src&&(r=!0),"bundle"===kadenceStarterParams.plugins[e].src&&(n=!0)),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src?" bundle-install-required":"")},kadenceStarterParams.plugins[e].title," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===kadenceStarterParams.plugins[e].state?_("Not Installed","kadence-starter-templates"):kadenceStarterParams.plugins[e].state))}))),!a&&Object(h.createElement)(S,null,(r||n)&&Object(h.createElement)("p",{className:"desc-small"},_("*Install Missing/Inactive Premium plugins to import.","kadence-starter-templates")),!r&&!n&&Object(h.createElement)("p",{className:"desc-small"},_("*Missing/Inactive plugins will be installed on import.","kadence-starter-templates"))),void 0!==t.pro&&t.pro&&!t.member&&Object(h.createElement)("div",{className:"notice inline notice-alt notice-warning kadence-pro-notice"},Object(h.createElement)("p",null,Object(h.createElement)("strong",null,"Kadence Pro Starter Site")),Object(h.createElement)("p",null,"To import this starter template you need to install Kadence Pro and Kadence Blocks Pro and activate your license using a ",Object(h.createElement)("strong",null,"Essential or Full Bundle license"),".")))),Object(h.createElement)("div",{class:"wp-full-overlay-footer"},void 0!==t.pro&&t.pro&&!t.member?Object(h.createElement)("div",{className:"kt-upgrade-notice"},Object(h.createElement)("h2",{className:"kst-import-options-title"},_("Kadence Bundle is required","kadence-starter-sites")," "),Object(h.createElement)(z,{className:"kst-upgrade button-hero button button-primary",href:"https://www.kadencewp.com/pricing/"},_("Get Pro Starter Site","kadence-starter-sites"))):Object(h.createElement)(S,null,Object(h.createElement)("h2",{className:"kst-import-options-title"},_("Import Options","kadence-starter-templates")),Object(h.createElement)("div",{class:"kadence-starter-templates-preview-actions"},Object(h.createElement)("button",{className:"kst-import-btn button-hero button",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.props.onChange({isSelected:!1,fontPair:e.state.fontPair,colorPalette:e.state.colorPalette})}},_("Single Page","kadence-starter-templates")),Object(h.createElement)("button",{className:"kst-import-btn button-hero button button-primary",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.props.onChange({isImporting:!0,fontPair:e.state.fontPair,colorPalette:e.state.colorPalette})}},_("Full Site","kadence-starter-templates")))))),Object(h.createElement)("div",{class:"wp-full-overlay-main"},Object(h.createElement)("iframe",{id:"kadence-starter-preview",src:t.url+"?cache=bust"})))}}]),a}(w),F=a(5),I=Object(h.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(h.createElement)(F.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"})),D=Object(h.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(h.createElement)(F.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),L=Object(h.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(h.createElement)(F.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=f()(e);if(t){var n=f()(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return m()(this,a)}}function H(e){try{var t=JSON.parse(e);if(t&&"object"===b()(t))return t}catch(e){}return!1}var R=wp.i18n,B=R.__,q=(R.sprintf,wp.element),V=q.Fragment,W=q.Component,G=q.render,$=(q.PureComponent,wp.components),U=$.Modal,K=$.Spinner,J=($.ButtonGroup,$.Dropdown),Y=$.Icon,X=$.Button,Q=$.ExternalLink,Z=($.ToolbarGroup,$.ToggleControl),ee=$.MenuItem,te=$.Tooltip,ae=Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(h.createElement)("path",{d:"M15.984 18v2.016H8.015V18h7.969zM11.016 7.969v8.016h1.969V7.969h3l-3.984-3.984-3.984 3.984h3z"})),re=Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 180 180"},Object(h.createElement)("circle",{cx:"90.03",cy:"89.952",r:"90",fill:"url(#_Linear1)"}),Object(h.createElement)("path",{fill:"#fff",d:"M50 50H66.003V130H50z"}),Object(h.createElement)("path",{fill:"#fff",d:"M82 50H130.011V66H82z"}),Object(h.createElement)("path",{fill:"#fff",d:"M82 82H130.011V98H82z"}),Object(h.createElement)("path",{fill:"#fff",d:"M82 114.046H130.011V130.046H82z"}),Object(h.createElement)("defs",null,Object(h.createElement)("linearGradient",{id:"_Linear1",x1:"0",x2:"1",y1:"0",y2:"0",gradientTransform:"rotate(-52.456 186.056 40.829) scale(178.658)",gradientUnits:"userSpaceOnUse"},Object(h.createElement)("stop",{offset:"0",stopColor:"#372b73"}),Object(h.createElement)("stop",{offset:"1",stopColor:"#e9335e"})))),ne=(Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 180 180"},Object(h.createElement)("circle",{cx:"90.03",cy:"89.952",r:"90",fill:"#93003c"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M50 50H66.003V130H50z"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M82 50H130.011V66H82z"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M82 82H130.011V98H82z"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M82 114.046H130.011V130.046H82z"})),Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",enableBackground:"new 0 0 720 864",viewBox:"0 0 720 864",className:"gblogo"},Object(h.createElement)("g",null,Object(h.createElement)("path",{d:"M432.4 415.6c-2.5-1.7-5.9-1-7.6 1.5-9.9 14.9-30.9 15.7-32 15.7h-.5c-25.9 0-35.8 22.1-36.2 23-1.2 2.8.1 6 2.8 7.2.7.3 1.5.5 2.2.5 2.1 0 4.1-1.2 5-3.3.1-.2 6.9-15.4 24.4-16.4v28.3c-.7 6.1-3.6 10.9-8.7 14.5-5.3 3.7-12.4 5.6-21.1 5.6-10.4 0-18.9-3.6-25.2-10.7-6.4-7.1-9.6-17.2-9.6-30.2l.1-31.2c.5-11.5 3.6-20.6 9.5-27.1 6.4-7.1 14.8-10.7 25.2-10.7 8.7 0 15.8 1.9 21.1 5.6 5.3 3.7 8.3 8.8 8.8 15.4v.7c0 3.8 3.1 6.9 6.9 6.9s6.9-3.1 6.9-6.9v-.7c-1-9.9-5.5-17.7-13.6-23.6-8.1-5.9-18.2-8.8-30.4-8.8-14.5 0-26.2 4.8-35.1 14.3-8.4 8.9-12.8 20.6-13.3 35 0 1-.1 2-.1 3l.1 28.1h-.1c0 15.9 4.5 28.6 13.4 38.1s20.6 14.3 35.1 14.3c12.2 0 22.3-2.9 30.4-8.8 7.4-5.4 11.8-12.5 13.3-21.3l.3-31.4c9.1-2.2 21.5-7.2 29.3-19 2-2.5 1.3-5.9-1.3-7.6zM528.7 94.1h76.7c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-76.7c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2zM117.8 94.1h76.7c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-76.7c-3.4 0-6.2 2.8-6.2 6.2s2.7 6.2 6.2 6.2z",className:"st2"}),Object(h.createElement)("circle",{cx:"609.3",cy:"150.1",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"359.8",cy:"130.6",r:"6.2",className:"st2"}),Object(h.createElement)("path",{d:"M244.8 150.2h.3c23.3 0 33.7-14.6 41.6-28.2 2.6-4.5 12.2-19.5 25.8-23.4 16.8-4.9 34.7 2.9 41.7 18.2 1 2.2 3.2 3.5 5.4 3.6h.7c2.2-.1 4.4-1.4 5.4-3.6 7-15.3 24.9-23.1 41.7-18.2 13.6 4 23.2 18.9 25.8 23.4 7.9 13.7 18.3 28.2 41.9 28.2 14.2 0 31-10.6 35.7-30.9 3.9-16.8-3.3-32-19-39.7-3.1-1.5-6.8-.3-8.3 2.8-1.5 3.1-.3 6.8 2.8 8.3 14.9 7.4 13.6 20.5 12.4 25.8-2.4 10.4-11.6 21.4-23.7 21.4-15.5 0-22.9-7.8-31.2-22.1-4.1-7-15.5-24-33-29.1-19.1-5.6-39.3 1.1-50.9 15.8-11.6-14.7-31.8-21.4-50.9-15.8-17.5 5.1-28.9 22.1-33 29.1-8.3 14.3-15.7 22.1-30.9 22.1h-.2c-13.2-.1-21.6-9.3-24-18.4-1.2-4.3-3.7-19 13.1-29 2.9-1.7 3.9-5.5 2.1-8.5-1.8-2.9-5.5-3.9-8.5-2.1-19.3 11.5-22.3 29.7-18.7 42.9 4.4 16.3 18.9 27.3 35.9 27.4z",className:"st2"}),Object(h.createElement)("path",{d:"M360 734L360.1 734 360.1 734 360 734z",className:"st2"}),Object(h.createElement)("circle",{cx:"108.1",cy:"150.1",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"90.7",cy:"88",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"631.3",cy:"88",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"664.5",cy:"485.3",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"639.6",cy:"627.1",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"599.8",cy:"644.8",r:"6.2",className:"st2"}),Object(h.createElement)("path",{d:"M231.9 111.2c0 9.2 7.5 16.7 16.7 16.7s16.7-7.5 16.7-16.7-7.5-16.7-16.7-16.7c-9.2-.1-16.7 7.4-16.7 16.7zm16.7-4.4c2.4 0 4.4 2 4.4 4.4 0 2.4-2 4.4-4.4 4.4-2.4 0-4.4-2-4.4-4.4 0-2.4 2-4.4 4.4-4.4zM473.6 127.9c9.2 0 16.7-7.5 16.7-16.7s-7.5-16.7-16.7-16.7-16.7 7.5-16.7 16.7 7.5 16.7 16.7 16.7zm0-21.1c2.4 0 4.4 2 4.4 4.4 0 2.4-2 4.4-4.4 4.4-2.4 0-4.4-2-4.4-4.4 0-2.4 2-4.4 4.4-4.4zM376.7 121.6c-3.2 1.2-4.8 4.7-3.6 7.9 1.2 3.2 4.7 4.8 7.9 3.7 1-.4 25-8.4 43.4 20.2 1.2 1.8 3.2 2.8 5.2 2.8 1.1 0 2.3-.3 3.3-1 2.9-1.8 3.7-5.7 1.9-8.5-19.2-29.7-46.4-29.4-58.1-25.1zM343.3 121.6c-.9-.3-9.1-3.2-20.3-1.5-10.4 1.5-25.3 7.4-37.7 26.7-1.8 2.9-1 6.7 1.9 8.5 1 .7 2.2 1 3.3 1 2 0 4-1 5.2-2.8 18.3-28.6 42.3-20.6 43.4-20.2 3.2 1.2 6.7-.5 7.9-3.7 1.2-3.2-.5-6.8-3.7-8zM627.8 138.5l30.1-34.2v49.3c0 3.4 2.8 6.2 6.2 6.2s6.2-2.8 6.2-6.2V88c0-2.6-1.6-4.9-4-5.8-2.4-.9-5.1-.2-6.8 1.7l-40.9 46.5c-2.3 2.6-2 6.5.6 8.7 2.4 2.3 6.3 2 8.6-.6zM56.8 159.9c3.4 0 6.2-2.8 6.2-6.2v-49.3l30.1 34.2c2.3 2.6 6.2 2.8 8.7.6 2.6-2.3 2.8-6.2.6-8.7L61.5 83.9c-1.7-1.9-4.4-2.6-6.8-1.7-2.4.9-4 3.2-4 5.8v65.7c0 3.4 2.7 6.2 6.1 6.2zM493.4 166c-2.9-.2-5.6 1.8-6.3 4.6-.7 2.9.7 5.9 3.3 7.1 9.8 4.6 18.7 6.4 26.7 6.4 15.3 0 27.5-6.7 36-13.7 13.6-11.2 20.6-25.3 20.9-25.9 1.4-2.9.4-6.4-2.4-8-6.3-3.7-17.2-6-33.8 4.1-8.3 5.1-14.7 11.2-15.8 12.3-15.2 13.4-27.9 13.1-28.6 13.1zm36.9-3.9l.3-.3c4.7-4.7 18-15.6 28.4-16.1-3 4.3-7.5 10.1-13.6 15.2-9 7.4-18.6 11-28.8 10.8 4.2-2.2 8.9-5.4 13.7-9.6zM151.4 136.5c-2.8 1.6-3.8 5.1-2.4 8 .3.6 7.3 14.7 20.9 25.9 8.5 7 20.6 13.7 36 13.7 8.1 0 17-1.8 26.7-6.4 2.7-1.3 4-4.2 3.3-7.1-.7-2.9-3.3-4.8-6.3-4.7-.5 0-13.3.4-28.5-13-1.1-1.1-7.5-7.2-15.8-12.3-16.6-10-27.6-7.7-33.9-4.1zm41.4 25.6c4.7 4.2 9.4 7.3 13.7 9.6-21.6.2-35.9-16.3-42.4-26 10.4.5 23.7 11.4 28.4 16.1l.3.3z",className:"st2"}),Object(h.createElement)("path",{d:"M671.8 664.6c-6.2-5.2-13-8.2-19.3-9.9 2.4-1.8 4.7-3.9 6.7-6.2 15.3-18 15.4-44.5.2-61.7-2.3-2.6-6.2-2.8-8.7-.5-2.6 2.3-2.8 6.2-.5 8.7 11.1 12.6 10.9 32.1-.4 45.5-9.2 10.8-26.7 13.4-31.9 14-15.7 1.7-33.3 5.3-42.8 26.8-1.5 3.3-2.4 7-2.6 11-2.2-.7-4.6-1.1-7-1.1-12.5 0-22.7 10.2-22.7 22.7 0 8.6 4.8 16.1 11.9 19.9-2.1 1.9-4.1 4-5.9 6.4-21-28.3-54.6-46.1-91.6-46.1-5.3 0-10.6.4-15.7 1.1 30.4-9.3 58.7-23.8 84.5-43 33.3-24.9 61-57.4 80-93.9 20-38.4 30.1-79.9 30.1-123.1v-.8-.2-.3c-.2-35.1-8-66.7-19.1-93.9 4.1.8 8 1.1 11.5 1.1 25.9 0 37.3-17.8 38.5-19.9 5.6-9.4 6.5-20.8 3.3-31.1.1-.3.1-.7.1-1.1V176.3c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2V271c-10.5-9.1-25.7-10.1-32-10.1-12.2.1-19.8-1.8-25.4-11.4-4.7-8.1-2-16.5 2.7-21.3 5.9-6 14.3-6.8 22.5-2.3 3 1.6 6.8.6 8.4-2.4 1.6-3 .6-6.8-2.4-8.4-13-7.2-27.6-5.4-37.3 4.4-9.6 9.8-11.4 24.3-4.6 36.1 8.9 15.3 22.4 17.5 35.7 17.5h.5c4 0 16.9.6 24.3 7.6 9.6 9.1 12.1 23.4 5.8 34 0 0-.1.1-.1.2-.5.9-12.4 21.1-45.6 10.5-10-21.2-21.6-39.2-32.4-53.6l-4.9 3.7 4.9-3.8-2-2.6c-21.3-35.7 3.3-73.7 16.1-89.8l7.2-8.2c2.2-2.6 2-6.5-.6-8.7-2.5-2.1-6.1-2-8.4.3-.2.2-1.3 1.3-3 3.2-11.1 11.3-54.5 51.3-96.6 30.4l-1.2-.8-.6-.4c-37.7-20.3-74.9-32-110.4-35-4.6-10.5-10.7-18.5-18.4-18.5-7.8 0-13.9 8.1-18.6 18.8-49.7 2.2-111.5 34.3-114.1 35.6-42.3 21.3-85.9-18.9-97-30.2-1.7-1.9-2.9-3-3-3.2-2.3-2.3-5.9-2.4-8.4-.3-2.6 2.2-2.8 6.1-.6 8.7l7.7 8.7c4.5 5.6 10.2 13.7 15 23.4 12 24.3 12.2 46.4.7 65.8-14.3 17.8-25.9 36.5-34.8 56.2-33.5 10.9-45.5-9.5-46-10.4 0-.1-.1-.1-.1-.2-6.3-10.6-3.8-24.9 5.8-34 7.4-7 20.3-7.6 24.3-7.6h.1c13.4 0 27.2-2.1 36.1-17.5 6.8-11.8 5-26.4-4.6-36.1-9.7-9.9-24.3-11.6-37.3-4.4-3 1.6-4.1 5.4-2.4 8.4 1.6 3 5.4 4.1 8.4 2.4 8.3-4.5 16.7-3.7 22.5 2.3 4.7 4.8 7.3 13.2 2.7 21.3-5.5 9.5-13 11.4-25 11.4h-.4c-5.5 0-18.3.8-28.5 7.4v-90.3c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v104c-6.8 12.2-7.2 27.1-.2 39.1.7 1.3 5 8.5 14.6 13.9 5.5 3.1 13.4 6 23.9 6 3.8 0 8-.4 12.5-1.3-10.8 29-16.2 60.2-16.4 94.2v1.1c0 61.4 21.6 121.7 60.8 169.8 34.7 42.6 81.9 74.2 134.2 90.3-5.5-.8-11.1-1.2-16.7-1.2-36.7 0-70 17.5-91 45.4-1.7-2.2-3.6-4.3-5.7-6.1 6.6-4 11.1-11.2 11.1-19.5 0-12.5-10.2-22.7-22.7-22.7-2.3 0-4.5.4-6.6 1-.3-3.9-1.2-7.6-2.6-10.9-9.6-21.5-27.1-25.1-42.8-26.8-5.2-.6-22.7-3.2-31.9-14-11.6-13.1-11.8-32.6-.7-45.2 2.3-2.6 2-6.5-.5-8.7-2.6-2.3-6.5-2-8.7.5-15.1 17.2-15 43.7.2 61.7 2 2.4 4.3 4.4 6.7 6.2-6.3 1.7-13.1 4.8-19.3 9.9-14.7 12.1-22.2 32.3-22.4 59.8-.5 2.5.6 5.1 2.8 6.5 1 .6 2.1.9 3.2.9.4 0 .9-.1 1.3-.2h.1c.2 0 .3-.1.5-.2.3-.1.7-.2 1-.4.1 0 .1-.1.2-.1 1-.6 1.9-1.4 2.5-2.4 2.4-3.1 12.3-7 20.5-8.7 32.1-7 38.8-28.7 37.8-39.1-.3-3.4-3.3-5.9-6.7-5.6-3.4.3-5.9 3.3-5.6 6.7 0 .1.1 1.9-.5 4.6-1.5 6.2-7 16.9-27.6 21.4h-.2c-2.4.5-9.6 2.2-16.3 5.3 1.8-17.8 7.5-30.8 17.2-38.9 14.9-12.4 34.6-8.9 34.8-8.8.7.1 1.3.1 1.9 0 3.3.7 6.1 1.1 8.2 1.3 16.5 1.8 26.6 5.4 32.9 19.5 4.9 11.1-1.4 23.9-9.9 30.3-4.3 3.3-15.8 9.8-28.7-.8-2.6-2.2-6.5-1.8-8.7.8-2.2 2.6-1.8 6.5.8 8.7 5.8 4.8 12.3 7.6 19 8.4-8.6 7-14.4 15.8-17 20.4-8.4 14.5-15.2 22.3-26.5 22.4V733c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v50.2c0 2.5 1.5 4.6 3.6 5.6 1.1.8 2.4 1.4 3.8 1.4h144c2.2 0 4-1.1 5.2-2.8.8-.8 1.5-1.8 1.8-3 5.7-22.1 25.6-37.5 48.4-37.5 20.4 0 38.5 12.4 46.2 30.9h-13.2c-5.4-13.3-18.4-22.2-33.1-22.2-16.1 0-30.3 10.9-34.6 26.4-.9 3.3 1.1 6.7 4.3 7.6 3.3.9 6.7-1.1 7.6-4.3 2.8-10.2 12.1-17.3 22.6-17.3 7.8 0 14.8 3.8 19.1 9.8h-3.6c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h12.5c.2 0 .5.1.7.1.3 0 .6 0 .8-.1h24.8c3.4 0 6.2-2.8 6.2-6.2 0-.3 0-.6-.1-.9.1-.8.1-1.7-.1-2.6-7.3-27.1-32.1-46-60.2-46-27.2 0-51.1 17.6-59.4 43.3h-32.3c2.6-8.3 6.1-16 10.5-23.2.3-.4.5-.8.8-1.2 18.3-28.7 50.3-47.1 85.8-47.1 21 0 41.2 6.4 58.3 18.4.5.3 1 .6 1.5.7 2.6 3.1 5.2 6.4 7.7 9.8.6.8 1.1 1.6 1.7 2.4-.6 12.7 6.3 26 20.6 39.6.5 1.5 1 2.8 1.3 3.8v1.3c0 3.4 2.8 6.2 6.2 6.2 2.9 0 5.2-1.9 5.9-4.6 0-.1.9-3.1 2.7-8.1 12.9-12.6 19.3-24.9 19.2-36.8.8-1.2 1.7-2.5 2.6-3.7 2.8-3.8 5.7-7.5 8.7-11 17-11.8 36.9-18 57.7-18 44.8 0 84 29.2 97 71.5h-32.3c-8.2-25.7-32.1-43.3-59.4-43.3-28.1 0-52.8 18.9-60.2 46-.3 1-.3 2 0 3v.5c0 3.4 2.8 6.2 6.2 6.2h54.2c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-19.7c4.3-6 11.3-9.8 19.1-9.8 10.7 0 20 7.2 22.7 17.6.7 2.8 3.2 4.6 6 4.6.5 0 1-.1 1.5-.2 3.3-.8 5.3-4.2 4.5-7.5-4.1-15.8-18.3-26.9-34.7-26.9-14.6 0-27.6 8.9-33.1 22.2h-12.5c7.6-18.5 25.8-30.9 46.2-30.9 22.8 0 42.7 15.4 48.4 37.5.1.5.4 1 .6 1.5.8 2.5 3.1 4.3 5.9 4.3H664c3.4 0 6.2-2.8 6.2-6.2v-.4-1.6c.1-.6.1-1.2.1-1.8 0-.1 0-.2-.1-.3V733c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v42c-10.4-.8-16.9-8.5-24.9-22.3-2.6-4.4-8-12.7-16-19.5 5.5-1.2 10.8-3.8 15.7-7.9 2.6-2.2 3-6.1.8-8.7-2.2-2.6-6.1-3-8.7-.8-12.8 10.6-24.3 4.1-28.7.8-8.5-6.4-14.8-19.3-9.9-30.3 6.3-14.1 16.4-17.8 32.9-19.5 2.1-.2 4.9-.6 8.2-1.3.6.1 1.3.1 2 0 .2 0 19.7-3.6 34.7 8.8 9.8 8.1 15.6 21.1 17.3 39-6.8-3.2-14.1-4.9-16.4-5.4h-.2c-20.5-4.5-26.1-15.1-27.6-21.3-.6-2.6-.6-4.4-.5-4.6.3-3.4-2.2-6.4-5.6-6.7-3.4-.3-6.4 2.2-6.7 5.6-1 10.5 5.7 32.1 37.9 39.1 8.3 1.8 18.8 5.9 20.7 9 0 0 0 .1.1.1.3.4.6.8.9 1.1.1.1.2.1.3.2.3.2.6.5.9.6.1.1.3.2.4.2.3.2.6.3.9.4.1 0 .3.1.4.1.4.1.9.2 1.4.2.4 0 .7 0 1.1-.1.1 0 .2 0 .3-.1.3-.1.6-.2 1-.3h.1c.3-.1.5-.3.8-.4l.1-.1c.2-.1.4-.3.5-.4.1-.1.3-.2.4-.4l.4-.4c.1-.2.3-.3.4-.5.1-.2.2-.3.3-.5.1-.2.2-.3.3-.5.1-.2.1-.4.2-.6.1-.2.1-.4.2-.6 0-.2.1-.4.1-.5 0-.2.1-.4.1-.7v-.1c-.1-28.3-7.7-48.8-22.6-61.1zM152.9 777.7H87.8c5.5-5.6 9.4-12.3 12.4-17.5 2.6-4.5 12.2-19.5 25.8-23.4 16-4.7 31 .8 38.4 13.5-4.9 8.5-8.8 17.7-11.5 27.4zm1.7-53.7c-5.7 0-10.3-4.6-10.3-10.3 0-5.7 4.6-10.3 10.3-10.3s10.3 4.6 10.3 10.3c0 5.7-4.7 10.3-10.3 10.3zm366.6-78.1l.9 1.1-.9-1.1zm.2-6.2c-58.4-6.8-100.6 18.3-125.8 40.5-10.9 9.6-19.5 19.5-26 27.9-1.2-.8-2.3-1.6-3.3-2.1v-17.6c47.3-47.5 94.3-61.7 125.5-65.2 20.7-2.3 37.4-.4 47.4 1.5-5.7 5.3-11.6 10.3-17.8 15zm73.3-87.2c-6 11.5-12.9 22.5-20.5 33.1-7.9-2.5-17.8-4.8-29.7-5.9 26.5-33.6 43.3-73.7 48.7-116 8.6-1 20.5-4.7 29.6-10.6-2.4 34.7-11.8 68.1-28.1 99.4zm-42.1-111.6l7.2-.3c2.4 10.7 10.5 19.3 21.1 22.2-5.6 42.8-23.4 83.2-51.8 116.2-13.7 0-29.6 1.6-47.6 5.5 42-34.2 69.4-85.7 71.1-143.6zm-117.5 158c-4 1.6-6.8 2.9-8.2 3.5-16.6 6.6-34.4 10.9-53 12.3l165.9-165.9c-5 66.8-46.6 123.4-104.7 150.1zm188.3-164.7c-.2 5.6-15.5 14.7-29 16.9-1.9.3-3.8.5-5.6.5-2.4 0-4.7-.5-6.8-1.4-6.3-2.7-10.7-8.9-10.7-16.1 0-7.2 4.4-13.4 10.7-16.1 2.1-.9 4.4-1.4 6.8-1.4 1.8 0 3.7.2 5.6.5 13.5 2.2 28.7 11.3 29 16.8v.3zM565.5 276l2.6 3.5c22.7 30.3 49.3 77.2 54.4 135.6-9-5.8-20.8-9.5-29.3-10.5-6.4-50.6-28.9-96.3-62.2-131.6 1.4-2.9 2.2-6.2 2.2-9.6 0-4.6-1.4-8.9-3.7-12.4l28.4-32.4c-5.4 20.6-2.8 40.1 7.6 57.4zm-82.9-70.1l1.3.9.7.4c9.9 5 20.5 7.5 31.5 7.5 11.6 0 23.7-2.8 35.9-8.4l-32 36.5c-2.9-1.4-6.1-2.1-9.6-2.1-4.5 0-8.6 1.3-12.1 3.5-31.5-23-68.8-38.3-109.4-43.3-1-7.3-3-17.7-6-27.9 32.1 3.6 65.6 14.6 99.7 32.9zm38.2 57.5c0 4.5-3 8.4-7.1 9.8-1 .3-2.1.5-3.2.5h-1c-4.6-.4-8.3-3.9-9.1-8.3-.1-.6-.2-1.3-.2-1.9 0-.7.1-1.3.2-2 .9-4.5 4.7-8 9.4-8.3H511.1c4.6.3 8.5 3.6 9.5 8 .1.6.2 1.1.2 1.7-.1.1 0 .3 0 .5zm-131.4-49.9c37.2 4.9 71.6 19.1 100.7 40.1-1.5 3-2.3 6.3-2.3 9.9 0 4.5 1.3 8.6 3.6 12.2l-49.8 56.8c-2.3 2.6-2 6.5.6 8.7 1.2 1 2.6 1.5 4.1 1.5 1.7 0 3.4-.7 4.7-2.1l49.7-56.7c3 1.5 6.3 2.3 9.9 2.3 4.6 0 8.8-1.4 12.3-3.7 31 33.2 51.9 75.8 58.1 123-10.7 3-19 11.8-21.2 22.8l-7.1.3c-1.5-45.7-19.2-89.3-50.1-123.2-2.3-2.5-6.2-2.7-8.7-.4-2.5 2.3-2.7 6.2-.4 8.7 27.2 29.8 43.4 67.6 46.5 107.6L473.5 355c-2.4-2.4-6.3-2.4-8.7 0-2.4 2.4-2.4 6.3 0 8.7l71.4 71.4-176 176-176-176 70.8-70.8c2.4-2.4 2.4-6.3 0-8.7-2.4-2.4-6.3-2.4-8.7 0l-65.7 65.7c3.5-45.5 23.9-86.4 55-116.2l31 35.4c1.2 1.4 2.9 2.1 4.7 2.1 1.4 0 2.9-.5 4.1-1.5 2.6-2.3 2.8-6.2.6-8.7l-31.1-35.5c28-23.4 63.1-38.5 101.6-41.4l-52.8 52.3c-2.4 2.4-2.4 6.3 0 8.7 1.2 1.2 2.8 1.8 4.4 1.8 1.6 0 3.1-.6 4.4-1.8l58-57.4 56.3 56.3c2.4 2.4 6.3 2.4 8.7 0 2.4-2.4 2.4-6.3 0-8.7l-51.2-51.2c31.7 2.4 61.9 13 88.2 31.1 2.8 1.9 6.7 1.2 8.6-1.6 1.9-2.8 1.2-6.7-1.6-8.6-30.4-20.9-65.8-32.5-102.8-33.6v-4.4c11.6-2.8 20.9-12.7 22.7-24.9zm-180.7 74.3c3.5 0 6.8-.8 9.7-2.2l8.9 10.2c-35.3 33.7-57.8 80.6-59.6 132.7l-5-.3c-2.4-11.7-11.5-20.9-23.2-23.3 6.1-46.3 26.5-88.1 56.5-120.9 3.7 2.4 8 3.8 12.7 3.8zm-10.3-22.6c0-.5 0-.9.1-1.4 0-.3.1-.5.1-.8.9-4.4 4.7-7.8 9.3-8.1h.7c4.7 0 8.7 3.2 9.9 7.6.2.9.4 1.8.4 2.7 0 .7-.1 1.4-.2 2.1-.9 4.4-4.7 7.8-9.3 8.1h-.8c-1.3 0-2.6-.3-3.7-.7-3.7-1.4-6.5-5.2-6.5-9.5zm-35.8 175.4l5.1.3c1.7 58 29.2 109.6 71.3 143.8-18.1-4-34-5.6-47.8-5.7-28.2-32.9-46.1-73.1-51.7-115.7 11.5-2.4 20.6-11.3 23.1-22.7zm17.9 8.2l165.9 165.9C258 608 187.2 537.2 180.5 448.8zm162.7-249c2.7-18.7 11.9-43.7 16.7-45.7 5.5 2.1 14 28 16.6 45.6.5 3.5.8 6.7.8 9.3 0 1.1-.1 2.1-.3 3.1-1.5 8.1-8.6 14.3-17.2 14.3s-15.7-6.2-17.2-14.3c-.2-1-.3-2.1-.3-3.1.1-2.7.4-5.8.9-9.2zm10.8 38.5v4.3c-44.6 1.4-85.4 18.1-117.4 44.9l-8.8-10.1c2.3-3.5 3.7-7.8 3.7-12.3 0-3.8-1-7.4-2.6-10.5 29.3-21.5 64-36 101.7-41.1 1.7 12.4 11.2 22.4 23.4 24.8zm-152.7-23.6c11 0 21.6-2.5 31.6-7.5.6-.3 57.7-30 103.9-34-3 10.1-5 20.6-6 27.8-41.1 5.1-79 21-110.7 44.6-3.4-2-7.2-3.1-11.4-3.1-3.5 0-6.8.8-9.7 2.2l-33.6-38.3c12.3 5.5 24.3 8.3 35.9 8.3zm-49.9 61.9l.5-.7c10.4-17.2 13-36.8 7.8-57.4l30 34.3c-2.3 3.5-3.7 7.8-3.7 12.3 0 3.3.7 6.4 2 9.3-32.7 35.2-54.7 80.4-61 130.4-8.9 1.4-20.7 5.2-29.6 10.9 3.5-52.8 21.2-98.5 54-139.1zM96.9 434c.2-5.8 16.3-13.8 29-16.4 2.8-.6 5.4-.9 7.6-.9 1.7 0 3.2.2 4.8.7 7.3 2.1 12.7 8.8 12.7 16.8s-5.4 14.7-12.7 16.8c-1.5.4-3.1.7-4.8.7-2.3 0-4.9-.3-7.6-.9-12.7-2.7-28.8-10.7-29-16.5v-.3zm.6 18.4c8.9 5.8 20.8 9.6 29.6 11 5.3 42.4 22.1 82.6 48.7 116.2-11.9 1.1-21.8 3.3-29.8 5.8-28.7-39.4-45.3-84.9-48.5-133zM154.9 597c-.3-.4-.6-.7-.9-1.1 30.1-8.3 63-3.9 86.1 1.6 27.9 6.7 48.3 16.4 48.5 16.5l.1-.2c22.1 8.8 46.2 13.7 71.4 13.7 25.1 0 49.1-4.8 71.1-13.6l.6-.3c2.6-1.1 5.3-2.2 7.8-3.4 8.5-3.5 22.8-8.7 40-12.8 23.3-5.6 56.3-10 86.4-1.6-5.2 6.4-10.6 12.5-16.4 18.4-8.4-2.3-29.8-6.7-58.7-3.6-31.4 3.4-77.6 16.8-124.8 60.4v-10.9c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v10.3c-46.9-43.1-92.9-56.4-124.1-59.8-29.6-3.2-51.3 1.6-59.2 3.8-5.2-5.4-10.5-11.3-15.5-17.4zm26.3 27.8c10-2 26.9-4 48-1.6 55.5 6.2 98.1 37.9 124.8 64.5v18.1c-.9.5-1.9 1.1-3 1.9-6.5-8.3-15-18-25.7-27.4-25.2-22.3-67.6-47.5-126.2-40.5v.1c-6.2-4.8-12.2-9.8-17.9-15.1zm155.3 98c-11.7-15-24.5-26.3-37.3-34.8l.1-.3c-.3-.1-.6-.2-.9-.2-21.3-13.9-42.7-20-59.9-22.5-8.1-4.2-16.1-8.9-23.8-14 37.7-1.1 71.9 11.7 102.1 38.2 10.4 9.1 18.6 18.5 24.8 26.6-1.9 2.1-3.6 4.4-5.1 7zm29.9 37.5c-1.5 1.8-3.1 3.6-4.9 5.4-.4.4-.9.9-1.4 1.3l-.1.1-.1.1v-.2c-.2-.2-.5-.4-.7-.7-2-1.9-3.7-3.8-5.3-5.7-7.3-8.7-10.5-16.8-9.4-24.2.1-.6.2-1.2.4-1.8.8-3.2 2.3-6 4.1-8.4 1.5-2 3.2-3.7 4.9-5.2 1.5-1.3 3-2.4 4.3-3.3.6-.4 1.1-.7 1.6-1 0 0 .1 0 .1-.1h.1c.7.4 1.4.9 2.3 1.5 1.2.8 2.6 1.9 4 3.1 1.8 1.6 3.6 3.5 5.1 5.6 1.8 2.6 3.3 5.5 3.9 8.8 0 .2.1.5.2.7 1.1 7.3-2 15.3-9.1 24zm24.4-45.1c-.2.2-.4.4-.5.6-2.3 2.6-4.4 5.2-6.3 7.7-1.5-2.6-3.2-5-5-7.1 6.2-8.1 14.6-17.8 25.2-27.1 30-26.4 64.1-39.2 101.5-38.3-7.8 5.1-15.8 9.9-24 14.1-42.8 6.5-72.1 28.7-90.9 50.1zm174.5-11.8c5.7 0 10.3 4.6 10.3 10.3 0 5.7-4.6 10.3-10.3 10.3s-10.3-4.6-10.3-10.3c0-5.6 4.6-10.3 10.3-10.3zm31.2 32.1c13.6 4 23.2 18.9 25.8 23.4 3.2 5.6 7.5 13 13.8 18.8H567c-2.6-9.4-6.3-18.3-11-26.5 7.6-13.6 24.6-20.4 40.5-15.7z",className:"st2"}),Object(h.createElement)("path",{d:"M69.6 301.1c0 10.1 8.2 18.4 18.4 18.4s18.4-8.2 18.4-18.4c0-10.1-8.2-18.4-18.4-18.4s-18.4 8.3-18.4 18.4zm24.4 0c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6 6 2.7 6 6zM648.7 301.1c0-10.1-8.2-18.4-18.4-18.4-10.1 0-18.4 8.2-18.4 18.4 0 10.1 8.2 18.4 18.4 18.4s18.4-8.2 18.4-18.4zm-24.4 0c0-3.3 2.7-6 6-6s6 2.7 6 6-2.7 6-6 6c-3.3.1-6-2.6-6-6zM666.4 346.9c-2.3-.9-5-.4-6.8 1.4-8.1 8.3-21.4 8-21.6 8h-.2c-3.3 0-6 2.6-6.2 5.9-.1 3.4 2.5 6.3 5.9 6.4.6 0 10.4.3 20.4-4.3v100.9c0 3.4 2.8 6.2 6.2 6.2s6.2-2.8 6.2-6.2V352.6c-.1-2.5-1.6-4.8-3.9-5.7zM55.7 471.4c3.4 0 6.2-2.8 6.2-6.2V364.3c10 4.6 19.8 4.3 20.4 4.3 3.4-.1 6.1-3 5.9-6.4-.1-3.4-3-6.1-6.4-5.9-.1 0-13.5.3-21.6-8-1.8-1.8-4.4-2.3-6.8-1.4-2.3.9-3.8 3.2-3.8 5.7v112.7c-.1 3.4 2.7 6.1 6.1 6.1zM671.3 574.3c0-3.4-2.8-6.2-6.2-6.2h-40c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h40c3.4 0 6.2-2.7 6.2-6.2zM629.8 598c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-15.4c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h15.4zM644.8 609.4c0-3.4-2.8-6.2-6.2-6.2h-38.2c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h38.2c3.4 0 6.2-2.7 6.2-6.2zM620.6 627.1c0-3.4-2.8-6.2-6.2-6.2h-29.9c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h29.9c3.4 0 6.2-2.8 6.2-6.2zM565.1 638.6c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h17c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-17zM665.1 532.8h-22.3c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h22.3c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2zM665.1 550.5H634c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h31.1c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2zM665.1 497.5h-9.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h9.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM665.1 515.2h-15.2c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h15.2c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2z",className:"st2"}),Object(h.createElement)("circle",{cx:"55.5",cy:"485.6",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"80.5",cy:"627.3",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"120.3",cy:"645",r:"6.2",className:"st2"}),Object(h.createElement)("path",{d:"M54.9 580.7h40c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-40c-3.4 0-6.2 2.8-6.2 6.2 0 3.5 2.8 6.2 6.2 6.2zM105.6 585.9H90.2c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h15.4c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM119.6 603.5H81.4c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h38.2c3.4 0 6.2-2.8 6.2-6.2 0-3.5-2.8-6.2-6.2-6.2zM135.5 621.1h-29.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h29.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM131.7 645c0 3.4 2.8 6.2 6.2 6.2h17c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-17c-3.4 0-6.2 2.8-6.2 6.2zM54.9 545.4h22.3c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 563.1H86c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 510.1h9.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-9.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 527.7h15.2c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.5 2.8 6.2 6.2 6.2zM360 767.1c.1-.1 0-.1 0-.2v.2zM641.2 202.7c.1 0 .1 0 0 0 2.8 0 5.3-1.9 6-4.7 2.2-8.8 1.3-16.3-2.9-22.5-6.7-10-19-11.9-20.4-12.1-3.2-.4-6.2 1.6-6.9 4.8-2.3 10.5-1 18.9 4 25.1 7.4 9 19 9.3 20.2 9.4zm-7-20.2c1.2 1.9 1.9 4.1 1.9 6.7-1.8-.7-3.8-1.8-5.2-3.6-1.6-2-2.4-4.6-2.4-7.9 2 1 4.2 2.6 5.7 4.8zM601 113.3c-6.7-10-19-11.9-20.4-12.1-3.2-.4-6.2 1.6-6.9 4.8-2.3 10.5-1 18.9 4 25.1 7.2 9 18.8 9.3 20.1 9.3 2.8 0 5.3-1.9 6-4.7 2.3-8.6 1.4-16.2-2.8-22.4zm-13.5 10.1c-1.6-2-2.4-4.6-2.4-7.9 2.1 1 4.3 2.6 5.7 4.8 1.2 1.9 1.9 4.1 1.9 6.7-1.8-.7-3.8-1.8-5.2-3.6zM97.3 163.4c-1.4.2-13.6 2.1-20.4 12.1-4.1 6.2-5.1 13.7-2.9 22.5.7 2.7 3.2 4.7 6 4.7 1.3 0 12.9-.3 20.1-9.3 5-6.2 6.3-14.7 4-25.1-.6-3.2-3.6-5.3-6.8-4.9zm-6.7 22.2c-1.4 1.8-3.4 2.9-5.3 3.6 0-2.6.7-4.9 1.9-6.7 1.5-2.2 3.7-3.8 5.7-4.8 0 3.3-.8 5.9-2.3 7.9zM139.7 101.2c-1.4.2-13.6 2.1-20.4 12.1-4.1 6.2-5.1 13.7-2.9 22.5.7 2.7 3.2 4.7 6 4.7 1.3 0 12.9-.3 20.1-9.3 5-6.2 6.3-14.7 4-25.1-.7-3.2-3.6-5.3-6.8-4.9zm-6.8 22.2c-1.4 1.8-3.4 2.9-5.3 3.6 0-2.6.7-4.9 1.9-6.7 1.5-2.2 3.7-3.8 5.7-4.8 0 3.3-.7 5.9-2.3 7.9zM555.1 392c.4 3.2 3 5.5 6.1 5.5h.7c3.4-.4 5.8-3.5 5.4-6.9-6.2-54-43.1-92.2-44.7-93.8-2.4-2.4-6.3-2.5-8.7-.1-2.4 2.4-2.5 6.3-.1 8.7.4.4 35.6 36.9 41.3 86.6zM159.1 397.4h.7c3.1 0 5.8-2.3 6.1-5.5 5.7-49.7 40.9-86.2 41.2-86.5 2.4-2.4 2.3-6.4-.1-8.7-2.4-2.4-6.4-2.4-8.7.1-1.6 1.6-38.4 39.8-44.7 93.8-.3 3.4 2.1 6.4 5.5 6.8z",className:"st2"})))),se=function(e){u()(a,e);var t=A(a);function a(){var e;return n()(this,a),(e=t.apply(this,arguments)).runAjax=e.runAjax.bind(i()(e)),e.runPluginInstall=e.runPluginInstall.bind(i()(e)),e.loadTemplateData=e.loadTemplateData.bind(i()(e)),e.reloadTemplateData=e.reloadTemplateData.bind(i()(e)),e.loadPluginData=e.loadPluginData.bind(i()(e)),e.focusMode=e.focusMode.bind(i()(e)),e.fullFocusMode=e.fullFocusMode.bind(i()(e)),e.jumpToImport=e.jumpToImport.bind(i()(e)),e.selectedMode=e.selectedMode.bind(i()(e)),e.selectedFullMode=e.selectedFullMode.bind(i()(e)),e.backToDash=e.backToDash.bind(i()(e)),e.saveConfig=e.saveConfig.bind(i()(e)),e.state={category:"all",activeTemplate:"",colorPalette:"",fontPair:"",search:null,isFetching:!1,isImporting:!1,isSelected:!1,response:"",isPageSelected:!1,starterSettings:kadenceStarterParams.starterSettings?JSON.parse(kadenceStarterParams.starterSettings):{},selectedPage:"home",progress:"",focusMode:!1,finished:!1,overrideColors:!1,overrideFonts:!1,isOpenCheckColor:!1,isOpenCheckFont:!1,isOpenCheckPast:!1,removePast:!1,errorTemplates:!1,templates:kadenceStarterParams.templates?kadenceStarterParams.templates:[],etemplates:kadenceStarterParams.etemplates?kadenceStarterParams.etemplates:[],activeTemplates:!1,palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[],fonts:kadenceStarterParams.fonts?kadenceStarterParams.fonts:[],logo:kadenceStarterParams.logo?kadenceStarterParams.logo:"",hasContent:!!kadenceStarterParams.has_content&&kadenceStarterParams.has_content,hasPastContent:!!kadenceStarterParams.has_previous&&kadenceStarterParams.has_previous,isSaving:!1,isLoadingPlugins:!1,activePlugins:!1,templatePlugins:""},e}return c()(a,[{key:"saveConfig",value:function(e,t){var a=this;this.setState({isSaving:!0});var r=kadenceStarterParams.starterSettings?JSON.parse(kadenceStarterParams.starterSettings):{};r[e]||(r[e]=""),r[e]=t,this.setState({starterSettings:r}),new wp.api.models.Settings({kadence_starter_templates_config:JSON.stringify(r)}).save().then((function(e){a.setState({starterSettings:r,isSaving:!1}),kadenceStarterParams.starterSettings=JSON.stringify(r)}))}},{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"focusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0,isSelected:!1,activePlugins:!1})}},{key:"fullFocusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0,isSelected:!0,activePlugins:!1})}},{key:"jumpToImport",value:function(e){this.setState({isImporting:!0,activeTemplate:e,focusMode:!0,isSelected:!0,fontPair:"",colorPalette:"",activePlugins:!1})}},{key:"selectedFullMode",value:function(){this.setState({isSelected:!0})}},{key:"selectedMode",value:function(e){this.setState({selectedPage:e,isPageSelected:!0,isImporting:!0})}},{key:"backToDash",value:function(){this.setState({isFetching:!1,activeTemplate:"",activePlugins:!1,overrideColors:!1,overrideFonts:!1,colorPalette:"",fontPair:"",focusMode:!1,finished:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",selectedPage:"home"})}},{key:"reloadTemplateData",value:function(){this.setState({errorTemplates:!1,isSaving:!0,activeTemplates:"loading"});var e=kadenceStarterParams.proData&&kadenceStarterParams.proData.ktp_api_key?kadenceStarterParams.proData.ktp_api_key:"",t=kadenceStarterParams.proData&&kadenceStarterParams.proData.activation_email?kadenceStarterParams.proData.activation_email:"";e||(e=kadenceStarterParams.proData&&kadenceStarterParams.proData.ithemes_key?kadenceStarterParams.proData.ithemes_key:"")&&(t="iThemes");var a=new FormData;a.append("action","kadence_import_reload_template_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("api_key",e),a.append("api_email",t),a.append("template_type",this.state.starterSettings.builderType);var r=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:a,contentType:!1,processData:!1}).done((function(e,t,a){if(e){var n=H(e);n?r.setState({activeTemplates:n,errorTemplates:!1,isSaving:!1}):r.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}})).fail((function(e){console.log(e),r.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}))}},{key:"loadTemplateData",value:function(){this.setState({errorTemplates:!1,isSaving:!0,activeTemplates:"loading"});var e=kadenceStarterParams.proData&&kadenceStarterParams.proData.ktp_api_key?kadenceStarterParams.proData.ktp_api_key:"",t=kadenceStarterParams.proData&&kadenceStarterParams.proData.activation_email?kadenceStarterParams.proData.activation_email:"";e||(e=kadenceStarterParams.proData&&kadenceStarterParams.proData.ithemes_key?kadenceStarterParams.proData.ithemes_key:"")&&(t="iThemes");var a=new FormData;a.append("action","kadence_import_get_template_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("api_key",e),a.append("api_email",t),a.append("template_type",this.state.starterSettings.builderType);var r=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:a,contentType:!1,processData:!1}).done((function(e,t,a){if(e){var n=H(e);n?r.setState({activeTemplates:n,errorTemplates:!1,isSaving:!1}):r.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}})).fail((function(e){console.log(e),r.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}))}},{key:"loadPluginData",value:function(e,t){this.setState({isLoadingPlugins:!0});var a=new FormData;a.append("action","kadence_check_plugin_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",e),a.append("builder",t);var r=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:a,contentType:!1,processData:!1}).done((function(e,t,a){e&&(void 0!==e.success?r.setState({templatePlugins:"error",activePlugins:!0,isLoadingPlugins:!1}):"object"===b()(e)&&null!==e?r.setState({templatePlugins:e,activePlugins:!0,isLoadingPlugins:!1}):r.setState({templatePlugins:"error",activePlugins:!0,isLoadingPlugins:!1}))})).fail((function(e){console.log(e),r.setState({templatePlugins:"error",activePlugins:!0,isLoadingPlugins:!1})}))}},{key:"runPluginInstallSingle",value:function(e,t,a){this.setState({progress:"plugins",isFetching:!0});var r=new FormData;r.append("action","kadence_import_install_plugins"),r.append("security",kadenceStarterParams.ajax_nonce),r.append("selected",e),r.append("builder",a),r.append("page_id",t),this.runPageAjax(r)}},{key:"runRemovePast",value:function(e,t){this.setState({progress:"remove",isFetching:!0});var a=new FormData;a.append("action","kadence_remove_past_import_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",e),a.append("builder",t),this.runAjax(a)}},{key:"runPluginInstall",value:function(e,t){this.setState({progress:"plugins",isFetching:!0});var a=new FormData;a.append("action","kadence_import_install_plugins"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",e),a.append("builder",t),this.runAjax(a)}},{key:"runPageAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(a,r,n){if(void 0!==a.status&&"newAJAX"===a.status)t.state.progress="contentNew",t.runPageAjax(e);else if(void 0!==a.status&&"pluginSuccess"===a.status){t.setState({progress:"content"});var s=new FormData;s.append("action","kadence_import_single_data"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("selected",t.state.activeTemplate),s.append("builder",t.state.starterSettings.builderType),s.append("page_id",t.state.selectedPage),s.append("override_colors",t.state.overrideColors),s.append("override_fonts",t.state.overrideFonts),s.append("palette",t.state.colorPalette),s.append("font",t.state.fontPair),t.runPageAjax(s)}else void 0!==a.message?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",response:"<p>"+a.message+"</p>"}):t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+a+"</p></div>"})})).fail((function(e){t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"})}))}},{key:"runAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(a,r,n){if(void 0!==a.status&&"newAJAX"===a.status)t.state.progress="contentNew",t.runAjax(e);else if(void 0!==a.status&&"customizerAJAX"===a.status){t.setState({progress:"customizer"}),(s=new FormData).append("action","kadence_import_customizer_data"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("wp_customize","on"),t.runAjax(s)}else if(void 0!==a.status&&"afterAllImportAJAX"===a.status){t.setState({progress:"widgets"}),(s=new FormData).append("action","kadence_after_import_data"),s.append("security",kadenceStarterParams.ajax_nonce),t.runAjax(s)}else if(void 0!==a.status&&"pluginSuccess"===a.status){t.setState({progress:"content"}),(s=new FormData).append("action","kadence_import_demo_data"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("builder",t.state.starterSettings.builderType),s.append("selected",t.state.activeTemplate),s.append("palette",t.state.colorPalette),s.append("font",t.state.fontPair),t.runAjax(s)}else if(void 0!==a.status&&"removeSuccess"===a.status){var s;t.setState({progress:"plugins"}),(s=new FormData).append("action","kadence_import_install_plugins"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("selected",t.state.activeTemplate),s.append("builder",t.state.starterSettings.builderType),t.runAjax(s)}else void 0!==a.message?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:"<p>"+a.message+"</p>"}):void 0===a.success||a.success?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+a+"</p></div>"}):t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+B("Failed Import. Something went wrong internally. Please try again.","kadence-starter-templates")+"</p></div>"})})).fail((function(e){console.log(e),t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",response:'<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"})}))}},{key:"render",value:function(){for(var e=this,t=["all"],a=0;a<this.state.templates.length;a++)for(var r=0;r<this.state.templates[a].categories.length;r++)t.includes(this.state.templates[a].categories[r])||t.push(this.state.templates[a].categories[r]);t.map((function(t){return{value:t,label:e.capitalizeFirstLetter(t)}}));var n=B("Gutenberg","kadence-starter-templates"),s=ne;"elementor"===this.state.starterSettings.builderType&&(n=B("Elementor","kadence-starter-templates"),s=re),"custom"===this.state.starterSettings.builderType&&(n=kadenceStarterParams.custom_name?kadenceStarterParams.custom_name:B("Pro Designs","kadence-starter-templates"),s=kadenceStarterParams.custom_icon?Object(h.createElement)("img",{className:"components-menu-items__item-icon custom-image-icon-src",src:kadenceStarterParams.custom_icon}):ae);var c=function(){var t=e.state.activeTemplates[e.state.activeTemplate],a=!1;return Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages[e.state.selectedPage].image,alt:t.pages[e.state.selectedPage].title}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("h2",null,B("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name),Object(h.createElement)("br",null)," ",B("Selected Page:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.pages[e.state.selectedPage].title))),Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,B("Page Template Plugins","kadence-starter-templates"))),e.state.isLoadingPlugins&&Object(h.createElement)(K,null),!e.state.activePlugins&&!e.state.isLoadingPlugins&&Object(h.createElement)(V,null,e.loadPluginData(t.slug,e.state.starterSettings.builderType)),e.state.activePlugins&&Object(h.createElement)(V,null,e.state.templatePlugins&&"error"!==e.state.templatePlugins&&Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(e.state.templatePlugins,(function(e){var t=e.state,r=e.src,n=e.title;return"active"!==t&&"bundle"===r&&(a=!0),"active"===t||"thirdparty"!==r&&"unknown"!==r||(pluginsPremium=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==t&&"bundle"===r?" bundle-install-required":"")},n," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===t?B("Not Installed","kadence-starter-templates"):t)," ","active"!==t&&"thirdparty"===r?Object(h.createElement)("span",{class:"plugin-install-required"},B("Please install and activate this third-party premium plugin")):"")}))),e.state.templatePlugins&&"error"===e.state.templatePlugins&&Object(h.createElement)(V,null,Object(h.createElement)("p",{className:"desc-small install-third-party-notice"},B("*Error accessing active plugin information, you may import but first manually check that you have installed all required plugins.","kadence-starter-templates")),Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(t.plugins,(function(e){return kadenceStarterParams.plugins[e]?("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src&&(a=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src?" bundle-install-required":"")},kadenceStarterParams.plugins[e].title," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===kadenceStarterParams.plugins[e].state?B("Not Installed","kadence-starter-templates"):kadenceStarterParams.plugins[e].state)," ","active"!==kadenceStarterParams.plugins[e].state&&"thirdparty"===kadenceStarterParams.plugins[e].src?Object(h.createElement)("span",{class:"plugin-install-required"},B("Please install and activate this third-party premium Plugin")):"")):Object(h.createElement)("li",{className:"plugin-required"},e," - ",Object(h.createElement)("span",{class:"plugin-status"},B("Unknown","kadence-starter-templates")))}))))),Object(h.createElement)("p",{className:"desc-small note-about-colors"},B("*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.","kadence-starter-templates")),Object(h.createElement)(Z,{label:B("Override Your Sites Global Colors?","kadence-starter-templates"),checked:void 0!==e.state.overrideColors&&e.state.overrideColors,onChange:function(t){return e.state.overrideColors?e.setState({overrideColors:!1}):e.setState({isOpenCheckColor:!0})}}),e.state.isOpenCheckColor?Object(h.createElement)(U,{className:"ksp-confirm-modal",title:B("Override Your Sites Colors on Import?","kadence-starter-templates"),onRequestClose:function(){e.setState({isOpenCheckColor:!1})}},Object(h.createElement)("p",{className:"desc-small note-about-colors"},B("This will override the customizer settings for global colors on your current site when you import this page template.","kadence-starter-templates")),Object(h.createElement)("div",{className:"ksp-override-model-buttons"},Object(h.createElement)(X,{className:"ksp-cancel-override",onClick:function(){e.setState({isOpenCheckColor:!1,overrideColors:!1})}},B("Cancel","kadence-starter-templates")),Object(h.createElement)(X,{className:"ksp-do-override",isPrimary:!0,onClick:function(){e.setState({isOpenCheckColor:!1,overrideColors:!0})}},B("Override Colors","kadence-starter-templates")))):null,e.state.overrideColors&&e.state.colorPalette&&Object(h.createElement)(V,null,Object(h.createElement)("h3",null,B("Selected Color Palette","kadence-starter-templates")),j()(e.state.palettes,(function(t){var a=t.palette,r=t.colors;if(a===e.state.colorPalette)return Object(h.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},j()(r,(function(e,t){return Object(h.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(h.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(h.createElement)(Z,{label:B("Override Your Sites Fonts?","kadence-starter-templates"),checked:void 0!==e.state.overrideFonts&&e.state.overrideFonts,onChange:function(t){return e.state.overrideFonts?e.setState({overrideFonts:!1}):e.setState({isOpenCheckFont:!0})}}),e.state.isOpenCheckFont?Object(h.createElement)(U,{className:"ksp-confirm-modal",title:B("Override Your Sites Fonts on Import?","kadence-starter-templates"),onRequestClose:function(){e.setState({isOpenCheckFont:!1})}},Object(h.createElement)("p",{className:"desc-small note-about-colors"},B("This will override the customizer typography settings on your current site when you import this page template.","kadence-starter-templates")),Object(h.createElement)("div",{className:"ksp-override-model-buttons"},Object(h.createElement)(X,{className:"ksp-cancel-override",onClick:function(){e.setState({isOpenCheckFont:!1,overrideFonts:!1})}},B("Cancel","kadence-starter-templates")),Object(h.createElement)(X,{className:"ksp-do-override",isPrimary:!0,onClick:function(){e.setState({isOpenCheckFont:!1,overrideFonts:!0})}},B("Override Fonts","kadence-starter-templates")))):null,e.state.fontPair&&e.state.overrideFonts&&Object(h.createElement)(V,null,Object(h.createElement)("h3",{className:"kst-selected-font-pair-title"},B("Selected Font Pair","kadence-starter-templates")),j()(e.state.fonts,(function(t){var a=t.font,r=t.img,n=t.name;if(a===e.state.fontPair)return Object(h.createElement)("div",{className:"kst-selected-font-pair"},Object(h.createElement)("img",{src:r,className:"font-pairing"}),Object(h.createElement)("h4",null,n))}))),"plugins"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),e.state.isFetching&&Object(h.createElement)(K,null),!kadenceStarterParams.isKadence&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("This Template Requires the Kadence Theme","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://kadence-theme.com/"},B("Get Free Theme","kadence-starter-templates"))),kadenceStarterParams.isKadence&&Object(h.createElement)(V,null,a&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("Install Missing/Inactive Highlighted Premium plugins to Import","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://www.kadencewp.com/my-account/"},B("Pro Account","kadence-starter-templates"))),!a&&Object(h.createElement)(X,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.runPluginInstallSingle(t.slug,e.state.selectedPage,e.state.starterSettings.builderType)}},B("Start Importing Page"))))))},o=function(){var t=e.state.activeTemplates[e.state.activeTemplate],a=!1,r=!1;return Object(h.createElement)(V,null,Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages&&t.pages.home&&t.pages.home.image?t.pages.home.image:t.image,alt:t.name}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("h2",null,B("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name)))))),Object(h.createElement)(U,{className:"kst-import-modal",title:B("Import Starter Template"),onRequestClose:function(){return!e.state.isFetching&&e.setState({activeTemplate:"",activePlugins:!1,colorPalette:"",focusMode:!1,isImporting:!1,progress:""})}},e.state.hasContent&&Object(h.createElement)("div",{className:"kadence_starter_templates_notice"},e.state.hasPastContent?Object(h.createElement)(V,null,kadenceStarterParams.notice_previous):Object(h.createElement)(V,null,kadenceStarterParams.notice)),Object(h.createElement)("h3",null,B("Starter Template Plugins","kadence-starter-templates")),e.state.isLoadingPlugins&&Object(h.createElement)(K,null),!e.state.activePlugins&&!e.state.isLoadingPlugins&&Object(h.createElement)(V,null,e.loadPluginData(t.slug,e.state.starterSettings.builderType)),e.state.activePlugins&&Object(h.createElement)(V,null,e.state.templatePlugins&&"error"!==e.state.templatePlugins&&Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(e.state.templatePlugins,(function(e){var t=e.state,n=e.src,s=e.title;return"active"!==t&&"bundle"===n&&(r=!0),"active"===t||"thirdparty"!==n&&"unknown"!==n||(a=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==t&&"bundle"===n?" bundle-install-required":"")},s," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===t?B("Not Installed","kadence-starter-templates"):t)," ","active"!==t&&"thirdparty"===n?Object(h.createElement)("span",{class:"plugin-install-required"},B("Please install and activate this third-party premium plugin")):"")}))),e.state.templatePlugins&&"error"===e.state.templatePlugins&&Object(h.createElement)(V,null,Object(h.createElement)("p",{className:"desc-small install-third-party-notice"},B("*Error accessing active plugin information, you may import but first manually check that you have installed all required plugins.","kadence-starter-templates")),Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(t.plugins,(function(e){return kadenceStarterParams.plugins[e]?("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src&&(r=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src?" bundle-install-required":"")},kadenceStarterParams.plugins[e].title," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===kadenceStarterParams.plugins[e].state?B("Not Installed","kadence-starter-templates"):kadenceStarterParams.plugins[e].state)," ","active"!==kadenceStarterParams.plugins[e].state&&"thirdparty"===kadenceStarterParams.plugins[e].src?Object(h.createElement)("span",{class:"plugin-install-required"},B("Please install and activate this third-party premium Plugin")):"")):Object(h.createElement)("li",{className:"plugin-required"},e," - ",Object(h.createElement)("span",{class:"plugin-status"},B("Unknown","kadence-starter-templates")))}))))),a&&Object(h.createElement)("p",{className:"desc-small install-third-party-notice"},B("*This starter template requires premium third-party plugins. Please install missing/inactive premium plugins to import.","kadence-starter-templates")),e.state.colorPalette&&Object(h.createElement)(V,null,Object(h.createElement)("h3",null,B("Selected Color Palette","kadence-starter-templates")),j()(e.state.palettes,(function(t){var a=t.palette,r=t.colors;if(a===e.state.colorPalette)return Object(h.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},j()(r,(function(e,t){return Object(h.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(h.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),e.state.fontPair&&Object(h.createElement)(V,null,Object(h.createElement)("h3",{className:"kst-selected-font-pair-title"},B("Selected Font Pair","kadence-starter-templates")),j()(e.state.fonts,(function(t){var a=t.font,r=t.img,n=t.name;if(a===e.state.fontPair)return Object(h.createElement)("div",{className:"kst-selected-font-pair"},Object(h.createElement)("img",{src:r,className:"font-pairing"}),Object(h.createElement)("h4",null,n))}))),e.state.hasPastContent&&Object(h.createElement)(V,null,Object(h.createElement)(Z,{label:B("Delete Previously Imported Posts and Images?","kadence-starter-templates"),checked:void 0!==e.state.removePast&&e.state.removePast,onChange:function(t){return e.state.removePast?e.setState({removePast:!1}):e.setState({removePast:!0})}})),"remove"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.remove_progress),"plugins"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),"customizer"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.customizer_progress),"widgets"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.widgets_progress),e.state.isFetching&&Object(h.createElement)(K,null),!kadenceStarterParams.isKadence&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("This Starter Template Requires the Kadence Theme","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://kadence-theme.com/"},B("Get Free Theme","kadence-starter-templates"))),kadenceStarterParams.isKadence&&Object(h.createElement)(V,null,a&&Object(h.createElement)(V,null,r&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("Install Missing/Inactive Highlighted Premium plugins to Import","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://www.kadencewp.com/my-account/"},B("Pro Account","kadence-starter-templates"))),!r&&Object(h.createElement)(X,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.state.removePast?e.runRemovePast(t.slug,e.state.starterSettings.builderType):e.runPluginInstall(t.slug,e.state.starterSettings.builderType)}},B("Skip and Import with Partial Content"))),!a&&Object(h.createElement)(V,null,r&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,B("Install Missing/Inactive Highlighted Premium plugins to Import","kadence-starter-templates")),Object(h.createElement)(Q,{href:"https://www.kadencewp.com/my-account/"},B("Pro Account","kadence-starter-templates"))),!r&&Object(h.createElement)(X,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.state.removePast?e.runRemovePast(t.slug,e.state.starterSettings.builderType):e.runPluginInstall(t.slug,e.state.starterSettings.builderType)}},B("Start Importing"))))))},i=function(){var t=e.state.activeTemplates[e.state.activeTemplate];return Object(h.createElement)(V,null,Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,B("Page Templates","kadence-starter-templates"))),Object(h.createElement)("div",{className:"templates-grid"},j()(t.pages,(function(t){var a=t.title,r=t.id,n=t.thumbnail;return Object(h.createElement)("div",{className:"kst-template-item"},Object(h.createElement)(X,{key:r,className:"kst-import-btn",isSmall:!0,onClick:function(){return e.selectedMode(r)}},Object(h.createElement)(k.a,{offsetBottom:200},Object(h.createElement)("img",{src:n,alt:a})),Object(h.createElement)("div",{className:"demo-title"},Object(h.createElement)("h4",null,a," ",Object(h.createElement)("span",null,B("View Details","kadence-starter-templates"))))))}))),Object(h.createElement)("div",{className:"kst-import-selection-bottom"},Object(h.createElement)(X,{className:"kt-import-fullsite",isPrimary:!0,onClick:function(){return e.selectedFullMode()}},B("Import Full Site","kadence-starter-templates")))))},l=function(){var t=e;return Object(h.createElement)("div",{className:"templates-grid"},Object.keys(e.state.activeTemplates).map((function(e,a){var r=t.state.activeTemplates[e].name,n=t.state.activeTemplates[e].slug,s=t.state.activeTemplates[e].image,c=t.state.activeTemplates[e].categories,o=t.state.activeTemplates[e].keywords,i=t.state.activeTemplates[e].pro,l=(t.state.activeTemplates[e].member,t.state.activeTemplates[e].pages);if(("all"===t.state.category||c.includes(t.state.category))&&(!t.state.search||o&&o.some((function(e){return e.toLowerCase().includes(t.state.search.toLowerCase())}))))return Object(h.createElement)("div",{className:"kst-template-item"},Object(h.createElement)(X,{key:e,className:"kst-import-btn",isSmall:!0,onClick:function(){return"custom"===t.state.starterSettings.builderType?t.jumpToImport(n):t.fullFocusMode(n)}},Object(h.createElement)(k.a,{offsetBottom:200},Object(h.createElement)("img",{src:l&&l.home&&l.home.thumbnail?l.home.thumbnail:s,alt:r})),Object(h.createElement)("div",{className:"demo-title"},Object(h.createElement)("h4",null,r))),void 0!==i&&i&&Object(h.createElement)(V,null,Object(h.createElement)("span",{className:"kb-pro-template"},B("Pro","kadence-starter-sites"))))})))},u=function(){var t=e.state.activeTemplates[e.state.activeTemplate];return Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages[e.state.selectedPage].image,alt:t.pages[e.state.selectedPage].title}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("h2",null,B("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name),Object(h.createElement)("br",null)," ",B("Selected Page:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.pages[e.state.selectedPage].title))),Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,B("Import complete!","kadence-starter-templates")),Object(h.createElement)("div",{class:"kadence_starter_templates_finished"},Object(h.createElement)("div",{dangerouslySetInnerHTML:{__html:e.state.response}}))))))},p=function(){var t=e.state.activeTemplates[e.state.activeTemplate];return Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages&&t.pages.home&&t.pages.home.image?t.pages.home.image:t.image}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("h2",null,B("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name))),Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,B("Import complete!","kadence-starter-templates")),Object(h.createElement)("div",{class:"kadence_starter_templates_finished"},Object(h.createElement)("div",{dangerouslySetInnerHTML:{__html:e.state.response}}))))))};return Object(h.createElement)(V,null,Object(h.createElement)("div",{class:"kadence_theme_dash_head"},Object(h.createElement)("div",{class:"kadence_theme_dash_head_container"},Object(h.createElement)("div",{class:"kadence_theme_dash_logo"},Object(h.createElement)("img",{src:this.state.logo})),this.state.focusMode&&Object(h.createElement)("div",{class:"kadence_theme_dash_back"},this.state.isPageSelected?Object(h.createElement)(te,{text:B("Back to Individual Pages Grid")},Object(h.createElement)(X,{className:"kt-import-back",icon:D,onClick:function(){return!e.state.isFetching&&e.setState({colorPalette:"",finished:!1,selectedPage:"home",focusMode:!0,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:""})}})):Object(h.createElement)(te,{text:B("Back to Starter Templates Grid")},Object(h.createElement)(X,{className:"kt-import-back",icon:D,onClick:function(){return e.backToDash()}}))),this.state.finished&&Object(h.createElement)("div",{class:"kadence_theme_dash_back"},Object(h.createElement)(te,{text:B("Back to Starter Templates Grid")},Object(h.createElement)(X,{className:"kt-import-back",icon:D,onClick:function(){return e.backToDash()}}))),Object(h.createElement)("div",{class:"kadence_starter_builder_type"},this.state.starterSettings&&this.state.starterSettings.builderType&&Object(h.createElement)(J,{className:"my-container-class-name",contentClassName:"kst-type-popover",position:"bottom left",renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(h.createElement)(X,{onClick:a,"aria-expanded":t,icon:s},n,Object(h.createElement)(Y,{className:"kst-chev",icon:L}))},renderContent:function(t){t.isOpen;var a=t.onToggle;return Object(h.createElement)("div",null,Object(h.createElement)(ee,{icon:ne,className:"blocks"===e.state.starterSettings.builderType?"active-item":"",isSelected:"blocks"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","blocks"),e.setState({activeTemplate:"",activePlugins:!1,colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:"",activeTemplates:!1}),a()}},B("Gutenberg","kadence-starter-templates")),Object(h.createElement)(ee,{icon:re,className:"elementor"===e.state.starterSettings.builderType?"active-item":"",isSelected:"elementor"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","elementor"),e.setState({activeTemplate:"",activePlugins:!1,colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:"",activeTemplates:!1}),a()}},B("Elementor","kadence-starter-templates")),kadenceStarterParams.ctemplates&&Object(h.createElement)(ee,{icon:kadenceStarterParams.custom_icon?Object(h.createElement)("img",{className:"custom-image-icon-src",src:kadenceStarterParams.custom_icon}):ae,className:"custom"===e.state.starterSettings.builderType?"active-item":"",isSelected:"custom"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","custom"),e.setState({activeTemplate:"",activePlugins:!1,colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:"",activeTemplates:!1}),a()}},kadenceStarterParams.custom_name?kadenceStarterParams.custom_name:B("Pro Designs","kadence-starter-templates")))}})),!1!==this.state.activeTemplates&&this.state.starterSettings.builderType&&Object(h.createElement)("div",{class:"kadence_theme_dash_reload"},Object(h.createElement)(te,{text:B("Sync with Cloud")},Object(h.createElement)(X,{className:"kt-reload-templates",icon:I,onClick:function(){return e.reloadTemplateData()}}))))),Object(h.createElement)("div",{class:"kadence_theme_starter_dash_inner"},this.state.starterSettings&&this.state.starterSettings.builderType?Object(h.createElement)((function(){return Object(h.createElement)(V,null,e.state.isSaving||!1===e.state.activeTemplates||e.state.errorTemplates?Object(h.createElement)("div",{className:"main-panel"},Object(h.createElement)("div",{className:"kst-overlay-saving"},!e.state.errorTemplates&&Object(h.createElement)(K,null),e.state.errorTemplates&&Object(h.createElement)(V,null,Object(h.createElement)("h2",{style:{textAlign:"center"}},B("Error, Unable to access template database, please try re-downloading","kadence-starter-templates")),Object(h.createElement)("div",{style:{textAlign:"center"}},Object(h.createElement)(X,{className:"kt-reload-templates",icon:I,onClick:function(){return e.reloadTemplateData()}},B(" Sync with Cloud","kadence-starter-templates")))),!1===e.state.activeTemplates&&Object(h.createElement)(V,null,e.loadTemplateData()))):Object(h.createElement)("div",{className:"main-panel"},e.state.focusMode&&Object(h.createElement)(V,null,e.state.isImporting&&Object(h.createElement)(V,null,e.state.isPageSelected?Object(h.createElement)(c,null):Object(h.createElement)(o,null)),!e.state.isImporting&&e.state.isSelected&&Object(h.createElement)(M,{item:e.state.activeTemplates[e.state.activeTemplate],colorPalette:e.state.colorPalette,fontPair:e.state.fontPair,onChange:function(t){e.setState(t)}}),!e.state.isImporting&&!e.state.isSelected&&Object(h.createElement)(i,null)),!e.state.focusMode&&!e.state.finished&&Object(h.createElement)(l,null),e.state.finished&&Object(h.createElement)(V,null,e.state.isPageSelected?Object(h.createElement)(u,null):Object(h.createElement)(p,null))))}),null):Object(h.createElement)((function(){return Object(h.createElement)("div",{className:"kst-choose-builder-wrap".concat(kadenceStarterParams.ctemplates?" adjust-to-three-column":"")},Object(h.createElement)("div",{className:"kst-choose-builder-center"},Object(h.createElement)("h2",{className:"kst-choose-builder-title"},B("Choose a Builder","kadence-starter-templates")),Object(h.createElement)("div",{className:"kst-choose-builder-inner"},kadenceStarterParams.ctemplates&&Object(h.createElement)(X,{icon:kadenceStarterParams.custom_icon?Object(h.createElement)("img",{className:"custom-image-icon-src",src:kadenceStarterParams.custom_icon}):ae,className:"kt-import-select-type",onClick:function(){e.saveConfig("builderType","custom")}},kadenceStarterParams.custom_name?kadenceStarterParams.custom_name:B("Pro Designs","kadence-starter-templates")),Object(h.createElement)(X,{icon:ne,className:"kt-import-select-type",onClick:function(){e.saveConfig("builderType","blocks")}},B("Gutenberg","kadence-starter-templates")),Object(h.createElement)(X,{icon:re,className:"kt-import-select-type",onClick:function(){e.saveConfig("builderType","elementor")}},B("Elementor","kadence-starter-templates"))),e.state.isSaving&&Object(h.createElement)("div",{className:"kst-overlay-saving"},Object(h.createElement)(K,null))))}),null)))}}]),a}(W);wp.domReady((function(){G(Object(h.createElement)(se,null),document.querySelector(".kadence_starter_dashboard_main"))}))}]);
|
1 |
+
!function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=146)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,a){var r=a(31),n=a(50),s=a(129),c=a(4);e.exports=function(e,t){return(c(e)?r:s)(e,n(t,3))}},function(e,t,a){var r=a(35),n="object"==typeof self&&self&&self.Object===Object&&self,s=r||n||Function("return this")();e.exports=s},function(e,t){var a=Array.isArray;e.exports=a},function(e,t){function a(t){return e.exports=a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(t)}e.exports=a},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,a){var r=a(63),n=a(68);e.exports=function(e,t){var a=n(e,t);return r(a)?a:void 0}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function a(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}},function(e,t,a){var r=a(49);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("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,a){var r=a(20),n=a(1);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?n(e):t}},function(e,t,a){var r=a(16),n=a(64),s=a(65),c=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?n(e):s(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,a){var r=a(53),n=a(54),s=a(55),c=a(56),o=a(57);function i(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=n,i.prototype.get=s,i.prototype.has=c,i.prototype.set=o,e.exports=i},function(e,t,a){var r=a(33);e.exports=function(e,t){for(var a=e.length;a--;)if(r(e[a][0],t))return a;return-1}},function(e,t,a){var r=a(3).Symbol;e.exports=r},function(e,t,a){var r=a(7)(Object,"create");e.exports=r},function(e,t,a){var r=a(77);e.exports=function(e,t){var a=e.__data__;return r(t)?a["string"==typeof t?"string":"hash"]:a.map}},function(e,t,a){var r=a(30);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t){function a(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=a=function(e){return typeof e}:e.exports=a=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(t)}e.exports=a},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),n=a(135),s=d(n),c=d(a(136)),o=a(139),i=a(140),l=d(a(141)),u=d(a(142)),p=d(a(143)),m=d(a(144));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.lazyLoadHandler=a.lazyLoadHandler.bind(a),e.throttle>0&&(e.debounce?a.lazyLoadHandler=(0,l.default)(a.lazyLoadHandler,e.throttle):a.lazyLoadHandler=(0,u.default)(a.lazyLoadHandler,e.throttle)),a.state={visible:!1},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);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)}(t,e),r(t,[{key:"componentDidMount",value:function(){this._mounted=!0;var e=this.getEventNode();this.lazyLoadHandler(),this.lazyLoadHandler.flush&&this.lazyLoadHandler.flush(),(0,i.add)(window,"resize",this.lazyLoadHandler),(0,i.add)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,i.add)(window,"scroll",this.lazyLoadHandler)}},{key:"componentWillReceiveProps",value:function(){this.state.visible||this.lazyLoadHandler()}},{key:"shouldComponentUpdate",value:function(e,t){return t.visible}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this.lazyLoadHandler.cancel&&this.lazyLoadHandler.cancel(),this.detachListeners()}},{key:"getEventNode",value:function(){return(0,p.default)((0,o.findDOMNode)(this))}},{key:"getOffset",value:function(){var e=this.props,t=e.offset,a=e.offsetVertical,r=e.offsetHorizontal,n=e.offsetTop,s=e.offsetBottom,c=e.offsetLeft,o=e.offsetRight,i=e.threshold||t,l=a||i,u=r||i;return{top:n||l,bottom:s||l,left:c||u,right:o||u}}},{key:"lazyLoadHandler",value:function(){if(this._mounted){var e=this.getOffset(),t=(0,o.findDOMNode)(this),a=this.getEventNode();if((0,m.default)(t,a,e)){var r=this.props.onContentVisible;this.setState({visible:!0},(function(){r&&r()})),this.detachListeners()}}}},{key:"detachListeners",value:function(){var e=this.getEventNode();(0,i.remove)(window,"resize",this.lazyLoadHandler),(0,i.remove)(e,"scroll",this.lazyLoadHandler),e!==window&&(0,i.remove)(window,"scroll",this.lazyLoadHandler)}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.className,r=e.height,c=e.width,o=this.state.visible,i={height:r,width:c},l="LazyLoad"+(o?" is-visible":"")+(a?" "+a:"");return s.default.createElement(this.props.elementType,{className:l,style:i},o&&n.Children.only(t))}}]),t}(n.Component);t.default=f,f.propTypes={children:c.default.node.isRequired,className:c.default.string,debounce:c.default.bool,elementType:c.default.string,height:c.default.oneOfType([c.default.string,c.default.number]),offset:c.default.number,offsetBottom:c.default.number,offsetHorizontal:c.default.number,offsetLeft:c.default.number,offsetRight:c.default.number,offsetTop:c.default.number,offsetVertical:c.default.number,threshold:c.default.number,throttle:c.default.number,width:c.default.oneOfType([c.default.string,c.default.number]),onContentVisible:c.default.func},f.defaultProps={elementType:"div",debounce:!0,offset:0,offsetBottom:0,offsetHorizontal:0,offsetLeft:0,offsetRight:0,offsetTop:0,offsetVertical:0,throttle:250}},function(e,t,a){var r=a(7)(a(3),"Map");e.exports=r},function(e,t){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch(e){"object"==typeof window&&(a=window)}e.exports=a},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,a){var r=a(69),n=a(76),s=a(78),c=a(79),o=a(80);function i(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=n,i.prototype.get=s,i.prototype.has=c,i.prototype.set=o,e.exports=i},function(e,t,a){var r=a(98),n=a(105),s=a(28);e.exports=function(e){return s(e)?r(e):n(e)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,a){var r=a(34),n=a(27);e.exports=function(e){return null!=e&&n(e.length)&&!r(e)}},function(e,t,a){var r=a(4),n=a(30),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var a=typeof e;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=e&&!n(e))||(c.test(e)||!s.test(e)||null!=t&&e in Object(t))}},function(e,t,a){var r=a(12),n=a(13);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e,t){for(var a=-1,r=null==e?0:e.length,n=Array(r);++a<r;)n[a]=t(e[a],a,e);return n}},function(e,t,a){var r=a(14),n=a(58),s=a(59),c=a(60),o=a(61),i=a(62);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=n,l.prototype.delete=s,l.prototype.get=c,l.prototype.has=o,l.prototype.set=i,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,a){var r=a(12),n=a(24);e.exports=function(e){if(!n(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,a){(function(t){var a="object"==typeof t&&t&&t.Object===Object&&t;e.exports=a}).call(this,a(23))},function(e,t){var a=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return a.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,a){var r=a(81),n=a(13);e.exports=function e(t,a,s,c,o){return t===a||(null==t||null==a||!n(t)&&!n(a)?t!=t&&a!=a:r(t,a,s,c,e,o))}},function(e,t,a){var r=a(82),n=a(85),s=a(86);e.exports=function(e,t,a,c,o,i){var l=1&a,u=e.length,p=t.length;if(u!=p&&!(l&&p>u))return!1;var m=i.get(e);if(m&&i.get(t))return m==t;var d=-1,f=!0,b=2&a?new r:void 0;for(i.set(e,t),i.set(t,e);++d<u;){var v=e[d],h=t[d];if(c)var g=l?c(h,v,d,t,e,i):c(v,h,d,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(b){if(!n(t,(function(e,t){if(!s(b,t)&&(v===e||o(v,e,a,c,i)))return b.push(t)}))){f=!1;break}}else if(v!==h&&!o(v,h,a,c,i)){f=!1;break}}return i.delete(e),i.delete(t),f}},function(e,t,a){var r=a(100),n=a(13),s=Object.prototype,c=s.hasOwnProperty,o=s.propertyIsEnumerable,i=r(function(){return arguments}())?r:function(e){return n(e)&&c.call(e,"callee")&&!o.call(e,"callee")};e.exports=i},function(e,t,a){(function(e){var r=a(3),n=a(101),s=t&&!t.nodeType&&t,c=s&&"object"==typeof e&&e&&!e.nodeType&&e,o=c&&c.exports===s?r.Buffer:void 0,i=(o?o.isBuffer:void 0)||n;e.exports=i}).call(this,a(41)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var a=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&a.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,a){var r=a(102),n=a(103),s=a(104),c=s&&s.isTypedArray,o=c?n(c):r;e.exports=o},function(e,t,a){var r=a(24);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(a){return null!=a&&(a[e]===t&&(void 0!==t||e in Object(a)))}}},function(e,t,a){var r=a(47),n=a(19);e.exports=function(e,t){for(var a=0,s=(t=r(t,e)).length;null!=e&&a<s;)e=e[n(t[a++])];return a&&a==s?e:void 0}},function(e,t,a){var r=a(4),n=a(29),s=a(117),c=a(120);e.exports=function(e,t){return r(e)?e:n(e,t)?[e]:s(c(e))}},,function(e,t){function a(t,r){return e.exports=a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(t,r)}e.exports=a},function(e,t,a){var r=a(51),n=a(115),s=a(125),c=a(4),o=a(126);e.exports=function(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?c(e)?n(e[0],e[1]):r(e):o(e)}},function(e,t,a){var r=a(52),n=a(114),s=a(45);e.exports=function(e){var t=n(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(a){return a===e||r(a,e,t)}}},function(e,t,a){var r=a(32),n=a(37);e.exports=function(e,t,a,s){var c=a.length,o=c,i=!s;if(null==e)return!o;for(e=Object(e);c--;){var l=a[c];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++c<o;){var u=(l=a[c])[0],p=e[u],m=l[1];if(i&&l[2]){if(void 0===p&&!(u in e))return!1}else{var d=new r;if(s)var f=s(p,m,u,e,t,d);if(!(void 0===f?n(m,p,3,s,d):f))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,a){var r=a(15),n=Array.prototype.splice;e.exports=function(e){var t=this.__data__,a=r(t,e);return!(a<0)&&(a==t.length-1?t.pop():n.call(t,a,1),--this.size,!0)}},function(e,t,a){var r=a(15);e.exports=function(e){var t=this.__data__,a=r(t,e);return a<0?void 0:t[a][1]}},function(e,t,a){var r=a(15);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,a){var r=a(15);e.exports=function(e,t){var a=this.__data__,n=r(a,e);return n<0?(++this.size,a.push([e,t])):a[n][1]=t,this}},function(e,t,a){var r=a(14);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,a){var r=a(14),n=a(22),s=a(25);e.exports=function(e,t){var a=this.__data__;if(a instanceof r){var c=a.__data__;if(!n||c.length<199)return c.push([e,t]),this.size=++a.size,this;a=this.__data__=new s(c)}return a.set(e,t),this.size=a.size,this}},function(e,t,a){var r=a(34),n=a(66),s=a(24),c=a(36),o=/^\[object .+?Constructor\]$/,i=Function.prototype,l=Object.prototype,u=i.toString,p=l.hasOwnProperty,m=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||n(e))&&(r(e)?m:o).test(c(e))}},function(e,t,a){var r=a(16),n=Object.prototype,s=n.hasOwnProperty,c=n.toString,o=r?r.toStringTag:void 0;e.exports=function(e){var t=s.call(e,o),a=e[o];try{e[o]=void 0;var r=!0}catch(e){}var n=c.call(e);return r&&(t?e[o]=a:delete e[o]),n}},function(e,t){var a=Object.prototype.toString;e.exports=function(e){return a.call(e)}},function(e,t,a){var r,n=a(67),s=(r=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!s&&s in e}},function(e,t,a){var r=a(3)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,a){var r=a(70),n=a(14),s=a(22);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||n),string:new r}}},function(e,t,a){var r=a(71),n=a(72),s=a(73),c=a(74),o=a(75);function i(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var r=e[t];this.set(r[0],r[1])}}i.prototype.clear=r,i.prototype.delete=n,i.prototype.get=s,i.prototype.has=c,i.prototype.set=o,e.exports=i},function(e,t,a){var r=a(17);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,a){var r=a(17),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var a=t[e];return"__lodash_hash_undefined__"===a?void 0:a}return n.call(t,e)?t[e]:void 0}},function(e,t,a){var r=a(17),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:n.call(t,e)}},function(e,t,a){var r=a(17);e.exports=function(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,a){var r=a(18);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,a){var r=a(18);e.exports=function(e){return r(this,e).get(e)}},function(e,t,a){var r=a(18);e.exports=function(e){return r(this,e).has(e)}},function(e,t,a){var r=a(18);e.exports=function(e,t){var a=r(this,e),n=a.size;return a.set(e,t),this.size+=a.size==n?0:1,this}},function(e,t,a){var r=a(32),n=a(38),s=a(87),c=a(91),o=a(109),i=a(4),l=a(40),u=a(43),p="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,d,f,b){var v=i(e),h=i(t),g=v?"[object Array]":o(e),j=h?"[object Array]":o(t),k=(g="[object Arguments]"==g?p:g)==p,y=(j="[object Arguments]"==j?p:j)==p,O=g==j;if(O&&l(e)){if(!l(t))return!1;v=!0,k=!1}if(O&&!k)return b||(b=new r),v||u(e)?n(e,t,a,d,f,b):s(e,t,g,a,d,f,b);if(!(1&a)){var P=k&&m.call(e,"__wrapped__"),S=y&&m.call(t,"__wrapped__");if(P||S){var E=P?e.value():e,_=S?t.value():t;return b||(b=new r),f(E,_,a,d,b)}}return!!O&&(b||(b=new r),c(e,t,a,d,f,b))}},function(e,t,a){var r=a(25),n=a(83),s=a(84);function c(e){var t=-1,a=null==e?0:e.length;for(this.__data__=new r;++t<a;)this.add(e[t])}c.prototype.add=c.prototype.push=n,c.prototype.has=s,e.exports=c},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var a=-1,r=null==e?0:e.length;++a<r;)if(t(e[a],a,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,a){var r=a(16),n=a(88),s=a(33),c=a(38),o=a(89),i=a(90),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,a,r,l,p,m){switch(a){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!p(new n(e),new n(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=o;case"[object Set]":var f=1&r;if(d||(d=i),e.size!=t.size&&!f)return!1;var b=m.get(e);if(b)return b==t;r|=2,m.set(e,t);var v=c(d(e),d(t),r,l,p,m);return m.delete(e),v;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t,a){var r=a(3).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,a=Array(e.size);return e.forEach((function(e,r){a[++t]=[r,e]})),a}},function(e,t){e.exports=function(e){var t=-1,a=Array(e.size);return e.forEach((function(e){a[++t]=e})),a}},function(e,t,a){var r=a(92),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,s,c,o){var i=1&a,l=r(e),u=l.length;if(u!=r(t).length&&!i)return!1;for(var p=u;p--;){var m=l[p];if(!(i?m in t:n.call(t,m)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var f=!0;o.set(e,t),o.set(t,e);for(var b=i;++p<u;){var v=e[m=l[p]],h=t[m];if(s)var g=i?s(h,v,m,t,e,o):s(v,h,m,e,t,o);if(!(void 0===g?v===h||c(v,h,a,s,o):g)){f=!1;break}b||(b="constructor"==m)}if(f&&!b){var j=e.constructor,k=t.constructor;j==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof j&&j instanceof j&&"function"==typeof k&&k instanceof k||(f=!1)}return o.delete(e),o.delete(t),f}},function(e,t,a){var r=a(93),n=a(95),s=a(26);e.exports=function(e){return r(e,s,n)}},function(e,t,a){var r=a(94),n=a(4);e.exports=function(e,t,a){var s=t(e);return n(e)?s:r(s,a(e))}},function(e,t){e.exports=function(e,t){for(var a=-1,r=t.length,n=e.length;++a<r;)e[n+a]=t[a];return e}},function(e,t,a){var r=a(96),n=a(97),s=Object.prototype.propertyIsEnumerable,c=Object.getOwnPropertySymbols,o=c?function(e){return null==e?[]:(e=Object(e),r(c(e),(function(t){return s.call(e,t)})))}:n;e.exports=o},function(e,t){e.exports=function(e,t){for(var a=-1,r=null==e?0:e.length,n=0,s=[];++a<r;){var c=e[a];t(c,a,e)&&(s[n++]=c)}return s}},function(e,t){e.exports=function(){return[]}},function(e,t,a){var r=a(99),n=a(39),s=a(4),c=a(40),o=a(42),i=a(43),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var a=s(e),u=!a&&n(e),p=!a&&!u&&c(e),m=!a&&!u&&!p&&i(e),d=a||u||p||m,f=d?r(e.length,String):[],b=f.length;for(var v in e)!t&&!l.call(e,v)||d&&("length"==v||p&&("offset"==v||"parent"==v)||m&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||o(v,b))||f.push(v);return f}},function(e,t){e.exports=function(e,t){for(var a=-1,r=Array(e);++a<e;)r[a]=t(a);return r}},function(e,t,a){var r=a(12),n=a(13);e.exports=function(e){return n(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,a){var r=a(12),n=a(27),s=a(13),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1,e.exports=function(e){return s(e)&&n(e.length)&&!!c[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,a){(function(e){var r=a(35),n=t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,c=s&&s.exports===n&&r.process,o=function(){try{var e=s&&s.require&&s.require("util").types;return e||c&&c.binding&&c.binding("util")}catch(e){}}();e.exports=o}).call(this,a(41)(e))},function(e,t,a){var r=a(106),n=a(107),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return n(e);var t=[];for(var a in Object(e))s.call(e,a)&&"constructor"!=a&&t.push(a);return t}},function(e,t){var a=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||a)}},function(e,t,a){var r=a(108)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(a){return e(t(a))}}},function(e,t,a){var r=a(110),n=a(22),s=a(111),c=a(112),o=a(113),i=a(12),l=a(36),u=l(r),p=l(n),m=l(s),d=l(c),f=l(o),b=i;(r&&"[object DataView]"!=b(new r(new ArrayBuffer(1)))||n&&"[object Map]"!=b(new n)||s&&"[object Promise]"!=b(s.resolve())||c&&"[object Set]"!=b(new c)||o&&"[object WeakMap]"!=b(new o))&&(b=function(e){var t=i(e),a="[object Object]"==t?e.constructor:void 0,r=a?l(a):"";if(r)switch(r){case u:return"[object DataView]";case p:return"[object Map]";case m:return"[object Promise]";case d:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=b},function(e,t,a){var r=a(7)(a(3),"DataView");e.exports=r},function(e,t,a){var r=a(7)(a(3),"Promise");e.exports=r},function(e,t,a){var r=a(7)(a(3),"Set");e.exports=r},function(e,t,a){var r=a(7)(a(3),"WeakMap");e.exports=r},function(e,t,a){var r=a(44),n=a(26);e.exports=function(e){for(var t=n(e),a=t.length;a--;){var s=t[a],c=e[s];t[a]=[s,c,r(c)]}return t}},function(e,t,a){var r=a(37),n=a(116),s=a(122),c=a(29),o=a(44),i=a(45),l=a(19);e.exports=function(e,t){return c(e)&&o(t)?i(l(e),t):function(a){var c=n(a,e);return void 0===c&&c===t?s(a,e):r(t,c,3)}}},function(e,t,a){var r=a(46);e.exports=function(e,t,a){var n=null==e?void 0:r(e,t);return void 0===n?a:n}},function(e,t,a){var r=a(118),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,c=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(n,(function(e,a,r,n){t.push(r?n.replace(s,"$1"):a||e)})),t}));e.exports=c},function(e,t,a){var r=a(119);e.exports=function(e){var t=r(e,(function(e){return 500===a.size&&a.clear(),e})),a=t.cache;return t}},function(e,t,a){var r=a(25);function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var a=function(){var r=arguments,n=t?t.apply(this,r):r[0],s=a.cache;if(s.has(n))return s.get(n);var c=e.apply(this,r);return a.cache=s.set(n,c)||s,c};return a.cache=new(n.Cache||r),a}n.Cache=r,e.exports=n},function(e,t,a){var r=a(121);e.exports=function(e){return null==e?"":r(e)}},function(e,t,a){var r=a(16),n=a(31),s=a(4),c=a(30),o=r?r.prototype:void 0,i=o?o.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return n(t,e)+"";if(c(t))return i?i.call(t):"";var a=t+"";return"0"==a&&1/t==-1/0?"-0":a}},function(e,t,a){var r=a(123),n=a(124);e.exports=function(e,t){return null!=e&&n(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,a){var r=a(47),n=a(39),s=a(4),c=a(42),o=a(27),i=a(19);e.exports=function(e,t,a){for(var l=-1,u=(t=r(t,e)).length,p=!1;++l<u;){var m=i(t[l]);if(!(p=null!=e&&a(e,m)))break;e=e[m]}return p||++l!=u?p:!!(u=null==e?0:e.length)&&o(u)&&c(m,u)&&(s(e)||n(e))}},function(e,t){e.exports=function(e){return e}},function(e,t,a){var r=a(127),n=a(128),s=a(29),c=a(19);e.exports=function(e){return s(e)?r(c(e)):n(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,a){var r=a(46);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,a){var r=a(130),n=a(28);e.exports=function(e,t){var a=-1,s=n(e)?Array(e.length):[];return r(e,(function(e,r,n){s[++a]=t(e,r,n)})),s}},function(e,t,a){var r=a(131),n=a(134)(r);e.exports=n},function(e,t,a){var r=a(132),n=a(26);e.exports=function(e,t){return e&&r(e,t,n)}},function(e,t,a){var r=a(133)();e.exports=r},function(e,t){e.exports=function(e){return function(t,a,r){for(var n=-1,s=Object(t),c=r(t),o=c.length;o--;){var i=c[e?o:++n];if(!1===a(s[i],i,s))break}return t}}},function(e,t,a){var r=a(28);e.exports=function(e,t){return function(a,n){if(null==a)return a;if(!r(a))return e(a,n);for(var s=a.length,c=t?s:-1,o=Object(a);(t?c--:++c<s)&&!1!==n(o[c],c,o););return a}}},function(e,t){!function(){e.exports=this.React}()},function(e,t,a){e.exports=a(137)()},function(e,t,a){"use strict";var r=a(138);function n(){}function s(){}s.resetWarningCache=n,e.exports=function(){function e(e,t,a,n,s,c){if(c!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var a={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:n};return a.PropTypes=a,a}},function(e,t,a){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,a){var r,n;void 0===(n="function"==typeof(r=function(){function e(e,t){return function(a,r,n,s){a[e]?a[e](r,n,s):a[t]&&a[t]("on"+r,n)}}return{add:e("addEventListener","attachEvent"),remove:e("removeEventListener","detachEvent")}})?r.call(t,a,t,e):r)||(e.exports=n)},function(e,t,a){(function(t){var a=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),u=Object.prototype.toString,p=Math.max,m=Math.min,d=function(){return l.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(f(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=f(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var o=n.test(e);return o||s.test(e)?c(e.slice(2),o?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,a){var r,n,s,c,o,i,l=0,u=!1,v=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var a=r,s=n;return r=n=void 0,l=t,c=e.apply(s,a)}function j(e){return l=e,o=setTimeout(y,t),u?g(e):c}function k(e){var a=e-i;return void 0===i||a>=t||a<0||v&&e-l>=s}function y(){var e=d();if(k(e))return O(e);o=setTimeout(y,function(e){var a=t-(e-i);return v?m(a,s-(e-l)):a}(e))}function O(e){return o=void 0,h&&r?g(e):(r=n=void 0,c)}function P(){var e=d(),a=k(e);if(r=arguments,n=this,i=e,a){if(void 0===o)return j(i);if(v)return o=setTimeout(y,t),g(i)}return void 0===o&&(o=setTimeout(y,t)),c}return t=b(t)||0,f(a)&&(u=!!a.leading,s=(v="maxWait"in a)?p(b(a.maxWait)||0,t):s,h="trailing"in a?!!a.trailing:h),P.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=i=n=o=void 0},P.flush=function(){return void 0===o?c:O(d())},P}}).call(this,a(23))},function(e,t,a){(function(t){var a=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,o="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),u=Object.prototype.toString,p=Math.max,m=Math.min,d=function(){return l.Date.now()};function f(e,t,a){var r,n,s,c,o,i,l=0,u=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var a=r,s=n;return r=n=void 0,l=t,c=e.apply(s,a)}function j(e){return l=e,o=setTimeout(y,t),u?g(e):c}function k(e){var a=e-i;return void 0===i||a>=t||a<0||f&&e-l>=s}function y(){var e=d();if(k(e))return O(e);o=setTimeout(y,function(e){var a=t-(e-i);return f?m(a,s-(e-l)):a}(e))}function O(e){return o=void 0,h&&r?g(e):(r=n=void 0,c)}function P(){var e=d(),a=k(e);if(r=arguments,n=this,i=e,a){if(void 0===o)return j(i);if(f)return o=setTimeout(y,t),g(i)}return void 0===o&&(o=setTimeout(y,t)),c}return t=v(t)||0,b(a)&&(u=!!a.leading,s=(f="maxWait"in a)?p(v(a.maxWait)||0,t):s,h="trailing"in a?!!a.trailing:h),P.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=i=n=o=void 0},P.flush=function(){return void 0===o?c:O(d())},P}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var o=n.test(e);return o||s.test(e)?c(e.slice(2),o?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,a){var r=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return b(a)&&(r="leading"in a?!!a.leading:r,n="trailing"in a?!!a.trailing:n),f(e,t,{leading:r,maxWait:t,trailing:n})}}).call(this,a(23))},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},n=function(e){return r(e,"overflow")+r(e,"overflow-y")+r(e,"overflow-x")};t.default=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(n(t)))return t;t=t.parentNode}return window}},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,a,r){if(function(e){return null===e.offsetParent}(t))return!1;var n=void 0,c=void 0,o=void 0,i=void 0;if(void 0===a||a===window)n=window.pageYOffset,o=window.pageXOffset,c=n+window.innerHeight,i=o+window.innerWidth;else{if(!e(a,window,r))return!1;var l=(0,s.default)(a);n=l.top,o=l.left,c=n+a.offsetHeight,i=o+a.offsetWidth}var u=(0,s.default)(t);return n<=u.top+t.offsetHeight+r.top&&c>=u.top-r.bottom&&o<=u.left+t.offsetWidth+r.left&&i>=u.left-r.right};var r,n=a(145),s=(r=n)&&r.__esModule?r:{default:r}},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}},function(e,t,a){"use strict";a.r(t);var r=a(8),n=a.n(r),s=a(9),c=a.n(s),o=a(1),i=a.n(o),l=a(10),u=a.n(l),p=a(11),m=a.n(p),d=a(5),f=a.n(d),b=a(20),v=a.n(b),h=a(0),g=a(2),j=a.n(g),k=a(21),y=a.n(k);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=f()(e);if(t){var n=f()(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return m()(this,a)}}var P=wp.i18n,S=P.__,E=(P.sprintf,wp.element),_=E.Fragment,w=E.Component,x=(E.render,E.PureComponent,wp.components),T=(x.Modal,x.Spinner,x.ButtonGroup),N=(x.Dropdown,x.Button),C=x.ExternalLink,z=(x.ToolbarGroup,x.MenuItem,x.Tooltip),M=function(e){u()(a,e);var t=O(a);function a(){var e;return n()(this,a),(e=t.apply(this,arguments)).state={colorPalette:e.props.colorPalette?e.props.colorPalette:"",fontPair:e.props.fontPair?e.props.fontPair:"",palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[],fonts:kadenceStarterParams.fonts?kadenceStarterParams.fonts:[]},e}return c()(a,[{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"render",value:function(){var e=this,t=this.props.item,a=!0,r=!1,n=!1;return Object(h.createElement)("div",{className:"kadence-starter-templates-preview theme-install-overlay wp-full-overlay expanded",style:{display:"block"}},Object(h.createElement)("div",{className:"wp-full-overlay-sidebar"},Object(h.createElement)("div",{className:"wp-full-overlay-header"},Object(h.createElement)("button",{className:"kst-close-focus-btn close-full-overlay",onClick:function(){return e.props.onChange({activeTemplate:"",colorPalette:"",fontPair:"",focusMode:!1})}})),Object(h.createElement)("div",{className:"wp-full-overlay-sidebar-content"},Object(h.createElement)("div",{className:"install-theme-info"},Object(h.createElement)("div",{className:"theme-info-wrap"},Object(h.createElement)("img",{className:"theme-screenshot",src:t.image,alt:t.name}),Object(h.createElement)("div",{className:"theme-info-title-wrap"},Object(h.createElement)("h3",{className:"theme-name"},t.name),Object(h.createElement)("div",{className:"theme-by"},t.categories.map((function(t){return e.capitalizeFirstLetter(t)})).join(", ")))),Object(h.createElement)("div",{className:"palette-title-wrap"},Object(h.createElement)("h2",{className:"palette-title"},S("Optional: Change Color Scheme","kadence-starter-templates")),Object(h.createElement)(N,{label:S("clear"),className:"kst-clear-palette",disabled:!this.state.colorPalette,icon:"image-rotate",iconSize:10,onClick:function(){e.setState({colorPalette:""}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({color:""},"*")}})),Object(h.createElement)(T,{className:"kst-palette-group","aria-label":S("Select a Palette","kadence-starter-templates")},j()(this.state.palettes,(function(t){var a=t.palette,r=t.colors;return Object(h.createElement)(N,{className:"kst-palette-btn",isPrimary:a===e.state.colorPalette,"aria-pressed":a===e.state.colorPalette,onClick:function(){document.getElementById("kadence-starter-preview").contentWindow.postMessage({color:a},"*"),e.setState({colorPalette:a})}},Object(h.createElement)("span",{className:"kst-palette-bg",style:{background:r[4]?r[4]:void 0}}),j()(r,(function(e,t){if(4!==t)return Object(h.createElement)("div",{key:t,style:{width:30,height:30,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(h.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(h.createElement)("p",{className:"desc-small"},S("*You can change this after import.","kadence-starter-templates")),Object(h.createElement)("div",{className:"font-title-wrap"},Object(h.createElement)("h2",{className:"font-title"},S("Optional: Change Font Family","kadence-starter-templates")),Object(h.createElement)(N,{label:S("clear"),className:"kst-clear-font",disabled:!this.state.fontPair,icon:"image-rotate",iconSize:10,onClick:function(){e.setState({fontPair:""}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({font:""},"*")}})),Object(h.createElement)(T,{className:"kst-font-group","aria-label":S("Select a Font","kadence-starter-templates")},j()(this.state.fonts,(function(t){var a=t.font,r=t.img,n=t.name;return Object(h.createElement)(z,{text:n},Object(h.createElement)(N,{className:"kst-font-btn".concat(a===e.state.fontPair?" active":""),"aria-pressed":a===e.state.fontPair,onClick:function(){e.setState({fontPair:a}),document.getElementById("kadence-starter-preview").contentWindow.postMessage({font:a},"*")}},Object(h.createElement)("img",{src:r,className:"font-pairing"})))}))),Object(h.createElement)("p",{className:"desc-small"},S("*You can change this after import.","kadence-starter-templates"))),Object(h.createElement)("div",{className:"kadence-starter-required-plugins"},Object(h.createElement)("h2",{className:"kst-required-title"},S("Required Plugins","kadence-starter-templates")),Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(t.plugins,(function(e){if(kadenceStarterParams.plugins[e])return"active"!==kadenceStarterParams.plugins[e].state&&(a=!1,"thirdparty"===kadenceStarterParams.plugins[e].src&&(r=!0),"bundle"===kadenceStarterParams.plugins[e].src&&(n=!0)),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src?" bundle-install-required":"")},kadenceStarterParams.plugins[e].title," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===kadenceStarterParams.plugins[e].state?S("Not Installed","kadence-starter-templates"):kadenceStarterParams.plugins[e].state))}))),!a&&Object(h.createElement)(_,null,(r||n)&&Object(h.createElement)("p",{className:"desc-small"},S("*Install Missing/Inactive Premium plugins to import.","kadence-starter-templates")),!r&&!n&&Object(h.createElement)("p",{className:"desc-small"},S("*Missing/Inactive plugins will be installed on import.","kadence-starter-templates"))),void 0!==t.pro&&t.pro&&!t.member&&Object(h.createElement)("div",{className:"notice inline notice-alt notice-warning kadence-pro-notice"},Object(h.createElement)("p",null,Object(h.createElement)("strong",null,"Kadence Pro Starter Site")),Object(h.createElement)("p",null,"To import this starter template you need to install Kadence Pro and Kadence Blocks Pro and activate your license using a ",Object(h.createElement)("strong",null,"Essential or Full Bundle license"),".")))),Object(h.createElement)("div",{class:"wp-full-overlay-footer"},void 0!==t.pro&&t.pro&&!t.member?Object(h.createElement)("div",{className:"kt-upgrade-notice"},Object(h.createElement)("h2",{className:"kst-import-options-title"},S("Kadence Bundle is required","kadence-starter-sites")," "),Object(h.createElement)(C,{className:"kst-upgrade button-hero button button-primary",href:"https://www.kadencewp.com/pricing/"},S("Get Pro Starter Site","kadence-starter-sites"))):Object(h.createElement)(_,null,Object(h.createElement)("h2",{className:"kst-import-options-title"},S("Import Options","kadence-starter-templates")),Object(h.createElement)("div",{class:"kadence-starter-templates-preview-actions"},Object(h.createElement)("button",{className:"kst-import-btn button-hero button",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.props.onChange({isSelected:!1,fontPair:e.state.fontPair,colorPalette:e.state.colorPalette})}},S("Single Page","kadence-starter-templates")),Object(h.createElement)("button",{className:"kst-import-btn button-hero button button-primary",isDisabled:void 0!==t.pro&&t.pro&&"true"!==kadenceStarterParams.pro,onClick:function(){return e.props.onChange({isImporting:!0,fontPair:e.state.fontPair,colorPalette:e.state.colorPalette})}},S("Full Site","kadence-starter-templates")))))),Object(h.createElement)("div",{class:"wp-full-overlay-main"},Object(h.createElement)("iframe",{id:"kadence-starter-preview",src:t.url+"?cache=bust"})))}}]),a}(w);function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=f()(e);if(t){var n=f()(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return m()(this,a)}}var I=wp.i18n,D=I.__,A=(I.sprintf,wp.element),L=A.Fragment,H=A.Component,R=(A.render,A.PureComponent,wp.components),B=(R.Modal,R.Spinner,R.ButtonGroup,R.Dropdown,R.Icon,R.Button),q=R.ExternalLink,V=(R.ToolbarGroup,R.CheckboxControl),W=R.TextControl,G=(R.ToggleControl,R.MenuItem,R.Tooltip,R.PanelBody,function(e){u()(a,e);var t=F(a);function a(){var e;return n()(this,a),(e=t.apply(this,arguments)).state={email:kadenceStarterParams.user_email,privacy:!1,privacyError:!1},e}return c()(a,[{key:"render",value:function(){var e=this;return Object(h.createElement)("div",{className:"kt-subscribe-form-box"},Object(h.createElement)("h2",null,D("Subscribe and Import","kadence-starter-templates")),Object(h.createElement)("p",null,D("Subscribe to learn about new starter templates and features for Kadence.","kadence-blocks")),Object(h.createElement)(W,{type:"text",className:"kt-subscribe-email-input",label:D("Email:","kadence-starter-templates"),value:this.state.email,placeholder:D("example@example.com","kadence-starter-templates"),onChange:function(t){return e.setState({email:t})}}),this.props.emailError&&Object(h.createElement)("span",{className:"kb-subscribe-form-error"},D("Invalid Email, Please enter a valid email.","kadence-starter-templates")),Object(h.createElement)(V,{label:Object(h.createElement)(L,null,D("Accept","kadence-starter-templates")," ",Object(h.createElement)(q,{href:"https://www.kadencewp.com/privacy-policy/"},D("Privacy Policy","kadence-starter-templates"))),help:D("We do not spam, unsubscribe anytime.","kadence-starter-templates"),checked:this.state.privacy,onChange:function(t){return e.setState({privacy:t})}}),this.state.privacyError&&Object(h.createElement)("span",{className:"kb-subscribe-form-error"},D("Please Accept Privacy Policy","kadence-blocks")),Object(h.createElement)(B,{className:"kt-defaults-save",isPrimary:!0,onClick:function(){e.state.privacy?(e.setState({privacyError:!1}),e.props.onRun(e.state.email)):e.setState({privacyError:!0})}},D("Subscribe and Start Importing")))}}]),a}(H)),$=a(6),U=Object(h.createElement)($.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(h.createElement)($.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"})),K=Object(h.createElement)($.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(h.createElement)($.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),J=Object(h.createElement)($.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(h.createElement)($.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=f()(e);if(t){var n=f()(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return m()(this,a)}}function X(e){try{var t=JSON.parse(e);if(t&&"object"===v()(t))return t}catch(e){}return!1}var Q=wp.i18n,Z=Q.__,ee=(Q.sprintf,wp.element),te=ee.Fragment,ae=ee.Component,re=ee.render,ne=(ee.PureComponent,wp.components),se=ne.Modal,ce=ne.Spinner,oe=(ne.ButtonGroup,ne.Dropdown),ie=ne.Icon,le=ne.Button,ue=ne.ExternalLink,pe=(ne.ToolbarGroup,ne.CheckboxControl,ne.TextControl,ne.ToggleControl),me=ne.MenuItem,de=ne.Tooltip,fe=ne.PanelBody,be=Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(h.createElement)("path",{d:"M15.984 18v2.016H8.015V18h7.969zM11.016 7.969v8.016h1.969V7.969h3l-3.984-3.984-3.984 3.984h3z"})),ve=Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 180 180"},Object(h.createElement)("circle",{cx:"90.03",cy:"89.952",r:"90",fill:"url(#_Linear1)"}),Object(h.createElement)("path",{fill:"#fff",d:"M50 50H66.003V130H50z"}),Object(h.createElement)("path",{fill:"#fff",d:"M82 50H130.011V66H82z"}),Object(h.createElement)("path",{fill:"#fff",d:"M82 82H130.011V98H82z"}),Object(h.createElement)("path",{fill:"#fff",d:"M82 114.046H130.011V130.046H82z"}),Object(h.createElement)("defs",null,Object(h.createElement)("linearGradient",{id:"_Linear1",x1:"0",x2:"1",y1:"0",y2:"0",gradientTransform:"rotate(-52.456 186.056 40.829) scale(178.658)",gradientUnits:"userSpaceOnUse"},Object(h.createElement)("stop",{offset:"0",stopColor:"#372b73"}),Object(h.createElement)("stop",{offset:"1",stopColor:"#e9335e"})))),he=(Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 180 180"},Object(h.createElement)("circle",{cx:"90.03",cy:"89.952",r:"90",fill:"#93003c"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M50 50H66.003V130H50z"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M82 50H130.011V66H82z"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M82 82H130.011V98H82z"}),Object(h.createElement)("path",{fill:"#ff5bd4",d:"M82 114.046H130.011V130.046H82z"})),Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",enableBackground:"new 0 0 720 864",viewBox:"0 0 720 864",className:"gblogo"},Object(h.createElement)("g",null,Object(h.createElement)("path",{d:"M432.4 415.6c-2.5-1.7-5.9-1-7.6 1.5-9.9 14.9-30.9 15.7-32 15.7h-.5c-25.9 0-35.8 22.1-36.2 23-1.2 2.8.1 6 2.8 7.2.7.3 1.5.5 2.2.5 2.1 0 4.1-1.2 5-3.3.1-.2 6.9-15.4 24.4-16.4v28.3c-.7 6.1-3.6 10.9-8.7 14.5-5.3 3.7-12.4 5.6-21.1 5.6-10.4 0-18.9-3.6-25.2-10.7-6.4-7.1-9.6-17.2-9.6-30.2l.1-31.2c.5-11.5 3.6-20.6 9.5-27.1 6.4-7.1 14.8-10.7 25.2-10.7 8.7 0 15.8 1.9 21.1 5.6 5.3 3.7 8.3 8.8 8.8 15.4v.7c0 3.8 3.1 6.9 6.9 6.9s6.9-3.1 6.9-6.9v-.7c-1-9.9-5.5-17.7-13.6-23.6-8.1-5.9-18.2-8.8-30.4-8.8-14.5 0-26.2 4.8-35.1 14.3-8.4 8.9-12.8 20.6-13.3 35 0 1-.1 2-.1 3l.1 28.1h-.1c0 15.9 4.5 28.6 13.4 38.1s20.6 14.3 35.1 14.3c12.2 0 22.3-2.9 30.4-8.8 7.4-5.4 11.8-12.5 13.3-21.3l.3-31.4c9.1-2.2 21.5-7.2 29.3-19 2-2.5 1.3-5.9-1.3-7.6zM528.7 94.1h76.7c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-76.7c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2zM117.8 94.1h76.7c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-76.7c-3.4 0-6.2 2.8-6.2 6.2s2.7 6.2 6.2 6.2z",className:"st2"}),Object(h.createElement)("circle",{cx:"609.3",cy:"150.1",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"359.8",cy:"130.6",r:"6.2",className:"st2"}),Object(h.createElement)("path",{d:"M244.8 150.2h.3c23.3 0 33.7-14.6 41.6-28.2 2.6-4.5 12.2-19.5 25.8-23.4 16.8-4.9 34.7 2.9 41.7 18.2 1 2.2 3.2 3.5 5.4 3.6h.7c2.2-.1 4.4-1.4 5.4-3.6 7-15.3 24.9-23.1 41.7-18.2 13.6 4 23.2 18.9 25.8 23.4 7.9 13.7 18.3 28.2 41.9 28.2 14.2 0 31-10.6 35.7-30.9 3.9-16.8-3.3-32-19-39.7-3.1-1.5-6.8-.3-8.3 2.8-1.5 3.1-.3 6.8 2.8 8.3 14.9 7.4 13.6 20.5 12.4 25.8-2.4 10.4-11.6 21.4-23.7 21.4-15.5 0-22.9-7.8-31.2-22.1-4.1-7-15.5-24-33-29.1-19.1-5.6-39.3 1.1-50.9 15.8-11.6-14.7-31.8-21.4-50.9-15.8-17.5 5.1-28.9 22.1-33 29.1-8.3 14.3-15.7 22.1-30.9 22.1h-.2c-13.2-.1-21.6-9.3-24-18.4-1.2-4.3-3.7-19 13.1-29 2.9-1.7 3.9-5.5 2.1-8.5-1.8-2.9-5.5-3.9-8.5-2.1-19.3 11.5-22.3 29.7-18.7 42.9 4.4 16.3 18.9 27.3 35.9 27.4z",className:"st2"}),Object(h.createElement)("path",{d:"M360 734L360.1 734 360.1 734 360 734z",className:"st2"}),Object(h.createElement)("circle",{cx:"108.1",cy:"150.1",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"90.7",cy:"88",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"631.3",cy:"88",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"664.5",cy:"485.3",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"639.6",cy:"627.1",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"599.8",cy:"644.8",r:"6.2",className:"st2"}),Object(h.createElement)("path",{d:"M231.9 111.2c0 9.2 7.5 16.7 16.7 16.7s16.7-7.5 16.7-16.7-7.5-16.7-16.7-16.7c-9.2-.1-16.7 7.4-16.7 16.7zm16.7-4.4c2.4 0 4.4 2 4.4 4.4 0 2.4-2 4.4-4.4 4.4-2.4 0-4.4-2-4.4-4.4 0-2.4 2-4.4 4.4-4.4zM473.6 127.9c9.2 0 16.7-7.5 16.7-16.7s-7.5-16.7-16.7-16.7-16.7 7.5-16.7 16.7 7.5 16.7 16.7 16.7zm0-21.1c2.4 0 4.4 2 4.4 4.4 0 2.4-2 4.4-4.4 4.4-2.4 0-4.4-2-4.4-4.4 0-2.4 2-4.4 4.4-4.4zM376.7 121.6c-3.2 1.2-4.8 4.7-3.6 7.9 1.2 3.2 4.7 4.8 7.9 3.7 1-.4 25-8.4 43.4 20.2 1.2 1.8 3.2 2.8 5.2 2.8 1.1 0 2.3-.3 3.3-1 2.9-1.8 3.7-5.7 1.9-8.5-19.2-29.7-46.4-29.4-58.1-25.1zM343.3 121.6c-.9-.3-9.1-3.2-20.3-1.5-10.4 1.5-25.3 7.4-37.7 26.7-1.8 2.9-1 6.7 1.9 8.5 1 .7 2.2 1 3.3 1 2 0 4-1 5.2-2.8 18.3-28.6 42.3-20.6 43.4-20.2 3.2 1.2 6.7-.5 7.9-3.7 1.2-3.2-.5-6.8-3.7-8zM627.8 138.5l30.1-34.2v49.3c0 3.4 2.8 6.2 6.2 6.2s6.2-2.8 6.2-6.2V88c0-2.6-1.6-4.9-4-5.8-2.4-.9-5.1-.2-6.8 1.7l-40.9 46.5c-2.3 2.6-2 6.5.6 8.7 2.4 2.3 6.3 2 8.6-.6zM56.8 159.9c3.4 0 6.2-2.8 6.2-6.2v-49.3l30.1 34.2c2.3 2.6 6.2 2.8 8.7.6 2.6-2.3 2.8-6.2.6-8.7L61.5 83.9c-1.7-1.9-4.4-2.6-6.8-1.7-2.4.9-4 3.2-4 5.8v65.7c0 3.4 2.7 6.2 6.1 6.2zM493.4 166c-2.9-.2-5.6 1.8-6.3 4.6-.7 2.9.7 5.9 3.3 7.1 9.8 4.6 18.7 6.4 26.7 6.4 15.3 0 27.5-6.7 36-13.7 13.6-11.2 20.6-25.3 20.9-25.9 1.4-2.9.4-6.4-2.4-8-6.3-3.7-17.2-6-33.8 4.1-8.3 5.1-14.7 11.2-15.8 12.3-15.2 13.4-27.9 13.1-28.6 13.1zm36.9-3.9l.3-.3c4.7-4.7 18-15.6 28.4-16.1-3 4.3-7.5 10.1-13.6 15.2-9 7.4-18.6 11-28.8 10.8 4.2-2.2 8.9-5.4 13.7-9.6zM151.4 136.5c-2.8 1.6-3.8 5.1-2.4 8 .3.6 7.3 14.7 20.9 25.9 8.5 7 20.6 13.7 36 13.7 8.1 0 17-1.8 26.7-6.4 2.7-1.3 4-4.2 3.3-7.1-.7-2.9-3.3-4.8-6.3-4.7-.5 0-13.3.4-28.5-13-1.1-1.1-7.5-7.2-15.8-12.3-16.6-10-27.6-7.7-33.9-4.1zm41.4 25.6c4.7 4.2 9.4 7.3 13.7 9.6-21.6.2-35.9-16.3-42.4-26 10.4.5 23.7 11.4 28.4 16.1l.3.3z",className:"st2"}),Object(h.createElement)("path",{d:"M671.8 664.6c-6.2-5.2-13-8.2-19.3-9.9 2.4-1.8 4.7-3.9 6.7-6.2 15.3-18 15.4-44.5.2-61.7-2.3-2.6-6.2-2.8-8.7-.5-2.6 2.3-2.8 6.2-.5 8.7 11.1 12.6 10.9 32.1-.4 45.5-9.2 10.8-26.7 13.4-31.9 14-15.7 1.7-33.3 5.3-42.8 26.8-1.5 3.3-2.4 7-2.6 11-2.2-.7-4.6-1.1-7-1.1-12.5 0-22.7 10.2-22.7 22.7 0 8.6 4.8 16.1 11.9 19.9-2.1 1.9-4.1 4-5.9 6.4-21-28.3-54.6-46.1-91.6-46.1-5.3 0-10.6.4-15.7 1.1 30.4-9.3 58.7-23.8 84.5-43 33.3-24.9 61-57.4 80-93.9 20-38.4 30.1-79.9 30.1-123.1v-.8-.2-.3c-.2-35.1-8-66.7-19.1-93.9 4.1.8 8 1.1 11.5 1.1 25.9 0 37.3-17.8 38.5-19.9 5.6-9.4 6.5-20.8 3.3-31.1.1-.3.1-.7.1-1.1V176.3c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2V271c-10.5-9.1-25.7-10.1-32-10.1-12.2.1-19.8-1.8-25.4-11.4-4.7-8.1-2-16.5 2.7-21.3 5.9-6 14.3-6.8 22.5-2.3 3 1.6 6.8.6 8.4-2.4 1.6-3 .6-6.8-2.4-8.4-13-7.2-27.6-5.4-37.3 4.4-9.6 9.8-11.4 24.3-4.6 36.1 8.9 15.3 22.4 17.5 35.7 17.5h.5c4 0 16.9.6 24.3 7.6 9.6 9.1 12.1 23.4 5.8 34 0 0-.1.1-.1.2-.5.9-12.4 21.1-45.6 10.5-10-21.2-21.6-39.2-32.4-53.6l-4.9 3.7 4.9-3.8-2-2.6c-21.3-35.7 3.3-73.7 16.1-89.8l7.2-8.2c2.2-2.6 2-6.5-.6-8.7-2.5-2.1-6.1-2-8.4.3-.2.2-1.3 1.3-3 3.2-11.1 11.3-54.5 51.3-96.6 30.4l-1.2-.8-.6-.4c-37.7-20.3-74.9-32-110.4-35-4.6-10.5-10.7-18.5-18.4-18.5-7.8 0-13.9 8.1-18.6 18.8-49.7 2.2-111.5 34.3-114.1 35.6-42.3 21.3-85.9-18.9-97-30.2-1.7-1.9-2.9-3-3-3.2-2.3-2.3-5.9-2.4-8.4-.3-2.6 2.2-2.8 6.1-.6 8.7l7.7 8.7c4.5 5.6 10.2 13.7 15 23.4 12 24.3 12.2 46.4.7 65.8-14.3 17.8-25.9 36.5-34.8 56.2-33.5 10.9-45.5-9.5-46-10.4 0-.1-.1-.1-.1-.2-6.3-10.6-3.8-24.9 5.8-34 7.4-7 20.3-7.6 24.3-7.6h.1c13.4 0 27.2-2.1 36.1-17.5 6.8-11.8 5-26.4-4.6-36.1-9.7-9.9-24.3-11.6-37.3-4.4-3 1.6-4.1 5.4-2.4 8.4 1.6 3 5.4 4.1 8.4 2.4 8.3-4.5 16.7-3.7 22.5 2.3 4.7 4.8 7.3 13.2 2.7 21.3-5.5 9.5-13 11.4-25 11.4h-.4c-5.5 0-18.3.8-28.5 7.4v-90.3c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v104c-6.8 12.2-7.2 27.1-.2 39.1.7 1.3 5 8.5 14.6 13.9 5.5 3.1 13.4 6 23.9 6 3.8 0 8-.4 12.5-1.3-10.8 29-16.2 60.2-16.4 94.2v1.1c0 61.4 21.6 121.7 60.8 169.8 34.7 42.6 81.9 74.2 134.2 90.3-5.5-.8-11.1-1.2-16.7-1.2-36.7 0-70 17.5-91 45.4-1.7-2.2-3.6-4.3-5.7-6.1 6.6-4 11.1-11.2 11.1-19.5 0-12.5-10.2-22.7-22.7-22.7-2.3 0-4.5.4-6.6 1-.3-3.9-1.2-7.6-2.6-10.9-9.6-21.5-27.1-25.1-42.8-26.8-5.2-.6-22.7-3.2-31.9-14-11.6-13.1-11.8-32.6-.7-45.2 2.3-2.6 2-6.5-.5-8.7-2.6-2.3-6.5-2-8.7.5-15.1 17.2-15 43.7.2 61.7 2 2.4 4.3 4.4 6.7 6.2-6.3 1.7-13.1 4.8-19.3 9.9-14.7 12.1-22.2 32.3-22.4 59.8-.5 2.5.6 5.1 2.8 6.5 1 .6 2.1.9 3.2.9.4 0 .9-.1 1.3-.2h.1c.2 0 .3-.1.5-.2.3-.1.7-.2 1-.4.1 0 .1-.1.2-.1 1-.6 1.9-1.4 2.5-2.4 2.4-3.1 12.3-7 20.5-8.7 32.1-7 38.8-28.7 37.8-39.1-.3-3.4-3.3-5.9-6.7-5.6-3.4.3-5.9 3.3-5.6 6.7 0 .1.1 1.9-.5 4.6-1.5 6.2-7 16.9-27.6 21.4h-.2c-2.4.5-9.6 2.2-16.3 5.3 1.8-17.8 7.5-30.8 17.2-38.9 14.9-12.4 34.6-8.9 34.8-8.8.7.1 1.3.1 1.9 0 3.3.7 6.1 1.1 8.2 1.3 16.5 1.8 26.6 5.4 32.9 19.5 4.9 11.1-1.4 23.9-9.9 30.3-4.3 3.3-15.8 9.8-28.7-.8-2.6-2.2-6.5-1.8-8.7.8-2.2 2.6-1.8 6.5.8 8.7 5.8 4.8 12.3 7.6 19 8.4-8.6 7-14.4 15.8-17 20.4-8.4 14.5-15.2 22.3-26.5 22.4V733c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v50.2c0 2.5 1.5 4.6 3.6 5.6 1.1.8 2.4 1.4 3.8 1.4h144c2.2 0 4-1.1 5.2-2.8.8-.8 1.5-1.8 1.8-3 5.7-22.1 25.6-37.5 48.4-37.5 20.4 0 38.5 12.4 46.2 30.9h-13.2c-5.4-13.3-18.4-22.2-33.1-22.2-16.1 0-30.3 10.9-34.6 26.4-.9 3.3 1.1 6.7 4.3 7.6 3.3.9 6.7-1.1 7.6-4.3 2.8-10.2 12.1-17.3 22.6-17.3 7.8 0 14.8 3.8 19.1 9.8h-3.6c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h12.5c.2 0 .5.1.7.1.3 0 .6 0 .8-.1h24.8c3.4 0 6.2-2.8 6.2-6.2 0-.3 0-.6-.1-.9.1-.8.1-1.7-.1-2.6-7.3-27.1-32.1-46-60.2-46-27.2 0-51.1 17.6-59.4 43.3h-32.3c2.6-8.3 6.1-16 10.5-23.2.3-.4.5-.8.8-1.2 18.3-28.7 50.3-47.1 85.8-47.1 21 0 41.2 6.4 58.3 18.4.5.3 1 .6 1.5.7 2.6 3.1 5.2 6.4 7.7 9.8.6.8 1.1 1.6 1.7 2.4-.6 12.7 6.3 26 20.6 39.6.5 1.5 1 2.8 1.3 3.8v1.3c0 3.4 2.8 6.2 6.2 6.2 2.9 0 5.2-1.9 5.9-4.6 0-.1.9-3.1 2.7-8.1 12.9-12.6 19.3-24.9 19.2-36.8.8-1.2 1.7-2.5 2.6-3.7 2.8-3.8 5.7-7.5 8.7-11 17-11.8 36.9-18 57.7-18 44.8 0 84 29.2 97 71.5h-32.3c-8.2-25.7-32.1-43.3-59.4-43.3-28.1 0-52.8 18.9-60.2 46-.3 1-.3 2 0 3v.5c0 3.4 2.8 6.2 6.2 6.2h54.2c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-19.7c4.3-6 11.3-9.8 19.1-9.8 10.7 0 20 7.2 22.7 17.6.7 2.8 3.2 4.6 6 4.6.5 0 1-.1 1.5-.2 3.3-.8 5.3-4.2 4.5-7.5-4.1-15.8-18.3-26.9-34.7-26.9-14.6 0-27.6 8.9-33.1 22.2h-12.5c7.6-18.5 25.8-30.9 46.2-30.9 22.8 0 42.7 15.4 48.4 37.5.1.5.4 1 .6 1.5.8 2.5 3.1 4.3 5.9 4.3H664c3.4 0 6.2-2.8 6.2-6.2v-.4-1.6c.1-.6.1-1.2.1-1.8 0-.1 0-.2-.1-.3V733c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v42c-10.4-.8-16.9-8.5-24.9-22.3-2.6-4.4-8-12.7-16-19.5 5.5-1.2 10.8-3.8 15.7-7.9 2.6-2.2 3-6.1.8-8.7-2.2-2.6-6.1-3-8.7-.8-12.8 10.6-24.3 4.1-28.7.8-8.5-6.4-14.8-19.3-9.9-30.3 6.3-14.1 16.4-17.8 32.9-19.5 2.1-.2 4.9-.6 8.2-1.3.6.1 1.3.1 2 0 .2 0 19.7-3.6 34.7 8.8 9.8 8.1 15.6 21.1 17.3 39-6.8-3.2-14.1-4.9-16.4-5.4h-.2c-20.5-4.5-26.1-15.1-27.6-21.3-.6-2.6-.6-4.4-.5-4.6.3-3.4-2.2-6.4-5.6-6.7-3.4-.3-6.4 2.2-6.7 5.6-1 10.5 5.7 32.1 37.9 39.1 8.3 1.8 18.8 5.9 20.7 9 0 0 0 .1.1.1.3.4.6.8.9 1.1.1.1.2.1.3.2.3.2.6.5.9.6.1.1.3.2.4.2.3.2.6.3.9.4.1 0 .3.1.4.1.4.1.9.2 1.4.2.4 0 .7 0 1.1-.1.1 0 .2 0 .3-.1.3-.1.6-.2 1-.3h.1c.3-.1.5-.3.8-.4l.1-.1c.2-.1.4-.3.5-.4.1-.1.3-.2.4-.4l.4-.4c.1-.2.3-.3.4-.5.1-.2.2-.3.3-.5.1-.2.2-.3.3-.5.1-.2.1-.4.2-.6.1-.2.1-.4.2-.6 0-.2.1-.4.1-.5 0-.2.1-.4.1-.7v-.1c-.1-28.3-7.7-48.8-22.6-61.1zM152.9 777.7H87.8c5.5-5.6 9.4-12.3 12.4-17.5 2.6-4.5 12.2-19.5 25.8-23.4 16-4.7 31 .8 38.4 13.5-4.9 8.5-8.8 17.7-11.5 27.4zm1.7-53.7c-5.7 0-10.3-4.6-10.3-10.3 0-5.7 4.6-10.3 10.3-10.3s10.3 4.6 10.3 10.3c0 5.7-4.7 10.3-10.3 10.3zm366.6-78.1l.9 1.1-.9-1.1zm.2-6.2c-58.4-6.8-100.6 18.3-125.8 40.5-10.9 9.6-19.5 19.5-26 27.9-1.2-.8-2.3-1.6-3.3-2.1v-17.6c47.3-47.5 94.3-61.7 125.5-65.2 20.7-2.3 37.4-.4 47.4 1.5-5.7 5.3-11.6 10.3-17.8 15zm73.3-87.2c-6 11.5-12.9 22.5-20.5 33.1-7.9-2.5-17.8-4.8-29.7-5.9 26.5-33.6 43.3-73.7 48.7-116 8.6-1 20.5-4.7 29.6-10.6-2.4 34.7-11.8 68.1-28.1 99.4zm-42.1-111.6l7.2-.3c2.4 10.7 10.5 19.3 21.1 22.2-5.6 42.8-23.4 83.2-51.8 116.2-13.7 0-29.6 1.6-47.6 5.5 42-34.2 69.4-85.7 71.1-143.6zm-117.5 158c-4 1.6-6.8 2.9-8.2 3.5-16.6 6.6-34.4 10.9-53 12.3l165.9-165.9c-5 66.8-46.6 123.4-104.7 150.1zm188.3-164.7c-.2 5.6-15.5 14.7-29 16.9-1.9.3-3.8.5-5.6.5-2.4 0-4.7-.5-6.8-1.4-6.3-2.7-10.7-8.9-10.7-16.1 0-7.2 4.4-13.4 10.7-16.1 2.1-.9 4.4-1.4 6.8-1.4 1.8 0 3.7.2 5.6.5 13.5 2.2 28.7 11.3 29 16.8v.3zM565.5 276l2.6 3.5c22.7 30.3 49.3 77.2 54.4 135.6-9-5.8-20.8-9.5-29.3-10.5-6.4-50.6-28.9-96.3-62.2-131.6 1.4-2.9 2.2-6.2 2.2-9.6 0-4.6-1.4-8.9-3.7-12.4l28.4-32.4c-5.4 20.6-2.8 40.1 7.6 57.4zm-82.9-70.1l1.3.9.7.4c9.9 5 20.5 7.5 31.5 7.5 11.6 0 23.7-2.8 35.9-8.4l-32 36.5c-2.9-1.4-6.1-2.1-9.6-2.1-4.5 0-8.6 1.3-12.1 3.5-31.5-23-68.8-38.3-109.4-43.3-1-7.3-3-17.7-6-27.9 32.1 3.6 65.6 14.6 99.7 32.9zm38.2 57.5c0 4.5-3 8.4-7.1 9.8-1 .3-2.1.5-3.2.5h-1c-4.6-.4-8.3-3.9-9.1-8.3-.1-.6-.2-1.3-.2-1.9 0-.7.1-1.3.2-2 .9-4.5 4.7-8 9.4-8.3H511.1c4.6.3 8.5 3.6 9.5 8 .1.6.2 1.1.2 1.7-.1.1 0 .3 0 .5zm-131.4-49.9c37.2 4.9 71.6 19.1 100.7 40.1-1.5 3-2.3 6.3-2.3 9.9 0 4.5 1.3 8.6 3.6 12.2l-49.8 56.8c-2.3 2.6-2 6.5.6 8.7 1.2 1 2.6 1.5 4.1 1.5 1.7 0 3.4-.7 4.7-2.1l49.7-56.7c3 1.5 6.3 2.3 9.9 2.3 4.6 0 8.8-1.4 12.3-3.7 31 33.2 51.9 75.8 58.1 123-10.7 3-19 11.8-21.2 22.8l-7.1.3c-1.5-45.7-19.2-89.3-50.1-123.2-2.3-2.5-6.2-2.7-8.7-.4-2.5 2.3-2.7 6.2-.4 8.7 27.2 29.8 43.4 67.6 46.5 107.6L473.5 355c-2.4-2.4-6.3-2.4-8.7 0-2.4 2.4-2.4 6.3 0 8.7l71.4 71.4-176 176-176-176 70.8-70.8c2.4-2.4 2.4-6.3 0-8.7-2.4-2.4-6.3-2.4-8.7 0l-65.7 65.7c3.5-45.5 23.9-86.4 55-116.2l31 35.4c1.2 1.4 2.9 2.1 4.7 2.1 1.4 0 2.9-.5 4.1-1.5 2.6-2.3 2.8-6.2.6-8.7l-31.1-35.5c28-23.4 63.1-38.5 101.6-41.4l-52.8 52.3c-2.4 2.4-2.4 6.3 0 8.7 1.2 1.2 2.8 1.8 4.4 1.8 1.6 0 3.1-.6 4.4-1.8l58-57.4 56.3 56.3c2.4 2.4 6.3 2.4 8.7 0 2.4-2.4 2.4-6.3 0-8.7l-51.2-51.2c31.7 2.4 61.9 13 88.2 31.1 2.8 1.9 6.7 1.2 8.6-1.6 1.9-2.8 1.2-6.7-1.6-8.6-30.4-20.9-65.8-32.5-102.8-33.6v-4.4c11.6-2.8 20.9-12.7 22.7-24.9zm-180.7 74.3c3.5 0 6.8-.8 9.7-2.2l8.9 10.2c-35.3 33.7-57.8 80.6-59.6 132.7l-5-.3c-2.4-11.7-11.5-20.9-23.2-23.3 6.1-46.3 26.5-88.1 56.5-120.9 3.7 2.4 8 3.8 12.7 3.8zm-10.3-22.6c0-.5 0-.9.1-1.4 0-.3.1-.5.1-.8.9-4.4 4.7-7.8 9.3-8.1h.7c4.7 0 8.7 3.2 9.9 7.6.2.9.4 1.8.4 2.7 0 .7-.1 1.4-.2 2.1-.9 4.4-4.7 7.8-9.3 8.1h-.8c-1.3 0-2.6-.3-3.7-.7-3.7-1.4-6.5-5.2-6.5-9.5zm-35.8 175.4l5.1.3c1.7 58 29.2 109.6 71.3 143.8-18.1-4-34-5.6-47.8-5.7-28.2-32.9-46.1-73.1-51.7-115.7 11.5-2.4 20.6-11.3 23.1-22.7zm17.9 8.2l165.9 165.9C258 608 187.2 537.2 180.5 448.8zm162.7-249c2.7-18.7 11.9-43.7 16.7-45.7 5.5 2.1 14 28 16.6 45.6.5 3.5.8 6.7.8 9.3 0 1.1-.1 2.1-.3 3.1-1.5 8.1-8.6 14.3-17.2 14.3s-15.7-6.2-17.2-14.3c-.2-1-.3-2.1-.3-3.1.1-2.7.4-5.8.9-9.2zm10.8 38.5v4.3c-44.6 1.4-85.4 18.1-117.4 44.9l-8.8-10.1c2.3-3.5 3.7-7.8 3.7-12.3 0-3.8-1-7.4-2.6-10.5 29.3-21.5 64-36 101.7-41.1 1.7 12.4 11.2 22.4 23.4 24.8zm-152.7-23.6c11 0 21.6-2.5 31.6-7.5.6-.3 57.7-30 103.9-34-3 10.1-5 20.6-6 27.8-41.1 5.1-79 21-110.7 44.6-3.4-2-7.2-3.1-11.4-3.1-3.5 0-6.8.8-9.7 2.2l-33.6-38.3c12.3 5.5 24.3 8.3 35.9 8.3zm-49.9 61.9l.5-.7c10.4-17.2 13-36.8 7.8-57.4l30 34.3c-2.3 3.5-3.7 7.8-3.7 12.3 0 3.3.7 6.4 2 9.3-32.7 35.2-54.7 80.4-61 130.4-8.9 1.4-20.7 5.2-29.6 10.9 3.5-52.8 21.2-98.5 54-139.1zM96.9 434c.2-5.8 16.3-13.8 29-16.4 2.8-.6 5.4-.9 7.6-.9 1.7 0 3.2.2 4.8.7 7.3 2.1 12.7 8.8 12.7 16.8s-5.4 14.7-12.7 16.8c-1.5.4-3.1.7-4.8.7-2.3 0-4.9-.3-7.6-.9-12.7-2.7-28.8-10.7-29-16.5v-.3zm.6 18.4c8.9 5.8 20.8 9.6 29.6 11 5.3 42.4 22.1 82.6 48.7 116.2-11.9 1.1-21.8 3.3-29.8 5.8-28.7-39.4-45.3-84.9-48.5-133zM154.9 597c-.3-.4-.6-.7-.9-1.1 30.1-8.3 63-3.9 86.1 1.6 27.9 6.7 48.3 16.4 48.5 16.5l.1-.2c22.1 8.8 46.2 13.7 71.4 13.7 25.1 0 49.1-4.8 71.1-13.6l.6-.3c2.6-1.1 5.3-2.2 7.8-3.4 8.5-3.5 22.8-8.7 40-12.8 23.3-5.6 56.3-10 86.4-1.6-5.2 6.4-10.6 12.5-16.4 18.4-8.4-2.3-29.8-6.7-58.7-3.6-31.4 3.4-77.6 16.8-124.8 60.4v-10.9c0-3.4-2.8-6.2-6.2-6.2s-6.2 2.8-6.2 6.2v10.3c-46.9-43.1-92.9-56.4-124.1-59.8-29.6-3.2-51.3 1.6-59.2 3.8-5.2-5.4-10.5-11.3-15.5-17.4zm26.3 27.8c10-2 26.9-4 48-1.6 55.5 6.2 98.1 37.9 124.8 64.5v18.1c-.9.5-1.9 1.1-3 1.9-6.5-8.3-15-18-25.7-27.4-25.2-22.3-67.6-47.5-126.2-40.5v.1c-6.2-4.8-12.2-9.8-17.9-15.1zm155.3 98c-11.7-15-24.5-26.3-37.3-34.8l.1-.3c-.3-.1-.6-.2-.9-.2-21.3-13.9-42.7-20-59.9-22.5-8.1-4.2-16.1-8.9-23.8-14 37.7-1.1 71.9 11.7 102.1 38.2 10.4 9.1 18.6 18.5 24.8 26.6-1.9 2.1-3.6 4.4-5.1 7zm29.9 37.5c-1.5 1.8-3.1 3.6-4.9 5.4-.4.4-.9.9-1.4 1.3l-.1.1-.1.1v-.2c-.2-.2-.5-.4-.7-.7-2-1.9-3.7-3.8-5.3-5.7-7.3-8.7-10.5-16.8-9.4-24.2.1-.6.2-1.2.4-1.8.8-3.2 2.3-6 4.1-8.4 1.5-2 3.2-3.7 4.9-5.2 1.5-1.3 3-2.4 4.3-3.3.6-.4 1.1-.7 1.6-1 0 0 .1 0 .1-.1h.1c.7.4 1.4.9 2.3 1.5 1.2.8 2.6 1.9 4 3.1 1.8 1.6 3.6 3.5 5.1 5.6 1.8 2.6 3.3 5.5 3.9 8.8 0 .2.1.5.2.7 1.1 7.3-2 15.3-9.1 24zm24.4-45.1c-.2.2-.4.4-.5.6-2.3 2.6-4.4 5.2-6.3 7.7-1.5-2.6-3.2-5-5-7.1 6.2-8.1 14.6-17.8 25.2-27.1 30-26.4 64.1-39.2 101.5-38.3-7.8 5.1-15.8 9.9-24 14.1-42.8 6.5-72.1 28.7-90.9 50.1zm174.5-11.8c5.7 0 10.3 4.6 10.3 10.3 0 5.7-4.6 10.3-10.3 10.3s-10.3-4.6-10.3-10.3c0-5.6 4.6-10.3 10.3-10.3zm31.2 32.1c13.6 4 23.2 18.9 25.8 23.4 3.2 5.6 7.5 13 13.8 18.8H567c-2.6-9.4-6.3-18.3-11-26.5 7.6-13.6 24.6-20.4 40.5-15.7z",className:"st2"}),Object(h.createElement)("path",{d:"M69.6 301.1c0 10.1 8.2 18.4 18.4 18.4s18.4-8.2 18.4-18.4c0-10.1-8.2-18.4-18.4-18.4s-18.4 8.3-18.4 18.4zm24.4 0c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6 6 2.7 6 6zM648.7 301.1c0-10.1-8.2-18.4-18.4-18.4-10.1 0-18.4 8.2-18.4 18.4 0 10.1 8.2 18.4 18.4 18.4s18.4-8.2 18.4-18.4zm-24.4 0c0-3.3 2.7-6 6-6s6 2.7 6 6-2.7 6-6 6c-3.3.1-6-2.6-6-6zM666.4 346.9c-2.3-.9-5-.4-6.8 1.4-8.1 8.3-21.4 8-21.6 8h-.2c-3.3 0-6 2.6-6.2 5.9-.1 3.4 2.5 6.3 5.9 6.4.6 0 10.4.3 20.4-4.3v100.9c0 3.4 2.8 6.2 6.2 6.2s6.2-2.8 6.2-6.2V352.6c-.1-2.5-1.6-4.8-3.9-5.7zM55.7 471.4c3.4 0 6.2-2.8 6.2-6.2V364.3c10 4.6 19.8 4.3 20.4 4.3 3.4-.1 6.1-3 5.9-6.4-.1-3.4-3-6.1-6.4-5.9-.1 0-13.5.3-21.6-8-1.8-1.8-4.4-2.3-6.8-1.4-2.3.9-3.8 3.2-3.8 5.7v112.7c-.1 3.4 2.7 6.1 6.1 6.1zM671.3 574.3c0-3.4-2.8-6.2-6.2-6.2h-40c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h40c3.4 0 6.2-2.7 6.2-6.2zM629.8 598c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-15.4c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h15.4zM644.8 609.4c0-3.4-2.8-6.2-6.2-6.2h-38.2c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h38.2c3.4 0 6.2-2.7 6.2-6.2zM620.6 627.1c0-3.4-2.8-6.2-6.2-6.2h-29.9c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h29.9c3.4 0 6.2-2.8 6.2-6.2zM565.1 638.6c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h17c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2h-17zM665.1 532.8h-22.3c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h22.3c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2zM665.1 550.5H634c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h31.1c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2zM665.1 497.5h-9.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h9.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM665.1 515.2h-15.2c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2h15.2c3.4 0 6.2-2.8 6.2-6.2s-2.8-6.2-6.2-6.2z",className:"st2"}),Object(h.createElement)("circle",{cx:"55.5",cy:"485.6",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"80.5",cy:"627.3",r:"6.2",className:"st2"}),Object(h.createElement)("circle",{cx:"120.3",cy:"645",r:"6.2",className:"st2"}),Object(h.createElement)("path",{d:"M54.9 580.7h40c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-40c-3.4 0-6.2 2.8-6.2 6.2 0 3.5 2.8 6.2 6.2 6.2zM105.6 585.9H90.2c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h15.4c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM119.6 603.5H81.4c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h38.2c3.4 0 6.2-2.8 6.2-6.2 0-3.5-2.8-6.2-6.2-6.2zM135.5 621.1h-29.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2h29.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2zM131.7 645c0 3.4 2.8 6.2 6.2 6.2h17c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-17c-3.4 0-6.2 2.8-6.2 6.2zM54.9 545.4h22.3c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 563.1H86c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 510.1h9.9c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2h-9.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.4 2.8 6.2 6.2 6.2zM54.9 527.7h15.2c3.4 0 6.2-2.8 6.2-6.2 0-3.4-2.8-6.2-6.2-6.2H54.9c-3.4 0-6.2 2.8-6.2 6.2 0 3.5 2.8 6.2 6.2 6.2zM360 767.1c.1-.1 0-.1 0-.2v.2zM641.2 202.7c.1 0 .1 0 0 0 2.8 0 5.3-1.9 6-4.7 2.2-8.8 1.3-16.3-2.9-22.5-6.7-10-19-11.9-20.4-12.1-3.2-.4-6.2 1.6-6.9 4.8-2.3 10.5-1 18.9 4 25.1 7.4 9 19 9.3 20.2 9.4zm-7-20.2c1.2 1.9 1.9 4.1 1.9 6.7-1.8-.7-3.8-1.8-5.2-3.6-1.6-2-2.4-4.6-2.4-7.9 2 1 4.2 2.6 5.7 4.8zM601 113.3c-6.7-10-19-11.9-20.4-12.1-3.2-.4-6.2 1.6-6.9 4.8-2.3 10.5-1 18.9 4 25.1 7.2 9 18.8 9.3 20.1 9.3 2.8 0 5.3-1.9 6-4.7 2.3-8.6 1.4-16.2-2.8-22.4zm-13.5 10.1c-1.6-2-2.4-4.6-2.4-7.9 2.1 1 4.3 2.6 5.7 4.8 1.2 1.9 1.9 4.1 1.9 6.7-1.8-.7-3.8-1.8-5.2-3.6zM97.3 163.4c-1.4.2-13.6 2.1-20.4 12.1-4.1 6.2-5.1 13.7-2.9 22.5.7 2.7 3.2 4.7 6 4.7 1.3 0 12.9-.3 20.1-9.3 5-6.2 6.3-14.7 4-25.1-.6-3.2-3.6-5.3-6.8-4.9zm-6.7 22.2c-1.4 1.8-3.4 2.9-5.3 3.6 0-2.6.7-4.9 1.9-6.7 1.5-2.2 3.7-3.8 5.7-4.8 0 3.3-.8 5.9-2.3 7.9zM139.7 101.2c-1.4.2-13.6 2.1-20.4 12.1-4.1 6.2-5.1 13.7-2.9 22.5.7 2.7 3.2 4.7 6 4.7 1.3 0 12.9-.3 20.1-9.3 5-6.2 6.3-14.7 4-25.1-.7-3.2-3.6-5.3-6.8-4.9zm-6.8 22.2c-1.4 1.8-3.4 2.9-5.3 3.6 0-2.6.7-4.9 1.9-6.7 1.5-2.2 3.7-3.8 5.7-4.8 0 3.3-.7 5.9-2.3 7.9zM555.1 392c.4 3.2 3 5.5 6.1 5.5h.7c3.4-.4 5.8-3.5 5.4-6.9-6.2-54-43.1-92.2-44.7-93.8-2.4-2.4-6.3-2.5-8.7-.1-2.4 2.4-2.5 6.3-.1 8.7.4.4 35.6 36.9 41.3 86.6zM159.1 397.4h.7c3.1 0 5.8-2.3 6.1-5.5 5.7-49.7 40.9-86.2 41.2-86.5 2.4-2.4 2.3-6.4-.1-8.7-2.4-2.4-6.4-2.4-8.7.1-1.6 1.6-38.4 39.8-44.7 93.8-.3 3.4 2.1 6.4 5.5 6.8z",className:"st2"})))),ge=function(e){u()(a,e);var t=Y(a);function a(){var e;return n()(this,a),(e=t.apply(this,arguments)).runAjax=e.runAjax.bind(i()(e)),e.runPluginInstall=e.runPluginInstall.bind(i()(e)),e.runPluginInstallSingle=e.runPluginInstallSingle.bind(i()(e)),e.runSubscribe=e.runSubscribe.bind(i()(e)),e.runSubscribeSingle=e.runSubscribeSingle.bind(i()(e)),e.loadTemplateData=e.loadTemplateData.bind(i()(e)),e.reloadTemplateData=e.reloadTemplateData.bind(i()(e)),e.loadPluginData=e.loadPluginData.bind(i()(e)),e.focusMode=e.focusMode.bind(i()(e)),e.fullFocusMode=e.fullFocusMode.bind(i()(e)),e.jumpToImport=e.jumpToImport.bind(i()(e)),e.selectedMode=e.selectedMode.bind(i()(e)),e.selectedFullMode=e.selectedFullMode.bind(i()(e)),e.backToDash=e.backToDash.bind(i()(e)),e.saveConfig=e.saveConfig.bind(i()(e)),e.state={category:"all",activeTemplate:"",colorPalette:"",fontPair:"",search:null,isFetching:!1,isImporting:!1,isSelected:!1,response:"",isPageSelected:!1,starterSettings:kadenceStarterParams.starterSettings?JSON.parse(kadenceStarterParams.starterSettings):{},selectedPage:"home",progress:"",focusMode:!1,finished:!1,overrideColors:!1,overrideFonts:!1,isOpenCheckColor:!1,isOpenCheckFont:!1,isOpenCheckPast:!1,removePast:!1,errorTemplates:!1,templates:kadenceStarterParams.templates?kadenceStarterParams.templates:[],etemplates:kadenceStarterParams.etemplates?kadenceStarterParams.etemplates:[],activeTemplates:!1,palettes:kadenceStarterParams.palettes?kadenceStarterParams.palettes:[],fonts:kadenceStarterParams.fonts?kadenceStarterParams.fonts:[],logo:kadenceStarterParams.logo?kadenceStarterParams.logo:"",hasContent:!!kadenceStarterParams.has_content&&kadenceStarterParams.has_content,hasPastContent:!!kadenceStarterParams.has_previous&&kadenceStarterParams.has_previous,isSaving:!1,isLoadingPlugins:!1,activePlugins:!1,showForm:!0,templatePlugins:"",isSubscribed:!!kadenceStarterParams.subscribed,email:kadenceStarterParams.user_email,privacy:!1,emailError:!1,privacyError:!1,settingOpen:!1,installContent:!0,installCustomizer:!0,installWidgets:!0},e}return c()(a,[{key:"saveConfig",value:function(e,t){var a=this;this.setState({isSaving:!0});var r=kadenceStarterParams.starterSettings?JSON.parse(kadenceStarterParams.starterSettings):{};r[e]||(r[e]=""),r[e]=t,this.setState({starterSettings:r}),new wp.api.models.Settings({kadence_starter_templates_config:JSON.stringify(r)}).save().then((function(e){a.setState({starterSettings:r,isSaving:!1}),kadenceStarterParams.starterSettings=JSON.stringify(r)}))}},{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"focusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0,isSelected:!1,activePlugins:!1})}},{key:"fullFocusMode",value:function(e){this.setState({activeTemplate:e,focusMode:!0,isSelected:!0,activePlugins:!1})}},{key:"jumpToImport",value:function(e){this.setState({isImporting:!0,activeTemplate:e,focusMode:!0,isSelected:!0,fontPair:"",colorPalette:"",activePlugins:!1})}},{key:"selectedFullMode",value:function(){this.setState({isSelected:!0})}},{key:"selectedMode",value:function(e){this.setState({selectedPage:e,isPageSelected:!0,isImporting:!0})}},{key:"backToDash",value:function(){this.setState({isFetching:!1,activeTemplate:"",activePlugins:!1,overrideColors:!1,overrideFonts:!1,colorPalette:"",fontPair:"",focusMode:!1,finished:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",selectedPage:"home"})}},{key:"reloadTemplateData",value:function(){this.setState({errorTemplates:!1,isSaving:!0,activeTemplates:"loading"});var e=kadenceStarterParams.proData&&kadenceStarterParams.proData.ktp_api_key?kadenceStarterParams.proData.ktp_api_key:"",t=kadenceStarterParams.proData&&kadenceStarterParams.proData.activation_email?kadenceStarterParams.proData.activation_email:"";e||(e=kadenceStarterParams.proData&&kadenceStarterParams.proData.ithemes_key?kadenceStarterParams.proData.ithemes_key:"")&&(t="iThemes");var a=new FormData;a.append("action","kadence_import_reload_template_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("api_key",e),a.append("api_email",t),a.append("template_type",this.state.starterSettings.builderType);var r=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:a,contentType:!1,processData:!1}).done((function(e,t,a){if(e){var n=X(e);n?r.setState({activeTemplates:n,errorTemplates:!1,isSaving:!1}):r.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}})).fail((function(e){console.log(e),r.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}))}},{key:"loadTemplateData",value:function(){this.setState({errorTemplates:!1,isSaving:!0,activeTemplates:"loading"});var e=kadenceStarterParams.proData&&kadenceStarterParams.proData.ktp_api_key?kadenceStarterParams.proData.ktp_api_key:"",t=kadenceStarterParams.proData&&kadenceStarterParams.proData.activation_email?kadenceStarterParams.proData.activation_email:"";e||(e=kadenceStarterParams.proData&&kadenceStarterParams.proData.ithemes_key?kadenceStarterParams.proData.ithemes_key:"")&&(t="iThemes");var a=new FormData;a.append("action","kadence_import_get_template_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("api_key",e),a.append("api_email",t),a.append("template_type",this.state.starterSettings.builderType);var r=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:a,contentType:!1,processData:!1}).done((function(e,t,a){if(e){var n=X(e);n?r.setState({activeTemplates:n,errorTemplates:!1,isSaving:!1}):r.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}})).fail((function(e){console.log(e),r.setState({activeTemplates:"error",errorTemplates:!0,isSaving:!1})}))}},{key:"loadPluginData",value:function(e,t){this.setState({isLoadingPlugins:!0});var a=new FormData;a.append("action","kadence_check_plugin_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",e),a.append("builder",t);var r=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:a,contentType:!1,processData:!1}).done((function(e,t,a){e&&(void 0!==e.success?r.setState({templatePlugins:"error",activePlugins:!0,isLoadingPlugins:!1}):"object"===v()(e)&&null!==e?r.setState({templatePlugins:e,activePlugins:!0,isLoadingPlugins:!1}):r.setState({templatePlugins:"error",activePlugins:!0,isLoadingPlugins:!1}))})).fail((function(e){console.log(e),r.setState({templatePlugins:"error",activePlugins:!0,isLoadingPlugins:!1})}))}},{key:"runPluginInstallSingle",value:function(e,t,a){this.setState({progress:"plugins",isFetching:!0,showForm:!1});var r=new FormData;r.append("action","kadence_import_install_plugins"),r.append("security",kadenceStarterParams.ajax_nonce),r.append("selected",e),r.append("builder",a),r.append("page_id",t),this.runPageAjax(r)}},{key:"runSubscribeSingle",value:function(e){this.setState({progress:"subscribe",isFetching:!0,showForm:!1});var t=new FormData;t.append("action","kadence_import_subscribe"),t.append("security",kadenceStarterParams.ajax_nonce),t.append("email",e),this.runPageAjax(t)}},{key:"runRemovePast",value:function(e,t){this.setState({progress:"remove",isFetching:!0,showForm:!1});var a=new FormData;a.append("action","kadence_remove_past_import_data"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",e),a.append("builder",t),this.runAjax(a)}},{key:"runPluginInstall",value:function(e,t){this.setState({progress:"plugins",isFetching:!0,showForm:!1});var a=new FormData;a.append("action","kadence_import_install_plugins"),a.append("security",kadenceStarterParams.ajax_nonce),a.append("selected",e),a.append("builder",t),this.runAjax(a)}},{key:"runSubscribe",value:function(e){this.setState({progress:"subscribe",isFetching:!0,showForm:!1});var t=new FormData;t.append("action","kadence_import_subscribe"),t.append("security",kadenceStarterParams.ajax_nonce),t.append("email",e),this.runAjax(t)}},{key:"runPageAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(a,r,n){if(void 0!==a.status&&"newAJAX"===a.status)t.state.progress="contentNew",t.runPageAjax(e);else if(void 0!==a.status&&"subscribeSuccess"===a.status){t.setState({progress:"plugins"}),(s=new FormData).append("action","kadence_import_install_plugins"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("selected",t.state.activeTemplate),s.append("builder",t.state.starterSettings.builderType),s.append("page_id",t.state.selectedPage),t.runPageAjax(s)}else if(void 0!==a.status&&"pluginSuccess"===a.status){var s;t.setState({progress:"content"}),(s=new FormData).append("action","kadence_import_single_data"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("selected",t.state.activeTemplate),s.append("builder",t.state.starterSettings.builderType),s.append("page_id",t.state.selectedPage),s.append("override_colors",t.state.overrideColors),s.append("override_fonts",t.state.overrideFonts),s.append("palette",t.state.colorPalette),s.append("font",t.state.fontPair),t.runPageAjax(s)}else void 0!==a.message?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",showForm:!0,response:"<p>"+a.message+"</p>"}):"emailDomainPostError"===a||"emailDomainPreError"===a?t.setState({isFetching:!1,progress:"",showForm:!0,emailError:!0}):t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",showForm:!0,response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+a+"</p></div>"})})).fail((function(e){t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,progress:"",showForm:!0,response:'<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"})}))}},{key:"runAjax",value:function(e){var t=this;jQuery.ajax({method:"POST",url:kadenceStarterParams.ajax_url,data:e,contentType:!1,processData:!1}).done((function(a,r,n){if(void 0!==a.status&&"newAJAX"===a.status)t.state.progress="contentNew",t.runAjax(e);else if(void 0!==a.status&&"customizerAJAX"===a.status){(s=new FormData).append("security",kadenceStarterParams.ajax_nonce),t.state.installCustomizer?(t.setState({progress:"customizer"}),s.append("action","kadence_import_customizer_data"),s.append("wp_customize","on")):(t.setState({progress:"widgets"}),s.append("action","kadence_after_import_data")),t.runAjax(s)}else if(void 0!==a.status&&"afterAllImportAJAX"===a.status){t.setState({progress:"widgets"}),(s=new FormData).append("action","kadence_after_import_data"),s.append("security",kadenceStarterParams.ajax_nonce),t.runAjax(s)}else if(void 0!==a.status&&"pluginSuccess"===a.status){(s=new FormData).append("security",kadenceStarterParams.ajax_nonce),t.state.installContent?(t.setState({progress:"content"}),s.append("action","kadence_import_demo_data"),s.append("builder",t.state.starterSettings.builderType),s.append("selected",t.state.activeTemplate),s.append("palette",t.state.colorPalette),s.append("font",t.state.fontPair)):t.state.installCustomizer?(t.setState({progress:"customizer"}),s.append("action","kadence_import_customizer_data"),s.append("wp_customize","on")):(t.setState({progress:"widgets"}),s.append("action","kadence_after_import_data")),t.runAjax(s)}else if(void 0!==a.status&&"removeSuccess"===a.status){t.setState({progress:"plugins"}),(s=new FormData).append("action","kadence_import_install_plugins"),s.append("security",kadenceStarterParams.ajax_nonce),s.append("selected",t.state.activeTemplate),s.append("builder",t.state.starterSettings.builderType),t.runAjax(s)}else if(void 0!==a.status&&"subscribeSuccess"===a.status){var s=new FormData;t.state.removePast?(this.setState({progress:"remove"}),s.append("action","kadence_remove_past_import_data")):(t.setState({progress:"plugins"}),s.append("action","kadence_import_install_plugins")),s.append("security",kadenceStarterParams.ajax_nonce),s.append("selected",t.state.activeTemplate),s.append("builder",t.state.starterSettings.builderType),t.runAjax(s)}else void 0!==a.message?t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",showForm:!0,response:"<p>"+a.message+"</p>"}):void 0===a.success||a.success?(console.log(a),t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",showForm:!0,response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+a+"</p></div>"})):t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",showForm:!0,response:'<div class="notice kadence_starter_templates_response notice-error"><p>'+Z("Failed Import. Something went wrong internally. Please try again.","kadence-starter-templates")+"</p></div>"})})).fail((function(e){console.log(e),t.setState({finished:!0,hasContent:!0,hasPastContent:!0,isFetching:!1,colorPalette:"",fontPair:"",focusMode:!1,isImporting:!1,isSelected:!1,isPageSelected:!1,progress:"",showForm:!0,response:'<div class="notice kadence_starter_templates_response notice-error"><p>Error: '+e.statusText+" ("+e.status+")</p></div>"})}))}},{key:"render",value:function(){for(var e=this,t=["all"],a=0;a<this.state.templates.length;a++)for(var r=0;r<this.state.templates[a].categories.length;r++)t.includes(this.state.templates[a].categories[r])||t.push(this.state.templates[a].categories[r]);t.map((function(t){return{value:t,label:e.capitalizeFirstLetter(t)}}));var n=Z("Gutenberg","kadence-starter-templates"),s=he;"elementor"===this.state.starterSettings.builderType&&(n=Z("Elementor","kadence-starter-templates"),s=ve),"custom"===this.state.starterSettings.builderType&&(n=kadenceStarterParams.custom_name?kadenceStarterParams.custom_name:Z("Pro Designs","kadence-starter-templates"),s=kadenceStarterParams.custom_icon?Object(h.createElement)("img",{className:"components-menu-items__item-icon custom-image-icon-src",src:kadenceStarterParams.custom_icon}):be);var c=!(!this.state.isSaving&&!1!==this.state.activeTemplates&&!this.state.errorTemplates),o=function(){var t=e.state.activeTemplates[e.state.activeTemplate],a=!1;return Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages[e.state.selectedPage].image,alt:t.pages[e.state.selectedPage].title}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("h2",null,Z("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name),Object(h.createElement)("br",null)," ",Z("Selected Page:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.pages[e.state.selectedPage].title))),Object(h.createElement)(fe,{title:Z("Advanced Settings","kadence-blocks"),initialOpen:e.state.settingOpen,onToggle:function(t){return e.state.settingOpen?e.setState({settingOpen:!1}):e.setState({settingOpen:!0})}},Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,Z("Page Template Plugins","kadence-starter-templates"))),e.state.isLoadingPlugins&&Object(h.createElement)(ce,null),!e.state.activePlugins&&!e.state.isLoadingPlugins&&Object(h.createElement)(te,null,e.loadPluginData(t.slug,e.state.starterSettings.builderType)),e.state.activePlugins&&Object(h.createElement)(te,null,e.state.templatePlugins&&"error"!==e.state.templatePlugins&&Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(e.state.templatePlugins,(function(e){var t=e.state,r=e.src,n=e.title;return"active"!==t&&"bundle"===r&&(a=!0),"active"===t||"thirdparty"!==r&&"unknown"!==r||(pluginsPremium=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==t&&"bundle"===r?" bundle-install-required":"")},n," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===t?Z("Not Installed","kadence-starter-templates"):t)," ","active"!==t&&"thirdparty"===r?Object(h.createElement)("span",{class:"plugin-install-required"},Z("Please install and activate this third-party premium plugin")):"")}))),e.state.templatePlugins&&"error"===e.state.templatePlugins&&Object(h.createElement)(te,null,Object(h.createElement)("p",{className:"desc-small install-third-party-notice"},Z("*Error accessing active plugin information, you may import but first manually check that you have installed all required plugins.","kadence-starter-templates")),Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(t.plugins,(function(e){return kadenceStarterParams.plugins[e]?("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src&&(a=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src?" bundle-install-required":"")},kadenceStarterParams.plugins[e].title," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===kadenceStarterParams.plugins[e].state?Z("Not Installed","kadence-starter-templates"):kadenceStarterParams.plugins[e].state)," ","active"!==kadenceStarterParams.plugins[e].state&&"thirdparty"===kadenceStarterParams.plugins[e].src?Object(h.createElement)("span",{class:"plugin-install-required"},Z("Please install and activate this third-party premium Plugin")):"")):Object(h.createElement)("li",{className:"plugin-required"},e," - ",Object(h.createElement)("span",{class:"plugin-status"},Z("Unknown","kadence-starter-templates")))}))))),Object(h.createElement)("p",{className:"desc-small note-about-colors"},Z("*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.","kadence-starter-templates")),Object(h.createElement)(pe,{label:Z("Override Your Sites Global Colors?","kadence-starter-templates"),checked:void 0!==e.state.overrideColors&&e.state.overrideColors,onChange:function(t){return e.state.overrideColors?e.setState({overrideColors:!1}):e.setState({isOpenCheckColor:!0})}}),e.state.isOpenCheckColor?Object(h.createElement)(se,{className:"ksp-confirm-modal",title:Z("Override Your Sites Colors on Import?","kadence-starter-templates"),onRequestClose:function(){e.setState({isOpenCheckColor:!1})}},Object(h.createElement)("p",{className:"desc-small note-about-colors"},Z("This will override the customizer settings for global colors on your current site when you import this page template.","kadence-starter-templates")),Object(h.createElement)("div",{className:"ksp-override-model-buttons"},Object(h.createElement)(le,{className:"ksp-cancel-override",onClick:function(){e.setState({isOpenCheckColor:!1,overrideColors:!1})}},Z("Cancel","kadence-starter-templates")),Object(h.createElement)(le,{className:"ksp-do-override",isPrimary:!0,onClick:function(){e.setState({isOpenCheckColor:!1,overrideColors:!0})}},Z("Override Colors","kadence-starter-templates")))):null,e.state.overrideColors&&e.state.colorPalette&&Object(h.createElement)(te,null,Object(h.createElement)("h3",null,Z("Selected Color Palette","kadence-starter-templates")),j()(e.state.palettes,(function(t){var a=t.palette,r=t.colors;if(a===e.state.colorPalette)return Object(h.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},j()(r,(function(e,t){return Object(h.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(h.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),Object(h.createElement)(pe,{label:Z("Override Your Sites Fonts?","kadence-starter-templates"),checked:void 0!==e.state.overrideFonts&&e.state.overrideFonts,onChange:function(t){return e.state.overrideFonts?e.setState({overrideFonts:!1}):e.setState({isOpenCheckFont:!0})}}),e.state.isOpenCheckFont?Object(h.createElement)(se,{className:"ksp-confirm-modal",title:Z("Override Your Sites Fonts on Import?","kadence-starter-templates"),onRequestClose:function(){e.setState({isOpenCheckFont:!1})}},Object(h.createElement)("p",{className:"desc-small note-about-colors"},Z("This will override the customizer typography settings on your current site when you import this page template.","kadence-starter-templates")),Object(h.createElement)("div",{className:"ksp-override-model-buttons"},Object(h.createElement)(le,{className:"ksp-cancel-override",onClick:function(){e.setState({isOpenCheckFont:!1,overrideFonts:!1})}},Z("Cancel","kadence-starter-templates")),Object(h.createElement)(le,{className:"ksp-do-override",isPrimary:!0,onClick:function(){e.setState({isOpenCheckFont:!1,overrideFonts:!0})}},Z("Override Fonts","kadence-starter-templates")))):null,e.state.fontPair&&e.state.overrideFonts&&Object(h.createElement)(te,null,Object(h.createElement)("h3",{className:"kst-selected-font-pair-title"},Z("Selected Font Pair","kadence-starter-templates")),j()(e.state.fonts,(function(t){var a=t.font,r=t.img,n=t.name;if(a===e.state.fontPair)return Object(h.createElement)("div",{className:"kst-selected-font-pair"},Object(h.createElement)("img",{src:r,className:"font-pairing"}),Object(h.createElement)("h4",null,n))})))),"subscribe"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.subscribe_progress),"plugins"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),e.state.isFetching&&Object(h.createElement)(ce,null),!kadenceStarterParams.isKadence&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,Z("This Template Requires the Kadence Theme","kadence-starter-templates")),Object(h.createElement)(ue,{href:"https://kadence-theme.com/"},Z("Get Free Theme","kadence-starter-templates"))),kadenceStarterParams.isKadence&&Object(h.createElement)(te,null,a&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,Z("Install Missing/Inactive Highlighted Premium plugins to Import","kadence-starter-templates")),Object(h.createElement)(ue,{href:"https://www.kadencewp.com/my-account/"},Z("Pro Account","kadence-starter-templates"))),!a&&Object(h.createElement)(te,null,e.state.showForm&&!e.state.isSubscribed&&Object(h.createElement)(te,null,Object(h.createElement)(G,{emailError:e.state.emailError,onRun:function(t){return e.runSubscribeSingle(t)}}),Object(h.createElement)(le,{className:"kb-skip-start subscribe",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.runPluginInstallSingle(t.slug,e.state.selectedPage,e.state.starterSettings.builderType)}},Z("Skip, start importing page","kadence-starter-templates"))),e.state.showForm&&e.state.isSubscribed&&Object(h.createElement)(te,null,Object(h.createElement)(le,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.runPluginInstallSingle(t.slug,e.state.selectedPage,e.state.starterSettings.builderType)}},Z("Start Importing Page","kadence-starter-templates"))))))))},i=function(){var t=e.state.activeTemplates[e.state.activeTemplate],a=!1,r=!1;return Object(h.createElement)(te,null,Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages&&t.pages.home&&t.pages.home.image?t.pages.home.image:t.image,alt:t.name}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("h2",null,Z("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name)))))),Object(h.createElement)(se,{className:"kst-import-modal",title:Z("Import Starter Template"),onRequestClose:function(){return!e.state.isFetching&&e.setState({activeTemplate:"",activePlugins:!1,colorPalette:"",focusMode:!1,isImporting:!1,progress:""})}},!kadenceStarterParams.isKadence&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,Z("This Starter Template Requires the Kadence Theme","kadence-starter-templates")),Object(h.createElement)(ue,{href:"https://kadence-theme.com/"},Z("Get Free Theme","kadence-starter-templates"))),kadenceStarterParams.isKadence&&Object(h.createElement)(te,null,e.state.hasContent&&Object(h.createElement)("div",{className:"kadence_starter_templates_notice"},e.state.hasPastContent?Object(h.createElement)(te,null,kadenceStarterParams.notice_previous):Object(h.createElement)(te,null,kadenceStarterParams.notice)),e.state.hasPastContent&&Object(h.createElement)(te,null,Object(h.createElement)(pe,{label:Z("Delete Previously Imported Posts and Images?","kadence-starter-templates"),checked:void 0!==e.state.removePast&&e.state.removePast,onChange:function(t){return e.state.removePast?e.setState({removePast:!1}):e.setState({removePast:!0})}})),Object(h.createElement)(fe,{title:Z("Import Details","kadence-blocks"),initialOpen:!1},Object(h.createElement)("div",{className:"required-plugins-list"},Object(h.createElement)("h3",{className:"required-plugins-list-header"},Z("Required Plugins","kadence-starter-templates")),e.state.isLoadingPlugins&&Object(h.createElement)(ce,null),!e.state.activePlugins&&!e.state.isLoadingPlugins&&Object(h.createElement)(te,null,e.loadPluginData(t.slug,e.state.starterSettings.builderType)),e.state.activePlugins&&Object(h.createElement)(te,null,e.state.templatePlugins&&"error"!==e.state.templatePlugins&&Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(e.state.templatePlugins,(function(e){var t=e.state,n=e.src,s=e.title;return"active"!==t&&"bundle"===n&&(r=!0),"active"===t||"thirdparty"!==n&&"unknown"!==n||(a=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==t&&"bundle"===n?" bundle-install-required":"")},s," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===t?Z("Not Installed","kadence-starter-templates"):t)," ","active"!==t&&"thirdparty"===n?Object(h.createElement)("span",{class:"plugin-install-required"},Z("Please install and activate this third-party premium plugin")):"")}))),e.state.templatePlugins&&"error"===e.state.templatePlugins&&Object(h.createElement)(te,null,Object(h.createElement)("p",{className:"desc-small install-third-party-notice"},Z("*Error accessing active plugin information, you may import but first manually check that you have installed all required plugins.","kadence-starter-templates")),Object(h.createElement)("ul",{className:"kadence-required-wrap"},j()(t.plugins,(function(e){return kadenceStarterParams.plugins[e]?("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src&&(r=!0),Object(h.createElement)("li",{className:"plugin-required".concat("active"!==kadenceStarterParams.plugins[e].state&&"bundle"===kadenceStarterParams.plugins[e].src?" bundle-install-required":"")},kadenceStarterParams.plugins[e].title," - ",Object(h.createElement)("span",{class:"plugin-status"},"notactive"===kadenceStarterParams.plugins[e].state?Z("Not Installed","kadence-starter-templates"):kadenceStarterParams.plugins[e].state)," ","active"!==kadenceStarterParams.plugins[e].state&&"thirdparty"===kadenceStarterParams.plugins[e].src?Object(h.createElement)("span",{class:"plugin-install-required"},Z("Please install and activate this third-party premium Plugin")):"")):Object(h.createElement)("li",{className:"plugin-required"},e," - ",Object(h.createElement)("span",{class:"plugin-status"},Z("Unknown","kadence-starter-templates")))})))))),e.state.colorPalette&&Object(h.createElement)(te,null,Object(h.createElement)("h3",null,Z("Selected Color Palette","kadence-starter-templates")),j()(e.state.palettes,(function(t){var a=t.palette,r=t.colors;if(a===e.state.colorPalette)return Object(h.createElement)("div",{className:"kst-palette-btn kst-selected-color-palette"},j()(r,(function(e,t){return Object(h.createElement)("div",{key:t,style:{width:22,height:22,marginBottom:0,marginRight:"3px",transform:"scale(1)",transition:"100ms transform ease"},className:"kadence-swatche-item-wrap"},Object(h.createElement)("span",{className:"kadence-swatch-item",style:{height:"100%",display:"block",width:"100%",border:"1px solid rgb(218, 218, 218)",borderRadius:"50%",color:"".concat(e),boxShadow:"inset 0 0 0 ".concat(15,"px"),transition:"100ms box-shadow ease"}}))})))}))),e.state.fontPair&&Object(h.createElement)(te,null,Object(h.createElement)("h3",{className:"kst-selected-font-pair-title"},Z("Selected Font Pair","kadence-starter-templates")),j()(e.state.fonts,(function(t){var a=t.font,r=t.img,n=t.name;if(a===e.state.fontPair)return Object(h.createElement)("div",{className:"kst-selected-font-pair"},Object(h.createElement)("img",{src:r,className:"font-pairing"}),Object(h.createElement)("h4",null,n))})))),Object(h.createElement)(fe,{title:Z("Advanced Settings","kadence-blocks"),initialOpen:!1},Object(h.createElement)(pe,{label:Z("Import Customizer Settings","kadence-starter-templates"),checked:void 0!==e.state.installCustomizer&&e.state.installCustomizer,onChange:function(t){return e.state.installCustomizer?e.setState({installCustomizer:!1}):e.setState({installCustomizer:!0})}}),Object(h.createElement)(pe,{label:Z("Import Content","kadence-starter-templates"),checked:void 0!==e.state.installContent&&e.state.installContent,onChange:function(t){return e.state.installContent?e.setState({installContent:!1}):e.setState({installContent:!0})}})),a&&Object(h.createElement)("p",{className:"desc-small install-third-party-notice"},Z("*This starter template requires premium third-party plugins. Please install missing/inactive premium plugins to import.","kadence-starter-templates")),"subscribe"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.subscribe_progress),"remove"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.remove_progress),"plugins"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.plugin_progress),"content"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_progress),"contentNew"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.content_new_progress),"customizer"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.customizer_progress),"widgets"===e.state.progress&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},kadenceStarterParams.widgets_progress),e.state.isFetching&&Object(h.createElement)(ce,null),kadenceStarterParams.isKadence&&Object(h.createElement)(te,null,a&&Object(h.createElement)(te,null,r&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,Z("Install Missing/Inactive Highlighted Premium plugins to Import","kadence-starter-templates")),Object(h.createElement)(ue,{href:"https://www.kadencewp.com/my-account/"},Z("Pro Account","kadence-starter-templates"))),!r&&Object(h.createElement)(le,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.state.removePast?e.runRemovePast(t.slug,e.state.starterSettings.builderType):e.runPluginInstall(t.slug,e.state.starterSettings.builderType)}},Z("Skip and Import with Partial Content"))),!a&&Object(h.createElement)(te,null,r&&Object(h.createElement)("div",{class:"kadence_starter_templates_response"},Object(h.createElement)("h2",null,Z("Install Missing/Inactive Highlighted Premium plugins to Import","kadence-starter-templates")),Object(h.createElement)(ue,{href:"https://www.kadencewp.com/my-account/"},Z("Pro Account","kadence-starter-templates"))),!r&&Object(h.createElement)(te,null,e.state.showForm&&!e.state.isSubscribed&&Object(h.createElement)(te,null,Object(h.createElement)(G,{emailError:e.state.emailError,onRun:function(t){return e.runSubscribe(t)}}),Object(h.createElement)(le,{className:"kb-skip-start",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.state.removePast?e.runRemovePast(t.slug,e.state.starterSettings.builderType):e.runPluginInstall(t.slug,e.state.starterSettings.builderType)}},Z("Skip, Start Importing"))),e.state.showForm&&e.state.isSubscribed&&Object(h.createElement)(te,null,Object(h.createElement)(le,{className:"kt-defaults-save",isPrimary:!0,disabled:e.state.isFetching,onClick:function(){e.state.removePast?e.runRemovePast(t.slug,e.state.starterSettings.builderType):e.runPluginInstall(t.slug,e.state.starterSettings.builderType)}},Z("Start Importing Page","kadence-starter-templates")))))))))},l=function(){var t=e.state.activeTemplates[e.state.activeTemplate];return Object(h.createElement)(te,null,Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,Z("Page Templates","kadence-starter-templates"))),Object(h.createElement)("div",{className:"templates-grid"},j()(t.pages,(function(t){var a=t.title,r=t.id,n=t.thumbnail;return Object(h.createElement)("div",{className:"kst-template-item"},Object(h.createElement)(le,{key:r,className:"kst-import-btn",isSmall:!0,onClick:function(){return e.selectedMode(r)}},Object(h.createElement)(y.a,{offsetBottom:200},Object(h.createElement)("img",{src:n,alt:a})),Object(h.createElement)("div",{className:"demo-title"},Object(h.createElement)("h4",null,a," ",Object(h.createElement)("span",null,Z("View Details","kadence-starter-templates"))))))}))),Object(h.createElement)("div",{className:"kst-import-selection-bottom"},Object(h.createElement)(le,{className:"kt-import-fullsite",isPrimary:!0,onClick:function(){return e.selectedFullMode()}},Z("Import Full Site","kadence-starter-templates")))))},u=function(){var t=e;return Object(h.createElement)("div",{className:"templates-grid"},Object.keys(e.state.activeTemplates).map((function(e,a){var r=t.state.activeTemplates[e].name,n=t.state.activeTemplates[e].slug,s=t.state.activeTemplates[e].image,c=t.state.activeTemplates[e].categories,o=t.state.activeTemplates[e].keywords,i=t.state.activeTemplates[e].pro,l=(t.state.activeTemplates[e].member,t.state.activeTemplates[e].pages);if(("all"===t.state.category||c.includes(t.state.category))&&(!t.state.search||o&&o.some((function(e){return e.toLowerCase().includes(t.state.search.toLowerCase())}))))return Object(h.createElement)("div",{className:"kst-template-item"},Object(h.createElement)(le,{key:e,className:"kst-import-btn",isSmall:!0,onClick:function(){return"custom"===t.state.starterSettings.builderType?t.jumpToImport(n):t.fullFocusMode(n)}},Object(h.createElement)(y.a,{offsetBottom:200},Object(h.createElement)("img",{src:l&&l.home&&l.home.thumbnail?l.home.thumbnail:s,alt:r})),Object(h.createElement)("div",{className:"demo-title"},Object(h.createElement)("h4",null,r))),void 0!==i&&i&&Object(h.createElement)(te,null,Object(h.createElement)("span",{className:"kb-pro-template"},Z("Pro","kadence-starter-sites"))))})))},p=function(){var t=e.state.activeTemplates[e.state.activeTemplate];return Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages[e.state.selectedPage].image,alt:t.pages[e.state.selectedPage].title}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("h2",null,Z("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name),Object(h.createElement)("br",null)," ",Z("Selected Page:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.pages[e.state.selectedPage].title))),Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,Z("Import complete!","kadence-starter-templates")),Object(h.createElement)("div",{class:"kadence_starter_templates_finished"},Object(h.createElement)("div",{dangerouslySetInnerHTML:{__html:e.state.response}}))))))},m=function(){var t=e.state.activeTemplates[e.state.activeTemplate];return Object(h.createElement)("div",{className:"kst-grid-single-site"},Object(h.createElement)("div",{className:"kst-import-selection-item"},Object(h.createElement)("div",{className:"kst-import-selection"},Object(h.createElement)("img",{src:t.pages&&t.pages.home&&t.pages.home.image?t.pages.home.image:t.image}))),Object(h.createElement)("div",{className:"kst-import-selection-options"},Object(h.createElement)("div",{className:"kst-import-single-selection-options-wrap"},Object(h.createElement)("div",{className:"kst-import-selection-title"},Object(h.createElement)("h2",null,Z("Template:","kadence-starter-templates")," ",Object(h.createElement)("span",null,t.name))),Object(h.createElement)("div",{className:"kst-import-grid-title"},Object(h.createElement)("h2",null,Z("Import complete!","kadence-starter-templates")),Object(h.createElement)("div",{class:"kadence_starter_templates_finished"},Object(h.createElement)("div",{dangerouslySetInnerHTML:{__html:e.state.response}}))))))};return Object(h.createElement)(te,null,Object(h.createElement)("div",{class:"kadence_theme_dash_head"},Object(h.createElement)("div",{class:"kadence_theme_dash_head_container"},Object(h.createElement)("div",{class:"kadence_theme_dash_logo"},Object(h.createElement)("img",{src:this.state.logo})),this.state.focusMode&&Object(h.createElement)("div",{class:"kadence_theme_dash_back"},this.state.isPageSelected?Object(h.createElement)(de,{text:Z("Back to Individual Pages Grid")},Object(h.createElement)(le,{className:"kt-import-back",icon:K,onClick:function(){return!e.state.isFetching&&e.setState({colorPalette:"",finished:!1,selectedPage:"home",focusMode:!0,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:""})}})):Object(h.createElement)(de,{text:Z("Back to Starter Templates Grid")},Object(h.createElement)(le,{className:"kt-import-back",icon:K,onClick:function(){return e.backToDash()}}))),this.state.finished&&Object(h.createElement)("div",{class:"kadence_theme_dash_back"},Object(h.createElement)(de,{text:Z("Back to Starter Templates Grid")},Object(h.createElement)(le,{className:"kt-import-back",icon:K,onClick:function(){return e.backToDash()}}))),Object(h.createElement)("div",{class:"kadence_starter_builder_type"},this.state.starterSettings&&this.state.starterSettings.builderType&&Object(h.createElement)(oe,{className:"my-container-class-name",contentClassName:"kst-type-popover",position:"bottom left",renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(h.createElement)(le,{onClick:a,"aria-expanded":t,icon:s},n,Object(h.createElement)(ie,{className:"kst-chev",icon:J}))},renderContent:function(t){t.isOpen;var a=t.onToggle;return Object(h.createElement)("div",null,Object(h.createElement)(me,{icon:he,className:"blocks"===e.state.starterSettings.builderType?"active-item":"",isSelected:"blocks"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","blocks"),e.setState({activeTemplate:"",activePlugins:!1,colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:"",activeTemplates:!1}),a()}},Z("Gutenberg","kadence-starter-templates")),Object(h.createElement)(me,{icon:ve,className:"elementor"===e.state.starterSettings.builderType?"active-item":"",isSelected:"elementor"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","elementor"),e.setState({activeTemplate:"",activePlugins:!1,colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:"",activeTemplates:!1}),a()}},Z("Elementor","kadence-starter-templates")),kadenceStarterParams.ctemplates&&Object(h.createElement)(me,{icon:kadenceStarterParams.custom_icon?Object(h.createElement)("img",{className:"custom-image-icon-src",src:kadenceStarterParams.custom_icon}):be,className:"custom"===e.state.starterSettings.builderType?"active-item":"",isSelected:"custom"===e.state.starterSettings.builderType,onClick:function(){e.saveConfig("builderType","custom"),e.setState({activeTemplate:"",activePlugins:!1,colorPalette:"",finished:!1,selectedPage:"home",focusMode:!1,isSelected:!1,isPageSelected:!1,isImporting:!1,progress:"",activeTemplates:!1}),a()}},kadenceStarterParams.custom_name?kadenceStarterParams.custom_name:Z("Pro Designs","kadence-starter-templates")))}})),!1!==this.state.activeTemplates&&this.state.starterSettings.builderType&&Object(h.createElement)("div",{class:"kadence_theme_dash_reload"},Object(h.createElement)(de,{text:Z("Sync with Cloud")},Object(h.createElement)(le,{className:"kt-reload-templates",icon:U,onClick:function(){return e.reloadTemplateData()}}))))),Object(h.createElement)("div",{class:"kadence_theme_starter_dash_inner"},this.state.starterSettings&&this.state.starterSettings.builderType?Object(h.createElement)((function(){return Object(h.createElement)(te,null,c?Object(h.createElement)("div",{className:"main-panel"},Object(h.createElement)("div",{className:"kst-overlay-saving"},!e.state.errorTemplates&&Object(h.createElement)(ce,null),e.state.errorTemplates&&Object(h.createElement)(te,null,Object(h.createElement)("h2",{style:{textAlign:"center"}},Z("Error, Unable to access template database, please try re-downloading","kadence-starter-templates")),Object(h.createElement)("div",{style:{textAlign:"center"}},Object(h.createElement)(le,{className:"kt-reload-templates",icon:U,onClick:function(){return e.reloadTemplateData()}},Z(" Sync with Cloud","kadence-starter-templates")))),!1===e.state.activeTemplates&&Object(h.createElement)(te,null,e.loadTemplateData()))):Object(h.createElement)("div",{className:"main-panel"},e.state.focusMode&&Object(h.createElement)(te,null,e.state.isImporting&&Object(h.createElement)(te,null,e.state.isPageSelected?Object(h.createElement)(o,null):Object(h.createElement)(i,null)),!e.state.isImporting&&e.state.isSelected&&Object(h.createElement)(M,{item:e.state.activeTemplates[e.state.activeTemplate],colorPalette:e.state.colorPalette,fontPair:e.state.fontPair,onChange:function(t){e.setState(t)}}),!e.state.isImporting&&!e.state.isSelected&&Object(h.createElement)(l,null)),!e.state.focusMode&&!e.state.finished&&Object(h.createElement)(u,null),e.state.finished&&Object(h.createElement)(te,null,e.state.isPageSelected?Object(h.createElement)(p,null):Object(h.createElement)(m,null))))}),null):Object(h.createElement)((function(){return Object(h.createElement)("div",{className:"kst-choose-builder-wrap".concat(kadenceStarterParams.ctemplates?" adjust-to-three-column":"")},Object(h.createElement)("div",{className:"kst-choose-builder-center"},Object(h.createElement)("h2",{className:"kst-choose-builder-title"},Z("Choose a Builder","kadence-starter-templates")),Object(h.createElement)("div",{className:"kst-choose-builder-inner"},kadenceStarterParams.ctemplates&&Object(h.createElement)(le,{icon:kadenceStarterParams.custom_icon?Object(h.createElement)("img",{className:"custom-image-icon-src",src:kadenceStarterParams.custom_icon}):be,className:"kt-import-select-type",onClick:function(){e.saveConfig("builderType","custom")}},kadenceStarterParams.custom_name?kadenceStarterParams.custom_name:Z("Pro Designs","kadence-starter-templates")),Object(h.createElement)(le,{icon:he,className:"kt-import-select-type",onClick:function(){e.saveConfig("builderType","blocks")}},Z("Gutenberg","kadence-starter-templates")),Object(h.createElement)(le,{icon:ve,className:"kt-import-select-type",onClick:function(){e.saveConfig("builderType","elementor")}},Z("Elementor","kadence-starter-templates"))),e.state.isSaving&&Object(h.createElement)("div",{className:"kst-overlay-saving"},Object(h.createElement)(ce,null))))}),null)))}}]),a}(ae);wp.domReady((function(){re(Object(h.createElement)(ge,null),document.querySelector(".kadence_starter_dashboard_main"))}))}]);
|
class-kadence-starter-templates.php
CHANGED
@@ -159,6 +159,7 @@ class Starter_Templates {
|
|
159 |
add_action( 'wp_ajax_kadence_after_import_data', array( $this, 'after_all_import_data_ajax_callback' ) );
|
160 |
add_action( 'wp_ajax_kadence_import_single_data', array( $this, 'import_demo_single_data_ajax_callback' ) );
|
161 |
add_action( 'wp_ajax_kadence_remove_past_import_data', array( $this, 'remove_past_data_ajax_callback' ) );
|
|
|
162 |
add_action( 'wp_ajax_kadence_check_plugin_data', array( $this, 'check_plugin_data_ajax_callback' ) );
|
163 |
add_action( 'wp_ajax_kadence_starter_dismiss_notice', array( $this, 'ajax_dismiss_starter_notice' ) );
|
164 |
}
|
@@ -171,8 +172,6 @@ class Starter_Templates {
|
|
171 |
add_action( 'kadence-starter-templates/after_import', array( $this, 'kadence_elementor_after_import' ), 20, 3 );
|
172 |
|
173 |
add_filter( 'plugin_action_links_kadence-starter-templates/kadence-starter-templates.php', array( $this, 'add_settings_link' ) );
|
174 |
-
add_action( 'kadence_theme_dash_side_panel', array( $this, 'possibly_render_upsell' ) );
|
175 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'notice_starter_script' ) );
|
176 |
}
|
177 |
/**
|
178 |
* Set plugin constants.
|
@@ -188,7 +187,7 @@ class Starter_Templates {
|
|
188 |
define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
189 |
}
|
190 |
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
|
191 |
-
define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.2.
|
192 |
}
|
193 |
}
|
194 |
|
@@ -221,6 +220,9 @@ class Starter_Templates {
|
|
221 |
if ( class_exists( 'woocommerce' ) && isset( $selected_import['ecommerce'] ) && $selected_import['ecommerce'] ) {
|
222 |
$this->import_demo_woocommerce();
|
223 |
}
|
|
|
|
|
|
|
224 |
if ( isset( $selected_import['menus'] ) && is_array( $selected_import['menus'] ) ) {
|
225 |
$menus_array = array();
|
226 |
foreach ( $selected_import['menus'] as $key => $value ) {
|
@@ -552,6 +554,7 @@ class Starter_Templates {
|
|
552 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-helpers.php';
|
553 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-actions.php';
|
554 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-widget-importer.php';
|
|
|
555 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-logger.php';
|
556 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-logger-cli.php';
|
557 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-importer.php';
|
@@ -659,6 +662,16 @@ class Starter_Templates {
|
|
659 |
'state' => Plugin_Check::active_check( 'tutor/tutor.php' ),
|
660 |
'src' => 'repo',
|
661 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
662 |
);
|
663 |
$palettes = array(
|
664 |
array(
|
@@ -872,6 +885,9 @@ class Starter_Templates {
|
|
872 |
} else {
|
873 |
$pro_data = false;
|
874 |
}
|
|
|
|
|
|
|
875 |
wp_enqueue_style( 'kadence-starter-templates', KADENCE_STARTER_TEMPLATES_URL . 'assets/css/starter-templates.css', array( 'wp-components' ), KADENCE_STARTER_TEMPLATES_VERSION );
|
876 |
wp_enqueue_script( 'kadence-starter-templates', KADENCE_STARTER_TEMPLATES_URL . 'assets/js/starter-templates.js', array( 'jquery', 'wp-i18n', 'wp-element', 'wp-plugins', 'wp-components', 'wp-api', 'wp-hooks', 'wp-edit-post', 'lodash', 'wp-block-library', 'wp-block-editor', 'wp-editor' ), KADENCE_STARTER_TEMPLATES_VERSION, true );
|
877 |
wp_localize_script(
|
@@ -895,11 +911,14 @@ class Starter_Templates {
|
|
895 |
'notice' => esc_html__( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden.', 'kadence-starter-templates' ),
|
896 |
'notice_previous' => esc_html( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden. It is recommended that you enable "Delete Previously Imported Posts and Images" if you are testing out different starter templates.'),
|
897 |
'remove_progress' => esc_html__( 'Removing Past Imported Content', 'kadence-starter-templates' ),
|
|
|
898 |
'plugin_progress' => esc_html__( 'Checking/Installing/Activating Required Plugins', 'kadence-starter-templates' ),
|
899 |
-
'content_progress' => esc_html__( 'Importing
|
900 |
-
'content_new_progress' => esc_html__( 'Importing
|
901 |
-
'widgets_progress' => esc_html__( 'Importing
|
902 |
'customizer_progress' => esc_html__( 'Importing Customizer Settings...', 'kadence-starter-templates' ),
|
|
|
|
|
903 |
)
|
904 |
);
|
905 |
}
|
@@ -1031,6 +1050,20 @@ class Starter_Templates {
|
|
1031 |
'path' => 'tutor/tutor.php',
|
1032 |
'src' => 'repo',
|
1033 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1034 |
);
|
1035 |
$plugin_information = array();
|
1036 |
foreach( $info['plugins'] as $plugin ) {
|
@@ -1125,7 +1158,6 @@ class Starter_Templates {
|
|
1125 |
}
|
1126 |
$info = $this->import_files[ $selected_index ];
|
1127 |
$install = true;
|
1128 |
-
|
1129 |
if ( isset( $info['plugins'] ) && ! empty( $info['plugins'] ) ) {
|
1130 |
|
1131 |
if ( ! function_exists( 'plugins_api' ) ) {
|
@@ -1219,6 +1251,20 @@ class Starter_Templates {
|
|
1219 |
'path' => 'tutor/tutor.php',
|
1220 |
'src' => 'repo',
|
1221 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1222 |
);
|
1223 |
foreach( $info['plugins'] as $plugin ) {
|
1224 |
$path = false;
|
@@ -1295,7 +1341,11 @@ class Starter_Templates {
|
|
1295 |
|
1296 |
$installed = $upgrader->install( $api->download_link );
|
1297 |
if ( $installed ) {
|
1298 |
-
$
|
|
|
|
|
|
|
|
|
1299 |
if ( is_wp_error( $activate ) ) {
|
1300 |
$install = false;
|
1301 |
}
|
@@ -1306,11 +1356,21 @@ class Starter_Templates {
|
|
1306 |
$install = false;
|
1307 |
}
|
1308 |
} elseif ( 'installed' === $state ) {
|
1309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1310 |
if ( is_wp_error( $activate ) ) {
|
1311 |
$install = false;
|
1312 |
}
|
1313 |
}
|
|
|
|
|
|
|
|
|
1314 |
if ( 'kadence-pro' === $base ) {
|
1315 |
$enabled = json_decode( get_option( 'kadence_pro_theme_config' ), true );
|
1316 |
$enabled['elements'] = true;
|
@@ -1329,6 +1389,54 @@ class Starter_Templates {
|
|
1329 |
wp_send_json( array( 'status' => 'pluginSuccess' ) );
|
1330 |
}
|
1331 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1332 |
/**
|
1333 |
* AJAX callback to remove past content..
|
1334 |
*/
|
@@ -1339,7 +1447,8 @@ class Starter_Templates {
|
|
1339 |
wp_send_json_error();
|
1340 |
}
|
1341 |
global $wpdb;
|
1342 |
-
|
|
|
1343 |
$removed_content = true;
|
1344 |
|
1345 |
$post_ids = $wpdb->get_col( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_kadence_starter_templates_imported_post'" );
|
@@ -1845,7 +1954,6 @@ class Starter_Templates {
|
|
1845 |
}
|
1846 |
// Save the initial import data as a transient, so other import parts (in new AJAX calls) can use that data.
|
1847 |
Helpers::set_import_data_transient( $this->get_current_importer_data() );
|
1848 |
-
|
1849 |
if ( ! $this->before_import_executed ) {
|
1850 |
$this->before_import_executed = true;
|
1851 |
|
@@ -1853,6 +1961,8 @@ class Starter_Templates {
|
|
1853 |
* Save Current Theme mods for a potential undo.
|
1854 |
*/
|
1855 |
update_option( '_kadence_starter_templates_old_customizer', get_option( 'theme_mods_' . get_option( 'stylesheet' ) ) );
|
|
|
|
|
1856 |
/**
|
1857 |
* 2). Execute the actions hooked to the 'kadence-starter-templates/before_content_import_execution' action:
|
1858 |
*
|
@@ -1913,8 +2023,6 @@ class Starter_Templates {
|
|
1913 |
do_action( 'kadence-starter-templates/after_content_import_execution', $this->selected_import_files, $this->import_files, $this->selected_index, $this->selected_palette, $this->selected_font );
|
1914 |
// Save the import data as a transient, so other import parts (in new AJAX calls) can use that data.
|
1915 |
Helpers::set_import_data_transient( $this->get_current_importer_data() );
|
1916 |
-
// Save Import data for use if we need to reset it.
|
1917 |
-
update_option( '_kadence_starter_templates_last_import_data', $this->selected_import_files );
|
1918 |
// Request the customizer import AJAX call.
|
1919 |
if ( ! empty( $this->selected_import_files['customizer'] ) ) {
|
1920 |
wp_send_json( array( 'status' => 'customizerAJAX' ) );
|
@@ -2240,38 +2348,5 @@ class Starter_Templates {
|
|
2240 |
// If we got this far, we need to dismiss the notice.
|
2241 |
update_option( 'kadence_starter_templates_dismiss_upsell', true, false );
|
2242 |
}
|
2243 |
-
/**
|
2244 |
-
* Option to Install Starter Templates
|
2245 |
-
*/
|
2246 |
-
public function notice_starter_script() {
|
2247 |
-
wp_register_script( 'kadence-starter-notice', KADENCE_STARTER_TEMPLATES_URL . 'assets/admin-starter-notice.js', array( 'jquery' ), KADENCE_STARTER_TEMPLATES_VERSION, false );
|
2248 |
-
}
|
2249 |
-
/**
|
2250 |
-
* Set plugin constants.
|
2251 |
-
*
|
2252 |
-
* Path/URL to root of this plugin, with trailing slash and plugin version.
|
2253 |
-
*/
|
2254 |
-
public function possibly_render_upsell() {
|
2255 |
-
// Don't render if pro installed.
|
2256 |
-
if ( ! class_exists( 'Kadence_Theme_Pro' ) && ! get_option( 'kadence_starter_templates_dismiss_upsell', false ) ) {
|
2257 |
-
$expires = strtotime( get_date_from_gmt( date( 'Y-m-d H:i:s', strtotime( '08/05/2021' ) ) ) );
|
2258 |
-
$now = strtotime( get_date_from_gmt( current_time( 'Y-m-d H:i:s' ) ) );
|
2259 |
-
if ( $expires > $now ) {
|
2260 |
-
echo '<div class="starter-upsell-wrap" style="margin-bottom:10px;text-align:center;">';
|
2261 |
-
echo '<a href="https://kadence-theme.com/premium/?utm_source=kadence&utm_medium=plugin&utm_campaign=stellar-sale-2021" target="_blank"><img src="' . esc_attr( KADENCE_STARTER_TEMPLATES_URL ) . 'assets/images/stellar-sale-plugin.png" style="max-width:100%; margin-bottom:5px;"></a>';
|
2262 |
-
echo '<a href="#" class="starter-upsell-dismiss" style="font-size:12px; color:#4A5568;">' . esc_html__( 'Dismiss', 'kadence-starter-templates' ) . '</a>';
|
2263 |
-
echo '</div>';
|
2264 |
-
}
|
2265 |
-
wp_enqueue_script( 'kadence-starter-notice' );
|
2266 |
-
wp_localize_script(
|
2267 |
-
'kadence-starter-notice',
|
2268 |
-
'kadenceStarterAdmin',
|
2269 |
-
array(
|
2270 |
-
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
2271 |
-
'ajax_nonce' => wp_create_nonce( 'kadence-starter-ajax-verification' ),
|
2272 |
-
)
|
2273 |
-
);
|
2274 |
-
}
|
2275 |
-
}
|
2276 |
}
|
2277 |
Starter_Templates::get_instance();
|
159 |
add_action( 'wp_ajax_kadence_after_import_data', array( $this, 'after_all_import_data_ajax_callback' ) );
|
160 |
add_action( 'wp_ajax_kadence_import_single_data', array( $this, 'import_demo_single_data_ajax_callback' ) );
|
161 |
add_action( 'wp_ajax_kadence_remove_past_import_data', array( $this, 'remove_past_data_ajax_callback' ) );
|
162 |
+
add_action( 'wp_ajax_kadence_import_subscribe', array( $this, 'subscribe_ajax_callback' ) );
|
163 |
add_action( 'wp_ajax_kadence_check_plugin_data', array( $this, 'check_plugin_data_ajax_callback' ) );
|
164 |
add_action( 'wp_ajax_kadence_starter_dismiss_notice', array( $this, 'ajax_dismiss_starter_notice' ) );
|
165 |
}
|
172 |
add_action( 'kadence-starter-templates/after_import', array( $this, 'kadence_elementor_after_import' ), 20, 3 );
|
173 |
|
174 |
add_filter( 'plugin_action_links_kadence-starter-templates/kadence-starter-templates.php', array( $this, 'add_settings_link' ) );
|
|
|
|
|
175 |
}
|
176 |
/**
|
177 |
* Set plugin constants.
|
187 |
define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
188 |
}
|
189 |
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
|
190 |
+
define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.2.6' );
|
191 |
}
|
192 |
}
|
193 |
|
220 |
if ( class_exists( 'woocommerce' ) && isset( $selected_import['ecommerce'] ) && $selected_import['ecommerce'] ) {
|
221 |
$this->import_demo_woocommerce();
|
222 |
}
|
223 |
+
if ( function_exists( 'tribe_update_option' ) ) {
|
224 |
+
tribe_update_option( 'toggle_blocks_editor', true );
|
225 |
+
}
|
226 |
if ( isset( $selected_import['menus'] ) && is_array( $selected_import['menus'] ) ) {
|
227 |
$menus_array = array();
|
228 |
foreach ( $selected_import['menus'] as $key => $value ) {
|
554 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-helpers.php';
|
555 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-actions.php';
|
556 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-widget-importer.php';
|
557 |
+
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-import-give.php';
|
558 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-logger.php';
|
559 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-logger-cli.php';
|
560 |
require_once KADENCE_STARTER_TEMPLATES_PATH . 'inc/class-importer.php';
|
662 |
'state' => Plugin_Check::active_check( 'tutor/tutor.php' ),
|
663 |
'src' => 'repo',
|
664 |
),
|
665 |
+
'give' => array(
|
666 |
+
'title' => 'GiveWP',
|
667 |
+
'state' => Plugin_Check::active_check( 'give/give.php' ),
|
668 |
+
'src' => 'repo',
|
669 |
+
),
|
670 |
+
'the-events-calendar' => array(
|
671 |
+
'title' => 'The Events Calendar',
|
672 |
+
'state' => Plugin_Check::active_check( 'the-events-calendar/the-events-calendar.php' ),
|
673 |
+
'src' => 'repo',
|
674 |
+
),
|
675 |
);
|
676 |
$palettes = array(
|
677 |
array(
|
885 |
} else {
|
886 |
$pro_data = false;
|
887 |
}
|
888 |
+
$current_user = wp_get_current_user();
|
889 |
+
$user_email = $current_user->user_email;
|
890 |
+
$subscribed = class_exists( 'Kadence_Theme_Pro' ) ? true : get_option( 'kadence_starter_templates_subscribe' );
|
891 |
wp_enqueue_style( 'kadence-starter-templates', KADENCE_STARTER_TEMPLATES_URL . 'assets/css/starter-templates.css', array( 'wp-components' ), KADENCE_STARTER_TEMPLATES_VERSION );
|
892 |
wp_enqueue_script( 'kadence-starter-templates', KADENCE_STARTER_TEMPLATES_URL . 'assets/js/starter-templates.js', array( 'jquery', 'wp-i18n', 'wp-element', 'wp-plugins', 'wp-components', 'wp-api', 'wp-hooks', 'wp-edit-post', 'lodash', 'wp-block-library', 'wp-block-editor', 'wp-editor' ), KADENCE_STARTER_TEMPLATES_VERSION, true );
|
893 |
wp_localize_script(
|
911 |
'notice' => esc_html__( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden.', 'kadence-starter-templates' ),
|
912 |
'notice_previous' => esc_html( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden. It is recommended that you enable "Delete Previously Imported Posts and Images" if you are testing out different starter templates.'),
|
913 |
'remove_progress' => esc_html__( 'Removing Past Imported Content', 'kadence-starter-templates' ),
|
914 |
+
'subscribe_progress' => esc_html__( 'Getting Started', 'kadence-starter-templates' ),
|
915 |
'plugin_progress' => esc_html__( 'Checking/Installing/Activating Required Plugins', 'kadence-starter-templates' ),
|
916 |
+
'content_progress' => esc_html__( 'Importing Content...', 'kadence-starter-templates' ),
|
917 |
+
'content_new_progress' => esc_html__( 'Importing Content... Still Importing.', 'kadence-starter-templates' ),
|
918 |
+
'widgets_progress' => esc_html__( 'Importing Widgets...', 'kadence-starter-templates' ),
|
919 |
'customizer_progress' => esc_html__( 'Importing Customizer Settings...', 'kadence-starter-templates' ),
|
920 |
+
'user_email' => $user_email,
|
921 |
+
'subscribed' => $subscribed,
|
922 |
)
|
923 |
);
|
924 |
}
|
1050 |
'path' => 'tutor/tutor.php',
|
1051 |
'src' => 'repo',
|
1052 |
),
|
1053 |
+
'give' => array(
|
1054 |
+
'title' => 'GiveWP',
|
1055 |
+
'base' => 'give',
|
1056 |
+
'slug' => 'give',
|
1057 |
+
'path' => 'give/give.php',
|
1058 |
+
'src' => 'repo',
|
1059 |
+
),
|
1060 |
+
'the-events-calendar' => array(
|
1061 |
+
'title' => 'The Events Calendar',
|
1062 |
+
'base' => 'the-events-calendar',
|
1063 |
+
'slug' => 'the-events-calendar',
|
1064 |
+
'path' => 'the-events-calendar/the-events-calendar.php',
|
1065 |
+
'src' => 'repo',
|
1066 |
+
),
|
1067 |
);
|
1068 |
$plugin_information = array();
|
1069 |
foreach( $info['plugins'] as $plugin ) {
|
1158 |
}
|
1159 |
$info = $this->import_files[ $selected_index ];
|
1160 |
$install = true;
|
|
|
1161 |
if ( isset( $info['plugins'] ) && ! empty( $info['plugins'] ) ) {
|
1162 |
|
1163 |
if ( ! function_exists( 'plugins_api' ) ) {
|
1251 |
'path' => 'tutor/tutor.php',
|
1252 |
'src' => 'repo',
|
1253 |
),
|
1254 |
+
'give' => array(
|
1255 |
+
'title' => 'GiveWP',
|
1256 |
+
'base' => 'give',
|
1257 |
+
'slug' => 'give',
|
1258 |
+
'path' => 'give/give.php',
|
1259 |
+
'src' => 'repo',
|
1260 |
+
),
|
1261 |
+
'the-events-calendar' => array(
|
1262 |
+
'title' => 'The Events Calendar',
|
1263 |
+
'base' => 'the-events-calendar',
|
1264 |
+
'slug' => 'the-events-calendar',
|
1265 |
+
'path' => 'the-events-calendar/the-events-calendar.php',
|
1266 |
+
'src' => 'repo',
|
1267 |
+
),
|
1268 |
);
|
1269 |
foreach( $info['plugins'] as $plugin ) {
|
1270 |
$path = false;
|
1341 |
|
1342 |
$installed = $upgrader->install( $api->download_link );
|
1343 |
if ( $installed ) {
|
1344 |
+
$silent = ( 'give' === $base || 'elementor' === $base ? false : true );
|
1345 |
+
if ( 'give' === $base ) {
|
1346 |
+
add_option( 'give_install_pages_created', 1, '', false );
|
1347 |
+
}
|
1348 |
+
$activate = activate_plugin( $path, '', false, $silent );
|
1349 |
if ( is_wp_error( $activate ) ) {
|
1350 |
$install = false;
|
1351 |
}
|
1356 |
$install = false;
|
1357 |
}
|
1358 |
} elseif ( 'installed' === $state ) {
|
1359 |
+
//$silent = false;
|
1360 |
+
$silent = ( 'give' === $base || 'elementor' === $base ? false : true );
|
1361 |
+
if ( 'give' === $base ) {
|
1362 |
+
// Make sure give doesn't add it's pages, prevents having two sets.
|
1363 |
+
update_option( 'give_install_pages_created', 1, '', false );
|
1364 |
+
}
|
1365 |
+
$activate = activate_plugin( $path, '', false, $silent );
|
1366 |
if ( is_wp_error( $activate ) ) {
|
1367 |
$install = false;
|
1368 |
}
|
1369 |
}
|
1370 |
+
if ( 'give' === $base ) {
|
1371 |
+
update_option( 'give_version_upgraded_from', '2.13.2' );
|
1372 |
+
//add_option( 'give_install_pages_created', 1, '', false );
|
1373 |
+
}
|
1374 |
if ( 'kadence-pro' === $base ) {
|
1375 |
$enabled = json_decode( get_option( 'kadence_pro_theme_config' ), true );
|
1376 |
$enabled['elements'] = true;
|
1389 |
wp_send_json( array( 'status' => 'pluginSuccess' ) );
|
1390 |
}
|
1391 |
}
|
1392 |
+
/**
|
1393 |
+
* AJAX callback to subscribe..
|
1394 |
+
*/
|
1395 |
+
public function subscribe_ajax_callback() {
|
1396 |
+
Helpers::verify_ajax_call();
|
1397 |
+
$email = empty( $_POST['email'] ) ? '' : sanitize_text_field( $_POST['email'] );
|
1398 |
+
// Do you have the data?
|
1399 |
+
if ( $email && is_email( $email ) && filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
|
1400 |
+
list( $user, $domain ) = explode( '@', $email );
|
1401 |
+
list( $pre_domain, $post_domain ) = explode( '.', $domain );
|
1402 |
+
$spell_issue_domains = array( 'gmaiil', 'gmai', 'gmaill' );
|
1403 |
+
$spell_issue_domain_ends = array( 'local', 'comm', 'orgg', 'cmm' );
|
1404 |
+
if ( in_array( $pre_domain, $spell_issue_domain_ends, true ) ) {
|
1405 |
+
return wp_send_json( 'emailDomainPreError' );
|
1406 |
+
}
|
1407 |
+
if ( in_array( $post_domain, $spell_issue_domain_ends, true ) ) {
|
1408 |
+
return wp_send_json( 'emailDomainPostError' );
|
1409 |
+
}
|
1410 |
+
$args = array(
|
1411 |
+
'email' => $email,
|
1412 |
+
'tag' => 'wire',
|
1413 |
+
'list' => '20',
|
1414 |
+
);
|
1415 |
+
// Get the response.
|
1416 |
+
$api_url = add_query_arg( $args, 'https://www.kadencewp.com/kadence-blocks/wp-json/kadence-subscribe/v1/subscribe/' );
|
1417 |
+
$response = wp_remote_get( $api_url );
|
1418 |
+
// Early exit if there was an error.
|
1419 |
+
if ( is_wp_error( $response ) ) {
|
1420 |
+
return wp_send_json( array( 'status' => 'subscribeSuccess' ) );
|
1421 |
+
}
|
1422 |
+
// Get the CSS from our response.
|
1423 |
+
$contents = wp_remote_retrieve_body( $response );
|
1424 |
+
// Early exit if there was an error.
|
1425 |
+
if ( is_wp_error( $contents ) ) {
|
1426 |
+
return wp_send_json( array( 'status' => 'subscribeSuccess' ) );
|
1427 |
+
}
|
1428 |
+
if ( ! $contents ) {
|
1429 |
+
// Send JSON Error response to the AJAX call.
|
1430 |
+
wp_send_json( array( 'status' => 'subscribeSuccess' ) );
|
1431 |
+
} else {
|
1432 |
+
update_option( 'kadence_starter_templates_subscribe', true );
|
1433 |
+
wp_send_json( array( 'status' => 'subscribeSuccess' ) );
|
1434 |
+
}
|
1435 |
+
}
|
1436 |
+
// Send JSON Error response to the AJAX call.
|
1437 |
+
wp_send_json( 'emailDomainPreError' );
|
1438 |
+
die;
|
1439 |
+
}
|
1440 |
/**
|
1441 |
* AJAX callback to remove past content..
|
1442 |
*/
|
1447 |
wp_send_json_error();
|
1448 |
}
|
1449 |
global $wpdb;
|
1450 |
+
// Prevents elementor from pushing out an confrimation and breaking the import.
|
1451 |
+
$_GET['force_delete_kit'] = true;
|
1452 |
$removed_content = true;
|
1453 |
|
1454 |
$post_ids = $wpdb->get_col( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_kadence_starter_templates_imported_post'" );
|
1954 |
}
|
1955 |
// Save the initial import data as a transient, so other import parts (in new AJAX calls) can use that data.
|
1956 |
Helpers::set_import_data_transient( $this->get_current_importer_data() );
|
|
|
1957 |
if ( ! $this->before_import_executed ) {
|
1958 |
$this->before_import_executed = true;
|
1959 |
|
1961 |
* Save Current Theme mods for a potential undo.
|
1962 |
*/
|
1963 |
update_option( '_kadence_starter_templates_old_customizer', get_option( 'theme_mods_' . get_option( 'stylesheet' ) ) );
|
1964 |
+
// Save Import data for use if we need to reset it.
|
1965 |
+
update_option( '_kadence_starter_templates_last_import_data', $this->import_files[ $this->selected_index ], 'no' );
|
1966 |
/**
|
1967 |
* 2). Execute the actions hooked to the 'kadence-starter-templates/before_content_import_execution' action:
|
1968 |
*
|
2023 |
do_action( 'kadence-starter-templates/after_content_import_execution', $this->selected_import_files, $this->import_files, $this->selected_index, $this->selected_palette, $this->selected_font );
|
2024 |
// Save the import data as a transient, so other import parts (in new AJAX calls) can use that data.
|
2025 |
Helpers::set_import_data_transient( $this->get_current_importer_data() );
|
|
|
|
|
2026 |
// Request the customizer import AJAX call.
|
2027 |
if ( ! empty( $this->selected_import_files['customizer'] ) ) {
|
2028 |
wp_send_json( array( 'status' => 'customizerAJAX' ) );
|
2348 |
// If we got this far, we need to dismiss the notice.
|
2349 |
update_option( 'kadence_starter_templates_dismiss_upsell', true, false );
|
2350 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2351 |
}
|
2352 |
Starter_Templates::get_instance();
|
inc/class-author-meta.php
CHANGED
@@ -142,6 +142,42 @@ class Author_Meta {
|
|
142 |
<span class="description"><?php esc_html_e( 'Please enter your Pinterest url. (be sure to include https://)', 'kadence' ); ?></span>
|
143 |
</td>
|
144 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
</table>
|
146 |
<?php
|
147 |
}
|
@@ -188,6 +224,18 @@ class Author_Meta {
|
|
188 |
if ( isset( $_POST['instagram'] ) ) {
|
189 |
update_user_meta( $user_id, 'instagram', esc_url_raw( $_POST['instagram'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
190 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
}
|
192 |
}
|
193 |
Author_Meta::get_instance();
|
142 |
<span class="description"><?php esc_html_e( 'Please enter your Pinterest url. (be sure to include https://)', 'kadence' ); ?></span>
|
143 |
</td>
|
144 |
</tr>
|
145 |
+
<tr>
|
146 |
+
<th>
|
147 |
+
<label for="amazon">Amazon</label>
|
148 |
+
</th>
|
149 |
+
<td>
|
150 |
+
<input type="text" name="amazon" id="amazon" value="<?php echo esc_attr( get_the_author_meta( 'amazon', $user->ID ) ); ?>" class="regular-text" /><br />
|
151 |
+
<span class="description"><?php esc_html_e( 'Please enter your Amazon url. (be sure to include https://)', 'kadence' ); ?></span>
|
152 |
+
</td>
|
153 |
+
</tr>
|
154 |
+
<tr>
|
155 |
+
<th>
|
156 |
+
<label for="medium">Medium</label>
|
157 |
+
</th>
|
158 |
+
<td>
|
159 |
+
<input type="text" name="medium" id="medium" value="<?php echo esc_attr( get_the_author_meta( 'medium', $user->ID ) ); ?>" class="regular-text" /><br />
|
160 |
+
<span class="description"><?php esc_html_e( 'Please enter your Medium url. (be sure to include https://)', 'kadence' ); ?></span>
|
161 |
+
</td>
|
162 |
+
</tr>
|
163 |
+
<tr>
|
164 |
+
<th>
|
165 |
+
<label for="goodreads">Goodreads</label>
|
166 |
+
</th>
|
167 |
+
<td>
|
168 |
+
<input type="text" name="goodreads" id="goodreads" value="<?php echo esc_attr( get_the_author_meta( 'goodreads', $user->ID ) ); ?>" class="regular-text" /><br />
|
169 |
+
<span class="description"><?php esc_html_e( 'Please enter your Goodreads url. (be sure to include https://)', 'kadence' ); ?></span>
|
170 |
+
</td>
|
171 |
+
</tr>
|
172 |
+
<tr>
|
173 |
+
<th>
|
174 |
+
<label for="bookbub">BookBub</label>
|
175 |
+
</th>
|
176 |
+
<td>
|
177 |
+
<input type="text" name="bookbub" id="bookbub" value="<?php echo esc_attr( get_the_author_meta( 'bookbub', $user->ID ) ); ?>" class="regular-text" /><br />
|
178 |
+
<span class="description"><?php esc_html_e( 'Please enter your BookBub url. (be sure to include https://)', 'kadence' ); ?></span>
|
179 |
+
</td>
|
180 |
+
</tr>
|
181 |
</table>
|
182 |
<?php
|
183 |
}
|
224 |
if ( isset( $_POST['instagram'] ) ) {
|
225 |
update_user_meta( $user_id, 'instagram', esc_url_raw( $_POST['instagram'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
226 |
}
|
227 |
+
if ( isset( $_POST['goodreads'] ) ) {
|
228 |
+
update_user_meta( $user_id, 'goodreads', esc_url_raw( $_POST['goodreads'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
229 |
+
}
|
230 |
+
if ( isset( $_POST['amazon'] ) ) {
|
231 |
+
update_user_meta( $user_id, 'amazon', esc_url_raw( $_POST['amazon'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
232 |
+
}
|
233 |
+
if ( isset( $_POST['medium'] ) ) {
|
234 |
+
update_user_meta( $user_id, 'medium', esc_url_raw( $_POST['medium'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
235 |
+
}
|
236 |
+
if ( isset( $_POST['bookbub'] ) ) {
|
237 |
+
update_user_meta( $user_id, 'bookbub', esc_url_raw( $_POST['bookbub'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
238 |
+
}
|
239 |
}
|
240 |
}
|
241 |
Author_Meta::get_instance();
|
inc/class-helpers.php
CHANGED
@@ -182,6 +182,34 @@ class Helpers {
|
|
182 |
$downloaded_files['forms'] = $import_file_info['local_form_data'];
|
183 |
}
|
184 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
|
186 |
return $downloaded_files;
|
187 |
}
|
182 |
$downloaded_files['forms'] = $import_file_info['local_form_data'];
|
183 |
}
|
184 |
}
|
185 |
+
// ----- Set give form file path -----
|
186 |
+
// Get form file as well. If defined!
|
187 |
+
if ( ! empty( $import_file_info['give_donation_data'] ) ) {
|
188 |
+
// Set the filename string for form import file.
|
189 |
+
$give_filename = apply_filters( 'kaence-starter-templates/downloaded_forms_file_prefix', 'demo-give-donations-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_give_donations_file_suffix_and_file_extension', '.json' );
|
190 |
+
|
191 |
+
// Download the form import file.
|
192 |
+
$downloaded_files['give-donations'] = $downloader->download_file( $import_file_info['give_donation_data'], $give_filename );
|
193 |
+
|
194 |
+
// Return from this function if there was an error.
|
195 |
+
if ( is_wp_error( $downloaded_files['give-donations'] ) ) {
|
196 |
+
return $downloaded_files['give-donations'];
|
197 |
+
}
|
198 |
+
}
|
199 |
+
// ----- Set give form file path -----
|
200 |
+
// Get form file as well. If defined!
|
201 |
+
if ( ! empty( $import_file_info['give_form_data'] ) ) {
|
202 |
+
// Set the filename string for form import file.
|
203 |
+
$give_form_filename = apply_filters( 'kaence-starter-templates/downloaded_forms_file_prefix', 'demo-give-forms-import-file_' ) . self::$demo_import_start_time . apply_filters( 'kaence-starter-templates/downloaded_give_form_file_suffix_and_file_extension', '.json' );
|
204 |
+
|
205 |
+
// Download the form import file.
|
206 |
+
$downloaded_files['give-forms'] = $downloader->download_file( $import_file_info['give_form_data'], $give_form_filename );
|
207 |
+
|
208 |
+
// Return from this function if there was an error.
|
209 |
+
if ( is_wp_error( $downloaded_files['give-forms'] ) ) {
|
210 |
+
return $downloaded_files['give-forms'];
|
211 |
+
}
|
212 |
+
}
|
213 |
|
214 |
return $downloaded_files;
|
215 |
}
|
inc/class-import-actions.php
CHANGED
@@ -22,6 +22,8 @@ class ImportActions {
|
|
22 |
add_action( 'kadence-starter-templates/after_content_import_execution', array( $this, 'widgets_import' ), 20, 5 );
|
23 |
|
24 |
add_action( 'kadence-starter-templates/after_content_import_execution', array( $this, 'forms_import' ), 20, 5 );
|
|
|
|
|
25 |
|
26 |
// Customizer import.
|
27 |
add_action( 'kadence-starter-templates/customizer_import_execution', array( $this, 'customizer_import' ), 10, 1 );
|
@@ -59,13 +61,15 @@ class ImportActions {
|
|
59 |
$term_ids = $content_import_data['mapping']['term_id'];
|
60 |
|
61 |
// Set the new menu ID for the widget.
|
62 |
-
$
|
|
|
|
|
63 |
|
64 |
return $widget;
|
65 |
}
|
66 |
|
67 |
/**
|
68 |
-
* Execute the
|
69 |
*
|
70 |
* @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux).
|
71 |
* @param array $import_files The filtered import files defined in `kadence-starter-templates/import_files` filter.
|
@@ -76,6 +80,31 @@ class ImportActions {
|
|
76 |
Kadence_Starter_Templates_Fluent_Import::import( $selected_import_files['forms'] );
|
77 |
}
|
78 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
/**
|
80 |
* Execute the widgets import.
|
81 |
*
|
22 |
add_action( 'kadence-starter-templates/after_content_import_execution', array( $this, 'widgets_import' ), 20, 5 );
|
23 |
|
24 |
add_action( 'kadence-starter-templates/after_content_import_execution', array( $this, 'forms_import' ), 20, 5 );
|
25 |
+
add_action( 'kadence-starter-templates/after_content_import_execution', array( $this, 'donations_import' ), 20, 5 );
|
26 |
+
add_action( 'kadence-starter-templates/after_content_import_execution', array( $this, 'give_forms_import' ), 20, 5 );
|
27 |
|
28 |
// Customizer import.
|
29 |
add_action( 'kadence-starter-templates/customizer_import_execution', array( $this, 'customizer_import' ), 10, 1 );
|
61 |
$term_ids = $content_import_data['mapping']['term_id'];
|
62 |
|
63 |
// Set the new menu ID for the widget.
|
64 |
+
if ( is_array( $term_ids ) && isset( $term_ids[ $widget['nav_menu'] ] ) ) {
|
65 |
+
$widget['nav_menu'] = $term_ids[ $widget['nav_menu'] ];
|
66 |
+
}
|
67 |
|
68 |
return $widget;
|
69 |
}
|
70 |
|
71 |
/**
|
72 |
+
* Execute the forms import.
|
73 |
*
|
74 |
* @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux).
|
75 |
* @param array $import_files The filtered import files defined in `kadence-starter-templates/import_files` filter.
|
80 |
Kadence_Starter_Templates_Fluent_Import::import( $selected_import_files['forms'] );
|
81 |
}
|
82 |
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Execute the Give donations import.
|
86 |
+
*
|
87 |
+
* @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux).
|
88 |
+
* @param array $import_files The filtered import files defined in `kadence-starter-templates/import_files` filter.
|
89 |
+
* @param int $selected_index Selected index of import.
|
90 |
+
*/
|
91 |
+
public function donations_import( $selected_import_files, $import_files, $selected_index, $selected_palette, $selected_font ) {
|
92 |
+
if ( ! empty( $selected_import_files['give-donations'] ) && class_exists( 'Kadence_Starter_Templates\Kadence_Starter_Templates_Give_Import' ) ) {
|
93 |
+
Kadence_Starter_Templates_Give_Import::import( $selected_import_files['give-donations'] );
|
94 |
+
}
|
95 |
+
}
|
96 |
+
/**
|
97 |
+
* Execute the Give forms import.
|
98 |
+
*
|
99 |
+
* @param array $selected_import_files Actual selected import files (content, widgets, customizer, redux).
|
100 |
+
* @param array $import_files The filtered import files defined in `kadence-starter-templates/import_files` filter.
|
101 |
+
* @param int $selected_index Selected index of import.
|
102 |
+
*/
|
103 |
+
public function give_forms_import( $selected_import_files, $import_files, $selected_index, $selected_palette, $selected_font ) {
|
104 |
+
if ( ! empty( $selected_import_files['give-forms'] ) && class_exists( 'Kadence_Starter_Templates\Kadence_Starter_Templates_Give_Import' ) ) {
|
105 |
+
Kadence_Starter_Templates_Give_Import::import_forms( $selected_import_files['give-forms'] );
|
106 |
+
}
|
107 |
+
}
|
108 |
/**
|
109 |
* Execute the widgets import.
|
110 |
*
|
inc/class-import-give.php
ADDED
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class for importing fluent data.
|
4 |
+
*
|
5 |
+
* @package Kadence Starter Templates
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace Kadence_Starter_Templates;
|
9 |
+
|
10 |
+
if ( ! defined( 'GIVE_VERSION' ) ) {
|
11 |
+
return;
|
12 |
+
}
|
13 |
+
|
14 |
+
use function give_get_raw_data_from_file;
|
15 |
+
use function give_save_import_donation_to_db;
|
16 |
+
use function give_update_meta;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Class for importing fluent forms.
|
20 |
+
*/
|
21 |
+
class Kadence_Starter_Templates_Give_Import {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Import forms from JSON file.
|
25 |
+
*
|
26 |
+
* @param string $give_import_forms_file_path path to the widget import file.
|
27 |
+
*/
|
28 |
+
public static function import_forms( $give_import_forms_file_path ) {
|
29 |
+
$results = array();
|
30 |
+
$kadence_starter_templates = Starter_Templates::get_instance();
|
31 |
+
$log_file_path = $kadence_starter_templates->get_log_file_path();
|
32 |
+
|
33 |
+
// Import Give forms and return result.
|
34 |
+
if ( ! empty( $give_import_forms_file_path ) ) {
|
35 |
+
$results = self::import_give_forms( $give_import_forms_file_path );
|
36 |
+
}
|
37 |
+
|
38 |
+
// Check for errors, else write the results to the log file.
|
39 |
+
if ( is_wp_error( $results ) ) {
|
40 |
+
$error_message = $results->get_error_message();
|
41 |
+
|
42 |
+
// Add any error messages to the frontend_error_messages variable in OCDI main class.
|
43 |
+
$kadence_starter_templates->append_to_frontend_error_messages( $error_message );
|
44 |
+
if ( apply_filters( 'kadence_starter_templates_save_log_files', false ) ) {
|
45 |
+
// Write error to log file.
|
46 |
+
Helpers::append_to_file(
|
47 |
+
$error_message,
|
48 |
+
$log_file_path,
|
49 |
+
esc_html__( 'Importing Give forms', 'kadence-starter-templates' )
|
50 |
+
);
|
51 |
+
}
|
52 |
+
} else {
|
53 |
+
$message = ( ! empty( $results['message'] ) ? $results['message'] : esc_html__( 'No results for Give Form import!', 'kadence-starter-templates' ) );
|
54 |
+
if ( apply_filters( 'kadence_starter_templates_save_log_files', false ) ) {
|
55 |
+
// Add this message to log file.
|
56 |
+
$log_added = Helpers::append_to_file(
|
57 |
+
$message,
|
58 |
+
$log_file_path,
|
59 |
+
esc_html__( 'Importing Give forms' , 'kadence-starter-templates' )
|
60 |
+
);
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Imports widgets from a json file.
|
66 |
+
*
|
67 |
+
* @param string $data_file path to json file with WordPress widget export data.
|
68 |
+
*/
|
69 |
+
private static function import_give_forms( $data_file ) {
|
70 |
+
// Get widgets data from file.
|
71 |
+
$data = self::process_import_form_file( $data_file );
|
72 |
+
|
73 |
+
// Return from this function if there was an error.
|
74 |
+
if ( is_wp_error( $data ) ) {
|
75 |
+
return $data;
|
76 |
+
}
|
77 |
+
// error_log( print_r( $data, true ) );
|
78 |
+
// Import the form data and save the results.
|
79 |
+
return self::import_form_data( $data );
|
80 |
+
}
|
81 |
+
/**
|
82 |
+
* Import raw data forms.
|
83 |
+
*
|
84 |
+
* @param string $raw_data the data for the forms.
|
85 |
+
*/
|
86 |
+
public static function import_form_data( $raw_data ) {
|
87 |
+
// Have valid data? If no data or could not decode.
|
88 |
+
if ( empty( $raw_data ) || ! is_array( $raw_data ) ) {
|
89 |
+
return new \WP_Error(
|
90 |
+
'corrupted_give_forms_import_data',
|
91 |
+
__( 'Error: Widget import data could not be read. Please try a different file.', 'kadence-starter-templates' )
|
92 |
+
);
|
93 |
+
}
|
94 |
+
// Begin results.
|
95 |
+
$results = array();
|
96 |
+
|
97 |
+
// Loop import data's sidebars.
|
98 |
+
foreach ( $raw_data as $form_id => $form_data ) {
|
99 |
+
foreach ( $form_data as $data_key => $data_value ) {
|
100 |
+
//if ( '_give_sequoia_form_template_settings' === $data_key || '_give_form_template' === $data_key || '_give_goal_color' === $data_key ) {
|
101 |
+
if ( is_array( $data_value ) && isset( $data_value[0] ) ) {
|
102 |
+
$data_value = maybe_unserialize( $data_value[0] );
|
103 |
+
}
|
104 |
+
//error_log( print_r( $data_value, true ) );
|
105 |
+
give_update_meta( $form_id, $data_key, $data_value, 'form' );
|
106 |
+
//}
|
107 |
+
}
|
108 |
+
}
|
109 |
+
return $results;
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Import forms from JSON file.
|
114 |
+
*
|
115 |
+
* @param string $give_import_file_path path to the widget import file.
|
116 |
+
*/
|
117 |
+
public static function import( $give_import_file_path ) {
|
118 |
+
$results = array();
|
119 |
+
$kadence_starter_templates = Starter_Templates::get_instance();
|
120 |
+
$log_file_path = $kadence_starter_templates->get_log_file_path();
|
121 |
+
|
122 |
+
// Import widgets and return result.
|
123 |
+
if ( ! empty( $give_import_file_path ) ) {
|
124 |
+
$results = self::import_donations( $give_import_file_path );
|
125 |
+
}
|
126 |
+
|
127 |
+
// Check for errors, else write the results to the log file.
|
128 |
+
if ( is_wp_error( $results ) ) {
|
129 |
+
$error_message = $results->get_error_message();
|
130 |
+
// Add any error messages to the frontend_error_messages variable in OCDI main class.
|
131 |
+
$kadence_starter_templates->append_to_frontend_error_messages( $error_message );
|
132 |
+
if ( apply_filters( 'kadence_starter_templates_save_log_files', false ) ) {
|
133 |
+
// Write error to log file.
|
134 |
+
Helpers::append_to_file(
|
135 |
+
$error_message,
|
136 |
+
$log_file_path,
|
137 |
+
esc_html__( 'Importing Give Donations', 'kadence-starter-templates' )
|
138 |
+
);
|
139 |
+
}
|
140 |
+
} else {
|
141 |
+
$message = ( ! empty( $results['message'] ) ? $results['message'] : esc_html__( 'No results for Give import!', 'kadence-starter-templates' ) );
|
142 |
+
if ( apply_filters( 'kadence_starter_templates_save_log_files', false ) ) {
|
143 |
+
// Add this message to log file.
|
144 |
+
$log_added = Helpers::append_to_file(
|
145 |
+
$message,
|
146 |
+
$log_file_path,
|
147 |
+
esc_html__( 'Importing Give Donations' , 'kadence-starter-templates' )
|
148 |
+
);
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Imports widgets from a json file.
|
156 |
+
*
|
157 |
+
* @param string $data_file path to json file with WordPress widget export data.
|
158 |
+
*/
|
159 |
+
private static function import_donations( $data_file ) {
|
160 |
+
// Get widgets data from file.
|
161 |
+
$data = self::process_import_file( $data_file );
|
162 |
+
|
163 |
+
// Return from this function if there was an error.
|
164 |
+
if ( is_wp_error( $data ) ) {
|
165 |
+
return $data;
|
166 |
+
}
|
167 |
+
|
168 |
+
// Import the widget data and save the results.
|
169 |
+
return self::import_data( $data );
|
170 |
+
}
|
171 |
+
/**
|
172 |
+
* Process import file - this parses the widget data and returns it.
|
173 |
+
*
|
174 |
+
* @param string $file path to json file.
|
175 |
+
* @return object $data decoded JSON string
|
176 |
+
*/
|
177 |
+
private static function process_import_form_file( $file ) {
|
178 |
+
// File exists?
|
179 |
+
if ( ! file_exists( $file ) ) {
|
180 |
+
return new \WP_Error(
|
181 |
+
'form_import_file_not_found',
|
182 |
+
__( 'Error: Form import file could not be found.', 'kadence-starter-templates' )
|
183 |
+
);
|
184 |
+
}
|
185 |
+
// // Get file contents and decode.
|
186 |
+
$data = Helpers::data_from_file( $file );
|
187 |
+
|
188 |
+
// Return from this function if there was an error.
|
189 |
+
if ( is_wp_error( $data ) ) {
|
190 |
+
return $data;
|
191 |
+
}
|
192 |
+
|
193 |
+
return maybe_unserialize( $data, true );
|
194 |
+
}
|
195 |
+
/**
|
196 |
+
* Process import file - this parses the widget data and returns it.
|
197 |
+
*
|
198 |
+
* @param string $file path to json file.
|
199 |
+
* @return object $data decoded JSON string
|
200 |
+
*/
|
201 |
+
private static function process_import_file( $file ) {
|
202 |
+
// File exists?
|
203 |
+
if ( ! file_exists( $file ) ) {
|
204 |
+
return new \WP_Error(
|
205 |
+
'form_import_file_not_found',
|
206 |
+
__( 'Error: Form import file could not be found.', 'kadence-starter-templates' )
|
207 |
+
);
|
208 |
+
}
|
209 |
+
$data = give_get_raw_data_from_file( $file, 1, 25, ',' );
|
210 |
+
// // Get file contents and decode.
|
211 |
+
// $data = Helpers::data_from_file( $file );
|
212 |
+
|
213 |
+
// Return from this function if there was an error.
|
214 |
+
if ( is_wp_error( $data ) ) {
|
215 |
+
return $data;
|
216 |
+
}
|
217 |
+
|
218 |
+
return $data;
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Import raw data forms.
|
223 |
+
*
|
224 |
+
* @param string $raw_data the data for the forms.
|
225 |
+
*/
|
226 |
+
public static function import_data( $raw_data ) {
|
227 |
+
// Have valid data? If no data or could not decode.
|
228 |
+
if ( empty( $raw_data ) ) {
|
229 |
+
return new \WP_Error(
|
230 |
+
'corrupted_give_import_data',
|
231 |
+
__( 'Error: Give import data could not be read. Please try a different file.', 'kadence-starter-templates' )
|
232 |
+
);
|
233 |
+
}
|
234 |
+
$import_setting = [];
|
235 |
+
$raw_key = maybe_unserialize( 'a:29:{i:0;s:2:"id";i:1;s:0:"";i:2;s:6:"amount";i:3;s:8:"currency";i:4;s:0:"";i:5;s:11:"post_status";i:6;s:9:"post_date";i:7;s:9:"post_time";i:8;s:7:"gateway";i:9;s:4:"mode";i:10;s:7:"form_id";i:11;s:10:"form_title";i:12;s:10:"form_level";i:13;s:10:"form_level";i:14;s:12:"title_prefix";i:15;s:10:"first_name";i:16;s:9:"last_name";i:17;s:5:"email";i:18;s:12:"company_name";i:19;s:5:"line1";i:20;s:5:"line2";i:21;s:4:"city";i:22;s:5:"state";i:23;s:3:"zip";i:24;s:7:"country";i:25;s:0:"";i:26;s:7:"user_id";i:27;s:8:"donor_id";i:28;s:8:"donor_ip";}' );
|
236 |
+
$import_setting['raw_key'] = $raw_key;
|
237 |
+
$import_setting['dry_run'] = false;
|
238 |
+
$main_key = maybe_unserialize( 'a:29:{i:0;s:11:"Donation ID";i:1;s:15:"Donation Number";i:2;s:14:"Donation Total";i:3;s:13:"Currency Code";i:4;s:15:"Currency Symbol";i:5;s:15:"Donation Status";i:6;s:13:"Donation Date";i:7;s:13:"Donation Time";i:8;s:15:"Payment Gateway";i:9;s:12:"Payment Mode";i:10;s:7:"Form ID";i:11;s:10:"Form Title";i:12;s:8:"Level ID";i:13;s:11:"Level Title";i:14;s:12:"Title Prefix";i:15;s:10:"First Name";i:16;s:9:"Last Name";i:17;s:13:"Email Address";i:18;s:12:"Company Name";i:19;s:9:"Address 1";i:20;s:9:"Address 2";i:21;s:4:"City";i:22;s:5:"State";i:23;s:3:"Zip";i:24;s:7:"Country";i:25;s:13:"Donor Comment";i:26;s:7:"User ID";i:27;s:8:"Donor ID";i:28;s:16:"Donor IP Address";}' );
|
239 |
+
// Prevent normal emails.
|
240 |
+
remove_action( 'give_complete_donation', 'give_trigger_donation_receipt', 999 );
|
241 |
+
remove_action( 'give_insert_user', 'give_new_user_notification', 10 );
|
242 |
+
remove_action( 'give_insert_payment', 'give_payment_save_page_data' );
|
243 |
+
$current_key = 1;
|
244 |
+
foreach ( $raw_data as $row_data ) {
|
245 |
+
$import_setting['donation_key'] = $current_key;
|
246 |
+
give_save_import_donation_to_db( $raw_key, $row_data, $main_key, $import_setting );
|
247 |
+
$current_key ++;
|
248 |
+
}
|
249 |
+
|
250 |
+
// Check if function exists or not.
|
251 |
+
if ( function_exists( 'give_payment_save_page_data' ) ) {
|
252 |
+
add_action( 'give_insert_payment', 'give_payment_save_page_data' );
|
253 |
+
}
|
254 |
+
|
255 |
+
$results = array(
|
256 |
+
'message' => __( 'Give data has been successfully imported.', 'kadence-starter-templates' ),
|
257 |
+
);
|
258 |
+
// Return results.
|
259 |
+
return apply_filters( 'kadence-starter-templates/give_import_results', $results );
|
260 |
+
}
|
261 |
+
}
|
inc/class-importer.php
CHANGED
@@ -161,7 +161,7 @@ class Importer {
|
|
161 |
//add_filter( 'wp_import_post_data_processed', array( $this, 'pre_post_data' ), 10, 2 );
|
162 |
// Meta Save Tracking info so we can remove later if desired.
|
163 |
add_filter( 'wxr_importer.processed.term', array( $this, 'add_term_tracking' ), 10, 2 );
|
164 |
-
|
165 |
|
166 |
if ( class_exists( 'Astra_WXR_Importer' ) ) {
|
167 |
$astra_site_instance = \Astra_WXR_Importer::instance();
|
@@ -170,15 +170,20 @@ class Importer {
|
|
170 |
if ( $single_page ) {
|
171 |
// Set the importing author to the current user and Import images.
|
172 |
add_filter( 'wxr_importer.pre_process.post', array( $this, 'check_for_content_images' ), 10, 4 );
|
173 |
-
add_filter( 'wxr_importer.
|
|
|
174 |
if ( $page_meta && $page_meta === 'clear' ) {
|
175 |
-
|
176 |
}
|
177 |
} else {
|
178 |
add_filter( 'wxr_importer.pre_process.post_meta', array( $this, 'process_elementor_images' ), 10, 2 );
|
|
|
|
|
|
|
179 |
// Check, if we need to send another AJAX request and set the importing author to the current user.
|
180 |
add_filter( 'wxr_importer.pre_process.post', array( $this, 'new_ajax_request_maybe' ) );
|
181 |
-
//add_filter( 'wxr_importer.
|
|
|
182 |
}
|
183 |
|
184 |
// Disables generation of multiple image sizes (thumbnails) in the content import step.
|
@@ -223,6 +228,95 @@ class Importer {
|
|
223 |
}
|
224 |
}
|
225 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
/**
|
227 |
* Process Gallery Block
|
228 |
*
|
161 |
//add_filter( 'wp_import_post_data_processed', array( $this, 'pre_post_data' ), 10, 2 );
|
162 |
// Meta Save Tracking info so we can remove later if desired.
|
163 |
add_filter( 'wxr_importer.processed.term', array( $this, 'add_term_tracking' ), 10, 2 );
|
164 |
+
add_action( 'wxr_importer.processed.post', array( $this, 'add_post_tracking' ), 10, 5 );
|
165 |
|
166 |
if ( class_exists( 'Astra_WXR_Importer' ) ) {
|
167 |
$astra_site_instance = \Astra_WXR_Importer::instance();
|
170 |
if ( $single_page ) {
|
171 |
// Set the importing author to the current user and Import images.
|
172 |
add_filter( 'wxr_importer.pre_process.post', array( $this, 'check_for_content_images' ), 10, 4 );
|
173 |
+
//add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_kadence_block_css' ), 10, 4 );
|
174 |
+
add_action( 'wxr_importer.processed.post', array( $this, 'process_elementor' ), 10, 5 );
|
175 |
if ( $page_meta && $page_meta === 'clear' ) {
|
176 |
+
add_action( 'wxr_importer.processed.post', array( $this, 'process_single_page_clean_meta' ), 10, 5 );
|
177 |
}
|
178 |
} else {
|
179 |
add_filter( 'wxr_importer.pre_process.post_meta', array( $this, 'process_elementor_images' ), 10, 2 );
|
180 |
+
add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_kadence_block_css' ), 10, 4 );
|
181 |
+
add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_internal_links' ), 11, 4 );
|
182 |
+
//add_action( 'wxr_importer.processed.post', array( $this, 'process_internal_links' ), 10, 5 );
|
183 |
// Check, if we need to send another AJAX request and set the importing author to the current user.
|
184 |
add_filter( 'wxr_importer.pre_process.post', array( $this, 'new_ajax_request_maybe' ) );
|
185 |
+
//add_filter( 'wxr_importer.pre_process.post', array( $this, 'process_kadence_block_css' ), 10, 5 );
|
186 |
+
//add_action( 'wxr_importer.processed.post', array( $this, 'process_kadence_galleries' ), 10, 5 );
|
187 |
}
|
188 |
|
189 |
// Disables generation of multiple image sizes (thumbnails) in the content import step.
|
228 |
}
|
229 |
}
|
230 |
}
|
231 |
+
/**
|
232 |
+
* Process internal_links
|
233 |
+
*
|
234 |
+
* @param array $data Raw data imported for the post.
|
235 |
+
* @param array $meta Raw meta data, already processed by {@see process_post_meta}.
|
236 |
+
* @param array $comments Raw comment data, already processed by {@see process_comments}.
|
237 |
+
* @param array $terms Raw term data, already processed.
|
238 |
+
*/
|
239 |
+
public function process_internal_links( $data, $meta, $comments, $terms ) {
|
240 |
+
$meta_data = wp_list_pluck( $meta, 'key' );
|
241 |
+
if ( in_array( '_elementor_data', $meta_data, true ) ) {
|
242 |
+
return $data;
|
243 |
+
}
|
244 |
+
if ( ! empty( $data['post_content'] ) ) {
|
245 |
+
$edit_content = stripslashes( $data['post_content'] );
|
246 |
+
// Extract all links.
|
247 |
+
preg_match_all( '#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $edit_content, $match );
|
248 |
+
$all_links = array_unique( $match[0] );
|
249 |
+
$link_mapping = array();
|
250 |
+
$page_links = array();
|
251 |
+
$some_links = array();
|
252 |
+
// Not have any link.
|
253 |
+
if ( ! empty( $all_links ) ) {
|
254 |
+
// Extract normal and image links.
|
255 |
+
foreach ( $all_links as $key => $link ) {
|
256 |
+
if ( ! preg_match( '/^((https?:\/\/)|(www\.))([a-z0-9-].?)+(:[0-9]+)?\/[\w\-]+\.(jpg|png|gif|jpeg|svg)\/?$/i', $link ) ) {
|
257 |
+
$page_links[] = $link;
|
258 |
+
}
|
259 |
+
}
|
260 |
+
$demo_data = get_option( '_kadence_starter_templates_last_import_data', array() );
|
261 |
+
if ( ! empty( $demo_data['url'] ) ) {
|
262 |
+
$site_url = get_site_url();
|
263 |
+
$demo_url = rtrim( sanitize_text_field( $demo_data['url'] ), '/' );
|
264 |
+
foreach ( $page_links as $key => $link ) {
|
265 |
+
$new_link = str_replace( $demo_url, $site_url, $link );
|
266 |
+
if ( $new_link !== $link ) {
|
267 |
+
$link_mapping[ $link ] = $new_link;
|
268 |
+
}
|
269 |
+
}
|
270 |
+
}
|
271 |
+
if ( ! empty( $link_mapping ) ) {
|
272 |
+
foreach ( $link_mapping as $old_url => $new_url ) {
|
273 |
+
$data['post_content'] = str_replace( $old_url, $new_url, $data['post_content'] );
|
274 |
+
|
275 |
+
// Replace the slashed URLs if any exist.
|
276 |
+
$old_url = str_replace( '/', '/\\', $old_url );
|
277 |
+
$new_url = str_replace( '/', '/\\', $new_url );
|
278 |
+
$data['post_content'] = str_replace( $old_url, $new_url, $data['post_content'] );
|
279 |
+
}
|
280 |
+
}
|
281 |
+
}
|
282 |
+
}
|
283 |
+
return $data;
|
284 |
+
}
|
285 |
+
/**
|
286 |
+
* Process Kadence Block CSS
|
287 |
+
*
|
288 |
+
* @param int $post_id New post ID.
|
289 |
+
* @param array $data Raw data imported for the post.
|
290 |
+
* @param array $meta Raw meta data, already processed by {@see process_post_meta}.
|
291 |
+
* @param array $comments Raw comment data, already processed by {@see process_comments}.
|
292 |
+
* @param array $terms Raw term data, already processed.
|
293 |
+
*/
|
294 |
+
public function process_kadence_block_css( $data, $meta, $comments, $terms ) {
|
295 |
+
$meta_data = wp_list_pluck( $meta, 'key' );
|
296 |
+
if ( in_array( '_elementor_data', $meta_data, true ) ) {
|
297 |
+
return $data;
|
298 |
+
}
|
299 |
+
if ( ! empty( $data['post_content'] ) ) {
|
300 |
+
$content = parse_blocks( stripslashes( $data['post_content'] ) );
|
301 |
+
foreach ( $content as $block ) {
|
302 |
+
if ( ! empty( $block['attrs']['kadenceBlockCSS'] ) ) {
|
303 |
+
$slash = str_replace( 'n ', '\n ', $block['attrs']['kadenceBlockCSS'] );
|
304 |
+
$slash = str_replace( ';n', ';\n', $slash );
|
305 |
+
$slash = str_replace( 'nselector', '\nselector', $slash );
|
306 |
+
$update = str_replace( 'n ', '\\\n ', $block['attrs']['kadenceBlockCSS'] );
|
307 |
+
$update = str_replace( ';n', ';\\\n', $update );
|
308 |
+
$update = str_replace( 'nselector', '\\\nselector', $update );
|
309 |
+
// $update = str_replace( 'n ', '', $block['attrs']['kadenceBlockCSS'] );
|
310 |
+
// $update = str_replace( ';n', ';', $update );
|
311 |
+
// $update = str_replace( 'nselector', 'selector', $update );
|
312 |
+
if ( $update !== $slash ) {
|
313 |
+
$data['post_content'] = str_replace( $slash, $update, $data['post_content'] );
|
314 |
+
}
|
315 |
+
}
|
316 |
+
}
|
317 |
+
}
|
318 |
+
return $data;
|
319 |
+
}
|
320 |
/**
|
321 |
* Process Gallery Block
|
322 |
*
|
inc/react/src/index.js
CHANGED
@@ -27,12 +27,13 @@ function kadenceTryParseJSON(jsonString){
|
|
27 |
import map from 'lodash/map';
|
28 |
import LazyLoad from 'react-lazy-load';
|
29 |
import KadenceImporterFullPreview from './full-preview-mode.js'
|
|
|
30 |
/**
|
31 |
* WordPress dependencies
|
32 |
*/
|
33 |
const { __, sprintf } = wp.i18n;
|
34 |
const { Fragment, Component, render, PureComponent } = wp.element;
|
35 |
-
const { Modal, Spinner, ButtonGroup, Dropdown, Icon, Button, ExternalLink, ToolbarGroup, ToggleControl, MenuItem, Tooltip } = wp.components;
|
36 |
import {
|
37 |
arrowLeft,
|
38 |
download,
|
@@ -143,6 +144,9 @@ class KadenceImporter extends Component {
|
|
143 |
super( ...arguments );
|
144 |
this.runAjax = this.runAjax.bind( this );
|
145 |
this.runPluginInstall = this.runPluginInstall.bind( this );
|
|
|
|
|
|
|
146 |
this.loadTemplateData = this.loadTemplateData.bind( this );
|
147 |
this.reloadTemplateData = this.reloadTemplateData.bind( this );
|
148 |
this.loadPluginData = this.loadPluginData.bind( this );
|
@@ -187,7 +191,17 @@ class KadenceImporter extends Component {
|
|
187 |
isSaving: false,
|
188 |
isLoadingPlugins: false,
|
189 |
activePlugins: false,
|
|
|
190 |
templatePlugins: '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
};
|
192 |
}
|
193 |
saveConfig( setting, settingValue ) {
|
@@ -338,7 +352,7 @@ class KadenceImporter extends Component {
|
|
338 |
});
|
339 |
}
|
340 |
runPluginInstallSingle( selected, page_id, builder ) {
|
341 |
-
this.setState( { progress: 'plugins', isFetching: true } );
|
342 |
var data = new FormData();
|
343 |
data.append( 'action', 'kadence_import_install_plugins' );
|
344 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
@@ -347,8 +361,16 @@ class KadenceImporter extends Component {
|
|
347 |
data.append( 'page_id', page_id );
|
348 |
this.runPageAjax( data );
|
349 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
runRemovePast( selected, builder ) {
|
351 |
-
this.setState( { progress: 'remove', isFetching: true } );
|
352 |
var data = new FormData();
|
353 |
data.append( 'action', 'kadence_remove_past_import_data' );
|
354 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
@@ -357,7 +379,7 @@ class KadenceImporter extends Component {
|
|
357 |
this.runAjax( data );
|
358 |
}
|
359 |
runPluginInstall( selected, builder ) {
|
360 |
-
this.setState( { progress: 'plugins', isFetching: true } );
|
361 |
var data = new FormData();
|
362 |
data.append( 'action', 'kadence_import_install_plugins' );
|
363 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
@@ -365,6 +387,14 @@ class KadenceImporter extends Component {
|
|
365 |
data.append( 'builder', builder );
|
366 |
this.runAjax( data );
|
367 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
runPageAjax( data ) {
|
369 |
var control = this;
|
370 |
jQuery.ajax({
|
@@ -378,6 +408,15 @@ class KadenceImporter extends Component {
|
|
378 |
if ( 'undefined' !== typeof response.status && 'newAJAX' === response.status ) {
|
379 |
control.state.progress = 'contentNew';
|
380 |
control.runPageAjax( data );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
} else if ( 'undefined' !== typeof response.status && 'pluginSuccess' === response.status ) {
|
382 |
control.setState( { progress: 'content' } );
|
383 |
var newData = new FormData();
|
@@ -393,15 +432,17 @@ class KadenceImporter extends Component {
|
|
393 |
control.runPageAjax( newData );
|
394 |
} else if ( 'undefined' !== typeof response.message ) {
|
395 |
//jQuery( '.kadence_starter_templates_finished' ).append( '<p>' + response.message + '</p>' );
|
396 |
-
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, progress: '', response: '<p>' + response.message + '</p>' } );
|
|
|
|
|
397 |
} else {
|
398 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' );
|
399 |
-
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' } );
|
400 |
}
|
401 |
})
|
402 |
.fail( function( error ) {
|
403 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' );
|
404 |
-
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' } );
|
405 |
});
|
406 |
}
|
407 |
runAjax( data ) {
|
@@ -418,30 +459,41 @@ class KadenceImporter extends Component {
|
|
418 |
control.state.progress = 'contentNew';
|
419 |
control.runAjax( data );
|
420 |
} else if ( 'undefined' !== typeof response.status && 'customizerAJAX' === response.status ) {
|
421 |
-
control.setState( { progress: 'customizer' } );
|
422 |
-
// Fix for data.set and data.delete, which they are not supported in some browsers.
|
423 |
var newData = new FormData();
|
424 |
-
newData.append( 'action', 'kadence_import_customizer_data' );
|
425 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
426 |
-
|
427 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
control.runAjax( newData );
|
429 |
} else if ( 'undefined' !== typeof response.status && 'afterAllImportAJAX' === response.status ) {
|
430 |
control.setState( { progress: 'widgets' } );
|
431 |
-
// Fix for data.set and data.delete, which they are not supported in some browsers.
|
432 |
var newData = new FormData();
|
433 |
newData.append( 'action', 'kadence_after_import_data' );
|
434 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
435 |
control.runAjax( newData );
|
436 |
} else if ( 'undefined' !== typeof response.status && 'pluginSuccess' === response.status ) {
|
437 |
-
control.setState( { progress: 'content' } );
|
438 |
var newData = new FormData();
|
439 |
-
newData.append( 'action', 'kadence_import_demo_data' );
|
440 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
control.runAjax( newData );
|
446 |
} else if ( 'undefined' !== typeof response.status && 'removeSuccess' === response.status ) {
|
447 |
control.setState( { progress: 'plugins' } );
|
@@ -451,21 +503,35 @@ class KadenceImporter extends Component {
|
|
451 |
newData.append( 'selected', control.state.activeTemplate );
|
452 |
newData.append( 'builder', control.state.starterSettings['builderType'] );
|
453 |
control.runAjax( newData );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
} else if ( 'undefined' !== typeof response.message ) {
|
455 |
//jQuery( '.kadence_starter_templates_finished' ).append( '<p>' + response.message + '</p>' );
|
456 |
-
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<p>' + response.message + '</p>' } );
|
457 |
} else if ( 'undefined' !== typeof response.success && ! response.success ) {
|
458 |
//jQuery( '.kadence_starter_templates_finished' ).append( '<p>' + response.message + '</p>' );
|
459 |
-
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>' + __( 'Failed Import. Something went wrong internally. Please try again.', 'kadence-starter-templates' ) + '</p></div>' } );
|
460 |
} else {
|
|
|
461 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' );
|
462 |
-
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' } );
|
463 |
}
|
464 |
})
|
465 |
.fail( function( error ) {
|
466 |
console.log( error );
|
467 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' );
|
468 |
-
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', response: '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' } );
|
469 |
});
|
470 |
}
|
471 |
render() {
|
@@ -490,6 +556,7 @@ class KadenceImporter extends Component {
|
|
490 |
builderTypeName = ( kadenceStarterParams.custom_name ? kadenceStarterParams.custom_name : __( 'Pro Designs', 'kadence-starter-templates' ) );
|
491 |
builderTypeIcon = ( kadenceStarterParams.custom_icon ? <img className="components-menu-items__item-icon custom-image-icon-src" src={ kadenceStarterParams.custom_icon } /> : cIcon );
|
492 |
}
|
|
|
493 |
const KadenceImportSingleMode = () => {
|
494 |
const item = this.state.activeTemplates[this.state.activeTemplate];
|
495 |
let pluginsMember = false;
|
@@ -505,172 +572,181 @@ class KadenceImporter extends Component {
|
|
505 |
<div className="kst-import-selection-title">
|
506 |
<h2>{ __( 'Template:', 'kadence-starter-templates' ) } <span>{ item.name }</span><br></br> { __( 'Selected Page:', 'kadence-starter-templates' ) } <span>{ item.pages[this.state.selectedPage].title }</span></h2>
|
507 |
</div>
|
508 |
-
<
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
if ( 'active' !== state && ( 'thirdparty' === src || 'unknown' === src ) ) {
|
526 |
-
pluginsPremium = true;
|
527 |
-
}
|
528 |
-
return (
|
529 |
-
<li className={ `plugin-required${ ( 'active' !== state && 'bundle' === src ? ' bundle-install-required' : '' ) }` }>
|
530 |
-
{ title } - <span class="plugin-status">{ ( 'notactive' === state ? __( 'Not Installed', 'kadence-starter-templates' ) : state ) }</span> { ( 'active' !== state && 'thirdparty' === src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium plugin' ) }</span> : '' ) }
|
531 |
-
</li>
|
532 |
-
);
|
533 |
-
} ) }
|
534 |
-
</ul>
|
535 |
-
) }
|
536 |
-
{ this.state.templatePlugins && 'error' === this.state.templatePlugins && (
|
537 |
-
<Fragment>
|
538 |
-
<p className="desc-small install-third-party-notice">{ __( '*Error accessing active plugin information, you may import but first manually check that you have installed all required plugins.', 'kadence-starter-templates' ) }</p>
|
539 |
<ul className="kadence-required-wrap">
|
540 |
-
{ map(
|
541 |
-
if (
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
<li className={ `plugin-required${ ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ? ' bundle-install-required' : '' ) }` }>
|
547 |
-
{ kadenceStarterParams.plugins[ slug ].title } - <span class="plugin-status">{ ( 'notactive' === kadenceStarterParams.plugins[ slug ].state ? __( 'Not Installed', 'kadence-starter-templates' ) : kadenceStarterParams.plugins[ slug ].state ) }</span> { ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium Plugin' ) }</span> : '' ) }
|
548 |
-
</li>
|
549 |
-
);
|
550 |
-
} else {
|
551 |
-
return (
|
552 |
-
<li className={ `plugin-required` }>
|
553 |
-
{ slug } - <span class="plugin-status">{ __( 'Unknown', 'kadence-starter-templates' ) }</span>
|
554 |
-
</li>
|
555 |
-
);
|
556 |
}
|
557 |
-
} ) }
|
558 |
-
</ul>
|
559 |
-
</Fragment>
|
560 |
-
) }
|
561 |
-
</Fragment>
|
562 |
-
) }
|
563 |
-
<p className="desc-small note-about-colors">{ __( '*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.', 'kadence-starter-templates' ) }</p>
|
564 |
-
<ToggleControl
|
565 |
-
label={ __( 'Override Your Sites Global Colors?', 'kadence-starter-templates' ) }
|
566 |
-
checked={ ( undefined !== this.state.overrideColors ? this.state.overrideColors : false ) }
|
567 |
-
onChange={ value => ( this.state.overrideColors ? this.setState( { overrideColors: false } ) : this.setState( { isOpenCheckColor: true } ) ) }
|
568 |
-
/>
|
569 |
-
{ this.state.isOpenCheckColor ?
|
570 |
-
<Modal
|
571 |
-
className="ksp-confirm-modal"
|
572 |
-
title={ __( 'Override Your Sites Colors on Import?', 'kadence-starter-templates' ) }
|
573 |
-
onRequestClose={ () => {
|
574 |
-
this.setState( { isOpenCheckColor: false } )
|
575 |
-
} }>
|
576 |
-
<p className="desc-small note-about-colors">{ __( 'This will override the customizer settings for global colors on your current site when you import this page template.', 'kadence-starter-templates' ) }</p>
|
577 |
-
<div className="ksp-override-model-buttons">
|
578 |
-
<Button className="ksp-cancel-override" onClick={ () => {
|
579 |
-
this.setState( { isOpenCheckColor: false, overrideColors: false } );
|
580 |
-
} }>
|
581 |
-
{ __( 'Cancel', 'kadence-starter-templates' ) }
|
582 |
-
</Button>
|
583 |
-
<Button className="ksp-do-override" isPrimary onClick={ () => {
|
584 |
-
this.setState( { isOpenCheckColor: false, overrideColors: true } );
|
585 |
-
} }>
|
586 |
-
{ __( 'Override Colors', 'kadence-starter-templates' ) }
|
587 |
-
</Button>
|
588 |
-
</div>
|
589 |
-
</Modal>
|
590 |
-
: null }
|
591 |
-
{ this.state.overrideColors && this.state.colorPalette && (
|
592 |
-
<Fragment>
|
593 |
-
<h3>{ __( 'Selected Color Palette', 'kadence-starter-templates' ) }</h3>
|
594 |
-
{ map( this.state.palettes, ( { palette, colors } ) => {
|
595 |
-
if ( palette !== this.state.colorPalette ) {
|
596 |
-
return;
|
597 |
-
}
|
598 |
-
return (
|
599 |
-
<div className="kst-palette-btn kst-selected-color-palette">
|
600 |
-
{ map( colors, ( color, index ) => {
|
601 |
return (
|
602 |
-
<
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
marginRight:'3px',
|
607 |
-
transform: 'scale(1)',
|
608 |
-
transition: '100ms transform ease',
|
609 |
-
} } className="kadence-swatche-item-wrap">
|
610 |
-
<span
|
611 |
-
className={ 'kadence-swatch-item' }
|
612 |
-
style={ {
|
613 |
-
height: '100%',
|
614 |
-
display: 'block',
|
615 |
-
width: '100%',
|
616 |
-
border: '1px solid rgb(218, 218, 218)',
|
617 |
-
borderRadius: '50%',
|
618 |
-
color: `${ color }`,
|
619 |
-
boxShadow: `inset 0 0 0 ${ 30 / 2 }px`,
|
620 |
-
transition: '100ms box-shadow ease',
|
621 |
-
} }
|
622 |
-
>
|
623 |
-
</span>
|
624 |
-
</div>
|
625 |
-
)
|
626 |
} ) }
|
627 |
-
</
|
628 |
-
)
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
} }>
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
} }>
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
)
|
672 |
-
|
673 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
674 |
) }
|
675 |
{ this.state.progress === 'plugins' && (
|
676 |
<div class="kadence_starter_templates_response">{ kadenceStarterParams.plugin_progress }</div>
|
@@ -699,11 +775,30 @@ class KadenceImporter extends Component {
|
|
699 |
</div>
|
700 |
) }
|
701 |
{ ! pluginsMember && (
|
702 |
-
<
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
) }
|
708 |
</Fragment>
|
709 |
) }
|
@@ -736,250 +831,257 @@ class KadenceImporter extends Component {
|
|
736 |
className="kst-import-modal"
|
737 |
title={ __( 'Import Starter Template' ) }
|
738 |
onRequestClose={ () => this.state.isFetching ? false : this.setState( { activeTemplate: '', activePlugins: false, colorPalette: '', focusMode: false, isImporting: false, progress: '' } ) }>
|
739 |
-
{
|
740 |
-
<div
|
741 |
-
{
|
742 |
-
|
743 |
-
) : (
|
744 |
-
<Fragment>{ kadenceStarterParams.notice }</Fragment>
|
745 |
-
) }
|
746 |
</div>
|
747 |
) }
|
748 |
-
|
749 |
-
{/* { map( item.plugins, ( slug ) => {
|
750 |
-
if ( kadenceStarterParams.plugins[ slug ] ) {
|
751 |
-
if ( 'active' !== kadenceStarterParams.plugins[ slug ].state ) {
|
752 |
-
if ( 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ) {
|
753 |
-
pluginsPremium = true;
|
754 |
-
}
|
755 |
-
}
|
756 |
-
}
|
757 |
-
} ) } */}
|
758 |
-
{ this.state.isLoadingPlugins && (
|
759 |
-
<Spinner />
|
760 |
-
) }
|
761 |
-
{ ! this.state.activePlugins && ! this.state.isLoadingPlugins && (
|
762 |
-
<Fragment>{ this.loadPluginData( item.slug, this.state.starterSettings['builderType'] ) }</Fragment>
|
763 |
-
) }
|
764 |
-
{ this.state.activePlugins && (
|
765 |
<Fragment>
|
766 |
-
{ this.state.
|
767 |
-
<
|
768 |
-
{
|
769 |
-
|
770 |
-
|
771 |
-
}
|
772 |
-
|
773 |
-
|
774 |
-
}
|
775 |
-
return (
|
776 |
-
<li className={ `plugin-required${ ( 'active' !== state && 'bundle' === src ? ' bundle-install-required' : '' ) }` }>
|
777 |
-
{ title } - <span class="plugin-status">{ ( 'notactive' === state ? __( 'Not Installed', 'kadence-starter-templates' ) : state ) }</span> { ( 'active' !== state && 'thirdparty' === src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium plugin' ) }</span> : '' ) }
|
778 |
-
</li>
|
779 |
-
);
|
780 |
-
} ) }
|
781 |
-
</ul>
|
782 |
) }
|
783 |
-
{ this.state.
|
784 |
<Fragment>
|
785 |
-
<
|
786 |
-
|
787 |
-
{
|
788 |
-
|
789 |
-
|
790 |
-
pluginsMember = true;
|
791 |
-
}
|
792 |
-
return (
|
793 |
-
<li className={ `plugin-required${ ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ? ' bundle-install-required' : '' ) }` }>
|
794 |
-
{ kadenceStarterParams.plugins[ slug ].title } - <span class="plugin-status">{ ( 'notactive' === kadenceStarterParams.plugins[ slug ].state ? __( 'Not Installed', 'kadence-starter-templates' ) : kadenceStarterParams.plugins[ slug ].state ) }</span> { ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium Plugin' ) }</span> : '' ) }
|
795 |
-
</li>
|
796 |
-
);
|
797 |
-
} else {
|
798 |
-
return (
|
799 |
-
<li className={ `plugin-required` }>
|
800 |
-
{ slug } - <span class="plugin-status">{ __( 'Unknown', 'kadence-starter-templates' ) }</span>
|
801 |
-
</li>
|
802 |
-
);
|
803 |
-
}
|
804 |
-
} ) }
|
805 |
-
</ul>
|
806 |
</Fragment>
|
807 |
) }
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
837 |
return (
|
838 |
-
<div
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
860 |
</div>
|
861 |
)
|
862 |
} ) }
|
863 |
-
</
|
864 |
-
)
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
{ map( this.state.fonts, ( { font, img, name } ) => {
|
872 |
-
if ( font !== this.state.fontPair ) {
|
873 |
-
return;
|
874 |
-
}
|
875 |
-
return (
|
876 |
-
<div className="kst-selected-font-pair">
|
877 |
-
<img src={ img } className="font-pairing" />
|
878 |
-
<h4>{ name }</h4>
|
879 |
-
</div>
|
880 |
-
)
|
881 |
-
} ) }
|
882 |
-
</Fragment>
|
883 |
-
) }
|
884 |
-
{ this.state.hasPastContent && (
|
885 |
-
<Fragment>
|
886 |
-
<ToggleControl
|
887 |
-
label={ __( 'Delete Previously Imported Posts and Images?', 'kadence-starter-templates' ) }
|
888 |
-
checked={ ( undefined !== this.state.removePast ? this.state.removePast : false ) }
|
889 |
-
onChange={ value => ( this.state.removePast ? this.setState( { removePast: false } ) : this.setState( { removePast: true } ) ) }
|
890 |
-
/>
|
891 |
-
{/* { this.state.isOpenCheckPast ?
|
892 |
-
<Modal
|
893 |
-
className="ksp-confirm-modal"
|
894 |
-
title={ __( 'Delete Previously Imported Posts and Images?', 'kadence-starter-templates' ) }
|
895 |
-
onRequestClose={ () => {
|
896 |
-
this.setState( { isOpenCheckPast: false } )
|
897 |
-
} }>
|
898 |
-
<p className="desc-small note-about-colors">{ __( 'This will delete pages, posts, and images previously imported through Kadence Starter Templates. If you are testing out different starter templates this is recommended.', 'kadence-starter-templates' ) }</p>
|
899 |
-
<div className="ksp-override-model-buttons">
|
900 |
-
<Button className="ksp-cancel-override" onClick={ () => {
|
901 |
-
this.setState( { isOpenCheckPast: false, removePast: false } );
|
902 |
-
} }>
|
903 |
-
{ __( 'Cancel', 'kadence-starter-templates' ) }
|
904 |
-
</Button>
|
905 |
-
<Button className="ksp-do-override" isPrimary onClick={ () => {
|
906 |
-
this.setState( { isOpenCheckPast: false, removePast: true } );
|
907 |
-
} }>
|
908 |
-
{ __( 'Override Colors', 'kadence-starter-templates' ) }
|
909 |
-
</Button>
|
910 |
-
</div>
|
911 |
-
</Modal>
|
912 |
-
: null } */}
|
913 |
-
</Fragment>
|
914 |
-
) }
|
915 |
-
{ this.state.progress === 'remove' && (
|
916 |
-
<div class="kadence_starter_templates_response">{ kadenceStarterParams.remove_progress }</div>
|
917 |
-
) }
|
918 |
-
{ this.state.progress === 'plugins' && (
|
919 |
-
<div class="kadence_starter_templates_response">{ kadenceStarterParams.plugin_progress }</div>
|
920 |
-
) }
|
921 |
-
{ this.state.progress === 'content' && (
|
922 |
-
<div class="kadence_starter_templates_response">{ kadenceStarterParams.content_progress }</div>
|
923 |
-
) }
|
924 |
-
{ this.state.progress === 'contentNew' && (
|
925 |
-
<div class="kadence_starter_templates_response">{ kadenceStarterParams.content_new_progress }</div>
|
926 |
-
) }
|
927 |
-
{ this.state.progress === 'customizer' && (
|
928 |
-
<div class="kadence_starter_templates_response">{ kadenceStarterParams.customizer_progress }</div>
|
929 |
-
) }
|
930 |
-
{ this.state.progress === 'widgets' && (
|
931 |
-
<div class="kadence_starter_templates_response">{ kadenceStarterParams.widgets_progress }</div>
|
932 |
-
) }
|
933 |
-
{ this.state.isFetching && (
|
934 |
-
<Spinner />
|
935 |
-
) }
|
936 |
-
{ ! kadenceStarterParams.isKadence && (
|
937 |
-
<div class="kadence_starter_templates_response">
|
938 |
-
<h2>{ __( 'This Starter Template Requires the Kadence Theme', 'kadence-starter-templates' ) }</h2>
|
939 |
-
<ExternalLink href={ 'https://kadence-theme.com/' }>{ __( 'Get Free Theme', 'kadence-starter-templates' ) }</ExternalLink>
|
940 |
-
</div>
|
941 |
-
) }
|
942 |
-
{ kadenceStarterParams.isKadence && (
|
943 |
-
<Fragment>
|
944 |
-
{ pluginsPremium && (
|
945 |
-
<Fragment>
|
946 |
-
{ pluginsMember && (
|
947 |
-
<div class="kadence_starter_templates_response">
|
948 |
-
<h2>{ __( 'Install Missing/Inactive Highlighted Premium plugins to Import', 'kadence-starter-templates' ) }</h2>
|
949 |
-
<ExternalLink href={ 'https://www.kadencewp.com/my-account/' }>{ __( 'Pro Account', 'kadence-starter-templates' ) }</ExternalLink>
|
950 |
-
</div>
|
951 |
-
) }
|
952 |
-
{ ! pluginsMember && (
|
953 |
-
<Button className="kt-defaults-save" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
954 |
-
if ( this.state.removePast ) {
|
955 |
-
this.runRemovePast( item.slug, this.state.starterSettings['builderType'] );
|
956 |
-
} else {
|
957 |
-
this.runPluginInstall( item.slug, this.state.starterSettings['builderType'] );
|
958 |
}
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
964 |
) }
|
965 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
966 |
<Fragment>
|
967 |
-
{
|
968 |
-
<
|
969 |
-
|
970 |
-
|
971 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
972 |
) }
|
973 |
-
{ !
|
974 |
-
<
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
{
|
982 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
983 |
) }
|
984 |
</Fragment>
|
985 |
) }
|
@@ -1144,7 +1246,7 @@ class KadenceImporter extends Component {
|
|
1144 |
|
1145 |
const MainPanel = () => (
|
1146 |
<Fragment>
|
1147 |
-
{
|
1148 |
<div className="main-panel">
|
1149 |
<div className="kst-overlay-saving">
|
1150 |
{ ! this.state.errorTemplates && (
|
27 |
import map from 'lodash/map';
|
28 |
import LazyLoad from 'react-lazy-load';
|
29 |
import KadenceImporterFullPreview from './full-preview-mode.js'
|
30 |
+
import KadenceSubscribeForm from './subscribe-form'
|
31 |
/**
|
32 |
* WordPress dependencies
|
33 |
*/
|
34 |
const { __, sprintf } = wp.i18n;
|
35 |
const { Fragment, Component, render, PureComponent } = wp.element;
|
36 |
+
const { Modal, Spinner, ButtonGroup, Dropdown, Icon, Button, ExternalLink, ToolbarGroup, CheckboxControl, TextControl, ToggleControl, MenuItem, Tooltip, PanelBody } = wp.components;
|
37 |
import {
|
38 |
arrowLeft,
|
39 |
download,
|
144 |
super( ...arguments );
|
145 |
this.runAjax = this.runAjax.bind( this );
|
146 |
this.runPluginInstall = this.runPluginInstall.bind( this );
|
147 |
+
this.runPluginInstallSingle = this.runPluginInstallSingle.bind( this );
|
148 |
+
this.runSubscribe = this.runSubscribe.bind( this );
|
149 |
+
this.runSubscribeSingle = this.runSubscribeSingle.bind( this );
|
150 |
this.loadTemplateData = this.loadTemplateData.bind( this );
|
151 |
this.reloadTemplateData = this.reloadTemplateData.bind( this );
|
152 |
this.loadPluginData = this.loadPluginData.bind( this );
|
191 |
isSaving: false,
|
192 |
isLoadingPlugins: false,
|
193 |
activePlugins: false,
|
194 |
+
showForm: true,
|
195 |
templatePlugins: '',
|
196 |
+
isSubscribed: kadenceStarterParams.subscribed ? true : false,
|
197 |
+
email: kadenceStarterParams.user_email,
|
198 |
+
privacy: false,
|
199 |
+
emailError: false,
|
200 |
+
privacyError: false,
|
201 |
+
settingOpen: false,
|
202 |
+
installContent: true,
|
203 |
+
installCustomizer: true,
|
204 |
+
installWidgets: true,
|
205 |
};
|
206 |
}
|
207 |
saveConfig( setting, settingValue ) {
|
352 |
});
|
353 |
}
|
354 |
runPluginInstallSingle( selected, page_id, builder ) {
|
355 |
+
this.setState( { progress: 'plugins', isFetching: true, showForm: false } );
|
356 |
var data = new FormData();
|
357 |
data.append( 'action', 'kadence_import_install_plugins' );
|
358 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
361 |
data.append( 'page_id', page_id );
|
362 |
this.runPageAjax( data );
|
363 |
}
|
364 |
+
runSubscribeSingle( email ) {
|
365 |
+
this.setState( { progress: 'subscribe', isFetching: true, showForm: false } );
|
366 |
+
var data = new FormData();
|
367 |
+
data.append( 'action', 'kadence_import_subscribe' );
|
368 |
+
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
369 |
+
data.append( 'email', email );
|
370 |
+
this.runPageAjax( data );
|
371 |
+
}
|
372 |
runRemovePast( selected, builder ) {
|
373 |
+
this.setState( { progress: 'remove', isFetching: true, showForm: false } );
|
374 |
var data = new FormData();
|
375 |
data.append( 'action', 'kadence_remove_past_import_data' );
|
376 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
379 |
this.runAjax( data );
|
380 |
}
|
381 |
runPluginInstall( selected, builder ) {
|
382 |
+
this.setState( { progress: 'plugins', isFetching: true, showForm: false } );
|
383 |
var data = new FormData();
|
384 |
data.append( 'action', 'kadence_import_install_plugins' );
|
385 |
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
387 |
data.append( 'builder', builder );
|
388 |
this.runAjax( data );
|
389 |
}
|
390 |
+
runSubscribe( email ) {
|
391 |
+
this.setState( { progress: 'subscribe', isFetching: true, showForm: false } );
|
392 |
+
var data = new FormData();
|
393 |
+
data.append( 'action', 'kadence_import_subscribe' );
|
394 |
+
data.append( 'security', kadenceStarterParams.ajax_nonce );
|
395 |
+
data.append( 'email', email );
|
396 |
+
this.runAjax( data );
|
397 |
+
}
|
398 |
runPageAjax( data ) {
|
399 |
var control = this;
|
400 |
jQuery.ajax({
|
408 |
if ( 'undefined' !== typeof response.status && 'newAJAX' === response.status ) {
|
409 |
control.state.progress = 'contentNew';
|
410 |
control.runPageAjax( data );
|
411 |
+
} else if ( 'undefined' !== typeof response.status && 'subscribeSuccess' === response.status ) {
|
412 |
+
control.setState( { progress: 'plugins' } );
|
413 |
+
var newData = new FormData();
|
414 |
+
newData.append( 'action', 'kadence_import_install_plugins' );
|
415 |
+
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
416 |
+
newData.append( 'selected', control.state.activeTemplate );
|
417 |
+
newData.append( 'builder', control.state.starterSettings['builderType'] );
|
418 |
+
newData.append( 'page_id', control.state.selectedPage );
|
419 |
+
control.runPageAjax( newData );
|
420 |
} else if ( 'undefined' !== typeof response.status && 'pluginSuccess' === response.status ) {
|
421 |
control.setState( { progress: 'content' } );
|
422 |
var newData = new FormData();
|
432 |
control.runPageAjax( newData );
|
433 |
} else if ( 'undefined' !== typeof response.message ) {
|
434 |
//jQuery( '.kadence_starter_templates_finished' ).append( '<p>' + response.message + '</p>' );
|
435 |
+
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, progress: '', showForm: true, response: '<p>' + response.message + '</p>' } );
|
436 |
+
} else if ( response === 'emailDomainPostError' || response === 'emailDomainPreError' ) {
|
437 |
+
control.setState( { isFetching: false, progress: '', showForm: true, emailError: true } );
|
438 |
} else {
|
439 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' );
|
440 |
+
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, progress: '', showForm: true, response: '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' } );
|
441 |
}
|
442 |
})
|
443 |
.fail( function( error ) {
|
444 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' );
|
445 |
+
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, progress: '', showForm: true, response: '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' } );
|
446 |
});
|
447 |
}
|
448 |
runAjax( data ) {
|
459 |
control.state.progress = 'contentNew';
|
460 |
control.runAjax( data );
|
461 |
} else if ( 'undefined' !== typeof response.status && 'customizerAJAX' === response.status ) {
|
|
|
|
|
462 |
var newData = new FormData();
|
|
|
463 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
464 |
+
if ( control.state.installCustomizer ) {
|
465 |
+
control.setState( { progress: 'customizer' } );
|
466 |
+
newData.append( 'action', 'kadence_import_customizer_data' );
|
467 |
+
newData.append( 'wp_customize', 'on' );
|
468 |
+
} else {
|
469 |
+
control.setState( { progress: 'widgets' } );
|
470 |
+
newData.append( 'action', 'kadence_after_import_data' );
|
471 |
+
}
|
472 |
control.runAjax( newData );
|
473 |
} else if ( 'undefined' !== typeof response.status && 'afterAllImportAJAX' === response.status ) {
|
474 |
control.setState( { progress: 'widgets' } );
|
|
|
475 |
var newData = new FormData();
|
476 |
newData.append( 'action', 'kadence_after_import_data' );
|
477 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
478 |
control.runAjax( newData );
|
479 |
} else if ( 'undefined' !== typeof response.status && 'pluginSuccess' === response.status ) {
|
|
|
480 |
var newData = new FormData();
|
|
|
481 |
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
482 |
+
if ( control.state.installContent ) {
|
483 |
+
control.setState( { progress: 'content' } );
|
484 |
+
newData.append( 'action', 'kadence_import_demo_data' );
|
485 |
+
newData.append( 'builder', control.state.starterSettings['builderType'] );
|
486 |
+
newData.append( 'selected', control.state.activeTemplate );
|
487 |
+
newData.append( 'palette', control.state.colorPalette );
|
488 |
+
newData.append( 'font', control.state.fontPair );
|
489 |
+
} else if ( control.state.installCustomizer ) {
|
490 |
+
control.setState( { progress: 'customizer' } );
|
491 |
+
newData.append( 'action', 'kadence_import_customizer_data' );
|
492 |
+
newData.append( 'wp_customize', 'on' );
|
493 |
+
} else {
|
494 |
+
control.setState( { progress: 'widgets' } );
|
495 |
+
newData.append( 'action', 'kadence_after_import_data' );
|
496 |
+
}
|
497 |
control.runAjax( newData );
|
498 |
} else if ( 'undefined' !== typeof response.status && 'removeSuccess' === response.status ) {
|
499 |
control.setState( { progress: 'plugins' } );
|
503 |
newData.append( 'selected', control.state.activeTemplate );
|
504 |
newData.append( 'builder', control.state.starterSettings['builderType'] );
|
505 |
control.runAjax( newData );
|
506 |
+
} else if ( 'undefined' !== typeof response.status && 'subscribeSuccess' === response.status ) {
|
507 |
+
var newData = new FormData();
|
508 |
+
if ( control.state.removePast ) {
|
509 |
+
this.setState( { progress: 'remove' } );
|
510 |
+
newData.append( 'action', 'kadence_remove_past_import_data' );
|
511 |
+
} else {
|
512 |
+
control.setState( { progress: 'plugins' } );
|
513 |
+
newData.append( 'action', 'kadence_import_install_plugins' );
|
514 |
+
}
|
515 |
+
newData.append( 'security', kadenceStarterParams.ajax_nonce );
|
516 |
+
newData.append( 'selected', control.state.activeTemplate );
|
517 |
+
newData.append( 'builder', control.state.starterSettings['builderType'] );
|
518 |
+
control.runAjax( newData );
|
519 |
} else if ( 'undefined' !== typeof response.message ) {
|
520 |
//jQuery( '.kadence_starter_templates_finished' ).append( '<p>' + response.message + '</p>' );
|
521 |
+
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', showForm: true, response: '<p>' + response.message + '</p>' } );
|
522 |
} else if ( 'undefined' !== typeof response.success && ! response.success ) {
|
523 |
//jQuery( '.kadence_starter_templates_finished' ).append( '<p>' + response.message + '</p>' );
|
524 |
+
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', showForm: true, response: '<div class="notice kadence_starter_templates_response notice-error"><p>' + __( 'Failed Import. Something went wrong internally. Please try again.', 'kadence-starter-templates' ) + '</p></div>' } );
|
525 |
} else {
|
526 |
+
console.log( response );
|
527 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' );
|
528 |
+
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', showForm: true, response: '<div class="notice kadence_starter_templates_response notice-error"><p>' + response + '</p></div>' } );
|
529 |
}
|
530 |
})
|
531 |
.fail( function( error ) {
|
532 |
console.log( error );
|
533 |
//jQuery( '.kadence_starter_templates_error' ).append( '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' );
|
534 |
+
control.setState( { finished: true, hasContent:true, hasPastContent:true, isFetching: false, colorPalette: '', fontPair: '', focusMode: false, isImporting: false, isSelected:false, isPageSelected:false, progress: '', showForm: true, response: '<div class="notice kadence_starter_templates_response notice-error"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' } );
|
535 |
});
|
536 |
}
|
537 |
render() {
|
556 |
builderTypeName = ( kadenceStarterParams.custom_name ? kadenceStarterParams.custom_name : __( 'Pro Designs', 'kadence-starter-templates' ) );
|
557 |
builderTypeIcon = ( kadenceStarterParams.custom_icon ? <img className="components-menu-items__item-icon custom-image-icon-src" src={ kadenceStarterParams.custom_icon } /> : cIcon );
|
558 |
}
|
559 |
+
const errorMessageShow = ( this.state.isSaving || false === this.state.activeTemplates || this.state.errorTemplates ? true : false );
|
560 |
const KadenceImportSingleMode = () => {
|
561 |
const item = this.state.activeTemplates[this.state.activeTemplate];
|
562 |
let pluginsMember = false;
|
572 |
<div className="kst-import-selection-title">
|
573 |
<h2>{ __( 'Template:', 'kadence-starter-templates' ) } <span>{ item.name }</span><br></br> { __( 'Selected Page:', 'kadence-starter-templates' ) } <span>{ item.pages[this.state.selectedPage].title }</span></h2>
|
574 |
</div>
|
575 |
+
<PanelBody
|
576 |
+
title={ __( 'Advanced Settings', 'kadence-blocks' ) }
|
577 |
+
initialOpen={ this.state.settingOpen }
|
578 |
+
onToggle={ value => ( this.state.settingOpen ? this.setState( { settingOpen: false } ) : this.setState( { settingOpen: true } ) ) }
|
579 |
+
>
|
580 |
+
<div className="kst-import-grid-title">
|
581 |
+
<h2>{ __( 'Page Template Plugins', 'kadence-starter-templates' ) }</h2>
|
582 |
+
</div>
|
583 |
+
{ this.state.isLoadingPlugins && (
|
584 |
+
<Spinner />
|
585 |
+
) }
|
586 |
+
{ ! this.state.activePlugins && ! this.state.isLoadingPlugins && (
|
587 |
+
<Fragment>{ this.loadPluginData( item.slug, this.state.starterSettings['builderType'] ) }</Fragment>
|
588 |
+
) }
|
589 |
+
{ this.state.activePlugins && (
|
590 |
+
<Fragment>
|
591 |
+
{ this.state.templatePlugins && 'error' !== this.state.templatePlugins && (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
<ul className="kadence-required-wrap">
|
593 |
+
{ map( this.state.templatePlugins, ( { state, src, title } ) => {
|
594 |
+
if ( 'active' !== state && 'bundle' === src ) {
|
595 |
+
pluginsMember = true;
|
596 |
+
}
|
597 |
+
if ( 'active' !== state && ( 'thirdparty' === src || 'unknown' === src ) ) {
|
598 |
+
pluginsPremium = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
600 |
return (
|
601 |
+
<li className={ `plugin-required${ ( 'active' !== state && 'bundle' === src ? ' bundle-install-required' : '' ) }` }>
|
602 |
+
{ title } - <span class="plugin-status">{ ( 'notactive' === state ? __( 'Not Installed', 'kadence-starter-templates' ) : state ) }</span> { ( 'active' !== state && 'thirdparty' === src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium plugin' ) }</span> : '' ) }
|
603 |
+
</li>
|
604 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
} ) }
|
606 |
+
</ul>
|
607 |
+
) }
|
608 |
+
{ this.state.templatePlugins && 'error' === this.state.templatePlugins && (
|
609 |
+
<Fragment>
|
610 |
+
<p className="desc-small install-third-party-notice">{ __( '*Error accessing active plugin information, you may import but first manually check that you have installed all required plugins.', 'kadence-starter-templates' ) }</p>
|
611 |
+
<ul className="kadence-required-wrap">
|
612 |
+
{ map( item.plugins, ( slug ) => {
|
613 |
+
if ( kadenceStarterParams.plugins[ slug ] ) {
|
614 |
+
if ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ) {
|
615 |
+
pluginsMember = true;
|
616 |
+
}
|
617 |
+
return (
|
618 |
+
<li className={ `plugin-required${ ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ? ' bundle-install-required' : '' ) }` }>
|
619 |
+
{ kadenceStarterParams.plugins[ slug ].title } - <span class="plugin-status">{ ( 'notactive' === kadenceStarterParams.plugins[ slug ].state ? __( 'Not Installed', 'kadence-starter-templates' ) : kadenceStarterParams.plugins[ slug ].state ) }</span> { ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium Plugin' ) }</span> : '' ) }
|
620 |
+
</li>
|
621 |
+
);
|
622 |
+
} else {
|
623 |
+
return (
|
624 |
+
<li className={ `plugin-required` }>
|
625 |
+
{ slug } - <span class="plugin-status">{ __( 'Unknown', 'kadence-starter-templates' ) }</span>
|
626 |
+
</li>
|
627 |
+
);
|
628 |
+
}
|
629 |
+
} ) }
|
630 |
+
</ul>
|
631 |
+
</Fragment>
|
632 |
+
) }
|
633 |
+
</Fragment>
|
634 |
+
) }
|
635 |
+
<p className="desc-small note-about-colors">{ __( '*Single Page templates will follow your website current global colors and typography settings, you can import without effecting your current site. Or you can optionally override your websites global colors and typography by enabling the settings below.', 'kadence-starter-templates' ) }</p>
|
636 |
+
<ToggleControl
|
637 |
+
label={ __( 'Override Your Sites Global Colors?', 'kadence-starter-templates' ) }
|
638 |
+
checked={ ( undefined !== this.state.overrideColors ? this.state.overrideColors : false ) }
|
639 |
+
onChange={ value => ( this.state.overrideColors ? this.setState( { overrideColors: false } ) : this.setState( { isOpenCheckColor: true } ) ) }
|
640 |
+
/>
|
641 |
+
{ this.state.isOpenCheckColor ?
|
642 |
+
<Modal
|
643 |
+
className="ksp-confirm-modal"
|
644 |
+
title={ __( 'Override Your Sites Colors on Import?', 'kadence-starter-templates' ) }
|
645 |
+
onRequestClose={ () => {
|
646 |
+
this.setState( { isOpenCheckColor: false } )
|
647 |
} }>
|
648 |
+
<p className="desc-small note-about-colors">{ __( 'This will override the customizer settings for global colors on your current site when you import this page template.', 'kadence-starter-templates' ) }</p>
|
649 |
+
<div className="ksp-override-model-buttons">
|
650 |
+
<Button className="ksp-cancel-override" onClick={ () => {
|
651 |
+
this.setState( { isOpenCheckColor: false, overrideColors: false } );
|
652 |
+
} }>
|
653 |
+
{ __( 'Cancel', 'kadence-starter-templates' ) }
|
654 |
+
</Button>
|
655 |
+
<Button className="ksp-do-override" isPrimary onClick={ () => {
|
656 |
+
this.setState( { isOpenCheckColor: false, overrideColors: true } );
|
657 |
+
} }>
|
658 |
+
{ __( 'Override Colors', 'kadence-starter-templates' ) }
|
659 |
+
</Button>
|
660 |
+
</div>
|
661 |
+
</Modal>
|
662 |
+
: null }
|
663 |
+
{ this.state.overrideColors && this.state.colorPalette && (
|
664 |
+
<Fragment>
|
665 |
+
<h3>{ __( 'Selected Color Palette', 'kadence-starter-templates' ) }</h3>
|
666 |
+
{ map( this.state.palettes, ( { palette, colors } ) => {
|
667 |
+
if ( palette !== this.state.colorPalette ) {
|
668 |
+
return;
|
669 |
+
}
|
670 |
+
return (
|
671 |
+
<div className="kst-palette-btn kst-selected-color-palette">
|
672 |
+
{ map( colors, ( color, index ) => {
|
673 |
+
return (
|
674 |
+
<div key={ index } style={ {
|
675 |
+
width: 22,
|
676 |
+
height: 22,
|
677 |
+
marginBottom: 0,
|
678 |
+
marginRight:'3px',
|
679 |
+
transform: 'scale(1)',
|
680 |
+
transition: '100ms transform ease',
|
681 |
+
} } className="kadence-swatche-item-wrap">
|
682 |
+
<span
|
683 |
+
className={ 'kadence-swatch-item' }
|
684 |
+
style={ {
|
685 |
+
height: '100%',
|
686 |
+
display: 'block',
|
687 |
+
width: '100%',
|
688 |
+
border: '1px solid rgb(218, 218, 218)',
|
689 |
+
borderRadius: '50%',
|
690 |
+
color: `${ color }`,
|
691 |
+
boxShadow: `inset 0 0 0 ${ 30 / 2 }px`,
|
692 |
+
transition: '100ms box-shadow ease',
|
693 |
+
} }
|
694 |
+
>
|
695 |
+
</span>
|
696 |
+
</div>
|
697 |
+
)
|
698 |
+
} ) }
|
699 |
+
</div>
|
700 |
+
)
|
701 |
+
} ) }
|
702 |
+
</Fragment>
|
703 |
+
) }
|
704 |
+
<ToggleControl
|
705 |
+
label={ __( 'Override Your Sites Fonts?', 'kadence-starter-templates' ) }
|
706 |
+
checked={ ( undefined !== this.state.overrideFonts ? this.state.overrideFonts : false ) }
|
707 |
+
onChange={ value => ( this.state.overrideFonts ? this.setState( { overrideFonts: false } ) : this.setState( { isOpenCheckFont: true } ) ) }
|
708 |
+
/>
|
709 |
+
{ this.state.isOpenCheckFont ?
|
710 |
+
<Modal
|
711 |
+
className="ksp-confirm-modal"
|
712 |
+
title={ __( 'Override Your Sites Fonts on Import?', 'kadence-starter-templates' ) }
|
713 |
+
onRequestClose={ () => {
|
714 |
+
this.setState( { isOpenCheckFont: false } )
|
715 |
} }>
|
716 |
+
<p className="desc-small note-about-colors">{ __( 'This will override the customizer typography settings on your current site when you import this page template.', 'kadence-starter-templates' ) }</p>
|
717 |
+
<div className="ksp-override-model-buttons">
|
718 |
+
<Button className="ksp-cancel-override" onClick={ () => {
|
719 |
+
this.setState( { isOpenCheckFont: false, overrideFonts: false } );
|
720 |
+
} }>
|
721 |
+
{ __( 'Cancel', 'kadence-starter-templates' ) }
|
722 |
+
</Button>
|
723 |
+
<Button className="ksp-do-override" isPrimary onClick={ () => {
|
724 |
+
this.setState( { isOpenCheckFont: false, overrideFonts: true } );
|
725 |
+
} }>
|
726 |
+
{ __( 'Override Fonts', 'kadence-starter-templates' ) }
|
727 |
+
</Button>
|
728 |
+
</div>
|
729 |
+
</Modal>
|
730 |
+
: null }
|
731 |
+
{ this.state.fontPair && this.state.overrideFonts && (
|
732 |
+
<Fragment>
|
733 |
+
<h3 className="kst-selected-font-pair-title">{ __( 'Selected Font Pair', 'kadence-starter-templates' ) }</h3>
|
734 |
+
{ map( this.state.fonts, ( { font, img, name } ) => {
|
735 |
+
if ( font !== this.state.fontPair ) {
|
736 |
+
return;
|
737 |
+
}
|
738 |
+
return (
|
739 |
+
<div className="kst-selected-font-pair">
|
740 |
+
<img src={ img } className="font-pairing" />
|
741 |
+
<h4>{ name }</h4>
|
742 |
+
</div>
|
743 |
+
)
|
744 |
+
} ) }
|
745 |
+
</Fragment>
|
746 |
+
) }
|
747 |
+
</PanelBody>
|
748 |
+
{ this.state.progress === 'subscribe' && (
|
749 |
+
<div class="kadence_starter_templates_response">{ kadenceStarterParams.subscribe_progress }</div>
|
750 |
) }
|
751 |
{ this.state.progress === 'plugins' && (
|
752 |
<div class="kadence_starter_templates_response">{ kadenceStarterParams.plugin_progress }</div>
|
775 |
</div>
|
776 |
) }
|
777 |
{ ! pluginsMember && (
|
778 |
+
<Fragment>
|
779 |
+
{ this.state.showForm && ! this.state.isSubscribed && (
|
780 |
+
<Fragment>
|
781 |
+
<KadenceSubscribeForm
|
782 |
+
emailError={ this.state.emailError }
|
783 |
+
onRun={ email => this.runSubscribeSingle( email ) }
|
784 |
+
/>
|
785 |
+
<Button className="kb-skip-start subscribe" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
786 |
+
this.runPluginInstallSingle( item.slug, this.state.selectedPage, this.state.starterSettings['builderType'] );
|
787 |
+
} }>
|
788 |
+
{ __( 'Skip, start importing page', 'kadence-starter-templates' ) }
|
789 |
+
</Button>
|
790 |
+
</Fragment>
|
791 |
+
) }
|
792 |
+
{ this.state.showForm && this.state.isSubscribed && (
|
793 |
+
<Fragment>
|
794 |
+
<Button className="kt-defaults-save" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
795 |
+
this.runPluginInstallSingle( item.slug, this.state.selectedPage, this.state.starterSettings['builderType'] );
|
796 |
+
} }>
|
797 |
+
{ __( 'Start Importing Page', 'kadence-starter-templates' ) }
|
798 |
+
</Button>
|
799 |
+
</Fragment>
|
800 |
+
) }
|
801 |
+
</Fragment>
|
802 |
) }
|
803 |
</Fragment>
|
804 |
) }
|
831 |
className="kst-import-modal"
|
832 |
title={ __( 'Import Starter Template' ) }
|
833 |
onRequestClose={ () => this.state.isFetching ? false : this.setState( { activeTemplate: '', activePlugins: false, colorPalette: '', focusMode: false, isImporting: false, progress: '' } ) }>
|
834 |
+
{ ! kadenceStarterParams.isKadence && (
|
835 |
+
<div class="kadence_starter_templates_response">
|
836 |
+
<h2>{ __( 'This Starter Template Requires the Kadence Theme', 'kadence-starter-templates' ) }</h2>
|
837 |
+
<ExternalLink href={ 'https://kadence-theme.com/' }>{ __( 'Get Free Theme', 'kadence-starter-templates' ) }</ExternalLink>
|
|
|
|
|
|
|
838 |
</div>
|
839 |
) }
|
840 |
+
{ kadenceStarterParams.isKadence && (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
841 |
<Fragment>
|
842 |
+
{ this.state.hasContent && (
|
843 |
+
<div className="kadence_starter_templates_notice">
|
844 |
+
{ this.state.hasPastContent ? (
|
845 |
+
<Fragment>{ kadenceStarterParams.notice_previous }</Fragment>
|
846 |
+
) : (
|
847 |
+
<Fragment>{ kadenceStarterParams.notice }</Fragment>
|
848 |
+
) }
|
849 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
850 |
) }
|
851 |
+
{ this.state.hasPastContent && (
|
852 |
<Fragment>
|
853 |
+
<ToggleControl
|
854 |
+
label={ __( 'Delete Previously Imported Posts and Images?', 'kadence-starter-templates' ) }
|
855 |
+
checked={ ( undefined !== this.state.removePast ? this.state.removePast : false ) }
|
856 |
+
onChange={ value => ( this.state.removePast ? this.setState( { removePast: false } ) : this.setState( { removePast: true } ) ) }
|
857 |
+
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
858 |
</Fragment>
|
859 |
) }
|
860 |
+
<PanelBody
|
861 |
+
title={ __( 'Import Details', 'kadence-blocks' ) }
|
862 |
+
initialOpen={ false }
|
863 |
+
>
|
864 |
+
<div className="required-plugins-list">
|
865 |
+
<h3 className="required-plugins-list-header">{ __( 'Required Plugins', 'kadence-starter-templates' ) }</h3>
|
866 |
+
{ this.state.isLoadingPlugins && (
|
867 |
+
<Spinner />
|
868 |
+
) }
|
869 |
+
{ ! this.state.activePlugins && ! this.state.isLoadingPlugins && (
|
870 |
+
<Fragment>{ this.loadPluginData( item.slug, this.state.starterSettings['builderType'] ) }</Fragment>
|
871 |
+
) }
|
872 |
+
{ this.state.activePlugins && (
|
873 |
+
<Fragment>
|
874 |
+
{ this.state.templatePlugins && 'error' !== this.state.templatePlugins && (
|
875 |
+
<ul className="kadence-required-wrap">
|
876 |
+
{ map( this.state.templatePlugins, ( { state, src, title } ) => {
|
877 |
+
if ( 'active' !== state && 'bundle' === src ) {
|
878 |
+
pluginsMember = true;
|
879 |
+
}
|
880 |
+
if ( 'active' !== state && ( 'thirdparty' === src || 'unknown' === src ) ) {
|
881 |
+
pluginsPremium = true;
|
882 |
+
}
|
883 |
+
return (
|
884 |
+
<li className={ `plugin-required${ ( 'active' !== state && 'bundle' === src ? ' bundle-install-required' : '' ) }` }>
|
885 |
+
{ title } - <span class="plugin-status">{ ( 'notactive' === state ? __( 'Not Installed', 'kadence-starter-templates' ) : state ) }</span> { ( 'active' !== state && 'thirdparty' === src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium plugin' ) }</span> : '' ) }
|
886 |
+
</li>
|
887 |
+
);
|
888 |
+
} ) }
|
889 |
+
</ul>
|
890 |
+
) }
|
891 |
+
{ this.state.templatePlugins && 'error' === this.state.templatePlugins && (
|
892 |
+
<Fragment>
|
893 |
+
<p className="desc-small install-third-party-notice">{ __( '*Error accessing active plugin information, you may import but first manually check that you have installed all required plugins.', 'kadence-starter-templates' ) }</p>
|
894 |
+
<ul className="kadence-required-wrap">
|
895 |
+
{ map( item.plugins, ( slug ) => {
|
896 |
+
if ( kadenceStarterParams.plugins[ slug ] ) {
|
897 |
+
if ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ) {
|
898 |
+
pluginsMember = true;
|
899 |
+
}
|
900 |
+
return (
|
901 |
+
<li className={ `plugin-required${ ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'bundle' === kadenceStarterParams.plugins[ slug ].src ? ' bundle-install-required' : '' ) }` }>
|
902 |
+
{ kadenceStarterParams.plugins[ slug ].title } - <span class="plugin-status">{ ( 'notactive' === kadenceStarterParams.plugins[ slug ].state ? __( 'Not Installed', 'kadence-starter-templates' ) : kadenceStarterParams.plugins[ slug ].state ) }</span> { ( 'active' !== kadenceStarterParams.plugins[ slug ].state && 'thirdparty' === kadenceStarterParams.plugins[ slug ].src ? <span class="plugin-install-required">{ __( 'Please install and activate this third-party premium Plugin' ) }</span> : '' ) }
|
903 |
+
</li>
|
904 |
+
);
|
905 |
+
} else {
|
906 |
+
return (
|
907 |
+
<li className={ `plugin-required` }>
|
908 |
+
{ slug } - <span class="plugin-status">{ __( 'Unknown', 'kadence-starter-templates' ) }</span>
|
909 |
+
</li>
|
910 |
+
);
|
911 |
+
}
|
912 |
+
} ) }
|
913 |
+
</ul>
|
914 |
+
</Fragment>
|
915 |
+
) }
|
916 |
+
</Fragment>
|
917 |
+
) }
|
918 |
+
</div>
|
919 |
+
{ this.state.colorPalette && (
|
920 |
+
<Fragment>
|
921 |
+
<h3>{ __( 'Selected Color Palette', 'kadence-starter-templates' ) }</h3>
|
922 |
+
{ map( this.state.palettes, ( { palette, colors } ) => {
|
923 |
+
if ( palette !== this.state.colorPalette ) {
|
924 |
+
return;
|
925 |
+
}
|
926 |
return (
|
927 |
+
<div className="kst-palette-btn kst-selected-color-palette">
|
928 |
+
{ map( colors, ( color, index ) => {
|
929 |
+
return (
|
930 |
+
<div key={ index } style={ {
|
931 |
+
width: 22,
|
932 |
+
height: 22,
|
933 |
+
marginBottom: 0,
|
934 |
+
marginRight:'3px',
|
935 |
+
transform: 'scale(1)',
|
936 |
+
transition: '100ms transform ease',
|
937 |
+
} } className="kadence-swatche-item-wrap">
|
938 |
+
<span
|
939 |
+
className={ 'kadence-swatch-item' }
|
940 |
+
style={ {
|
941 |
+
height: '100%',
|
942 |
+
display: 'block',
|
943 |
+
width: '100%',
|
944 |
+
border: '1px solid rgb(218, 218, 218)',
|
945 |
+
borderRadius: '50%',
|
946 |
+
color: `${ color }`,
|
947 |
+
boxShadow: `inset 0 0 0 ${ 30 / 2 }px`,
|
948 |
+
transition: '100ms box-shadow ease',
|
949 |
+
} }
|
950 |
+
>
|
951 |
+
</span>
|
952 |
+
</div>
|
953 |
+
)
|
954 |
+
} ) }
|
955 |
</div>
|
956 |
)
|
957 |
} ) }
|
958 |
+
</Fragment>
|
959 |
+
) }
|
960 |
+
{ this.state.fontPair && (
|
961 |
+
<Fragment>
|
962 |
+
<h3 className="kst-selected-font-pair-title">{ __( 'Selected Font Pair', 'kadence-starter-templates' ) }</h3>
|
963 |
+
{ map( this.state.fonts, ( { font, img, name } ) => {
|
964 |
+
if ( font !== this.state.fontPair ) {
|
965 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
966 |
}
|
967 |
+
return (
|
968 |
+
<div className="kst-selected-font-pair">
|
969 |
+
<img src={ img } className="font-pairing" />
|
970 |
+
<h4>{ name }</h4>
|
971 |
+
</div>
|
972 |
+
)
|
973 |
+
} ) }
|
974 |
+
</Fragment>
|
975 |
+
) }
|
976 |
+
</PanelBody>
|
977 |
+
<PanelBody
|
978 |
+
title={ __( 'Advanced Settings', 'kadence-blocks' ) }
|
979 |
+
initialOpen={ false }
|
980 |
+
>
|
981 |
+
<ToggleControl
|
982 |
+
label={ __( 'Import Customizer Settings', 'kadence-starter-templates' ) }
|
983 |
+
checked={ ( undefined !== this.state.installCustomizer ? this.state.installCustomizer : false ) }
|
984 |
+
onChange={ value => ( this.state.installCustomizer ? this.setState( { installCustomizer: false } ) : this.setState( { installCustomizer: true } ) ) }
|
985 |
+
/>
|
986 |
+
<ToggleControl
|
987 |
+
label={ __( 'Import Content', 'kadence-starter-templates' ) }
|
988 |
+
checked={ ( undefined !== this.state.installContent ? this.state.installContent : false ) }
|
989 |
+
onChange={ value => ( this.state.installContent ? this.setState( { installContent: false } ) : this.setState( { installContent: true } ) ) }
|
990 |
+
/>
|
991 |
+
</PanelBody>
|
992 |
+
{ pluginsPremium && (
|
993 |
+
<p className="desc-small install-third-party-notice">{ __( '*This starter template requires premium third-party plugins. Please install missing/inactive premium plugins to import.', 'kadence-starter-templates' ) }</p>
|
994 |
) }
|
995 |
+
{ this.state.progress === 'subscribe' && (
|
996 |
+
<div class="kadence_starter_templates_response">{ kadenceStarterParams.subscribe_progress }</div>
|
997 |
+
) }
|
998 |
+
{ this.state.progress === 'remove' && (
|
999 |
+
<div class="kadence_starter_templates_response">{ kadenceStarterParams.remove_progress }</div>
|
1000 |
+
) }
|
1001 |
+
{ this.state.progress === 'plugins' && (
|
1002 |
+
<div class="kadence_starter_templates_response">{ kadenceStarterParams.plugin_progress }</div>
|
1003 |
+
) }
|
1004 |
+
{ this.state.progress === 'content' && (
|
1005 |
+
<div class="kadence_starter_templates_response">{ kadenceStarterParams.content_progress }</div>
|
1006 |
+
) }
|
1007 |
+
{ this.state.progress === 'contentNew' && (
|
1008 |
+
<div class="kadence_starter_templates_response">{ kadenceStarterParams.content_new_progress }</div>
|
1009 |
+
) }
|
1010 |
+
{ this.state.progress === 'customizer' && (
|
1011 |
+
<div class="kadence_starter_templates_response">{ kadenceStarterParams.customizer_progress }</div>
|
1012 |
+
) }
|
1013 |
+
{ this.state.progress === 'widgets' && (
|
1014 |
+
<div class="kadence_starter_templates_response">{ kadenceStarterParams.widgets_progress }</div>
|
1015 |
+
) }
|
1016 |
+
{ this.state.isFetching && (
|
1017 |
+
<Spinner />
|
1018 |
+
) }
|
1019 |
+
{ kadenceStarterParams.isKadence && (
|
1020 |
<Fragment>
|
1021 |
+
{ pluginsPremium && (
|
1022 |
+
<Fragment>
|
1023 |
+
{ pluginsMember && (
|
1024 |
+
<div class="kadence_starter_templates_response">
|
1025 |
+
<h2>{ __( 'Install Missing/Inactive Highlighted Premium plugins to Import', 'kadence-starter-templates' ) }</h2>
|
1026 |
+
<ExternalLink href={ 'https://www.kadencewp.com/my-account/' }>{ __( 'Pro Account', 'kadence-starter-templates' ) }</ExternalLink>
|
1027 |
+
</div>
|
1028 |
+
) }
|
1029 |
+
{ ! pluginsMember && (
|
1030 |
+
<Button className="kt-defaults-save" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
1031 |
+
if ( this.state.removePast ) {
|
1032 |
+
this.runRemovePast( item.slug, this.state.starterSettings['builderType'] );
|
1033 |
+
} else {
|
1034 |
+
this.runPluginInstall( item.slug, this.state.starterSettings['builderType'] );
|
1035 |
+
}
|
1036 |
+
} }>
|
1037 |
+
{ __( 'Skip and Import with Partial Content' ) }
|
1038 |
+
</Button>
|
1039 |
+
) }
|
1040 |
+
</Fragment>
|
1041 |
) }
|
1042 |
+
{ ! pluginsPremium && (
|
1043 |
+
<Fragment>
|
1044 |
+
{ pluginsMember && (
|
1045 |
+
<div class="kadence_starter_templates_response">
|
1046 |
+
<h2>{ __( 'Install Missing/Inactive Highlighted Premium plugins to Import', 'kadence-starter-templates' ) }</h2>
|
1047 |
+
<ExternalLink href={ 'https://www.kadencewp.com/my-account/' }>{ __( 'Pro Account', 'kadence-starter-templates' ) }</ExternalLink>
|
1048 |
+
</div>
|
1049 |
+
) }
|
1050 |
+
{ ! pluginsMember && (
|
1051 |
+
<Fragment>
|
1052 |
+
{ this.state.showForm && ! this.state.isSubscribed && (
|
1053 |
+
<Fragment>
|
1054 |
+
<KadenceSubscribeForm
|
1055 |
+
emailError={ this.state.emailError }
|
1056 |
+
onRun={ email => this.runSubscribe( email ) }
|
1057 |
+
/>
|
1058 |
+
<Button className="kb-skip-start" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
1059 |
+
if ( this.state.removePast ) {
|
1060 |
+
this.runRemovePast( item.slug, this.state.starterSettings['builderType'] );
|
1061 |
+
} else {
|
1062 |
+
this.runPluginInstall( item.slug, this.state.starterSettings['builderType'] );
|
1063 |
+
}
|
1064 |
+
} }>
|
1065 |
+
{ __( 'Skip, Start Importing' ) }
|
1066 |
+
</Button>
|
1067 |
+
</Fragment>
|
1068 |
+
) }
|
1069 |
+
{ this.state.showForm && this.state.isSubscribed && (
|
1070 |
+
<Fragment>
|
1071 |
+
<Button className="kt-defaults-save" isPrimary disabled={ this.state.isFetching } onClick={ () => {
|
1072 |
+
if ( this.state.removePast ) {
|
1073 |
+
this.runRemovePast( item.slug, this.state.starterSettings['builderType'] );
|
1074 |
+
} else {
|
1075 |
+
this.runPluginInstall( item.slug, this.state.starterSettings['builderType'] );
|
1076 |
+
}
|
1077 |
+
} }>
|
1078 |
+
{ __( 'Start Importing Page', 'kadence-starter-templates' ) }
|
1079 |
+
</Button>
|
1080 |
+
</Fragment>
|
1081 |
+
) }
|
1082 |
+
</Fragment>
|
1083 |
+
) }
|
1084 |
+
</Fragment>
|
1085 |
) }
|
1086 |
</Fragment>
|
1087 |
) }
|
1246 |
|
1247 |
const MainPanel = () => (
|
1248 |
<Fragment>
|
1249 |
+
{ errorMessageShow ? (
|
1250 |
<div className="main-panel">
|
1251 |
<div className="kst-overlay-saving">
|
1252 |
{ ! this.state.errorTemplates && (
|
inc/react/src/starter-templates.scss
CHANGED
@@ -168,13 +168,22 @@ a.components-external-link.kst-upgrade.button-hero.button.button-primary {
|
|
168 |
border-radius: 0;
|
169 |
}
|
170 |
.components-modal__frame.kst-import-modal .components-button.is-primary {
|
171 |
-
padding-left:
|
172 |
padding-top: 16px;
|
173 |
-
padding-right:
|
174 |
font-weight: 700;
|
175 |
padding-bottom: 16px;
|
176 |
font-size: 16px;
|
177 |
height: auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
.kst-selected-font-pair {
|
180 |
display: flex;
|
@@ -494,6 +503,7 @@ h3.kst-selected-font-pair-title {
|
|
494 |
padding: 20px;
|
495 |
color: #c05621;
|
496 |
font-weight: bold;
|
|
|
497 |
}
|
498 |
.kst-import-selection-title .components-button.kt-import-back {
|
499 |
border: 1px solid;
|
@@ -856,14 +866,17 @@ box-sizing: border-box;
|
|
856 |
bottom: 40px;
|
857 |
}
|
858 |
.kst-import-single-selection-options-wrap .components-button.is-primary {
|
859 |
-
padding-left: 30px;
|
860 |
padding-top: 16px;
|
861 |
-
padding-right: 30px;
|
862 |
font-weight: 700;
|
863 |
padding-bottom: 16px;
|
864 |
font-size: 16px;
|
865 |
height: auto;
|
866 |
margin-top: 20px;
|
|
|
|
|
|
|
|
|
|
|
867 |
}
|
868 |
.kst-import-selection-footer {
|
869 |
position: fixed;
|
@@ -965,4 +978,40 @@ button.components-button.kt-import-fullsite.is-primary {
|
|
965 |
.kst-import-selection-options .templates-grid {
|
966 |
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
|
967 |
}
|
968 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
border-radius: 0;
|
169 |
}
|
170 |
.components-modal__frame.kst-import-modal .components-button.is-primary {
|
171 |
+
padding-left: 0px;
|
172 |
padding-top: 16px;
|
173 |
+
padding-right: 0px;
|
174 |
font-weight: 700;
|
175 |
padding-bottom: 16px;
|
176 |
font-size: 16px;
|
177 |
height: auto;
|
178 |
+
display: block;
|
179 |
+
width: 100%;
|
180 |
+
text-align: center;
|
181 |
+
}
|
182 |
+
.kst-import-modal .components-panel__body h3 {
|
183 |
+
font-size: 14px;
|
184 |
+
line-height: 20px;
|
185 |
+
margin: 10px 0;
|
186 |
+
color: #4a5568;
|
187 |
}
|
188 |
.kst-selected-font-pair {
|
189 |
display: flex;
|
503 |
padding: 20px;
|
504 |
color: #c05621;
|
505 |
font-weight: bold;
|
506 |
+
margin-top: 30px;
|
507 |
}
|
508 |
.kst-import-selection-title .components-button.kt-import-back {
|
509 |
border: 1px solid;
|
866 |
bottom: 40px;
|
867 |
}
|
868 |
.kst-import-single-selection-options-wrap .components-button.is-primary {
|
|
|
869 |
padding-top: 16px;
|
|
|
870 |
font-weight: 700;
|
871 |
padding-bottom: 16px;
|
872 |
font-size: 16px;
|
873 |
height: auto;
|
874 |
margin-top: 20px;
|
875 |
+
padding-left: 0;
|
876 |
+
padding-right: 0;
|
877 |
+
text-align: center;
|
878 |
+
display: block;
|
879 |
+
width: 100%;
|
880 |
}
|
881 |
.kst-import-selection-footer {
|
882 |
position: fixed;
|
978 |
.kst-import-selection-options .templates-grid {
|
979 |
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
|
980 |
}
|
981 |
+
}
|
982 |
+
.kst-import-modal button.components-button.kb-skip-start.is-primary, .kst-import-selection-options button.components-button.kb-skip-start.is-primary {
|
983 |
+
display: block;
|
984 |
+
width: 100%;
|
985 |
+
text-align: center;
|
986 |
+
background: transparent;
|
987 |
+
color: #555;
|
988 |
+
font-size: 13px;
|
989 |
+
font-weight: 400;
|
990 |
+
}
|
991 |
+
.kst-import-modal .components-panel__body-toggle.components-button {
|
992 |
+
padding: 10px 48px 10px 16px;
|
993 |
+
}
|
994 |
+
.components-base-control.kt-subscribe-email-input .components-base-control__field {
|
995 |
+
display: flex;
|
996 |
+
align-items: center;
|
997 |
+
margin-bottom:20px;
|
998 |
+
}
|
999 |
+
.components-base-control.kt-subscribe-email-input .components-base-control__field .components-base-control__label {
|
1000 |
+
margin:0 10px 0 0;
|
1001 |
+
font-weight:bold;
|
1002 |
+
}
|
1003 |
+
.kt-subscribe-form-box {
|
1004 |
+
padding: 20px;
|
1005 |
+
margin: 30px 0px 0;
|
1006 |
+
border: 1px solid #e0e0e0;
|
1007 |
+
}
|
1008 |
+
.kt-subscribe-form-box h2 {
|
1009 |
+
margin-top: 0;
|
1010 |
+
}
|
1011 |
+
.kb-subscribe-form-error {
|
1012 |
+
padding: 10px;
|
1013 |
+
display: block;
|
1014 |
+
margin-bottom: 10px;
|
1015 |
+
color: #d8000c;
|
1016 |
+
background-color: #ffbaba;
|
1017 |
+
}
|
inc/react/src/subscribe-form.js
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Internal dependencies
|
3 |
+
*/
|
4 |
+
// import HelpTab from './help';
|
5 |
+
// import ProSettings from './pro-extension';
|
6 |
+
// import RecommendedTab from './recomended';
|
7 |
+
// import StarterTab from './starter';
|
8 |
+
// import Sidebar from './sidebar';
|
9 |
+
// import CustomizerLinks from './customizer';
|
10 |
+
// import Notices from './notices';
|
11 |
+
/**
|
12 |
+
* WordPress dependencies
|
13 |
+
*/
|
14 |
+
const { __, sprintf } = wp.i18n;
|
15 |
+
const { Fragment, Component, render, PureComponent } = wp.element;
|
16 |
+
const { Modal, Spinner, ButtonGroup, Dropdown, Icon, Button, ExternalLink, ToolbarGroup, CheckboxControl, TextControl, ToggleControl, MenuItem, Tooltip, PanelBody } = wp.components;
|
17 |
+
import {
|
18 |
+
arrowLeft,
|
19 |
+
download,
|
20 |
+
update,
|
21 |
+
chevronLeft,
|
22 |
+
chevronDown,
|
23 |
+
} from '@wordpress/icons';
|
24 |
+
|
25 |
+
class KadenceSubscribeForm extends Component {
|
26 |
+
constructor() {
|
27 |
+
super( ...arguments );
|
28 |
+
this.state = {
|
29 |
+
email: kadenceStarterParams.user_email,
|
30 |
+
privacy: false,
|
31 |
+
privacyError: false,
|
32 |
+
};
|
33 |
+
}
|
34 |
+
render() {
|
35 |
+
return (
|
36 |
+
<div className={ 'kt-subscribe-form-box' }>
|
37 |
+
<h2>{ __( 'Subscribe and Import', 'kadence-starter-templates' ) }</h2>
|
38 |
+
<p>{ __( "Subscribe to learn about new starter templates and features for Kadence.", 'kadence-blocks' ) }</p>
|
39 |
+
<TextControl
|
40 |
+
type="text"
|
41 |
+
className={ 'kt-subscribe-email-input' }
|
42 |
+
label={ __( 'Email:', 'kadence-starter-templates' ) }
|
43 |
+
value={ this.state.email }
|
44 |
+
placeholder={ __( 'example@example.com', 'kadence-starter-templates' ) }
|
45 |
+
onChange={ value => this.setState( { email: value } ) }
|
46 |
+
/>
|
47 |
+
{ this.props.emailError && (
|
48 |
+
<span className="kb-subscribe-form-error">{ __( 'Invalid Email, Please enter a valid email.', 'kadence-starter-templates' ) }</span>
|
49 |
+
) }
|
50 |
+
<CheckboxControl
|
51 |
+
label={ <Fragment>{ __( 'Accept', 'kadence-starter-templates' ) } <ExternalLink href={ 'https://www.kadencewp.com/privacy-policy/' }>{ __( 'Privacy Policy', 'kadence-starter-templates' ) }</ExternalLink></Fragment> }
|
52 |
+
help={ __( 'We do not spam, unsubscribe anytime.', 'kadence-starter-templates' ) }
|
53 |
+
checked={ this.state.privacy }
|
54 |
+
onChange={ value => this.setState( { privacy: value } ) }
|
55 |
+
/>
|
56 |
+
{ this.state.privacyError && (
|
57 |
+
<span className="kb-subscribe-form-error">{ __( 'Please Accept Privacy Policy', 'kadence-blocks' ) }</span>
|
58 |
+
) }
|
59 |
+
<Button className="kt-defaults-save" isPrimary onClick={ () => {
|
60 |
+
if ( this.state.privacy ) {
|
61 |
+
this.setState( { privacyError: false } );
|
62 |
+
this.props.onRun( this.state.email );
|
63 |
+
} else {
|
64 |
+
this.setState( { privacyError: true } );
|
65 |
+
}
|
66 |
+
} }>
|
67 |
+
{ __( 'Subscribe and Start Importing' ) }
|
68 |
+
</Button>
|
69 |
+
</div>
|
70 |
+
);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
export default KadenceSubscribeForm;
|
kadence-starter-templates.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Kadence Starter Templates
|
4 |
* Description: Choose the prebuilt website and click to import.
|
5 |
-
* Version: 1.2.
|
6 |
* Author: Kadence WP
|
7 |
* Author URI: https://kadencewp.com/
|
8 |
* License: GPLv2 or later
|
2 |
/**
|
3 |
* Plugin Name: Kadence Starter Templates
|
4 |
* Description: Choose the prebuilt website and click to import.
|
5 |
+
* Version: 1.2.6
|
6 |
* Author: Kadence WP
|
7 |
* Author URI: https://kadencewp.com/
|
8 |
* License: GPLv2 or later
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: britner
|
|
3 |
Tags: templates, gutenberg
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.8
|
6 |
-
Stable tag: 1.2.
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -108,6 +108,10 @@ Absolutely not.
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
111 |
= 1.2.5 =
|
112 |
* Add: Law Firm starter for Gutenberg.
|
113 |
* Update: Interface.
|
3 |
Tags: templates, gutenberg
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.8
|
6 |
+
Stable tag: 1.2.6
|
7 |
Requires PHP: 7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 1.2.6 =
|
112 |
+
* Fix: Issue with elementor.
|
113 |
+
* Update: Starter Install, add optional subscribe.
|
114 |
+
|
115 |
= 1.2.5 =
|
116 |
* Add: Law Firm starter for Gutenberg.
|
117 |
* Update: Interface.
|
vendor/wxr-importer/Importer.php
CHANGED
@@ -493,7 +493,7 @@ class Importer extends WXRImporter {
|
|
493 |
$time = microtime( true ) - $this->start_time;
|
494 |
|
495 |
// We should make a new ajax call, if the time is right.
|
496 |
-
if ( $time > apply_filters( 'pt-importer/time_for_one_ajax_call',
|
497 |
$response = apply_filters( 'pt-importer/new_ajax_request_response_data', array(
|
498 |
'status' => 'newAJAX',
|
499 |
'log' => 'Time for new AJAX request!: ' . $time,
|
493 |
$time = microtime( true ) - $this->start_time;
|
494 |
|
495 |
// We should make a new ajax call, if the time is right.
|
496 |
+
if ( $time > apply_filters( 'pt-importer/time_for_one_ajax_call', 25 ) ) {
|
497 |
$response = apply_filters( 'pt-importer/new_ajax_request_response_data', array(
|
498 |
'status' => 'newAJAX',
|
499 |
'log' => 'Time for new AJAX request!: ' . $time,
|
vendor/wxr-importer/WXRImporter.php
CHANGED
@@ -123,7 +123,11 @@ class WXRImporter extends \WP_Importer {
|
|
123 |
if ( function_exists( 'libxml_disable_entity_loader' ) ) {
|
124 |
// $old_value = libxml_disable_entity_loader( true );
|
125 |
}
|
|
|
|
|
126 |
|
|
|
|
|
127 |
$reader = new XMLReader();
|
128 |
$status = $reader->open( $file );
|
129 |
|
123 |
if ( function_exists( 'libxml_disable_entity_loader' ) ) {
|
124 |
// $old_value = libxml_disable_entity_loader( true );
|
125 |
}
|
126 |
+
if ( ! class_exists( 'XMLReader' ) ) {
|
127 |
+
$this->logger->critical( __( 'The XMLReader class is missing! Please install the XMLReader PHP extension on your server', 'wordpress-importer' ) );
|
128 |
|
129 |
+
return false;
|
130 |
+
}
|
131 |
$reader = new XMLReader();
|
132 |
$status = $reader->open( $file );
|
133 |
|