Version Description
- Fixed: CSS and JS not loading when embedding Redux due to malformed path.
- Modified: Update to the Extendify template library.
- Release date: November, 24 2021
Download this release
Release Info
Developer | dovyp |
Plugin | Redux Framework |
Version | 4.3.4 |
Comparing to | |
See all releases |
Code changes from version 4.3.3 to 4.3.4
- class-redux-framework-plugin.php +1 -8
- readme.txt +7 -2
- redux-core/class-redux-core.php +1 -1
- redux-core/extendify-sdk/.eslintrc.js +12 -35
- redux-core/extendify-sdk/.github/workflows/build-and-test.yml +62 -59
- redux-core/extendify-sdk/.github/workflows/build-development-zip.yml +66 -64
- redux-core/extendify-sdk/.github/workflows/force-production-on-main.yml +65 -65
- redux-core/extendify-sdk/.husky/pre-commit +4 -0
- redux-core/extendify-sdk/.phpcs.xml.dist +88 -84
- redux-core/extendify-sdk/.prettierignore +6 -0
- redux-core/extendify-sdk/.prettierrc.js +15 -0
- redux-core/extendify-sdk/app/Shared.php +1 -1
- redux-core/extendify-sdk/bin/clean-build-files.sh +7 -0
- redux-core/extendify-sdk/editorplus/EditorPlus.php +101 -100
- redux-core/extendify-sdk/editorplus/editorplus-template.php +0 -4
- redux-core/extendify-sdk/editorplus/editorplus.js +27 -242
- redux-core/extendify-sdk/public/build/extendify-sdk.css +1 -1
- redux-core/extendify-sdk/public/build/extendify-sdk.js +1 -1
- redux-core/extendify-sdk/public/build/extendify-utilities.css +7 -1
- redux-core/extendify-sdk/public/editorplus/editorplus.min.js +1 -1
- redux-core/extendify-sdk/readme.md +10 -5
- redux-core/extendify-sdk/readme.txt +1 -1
- redux-core/extendify-sdk/src/ExtendifyLibrary.js +29 -18
- redux-core/extendify-sdk/src/api/Plugins.js +4 -6
- redux-core/extendify-sdk/src/api/SiteSettings.js +4 -6
- redux-core/extendify-sdk/src/api/Templates.js +16 -24
- redux-core/extendify-sdk/src/api/User.js +16 -24
- redux-core/extendify-sdk/src/api/axios.js +21 -11
- redux-core/extendify-sdk/src/app.css +45 -11
- redux-core/extendify-sdk/src/app.js +32 -20
- redux-core/extendify-sdk/src/buttons.js +108 -77
- redux-core/extendify-sdk/src/components/FooterNotice.js +82 -0
- redux-core/extendify-sdk/src/components/ImportButton.js +0 -89
- redux-core/extendify-sdk/src/components/ImportCounter.js +31 -19
- redux-core/extendify-sdk/src/components/ImportTemplateBlock.js +234 -93
- redux-core/extendify-sdk/src/components/LibraryAccessModal.js +57 -40
- redux-core/extendify-sdk/src/components/LoginInterface.js +142 -109
- redux-core/extendify-sdk/src/components/SiteTypeSelector.js +194 -103
- redux-core/extendify-sdk/src/components/TaxonomyList.js +63 -34
- redux-core/extendify-sdk/src/components/TaxonomySection.js +53 -30
- redux-core/extendify-sdk/src/components/TemplateButton.js +0 -50
- redux-core/extendify-sdk/src/components/TemplateButtonLive.js +0 -53
- redux-core/extendify-sdk/src/components/TypeSelect.js +29 -28
- redux-core/extendify-sdk/src/components/WelcomeNotice.js +0 -63
- redux-core/extendify-sdk/src/components/buttons/Primary.js +5 -6
- redux-core/extendify-sdk/src/components/icons/index.js +1 -1
- redux-core/extendify-sdk/src/components/icons/library/alert.js +15 -4
- redux-core/extendify-sdk/src/components/icons/library/brand-logo.js +32 -0
- redux-core/extendify-sdk/src/components/icons/library/brand-mark.js +8 -4
- redux-core/extendify-sdk/src/components/icons/library/download.js +10 -2
- redux-core/extendify-sdk/src/components/icons/library/success.js +59 -13
- redux-core/extendify-sdk/src/components/icons/library/user.js +6 -1
- redux-core/extendify-sdk/src/components/modals/Modal.js +64 -53
- redux-core/extendify-sdk/src/components/modals/SettingsModal.js +14 -11
- redux-core/extendify-sdk/src/components/modals/SplitModal.js +42 -42
- redux-core/extendify-sdk/src/components/notices/PromotionNotice.js +24 -0
- redux-core/extendify-sdk/src/components/notices/WelcomeNotice.js +46 -0
- redux-core/extendify-sdk/src/config.js +0 -4
- redux-core/extendify-sdk/src/hooks/helpers.js +1 -1
- redux-core/extendify-sdk/src/hooks/useTaxonomies.js +8 -3
- redux-core/extendify-sdk/src/listeners/index.js +1 -5
- redux-core/extendify-sdk/src/listeners/softerror-encountered.js +15 -10
- redux-core/extendify-sdk/src/listeners/template-inserted.js +5 -7
- redux-core/extendify-sdk/src/middleware/NeedsPermissionModal.js +55 -31
- redux-core/extendify-sdk/src/middleware/NeedsRegistrationModal.js +56 -36
- redux-core/extendify-sdk/src/middleware/ReloadRequiredModal.js +30 -22
- redux-core/extendify-sdk/src/middleware/hasPluginsActivated/ActivatePluginsModal.js +65 -41
- redux-core/extendify-sdk/src/middleware/hasPluginsActivated/ActivatingModal.js +35 -24
- redux-core/extendify-sdk/src/middleware/hasPluginsActivated/ErrorActivating.js +25 -20
- redux-core/extendify-sdk/src/middleware/hasPluginsActivated/index.js +4 -1
- redux-core/extendify-sdk/src/middleware/hasRequiredPlugins/ErrorInstalling.js +26 -18
- redux-core/extendify-sdk/src/middleware/hasRequiredPlugins/InstallingModal.js +32 -17
- redux-core/extendify-sdk/src/middleware/hasRequiredPlugins/RequiredPluginsModal.js +63 -38
- redux-core/extendify-sdk/src/middleware/hasRequiredPlugins/index.js +4 -1
- redux-core/extendify-sdk/src/middleware/helpers.js +10 -10
- redux-core/extendify-sdk/src/middleware/index.js +1 -3
- redux-core/extendify-sdk/src/pages/GridView.js +195 -28
- redux-core/extendify-sdk/src/pages/MainContent.js +0 -45
- redux-core/extendify-sdk/src/pages/{parts/MainWindow.js → MainWindow.js} +19 -19
- redux-core/extendify-sdk/src/pages/Router.js +0 -12
- redux-core/extendify-sdk/src/pages/Sidebar.js +46 -0
- redux-core/extendify-sdk/src/pages/SingleView.js +0 -26
- redux-core/extendify-sdk/src/pages/layout/HasSidebar.js +23 -0
- redux-core/extendify-sdk/src/pages/layout/Layout.js +45 -0
- redux-core/extendify-sdk/src/pages/layout/Toolbar.js +48 -0
- redux-core/extendify-sdk/src/pages/parts/Grid.js +0 -158
- redux-core/extendify-sdk/src/pages/parts/HasSidebar.js +0 -19
- redux-core/extendify-sdk/src/pages/parts/Single.js +0 -117
- redux-core/extendify-sdk/src/pages/parts/Toolbar.js +0 -44
- redux-core/extendify-sdk/src/pages/parts/sidebars/SidebarMain.js +0 -36
- redux-core/extendify-sdk/src/pages/parts/sidebars/SidebarSingle.js +0 -59
- redux-core/extendify-sdk/src/state/GlobalState.js +22 -23
- redux-core/extendify-sdk/src/state/Importing.js +19 -13
- redux-core/extendify-sdk/src/state/SiteSettings.js +11 -6
- redux-core/extendify-sdk/src/state/Taxonomies.js +24 -16
- redux-core/extendify-sdk/src/state/Templates.js +35 -36
- redux-core/extendify-sdk/src/state/User.js +93 -75
- redux-core/extendify-sdk/src/util/general.js +19 -12
- redux-core/extendify-sdk/src/util/templateInjection.js +8 -7
- redux-core/extendify-sdk/src/utility-control/index.js +32 -37
- redux-core/extendify-sdk/tailwind.config.js +11 -8
- redux-core/extendify-sdk/utility-framework/classes/clip-path.css +4 -4
- redux-core/extendify-sdk/utility-framework/classes/columns.css +26 -17
- redux-core/extendify-sdk/utility-framework/classes/direction.css +3 -3
- redux-core/extendify-sdk/utility-framework/classes/editor/no-caption.css +2 -2
- redux-core/extendify-sdk/utility-framework/classes/editor/no-inserter.css +4 -4
- redux-core/extendify-sdk/utility-framework/classes/editor/no-resize.css +4 -4
- redux-core/extendify-sdk/utility-framework/classes/editor/pointer-events.css +1 -1
- redux-core/extendify-sdk/utility-framework/classes/inline-list.css +0 -1
- redux-core/extendify-sdk/utility-framework/classes/misc.css +2 -2
- redux-core/extendify-sdk/utility-framework/classes/text-stroke.css +15 -6
- redux-core/extendify-sdk/utility-framework/extendify-utilities.css +32 -30
- redux-core/extendify-sdk/utility-framework/fallback/colors.css +5 -5
- redux-core/extendify-sdk/utility-framework/fallback/font-sizes.css +6 -2
- redux-core/extendify-sdk/utility-framework/fallback/grid.css +4 -1
- redux-core/extendify-sdk/utility-framework/fallback/group.css +5 -5
- redux-core/extendify-sdk/utility-framework/suggestions.config.js +3 -2
- redux-core/extendify-sdk/utility-framework/suggestions.json +1 -0
- redux-core/extendify-sdk/utility-framework/tailwind.config.js +1 -1
- redux-core/extendify-sdk/webpack.mix.js +53 -35
- redux-core/framework.php +1 -1
- redux-core/inc/classes/class-redux-functions-ex.php +1 -1
- redux-core/inc/classes/class-redux-helpers.php +7 -7
- redux-core/inc/fields/color/class-redux-color.php +1 -1
- redux-core/inc/fields/color_gradient/class-redux-color-gradient.php +0 -1
- redux-core/inc/fields/media/class-redux-media.php +2 -2
- redux-framework.php +1 -1
- sample/sections/color-selection/color-palette.php +7 -7
- sample/sections/design-fields/box-shadow.php +1 -5
- sample/sections/media-uploads/media.php +3 -3
class-redux-framework-plugin.php
CHANGED
@@ -162,14 +162,7 @@ if ( ! class_exists( 'Redux_Framework_Plugin', false ) ) {
|
|
162 |
require_once dirname( __FILE__ ) . '/redux-core/framework.php';
|
163 |
}
|
164 |
|
165 |
-
/*
|
166 |
-
if ( true === (bool) get_option( 'use_extendify_templates', true ) ) {
|
167 |
-
if ( file_exists( plugin_dir_path( REDUX_PLUGIN_FILE ) . 'extendify-sdk/loader.php' ) ) {
|
168 |
-
$GLOBALS['extendifySdkSourcePlugin'] = 'Redux';
|
169 |
-
require_once dirname( __FILE__ ) . '/extendify-sdk/loader.php';
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
if ( file_exists( dirname( __FILE__ ) . '/redux-templates/redux-templates.php' ) ) {
|
174 |
require_once dirname( __FILE__ ) . '/redux-templates/redux-templates.php';
|
175 |
}*/
|
162 |
require_once dirname( __FILE__ ) . '/redux-core/framework.php';
|
163 |
}
|
164 |
|
165 |
+
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
if ( file_exists( dirname( __FILE__ ) . '/redux-templates/redux-templates.php' ) ) {
|
167 |
require_once dirname( __FILE__ ) . '/redux-templates/redux-templates.php';
|
168 |
}*/
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dovyp, redux, kprovance
|
|
3 |
Tags: gutenberg, blocks, gutenberg blocks, editor, block, page builder, block editor, block library, editor, templates, library
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 7.1
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 4.3.
|
8 |
License: GPL-3.0+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
@@ -108,6 +108,11 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
|
|
111 |
= 4.3.3 =
|
112 |
Modified: Move template libraries to redux-core directory.
|
113 |
Modified: Update to the Extendify template library.
|
3 |
Tags: gutenberg, blocks, gutenberg blocks, editor, block, page builder, block editor, block library, editor, templates, library
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 7.1
|
6 |
+
Tested up to: 5.9
|
7 |
+
Stable tag: 4.3.4
|
8 |
License: GPL-3.0+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 4.3.4 =
|
112 |
+
* Fixed: CSS and JS not loading when embedding Redux due to malformed path.
|
113 |
+
* Modified: Update to the Extendify template library.
|
114 |
+
* Release date: November, 24 2021
|
115 |
+
|
116 |
= 4.3.3 =
|
117 |
Modified: Move template libraries to redux-core directory.
|
118 |
Modified: Update to the Extendify template library.
|
redux-core/class-redux-core.php
CHANGED
@@ -357,7 +357,7 @@ if ( ! class_exists( 'Redux_Core', false ) ) {
|
|
357 |
// Including extendify sdk.
|
358 |
if ( true === (bool) get_option( 'use_extendify_templates', true ) ) {
|
359 |
if ( file_exists( dirname( __FILE__ ) . '/extendify-sdk/loader.php' ) ) {
|
360 |
-
$GLOBALS['
|
361 |
require_once dirname( __FILE__ ) . '/extendify-sdk/loader.php';
|
362 |
}
|
363 |
}
|
357 |
// Including extendify sdk.
|
358 |
if ( true === (bool) get_option( 'use_extendify_templates', true ) ) {
|
359 |
if ( file_exists( dirname( __FILE__ ) . '/extendify-sdk/loader.php' ) ) {
|
360 |
+
$GLOBALS['extendify_sdk_partner'] = 'Redux';
|
361 |
require_once dirname( __FILE__ ) . '/extendify-sdk/loader.php';
|
362 |
}
|
363 |
}
|
redux-core/extendify-sdk/.eslintrc.js
CHANGED
@@ -5,29 +5,28 @@ module.exports = {
|
|
5 |
jest: true,
|
6 |
node: true,
|
7 |
},
|
8 |
-
extends: [
|
|
|
|
|
|
|
|
|
|
|
9 |
parserOptions: {
|
10 |
ecmaFeatures: { jsx: true },
|
11 |
sourceType: 'module',
|
12 |
},
|
13 |
-
plugins: ['react'],
|
14 |
rules: {
|
15 |
-
indent: ['error', 4, { SwitchCase: 1 }],
|
16 |
'require-await': 'error',
|
17 |
-
quotes: ['error', 'single'],
|
18 |
'comma-dangle': ['error', 'always-multiline'],
|
19 |
-
'multiline-ternary': ['error', 'always-multiline'],
|
20 |
'array-element-newline': ['error', 'consistent'],
|
21 |
'no-constant-condition': ['error', { checkLoops: false }],
|
22 |
'no-multi-spaces': ['error'],
|
23 |
semi: ['error', 'never'],
|
24 |
'space-in-parens': ['error', 'never'],
|
25 |
-
'
|
26 |
-
|
27 |
-
words: true,
|
28 |
-
nonwords: false,
|
29 |
-
overrides: {},
|
30 |
-
}],
|
31 |
'space-before-function-paren': [
|
32 |
'error',
|
33 |
{
|
@@ -37,16 +36,8 @@ module.exports = {
|
|
37 |
},
|
38 |
],
|
39 |
'react/react-in-jsx-scope': 'off',
|
40 |
-
'function-paren-newline': [
|
41 |
-
'error',
|
42 |
-
{ minItems: 3 },
|
43 |
-
],
|
44 |
'quote-props': ['error', 'as-needed'],
|
45 |
-
'
|
46 |
-
'no-multiple-empty-lines': [
|
47 |
-
'error',
|
48 |
-
{ max: 1 },
|
49 |
-
],
|
50 |
'react/prop-types': 0, // TODO: Do we want this required?
|
51 |
'lines-around-comment': [
|
52 |
'error',
|
@@ -55,20 +46,6 @@ module.exports = {
|
|
55 |
allowBlockStart: true,
|
56 |
},
|
57 |
],
|
58 |
-
'object-curly-newline': [
|
59 |
-
'error',
|
60 |
-
{
|
61 |
-
ObjectExpression: {
|
62 |
-
consistent: true, multiline: true, minProperties: 3,
|
63 |
-
},
|
64 |
-
ObjectPattern: { consistent: true, multiline: true },
|
65 |
-
ImportDeclaration: { multiline: true, minProperties: 3 },
|
66 |
-
ExportDeclaration: {
|
67 |
-
multiline: true,
|
68 |
-
minProperties: 3,
|
69 |
-
},
|
70 |
-
},
|
71 |
-
],
|
72 |
},
|
73 |
-
settings: { react: { version: 'detect' }},
|
74 |
}
|
5 |
jest: true,
|
6 |
node: true,
|
7 |
},
|
8 |
+
extends: [
|
9 |
+
'eslint:recommended',
|
10 |
+
'plugin:react/recommended',
|
11 |
+
'plugin:react-hooks/recommended',
|
12 |
+
'prettier',
|
13 |
+
],
|
14 |
parserOptions: {
|
15 |
ecmaFeatures: { jsx: true },
|
16 |
sourceType: 'module',
|
17 |
},
|
18 |
+
plugins: ['react', 'prettier'],
|
19 |
rules: {
|
|
|
20 |
'require-await': 'error',
|
21 |
+
quotes: ['error', 'single', { avoidEscape: true }],
|
22 |
'comma-dangle': ['error', 'always-multiline'],
|
|
|
23 |
'array-element-newline': ['error', 'consistent'],
|
24 |
'no-constant-condition': ['error', { checkLoops: false }],
|
25 |
'no-multi-spaces': ['error'],
|
26 |
semi: ['error', 'never'],
|
27 |
'space-in-parens': ['error', 'never'],
|
28 |
+
'key-spacing': ['error', { afterColon: true }],
|
29 |
+
'space-infix-ops': ['error'],
|
|
|
|
|
|
|
|
|
30 |
'space-before-function-paren': [
|
31 |
'error',
|
32 |
{
|
36 |
},
|
37 |
],
|
38 |
'react/react-in-jsx-scope': 'off',
|
|
|
|
|
|
|
|
|
39 |
'quote-props': ['error', 'as-needed'],
|
40 |
+
'no-multiple-empty-lines': ['error', { max: 1 }],
|
|
|
|
|
|
|
|
|
41 |
'react/prop-types': 0, // TODO: Do we want this required?
|
42 |
'lines-around-comment': [
|
43 |
'error',
|
46 |
allowBlockStart: true,
|
47 |
},
|
48 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
},
|
50 |
+
settings: { react: { version: 'detect' } },
|
51 |
}
|
redux-core/extendify-sdk/.github/workflows/build-and-test.yml
CHANGED
@@ -1,62 +1,65 @@
|
|
1 |
name: Build and test
|
2 |
on: [push, pull_request]
|
3 |
jobs:
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
1 |
name: Build and test
|
2 |
on: [push, pull_request]
|
3 |
jobs:
|
4 |
+
# TODO: create another job for integration testing that includes Cypress, booting up WPO, etc
|
5 |
+
# Reference wp-cli: https://github.com/wp-cli/wp-cli/blob/master/.github/workflows/testing.yml
|
6 |
+
unit: #-------------------------------------------
|
7 |
+
name: PHP ${{ matrix.php }}
|
8 |
+
runs-on: ubuntu-latest
|
9 |
+
strategy:
|
10 |
+
fail-fast: false
|
11 |
+
matrix:
|
12 |
+
php: ['7.4']
|
13 |
+
steps:
|
14 |
+
- name: Check out source code
|
15 |
+
uses: actions/checkout@v2
|
16 |
+
|
17 |
+
- name: Setup PHP
|
18 |
+
uses: shivammathur/setup-php@v2
|
19 |
+
with:
|
20 |
+
php-version: '${{ matrix.php }}'
|
21 |
+
extensions: mysql, zip
|
22 |
+
coverage: none
|
23 |
+
tools: composer:v1, wp-cli, cs2pr, phpcs
|
24 |
+
|
25 |
+
- name: Get Composer cache directory
|
26 |
+
id: composer-cache
|
27 |
+
run: |
|
28 |
+
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
29 |
+
|
30 |
+
- name: Use Composer cache
|
31 |
+
uses: actions/cache@master
|
32 |
+
with:
|
33 |
+
path: ${{ steps['composer-cache'].outputs.dir }}
|
34 |
+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
35 |
+
restore-keys: |
|
36 |
+
${{ runner.os }}-composer-
|
37 |
+
|
38 |
+
- name: Install dependencies
|
39 |
+
run: composer install --prefer-dist --no-progress --no-suggest
|
40 |
+
|
41 |
+
- name: Install PHPCS
|
42 |
+
run: git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git ${{ github.workspace }}/wpcs
|
43 |
+
|
44 |
+
- name: PHPCS check
|
45 |
+
run: |
|
46 |
+
phpcs --config-set installed_paths ${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,${{ github.workspace }}/vendor/phpcompatibility/php-compatibility/PHPCompatibility,${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieSodiumCompat,${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat,${{ github.workspace }}/wpcs
|
47 |
+
phpcs -i
|
48 |
+
phpcs -q --report=checkstyle . | cs2pr
|
49 |
+
|
50 |
+
- name: Install NPM packages
|
51 |
+
run: npm ci
|
52 |
+
env:
|
53 |
+
CYPRESS_INSTALL_BINARY: '0'
|
54 |
+
|
55 |
+
- name: Lint JavaScript
|
56 |
+
run: |
|
57 |
+
npm run lint
|
58 |
+
npm run lint
|
59 |
+
npm run prettier
|
60 |
+
|
61 |
+
- name: Build assets
|
62 |
+
run: npm run build
|
63 |
+
|
64 |
+
- name: Test JavaScript
|
65 |
+
run: npm run test
|
redux-core/extendify-sdk/.github/workflows/build-development-zip.yml
CHANGED
@@ -1,70 +1,72 @@
|
|
1 |
name: Build development zip file
|
2 |
on: push
|
3 |
jobs:
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
1 |
name: Build development zip file
|
2 |
on: push
|
3 |
jobs:
|
4 |
+
build:
|
5 |
+
name: Build test, and zip
|
6 |
+
runs-on: ubuntu-latest
|
7 |
+
strategy:
|
8 |
+
fail-fast: false
|
9 |
+
matrix:
|
10 |
+
php: [8.0]
|
11 |
+
node-version: [14.x]
|
12 |
+
steps:
|
13 |
+
- name: Checkout code
|
14 |
+
uses: actions/checkout@v1
|
15 |
|
16 |
+
- name: Setup PHP
|
17 |
+
uses: shivammathur/setup-php@v2
|
18 |
+
with:
|
19 |
+
php-version: '${{ matrix.php }}'
|
20 |
+
tools: composer:v1
|
21 |
|
22 |
+
- name: Get Composer cache directory
|
23 |
+
id: composer-cache
|
24 |
+
run: |
|
25 |
+
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
26 |
+
- name: Use Composer cache
|
27 |
+
uses: actions/cache@master
|
28 |
+
with:
|
29 |
+
path: ${{ steps['composer-cache'].outputs.dir }}
|
30 |
+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
31 |
+
restore-keys: |
|
32 |
+
${{ runner.os }}-composer-
|
33 |
+
- name: Build autoloader
|
34 |
+
run: composer install --prefer-dist --no-progress --no-suggest --no-dev
|
35 |
|
36 |
+
- name: Using Node version ${{ matrix.node-version }}
|
37 |
+
uses: actions/setup-node@v1
|
38 |
+
with:
|
39 |
+
node-version: ${{ matrix.node-version }}
|
40 |
+
- name: npm install, build, and test
|
41 |
+
run: |
|
42 |
+
npm ci
|
43 |
+
npm run dev
|
44 |
+
npm run lint
|
45 |
+
npm run prettier
|
46 |
+
touch .devbuild
|
47 |
+
env:
|
48 |
+
CI: true
|
49 |
+
- name: Package
|
50 |
+
uses: actions/upload-artifact@v2
|
51 |
+
with:
|
52 |
+
name: extendify-sdk
|
53 |
+
retention-days: 5
|
54 |
+
path: |
|
55 |
+
${{ github.workspace }}/
|
56 |
+
!${{ github.workspace }}/node_modules/
|
57 |
+
!${{ github.workspace }}/.github/
|
58 |
+
!${{ github.workspace }}/.git/
|
59 |
+
!${{ github.workspace }}/src/
|
60 |
+
!${{ github.workspace }}/.editorconfig
|
61 |
+
!${{ github.workspace }}/.eslintrc.js
|
62 |
+
!${{ github.workspace }}/.eslintignore
|
63 |
+
!${{ github.workspace }}/.gitignore
|
64 |
+
!${{ github.workspace }}/.svgrrc
|
65 |
+
!${{ github.workspace }}/.prettierrc.js
|
66 |
+
!${{ github.workspace }}/.phpcs.xml.dist
|
67 |
+
!${{ github.workspace }}/webpack.config.js
|
68 |
+
!${{ github.workspace }}/composer.json
|
69 |
+
!${{ github.workspace }}/composer.lock
|
70 |
+
!${{ github.workspace }}/package.json
|
71 |
+
!${{ github.workspace }}/package-lock.json
|
72 |
+
!${{ github.workspace }}/readme.md
|
redux-core/extendify-sdk/.github/workflows/force-production-on-main.yml
CHANGED
@@ -1,74 +1,74 @@
|
|
1 |
name: Build production and deploy
|
2 |
on:
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
jobs:
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
1 |
name: Build production and deploy
|
2 |
on:
|
3 |
+
push:
|
4 |
+
branches:
|
5 |
+
- main
|
6 |
jobs:
|
7 |
+
build:
|
8 |
+
name: Build and commit
|
9 |
+
runs-on: ubuntu-latest
|
10 |
+
strategy:
|
11 |
+
fail-fast: false
|
12 |
+
matrix:
|
13 |
+
php: [8.0]
|
14 |
+
node-version: [14.x]
|
15 |
+
steps:
|
16 |
+
- name: Checkout code
|
17 |
+
uses: actions/checkout@v1
|
18 |
|
19 |
+
- name: Set up git user
|
20 |
+
run: git config --global user.name extendify
|
21 |
+
- name: Set up git email
|
22 |
+
run: git config --global user.name extendify@users.noreply.github.com
|
23 |
|
24 |
+
- name: Setup PHP
|
25 |
+
uses: shivammathur/setup-php@v2
|
26 |
+
with:
|
27 |
+
php-version: '${{ matrix.php }}'
|
28 |
+
extensions: mysql, zip
|
29 |
+
coverage: none
|
30 |
+
tools: composer:v1, wp-cli, cs2pr, phpcs
|
31 |
|
32 |
+
- name: Get Composer cache directory
|
33 |
+
id: composer-cache
|
34 |
+
run: |
|
35 |
+
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
36 |
+
- name: Use Composer cache
|
37 |
+
uses: actions/cache@master
|
38 |
+
with:
|
39 |
+
path: ${{ steps['composer-cache'].outputs.dir }}
|
40 |
+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
41 |
+
restore-keys: |
|
42 |
+
${{ runner.os }}-composer-
|
43 |
+
- name: Build autoloader
|
44 |
+
run: composer install --prefer-dist --no-progress --no-suggest --no-dev
|
45 |
|
46 |
+
- name: Using Node version ${{ matrix.node-version }}
|
47 |
+
uses: actions/setup-node@v1
|
48 |
+
with:
|
49 |
+
node-version: ${{ matrix.node-version }}
|
50 |
+
- name: npm install and build
|
51 |
+
run: |
|
52 |
+
npm ci --ignore-scripts
|
53 |
+
npm run build
|
54 |
+
env:
|
55 |
+
CI: true
|
56 |
|
57 |
+
- name: Increment version number
|
58 |
+
run: |
|
59 |
+
perl -i -pe 's/(Stable tag: )([\d.]+)$/$1.($2+.1)/e' readme.txt
|
60 |
+
perl -i -pe 's/(Version: )([\d.]+)$/$1.($2+.1)/e' extendify-sdk.php
|
61 |
+
- name: Commit file changes if needed #it fails if nothing has changed so we allow an error
|
62 |
+
run: git commit -am 'Build produciton assets'
|
63 |
+
continue-on-error: true
|
64 |
+
- name: Push changed files to main
|
65 |
+
uses: ad-m/github-push-action@master
|
66 |
+
with:
|
67 |
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
68 |
+
branch: main
|
69 |
|
70 |
+
- name: Deploy to library.extendify.com
|
71 |
+
uses: fjogeleit/http-request-action@master
|
72 |
+
with:
|
73 |
+
url: ${{ secrets.DEPLOY_WEBHOOK }}
|
74 |
+
method: 'POST'
|
redux-core/extendify-sdk/.husky/pre-commit
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/sh
|
2 |
+
. "$(dirname "$0")/_/husky.sh"
|
3 |
+
|
4 |
+
npx lint-staged
|
redux-core/extendify-sdk/.phpcs.xml.dist
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="extendify-sdk" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
|
42 |
<rule ref="WordPress">
|
43 |
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
|
@@ -48,6 +48,7 @@
|
|
48 |
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore" />
|
49 |
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter" />
|
50 |
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterCloseParenthesis" />
|
|
|
51 |
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener" />
|
52 |
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser" />
|
53 |
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" />
|
@@ -67,6 +68,7 @@
|
|
67 |
<exclude name="Generic.PHP.ClosingPHPTag.NotFound" />
|
68 |
<exclude name="Generic.Files.LowercasedFilename.NotFound" />
|
69 |
<exclude name="Generic.Formatting.SpaceAfterNot.Incorrect" />
|
|
|
70 |
<exclude name="Generic.Classes.OpeningBraceSameLine.BraceOnNewLine" />
|
71 |
<exclude name="Generic.Files.EndFileNoNewline.Found" />
|
72 |
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine" />
|
@@ -109,6 +111,8 @@
|
|
109 |
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
|
110 |
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
|
111 |
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket" />
|
|
|
|
|
112 |
<exclude name="PEAR.Commenting.FileComment.MissingPackageTag" />
|
113 |
<exclude name="PEAR.Commenting.FileComment.MissingAuthorTag" />
|
114 |
<exclude name="PEAR.Commenting.FileComment.MissingCategoryTag" />
|
@@ -127,53 +131,53 @@
|
|
127 |
<exclude name="PEAR.WhiteSpace.ScopeIndent.IncorrectExact" />
|
128 |
</rule>
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
|
178 |
|
179 |
</ruleset>
|
1 |
<?xml version="1.0"?>
|
2 |
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="extendify-sdk" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
|
3 |
|
4 |
+
<description>WP Plugin checks</description>
|
5 |
+
|
6 |
+
<!-- Exclude the Composer Vendor directory. -->
|
7 |
+
<exclude-pattern>/vendor/*</exclude-pattern>
|
8 |
+
|
9 |
+
<exclude-pattern>/cypress/*</exclude-pattern>
|
10 |
+
<exclude-pattern>/.github/*</exclude-pattern>
|
11 |
+
<exclude-pattern>/tests/*</exclude-pattern>
|
12 |
+
<exclude-pattern>/public/*</exclude-pattern>
|
13 |
+
<exclude-pattern>/wpcs/*</exclude-pattern>
|
14 |
+
|
15 |
+
<!-- Exclude the Node Modules directory. -->
|
16 |
+
<exclude-pattern>/node_modules/*</exclude-pattern>
|
17 |
+
|
18 |
+
<!-- Exclude CSS and Javascript files. -->
|
19 |
+
<exclude-pattern>*.css</exclude-pattern>
|
20 |
+
<exclude-pattern>*.js</exclude-pattern>
|
21 |
+
|
22 |
+
<!-- Include the WordPress-Extra standard. -->
|
23 |
+
<rule ref="WordPress-Extra">
|
24 |
+
<!--
|
25 |
+
We may want a middle ground though. The best way to do this is add the
|
26 |
+
entire ruleset, then rule by rule, remove ones that don't suit a project.
|
27 |
+
We can do this by running `phpcs` with the '-s' flag, which allows us to
|
28 |
+
see the names of the sniffs reporting errors.
|
29 |
+
Once we know the sniff names, we can opt to exclude sniffs which don't
|
30 |
+
suit our project like so.
|
31 |
+
|
32 |
+
The below two examples just show how you can exclude rules.
|
33 |
+
They are not intended as advice about which sniffs to exclude.
|
34 |
+
-->
|
35 |
+
|
36 |
+
<!--
|
37 |
+
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing"/>
|
38 |
+
<exclude name="WordPress.Security.EscapeOutput"/>
|
39 |
+
-->
|
40 |
+
</rule>
|
41 |
|
42 |
<rule ref="WordPress">
|
43 |
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
|
48 |
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore" />
|
49 |
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter" />
|
50 |
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterCloseParenthesis" />
|
51 |
+
<exclude name="WordPress.WhiteSpace.CastStructureSpacing.NoSpaceBeforeOpenParenthesis" />
|
52 |
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener" />
|
53 |
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser" />
|
54 |
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" />
|
68 |
<exclude name="Generic.PHP.ClosingPHPTag.NotFound" />
|
69 |
<exclude name="Generic.Files.LowercasedFilename.NotFound" />
|
70 |
<exclude name="Generic.Formatting.SpaceAfterNot.Incorrect" />
|
71 |
+
<exclude name="Generic.Formatting.SpaceBeforeCast.NoSpace" />
|
72 |
<exclude name="Generic.Classes.OpeningBraceSameLine.BraceOnNewLine" />
|
73 |
<exclude name="Generic.Files.EndFileNoNewline.Found" />
|
74 |
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine" />
|
111 |
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
|
112 |
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
|
113 |
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket" />
|
114 |
+
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
|
115 |
+
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
|
116 |
<exclude name="PEAR.Commenting.FileComment.MissingPackageTag" />
|
117 |
<exclude name="PEAR.Commenting.FileComment.MissingAuthorTag" />
|
118 |
<exclude name="PEAR.Commenting.FileComment.MissingCategoryTag" />
|
131 |
<exclude name="PEAR.WhiteSpace.ScopeIndent.IncorrectExact" />
|
132 |
</rule>
|
133 |
|
134 |
+
<!-- Let's also check that everything is properly documented. -->
|
135 |
+
<rule ref="WordPress-Docs"/>
|
136 |
+
|
137 |
+
<!-- Add in some extra rules from other standards. -->
|
138 |
+
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
|
139 |
+
<!-- <rule ref="Generic.Commenting.Todo"/> -->
|
140 |
+
|
141 |
+
<!-- Check for PHP cross-version compatibility. -->
|
142 |
+
<!--
|
143 |
+
To enable this, the PHPCompatibilityWP standard needs
|
144 |
+
to be installed.
|
145 |
+
See the readme for installation instructions:
|
146 |
+
https://github.com/PHPCompatibility/PHPCompatibilityWP
|
147 |
+
For more information, also see:
|
148 |
+
https://github.com/PHPCompatibility/PHPCompatibility
|
149 |
+
-->
|
150 |
+
|
151 |
+
<config name="testVersion" value="5.6-"/>
|
152 |
+
<rule ref="PHPCompatibilityWP"/>
|
153 |
+
|
154 |
+
|
155 |
+
<!--
|
156 |
+
To get the optimal benefits of using WPCS, we should add a couple of
|
157 |
+
custom properties.
|
158 |
+
Adjust the values of these properties to fit our needs.
|
159 |
+
|
160 |
+
For information on additional custom properties available, check out
|
161 |
+
the wiki:
|
162 |
+
https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties
|
163 |
+
-->
|
164 |
+
<config name="minimum_supported_wp_version" value="5.4"/>
|
165 |
+
|
166 |
+
<rule ref="WordPress.WP.I18n">
|
167 |
+
<properties>
|
168 |
+
<property name="text_domain" type="array">
|
169 |
+
<element value="extendify-sdk"/>
|
170 |
+
</property>
|
171 |
+
</properties>
|
172 |
+
</rule>
|
173 |
+
|
174 |
+
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
|
175 |
+
<properties>
|
176 |
+
<property name="prefixes" type="array">
|
177 |
+
<element value="extendifysdk"/>
|
178 |
+
</property>
|
179 |
+
</properties>
|
180 |
+
</rule>
|
181 |
|
182 |
|
183 |
</ruleset>
|
redux-core/extendify-sdk/.prettierignore
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
node_modules/*
|
2 |
+
vendor/*
|
3 |
+
public/build/*
|
4 |
+
*.min.js
|
5 |
+
wpcs
|
6 |
+
utility-framework/suggestions.json
|
redux-core/extendify-sdk/.prettierrc.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = {
|
2 |
+
trailingComma: 'all',
|
3 |
+
tabWidth: 4,
|
4 |
+
semi: false,
|
5 |
+
singleQuote: true,
|
6 |
+
bracketSameLine: true,
|
7 |
+
overrides: [
|
8 |
+
{
|
9 |
+
files: ['**/*.css', '**/*.html'],
|
10 |
+
options: {
|
11 |
+
singleQuote: false,
|
12 |
+
},
|
13 |
+
},
|
14 |
+
],
|
15 |
+
}
|
redux-core/extendify-sdk/app/Shared.php
CHANGED
@@ -172,7 +172,7 @@ class Shared
|
|
172 |
}
|
173 |
|
174 |
if ($this->theme === 'generatepress') {
|
175 |
-
$settings = get_option( 'generate_settings' );
|
176 |
|
177 |
if (! array_key_exists( 'background_color', $settings )) {
|
178 |
$background = '#f7f8f9';
|
172 |
}
|
173 |
|
174 |
if ($this->theme === 'generatepress') {
|
175 |
+
$settings = (array) get_option( 'generate_settings', [] );
|
176 |
|
177 |
if (! array_key_exists( 'background_color', $settings )) {
|
178 |
$background = '#f7f8f9';
|
redux-core/extendify-sdk/bin/clean-build-files.sh
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
if ! git config user.email | grep -q 'users.noreply.github.com'; then
|
3 |
+
echo 'Cleaning build files before commit...'
|
4 |
+
for i in $(dirname "pwd")/public/build/* ;do truncate -s 0 "$i";done
|
5 |
+
truncate -s 0 $(dirname "pwd")/public/editorplus/editorplus.min.js
|
6 |
+
git add -A .
|
7 |
+
fi
|
redux-core/extendify-sdk/editorplus/EditorPlus.php
CHANGED
@@ -21,7 +21,7 @@ if (!class_exists('edpl__EditorPlus')) {
|
|
21 |
*
|
22 |
* @var array $templates
|
23 |
*/
|
24 |
-
protected $templates;
|
25 |
|
26 |
/**
|
27 |
* Returns an instance of this class.
|
@@ -42,124 +42,121 @@ if (!class_exists('edpl__EditorPlus')) {
|
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
-
*
|
46 |
*/
|
47 |
public function __construct()
|
48 |
{
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
]
|
83 |
-
);
|
84 |
-
// Add a filter to the template include to determine if the page has our template assigned and return it's path.
|
85 |
-
add_filter(
|
86 |
-
'template_include',
|
87 |
-
[
|
88 |
-
$this,
|
89 |
-
'viewProjectTemplate',
|
90 |
-
]
|
91 |
-
);
|
92 |
-
|
93 |
-
$this->templates = ['editorplus-template.php' => 'Extendify Template'];
|
94 |
-
add_filter(
|
95 |
-
'body_class',
|
96 |
-
function ($classes) {
|
97 |
$classes[] = 'eplus_styles';
|
98 |
-
return $classes;
|
99 |
}
|
100 |
-
|
101 |
-
|
102 |
-
// Registering meta data to store editorplus generated stylesheet of template.
|
103 |
-
$postTypes = get_post_types(['_builtin' => false], 'names', 'and');
|
104 |
-
$postTypes['post'] = 'post';
|
105 |
-
foreach ($postTypes as $postType) {
|
106 |
-
register_meta(
|
107 |
-
$postType,
|
108 |
-
'extendify_custom_stylesheet',
|
109 |
-
[
|
110 |
-
'show_in_rest' => true,
|
111 |
-
'single' => true,
|
112 |
-
'type' => 'string',
|
113 |
-
'default' => '',
|
114 |
-
]
|
115 |
-
);
|
116 |
}
|
117 |
-
|
118 |
-
}
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
if (!isset($GLOBALS['post']) || !$GLOBALS['post']) {
|
128 |
-
return;
|
129 |
-
}
|
130 |
|
131 |
-
|
132 |
-
|
133 |
-
'extendifysdk_template_css',
|
134 |
-
get_post_meta($post->ID, 'extendify_custom_stylesheet', true),
|
135 |
-
$post
|
136 |
);
|
137 |
|
138 |
-
//
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
143 |
|
144 |
/**
|
145 |
-
*
|
146 |
*
|
147 |
-
* @return
|
148 |
*/
|
149 |
-
public function
|
150 |
{
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
}
|
153 |
|
154 |
/**
|
155 |
-
*
|
156 |
*
|
157 |
-
* @
|
158 |
-
* @return array
|
159 |
*/
|
160 |
-
public function
|
161 |
{
|
162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
|
165 |
/**
|
@@ -171,8 +168,12 @@ if (!class_exists('edpl__EditorPlus')) {
|
|
171 |
*/
|
172 |
public function registerProjectTemplates($attributes)
|
173 |
{
|
|
|
|
|
|
|
|
|
174 |
// Create the key used for the themes cache.
|
175 |
-
$cacheKey = 'page_templates-' .
|
176 |
// Retrieve the cache list.
|
177 |
// If it doesn't exist, or it's empty prepare an array.
|
178 |
$templates = wp_get_theme()->get_page_templates();
|
@@ -198,8 +199,8 @@ if (!class_exists('edpl__EditorPlus')) {
|
|
198 |
*/
|
199 |
public function viewProjectTemplate($template)
|
200 |
{
|
201 |
-
$post =
|
202 |
-
if (!$post) {
|
203 |
return $template;
|
204 |
}
|
205 |
|
21 |
*
|
22 |
* @var array $templates
|
23 |
*/
|
24 |
+
protected $templates = ['editorplus-template.php' => 'Extendify Template'];
|
25 |
|
26 |
/**
|
27 |
* Returns an instance of this class.
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
+
* Check whether we need to use the Extendify/EP template.
|
46 |
*/
|
47 |
public function __construct()
|
48 |
{
|
49 |
+
// Maybe show the styles on the frontend.
|
50 |
+
add_action('wp_head', function () {
|
51 |
+
if ($this->useDeprecatedTemplate()) {
|
52 |
+
$this->showStylesheet();
|
53 |
+
}
|
54 |
+
});
|
55 |
+
|
56 |
+
// Maybe show the styles in admin.
|
57 |
+
add_action('admin_head', function () {
|
58 |
+
if ($this->useDeprecatedTemplate()) {
|
59 |
+
$this->showStylesheet();
|
60 |
+
}
|
61 |
+
});
|
62 |
+
|
63 |
+
// Maybe load the JS to inject the admin styles.
|
64 |
+
add_action(
|
65 |
+
'admin_enqueue_scripts',
|
66 |
+
function () {
|
67 |
+
wp_enqueue_script(
|
68 |
+
'extendifysdk-editorplus-scripts',
|
69 |
+
EXTENDIFYSDK_BASE_URL . 'public/editorplus/editorplus.min.js',
|
70 |
+
[],
|
71 |
+
'1.0',
|
72 |
+
true
|
73 |
+
);
|
74 |
+
}
|
75 |
+
);
|
76 |
+
|
77 |
+
// Maybe add the body class name to the front end.
|
78 |
+
add_filter(
|
79 |
+
'body_class',
|
80 |
+
function ($classes) {
|
81 |
+
if ($this->useDeprecatedTemplate()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
$classes[] = 'eplus_styles';
|
|
|
83 |
}
|
84 |
+
|
85 |
+
return $classes;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
+
);
|
|
|
88 |
|
89 |
+
// Maybe add the body class name to the admin.
|
90 |
+
add_filter(
|
91 |
+
'admin_body_class',
|
92 |
+
function ($classes) {
|
93 |
+
if ($this->useDeprecatedTemplate()) {
|
94 |
+
$classes .= ' eplus_styles';
|
95 |
+
}
|
|
|
|
|
|
|
96 |
|
97 |
+
return $classes;
|
98 |
+
}
|
|
|
|
|
|
|
99 |
);
|
100 |
|
101 |
+
// Maybe register the template into WP.
|
102 |
+
add_filter('theme_page_templates', function ($templates) {
|
103 |
+
if (!$this->useDeprecatedTemplate()) {
|
104 |
+
return $templates;
|
105 |
+
}
|
106 |
+
|
107 |
+
return array_merge($templates, $this->templates);
|
108 |
+
});
|
109 |
+
|
110 |
+
// Maybe add template to the dropdown list.
|
111 |
+
add_filter('wp_insert_post_data', [$this, 'registerProjectTemplates']);
|
112 |
+
|
113 |
+
// Maybe add template file path.
|
114 |
+
add_filter('template_include', [$this, 'viewProjectTemplate']);
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
+
* Checks whether the page needs the EP template
|
119 |
*
|
120 |
+
* @return boolean
|
121 |
*/
|
122 |
+
public function useDeprecatedTemplate()
|
123 |
{
|
124 |
+
$post = get_post();
|
125 |
+
if (isset($GLOBALS['post'])) {
|
126 |
+
// This will populate on the frontend.
|
127 |
+
$post = wp_unslash($GLOBALS['post']);
|
128 |
+
}
|
129 |
+
|
130 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
131 |
+
if (is_admin() && isset($_GET['post'])) {
|
132 |
+
// This will populate on the admin.
|
133 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
134 |
+
$post = get_post(sanitize_text_field(wp_unslash($_GET['post'])));
|
135 |
+
}
|
136 |
+
|
137 |
+
return isset($post->ID) && get_post_meta($post->ID, '_wp_page_template', true) === 'editorplus-template.php';
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
+
* Used to echo out page template stylesheet if the page template is not active.
|
142 |
*
|
143 |
+
* @return void
|
|
|
144 |
*/
|
145 |
+
public function showStylesheet()
|
146 |
{
|
147 |
+
$post = get_post();
|
148 |
+
$cssContent = apply_filters(
|
149 |
+
'extendifysdk_template_css',
|
150 |
+
get_post_meta($post->ID, 'extendify_custom_stylesheet', true),
|
151 |
+
$post
|
152 |
+
);
|
153 |
+
|
154 |
+
// Note that esc_html() cannot be used because `div > span` is not interpreted properly.
|
155 |
+
// See: https://github.com/WordPress/WordPress/blob/ccdb1766aead26d4cef79badb015bb2727fefd59/wp-includes/theme.php#L1824-L1833 for reference.
|
156 |
+
if ($cssContent) {
|
157 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
158 |
+
echo "<style id='extendify-custom-stylesheet' type='text/css'>" . wp_strip_all_tags($cssContent) . '</style>';
|
159 |
+
}
|
160 |
}
|
161 |
|
162 |
/**
|
168 |
*/
|
169 |
public function registerProjectTemplates($attributes)
|
170 |
{
|
171 |
+
if (!$this->useDeprecatedTemplate()) {
|
172 |
+
return $attributes;
|
173 |
+
}
|
174 |
+
|
175 |
// Create the key used for the themes cache.
|
176 |
+
$cacheKey = 'page_templates-' . wp_hash(get_theme_root() . '/' . get_stylesheet());
|
177 |
// Retrieve the cache list.
|
178 |
// If it doesn't exist, or it's empty prepare an array.
|
179 |
$templates = wp_get_theme()->get_page_templates();
|
199 |
*/
|
200 |
public function viewProjectTemplate($template)
|
201 |
{
|
202 |
+
$post = get_post();
|
203 |
+
if (!$post || !$this->useDeprecatedTemplate()) {
|
204 |
return $template;
|
205 |
}
|
206 |
|
redux-core/extendify-sdk/editorplus/editorplus-template.php
CHANGED
@@ -33,10 +33,6 @@ $extendifysdkCustomStyles = get_post_meta(
|
|
33 |
.ep-temp-container {
|
34 |
margin-left: auto;
|
35 |
margin-right: auto;
|
36 |
-
min-width: 1280px;
|
37 |
-
}
|
38 |
-
.ep-temp-container .alignfull {
|
39 |
-
min-width: 1280px !important;
|
40 |
}
|
41 |
@media(min-width: 700px) {
|
42 |
.ep-temp-container [class*=extendify-] [class*=wp-block] > * {
|
33 |
.ep-temp-container {
|
34 |
margin-left: auto;
|
35 |
margin-right: auto;
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
@media(min-width: 700px) {
|
38 |
.ep-temp-container [class*=extendify-] [class*=wp-block] > * {
|
redux-core/extendify-sdk/editorplus/editorplus.js
CHANGED
@@ -1,244 +1,29 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
let isNotAllowed = !allowedOrigins.includes(parsedURL.origin)
|
27 |
-
|
28 |
-
if (isNotAllowed) {
|
29 |
-
isMalicious = true
|
30 |
-
break
|
31 |
-
}
|
32 |
-
} catch (e) {
|
33 |
-
|
34 |
-
// verifying if the regex matched a URL, because regex can mess up due to URL in between other strings
|
35 |
-
let isUrl = ['https://', 'http://', '.com'].some(urlPart => requestURL.indexOf(urlPart) !== -1)
|
36 |
-
let isVerifiedOrigin = requestURL.indexOf(allowedOrigins[0]) !== -1
|
37 |
-
|
38 |
-
if (isUrl && !isVerifiedOrigin) {
|
39 |
-
isMalicious = true
|
40 |
-
break
|
41 |
-
}
|
42 |
-
|
43 |
-
}
|
44 |
-
|
45 |
-
}
|
46 |
-
|
47 |
-
return isMalicious
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Will inject the given css as an stylesheet in the editor
|
52 |
-
* @param {string} css
|
53 |
-
* @return {void}
|
54 |
-
*/
|
55 |
-
|
56 |
-
function injectStyleSheetInEditor(css = window.wp.data.select('core/editor').getEditedPostAttribute('meta')?.extendify_custom_stylesheet ?? '') {
|
57 |
-
if (typeof css !== 'string') return
|
58 |
-
|
59 |
-
css = css.replace(/(.eplus_styles)/g, '')
|
60 |
-
|
61 |
-
let extendifyRoot = document.querySelector('#extendify-root')
|
62 |
-
let styleID = 'extendify-custom-stylesheet'
|
63 |
-
|
64 |
-
if (document.getElementById(styleID)) {
|
65 |
-
// stylesheet already exists
|
66 |
-
document.getElementById(styleID).innerHTML = css
|
67 |
-
} else {
|
68 |
-
let styleElement = document.createElement('style')
|
69 |
-
|
70 |
-
styleElement.id = styleID
|
71 |
-
styleElement.type = 'text/css'
|
72 |
-
|
73 |
-
styleElement.appendChild(document.createTextNode(css))
|
74 |
-
extendifyRoot.appendChild(styleElement)
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Will provide filtered css from the given sheet
|
80 |
-
* @param {CSSStyleSheet} sheet
|
81 |
-
* @param {string[]} prefix
|
82 |
-
* @return {string} css - filtered css
|
83 |
-
*/
|
84 |
-
|
85 |
-
function filterStylesheetWithPrefix(sheet, allowedPrefixes) {
|
86 |
-
let filteredCSS = ''
|
87 |
-
|
88 |
-
let isPrefixed = selector => {
|
89 |
-
return allowedPrefixes.some(allowedPrefix => selector.startsWith(allowedPrefix))
|
90 |
-
}
|
91 |
-
|
92 |
-
for (const rule of sheet?.cssRules ?? []) {
|
93 |
-
// if it's a media rule we need to also process the nested rule list
|
94 |
-
if (rule instanceof CSSMediaRule) {
|
95 |
-
|
96 |
-
if (_hasMaliciousURL(rule)) continue
|
97 |
-
|
98 |
-
let processedMediaRule = rule?.cssRules ?? []
|
99 |
-
let rulesToDelete = [] // because deleting them in the loop can disturb the index
|
100 |
-
|
101 |
-
for (const mediaRuleIndex of Object.keys(processedMediaRule)) {
|
102 |
-
let mediaRule = mediaRuleIndex in processedMediaRule
|
103 |
-
? processedMediaRule[mediaRuleIndex]
|
104 |
-
: {}
|
105 |
-
|
106 |
-
if (!isPrefixed(mediaRule.selectorText)) {
|
107 |
-
rulesToDelete.push(mediaRuleIndex)
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
for (const mediaRuleIndexToDelete of rulesToDelete) {
|
112 |
-
rule.deleteRule(mediaRuleIndexToDelete)
|
113 |
-
}
|
114 |
-
|
115 |
-
filteredCSS += rule.cssText
|
116 |
-
}
|
117 |
-
|
118 |
-
if (rule instanceof CSSStyleRule) {
|
119 |
-
if (_hasMaliciousURL(rule)) continue
|
120 |
-
|
121 |
-
filteredCSS += isPrefixed(rule.selectorText)
|
122 |
-
? rule.cssText
|
123 |
-
: ''
|
124 |
}
|
125 |
-
|
126 |
-
|
127 |
-
return filteredCSS
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Listener to enable page template
|
132 |
-
*/
|
133 |
-
window._wpLoadBlockEditor && window.addEventListener('extendify-sdk::template-inserted', (event) => {
|
134 |
-
const { template } = event.detail
|
135 |
-
const wpTemplateName = 'editorplus-template.php'
|
136 |
-
|
137 |
-
// check if the instruction has command to enable page
|
138 |
-
if (!template?.fields?.instructions?.includes('enable_page_template')) {
|
139 |
-
return
|
140 |
-
}
|
141 |
-
|
142 |
-
// Get a list of templates from the editor
|
143 |
-
const selector = select('core/editor')
|
144 |
-
const availablePageTemplates = selector.getEditorSettings()?.availableTemplates ?? {}
|
145 |
-
if (!Object.keys(availablePageTemplates).includes(wpTemplateName)) {
|
146 |
-
return
|
147 |
-
}
|
148 |
-
|
149 |
-
// Finally, set the template
|
150 |
-
dispatch('core/editor').editPost({
|
151 |
-
template: wpTemplateName,
|
152 |
})
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Listener to inject stylesheet
|
157 |
-
*/
|
158 |
-
window._wpLoadBlockEditor && window.addEventListener('extendify-sdk::template-inserted', async (event) => {
|
159 |
-
|
160 |
-
// TODO: use better approach which does not use require additional network request
|
161 |
-
|
162 |
-
const { template } = event.detail
|
163 |
-
const stylesheetURL = template?.fields?.stylesheet ?? ''
|
164 |
-
|
165 |
-
if (!stylesheetURL) {
|
166 |
-
return
|
167 |
-
}
|
168 |
-
|
169 |
-
try {
|
170 |
-
let generatedCSS = await (await fetch(stylesheetURL)).text()
|
171 |
-
let appendedCSS = select('core/editor').getEditedPostAttribute('meta')?.extendify_custom_stylesheet ?? ''
|
172 |
-
|
173 |
-
let createdStyleElement = document.createElement('style')
|
174 |
-
let createdStyleID = 'extendify-stylesheet'
|
175 |
-
|
176 |
-
// webkit hack: appending stylesheet to let DOM process rules
|
177 |
-
|
178 |
-
createdStyleElement.id = createdStyleID
|
179 |
-
createdStyleElement.type = 'text/css'
|
180 |
-
createdStyleElement.appendChild(document.createTextNode(generatedCSS))
|
181 |
-
|
182 |
-
document.querySelector('#extendify-root').appendChild(createdStyleElement)
|
183 |
-
|
184 |
-
let processedStyleSheet = document.getElementById(createdStyleID)
|
185 |
-
|
186 |
-
// disabling the stylesheet
|
187 |
-
processedStyleSheet.sheet.disable = true
|
188 |
-
|
189 |
-
// accessing processed CSSStyleSheet
|
190 |
-
let filteredCSS = filterStylesheetWithPrefix(processedStyleSheet?.sheet, ['.extendify-', '.eplus_styles', '.eplus-', '[class*="extendify-"]', '[class*="extendify"]'])
|
191 |
-
|
192 |
-
// merging existing styles
|
193 |
-
filteredCSS += appendedCSS
|
194 |
-
|
195 |
-
// deleting the generated stylesheet
|
196 |
-
processedStyleSheet.parentNode.removeChild(processedStyleSheet)
|
197 |
-
|
198 |
-
// injecting the stylesheet to style the editor view
|
199 |
-
injectStyleSheetInEditor(filteredCSS)
|
200 |
-
|
201 |
-
// finally, updating the metadata
|
202 |
-
await dispatch('core/editor').editPost({
|
203 |
-
meta: {
|
204 |
-
extendify_custom_stylesheet: filteredCSS,
|
205 |
-
},
|
206 |
-
})
|
207 |
-
|
208 |
-
} catch (error) {
|
209 |
-
console.error(error)
|
210 |
-
}
|
211 |
-
})
|
212 |
-
|
213 |
-
// loading stylesheet in the editor after page load
|
214 |
-
window._wpLoadBlockEditor && window.wp.domReady(() => {
|
215 |
-
setTimeout(() => injectStyleSheetInEditor(), 0)
|
216 |
-
})
|
217 |
-
|
218 |
-
// Quick method to hide the title if the template is active
|
219 |
-
let extendifyCurrentPageTemplate
|
220 |
-
window._wpLoadBlockEditor && window.wp.data.subscribe(() => {
|
221 |
-
// Nothing changed
|
222 |
-
if (extendifyCurrentPageTemplate && extendifyCurrentPageTemplate === window.wp.data.select('core/editor').getEditedPostAttribute('template')) {
|
223 |
-
return
|
224 |
-
}
|
225 |
-
const epTemplateSelected = window.wp.data.select('core/editor').getEditedPostAttribute('template') === 'editorplus-template.php'
|
226 |
-
const title = document.querySelector('.edit-post-visual-editor__post-title-wrapper')
|
227 |
-
const wrapper = document.querySelector('.editor-styles-wrapper')
|
228 |
-
|
229 |
-
// Too early
|
230 |
-
if (!title || !wrapper) {
|
231 |
-
return
|
232 |
-
}
|
233 |
-
|
234 |
-
if (epTemplateSelected) {
|
235 |
-
// GB needs to compute the height first
|
236 |
-
Promise.resolve().then(() => title.style.display = 'none')
|
237 |
-
wrapper.style.paddingTop = '0'
|
238 |
-
wrapper.style.backgroundColor = '#ffffff'
|
239 |
-
} else {
|
240 |
-
title.style.removeProperty('display')
|
241 |
-
wrapper.style.removeProperty('padding-top')
|
242 |
-
wrapper.style.removeProperty('background-color')
|
243 |
-
}
|
244 |
-
})
|
1 |
+
// Quick method to hide the title if the template is active
|
2 |
+
if (window._wpLoadBlockEditor) {
|
3 |
+
const finished = window.wp.data.subscribe(() => {
|
4 |
+
const epTemplateSelected =
|
5 |
+
window.wp.data
|
6 |
+
.select('core/editor')
|
7 |
+
.getEditedPostAttribute('template') ===
|
8 |
+
'editorplus-template.php'
|
9 |
+
const title = document.querySelector(
|
10 |
+
'.edit-post-visual-editor__post-title-wrapper',
|
11 |
+
)
|
12 |
+
const wrapper = document.querySelector('.editor-styles-wrapper')
|
13 |
+
|
14 |
+
// Too early
|
15 |
+
if (!title || !wrapper) return
|
16 |
+
|
17 |
+
if (epTemplateSelected) {
|
18 |
+
// GB needs to compute the height first
|
19 |
+
Promise.resolve().then(() => (title.style.display = 'none'))
|
20 |
+
wrapper.style.paddingTop = '0'
|
21 |
+
wrapper.style.backgroundColor = '#ffffff'
|
22 |
+
} else {
|
23 |
+
title.style.removeProperty('display')
|
24 |
+
wrapper.style.removeProperty('padding-top')
|
25 |
+
wrapper.style.removeProperty('background-color')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
+
finished()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
})
|
29 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/public/build/extendify-sdk.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
div.extendify-sdk .sr-only{clip:rect(0,0,0,0)!important;border-width:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}div.extendify-sdk .focus\:not-sr-only:focus{clip:auto!important;height:auto!important;margin:0!important;overflow:visible!important;padding:0!important;position:static!important;white-space:normal!important;width:auto!important}div.extendify-sdk .pointer-events-none{pointer-events:none!important}div.extendify-sdk .visible{visibility:visible!important}div.extendify-sdk .invisible{visibility:hidden!important}div.extendify-sdk .static{position:static!important}div.extendify-sdk .fixed{position:fixed!important}div.extendify-sdk .absolute{position:absolute!important}div.extendify-sdk .relative{position:relative!important}div.extendify-sdk .sticky{position:sticky!important}div.extendify-sdk .inset-0{bottom:0!important;left:0!important;right:0!important;top:0!important}div.extendify-sdk .top-0{top:0!important}div.extendify-sdk .top-1{top:.25rem!important}div.extendify-sdk .top-2{top:.5rem!important}div.extendify-sdk .top-16{top:4rem!important}div.extendify-sdk .-top-3{top:-.75rem!important}div.extendify-sdk .right-0{right:0!important}div.extendify-sdk .right-1{right:.25rem!important}div.extendify-sdk .right-2{right:.5rem!important}div.extendify-sdk .right-2\.5{right:.625rem!important}div.extendify-sdk .bottom-0{bottom:0!important}div.extendify-sdk .left-1{left:.25rem!important}div.extendify-sdk .z-0{z-index:0!important}div.extendify-sdk .z-20{z-index:20!important}div.extendify-sdk .z-30{z-index:30!important}div.extendify-sdk .z-50{z-index:50!important}div.extendify-sdk .z-high{z-index:99999!important}div.extendify-sdk .m-0{margin:0!important}div.extendify-sdk .m-6{margin:1.5rem!important}div.extendify-sdk .m-8{margin:2rem!important}div.extendify-sdk .m-auto{margin:auto!important}div.extendify-sdk .mx-6{margin-left:1.5rem!important;margin-right:1.5rem!important}div.extendify-sdk .mx-auto{margin-left:auto!important;margin-right:auto!important}div.extendify-sdk .my-0{margin-bottom:0!important;margin-top:0!important}div.extendify-sdk .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}div.extendify-sdk .my-4{margin-bottom:1rem!important;margin-top:1rem!important}div.extendify-sdk .mt-0{margin-top:0!important}div.extendify-sdk .mt-4{margin-top:1rem!important}div.extendify-sdk .mt-5{margin-top:1.25rem!important}div.extendify-sdk .mt-10{margin-top:2.5rem!important}div.extendify-sdk .mt-px{margin-top:1px!important}div.extendify-sdk .-mt-10{margin-top:-2.5rem!important}div.extendify-sdk .mr-1{margin-right:.25rem!important}div.extendify-sdk .mb-1{margin-bottom:.25rem!important}div.extendify-sdk .mb-2{margin-bottom:.5rem!important}div.extendify-sdk .mb-4{margin-bottom:1rem!important}div.extendify-sdk .mb-6{margin-bottom:1.5rem!important}div.extendify-sdk .mb-8{margin-bottom:2rem!important}div.extendify-sdk .mb-10{margin-bottom:2.5rem!important}div.extendify-sdk .mb-16{margin-bottom:4rem!important}div.extendify-sdk .mb-2\.5{margin-bottom:.625rem!important}div.extendify-sdk .ml-4{margin-left:1rem!important}div.extendify-sdk .-ml-1{margin-left:-.25rem!important}div.extendify-sdk .-ml-2{margin-left:-.5rem!important}div.extendify-sdk .-ml-8{margin-left:-2rem!important}div.extendify-sdk .-ml-px{margin-left:-1px!important}div.extendify-sdk .block{display:block!important}div.extendify-sdk .flex{display:flex!important}div.extendify-sdk .inline-flex{display:inline-flex!important}div.extendify-sdk .table{display:table!important}div.extendify-sdk .grid{display:grid!important}div.extendify-sdk .hidden{display:none!important}div.extendify-sdk .h-8{height:2rem!important}div.extendify-sdk .h-16{height:4rem!important}div.extendify-sdk .h-40{height:10rem!important}div.extendify-sdk .h-80{height:20rem!important}div.extendify-sdk .h-auto{height:auto!important}div.extendify-sdk .h-full{height:100%!important}div.extendify-sdk .h-screen{height:100vh!important}div.extendify-sdk .min-h-0{min-height:0!important}div.extendify-sdk .min-h-60{min-height:15rem!important}div.extendify-sdk .min-h-screen{min-height:100vh!important}div.extendify-sdk .w-60{width:15rem!important}div.extendify-sdk .w-64{width:16rem!important}div.extendify-sdk .w-80{width:20rem!important}div.extendify-sdk .w-auto{width:auto!important}div.extendify-sdk .w-full{width:100%!important}div.extendify-sdk .w-screen{width:100vw!important}div.extendify-sdk .max-w-xs{max-width:20rem!important}div.extendify-sdk .max-w-md{max-width:28rem!important}div.extendify-sdk .max-w-lg{max-width:32rem!important}div.extendify-sdk .max-w-xl{max-width:36rem!important}div.extendify-sdk .max-w-full{max-width:100%!important}div.extendify-sdk .max-w-screen-xl{max-width:1280px!important}div.extendify-sdk .max-w-screen-4xl{max-width:1920px!important}div.extendify-sdk .max-w-8xl{max-width:98rem!important}div.extendify-sdk .flex-shrink-0{flex-shrink:0!important}div.extendify-sdk .flex-grow{flex-grow:1!important}div.extendify-sdk .transform{--tw-translate-x:0!important;--tw-translate-y:0!important;--tw-rotate:0!important;--tw-skew-x:0!important;--tw-skew-y:0!important;--tw-scale-x:1!important;--tw-scale-y:1!important;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}div.extendify-sdk .-translate-x-1{--tw-translate-x:-0.25rem!important}div.extendify-sdk .-translate-x-3{--tw-translate-x:-0.75rem!important}div.extendify-sdk .translate-y-0{--tw-translate-y:0px!important}div.extendify-sdk .translate-y-4{--tw-translate-y:1rem!important}div.extendify-sdk .-translate-y-full{--tw-translate-y:-100%!important}div.extendify-sdk .rotate-90{--tw-rotate:90deg!important}div.extendify-sdk .cursor-pointer{cursor:pointer!important}div.extendify-sdk .flex-col{flex-direction:column!important}div.extendify-sdk .items-start{align-items:flex-start!important}div.extendify-sdk .items-end{align-items:flex-end!important}div.extendify-sdk .items-center{align-items:center!important}div.extendify-sdk .justify-start{justify-content:flex-start!important}div.extendify-sdk .justify-end{justify-content:flex-end!important}div.extendify-sdk .justify-center{justify-content:center!important}div.extendify-sdk .justify-between{justify-content:space-between!important}div.extendify-sdk .justify-items-center{justify-items:center!important}div.extendify-sdk .gap-6{gap:1.5rem!important}div.extendify-sdk .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.25rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.5rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.75rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(1rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(3rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.375rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.375rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.5rem*var(--tw-space-y-reverse))!important;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))!important}div.extendify-sdk .space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1rem*var(--tw-space-y-reverse))!important;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))!important}div.extendify-sdk .space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(2rem*var(--tw-space-y-reverse))!important;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))!important}div.extendify-sdk .divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0!important;border-bottom-width:calc(1px*var(--tw-divide-y-reverse))!important;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))!important}div.extendify-sdk .overflow-hidden{overflow:hidden!important}div.extendify-sdk .overflow-y-auto{overflow-y:auto!important}div.extendify-sdk .whitespace-nowrap{white-space:nowrap!important}div.extendify-sdk .rounded-none{border-radius:0!important}div.extendify-sdk .rounded-sm{border-radius:.125rem!important}div.extendify-sdk .rounded{border-radius:.25rem!important}div.extendify-sdk .rounded-md{border-radius:.375rem!important}div.extendify-sdk .border-0{border-width:0!important}div.extendify-sdk .border-2{border-width:2px!important}div.extendify-sdk .border{border-width:1px!important}div.extendify-sdk .border-b{border-bottom-width:1px!important}div.extendify-sdk .border-solid{border-style:solid!important}div.extendify-sdk .border-transparent{border-color:transparent!important}div.extendify-sdk .border-black{--tw-border-opacity:1!important;border-color:rgba(0,0,0,var(--tw-border-opacity))!important}div.extendify-sdk .border-gray-200{--tw-border-opacity:1!important;border-color:rgba(224,224,224,var(--tw-border-opacity))!important}div.extendify-sdk .border-gray-300{--tw-border-opacity:1!important;border-color:rgba(221,221,221,var(--tw-border-opacity))!important}div.extendify-sdk .border-gray-900{--tw-border-opacity:1!important;border-color:rgba(30,30,30,var(--tw-border-opacity))!important}div.extendify-sdk .border-extendify-main{--tw-border-opacity:1!important;border-color:rgba(0,129,96,var(--tw-border-opacity))!important}div.extendify-sdk .border-wp-alert-red{--tw-border-opacity:1!important;border-color:rgba(204,24,24,var(--tw-border-opacity))!important}div.extendify-sdk .hover\:border-wp-theme-500:hover{border-color:var(--wp-admin-theme-color)!important}div.extendify-sdk .focus\:border-transparent:focus{border-color:transparent!important}div.extendify-sdk .focus\:border-wp-theme-500:focus{border-color:var(--wp-admin-theme-color)!important}div.extendify-sdk .bg-transparent{background-color:transparent!important}div.extendify-sdk .bg-black{--tw-bg-opacity:1!important;background-color:rgba(0,0,0,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-white{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-gray-100{--tw-bg-opacity:1!important;background-color:rgba(240,240,240,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-gray-900{--tw-bg-opacity:1!important;background-color:rgba(30,30,30,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-lightest{--tw-bg-opacity:1!important;background-color:rgba(248,255,254,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-main{--tw-bg-opacity:1!important;background-color:rgba(0,129,96,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-alert{--tw-bg-opacity:1!important;background-color:rgba(132,16,16,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-secondary{--tw-bg-opacity:1!important;background-color:rgba(203,195,245,var(--tw-bg-opacity))!important}div.extendify-sdk .hover\:bg-gray-150:hover{--tw-bg-opacity:1!important;background-color:rgba(234,234,234,var(--tw-bg-opacity))!important}div.extendify-sdk .hover\:bg-extendify-main-dark:hover{--tw-bg-opacity:1!important;background-color:rgba(5,49,44,var(--tw-bg-opacity))!important}div.extendify-sdk .active\:bg-gray-900:active{--tw-bg-opacity:1!important;background-color:rgba(30,30,30,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-opacity-30{--tw-bg-opacity:0.3!important}div.extendify-sdk .bg-clip-padding{background-clip:padding-box!important}div.extendify-sdk .fill-current{fill:currentColor!important}div.extendify-sdk .stroke-current{stroke:currentColor!important}div.extendify-sdk .object-cover{-o-object-fit:cover!important;object-fit:cover!important}div.extendify-sdk .p-0{padding:0!important}div.extendify-sdk .p-1{padding:.25rem!important}div.extendify-sdk .p-2{padding:.5rem!important}div.extendify-sdk .p-3{padding:.75rem!important}div.extendify-sdk .p-4{padding:1rem!important}div.extendify-sdk .p-6{padding:1.5rem!important}div.extendify-sdk .p-10{padding:2.5rem!important}div.extendify-sdk .p-12{padding:3rem!important}div.extendify-sdk .p-1\.5{padding:.375rem!important}div.extendify-sdk .p-3\.5{padding:.875rem!important}div.extendify-sdk .px-1{padding-left:.25rem!important;padding-right:.25rem!important}div.extendify-sdk .px-2{padding-left:.5rem!important;padding-right:.5rem!important}div.extendify-sdk .px-3{padding-left:.75rem!important;padding-right:.75rem!important}div.extendify-sdk .px-4{padding-left:1rem!important;padding-right:1rem!important}div.extendify-sdk .px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}div.extendify-sdk .px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}div.extendify-sdk .py-0{padding-bottom:0!important;padding-top:0!important}div.extendify-sdk .py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}div.extendify-sdk .py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}div.extendify-sdk .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}div.extendify-sdk .py-4{padding-bottom:1rem!important;padding-top:1rem!important}div.extendify-sdk .py-1\.5{padding-bottom:.375rem!important;padding-top:.375rem!important}div.extendify-sdk .py-2\.5{padding-bottom:.625rem!important;padding-top:.625rem!important}div.extendify-sdk .pt-0{padding-top:0!important}div.extendify-sdk .pt-2{padding-top:.5rem!important}div.extendify-sdk .pt-4{padding-top:1rem!important}div.extendify-sdk .pt-6{padding-top:1.5rem!important}div.extendify-sdk .pt-14{padding-top:3.5rem!important}div.extendify-sdk .pt-px{padding-top:1px!important}div.extendify-sdk .pr-2{padding-right:.5rem!important}div.extendify-sdk .pr-3{padding-right:.75rem!important}div.extendify-sdk .pb-2{padding-bottom:.5rem!important}div.extendify-sdk .pb-4{padding-bottom:1rem!important}div.extendify-sdk .pb-6{padding-bottom:1.5rem!important}div.extendify-sdk .pb-32{padding-bottom:8rem!important}div.extendify-sdk .pb-40{padding-bottom:10rem!important}div.extendify-sdk .pl-0{padding-left:0!important}div.extendify-sdk .pl-5{padding-left:1.25rem!important}div.extendify-sdk .pl-6{padding-left:1.5rem!important}div.extendify-sdk .pl-8{padding-left:2rem!important}div.extendify-sdk .text-left{text-align:left!important}div.extendify-sdk .text-center{text-align:center!important}div.extendify-sdk .text-xs{font-size:.75rem!important;line-height:1rem!important}div.extendify-sdk .text-sm{font-size:.875rem!important;line-height:1.25rem!important}div.extendify-sdk .text-base{font-size:1rem!important;line-height:1.5rem!important}div.extendify-sdk .text-lg{font-size:1.125rem!important;line-height:1.75rem!important}div.extendify-sdk .text-xl{font-size:1.25rem!important;line-height:1.75rem!important}div.extendify-sdk .font-light{font-weight:300!important}div.extendify-sdk .font-normal{font-weight:400!important}div.extendify-sdk .font-medium{font-weight:500!important}div.extendify-sdk .font-semibold{font-weight:600!important}div.extendify-sdk .font-bold{font-weight:700!important}div.extendify-sdk .uppercase{text-transform:uppercase!important}div.extendify-sdk .leading-none{line-height:1!important}div.extendify-sdk .leading-tight{line-height:1.25!important}div.extendify-sdk .leading-extra-tight{line-height:.5!important}div.extendify-sdk .text-black{--tw-text-opacity:1!important;color:rgba(0,0,0,var(--tw-text-opacity))!important}div.extendify-sdk .text-white{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .text-gray-700{--tw-text-opacity:1!important;color:rgba(117,117,117,var(--tw-text-opacity))!important}div.extendify-sdk .text-gray-800{--tw-text-opacity:1!important;color:rgba(31,41,55,var(--tw-text-opacity))!important}div.extendify-sdk .text-gray-900{--tw-text-opacity:1!important;color:rgba(30,30,30,var(--tw-text-opacity))!important}div.extendify-sdk .text-extendify-main{--tw-text-opacity:1!important;color:rgba(0,129,96,var(--tw-text-opacity))!important}div.extendify-sdk .text-extendify-gray{--tw-text-opacity:1!important;color:rgba(95,95,95,var(--tw-text-opacity))!important}div.extendify-sdk .text-extendify-black{--tw-text-opacity:1!important;color:rgba(30,30,30,var(--tw-text-opacity))!important}div.extendify-sdk .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}div.extendify-sdk .text-wp-alert-red{--tw-text-opacity:1!important;color:rgba(204,24,24,var(--tw-text-opacity))!important}div.extendify-sdk .hover\:text-white:hover{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .hover\:text-wp-theme-500:hover{color:var(--wp-admin-theme-color)!important}div.extendify-sdk .focus\:text-white:focus{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .focus\:text-blue-500:focus{--tw-text-opacity:1!important;color:rgba(59,130,246,var(--tw-text-opacity))!important}div.extendify-sdk .active\:text-white:active{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .underline{text-decoration:underline!important}div.extendify-sdk .hover\:no-underline:hover,div.extendify-sdk .no-underline{text-decoration:none!important}div.extendify-sdk .placeholder-transparent::-moz-placeholder{color:transparent!important}div.extendify-sdk .placeholder-transparent:-ms-input-placeholder{color:transparent!important}div.extendify-sdk .placeholder-transparent::placeholder{color:transparent!important}div.extendify-sdk .opacity-0{opacity:0!important}div.extendify-sdk .opacity-30{opacity:.3!important}div.extendify-sdk .opacity-50{opacity:.5!important}div.extendify-sdk .opacity-75{opacity:.75!important}div.extendify-sdk .focus\:opacity-100:focus,div.extendify-sdk .hover\:opacity-100:hover,div.extendify-sdk .opacity-100{opacity:1!important}div.extendify-sdk .shadow-modal{--tw-shadow: 0 0 0 1px rgba(0,0,0,0.1),0 3px 15px -3px rgba(0,0,0,0.035),0 0 1px rgba(0,0,0,.05)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}div.extendify-sdk .focus\:outline-none:focus,div.extendify-sdk .outline-none{outline:2px solid transparent!important;outline-offset:2px!important}div.extendify-sdk .focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}div.extendify-sdk .focus\:ring-2:focus,div.extendify-sdk .focus\:ring-wp:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}div.extendify-sdk .focus\:ring-wp:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--wp-admin-border-width-focus) + var(--tw-ring-offset-width)) var(--tw-ring-color)!important}div.extendify-sdk .focus\:ring-wp-theme-500:focus{--tw-ring-color:var(--wp-admin-theme-color)!important}div.extendify-sdk .ring-offset-1{--tw-ring-offset-width:1px!important}div.extendify-sdk .filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/)!important;--tw-brightness:var(--tw-empty,/*!*/ /*!*/)!important;--tw-contrast:var(--tw-empty,/*!*/ /*!*/)!important;--tw-grayscale:var(--tw-empty,/*!*/ /*!*/)!important;--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-invert:var(--tw-empty,/*!*/ /*!*/)!important;--tw-saturate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-sepia:var(--tw-empty,/*!*/ /*!*/)!important;--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}div.extendify-sdk .transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}div.extendify-sdk .transition{transition-duration:.15s!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}div.extendify-sdk .transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}div.extendify-sdk .duration-150{transition-duration:.15s!important}div.extendify-sdk .duration-200{transition-duration:.2s!important}div.extendify-sdk .duration-300{transition-duration:.3s!important}div.extendify-sdk .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}.extendify-sdk{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/)!important;--tw-ring-offset-width:0px!important;--tw-ring-offset-color:transparent!important;--tw-ring-color:var(--wp-admin-theme-color)!important}.extendify-sdk *,.extendify-sdk :after,.extendify-sdk :before{border:0 solid #e5e7eb!important;box-sizing:border-box!important}.extendify-sdk .button-focus:focus{--tw-shadow:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.extendify-sdk .button-focus{outline:2px solid transparent!important;outline-offset:2px!important}.extendify-sdk .button-focus:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--wp-admin-border-width-focus) + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;--tw-ring-color:var(--wp-admin-theme-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.button-extendify-main{--tw-bg-opacity:1!important;background-color:rgba(0,129,96,var(--tw-bg-opacity))!important;cursor:pointer!important;white-space:nowrap!important}.button-extendify-main:hover{--tw-bg-opacity:1!important;background-color:rgba(5,49,44,var(--tw-bg-opacity))!important}.button-extendify-main:active{--tw-bg-opacity:1!important;background-color:rgba(30,30,30,var(--tw-bg-opacity))!important}.button-extendify-main{padding:.375rem .75rem!important}.button-extendify-main,.button-extendify-main:active,.button-extendify-main:focus,.button-extendify-main:hover{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}.button-extendify-main{text-decoration:none!important;transition-duration:.15s!important;transition-duration:.2s!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.extendify-sdk .button-extendify-main:focus{--tw-shadow:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.extendify-sdk .button-extendify-main{outline:2px solid transparent!important;outline-offset:2px!important}.extendify-sdk .button-extendify-main:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--wp-admin-border-width-focus) + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;--tw-ring-color:var(--wp-admin-theme-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.extendify-sdk input.button-extendify-main:focus,.extendify-sdk input.button-focus:focus,.extendify-sdk select.button-extendify-main:focus,.extendify-sdk select.button-focus:focus{--tw-shadow:0 0 #0000!important;border-color:transparent!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;outline:2px solid transparent!important;outline-offset:2px!important}#extendify-search-input:not(:-moz-placeholder-shown)~svg{display:none!important}#extendify-search-input:not(:-ms-input-placeholder)~svg{display:none!important}#extendify-search-input:focus~svg,#extendify-search-input:not(:placeholder-shown)~svg{display:none!important}#extendify-search-input::-webkit-textfield-decoration-container{margin-right:.75rem!important}.extendify-sdk .components-panel__body>.components-panel__body-title{background-color:transparent!important;border-bottom:1px solid #e0e0e0!important}.extendify-sdk .components-modal__header{--tw-border-opacity:1!important;border-bottom-width:1px!important;border-color:rgba(221,221,221,var(--tw-border-opacity))!important}.extendify-special-input:-moz-placeholder-shown~label{--tw-text-opacity:1!important;color:rgba(148,148,148,var(--tw-text-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;top:.375rem!important}.extendify-special-input:-ms-input-placeholder~label{--tw-text-opacity:1!important;color:rgba(148,148,148,var(--tw-text-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;top:.375rem!important}.extendify-special-input:placeholder-shown~label{--tw-text-opacity:1!important;color:rgba(148,148,148,var(--tw-text-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;top:.375rem!important}.extendify-special-input:focus~label{--tw-text-opacity:1!important;color:rgba(0,129,96,var(--tw-text-opacity))!important;font-size:.75rem!important;line-height:1rem!important;top:-1rem!important}.block-editor-block-preview__content .block-editor-block-list__layout.is-root-container>.ext{max-width:none!important}.block-editor-block-list__layout.is-root-container .ext.block-editor-block-list__block{max-width:100%!important}.extendify-sdk .block-editor-block-preview__container{-webkit-animation:extendifyOpacityIn .2s cubic-bezier(.694,0,.335,1) 0ms forwards;animation:extendifyOpacityIn .2s cubic-bezier(.694,0,.335,1) 0ms forwards;opacity:0}.extendify-sdk .is-root-container>[data-align=full],.extendify-sdk .is-root-container>[data-align=full]>.wp-block,.extendify-sdk .is-root-container>[data-block]{margin-bottom:0!important;margin-top:0!important}.editor-styles-wrapper:not(.block-editor-writing-flow)>.is-root-container :where(.wp-block)[data-align=full]{margin-bottom:0!important;margin-top:0!important}@-webkit-keyframes extendifyOpacityIn{0%{opacity:0}to{opacity:1}}@keyframes extendifyOpacityIn{0%{opacity:0}to{opacity:1}}.extendify-sdk .with-light-shadow:after{--tw-shadow:inset 0 0 0 1px rgba(0,0,0,0.08),0 3px 15px -3px rgba(0,0,0,0.025),0 0 1px rgba(0,0,0,.02)!important;border-width:0!important;bottom:0!important;content:""!important;left:0!important;position:absolute!important;right:0!important;top:0!important}.extendify-sdk .with-light-shadow:after,.extendify-sdk .with-light-shadow:hover:after{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.extendify-sdk .with-light-shadow:hover:after{--tw-shadow:inset 0 0 0 1px rgba(0,0,0,0.16),0 3px 15px -3px rgba(0,0,0,0.025),0 0 1px rgba(0,0,0,.02)!important}@media (min-width:600px){div.extendify-sdk .sm\:top-auto{top:auto!important}div.extendify-sdk .sm\:m-0{margin:0!important}div.extendify-sdk .sm\:my-6{margin-bottom:1.5rem!important;margin-top:1.5rem!important}div.extendify-sdk .sm\:mt-64{margin-top:16rem!important}div.extendify-sdk .sm\:mb-8{margin-bottom:2rem!important}div.extendify-sdk .sm\:block{display:block!important}div.extendify-sdk .sm\:flex{display:flex!important}div.extendify-sdk .sm\:hidden{display:none!important}div.extendify-sdk .sm\:h-auto{height:auto!important}div.extendify-sdk .sm\:min-h-0{min-height:0!important}div.extendify-sdk .sm\:w-56{width:14rem!important}div.extendify-sdk .sm\:w-auto{width:auto!important}div.extendify-sdk .sm\:w-full{width:100%!important}div.extendify-sdk .sm\:translate-x-6{--tw-translate-x:1.5rem!important}div.extendify-sdk .sm\:translate-y-5{--tw-translate-y:1.25rem!important}div.extendify-sdk .sm\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(3rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .sm\:border-0{border-width:0!important}div.extendify-sdk .sm\:p-0{padding:0!important}div.extendify-sdk .sm\:px-0{padding-left:0!important;padding-right:0!important}div.extendify-sdk .sm\:px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}div.extendify-sdk .sm\:py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}div.extendify-sdk .sm\:py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}div.extendify-sdk .sm\:py-2\.5{padding-bottom:.625rem!important;padding-top:.625rem!important}div.extendify-sdk .sm\:pt-0{padding-top:0!important}div.extendify-sdk .sm\:pt-6{padding-top:1.5rem!important}div.extendify-sdk .sm\:pr-8{padding-right:2rem!important}div.extendify-sdk .sm\:pr-12{padding-right:3rem!important}div.extendify-sdk .sm\:pb-8{padding-bottom:2rem!important}div.extendify-sdk .sm\:pl-0{padding-left:0!important}div.extendify-sdk .sm\:pl-6{padding-left:1.5rem!important}div.extendify-sdk .sm\:text-2xl{font-size:1.5rem!important;line-height:2rem!important}div.extendify-sdk .sm\:text-3xl{font-size:2rem!important;line-height:2.5rem!important}}@media (min-width:782px){div.extendify-sdk .md\:m-0{margin:0!important}div.extendify-sdk .md\:block{display:block!important}div.extendify-sdk .md\:flex{display:flex!important}div.extendify-sdk .md\:w-6\/12{width:50%!important}div.extendify-sdk .md\:w-7\/12{width:58.333333%!important}div.extendify-sdk .md\:max-w-2xl{max-width:42rem!important}div.extendify-sdk .md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}div.extendify-sdk .md\:rounded-l-md{border-bottom-left-radius:.375rem!important;border-top-left-radius:.375rem!important}div.extendify-sdk .md\:rounded-tr-none{border-top-right-radius:0!important}div.extendify-sdk .md\:leading-3{line-height:.75rem!important}}@media (min-width:1080px){div.extendify-sdk .lg\:static{position:static!important}div.extendify-sdk .lg\:sticky{position:sticky!important}div.extendify-sdk .lg\:mx-0{margin-left:0!important;margin-right:0!important}div.extendify-sdk .lg\:-ml-px{margin-left:-1px!important}div.extendify-sdk .lg\:block{display:block!important}div.extendify-sdk .lg\:flex{display:flex!important}div.extendify-sdk .lg\:h-full{height:100%!important}div.extendify-sdk .lg\:w-64{width:16rem!important}div.extendify-sdk .lg\:flex-row{flex-direction:row!important}div.extendify-sdk .lg\:items-center{align-items:center!important}div.extendify-sdk .lg\:justify-between{justify-content:space-between!important}div.extendify-sdk .lg\:border-t-0{border-top-width:0!important}div.extendify-sdk .lg\:border-b{border-bottom-width:1px!important}div.extendify-sdk .lg\:p-20{padding:5rem!important}div.extendify-sdk .lg\:pt-0{padding-top:0!important}div.extendify-sdk .lg\:pl-px{padding-left:1px!important}}@media (min-width:1280px){div.extendify-sdk .xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
|
1 |
+
div.extendify-sdk .sr-only{clip:rect(0,0,0,0)!important;border-width:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}div.extendify-sdk .focus\:not-sr-only:focus{clip:auto!important;height:auto!important;margin:0!important;overflow:visible!important;padding:0!important;position:static!important;white-space:normal!important;width:auto!important}div.extendify-sdk .pointer-events-none{pointer-events:none!important}div.extendify-sdk .invisible{visibility:hidden!important}div.extendify-sdk .static{position:static!important}div.extendify-sdk .fixed{position:fixed!important}div.extendify-sdk .absolute{position:absolute!important}div.extendify-sdk .relative{position:relative!important}div.extendify-sdk .sticky{position:-webkit-sticky!important;position:sticky!important}div.extendify-sdk .inset-0{bottom:0!important;left:0!important;right:0!important;top:0!important}div.extendify-sdk .top-0{top:0!important}div.extendify-sdk .top-1{top:.25rem!important}div.extendify-sdk .top-2{top:.5rem!important}div.extendify-sdk .-top-3{top:-.75rem!important}div.extendify-sdk .right-0{right:0!important}div.extendify-sdk .right-1{right:.25rem!important}div.extendify-sdk .right-2{right:.5rem!important}div.extendify-sdk .right-2\.5{right:.625rem!important}div.extendify-sdk .bottom-0{bottom:0!important}div.extendify-sdk .left-1{left:.25rem!important}div.extendify-sdk .z-0{z-index:0!important}div.extendify-sdk .z-20{z-index:20!important}div.extendify-sdk .z-30{z-index:30!important}div.extendify-sdk .z-high{z-index:99999!important}div.extendify-sdk .m-0{margin:0!important}div.extendify-sdk .m-8{margin:2rem!important}div.extendify-sdk .m-auto{margin:auto!important}div.extendify-sdk .mx-6{margin-left:1.5rem!important;margin-right:1.5rem!important}div.extendify-sdk .mx-auto{margin-left:auto!important;margin-right:auto!important}div.extendify-sdk .my-0{margin-bottom:0!important;margin-top:0!important}div.extendify-sdk .my-2{margin-bottom:.5rem!important}div.extendify-sdk .mt-2,div.extendify-sdk .my-2{margin-top:.5rem!important}div.extendify-sdk .mt-4{margin-top:1rem!important}div.extendify-sdk .mt-10{margin-top:2.5rem!important}div.extendify-sdk .mt-px{margin-top:1px!important}div.extendify-sdk .-mt-10{margin-top:-2.5rem!important}div.extendify-sdk .mr-1{margin-right:.25rem!important}div.extendify-sdk .mb-1{margin-bottom:.25rem!important}div.extendify-sdk .mb-2{margin-bottom:.5rem!important}div.extendify-sdk .mb-4{margin-bottom:1rem!important}div.extendify-sdk .mb-8{margin-bottom:2rem!important}div.extendify-sdk .mb-10{margin-bottom:2.5rem!important}div.extendify-sdk .-ml-1{margin-left:-.25rem!important}div.extendify-sdk .-ml-2{margin-left:-.5rem!important}div.extendify-sdk .-ml-8{margin-left:-2rem!important}div.extendify-sdk .-ml-px{margin-left:-1px!important}div.extendify-sdk .block{display:block!important}div.extendify-sdk .flex{display:flex!important}div.extendify-sdk .table{display:table!important}div.extendify-sdk .hidden{display:none!important}div.extendify-sdk .h-8{height:2rem!important}div.extendify-sdk .h-20{height:5rem!important}div.extendify-sdk .h-80{height:20rem!important}div.extendify-sdk .h-auto{height:auto!important}div.extendify-sdk .h-full{height:100%!important}div.extendify-sdk .h-screen{height:100vh!important}div.extendify-sdk .min-h-0{min-height:0!important}div.extendify-sdk .min-h-screen{min-height:100vh!important}div.extendify-sdk .w-60{width:15rem!important}div.extendify-sdk .w-72{width:18rem!important}div.extendify-sdk .w-80{width:20rem!important}div.extendify-sdk .w-auto{width:auto!important}div.extendify-sdk .w-full{width:100%!important}div.extendify-sdk .w-screen{width:100vw!important}div.extendify-sdk .min-w-sm{min-width:7rem!important}div.extendify-sdk .max-w-xs{max-width:20rem!important}div.extendify-sdk .max-w-md{max-width:28rem!important}div.extendify-sdk .max-w-lg{max-width:32rem!important}div.extendify-sdk .max-w-xl{max-width:36rem!important}div.extendify-sdk .max-w-full{max-width:100%!important}div.extendify-sdk .max-w-screen-4xl{max-width:1920px!important}div.extendify-sdk .flex-shrink-0{flex-shrink:0!important}div.extendify-sdk .flex-grow{flex-grow:1!important}div.extendify-sdk .transform{--tw-translate-x:0!important;--tw-translate-y:0!important;--tw-rotate:0!important;--tw-skew-x:0!important;--tw-skew-y:0!important;--tw-scale-x:1!important;--tw-scale-y:1!important;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}div.extendify-sdk .-translate-x-1{--tw-translate-x:-0.25rem!important}div.extendify-sdk .translate-y-0{--tw-translate-y:0px!important}div.extendify-sdk .translate-y-4{--tw-translate-y:1rem!important}div.extendify-sdk .-translate-y-20{--tw-translate-y:-5rem!important}div.extendify-sdk .-translate-y-full{--tw-translate-y:-100%!important}div.extendify-sdk .rotate-90{--tw-rotate:90deg!important}div.extendify-sdk .cursor-pointer{cursor:pointer!important}div.extendify-sdk .flex-col{flex-direction:column!important}div.extendify-sdk .items-end{align-items:flex-end!important}div.extendify-sdk .items-center{align-items:center!important}div.extendify-sdk .justify-end{justify-content:flex-end!important}div.extendify-sdk .justify-center{justify-content:center!important}div.extendify-sdk .justify-between{justify-content:space-between!important}div.extendify-sdk .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.25rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.5rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(1rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(3rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(.375rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(.375rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(.5rem*var(--tw-space-y-reverse))!important;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))!important}div.extendify-sdk .space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(1rem*var(--tw-space-y-reverse))!important;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))!important}div.extendify-sdk .space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-bottom:calc(2rem*var(--tw-space-y-reverse))!important;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))!important}div.extendify-sdk .overflow-hidden{overflow:hidden!important}div.extendify-sdk .overflow-y-auto{overflow-y:auto!important}div.extendify-sdk .whitespace-nowrap{white-space:nowrap!important}div.extendify-sdk .rounded-none{border-radius:0!important}div.extendify-sdk .rounded-sm{border-radius:.125rem!important}div.extendify-sdk .rounded{border-radius:.25rem!important}div.extendify-sdk .rounded-md{border-radius:.375rem!important}div.extendify-sdk .rounded-tl-sm{border-top-left-radius:.125rem!important}div.extendify-sdk .rounded-tr-sm{border-top-right-radius:.125rem!important}div.extendify-sdk .rounded-br-sm{border-bottom-right-radius:.125rem!important}div.extendify-sdk .rounded-bl-sm{border-bottom-left-radius:.125rem!important}div.extendify-sdk .border-0{border-width:0!important}div.extendify-sdk .border-2{border-width:2px!important}div.extendify-sdk .border{border-width:1px!important}div.extendify-sdk .border-b-0{border-bottom-width:0!important}div.extendify-sdk .border-b{border-bottom-width:1px!important}div.extendify-sdk .border-black{--tw-border-opacity:1!important;border-color:rgba(0,0,0,var(--tw-border-opacity))!important}div.extendify-sdk .border-gray-900{--tw-border-opacity:1!important;border-color:rgba(30,30,30,var(--tw-border-opacity))!important}div.extendify-sdk .border-extendify-main{--tw-border-opacity:1!important;border-color:rgba(11,74,67,var(--tw-border-opacity))!important}div.extendify-sdk .border-wp-alert-red{--tw-border-opacity:1!important;border-color:rgba(204,24,24,var(--tw-border-opacity))!important}div.extendify-sdk .focus\:border-transparent:focus{border-color:transparent!important}div.extendify-sdk .bg-transparent{background-color:transparent!important}div.extendify-sdk .bg-black{--tw-bg-opacity:1!important;background-color:rgba(0,0,0,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-white{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-gray-100{--tw-bg-opacity:1!important;background-color:rgba(240,240,240,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-gray-900{--tw-bg-opacity:1!important;background-color:rgba(30,30,30,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-main{--tw-bg-opacity:1!important;background-color:rgba(11,74,67,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-alert{--tw-bg-opacity:1!important;background-color:rgba(132,16,16,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-extendify-secondary{--tw-bg-opacity:1!important;background-color:rgba(203,195,245,var(--tw-bg-opacity))!important}div.extendify-sdk .hover\:bg-gray-150:hover{--tw-bg-opacity:1!important;background-color:rgba(234,234,234,var(--tw-bg-opacity))!important}div.extendify-sdk .hover\:bg-extendify-main-dark:hover{--tw-bg-opacity:1!important;background-color:rgba(5,49,44,var(--tw-bg-opacity))!important}div.extendify-sdk .active\:bg-gray-900:active{--tw-bg-opacity:1!important;background-color:rgba(30,30,30,var(--tw-bg-opacity))!important}div.extendify-sdk .bg-opacity-40{--tw-bg-opacity:0.4!important}div.extendify-sdk .bg-clip-padding{background-clip:padding-box!important}div.extendify-sdk .fill-current{fill:currentColor!important}div.extendify-sdk .stroke-current{stroke:currentColor!important}div.extendify-sdk .p-0{padding:0!important}div.extendify-sdk .p-1{padding:.25rem!important}div.extendify-sdk .p-2{padding:.5rem!important}div.extendify-sdk .p-3{padding:.75rem!important}div.extendify-sdk .p-4{padding:1rem!important}div.extendify-sdk .p-6{padding:1.5rem!important}div.extendify-sdk .p-10{padding:2.5rem!important}div.extendify-sdk .p-12{padding:3rem!important}div.extendify-sdk .p-1\.5{padding:.375rem!important}div.extendify-sdk .p-3\.5{padding:.875rem!important}div.extendify-sdk .px-0{padding-left:0!important;padding-right:0!important}div.extendify-sdk .px-1{padding-left:.25rem!important;padding-right:.25rem!important}div.extendify-sdk .px-2{padding-left:.5rem!important;padding-right:.5rem!important}div.extendify-sdk .px-3{padding-left:.75rem!important;padding-right:.75rem!important}div.extendify-sdk .px-4{padding-left:1rem!important;padding-right:1rem!important}div.extendify-sdk .px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}div.extendify-sdk .px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}div.extendify-sdk .py-0{padding-bottom:0!important;padding-top:0!important}div.extendify-sdk .py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}div.extendify-sdk .py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}div.extendify-sdk .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}div.extendify-sdk .py-4{padding-bottom:1rem!important;padding-top:1rem!important}div.extendify-sdk .py-2\.5{padding-bottom:.625rem!important;padding-top:.625rem!important}div.extendify-sdk .pt-0{padding-top:0!important}div.extendify-sdk .pt-2{padding-top:.5rem!important}div.extendify-sdk .pt-4{padding-top:1rem!important}div.extendify-sdk .pt-px{padding-top:1px!important}div.extendify-sdk .pt-0\.5{padding-top:.125rem!important}div.extendify-sdk .pr-3{padding-right:.75rem!important}div.extendify-sdk .pb-2{padding-bottom:.5rem!important}div.extendify-sdk .pb-4{padding-bottom:1rem!important}div.extendify-sdk .pb-6{padding-bottom:1.5rem!important}div.extendify-sdk .pb-20{padding-bottom:5rem!important}div.extendify-sdk .pb-32{padding-bottom:8rem!important}div.extendify-sdk .pb-40{padding-bottom:10rem!important}div.extendify-sdk .pl-0{padding-left:0!important}div.extendify-sdk .pl-5{padding-left:1.25rem!important}div.extendify-sdk .pl-6{padding-left:1.5rem!important}div.extendify-sdk .pl-8{padding-left:2rem!important}div.extendify-sdk .pl-0\.5{padding-left:.125rem!important}div.extendify-sdk .text-left{text-align:left!important}div.extendify-sdk .text-center{text-align:center!important}div.extendify-sdk .text-xs{font-size:.75rem!important;line-height:1rem!important}div.extendify-sdk .text-sm{font-size:.875rem!important;line-height:1.25rem!important}div.extendify-sdk .text-base{font-size:1rem!important;line-height:1.5rem!important}div.extendify-sdk .text-lg{font-size:1.125rem!important;line-height:1.75rem!important}div.extendify-sdk .text-xl{font-size:1.25rem!important;line-height:1.75rem!important}div.extendify-sdk .font-light{font-weight:300!important}div.extendify-sdk .font-medium{font-weight:500!important}div.extendify-sdk .font-semibold{font-weight:600!important}div.extendify-sdk .font-bold{font-weight:700!important}div.extendify-sdk .uppercase{text-transform:uppercase!important}div.extendify-sdk .leading-none{line-height:1!important}div.extendify-sdk .leading-extra-tight{line-height:.5!important}div.extendify-sdk .text-black{--tw-text-opacity:1!important;color:rgba(0,0,0,var(--tw-text-opacity))!important}div.extendify-sdk .text-white{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .text-gray-700{--tw-text-opacity:1!important;color:rgba(117,117,117,var(--tw-text-opacity))!important}div.extendify-sdk .text-gray-800{--tw-text-opacity:1!important;color:rgba(31,41,55,var(--tw-text-opacity))!important}div.extendify-sdk .text-gray-900{--tw-text-opacity:1!important;color:rgba(30,30,30,var(--tw-text-opacity))!important}div.extendify-sdk .text-extendify-main{--tw-text-opacity:1!important;color:rgba(11,74,67,var(--tw-text-opacity))!important}div.extendify-sdk .text-extendify-gray{--tw-text-opacity:1!important;color:rgba(95,95,95,var(--tw-text-opacity))!important}div.extendify-sdk .text-extendify-black{--tw-text-opacity:1!important;color:rgba(30,30,30,var(--tw-text-opacity))!important}div.extendify-sdk .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}div.extendify-sdk .text-wp-alert-red{--tw-text-opacity:1!important;color:rgba(204,24,24,var(--tw-text-opacity))!important}div.extendify-sdk .hover\:text-white:hover{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .hover\:text-wp-theme-500:hover{color:var(--wp-admin-theme-color)!important}div.extendify-sdk .focus\:text-white:focus{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .focus\:text-blue-500:focus{--tw-text-opacity:1!important;color:rgba(59,130,246,var(--tw-text-opacity))!important}div.extendify-sdk .active\:text-white:active{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}div.extendify-sdk .underline{text-decoration:underline!important}div.extendify-sdk .hover\:no-underline:hover,div.extendify-sdk .no-underline{text-decoration:none!important}div.extendify-sdk .placeholder-transparent::-moz-placeholder{color:transparent!important}div.extendify-sdk .placeholder-transparent:-ms-input-placeholder{color:transparent!important}div.extendify-sdk .placeholder-transparent::placeholder{color:transparent!important}div.extendify-sdk .opacity-0{opacity:0!important}div.extendify-sdk .opacity-30{opacity:.3!important}div.extendify-sdk .opacity-50{opacity:.5!important}div.extendify-sdk .opacity-75{opacity:.75!important}div.extendify-sdk .focus\:opacity-100:focus,div.extendify-sdk .hover\:opacity-100:hover,div.extendify-sdk .opacity-100{opacity:1!important}div.extendify-sdk .shadow-modal{--tw-shadow: 0 0 0 1px rgba(0,0,0,.1),0 3px 15px -3px rgba(0,0,0,.035),0 0 1px rgba(0,0,0,.05)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}div.extendify-sdk .focus\:outline-none:focus,div.extendify-sdk .outline-none{outline:2px solid transparent!important;outline-offset:2px!important}div.extendify-sdk .focus\:ring-wp:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--wp-admin-border-width-focus) + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}div.extendify-sdk .focus\:ring-wp-theme-500:focus{--tw-ring-color:var(--wp-admin-theme-color)!important}div.extendify-sdk .filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/)!important;--tw-brightness:var(--tw-empty,/*!*/ /*!*/)!important;--tw-contrast:var(--tw-empty,/*!*/ /*!*/)!important;--tw-grayscale:var(--tw-empty,/*!*/ /*!*/)!important;--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-invert:var(--tw-empty,/*!*/ /*!*/)!important;--tw-saturate:var(--tw-empty,/*!*/ /*!*/)!important;--tw-sepia:var(--tw-empty,/*!*/ /*!*/)!important;--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}div.extendify-sdk .transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}div.extendify-sdk .transition{transition-duration:.15s!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}div.extendify-sdk .transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}div.extendify-sdk .duration-200{transition-duration:.2s!important}div.extendify-sdk .duration-300{transition-duration:.3s!important}div.extendify-sdk .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)!important}.extendify-sdk{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/)!important;--tw-ring-offset-width:0px!important;--tw-ring-offset-color:transparent!important;--tw-ring-color:var(--wp-admin-theme-color)!important}.extendify-sdk *,.extendify-sdk :after,.extendify-sdk :before{border:0 solid #e5e7eb!important;box-sizing:border-box!important}.extendify-sdk .button-focus:focus{--tw-shadow:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.extendify-sdk .button-focus{outline:2px solid transparent!important;outline-offset:2px!important}.extendify-sdk .button-focus:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--wp-admin-border-width-focus) + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;--tw-ring-color:var(--wp-admin-theme-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.button-extendify-main{--tw-bg-opacity:1!important;background-color:rgba(11,74,67,var(--tw-bg-opacity))!important;cursor:pointer!important;white-space:nowrap!important}.button-extendify-main:hover{--tw-bg-opacity:1!important;background-color:rgba(5,49,44,var(--tw-bg-opacity))!important}.button-extendify-main:active{--tw-bg-opacity:1!important;background-color:rgba(30,30,30,var(--tw-bg-opacity))!important}.button-extendify-main{padding:.375rem .75rem!important}.button-extendify-main,.button-extendify-main:active,.button-extendify-main:focus,.button-extendify-main:hover{--tw-text-opacity:1!important;color:rgba(255,255,255,var(--tw-text-opacity))!important}.button-extendify-main{text-decoration:none!important;transition-duration:.15s!important;transition-duration:.2s!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.extendify-sdk .button-extendify-main:focus{--tw-shadow:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.extendify-sdk .button-extendify-main{outline:2px solid transparent!important;outline-offset:2px!important}.extendify-sdk .button-extendify-main:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--wp-admin-border-width-focus) + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;--tw-ring-color:var(--wp-admin-theme-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.extendify-sdk input.button-extendify-main:focus,.extendify-sdk input.button-focus:focus,.extendify-sdk select.button-extendify-main:focus,.extendify-sdk select.button-focus:focus{--tw-shadow:0 0 #0000!important;border-color:transparent!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;outline:2px solid transparent!important;outline-offset:2px!important}#extendify-search-input:not(:-moz-placeholder-shown)~svg{display:none!important}#extendify-search-input:not(:-ms-input-placeholder)~svg{display:none!important}#extendify-search-input:focus~svg,#extendify-search-input:not(:placeholder-shown)~svg{display:none!important}#extendify-search-input::-webkit-textfield-decoration-container{margin-right:.75rem!important}.extendify-sdk .components-panel__body>.components-panel__body-title{background-color:transparent!important;border-bottom:1px solid #e0e0e0!important}.extendify-sdk .components-modal__header{--tw-border-opacity:1!important;border-bottom-width:1px!important;border-color:rgba(221,221,221,var(--tw-border-opacity))!important}.extendify-special-input:-moz-placeholder-shown~label{--tw-text-opacity:1!important;color:rgba(148,148,148,var(--tw-text-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;top:.375rem!important}.extendify-special-input:-ms-input-placeholder~label{--tw-text-opacity:1!important;color:rgba(148,148,148,var(--tw-text-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;top:.375rem!important}.extendify-special-input:placeholder-shown~label{--tw-text-opacity:1!important;color:rgba(148,148,148,var(--tw-text-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;top:.375rem!important}.extendify-special-input:focus~label{--tw-text-opacity:1!important;color:rgba(11,74,67,var(--tw-text-opacity))!important;font-size:.75rem!important;line-height:1rem!important;top:-1rem!important}.block-editor-block-preview__content .block-editor-block-list__layout.is-root-container>.ext{max-width:none!important}.block-editor-block-list__layout.is-root-container .ext.block-editor-block-list__block{max-width:100%!important}.extendify-sdk .block-editor-block-preview__container{-webkit-animation:extendifyOpacityIn .2s cubic-bezier(.694,0,.335,1) 0ms forwards;animation:extendifyOpacityIn .2s cubic-bezier(.694,0,.335,1) 0ms forwards;opacity:0}.extendify-sdk .is-root-container>[data-align=full],.extendify-sdk .is-root-container>[data-align=full]>.wp-block,.extendify-sdk .is-root-container>[data-block]{margin-bottom:0!important;margin-top:0!important}.editor-styles-wrapper:not(.block-editor-writing-flow)>.is-root-container :where(.wp-block)[data-align=full]{margin-bottom:0!important;margin-top:0!important}@-webkit-keyframes extendifyOpacityIn{0%{opacity:0}to{opacity:1}}@keyframes extendifyOpacityIn{0%{opacity:0}to{opacity:1}}.extendify-sdk .with-light-shadow:after{--tw-shadow:inset 0 0 0 1px rgba(0,0,0,.1),0 3px 15px -3px rgba(0,0,0,.025),0 0 1px rgba(0,0,0,.02)!important;border-width:0!important;bottom:0!important;content:""!important;left:0!important;position:absolute!important;right:0!important;top:0!important}.extendify-sdk .with-light-shadow:after,.extendify-sdk .with-light-shadow:hover:after{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.extendify-sdk .with-light-shadow:hover:after{--tw-shadow:inset 0 0 0 1px rgba(0,0,0,.2),0 3px 15px -3px rgba(0,0,0,.025),0 0 1px rgba(0,0,0,.02)!important}.components-panel__body.ext-type-control .components-panel__body-toggle{padding-left:0!important;padding-right:0!important}.components-panel__body.ext-type-control .components-panel__body-title{border-bottom-width:0!important;margin:0!important}.components-panel__body.ext-type-control .components-panel__body-title .components-button{--tw-text-opacity:1!important;border-bottom-width:0!important;color:rgba(95,95,95,var(--tw-text-opacity))!important;font-size:11px!important;font-weight:500!important;margin:0!important;padding-bottom:.5rem!important;padding-top:.5rem!important;text-transform:uppercase!important}.components-panel__body.ext-type-control .components-button .components-panel__arrow{--tw-text-opacity:1!important;color:rgba(95,95,95,var(--tw-text-opacity))!important;right:0!important}@media (min-width:600px){div.extendify-sdk .sm\:mx-0{margin-left:0!important;margin-right:0!important}div.extendify-sdk .sm\:mt-0{margin-top:0!important}div.extendify-sdk .sm\:mt-64{margin-top:16rem!important}div.extendify-sdk .sm\:block{display:block!important}div.extendify-sdk .sm\:flex{display:flex!important}div.extendify-sdk .sm\:h-auto{height:auto!important}div.extendify-sdk .sm\:w-56{width:14rem!important}div.extendify-sdk .sm\:w-auto{width:auto!important}div.extendify-sdk .sm\:translate-x-6{--tw-translate-x:1.5rem!important}div.extendify-sdk .sm\:translate-y-5{--tw-translate-y:1.25rem!important}div.extendify-sdk .sm\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0!important;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)))!important;margin-right:calc(3rem*var(--tw-space-x-reverse))!important}div.extendify-sdk .sm\:p-0{padding:0!important}div.extendify-sdk .sm\:pt-0{padding-top:0!important}div.extendify-sdk .sm\:pr-8{padding-right:2rem!important}div.extendify-sdk .sm\:pr-12{padding-right:3rem!important}div.extendify-sdk .sm\:pl-0{padding-left:0!important}div.extendify-sdk .sm\:pl-6{padding-left:1.5rem!important}div.extendify-sdk .sm\:pl-8{padding-left:2rem!important}}@media (min-width:782px){div.extendify-sdk .md\:m-0{margin:0!important}div.extendify-sdk .md\:ml-2{margin-left:.5rem!important}div.extendify-sdk .md\:block{display:block!important}div.extendify-sdk .md\:flex{display:flex!important}div.extendify-sdk .md\:w-6\/12{width:50%!important}div.extendify-sdk .md\:w-7\/12{width:58.333333%!important}div.extendify-sdk .md\:max-w-2xl{max-width:42rem!important}div.extendify-sdk .md\:rounded-l-md{border-bottom-left-radius:.375rem!important;border-top-left-radius:.375rem!important}div.extendify-sdk .md\:rounded-tr-none{border-top-right-radius:0!important}div.extendify-sdk .md\:pl-36{padding-left:9rem!important}div.extendify-sdk .md\:leading-3{line-height:.75rem!important}}@media (min-width:1080px){div.extendify-sdk .lg\:static{position:static!important}div.extendify-sdk .lg\:absolute{position:absolute!important}div.extendify-sdk .lg\:block{display:block!important}div.extendify-sdk .lg\:flex{display:flex!important}div.extendify-sdk .lg\:h-full{height:100%!important}div.extendify-sdk .lg\:w-72{width:18rem!important}div.extendify-sdk .lg\:overflow-hidden{overflow:hidden!important}div.extendify-sdk .lg\:p-16{padding:4rem!important}}
|
redux-core/extendify-sdk/public/build/extendify-sdk.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/*! For license information please see extendify-sdk.js.LICENSE.txt */
|
2 |
-
(()=>{var e,t={135:(e,t,n)=>{e.exports=n(248)},206:(e,t,n)=>{e.exports=n(57)},387:(e,t,n)=>{"use strict";var r=n(485),i=n(570),o=n(940),s=n(581),a=n(574),l=n(845),c=n(338),u=n(524);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers,p=e.responseType;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+x)}var y=a(e.baseURL,e.url);function v(){if(h){var r="getAllResponseHeaders"in h?l(h.getAllResponseHeaders()):null,o={data:p&&"text"!==p&&"json"!==p?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};i(t,n,o),h=null}}if(h.open(e.method.toUpperCase(),s(y,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||c(y))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;g&&(f[e.xsrfHeaderName]=g)}"setRequestHeader"in h&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),p&&"json"!==p&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},57:(e,t,n)=>{"use strict";var r=n(485),i=n(875),o=n(29),s=n(941);function a(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var l=a(n(141));l.Axios=o,l.create=function(e){return a(s(l.defaults,e))},l.Cancel=n(132),l.CancelToken=n(603),l.isCancel=n(475),l.all=function(e){return Promise.all(e)},l.spread=n(739),l.isAxiosError=n(835),e.exports=l,e.exports.default=l},132:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},603:(e,t,n)=>{"use strict";var r=n(132);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},475:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},29:(e,t,n)=>{"use strict";var r=n(485),i=n(581),o=n(96),s=n(9),a=n(941),l=n(144),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var u=[s,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(o),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{i=s(d)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},u.prototype.getUri=function(e){return e=a(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=u},96:(e,t,n)=>{"use strict";var r=n(485);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},574:(e,t,n)=>{"use strict";var r=n(642),i=n(288);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},524:(e,t,n)=>{"use strict";var r=n(953);e.exports=function(e,t,n,i,o){var s=new Error(e);return r(s,t,n,i,o)}},9:(e,t,n)=>{"use strict";var r=n(485),i=n(212),o=n(475),s=n(141);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(a(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},953:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},941:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(o,c),r.forEach(s,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(void 0,t[i])})),r.forEach(a,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=i.concat(o).concat(s).concat(a),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,c),n}},570:(e,t,n)=>{"use strict";var r=n(524);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},212:(e,t,n)=>{"use strict";var r=n(485),i=n(141);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},141:(e,t,n)=>{"use strict";var r=n(61),i=n(485),o=n(446),s=n(953),a={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(c=n(387)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||r&&i.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){u.headers[e]=i.merge(a)})),e.exports=u},875:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},581:(e,t,n)=>{"use strict";var r=n(485);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},288:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},940:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},642:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},835:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},338:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},446:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},845:(e,t,n)=>{"use strict";var r=n(485),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},739:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},144:(e,t,n)=>{"use strict";var r=n(843),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={},s=r.version.split(".");function a(e,t){for(var n=t?t.split("."):s,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(e,t,n){var i=t&&a(t);function s(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(s(r," has been removed in "+t));return i&&!o[r]&&(o[r]=!0,console.warn(s(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],l=void 0===a||s(a,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},485:(e,t,n)=>{"use strict";var r=n(875),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:l,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},363:(e,t,n)=>{"use strict";const r=wp.element;var i=n(995),o=n.n(i);function s(e){let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,o={setState:r,getState:i,subscribe:(e,r,o)=>r||o?((e,r=i,o=Object.is)=>{let s=r(t);function a(){const n=r(t);if(!o(s,n)){const t=s;e(s=n,t)}}return n.add(a),()=>n.delete(a)})(e,r,o):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,o),o}const a="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?i.useEffect:i.useLayoutEffect;function l(e){const t="function"==typeof e?s(e):e,n=(e=t.getState,n=Object.is)=>{const[,r]=(0,i.useReducer)((e=>e+1),0),o=t.getState(),s=(0,i.useRef)(o),l=(0,i.useRef)(e),c=(0,i.useRef)(n),u=(0,i.useRef)(!1),d=(0,i.useRef)();let f;void 0===d.current&&(d.current=e(o));let p=!1;(s.current!==o||l.current!==e||c.current!==n||u.current)&&(f=e(o),p=!n(d.current,f)),a((()=>{p&&(d.current=f),s.current=o,l.current=e,c.current=n,u.current=!1}));const h=(0,i.useRef)(o);return a((()=>{const e=()=>{try{const e=t.getState(),n=l.current(e);c.current(d.current,n)||(s.current=e,d.current=n,r())}catch(e){u.current=!0,r()}},n=t.subscribe(e);return t.getState()!==h.current&&e(),n}),[]),p?f:d.current};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n}var c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t)=>{for(var n in t||(t={}))d.call(t,n)&&p(e,n,t[n]);if(u)for(var n of u(t))f.call(t,n)&&p(e,n,t[n]);return e};const m=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>m(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>m(t)(e)}}},x=(e,t)=>(n,r,i)=>{const{name:o,getStorage:s=(()=>localStorage),serialize:a=JSON.stringify,deserialize:l=JSON.parse,blacklist:c,whitelist:u,onRehydrateStorage:d,version:f=0,migrate:p,merge:x=((e,t)=>h(h({},t),e))}=t||{};let y;try{y=s()}catch(e){}if(!y)return e(((...e)=>{console.warn(`Persist middleware: unable to update ${o}, the given storage is currently unavailable.`),n(...e)}),r,i);const v=m(a),g=()=>{const e=h({},r());let t;u&&Object.keys(e).forEach((t=>{!u.includes(t)&&delete e[t]})),c&&c.forEach((t=>delete e[t]));const n=v({state:e,version:f}).then((e=>y.setItem(o,e))).catch((e=>{t=e}));if(t)throw t;return n},b=i.setState;i.setState=(e,t)=>{b(e,t),g()};const w=e(((...e)=>{n(...e),g()}),r,i);let j;const k=(null==d?void 0:d(r()))||void 0;return m(y.getItem.bind(y))(o).then((e=>{if(e)return l(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===f)return e.state;if(p)return p(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>(j=x(e,w),n(j,!0),g()))).then((()=>{null==k||k(j,void 0)})).catch((e=>{null==k||k(void 0,e)})),j||w};var y="pattern",v=12;const g=wp.blocks;var b=n(135),w=n.n(b),j=n(206),k=n.n(j)().create({baseURL:window.extendifySdkData.root,headers:{"X-WP-Nonce":window.extendifySdkData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify":!0}});function S(e){return Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}k.interceptors.response.use((function(e){return function(e){return Object.prototype.hasOwnProperty.call(e,"soft_error")&&window.dispatchEvent(new CustomEvent("extendify-sdk::softerror-encountered",{detail:e.soft_error,bubbles:!0})),e}(S(e))}),(function(e){return function(e){if(e.response)return console.error(e.response),Promise.reject(S(e.response))}(e)})),k.interceptors.request.use((function(e){return function(e){return e.headers["X-Extendify-Dev-Mode"]=window.location.search.indexOf("DEVMODE")>-1,e.headers["X-Extendify-Local-Mode"]=window.location.search.indexOf("LOCALMODE")>-1,e}(function(e){return e.data&&(e.data.remaining_imports=B.getState().remainingImports(),e.data.entry_point=B.getState().entryPoint,e.data.total_imports=B.getState().imports),e}(e))}),(function(e){return e}));var O=function(){return k.get("user")},_=function(e,t){var n=new FormData;return n.append("email",e),n.append("key",t),k.post("login",n,{headers:{"Content-Type":"multipart/form-data"}})},C=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),k.post("user",t,{headers:{"Content-Type":"multipart/form-data"}})},E=function(e){var t=new FormData;return t.append("email",e),k.post("register-mailing-list",t,{headers:{"Content-Type":"multipart/form-data"}})};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){I(o,r,i,s,a,"next",e)}function a(e){I(o,r,i,s,a,"throw",e)}s(void 0)}))}}var R,F,D={getItem:(F=L(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return F.apply(this,arguments)}),setItem:(R=L(w().mark((function e(t,n){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(e,t){return R.apply(this,arguments)})},B=l(x((function(e,t){return{email:"",apiKey:"",imports:0,uuid:"",sdkPartner:"",registration:{email:""},noticesDismissedAt:{welcome:""},allowedImports:0,entryPoint:"not-set",enabled:null===window.extendifySdkData.sitesettings||(null===(n=window.extendifySdkData)||void 0===n||null===(r=n.sitesettings)||void 0===r||null===(i=r.state)||void 0===i?void 0:i.enabled),canInstallPlugins:!1,canActivatePlugins:!1,preferredOptions:{taxonomies:{},type:"",search:""},preferredOptionsHistory:{siteType:[]},incrementImports:function(){return e({imports:t().imports+1})},canImport:function(){return!!t().apiKey||Number(t().imports)<Number(t().allowedImports)},remainingImports:function(){if(t().apiKey)return"unlimited";var e=Number(t().allowedImports)-Number(t().imports);return e>0?e:0},updateSiteType:function(n){if(t().updatePreferredOption("tax_categories",n),n&&"Unknown"!==n){var r=new Set([n].concat(T(t().preferredOptionsHistory.siteType)));e({preferredOptionsHistory:Object.assign({},t().preferredOptionsHistory,{siteType:T(r).slice(0,3)})})}},updatePreferredOption:function(n,r){var i,o,s;Object.prototype.hasOwnProperty.call(t().preferredOptions,n)||(r=Object.assign({},null!==(o=null===(s=t().preferredOptions)||void 0===s?void 0:s.taxonomies)&&void 0!==o?o:{},P({},n,r)),n="taxonomies");var a="type"==n&&r!==(null===(i=t().preferredOptions)||void 0===i?void 0:i.type);e({preferredOptions:A({},Object.assign({},t().preferredOptions,P({},n,r),a?{taxonomies:{}}:{}))})}};var n,r,i}),{name:"extendify-user",getStorage:function(){return D}}));function U(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V=l(x((function(e,t){return{taxonomies:{},openedTaxonomies:[],setTaxonomies:function(t){return e({taxonomies:t})},toggleOpenedTaxonomy:function(n,r){var i=t().openedTaxonomies;e({openedTaxonomies:r?[].concat(U(i),[n]):U(i.filter((function(e){return e!=n})))})}}}),{name:"extendify-taxonomies"}));function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Z,G,K=l((function(e,t){return{templates:[],skipNextFetch:!1,fetchToken:null,activeTemplate:{},activeTemplateBlocks:{},taxonomyDefaultState:{},nextPage:"",searchParams:{taxonomies:{},type:y},initTemplateData:function(){e({activeTemplate:{}}),t().setupDefaultTaxonomies(),t().updateType(Y.getState().currentType)},removeTemplates:function(){return e({nextPage:"",templates:[]})},appendTemplates:function(n){return e({templates:W(new Map([].concat(W(t().templates),W(n)).map((function(e){return[e.id,e]}))).values())})},setupDefaultTaxonomies:function(){var n,r,i,o,s=V.getState().taxonomies,a=Object.entries(s).reduce((function(e,t){return e[t[0]]=function(e){var t,n,r;return"tax_categories"===e?"Unknown":null!==(t=null===(n=V.getState())||void 0===n||null===(r=n.taxonomies[e][0])||void 0===r?void 0:r.term)&&void 0!==t?t:void 0}(t[0]),e}),{}),l={};a=Object.assign({},a,null!==(n=null===(r=B.getState().preferredOptions)||void 0===r?void 0:r.taxonomies)&&void 0!==n?n:{},null!==(i=null===(o=Y.getState())||void 0===o?void 0:o.currentTaxonomies)&&void 0!==i?i:{}),l.taxonomies=Object.assign({},a),e({taxonomyDefaultState:a,searchParams:H({},Object.assign(t().searchParams,l))})},setActive:function(t){var n;e({activeTemplate:t}),Object.keys(t).length>0&&Y.setState({currentPage:"single"}),null!=t&&null!==(n=t.fields)&&void 0!==n&&n.code&&e({activeTemplateBlocks:(0,g.rawHandler)({HTML:t.fields.code})})},updateTaxonomies:function(e){var n,r,i={};(i.taxonomies=Object.assign({},t().searchParams.taxonomies,e),null!=i&&null!==(n=i.taxonomies)&&void 0!==n&&n.tax_categories)&&B.getState().updatePreferredOption("tax_categories",null==i||null===(r=i.taxonomies)||void 0===r?void 0:r.tax_categories);Y.getState().updateCurrentTaxonomies(null==i?void 0:i.taxonomies),t().updateSearchParams(i)},updateType:function(e){Y.getState().updateCurrentType(e),t().updateSearchParams({type:e})},updateSearchParams:function(n){null!=n&&n.taxonomies&&!Object.keys(n.taxonomies).length&&(n.taxonomies=t().taxonomyDefaultState);var r=Object.assign({},t().searchParams,n);JSON.stringify(r)!==JSON.stringify(t().searchParams)&&e({templates:[],nextPage:"",searchParams:r})}}})),Y=l(x((function(e){return{open:!1,metaData:{},currentPage:"main",currentTaxonomies:{},currentType:y,settingsModal:!1,updateCurrentTaxonomies:function(t){return e({currentTaxonomies:Object.assign({},t)})},updateCurrentType:function(t){return e({currentType:t})},setOpen:function(t){e({open:t}),t&&K.getState().removeTemplates()}}}),{name:"extendify-global-state"}));function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X.apply(this,arguments)}function Q(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function te(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function ne(e,t){if(e in t){for(var n=t[e],r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return"function"==typeof n?n.apply(void 0,i):n}var s=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(s,ne),s}function re(e){var t=e.props,n=e.slot,r=e.defaultTag,i=e.features,o=e.visible,s=void 0===o||o,a=e.name;if(s)return ie(t,n,r,a);var l=null!=i?i:Z.None;if(l&Z.Static){var c=t.static,u=void 0!==c&&c,d=Q(t,["static"]);if(u)return ie(d,n,r,a)}if(l&Z.RenderStrategy){var f,p=t.unmount,h=void 0===p||p,m=Q(t,["unmount"]);return ne(h?G.Unmount:G.Hidden,((f={})[G.Unmount]=function(){return null},f[G.Hidden]=function(){return ie(X({},m,{hidden:!0,style:{display:"none"}}),n,r,a)},f))}return ie(t,n,r,a)}function ie(e,t,n,r){var o;void 0===t&&(t={});var s=se(e,["unmount","static"]),a=s.as,l=void 0===a?n:a,c=s.children,u=s.refName,d=void 0===u?"ref":u,f=Q(s,["as","children","refName"]),p=void 0!==e.ref?((o={})[d]=e.ref,o):{},h="function"==typeof c?c(t):c;if(f.className&&"function"==typeof f.className&&(f.className=f.className(t)),l===i.Fragment&&Object.keys(f).length>0){if(!(0,i.isValidElement)(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+r+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(f).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,i.cloneElement)(h,Object.assign({},function(e,t,n){for(var r,i=Object.assign({},e),o=function(){var n,o=r.value;void 0!==e[o]&&void 0!==t[o]&&Object.assign(i,((n={})[o]=function(n){n.defaultPrevented||e[o](n),n.defaultPrevented||t[o](n)},n))},s=te(n);!(r=s()).done;)o();return i}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(se(f,["ref"])),h.props,["onClick"]),p))}return(0,i.createElement)(l,Object.assign({},se(f,["ref"]),l!==i.Fragment&&p),h)}function oe(e){var t;return Object.assign((0,i.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function se(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),i=te(t);!(n=i()).done;){var o=n.value;o in r&&delete r[o]}return r}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(Z||(Z={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(G||(G={}));var ae="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,le={serverHandoffComplete:!1};function ce(){var e=(0,i.useState)(le.serverHandoffComplete),t=e[0],n=e[1];return(0,i.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,i.useEffect)((function(){!1===le.serverHandoffComplete&&(le.serverHandoffComplete=!0)}),[]),t}var ue=0;function de(){return++ue}function fe(){var e=ce(),t=(0,i.useState)(e?de:null),n=t[0],r=t[1];return ae((function(){null===n&&r(de())}),[n]),null!=n?""+n:void 0}function pe(){var e=(0,i.useRef)(!1);return(0,i.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var he,me,xe=(0,i.createContext)(null);function ye(){return(0,i.useContext)(xe)}function ve(e){var t=e.value,n=e.children;return o().createElement(xe.Provider,{value:t},n)}function ge(){var e=(0,i.useRef)(!0);return(0,i.useEffect)((function(){e.current=!1}),[]),e.current}function be(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=te(e.splice(0));!(t=n()).done;){var r=t.value;r()}}};return t}function we(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function je(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}function ke(e,t,n,r,i,o){var s=be(),a=void 0!==o?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(o):function(){};return je.apply(void 0,[e].concat(i)),we.apply(void 0,[e].concat(t,n)),s.nextFrame((function(){je.apply(void 0,[e].concat(n)),we.apply(void 0,[e].concat(r)),s.add(function(e,t){var n=be();if(!e)return n.dispose;var r=getComputedStyle(e),i=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),o=i[0],s=i[1];return 0!==o?n.setTimeout((function(){t(me.Finished)}),o+s):t(me.Finished),n.add((function(){return t(me.Cancelled)})),n.dispose}(e,(function(n){return je.apply(void 0,[e].concat(r,t)),we.apply(void 0,[e].concat(i)),a(n)})))})),s.add((function(){return je.apply(void 0,[e].concat(t,n,r,i))})),s.add((function(){return a(me.Cancelled)})),s.dispose}function Se(e){return void 0===e&&(e=""),(0,i.useMemo)((function(){return e.split(" ").filter((function(e){return e.trim().length>1}))}),[e])}xe.displayName="OpenClosedContext",function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(he||(he={})),function(e){e.Finished="finished",e.Cancelled="cancelled"}(me||(me={}));var Oe,_e=(0,i.createContext)(null);_e.displayName="TransitionContext",function(e){e.Visible="visible",e.Hidden="hidden"}(Oe||(Oe={}));var Ce=(0,i.createContext)(null);function Ee(e){return"children"in e?Ee(e.children):e.current.filter((function(e){return e.state===Oe.Visible})).length>0}function Ne(e){var t=(0,i.useRef)(e),n=(0,i.useRef)([]),r=pe();(0,i.useEffect)((function(){t.current=e}),[e]);var o=(0,i.useCallback)((function(e,i){var o;void 0===i&&(i=G.Hidden);var s=n.current.findIndex((function(t){return t.id===e}));-1!==s&&(ne(i,((o={})[G.Unmount]=function(){n.current.splice(s,1)},o[G.Hidden]=function(){n.current[s].state=Oe.Hidden},o)),!Ee(n)&&r.current&&(null==t.current||t.current()))}),[t,r,n]),s=(0,i.useCallback)((function(e){var t=n.current.find((function(t){return t.id===e}));return t?t.state!==Oe.Visible&&(t.state=Oe.Visible):n.current.push({id:e,state:Oe.Visible}),function(){return o(e,G.Unmount)}}),[n,o]);return(0,i.useMemo)((function(){return{children:n,register:s,unregister:o}}),[s,o,n])}function Ae(){}Ce.displayName="NestingContext";var Pe=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Te(e){for(var t,n={},r=te(Pe);!(t=r()).done;){var i,o=t.value;n[o]=null!=(i=e[o])?i:Ae}return n}var Me,Ie=Z.RenderStrategy;function Le(e){var t,n=e.beforeEnter,r=e.afterEnter,s=e.beforeLeave,a=e.afterLeave,l=e.enter,c=e.enterFrom,u=e.enterTo,d=e.entered,f=e.leave,p=e.leaveFrom,h=e.leaveTo,m=Q(e,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"]),x=(0,i.useRef)(null),y=(0,i.useState)(Oe.Visible),v=y[0],g=y[1],b=m.unmount?G.Unmount:G.Hidden,w=function(){var e=(0,i.useContext)(_e);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),j=w.show,k=w.appear,S=function(){var e=(0,i.useContext)(Ce);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),O=S.register,_=S.unregister,C=ge(),E=fe(),N=(0,i.useRef)(!1),A=Ne((function(){N.current||(g(Oe.Hidden),_(E),D.current.afterLeave())}));ae((function(){if(E)return O(E)}),[O,E]),ae((function(){var e;b===G.Hidden&&E&&(j&&v!==Oe.Visible?g(Oe.Visible):ne(v,((e={})[Oe.Hidden]=function(){return _(E)},e[Oe.Visible]=function(){return O(E)},e)))}),[v,E,O,_,j,b]);var P=Se(l),T=Se(c),M=Se(u),I=Se(d),L=Se(f),R=Se(p),F=Se(h),D=function(e){var t=(0,i.useRef)(Te(e));return(0,i.useEffect)((function(){t.current=Te(e)}),[e]),t}({beforeEnter:n,afterEnter:r,beforeLeave:s,afterLeave:a}),B=ce();(0,i.useEffect)((function(){if(B&&v===Oe.Visible&&null===x.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[x,v,B]);var U=C&&!k;ae((function(){var e=x.current;if(e&&!U)return N.current=!0,j&&D.current.beforeEnter(),j||D.current.beforeLeave(),j?ke(e,P,T,M,I,(function(e){N.current=!1,e===me.Finished&&D.current.afterEnter()})):ke(e,L,R,F,I,(function(e){N.current=!1,e===me.Finished&&(Ee(A)||(g(Oe.Hidden),_(E),D.current.afterLeave()))}))}),[D,E,N,_,A,x,U,j,P,T,M,L,R,F]);var q={ref:x},V=m;return o().createElement(Ce.Provider,{value:A},o().createElement(ve,{value:ne(v,(t={},t[Oe.Visible]=he.Open,t[Oe.Hidden]=he.Closed,t))},re({props:X({},V,q),defaultTag:"div",features:Ie,visible:v===Oe.Visible,name:"Transition.Child"})))}function Re(e){var t,n=e.show,r=e.appear,s=void 0!==r&&r,a=e.unmount,l=Q(e,["show","appear","unmount"]),c=ye();void 0===n&&null!==c&&(n=ne(c,((t={})[he.Open]=!0,t[he.Closed]=!1,t)));if(![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var u=(0,i.useState)(n?Oe.Visible:Oe.Hidden),d=u[0],f=u[1],p=Ne((function(){f(Oe.Hidden)})),h=ge(),m=(0,i.useMemo)((function(){return{show:n,appear:s||!h}}),[n,s,h]);(0,i.useEffect)((function(){n?f(Oe.Visible):Ee(p)||f(Oe.Hidden)}),[n,p]);var x={unmount:a};return o().createElement(Ce.Provider,{value:p},o().createElement(_e.Provider,{value:m},re({props:X({},x,{as:i.Fragment,children:o().createElement(Le,Object.assign({},x,l))}),defaultTag:i.Fragment,features:Ie,visible:d===Oe.Visible,name:"Transition"})))}function Fe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(0,i.useRef)(t);return(0,i.useEffect)((function(){r.current=t}),[t]),(0,i.useCallback)((function(e){for(var t,n=te(r.current);!(t=n()).done;){var i=t.value;null!=i&&("function"==typeof i?i(e):i.current=e)}}),[r])}function De(e){for(var t,n,r=e.parentElement,i=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(i=r),r=r.parentElement;var o=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!o||!function(e){if(!e)return!1;var t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(i))&&o}function Be(e,t,n){var r=(0,i.useRef)(t);r.current=t,(0,i.useEffect)((function(){function t(e){r.current.call(window,e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}Re.Child=function(e){var t=null!==(0,i.useContext)(_e),n=null!==ye();return!t&&n?o().createElement(Re,Object.assign({},e)):o().createElement(Le,Object.assign({},e))},Re.Root=Re,function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(Me||(Me={}));var Ue,qe,Ve,ze,He,$e=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function We(e){null==e||e.focus({preventScroll:!0})}function Je(e,t){var n=Array.isArray(e)?e:function(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll($e))}(e),r=document.activeElement,i=function(){if(t&(Ue.First|Ue.Next))return Ve.Next;if(t&(Ue.Previous|Ue.Last))return Ve.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),o=function(){if(t&Ue.First)return 0;if(t&Ue.Previous)return Math.max(0,n.indexOf(r))-1;if(t&Ue.Next)return Math.max(0,n.indexOf(r))+1;if(t&Ue.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),s=t&Ue.NoScroll?{preventScroll:!0}:{},a=0,l=n.length,c=void 0;do{var u;if(a>=l||a+l<=0)return qe.Error;var d=o+a;if(t&Ue.WrapAround)d=(d+l)%l;else{if(d<0)return qe.Underflow;if(d>=l)return qe.Overflow}null==(u=c=n[d])||u.focus(s),a+=i}while(c!==document.activeElement);return c.hasAttribute("tabindex")||c.setAttribute("tabindex","0"),qe.Success}function Ze(e,t,n){void 0===t&&(t=He.All);var r=void 0===n?{}:n,o=r.initialFocus,s=r.containers,a=(0,i.useRef)("undefined"!=typeof window?document.activeElement:null),l=(0,i.useRef)(null),c=pe(),u=Boolean(t&He.RestoreFocus),d=Boolean(t&He.InitialFocus);(0,i.useEffect)((function(){u&&(a.current=document.activeElement)}),[u]),(0,i.useEffect)((function(){if(u)return function(){We(a.current),a.current=null}}),[u]),(0,i.useEffect)((function(){if(d&&e.current){var t=document.activeElement;if(null==o?void 0:o.current){if((null==o?void 0:o.current)===t)return void(l.current=t)}else if(e.current.contains(t))return void(l.current=t);(null==o?void 0:o.current)?We(o.current):Je(e.current,Ue.First)===qe.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),l.current=document.activeElement}}),[e,o,d]),Be("keydown",(function(n){t&He.TabLock&&e.current&&n.key===Me.Tab&&(n.preventDefault(),Je(e.current,(n.shiftKey?Ue.Previous:Ue.Next)|Ue.WrapAround)===qe.Success&&(l.current=document.activeElement))})),Be("focus",(function(n){if(t&He.FocusLock){var r=new Set(null==s?void 0:s.current);if(r.add(e),r.size){var i=l.current;if(i&&c.current){var o=n.target;o&&o instanceof HTMLElement?!function(e,t){for(var n,r=te(e);!(n=r()).done;){var i;if(null==(i=n.value.current)?void 0:i.contains(t))return!0}return!1}(r,o)?(n.preventDefault(),n.stopPropagation(),We(i)):(l.current=o,We(o)):We(l.current)}}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(Ue||(Ue={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(qe||(qe={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(Ve||(Ve={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(ze||(ze={})),function(e){e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All"}(He||(He={}));var Ge=new Set,Ke=new Map;function Ye(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Xe(e){var t=Ke.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var Qe=(0,i.createContext)(!1);function et(e){return o().createElement(Qe.Provider,{value:e.force},e.children)}const tt=ReactDOM;function nt(){var e=(0,i.useContext)(Qe),t=(0,i.useContext)(st),n=(0,i.useState)((function(){if(!e&&null!==t)return null;if("undefined"==typeof window)return null;var n=document.getElementById("headlessui-portal-root");if(n)return n;var r=document.createElement("div");return r.setAttribute("id","headlessui-portal-root"),document.body.appendChild(r)})),r=n[0],o=n[1];return(0,i.useEffect)((function(){e||null!==t&&o(t.current)}),[t,o,e]),r}var rt=i.Fragment;function it(e){var t=e,n=nt(),r=(0,i.useState)((function(){return"undefined"==typeof window?null:document.createElement("div")}))[0],o=ce();return ae((function(){if(n&&r)return n.appendChild(r),function(){var e;n&&(r&&(n.removeChild(r),n.childNodes.length<=0&&(null==(e=n.parentElement)||e.removeChild(n))))}}),[n,r]),o&&n&&r?(0,tt.createPortal)(re({props:t,defaultTag:rt,name:"Portal"}),r):null}var ot=i.Fragment,st=(0,i.createContext)(null);it.Group=function(e){var t=e.target,n=Q(e,["target"]);return o().createElement(st.Provider,{value:t},re({props:n,defaultTag:ot,name:"Popover.Group"}))};var at=(0,i.createContext)(null);function lt(){var e=(0,i.useContext)(at);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,lt),t}return e}var ct,ut,dt,ft,pt=(0,i.createContext)((function(){}));function ht(e){var t=e.children,n=e.onUpdate,r=e.type,s=e.element,a=(0,i.useContext)(pt),l=(0,i.useCallback)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];null==n||n.apply(void 0,t),a.apply(void 0,t)}),[a,n]);return ae((function(){return l(ct.Add,r,s),function(){return l(ct.Remove,r,s)}}),[l,r,s]),o().createElement(pt.Provider,{value:l},t)}pt.displayName="StackContext",function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(ct||(ct={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(dt||(dt={})),function(e){e[e.SetTitleId=0]="SetTitleId"}(ft||(ft={}));var mt=((ut={})[ft.SetTitleId]=function(e,t){return e.titleId===t.id?e:X({},e,{titleId:t.id})},ut),xt=(0,i.createContext)(null);function yt(e){var t=(0,i.useContext)(xt);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+jt.displayName+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,yt),n}return t}function vt(e,t){return ne(t.type,mt,e,t)}xt.displayName="DialogContext";var gt=Z.RenderStrategy|Z.Static,bt=oe((function(e,t){var n,r=e.open,s=e.onClose,a=e.initialFocus,l=Q(e,["open","onClose","initialFocus"]),c=(0,i.useState)(0),u=c[0],d=c[1],f=ye();void 0===r&&null!==f&&(r=ne(f,((n={})[he.Open]=!0,n[he.Closed]=!1,n)));var p=(0,i.useRef)(new Set),h=(0,i.useRef)(null),m=Fe(h,t),x=e.hasOwnProperty("open")||null!==f,y=e.hasOwnProperty("onClose");if(!x&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!x)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+r);if("function"!=typeof s)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: "+s);var v=r?dt.Open:dt.Closed,g=null!==f?f===he.Open:v===dt.Open,b=(0,i.useReducer)(vt,{titleId:null,descriptionId:null}),w=b[0],j=b[1],k=(0,i.useCallback)((function(){return s(!1)}),[s]),S=(0,i.useCallback)((function(e){return j({type:ft.SetTitleId,id:e})}),[j]),O=ce()&&v===dt.Open,_=u>1,C=null!==(0,i.useContext)(xt);Ze(h,O?ne(_?"parent":"leaf",{parent:He.RestoreFocus,leaf:He.All}):He.None,{initialFocus:a,containers:p}),function(e,t){void 0===t&&(t=!0),ae((function(){if(t&&e.current){var n=e.current;Ge.add(n);for(var r,i=te(Ke.keys());!(r=i()).done;){var o=r.value;o.contains(n)&&(Xe(o),Ke.delete(o))}return document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=te(Ge);!(t=n()).done;){var r=t.value;if(e.contains(r))return}1===Ge.size&&(Ke.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Ye(e))}})),function(){if(Ge.delete(n),Ge.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!Ke.has(e)){for(var t,n=te(Ge);!(t=n()).done;){var r=t.value;if(e.contains(r))return}Ke.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Ye(e)}}));else for(var e,t=te(Ke.keys());!(e=t()).done;){var r=e.value;Xe(r),Ke.delete(r)}}}}),[t])}(h,!!_&&O),Be("mousedown",(function(e){var t,n=e.target;v===dt.Open&&(_||(null==(t=h.current)?void 0:t.contains(n))||k())})),Be("keydown",(function(e){e.key===Me.Escape&&v===dt.Open&&(_||(e.preventDefault(),e.stopPropagation(),k()))})),(0,i.useEffect)((function(){if(v===dt.Open&&!C){var e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=n+"px",function(){document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}}),[v,C]),(0,i.useEffect)((function(){if(v===dt.Open&&h.current){var e=new IntersectionObserver((function(e){for(var t,n=te(e);!(t=n()).done;){var r=t.value;0===r.boundingClientRect.x&&0===r.boundingClientRect.y&&0===r.boundingClientRect.width&&0===r.boundingClientRect.height&&k()}}));return e.observe(h.current),function(){return e.disconnect()}}}),[v,h,k]);var E=function(){var e=(0,i.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,i.useMemo)((function(){return function(e){var t=(0,i.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,i.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return o().createElement(at.Provider,{value:r},e.children)}}),[n])]}(),N=E[0],A=E[1],P="headlessui-dialog-"+fe(),T=(0,i.useMemo)((function(){return[{dialogState:v,close:k,setTitleId:S},w]}),[v,w,k,S]),M=(0,i.useMemo)((function(){return{open:v===dt.Open}}),[v]),I={ref:m,id:P,role:"dialog","aria-modal":v===dt.Open||void 0,"aria-labelledby":w.titleId,"aria-describedby":N,onClick:function(e){e.stopPropagation()}},L=l;return o().createElement(ht,{type:"Dialog",element:h,onUpdate:(0,i.useCallback)((function(e,t,n){var r;"Dialog"===t&&ne(e,((r={})[ct.Add]=function(){p.current.add(n),d((function(e){return e+1}))},r[ct.Remove]=function(){p.current.add(n),d((function(e){return e-1}))},r))}),[])},o().createElement(et,{force:!0},o().createElement(it,null,o().createElement(xt.Provider,{value:T},o().createElement(it.Group,{target:h},o().createElement(et,{force:!1},o().createElement(A,{slot:M,name:"Dialog.Description"},re({props:X({},L,I),slot:M,defaultTag:"div",features:gt,visible:g,name:"Dialog"}))))))))})),wt=oe((function e(t,n){var r=yt([jt.displayName,e.name].join("."))[0],o=r.dialogState,s=r.close,a=Fe(n),l="headlessui-dialog-overlay-"+fe(),c=(0,i.useCallback)((function(e){if(De(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),s()}),[s]),u=(0,i.useMemo)((function(){return{open:o===dt.Open}}),[o]);return re({props:X({},t,{ref:a,id:l,"aria-hidden":!0,onClick:c}),slot:u,defaultTag:"div",name:"Dialog.Overlay"})}));var jt=Object.assign(bt,{Overlay:wt,Title:function e(t){var n=yt([jt.displayName,e.name].join("."))[0],r=n.dialogState,o=n.setTitleId,s="headlessui-dialog-title-"+fe();(0,i.useEffect)((function(){return o(s),function(){return o(null)}}),[s,o]);var a=(0,i.useMemo)((function(){return{open:r===dt.Open}}),[r]);return re({props:X({},t,{id:s}),slot:a,defaultTag:"h2",name:"Dialog.Title"})},Description:function(e){var t=lt(),n="headlessui-description-"+fe();ae((function(){return t.register(n)}),[n,t.register]);var r=e,i=X({},t.props,{id:n});return re({props:X({},r,i),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})}});const kt=wp.components;var St=n(42),Ot=n.n(St);const _t=lodash;var Ct=function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"broken-event",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";B.setState({entryPoint:e}),window.dispatchEvent(new CustomEvent("extendify-sdk::".concat(t,"-library"),{detail:e,bubbles:!0}))}(e,"open")};function Et(e){switch(e){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return e}function Nt(e){switch(e){case"tax_categories":return"Site Type";case"tax_pattern_types":return"Content"}return e.replace("tax_","").replace(/_/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}))}var At=n(246);function Pt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mt(e){var t=Pt(e.taxonomy,2),n=t[0],r=t[1],i=K((function(e){return e.updateTaxonomies})),o=K((function(e){return e.searchParams})),s=V((function(e){return e.openedTaxonomies})),a=V((function(e){return e.toggleOpenedTaxonomy})),l=function(e){return(null==o?void 0:o.taxonomies[n])===e.term},c=Object.values(r).filter((function(e){var t;return null==e||null===(t=e.type)||void 0===t?void 0:t.includes(o.type)})).length;return Object.keys(r).length&&c?(0,At.jsx)(kt.PanelBody,{title:Nt(n),initialOpen:s.includes(n)||"tax_pattern_types"===n||"tax_page_types"===n,onToggle:function(e){return a(n,e)},children:(0,At.jsx)(kt.PanelRow,{children:(0,At.jsx)("div",{className:"overflow-hidden w-full relative",children:(0,At.jsx)("ul",{className:"p-1 m-0 w-full",children:Object.values(r).filter((function(e){var t;return null==e||null===(t=e.type)||void 0===t?void 0:t.includes(o.type)})).map((function(e){return(0,At.jsx)("li",{className:"m-0 w-full",children:(0,At.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){return i((t={},r=n,o=e.term,r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t));var t,r,o},children:(0,At.jsx)("span",{className:Ot()({"text-wp-theme-500":l(e)}),children:e.term})})},e.term)}))})})})}):null}const It=wp.i18n;function Lt(e){return Array.isArray?Array.isArray(e):"[object Array]"===Vt(e)}function Rt(e){return"string"==typeof e}function Ft(e){return"number"==typeof e}function Dt(e){return!0===e||!1===e||function(e){return Bt(e)&&null!==e}(e)&&"[object Boolean]"==Vt(e)}function Bt(e){return"object"==typeof e}function Ut(e){return null!=e}function qt(e){return!e.trim().length}function Vt(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zt=Object.prototype.hasOwnProperty;class Ht{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=$t(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function $t(e){let t=null,n=null,r=null,i=1;if(Rt(e)||Lt(e))r=e,t=Wt(e),n=Jt(e);else{if(!zt.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const o=e.name;if(r=o,zt.call(e,"weight")&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(o));t=Wt(o),n=Jt(o)}return{path:t,id:n,weight:i,src:r}}function Wt(e){return Lt(e)?e:e.split(".")}function Jt(e){return Lt(e)?e.join("."):e}var Zt={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,t){let n=[],r=!1;const i=(e,t,o)=>{if(Ut(e))if(t[o]){const s=e[t[o]];if(!Ut(s))return;if(o===t.length-1&&(Rt(s)||Ft(s)||Dt(s)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(s));else if(Lt(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,o+1)}else t.length&&i(s,t,o+1)}else n.push(e)};return i(e,Rt(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}};const Gt=/[^ ]+/g;class Kt{constructor({getFn:e=Zt.getFn}={}){this.norm=function(e=3){const t=new Map,n=Math.pow(10,e);return{get(e){const r=e.match(Gt).length;if(t.has(r))return t.get(r);const i=1/Math.sqrt(r),o=parseFloat(Math.round(i*n)/n);return t.set(r,o),o},clear(){t.clear()}}}(3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,Rt(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();Rt(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Ut(e)||qt(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach(((t,r)=>{let i=this.getFn(e,t.path);if(Ut(i))if(Lt(i)){let e=[];const t=[{nestedArrIndex:-1,value:i}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(Ut(r))if(Rt(r)&&!qt(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else Lt(r)&&r.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[r]=e}else if(!qt(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function Yt(e,t,{getFn:n=Zt.getFn}={}){const r=new Kt({getFn:n});return r.setKeys(e.map($t)),r.setSources(t),r.create(),r}function Xt(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=Zt.distance,ignoreLocation:o=Zt.ignoreLocation}={}){const s=t/e.length;if(o)return s;const a=Math.abs(r-n);return i?s+a/i:a?1:s}const Qt=32;function en(e,t,n,{location:r=Zt.location,distance:i=Zt.distance,threshold:o=Zt.threshold,findAllMatches:s=Zt.findAllMatches,minMatchCharLength:a=Zt.minMatchCharLength,includeMatches:l=Zt.includeMatches,ignoreLocation:c=Zt.ignoreLocation}={}){if(t.length>Qt)throw new Error(`Pattern length exceeds max of ${Qt}.`);const u=t.length,d=e.length,f=Math.max(0,Math.min(r,d));let p=o,h=f;const m=a>1||l,x=m?Array(d):[];let y;for(;(y=e.indexOf(t,h))>-1;){let e=Xt(t,{currentLocation:y,expectedLocation:f,distance:i,ignoreLocation:c});if(p=Math.min(e,p),h=y+u,m){let e=0;for(;e<u;)x[y+e]=1,e+=1}}h=-1;let v=[],g=1,b=u+d;const w=1<<u-1;for(let r=0;r<u;r+=1){let o=0,a=b;for(;o<a;){Xt(t,{errors:r,currentLocation:f+a,expectedLocation:f,distance:i,ignoreLocation:c})<=p?o=a:b=a,a=Math.floor((b-o)/2+o)}b=a;let l=Math.max(1,f-a+1),y=s?d:Math.min(f+a,d)+u,j=Array(y+2);j[y+1]=(1<<r)-1;for(let o=y;o>=l;o-=1){let s=o-1,a=n[e.charAt(s)];if(m&&(x[s]=+!!a),j[o]=(j[o+1]<<1|1)&a,r&&(j[o]|=(v[o+1]|v[o])<<1|1|v[o+1]),j[o]&w&&(g=Xt(t,{errors:r,currentLocation:s,expectedLocation:f,distance:i,ignoreLocation:c}),g<=p)){if(p=g,h=s,h<=f)break;l=Math.max(1,2*f-h)}}if(Xt(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:c})>p)break;v=j}const j={isMatch:h>=0,score:Math.max(.001,g)};if(m){const e=function(e=[],t=Zt.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let s=e.length;o<s;o+=1){let s=e[o];s&&-1===r?r=o:s||-1===r||(i=o-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(x,a);e.length?l&&(j.indices=e):j.isMatch=!1}return j}function tn(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}class nn{constructor(e,{location:t=Zt.location,threshold:n=Zt.threshold,distance:r=Zt.distance,includeMatches:i=Zt.includeMatches,findAllMatches:o=Zt.findAllMatches,minMatchCharLength:s=Zt.minMatchCharLength,isCaseSensitive:a=Zt.isCaseSensitive,ignoreLocation:l=Zt.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const c=(e,t)=>{this.chunks.push({pattern:e,alphabet:tn(e),startIndex:t})},u=this.pattern.length;if(u>Qt){let e=0;const t=u%Qt,n=u-t;for(;e<n;)c(this.pattern.substr(e,Qt),e),e+=Qt;if(t){const e=u-Qt;c(this.pattern.substr(e),e)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:n}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}const{location:r,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:a,ignoreLocation:l}=this.options;let c=[],u=0,d=!1;this.chunks.forEach((({pattern:t,alphabet:f,startIndex:p})=>{const{isMatch:h,score:m,indices:x}=en(e,t,f,{location:r+p,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:a,includeMatches:n,ignoreLocation:l});h&&(d=!0),u+=m,h&&x&&(c=[...c,...x])}));let f={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(f.indices=c),f}}class rn{constructor(e){this.pattern=e}static isMultiMatch(e){return on(e,this.multiRegex)}static isSingleMatch(e){return on(e,this.singleRegex)}search(){}}function on(e,t){const n=e.match(t);return n?n[1]:null}class sn extends rn{constructor(e,{location:t=Zt.location,threshold:n=Zt.threshold,distance:r=Zt.distance,includeMatches:i=Zt.includeMatches,findAllMatches:o=Zt.findAllMatches,minMatchCharLength:s=Zt.minMatchCharLength,isCaseSensitive:a=Zt.isCaseSensitive,ignoreLocation:l=Zt.ignoreLocation}={}){super(e),this._bitapSearch=new nn(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class an extends rn{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const r=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const ln=[class extends rn{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},an,class extends rn{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends rn{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends rn{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends rn{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends rn{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},sn],cn=ln.length,un=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;const dn=new Set([sn.type,an.type]);class fn{constructor(e,{isCaseSensitive:t=Zt.isCaseSensitive,includeMatches:n=Zt.includeMatches,minMatchCharLength:r=Zt.minMatchCharLength,ignoreLocation:i=Zt.ignoreLocation,findAllMatches:o=Zt.findAllMatches,location:s=Zt.location,threshold:a=Zt.threshold,distance:l=Zt.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:r,findAllMatches:o,ignoreLocation:i,location:s,threshold:a,distance:l},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let n=e.trim().split(un).filter((e=>e&&!!e.trim())),r=[];for(let e=0,i=n.length;e<i;e+=1){const i=n[e];let o=!1,s=-1;for(;!o&&++s<cn;){const e=ln[s];let n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),o=!0)}if(!o)for(s=-1;++s<cn;){const e=ln[s];let n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let i=0,o=[],s=0;for(let r=0,a=t.length;r<a;r+=1){const a=t[r];o.length=0,i=0;for(let t=0,r=a.length;t<r;t+=1){const r=a[t],{isMatch:l,indices:c,score:u}=r.search(e);if(!l){s=0,i=0,o.length=0;break}if(i+=1,s+=u,n){const e=r.constructor.type;dn.has(e)?o=[...o,...c]:o.push(c)}}if(i){let e={isMatch:!0,score:s/i};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}}const pn=[];function hn(e,t){for(let n=0,r=pn.length;n<r;n+=1){let r=pn[n];if(r.condition(e,t))return new r(e,t)}return new nn(e,t)}const mn="$and",xn="$or",yn="$path",vn="$val",gn=e=>!(!e[mn]&&!e[xn]),bn=e=>({[mn]:Object.keys(e).map((t=>({[t]:e[t]})))});function wn(e,t,{auto:n=!0}={}){const r=e=>{let i=Object.keys(e);const o=(e=>!!e[yn])(e);if(!o&&i.length>1&&!gn(e))return r(bn(e));if((e=>!Lt(e)&&Bt(e)&&!gn(e))(e)){const r=o?e[yn]:i[0],s=o?e[vn]:e[r];if(!Rt(s))throw new Error((e=>`Invalid value for key ${e}`)(r));const a={keyId:Jt(r),pattern:s};return n&&(a.searcher=hn(s,t)),a}let s={children:[],operator:i[0]};return i.forEach((t=>{const n=e[t];Lt(n)&&n.forEach((e=>{s.children.push(r(e))}))})),s};return gn(e)||(e=bn(e)),r(e)}function jn(e,t){const n=e.matches;t.matches=[],Ut(n)&&n.forEach((e=>{if(!Ut(e.indices)||!e.indices.length)return;const{indices:n,value:r}=e;let i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function kn(e,t){t.score=e.score}class Sn{constructor(e,t={},n){this.options={...Zt,...t},this.options.useExtendedSearch,this._keyStore=new Ht(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Kt))throw new Error("Incorrect 'index' type");this._myIndex=t||Yt(this.options.keys,this._docs,{getFn:this.options.getFn})}add(e){Ut(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:o,ignoreFieldNorm:s}=this.options;let a=Rt(e)?Rt(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=Zt.ignoreFieldNorm}){e.forEach((e=>{let n=1;e.matches.forEach((({key:e,norm:r,score:i})=>{const o=e?e.weight:null;n*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(t?1:r))})),e.score=n}))}(a,{ignoreFieldNorm:s}),i&&a.sort(o),Ft(t)&&t>-1&&(a=a.slice(0,t)),function(e,t,{includeMatches:n=Zt.includeMatches,includeScore:r=Zt.includeScore}={}){const i=[];return n&&i.push(jn),r&&i.push(kn),e.map((e=>{const{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach((t=>{t(e,r)})),r}))}(a,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const t=hn(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:e,i:n,n:i})=>{if(!Ut(e))return;const{isMatch:o,score:s,indices:a}=t.searchIn(e);o&&r.push({item:e,idx:n,matches:[{score:s,value:e,norm:i,indices:a}]})})),r}_searchLogical(e){const t=wn(e,this.options),n=(e,t,r)=>{if(!e.children){const{keyId:n,searcher:i}=e,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return o&&o.length?[{idx:r,item:t,matches:o}]:[]}switch(e.operator){case mn:{const i=[];for(let o=0,s=e.children.length;o<s;o+=1){const s=e.children[o],a=n(s,t,r);if(!a.length)return[];i.push(...a)}return i}case xn:{const i=[];for(let o=0,s=e.children.length;o<s;o+=1){const s=e.children[o],a=n(s,t,r);if(a.length){i.push(...a);break}}return i}}},r=this._myIndex.records,i={},o=[];return r.forEach((({$:e,i:r})=>{if(Ut(e)){let s=n(t,e,r);s.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},o.push(i[r])),s.forEach((({matches:e})=>{i[r].matches.push(...e)})))}})),o}_searchObjectList(e){const t=hn(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach((({$:e,i:r})=>{if(!Ut(e))return;let o=[];n.forEach(((n,r)=>{o.push(...this._findMatches({key:n,value:e[r],searcher:t}))})),o.length&&i.push({idx:r,item:e,matches:o})})),i}_findMatches({key:e,value:t,searcher:n}){if(!Ut(t))return[];let r=[];if(Lt(t))t.forEach((({v:t,i,n:o})=>{if(!Ut(t))return;const{isMatch:s,score:a,indices:l}=n.searchIn(t);s&&r.push({score:a,key:e,value:t,idx:i,norm:o,indices:l})}));else{const{v:i,n:o}=t,{isMatch:s,score:a,indices:l}=n.searchIn(i);s&&r.push({score:a,key:e,value:i,norm:o,indices:l})}return r}}Sn.version="6.4.6",Sn.createIndex=Yt,Sn.parseIndex=function(e,{getFn:t=Zt.getFn}={}){const{keys:n,records:r}=e,i=new Kt({getFn:t});return i.setKeys(n),i.setIndexRecords(r),i},Sn.config=Zt,Sn.parseQuery=wn,function(...e){pn.push(...e)}(fn);const On=Sn;function _n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var En=new Map;function Nn(e){var t=e.value,n=e.setValue,i=e.terms,o=B((function(e){return e.preferredOptionsHistory})),s=K((function(e){return e.searchParams})),a=_n((0,r.useState)(!1),2),l=a[0],c=a[1],u=(0,r.useRef)(),d=_n((0,r.useState)({}),2),f=d[0],p=d[1],h=_n((0,r.useState)(""),2),m=h[0],x=h[1],y=_n((0,r.useState)([]),2),v=y[0],g=y[1],b=(0,r.useMemo)((function(){return Object.values(i.filter((function(e){return null==e?void 0:e.featured})).sort((function(e,t){return e.term<t.term?-1:e.term>t.term?1:0})))}),[i]),w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(En.has(e))g(En.get(e));else{var t=f.search(e);En.set(e,null!=t&&t.length?t.map((function(e){return e.item})):b),g(En.get(e))}},j="Unknown"===t||!t.length;(0,r.useEffect)((function(){p(new On(i,{keys:["term","parent","keywords"],minMatchCharLength:2,threshold:.3}))}),[i]),(0,r.useEffect)((function(){m.length||g(b)}),[b,m]),(0,r.useEffect)((function(){l&&u.current.focus()}),[l]);var k,S,O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,It.__)("Suggestions","extendify-sdk");return e===b&&(t=(0,It.__)("Examples","extendify-sdk")),(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("h4",{className:"mt-4 mb-2 text-left uppercase text-xs text-gray-700",children:t}),(0,At.jsx)("ul",{className:"m-0",children:e.map((function(e){var t;Object.prototype.hasOwnProperty.call(e,"term")&&(e=e.term);var r=(null==s||null===(t=s.taxonomies)||void 0===t?void 0:t.tax_categories)===e;return(0,At.jsx)("li",{className:"m-0 mb-1",children:(0,At.jsx)("button",{type:"button",className:Ot()("w-full text-left text-sm bg-transparent hover:text-wp-theme-500 m-0 pl-0 cursor-pointer",{"text-gray-800":!r}),onClick:function(){c(!1),n(e)},children:e})},e)}))})]})};return(0,At.jsxs)("div",{className:"w-full bg-gray-100 rounded",children:[(0,At.jsx)("button",{type:"button",onClick:function(){return c((function(e){return!e}))},className:"flex items-center justify-between text-gray-800 button-focus w-full p-4 m-0 cursor-pointer bg-gray-100 hover:bg-gray-150 rounded",children:(S=l?(0,It.__)("What kind of site is this?","extendify-sdk"):t,(0,At.jsxs)(At.Fragment,{children:[(0,At.jsxs)("span",{className:"flex flex-col text-left",children:[(0,At.jsx)("span",{className:"text-sm mb-1",children:(0,It.__)("Site Type","extendify-sdk")}),(0,At.jsx)("span",{className:"font-light text-xs",children:S})]}),(0,At.jsxs)("span",{className:"flex items-center space-x-4",children:[j&&!l&&(0,At.jsxs)("svg",{className:"text-wp-alert-red","aria-hidden":"true",focusable:"false",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)("path",{className:"stroke-current",d:"M10.9982 4.05371C7.66149 4.05371 4.95654 6.75866 4.95654 10.0954C4.95654 13.4321 7.66149 16.137 10.9982 16.137C14.3349 16.137 17.0399 13.4321 17.0399 10.0954C17.0399 6.75866 14.3349 4.05371 10.9982 4.05371V4.05371Z",strokeWidth:"1.25"}),(0,At.jsx)("path",{className:"fill-current",d:"M10.0205 12.8717C10.0205 12.3287 10.4508 11.8881 10.9938 11.8881C11.5368 11.8881 11.9774 12.3287 11.9774 12.8717C11.9774 13.4147 11.5368 13.8451 10.9938 13.8451C10.4508 13.8451 10.0205 13.4147 10.0205 12.8717Z"}),(0,At.jsx)("path",{className:"fill-current",d:"M11.6495 10.2591C11.6086 10.6177 11.3524 10.9148 10.9938 10.9148C10.625 10.9148 10.3791 10.6074 10.3483 10.2591L10.0205 7.31855C9.95901 6.81652 10.4918 6.34521 10.9938 6.34521C11.4959 6.34521 12.0286 6.81652 11.9774 7.31855L11.6495 10.2591Z"})]}),(0,At.jsx)("svg",{className:Ot()("text-gray-700 stroke-current",{"transform rotate-90 -translate-x-1":l}),"aria-hidden":"true",focusable:"false",width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"M1.24194 11.5952L6.24194 6.09519L1.24194 0.595215",strokeWidth:"1.5"})})]})]}))}),l&&(0,At.jsxs)("div",{className:"p-4 pt-0",children:[(0,At.jsxs)("div",{className:"relative my-2",children:[(0,At.jsx)("label",{htmlFor:"site-type-search",className:"sr-only",children:(0,It.__)("Search","extendify-sdk")}),(0,At.jsx)("input",{ref:u,id:"site-type-search",value:m||"",onChange:function(e){return t=e.target.value,x(t),void w(t);var t},type:"text",className:"button-focus bg-white border-0 m-0 p-3.5 py-2.5 rounded text-sm w-full",placeholder:(0,It.__)("Search","extendify-sdk")}),(0,At.jsx)("svg",{className:"absolute top-2 right-2 hidden lg:block pointer-events-none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,At.jsx)("path",{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})})]}),m.length>1&&v===b&&(0,At.jsx)("p",{className:"text-left",children:(0,It.__)("Nothing found...","extendify-sdk")}),v===b&&(null==o||null===(k=o.siteType)||void 0===k?void 0:k.length)>0&&(0,At.jsx)("div",{className:"mb-8",children:O(null==o?void 0:o.siteType,(0,It.__)("Recent","extendify-sdk"))}),v&&(0,At.jsx)("div",{children:O(v)}),j||(0,At.jsx)("button",{type:"button",className:"mt-4 w-full text-left text-sm bg-transparent hover:text-wp-theme-500 pl-0 cursor-pointer text-wp-theme-500",onClick:function(){c(!1),n("Unknown")},children:(0,It.__)("Reset","extendify-sdk")})]})]})}function An(){var e,t,n,r=V((function(e){return e.taxonomies})),i=K((function(e){return e.searchParams})),o=B((function(e){return e.updateSiteType})),s=K((function(e){return e.updateTaxonomies}));return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("div",{className:"mt-px bg-white mb-8 mx-6 pt-6 lg:mx-0 lg:pt-0",children:Object.keys(null!==(e=null==r?void 0:r.tax_categories)&&void 0!==e?e:{}).length>0&&(0,At.jsx)(Nn,{value:null!==(t=null==i||null===(n=i.taxonomies)||void 0===n?void 0:n.tax_categories)&&void 0!==t?t:"",setValue:function(e){o(e),s({tax_categories:e})},terms:r.tax_categories})}),(0,At.jsx)("div",{className:"mt-px flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block",children:(0,At.jsx)(kt.Panel,{children:Object.entries(r).map((function(e){return"tax_categories"===e[0]?null:(0,At.jsx)(Mt,{taxonomy:e},e[0])}))})})]})}function Pn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function In(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ln(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Rn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Ln(o,r,i,s,a,"next",e)}function a(e){Ln(o,r,i,s,a,"throw",e)}s(void 0)}))}}var Fn=0,Dn=function(e){var t=arguments;return Rn(w().mark((function n(){var r,i,o,s,a;return w().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=t.length>1&&void 0!==t[1]?t[1]:{},Fn++,n.next=4,k.post("templates",{filterByFormula:zn(e),pageSize:null!==(r=null==s?void 0:s.pageSize)&&void 0!==r?r:v,categories:e.taxonomies,search:e.search,type:e.type,offset:null!==(i=s.offset)&&void 0!==i?i:"",initial:1===Fn,request_count:Fn,sdk_partner:null!==(o=B.getState().sdkPartner)&&void 0!==o?o:""});case 4:return a=n.sent,n.abrupt("return",a);case 6:case"end":return n.stop()}}),n)})))()},Bn=function(e,t,n){var r,i,o,s;return k.post("related",{pageSize:4,query_type:t,wanted_type:n,categories:null==e||null===(r=e.fields)||void 0===r?void 0:r.tax_categories,pattern_types:null==e||null===(i=e.fields)||void 0===i?void 0:i.tax_pattern_types,style:null==e||null===(o=e.fields)||void 0===o?void 0:o.tax_style,type:null==e||null===(s=e.fields)||void 0===s?void 0:s.type,template_id:null==e?void 0:e.id})},Un=function(e){var t;return k.post("templates/".concat(e.id),{template_id:e.id,maybe_import:!0,type:e.fields.type,pageSize:v,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},qn=function(e){var t;return k.post("templates/".concat(e.id),{template_id:e.id,single:!0,type:e.fields.type,pageSize:v,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},Vn=function(e){var t;return k.post("templates/".concat(e.id),{template_id:e.id,imported:!0,type:e.fields.type,pageSize:v,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},zn=function(e){var t,n=e.taxonomies,r=e.type;n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mn(Object(n),!0).forEach((function(t){In(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);var i=[];"Unknown"===(null===(t=n)||void 0===t?void 0:t.tax_categories)&&(n.tax_categories="Default");var o=Object.entries(n).filter((function(e){var t=Pn(e,2),n=t[0],i=t[1];return $n(n,i,r)})).filter((function(e){var t=Pn(e,1)[0];return Boolean(t[1].length)})).map((function(e){var t=Pn(e,2),n=t[0],r=t[1];return"".concat(n,' = "').concat(r,'"')})).join(", ");return o.length&&i.push(o),r.length&&i.push('{type}="'.concat(r,'"')),i.length?"AND(".concat(i.join(", "),")").replace(/\r?\n|\r/g,""):""},Hn=new Map,$n=function(e,t,n){var r,i,o,s,a="".concat(e,"-").concat(t,"-").concat(n);if("tax_categories-Default-pattern"===a)return!0;Hn.has(a)||Hn.set(a,null===(r=V.getState())||void 0===r||null===(i=r.taxonomies[e])||void 0===i||null===(o=i.find((function(e){return(null==e?void 0:e.term)===t})))||void 0===o||null===(s=o.type)||void 0===s?void 0:s.includes(n));return Hn.get(a)};function Wn(){return Wn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wn.apply(this,arguments)}var Jn=new Map,Zn=new WeakMap,Gn=0;function Kn(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(Zn.has(n)||(Gn+=1,Zn.set(n,Gn.toString())),Zn.get(n)):"0":e[t]);var n})).toString()}function Yn(e,t,n){if(void 0===n&&(n={}),!e)return function(){};var r=function(e){var t=Kn(e),n=Jn.get(t);if(!n){var r,i=new Map,o=new IntersectionObserver((function(t){t.forEach((function(t){var n,o=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=i.get(t.target))||n.forEach((function(e){e(o,t)}))}))}),e);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:i},Jn.set(t,n)}return n}(n),i=r.id,o=r.observer,s=r.elements,a=s.get(e)||[];return s.has(e)||s.set(e,a),a.push(t),o.observe(e),function(){a.splice(a.indexOf(t),1),0===a.length&&(s.delete(e),o.unobserve(e)),0===s.size&&(o.disconnect(),Jn.delete(i))}}function Xn(e){return"function"!=typeof e.children}var Qn=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),Xn(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},o.componentWillUnmount=function(){this.unobserve(),this.node=null},o.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,i=e.trackVisibility,o=e.delay;this._unobserveCb=Yn(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:i,delay:o})}},o.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},o.render=function(){if(!Xn(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var r=this.props,o=r.children,s=r.as,a=r.tag,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return(0,i.createElement)(s||a||"div",Wn({ref:this.handleNode},l),o)},r}(i.Component);function er(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,o=t.trackVisibility,s=t.rootMargin,a=t.root,l=t.triggerOnce,c=t.skip,u=t.initialInView,d=(0,i.useRef)(),f=(0,i.useState)({inView:!!u}),p=f[0],h=f[1],m=(0,i.useCallback)((function(e){void 0!==d.current&&(d.current(),d.current=void 0),c||e&&(d.current=Yn(e,(function(e,t){h({inView:e,entry:t}),t.isIntersecting&&l&&d.current&&(d.current(),d.current=void 0)}),{root:a,rootMargin:s,threshold:n,trackVisibility:o,delay:r}))}),[Array.isArray(n)?n.toString():n,a,s,l,c,o,r]);(0,i.useEffect)((function(){d.current||!p.entry||l||c||h({inView:!!u})}));var x=[m,p.inView,p.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}Qn.displayName="InView",Qn.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function tr(){var e=(0,r.useRef)(!1);return(0,r.useEffect)((function(){return e.current=!0,function(){return e.current=!1}})),e}function nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return rr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ir=function(){return(0,At.jsx)("div",{className:"aspect-w-1 aspect-h-1",children:(0,At.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100",children:(0,At.jsx)(kt.Spinner,{})})})};function or(e){var t=e.template,n=e.imageLoaded,i=e.setActiveTemplate,o=nr((0,r.useState)(!1),2),s=o[0],a=o[1],l=(0,r.useRef)(),c=tr();return(0,r.useEffect)((function(){var e,r,i,o,u,d,f;if(!s&&c.current){var p=new Image;p.role="button",p.className="max-w-full block m-auto object-cover",p.onload=function(){c.current&&(a(!0),l.current&&!l.current.querySelector("img")&&(l.current.appendChild(p),n(t.id)))},p.src=null!==(e=null==t||null===(r=t.fields)||void 0===r||null===(i=r.screenshot[0])||void 0===i||null===(o=i.thumbnails)||void 0===o||null===(u=o.large)||void 0===u?void 0:u.url)&&void 0!==e?e:null==t||null===(d=t.fields)||void 0===d||null===(f=d.screenshot[0])||void 0===f?void 0:f.url}}),[t,n,s,c]),s?(0,At.jsx)("button",{type:"button",className:"flex mb-10 justify-items-center flex-grow h-80 border-gray-200 bg-white border focus:border-wp-theme-500 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer overflow-hidden",onClick:i,ref:l}):(0,At.jsx)(ir,{})}function sr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ar(){return ar=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ar.apply(this,arguments)}function lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(n),!0).forEach((function(t){ur(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ur(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dr={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0};class fr extends o().Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame((()=>{this.reCalculateColumnCount()}))):this.reCalculateColumnCount()}reCalculateColumnCount(){const e=window&&window.innerWidth||1/0;let t=this.props.breakpointCols;"object"!=typeof t&&(t={default:parseInt(t)||2});let n=1/0,r=t.default||2;for(let i in t){const o=parseInt(i);o>0&&e<=o&&o<n&&(n=o,r=t[i])}r=Math.max(1,parseInt(r)||1),this.state.columnCount!==r&&this.setState({columnCount:r})}itemsInColumns(){const e=this.state.columnCount,t=new Array(e),n=o().Children.toArray(this.props.children);for(let r=0;r<n.length;r++){const i=r%e;t[i]||(t[i]=[]),t[i].push(n[r])}return t}renderColumns(){const{column:e,columnAttrs:t={},columnClassName:n}=this.props,r=this.itemsInColumns(),i=100/r.length+"%";let s=n;s&&"string"!=typeof s&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===s&&(s="my-masonry-grid_column"));const a=cr(cr(cr({},e),t),{},{style:cr(cr({},t.style),{},{width:i}),className:s});return r.map(((e,t)=>o().createElement("div",ar({},a,{key:t}),e)))}logDeprecated(e){console.error("[Masonry]",e)}render(){const e=this.props,{children:t,breakpointCols:n,columnClassName:r,columnAttrs:i,column:s,className:a}=e,l=sr(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let c=a;return"string"!=typeof a&&(this.logDeprecated('The property "className" requires a string'),void 0===a&&(c="my-masonry-grid")),o().createElement("div",ar({},l,{className:c}),this.renderColumns())}}fr.defaultProps=dr;const pr=fr;var hr=function(){return k.get("plugins")},mr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new FormData;return t.append("plugins",JSON.stringify(e)),k.post("plugins",t,{headers:{"Content-Type":"multipart/form-data"}})},xr=function(){return k.get("active-plugins")};function yr(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function vr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){yr(o,r,i,s,a,"next",e)}function a(e){yr(o,r,i,s,a,"throw",e)}s(void 0)}))}}var gr=[],br=[];function wr(e){return jr.apply(this,arguments)}function jr(){return(jr=vr(w().mark((function e(t){var n,r,i,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=(i=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(gr.length){e.next=10;break}return e.t0=Object,e.next=8,hr();case 8:e.t1=e.sent,gr=e.t0.keys.call(e.t0,e.t1);case 10:return o=!!i.length&&i.filter((function(e){return!gr.some((function(t){return t.includes(e)}))})),e.abrupt("return",o.length);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kr(e){return Sr.apply(this,arguments)}function Sr(){return(Sr=vr(w().mark((function e(t){var n,r,i,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=(i=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(br.length){e.next=10;break}return e.t0=Object,e.next=8,xr();case 8:e.t1=e.sent,br=e.t0.values.call(e.t0,e.t1);case 10:if(!(o=!!i.length&&i.filter((function(e){return!br.some((function(t){return t.includes(e)}))})))){e.next=16;break}return e.next=14,wr(t);case 14:if(!e.sent){e.next=16;break}return e.abrupt("return",!1);case 16:return e.abrupt("return",o.length);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Or=l(x((function(e){return{wantedTemplate:{},importOnLoad:!1,setWanted:function(t){return e({wantedTemplate:t})},removeWanted:function(){return e({wantedTemplate:{}})}}}),{name:"extendify-wanted-template"}));function _r(e){var t=e.msg;return(0,At.jsxs)(kt.Modal,{style:{maxWidth:"500px"},title:(0,It.__)("Error installing plugins","extendify-sdk"),isDismissible:!1,children:[(0,It.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,At.jsx)("br",{}),(0,At.jsx)(kt.Notice,{isDismissible:!1,status:"error",children:t}),(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(Lr,{}),document.getElementById("extendify-root"))},children:(0,It.__)("Go back","extendify-sdk")})]})}const Cr=wp.data;function Er(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ar(){var e=Er((0,r.useState)(!1),2),t=e[0],n=e[1],i=function(){location.reload()};return(0,(0,Cr.select)("core/editor").isEditedPostDirty)()?(0,At.jsxs)(kt.Modal,{title:(0,It.__)("Reload required","extendify-sdk"),isDismissible:!1,children:[(0,At.jsx)("p",{style:{maxWidth:"400px"},children:(0,It.__)("Just one more thing! We need to reload the page to continue.","extendify-sdk")}),(0,At.jsxs)(kt.ButtonGroup,{children:[(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:i,disabled:t,children:(0,It.__)("Reload page","extendify-sdk")}),(0,At.jsx)(kt.Button,{isSecondary:!0,onClick:function(){n(!0),(0,Cr.dispatch)("core/editor").savePost(),n(!1)},isBusy:t,style:{margin:"0 4px"},children:(0,It.__)("Save changes","extendify-sdk")})]})]}):(i(),null)}function Pr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mr(){var e,t=Pr((0,r.useState)(""),2),n=t[0],i=t[1],o=Or((function(e){return e.wantedTemplate})),s=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return mr(s).then((function(){Or.setState({importOnLoad:!0}),(0,r.render)((0,At.jsx)(Ar,{}),document.getElementById("extendify-root"))})).catch((function(e){var t=e.message;i(t)})),n?(0,At.jsx)(_r,{msg:n}):(0,At.jsx)(kt.Modal,{title:(0,It.__)("Installing plugins","extendify-sdk"),isDismissible:!1,children:(0,At.jsx)(kt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,It.__)("Installing...","extendify-sdk")})})}function Ir(){var e,t,n,i=Or((function(e){return e.wantedTemplate})),o=(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins)||[];return(0,At.jsxs)(kt.Modal,{title:(0,It.__)("Plugins required","extendify-sdk"),isDismissible:!1,children:[(0,At.jsx)("p",{style:{maxWidth:"400px"},children:(0,It.sprintf)((0,It.__)("In order to add this %s to your site, the following plugins are required to be installed and activated.","extendify-sdk"),null!==(t=null==i||null===(n=i.fields)||void 0===n?void 0:n.type)&&void 0!==t?t:"template")}),(0,At.jsx)("ul",{children:o.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,At.jsx)("li",{children:Et(e)},e)}))}),(0,At.jsx)("p",{style:{maxWidth:"400px",fontWeight:"bold"},children:(0,It.__)("Please contact a site admin for assistance in adding these plugins to your site.","extendify-sdk")}),(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(Fo,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none"},children:(0,It.__)("Return to library","extendify-sdk")})]})}function Lr(e){var t,n,i,o,s,a,l,c,u=Or((function(e){return e.wantedTemplate})),d=(null==u||null===(t=u.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=B.getState())&&void 0!==n&&n.canInstallPlugins?(0,At.jsxs)(kt.Modal,{title:null!==(i=e.title)&&void 0!==i?i:(0,It.__)("Install required plugins","extendify-sdk"),isDismissible:!1,children:[(0,At.jsx)("p",{style:{maxWidth:"400px"},children:null!==(o=e.message)&&void 0!==o?o:(0,It.__)((0,It.sprintf)("There is just one more step. This %s requires the following to be automatically installed and activated:",null!==(s=null==u||null===(a=u.fields)||void 0===a?void 0:a.type)&&void 0!==s?s:"template"),"extendify-sdk")}),(null===(l=e.message)||void 0===l?void 0:l.length)>0||(0,At.jsx)("ul",{children:d.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,At.jsx)("li",{children:Et(e)},e)}))}),(0,At.jsxs)(kt.ButtonGroup,{children:[(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(Mr,{}),document.getElementById("extendify-root"))},children:null!==(c=e.buttonLabel)&&void 0!==c?c:(0,It.__)("Install Plugins","extendify-sdk")}),e.forceOpen||(0,At.jsx)(kt.Button,{isTertiary:!0,onClick:function(){e.forceOpen||(0,r.render)((0,At.jsx)(Fo,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,It.__)("No thanks, take me back","extendify-sdk")})]})]}):(0,At.jsx)(Ir,{})}function Rr(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}var Fr=function(){var e,t=(e=w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wr(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,At.jsx)(Lr,{}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasRequiredPlugins",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Rr(o,r,i,s,a,"next",e)}function a(e){Rr(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}();function Dr(e){var t=e.msg;return(0,At.jsxs)(kt.Modal,{style:{maxWidth:"500px"},title:(0,It.__)("Error Activating plugins","extendify-sdk"),isDismissible:!1,children:[(0,It.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,At.jsx)("br",{}),(0,At.jsx)(kt.Notice,{isDismissible:!1,status:"error",children:t}),(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){(0,r.render)((0,At.jsx)(Hr,{}),document.getElementById("extendify-root"))},children:(0,It.__)("Go back","extendify-sdk")})]})}function Br(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Ur(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Br(o,r,i,s,a,"next",e)}function a(e){Br(o,r,i,s,a,"throw",e)}s(void 0)}))}}function qr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zr(){var e,t=qr((0,r.useState)(""),2),n=t[0],i=t[1],o=Or((function(e){return e.wantedTemplate})),s=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return mr(s).then((function(){Or.setState({importOnLoad:!0})})).then(Ur(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:(0,r.render)((0,At.jsx)(Ar,{}),document.getElementById("extendify-root"));case 3:case"end":return e.stop()}}),e)})))).catch((function(e){var t=e.response;i(t.data.message)})),n?(0,At.jsx)(Dr,{msg:n}):(0,At.jsx)(kt.Modal,{title:(0,It.__)("Activating plugins","extendify-sdk"),isDismissible:!1,children:(0,At.jsx)(kt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,It.__)("Activating...","extendify-sdk")})})}function Hr(e){var t,n,i,o,s,a=Or((function(e){return e.wantedTemplate})),l=(null==a||null===(t=a.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=B.getState())&&void 0!==n&&n.canActivatePlugins?(0,At.jsx)(kt.Modal,{title:(0,It.__)("Activate required plugins","extendify-sdk"),isDismissible:!1,children:(0,At.jsxs)("div",{children:[(0,At.jsx)("p",{style:{maxWidth:"400px"},children:null!==(i=e.message)&&void 0!==i?i:(0,It.__)((0,It.sprintf)("There is just one more step. This %s requires the following plugins to be installed and activated:",null!==(o=null==a||null===(s=a.fields)||void 0===s?void 0:s.type)&&void 0!==o?o:"template"),"extendify-sdk")}),(0,At.jsx)("ul",{children:l.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,At.jsx)("li",{children:Et(e)},e)}))}),(0,At.jsxs)(kt.ButtonGroup,{children:[(0,At.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(zr,{}),document.getElementById("extendify-root"))},children:(0,It.__)("Activate Plugins","extendify-sdk")}),e.showClose&&(0,At.jsx)(kt.Button,{isTertiary:!0,onClick:function(){return(0,r.render)((0,At.jsx)(Fo,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,It.__)("No thanks, return to library","extendify-sdk")})]})]})}):(0,At.jsx)(Ir,{})}function $r(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}var Wr=function(){var e,t=(e=w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kr(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,At.jsx)(Hr,{showClose:!0}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasPluginsActivated",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){$r(o,r,i,s,a,"next",e)}function a(e){$r(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}();function Jr(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kr(e){var t=e.finished,n=Zr((0,r.useState)(""),2),i=n[0],o=n[1],s=(0,r.useRef)(),a=function(){var e,n=(e=w().mark((function e(n){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.next=3,E(i);case 3:B.setState({registration:{email:i}}),t();case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Jr(o,r,i,s,a,"next",e)}function a(e){Jr(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,At.jsxs)(kt.Modal,{className:"extendify-sdk",title:(0,It.__)("One last step...","extendify-sdk"),isDismissible:!1,children:[(0,At.jsx)("p",{className:"m-0 mb-4 max-w-md",children:(0,It.__)("Register now to receive updates and special offers from Extendify","extendify-sdk")}),(0,At.jsxs)("form",{onSubmit:a,className:"flex space-x-4 mb-8",children:[(0,At.jsxs)("div",{className:"relative w-full max-w-xs",children:[(0,At.jsx)("input",{id:"extendify-email-register",required:!0,onChange:function(e){return o(e.target.value)},type:"text",className:"extendify-special-input button-focus text-sm h-8 min-h-0 border border-gray-900 special-input placeholder-transparent rounded-none w-full px-2",placeholder:(0,It.__)("Email","extendify-sdk")}),(0,At.jsx)("label",{htmlFor:"extendify-email-register",className:"-top-3 bg-white absolute left-1 px-1 transition-all",children:(0,It.__)("Email","extendify-sdk")})]}),(0,At.jsx)("input",{type:"submit",className:"hidden"})]}),(0,At.jsxs)(kt.ButtonGroup,{children:[(0,At.jsx)(kt.Button,{ref:s,isPrimary:!0,onClick:a,children:(0,It.__)("Submit and import","extendify-sdk")}),(0,At.jsx)(kt.Button,{isTertiary:!0,onClick:t,style:{boxShadow:"none",margin:"0 4px"},children:(0,It.__)("Skip and import","extendify-sdk")})]})]})}function Yr(){var e;return{id:"NeedsRegistrationModal",pass:Boolean((null===(e=B.getState().registration)||void 0===e?void 0:e.email)||B.getState().apiKey),allow:function(){},deny:function(){return new Promise((function(e){(0,r.render)((0,At.jsx)(Kr,{finished:e}),document.getElementById("extendify-root"))}))}}}function Xr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Qr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qr(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Qr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ei(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function ti(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){ei(o,r,i,s,a,"next",e)}function a(e){ei(o,r,i,s,a,"throw",e)}s(void 0)}))}}function ni(e){return function(){return new ri(e.apply(this,arguments))}}function ri(e){var t,n;function r(t,n){try{var o=e[t](n),s=o.value,a=s instanceof ii;Promise.resolve(a?s.wrapped:s).then((function(e){a?r("return"===t?"return":"next",e):i(o.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};n?n=n.next=a:(t=n=a,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function ii(e){this.wrapped=e}ri.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},ri.prototype.next=function(e){return this._invoke("next",e)},ri.prototype.throw=function(e){return this._invoke("throw",e)},ri.prototype.return=function(e){return this._invoke("return",e)};var oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:Fr,hasPluginsActivated:Wr,NeedsRegistrationModal:Yr,stack:[],check:function(t){var n=this;return ti(w().mark((function r(){var i,o,s,a;return w().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=Xr(e),r.prev=1,i.s();case 3:if((o=i.n()).done){r.next=11;break}return s=o.value,r.next=7,n["".concat(s)](t);case 7:a=r.sent,n.stack.push(a.pass?a.allow:a.deny);case 9:r.next=3;break;case 11:r.next=16;break;case 13:r.prev=13,r.t0=r.catch(1),i.e(r.t0);case 16:return r.prev=16,i.f(),r.finish(16);case 19:case"end":return r.stop()}}),r,null,[[1,13,16,19]])})))()},reset:function(){this.stack=[]}}};function si(e){return ai.apply(this,arguments)}function ai(){return(ai=ti(w().mark((function e(t){var n;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=li(t);case 1:return e.next=4,n.next();case 4:if(!e.sent.done){e.next=7;break}return e.abrupt("break",9);case 7:e.next=1;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function li(e){return ci.apply(this,arguments)}function ci(){return(ci=ni(w().mark((function e(t){var n,r,i;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Xr(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function ui(e,t){return(0,(0,Cr.dispatch)("core/block-editor").insertBlocks)(e).then((function(){window.dispatchEvent(new CustomEvent("extendify-sdk::template-inserted",{detail:{template:t},bubbles:!0}))}))}const di=wp.blockEditor;var fi=["tagName","children"];function pi(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hi(e){var t=e.tagName,n=void 0===t?"button":t,i=e.children,o=pi(e,fi);return o.className=Ot()(o.className,"bg-extendify-main hover:bg-extendify-main-dark py-3 pl-5 pr-3 w-60 rounded no-underline text-base text-white flex justify-center items-center space-x-2"),(0,r.createElement)(n,o,i)}const mi=function({icon:e,size:t=24,...n}){return(0,r.cloneElement)(e,{width:t,height:t,...n})},xi=e=>(0,r.createElement)("circle",e),yi=e=>(0,r.createElement)("g",e),vi=e=>(0,r.createElement)("path",e),gi=e=>(0,r.createElement)("rect",e),bi=({className:e,isPressed:t,...n})=>{const i={...n,className:Ot()(e,{"is-pressed":t})||void 0,role:"img","aria-hidden":!0,focusable:!1};return(0,r.createElement)("svg",i)},wi=(0,r.createElement)(bi,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(vi,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function ji(e){var t=e.onRequestClose,n=e.isOpen,i=e.left,o=e.right;return(0,At.jsx)(Re.Root,{show:!0,as:r.Fragment,children:(0,At.jsx)(jt,{as:"div",static:!0,open:n,className:"extendify-sdk",onClose:t,children:(0,At.jsxs)("div",{className:"fixed z-high inset-0 flex",children:[(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,At.jsx)(jt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,At.jsx)("div",{className:"m-auto",children:(0,At.jsxs)("div",{className:"relative m-8 md:m-0 max-w-md rounded-sm md:flex bg-gray-100 items-center justify-center md:max-w-2xl",children:[(0,At.jsxs)("button",{onClick:t,className:"absolute block p-4 top-0 right-0 rounded-md cursor-pointer text-gray-700 opacity-30 hover:opacity-100",children:[(0,At.jsx)("span",{className:"sr-only",children:(0,It.__)("Close","extendify-sdk")}),(0,At.jsx)(mi,{icon:wi})]}),(0,At.jsx)("div",{className:"rounded-md md:rounded-l-md md:rounded-tr-none bg-white p-12 text-center md:w-7/12 items-center",children:i}),(0,At.jsx)("div",{className:"justify-center md:justify-none md:w-6/12 p-10 text-black hidden md:block ",children:o})]})})})]})})})}function ki(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Si(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Oi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _i=(0,r.memo)((function(e){var t=e.blocks;return(0,At.jsx)("div",{className:"with-light-shadow relative",children:(0,At.jsx)(di.BlockPreview,{blocks:t,live:!1,viewportWidth:1400})})}),(function(e,t){return e.clientId==t.clientId})),Ci=oi(["NeedsRegistrationModal","hasRequiredPlugins","hasPluginsActivated"]);function Ei(e){var t,n=e.template,i=(0,r.useRef)(null),o=(0,r.useRef)(!1),s=B((function(e){return e.canImport})),a=Or((function(e){return e.setWanted})),l=Y((function(e){return e.setOpen})),c=(0,g.rawHandler)({HTML:n.fields.code}),u=Si((0,r.useState)(!1),2),d=u[0],f=u[1],p=Si(er(),2),h=p[0],m=p[1],x=Si((0,r.useState)(!1),2),y=x[0],v=x[1],b=function(){var e,t=(e=w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ci.check(n);case 2:si(Ci.stack).then((function(){setTimeout((function(){ui(c,n).then((function(){return l(!1)})).then((function(){return(0,r.render)((0,At.jsx)(Fo,{}),document.getElementById("extendify-root"))})).then((function(){return Ci.reset()}))}),100)}));case 3:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){ki(o,r,i,s,a,"next",e)}function a(e){ki(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(){return t.apply(this,arguments)}}(),j=function(){s()?(Un(n),a(n),b()):v(!0)};return(0,r.useEffect)((function(){!d&&m&&f(!0)}),[m,d,n]),(0,At.jsxs)(At.Fragment,{children:[(0,At.jsxs)("div",{role:"button",tabIndex:"0",ref:i,"aria-label":(0,It.sprintf)((0,It.__)("Press to import %s","extendify-sdk"),null==n||null===(t=n.fields)||void 0===t?void 0:t.type),className:"mb-8 cursor-pointer button-focus",onFocus:function(){o.current||(o.current=!0,Array.from(i.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).forEach((function(e){return e.setAttribute("tabIndex","-1")})))},onClick:j,onKeyDown:function(e){["Enter","Space"," "].includes(e.key)&&(e.stopPropagation(),e.preventDefault(),j())},children:[(0,At.jsx)("div",{ref:h,className:"invisible absolute inset-0 pointer-events-none"}),d&&(0,At.jsx)(_i,{blocks:c})]}),y&&(0,At.jsx)(ji,{isOpen:y,onRequestClose:function(){return v(!1)},left:(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("div",{className:"flex space-x-2 items-center justify-center mb-10",children:(0,At.jsxs)("svg",{fill:"none",height:"30",viewBox:"0 0 153 30",width:"153",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)("path",{d:"m33.2598 24.7079v-18.89872h12.7345v3.29434h-8.7388v4.50318h8.0835v3.2944h-8.0835v4.5124h8.7756v3.2944zm19.1224-14.174 2.6023 4.9553 2.6668-4.9553h4.0327l-4.1066 7.087 4.2173 7.087h-4.0141l-2.7961-4.9-2.7499 4.9h-4.0603l4.2079-7.087-4.0602-7.087zm19.1756 0v2.9529h-8.5359v-2.9529zm-6.598-3.39592h3.9312v13.21432c0 .363.0552.646.1661.849.1106.1968.2644.3353.4612.4152.2031.08.437.12.7014.12.1845 0 .3692-.0154.5537-.0461.1845-.0369.3261-.0646.4244-.0831l.6183 2.9252c-.1968.0615-.4736.1323-.8305.2122-.3568.0862-.7906.1386-1.301.157-.9474.0368-1.7781-.0892-2.4916-.3783-.7074-.2893-1.2581-.7383-1.6518-1.3474-.3937-.609-.5875-1.378-.5814-2.3069zm15.466 17.84662c-1.458 0-2.7131-.2951-3.7651-.8857-1.0457-.5968-1.8517-1.4396-2.4175-2.5285-.5661-1.0951-.8491-2.39-.8491-3.8849 0-1.458.283-2.7376.8491-3.8388.5658-1.1012 1.3625-1.9594 2.39-2.5746 1.0334-.6152 2.2454-.9228 3.6356-.9228.9353 0 1.8056.1507 2.6116.4521.812.2954 1.5195.7414 2.1224 1.3381.6091.5967 1.0827 1.3473 1.4212 2.2516.3382.8982.5073 1.9502.5073 3.1559v1.0797h-11.9683v-2.4362h8.268c0-.5659-.123-1.0673-.369-1.5041-.2462-.4368-.5875-.7782-1.0243-1.0243-.4307-.2522-.932-.3783-1.5041-.3783-.5968 0-1.1259.1384-1.5873.4152-.4552.2707-.8121.6367-1.0704 1.0981-.2584.4553-.3907.9628-.3967 1.5226v2.3162c0 .7014.129 1.3073.3874 1.8179.2646.5106.6368.9043 1.1167 1.1812.4797.2768 1.0487.4153 1.707.4153.4368 0 .8368-.0616 1.1997-.1846.363-.1231.6737-.3076.932-.5537.2584-.2461.4552-.5475.5906-.9043l3.6358.2399c-.1845.8736-.563 1.6364-1.1351 2.2885-.5659.646-1.298 1.1505-2.1963 1.5134-.8919.3569-1.9223.5351-3.0912.5351zm13.002-8.4711v8.1944h-3.931v-14.174h3.7465v2.5007h.1661c.3137-.8244.8397-1.4764 1.5779-1.9563.7383-.486 1.6335-.729 2.6855-.729.9842 0 1.8423.2153 2.5742.6459.732.4307 1.301 1.0459 1.707 1.8456.406.7936.609 1.741.609 2.8422v9.0249h-3.9305v-8.3236c.0061-.8674-.2155-1.5441-.6646-2.0301-.4491-.4922-1.0674-.7382-1.8547-.7382-.529 0-.9966.1138-1.4026.3414-.4.2276-.7137.5598-.9413.9966-.2216.4306-.3352.9505-.3415 1.5595zm17.4572 8.425c-1.077 0-2.052-.2767-2.926-.8305-.867-.5598-1.556-1.381-2.067-2.4638-.504-1.0889-.756-2.4238-.756-4.0049 0-1.6241.261-2.9744.784-4.051.523-1.0828 1.218-1.8917 2.086-2.427.873-.5413 1.83-.812 2.869-.812.794 0 1.455.1353 1.984.406.536.2646.966.5968 1.292.9966.333.3937.585.7813.757 1.1627h.12v-7.10542h3.922v18.89872h-3.876v-2.2701h-.166c-.185.3937-.446.7844-.784 1.172-.333.3814-.766.6981-1.301.9504-.53.2523-1.176.3783-1.938.3783zm1.246-3.1282c.633 0 1.168-.1722 1.605-.5167.443-.3507.781-.8398 1.015-1.4673.24-.6275.36-1.3626.36-2.2054s-.117-1.5749-.351-2.1963c-.233-.6213-.572-1.1012-1.015-1.4395-.442-.3384-.981-.5076-1.614-.5076-.646 0-1.191.1754-1.634.526-.443.3507-.778.8367-1.006 1.458-.227.6214-.341 1.3412-.341 2.1594 0 .8243.114 1.5533.341 2.187.234.6275.569 1.1196 1.006 1.4764.443.3507.988.526 1.634.526zm10.051 2.8976v-14.174h3.931v14.174zm1.984-16.00116c-.584 0-1.086-.19379-1.504-.58137-.418-.39372-.628-.86435-.628-1.41187 0-.54137.21-1.00584.628-1.39339.418-.39373.916-.59059 1.495-.59059.59 0 1.092.19686 1.504.59059.418.38755.627.85202.627 1.39339 0 .54752-.209 1.01815-.627 1.41187-.412.38758-.911.58137-1.495.58137zm12.718 1.82716v2.9529h-8.748v-2.9529zm-6.745 14.174v-15.19835c0-1.02737.2-1.8794.6-2.55611.406-.67671.959-1.18426 1.66-1.52261.702-.33836 1.498-.50753 2.39-.50753.603 0 1.154.04613 1.652.13842.505.09227.88.17532 1.126.24914l-.701 2.95293c-.154-.04922-.345-.09535-.572-.13842-.222-.04307-.449-.06459-.683-.06459-.578 0-.981.13534-1.209.40602-.228.26454-.341.63672-.341 1.11657v15.12453zm11.574 5.2876c-.499 0-.966-.04-1.403-.1199-.431-.0739-.787-.1661-1.07-.277l.886-2.9437c.695.2154 1.279.2706 1.753.1663.48-.0986.858-.4678 1.135-1.1075l.231-.5998-5.085-14.58h4.134l2.935 10.409h.147l2.962-10.409 4.162.0184-5.509 15.6874c-.264.7567-.624 1.415-1.08 1.9747-.449.5661-1.018 1.0029-1.707 1.3104-.689.3137-1.519.4707-2.491.4707z",fill:"#000"}),(0,At.jsx)("path",{d:"m18.9306 6.53613h-17.994321v18.85127h17.994321z",fill:"#000"}),(0,At.jsx)("path",{d:"m25.5.823639h-12.2819v12.281861h12.2819z",fill:"#37c2a2"})]})}),(0,At.jsx)("h3",{className:"text-xl md:leading-3",children:(0,It.__)("You're out of imports","extendify-sdk")}),(0,At.jsx)("p",{className:"text-sm text-black",children:(0,It.__)("Sign up today and get unlimited access to our entire collection of patterns and page layouts.","extendify-sdk")}),(0,At.jsx)("div",{children:(0,At.jsxs)(hi,{tagName:"a",target:"_blank",className:"m-auto mt-10",href:"https://extendify.com/pricing/?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=no-imports-modal&utm_content=get-unlimited-imports"),rel:"noreferrer",children:[(0,It.__)("Get Unlimited Imports","extendify-sdk"),(0,At.jsx)("svg",{fill:"none",height:"24",viewBox:"0 0 25 24",width:"25",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"m10.3949 8.7864 5.5476-.02507m0 0-.0476 5.52507m.0476-5.52507c-2.357 2.35707-5.4183 5.41827-7.68101 7.68097",stroke:"currentColor",strokeWidth:"1.5"})})]})})]}),right:(0,At.jsxs)("div",{className:"space-y-2",children:[(0,At.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,At.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.49271 18.0092C6.97815 17.1176 7.28413 15.9755 8.17569 15.4609C9.06724 14.946 10.2094 15.252 10.7243 16.1435C11.2389 17.0355 10.9329 18.1772 10.0413 18.6922C9.14978 19.2071 8.00764 18.9011 7.49271 18.0092V18.0092Z",fill:"currentColor"}),(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5073 6.12747C17.0218 7.01903 16.7158 8.16117 15.8243 8.67573C14.9327 9.19066 13.7906 8.88467 13.2757 7.99312C12.7611 7.10119 13.0671 5.95942 13.9586 5.44449C14.8502 4.92956 15.9923 5.23555 16.5073 6.12747V6.12747Z",fill:"currentColor"}),(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.60135 11.1355C5.11628 10.2439 6.25805 9.93793 7.14998 10.4525C8.04153 10.9674 8.34752 12.1096 7.83296 13.0011C7.31803 13.8927 6.17588 14.1987 5.28433 13.6841C4.39278 13.1692 4.08679 12.0274 4.60135 11.1355V11.1355Z",fill:"currentColor"}),(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.3986 13.0011C18.8837 13.8927 17.7419 14.1987 16.85 13.6841C15.9584 13.1692 15.6525 12.027 16.167 11.1355C16.682 10.2439 17.8241 9.93793 18.7157 10.4525C19.6072 10.9674 19.9132 12.1092 19.3986 13.0011V13.0011Z",fill:"currentColor"}),(0,At.jsx)("path",{d:"M9.10857 8.92594C10.1389 8.92594 10.9742 8.09066 10.9742 7.06029C10.9742 6.02992 10.1389 5.19464 9.10857 5.19464C8.0782 5.19464 7.24292 6.02992 7.24292 7.06029C7.24292 8.09066 8.0782 8.92594 9.10857 8.92594Z",fill:"currentColor"}),(0,At.jsx)("path",{d:"M14.8913 18.942C15.9217 18.942 16.7569 18.1067 16.7569 17.0763C16.7569 16.046 15.9217 15.2107 14.8913 15.2107C13.8609 15.2107 13.0256 16.046 13.0256 17.0763C13.0256 18.1067 13.8609 18.942 14.8913 18.942Z",fill:"currentColor"}),(0,At.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3841 13.0011C9.86951 12.1096 10.1755 10.9674 11.067 10.4525C11.9586 9.93793 13.1007 10.2439 13.6157 11.1355C14.1302 12.0274 13.8242 13.1692 12.9327 13.6841C12.0411 14.1987 10.899 13.8927 10.3841 13.0011V13.0011Z",fill:"currentColor"})]}),(0,At.jsx)("span",{className:"text-sm leading-none",children:(0,It.__)("Access to 100's of Patterns","extendify-sdk")})]}),(0,At.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,At.jsx)("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,At.jsx)("path",{d:"m6 4.75h12c.6904 0 1.25.55964 1.25 1.25v12c0 .6904-.5596 1.25-1.25 1.25h-12c-.69036 0-1.25-.5596-1.25-1.25v-12c0-.69036.55964-1.25 1.25-1.25z"}),(0,At.jsx)("path",{d:"m9.25 19v-14"})]})}),(0,At.jsx)("span",{className:"text-sm leading-none",children:(0,It.__)("Beautiful full page layouts","extendify-sdk")})]}),(0,At.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,At.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)("circle",{cx:"12",cy:"12",r:"7.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,At.jsx)("circle",{cx:"12",cy:"12",r:"4.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,At.jsx)("circle",{cx:"11.9999",cy:"12.2",r:"6",transform:"rotate(-45 11.9999 12.2)",stroke:"currentColor",strokeWidth:"3",strokeDasharray:"1.5 4"})]}),(0,At.jsx)("span",{className:"text-sm leading-none",children:(0,It.__)("Fast and friendly support","extendify-sdk")})]}),(0,At.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,At.jsx)("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"m11.7758 3.45425c.0917-.18582.3567-.18581.4484 0l2.3627 4.78731c.0364.07379.1068.12493.1882.13676l5.2831.76769c.2051.02979.287.28178.1386.42642l-3.8229 3.72637c-.0589.0575-.0858.1402-.0719.2213l.9024 5.2618c.0351.2042-.1793.36-.3627.2635l-4.7254-2.4842c-.0728-.0383-.1598-.0383-.2326 0l-4.7254 2.4842c-.18341.0965-.39776-.0593-.36274-.2635l.90247-5.2618c.01391-.0811-.01298-.1638-.0719-.2213l-3.8229-3.72637c-.14838-.14464-.0665-.39663.13855-.42642l5.28312-.76769c.08143-.01183.15182-.06297.18823-.13676z",fill:"currentColor"})}),(0,At.jsx)("span",{className:"text-sm leading-none",children:(0,It.__)("14-Day guarantee","extendify-sdk")})]})]})})]})}function Ni(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Ai(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Ni(o,r,i,s,a,"next",e)}function a(e){Ni(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Pi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ti(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ti(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mi(){var e=tr(),t=K((function(e){return e.templates})),n=K((function(e){return e.setActive})),i=K((function(e){return e.appendTemplates})),o=Pi((0,r.useState)(""),2),s=o[0],a=o[1],l=Pi((0,r.useState)(!1),2),c=l[0],u=l[1],d=Pi(er(),2),f=d[0],p=d[1],h=K((function(e){return e.updateSearchParams})),m=K((function(e){return e.searchParams})),x=(0,r.useRef)(K.getState().nextPage),y=(0,r.useRef)(K.getState().searchParams);(0,r.useEffect)((function(){return K.subscribe((function(e){return x.current=e}),(function(e){return e.nextPage}))}),[]),(0,r.useEffect)((function(){return K.subscribe((function(e){return y.current=e}),(function(e){return e.searchParams}))}),[]);var v=(0,r.useCallback)(Ai(w().mark((function t(){var n,r;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a(""),u(!1),t.next=4,Dn(y.current,{offset:x.current}).catch((function(e){console.error(e),a(e&&e.message?e.message:(0,It.__)("Unknown error occured. Check browser console or contact support.","extendify-sdk"))}));case 4:if(r=t.sent,e.current){t.next=7;break}return t.abrupt("return");case 7:null!=r&&null!==(n=r.error)&&void 0!==n&&n.length&&a(null==r?void 0:r.error),null!=r&&r.records&&m===y.current&&(K.setState({nextPage:r.offset}),i(r.records),u(r.records.length<=0));case 9:case"end":return t.stop()}}),t)}))),[m,i,e]);if((0,r.useEffect)((function(){Object.keys(y.current.taxonomies).length&&(K.getState().skipNextFetch?K.setState({skipNextFetch:!1}):v())}),[v,y]),(0,r.useEffect)((function(){p&&v()}),[p,v]),s.length)return(0,At.jsxs)("div",{className:"text-left",children:[(0,At.jsx)("h2",{className:"text-left",children:(0,It.__)("Server error","extendify-sdk")}),(0,At.jsx)("code",{className:"block max-w-xl p-4 mb-4",style:{minHeight:"10rem"},children:s}),(0,At.jsx)(kt.Button,{isTertiary:!0,onClick:function(){h({taxonomies:{},search:""}),v()},children:(0,It.__)("Press here to reload experience")})]});if(c)return(0,At.jsx)("h2",{className:"text-left",children:(0,It.__)("No results found.","extendify-sdk")});if(!t.length)return(0,At.jsx)("div",{className:"flex items-center justify-center w-full sm:mt-64",children:(0,At.jsx)(kt.Spinner,{})});return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(pr,{breakpointCols:{default:3,1320:2,860:1,599:2,400:1},className:"flex -ml-8 w-auto pb-40",columnClassName:"pl-8 bg-clip-padding",children:t.map((function(e){return"pattern"===m.type?(0,At.jsx)(Ei,{template:e},e.id):(0,At.jsx)(or,{template:e,setActiveTemplate:function(){return n(e)},imageLoaded:function(){}},e.id)}))}),K.getState().nextPage&&(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("div",{className:"-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text",ref:f,style:{zIndex:-1}}),(0,At.jsx)("div",{className:"my-4",children:(0,At.jsx)(kt.Spinner,{})})]})]})}const Ii=(0,At.jsxs)(bi,{viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)(vi,{d:"M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z",stroke:"currentColor",strokeWidth:"1.25",fill:"none"}),(0,At.jsx)(vi,{d:"M6.34684 9.72526C6.34684 9.18224 6.77716 8.74168 7.32018 8.74168C7.8632 8.74168 8.30377 9.18224 8.30377 9.72526C8.30377 10.2683 7.8632 10.6986 7.32018 10.6986C6.77716 10.6986 6.34684 10.2683 6.34684 9.72526Z",fill:"currentColor"}),(0,At.jsx)(vi,{d:"M7.9759 7.11261C7.93492 7.47121 7.67878 7.76834 7.32018 7.76834C6.95134 7.76834 6.70544 7.46097 6.6747 7.11261L6.34684 4.1721C6.28537 3.67006 6.81814 3.19876 7.32018 3.19876C7.82222 3.19876 8.35499 3.67006 8.30377 4.1721L7.9759 7.11261Z",fill:"currentColor"})]});const Li=(0,At.jsxs)(bi,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)(vi,{d:"m15.7919 7.73624h-11.67902v12.23516h11.67902z",fill:"#1e1e1e"}),(0,At.jsx)(vi,{d:"m20 4h-8v8h8z",fill:"#37c2a2"})]});const Ri=(0,At.jsxs)(bi,{viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)(vi,{d:"M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z",stroke:"white",strokeWidth:"1.25"}),(0,At.jsx)(vi,{d:"M7.32458 10.0998L4.82458 7.59977M7.32458 10.0998V3.79764V10.0998ZM7.32458 10.0998L9.82458 7.59977L7.32458 10.0998Z",stroke:"white",strokeWidth:"1.25"})]});const Fi=(0,At.jsx)(bi,{fill:"none",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)(vi,{clipRule:"evenodd",d:"m13 4c4.9545 0 9 4.04545 9 9 0 4.9545-4.0455 9-9 9-4.95455 0-9-4.0455-9-9 0-4.95455 4.04545-9 9-9zm5.0909 13.4545c-1.9545 3.8637-8.22726 3.8637-10.22726 0-.04546-.1818-.04546-.3636 0-.5454 2-3.8636 8.27276-3.8636 10.22726 0 .0909.1818.0909.3636 0 .5454zm-5.0909-8.90905c-1.2727 0-2.3182 1.04546-2.3182 2.31815 0 1.2728 1.0455 2.3182 2.3182 2.3182s2.3182-1.0454 2.3182-2.3182c0-1.27269-1.0455-2.31815-2.3182-2.31815z",fill:"currentColor",fillRule:"evenodd"})});const Di=(0,At.jsxs)(bi,{fill:"none",viewBox:"0 0 151 148",width:"151",xmlns:"http://www.w3.org/2000/svg",children:[(0,At.jsx)(xi,{cx:"65.6441",cy:"66.6114",fill:"#0b4a43",r:"65.3897"}),(0,At.jsxs)(yi,{fill:"#cbc3f5",stroke:"#0b4a43",children:[(0,At.jsx)(vi,{d:"m61.73 11.3928 3.0825 8.3304.1197.3234.3234.1197 8.3304 3.0825-8.3304 3.0825-.3234.1197-.1197.3234-3.0825 8.3304-3.0825-8.3304-.1197-.3234-.3234-.1197-8.3304-3.0825 8.3304-3.0825.3234-.1197.1197-.3234z",strokeWidth:"1.5"}),(0,At.jsx)(vi,{d:"m84.3065 31.2718c0 5.9939-12.4614 22.323-18.6978 22.323h-17.8958v56.1522c3.5249.9 11.6535 0 17.8958 0h6.2364c11.2074 3.33 36.0089 7.991 45.5529 0l-9.294-62.1623c-2.267-1.7171-5.949-6.6968-2.55-12.8786 3.4-6.1817 2.55-18.0406 0-24.5756-1.871-4.79616-8.3289-8.90882-14.4482-8.90882s-7.0825 4.00668-6.7993 6.01003z",strokeWidth:"1.75"}),(0,At.jsx)(gi,{height:"45.5077",rx:"9.13723",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 191.5074 -96.0026)",width:"18.2745",x:"143.755",y:"47.7524"}),(0,At.jsx)(gi,{height:"42.3038",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 241.97 -50.348)",width:"17.4735",x:"146.159",y:"95.811"}),(0,At.jsx)(gi,{height:"55.9204",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 213.1347 -85.5913)",width:"17.4735",x:"149.363",y:"63.7717"}),(0,At.jsx)(gi,{height:"51.1145",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 229.1545 -69.5715)",width:"17.4735",x:"149.363",y:"79.7915"}),(0,At.jsx)(vi,{d:"m75.7483 105.349c.9858-25.6313-19.2235-42.0514-32.8401-44.0538v12.0146c8.5438 1.068 24.8303 9.7642 24.8303 36.0442 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z",strokeWidth:"1.75"}),(0,At.jsx)(vi,{d:"m68.5388 109.354c.9858-25.6312-19.2234-42.0513-32.8401-44.0537v12.0147c8.5438 1.0679 24.8303 9.7641 24.8303 36.044 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z",strokeWidth:"1.75"})]})]});const Bi=function(){var e=B((function(e){return e.remainingImports})),t=B((function(e){return e.allowedImports})),n=e()>0?"has-imports":"no-imports",r="has-imports"===n?"bg-extendify-main hover:bg-extendify-main-dark":"bg-extendify-alert",i="has-imports"===n?Ri:Ii;return(0,At.jsxs)("a",{target:"_blank",rel:"noreferrer",className:Ot()(r,"flex w-full no-underline button-focus -mt-10 text-sm justify-between py-3 px-4 text-white rounded"),href:"https://www.extendify.com/pricing/?utm_source=".concat(encodeURIComponent(window.extendifySdkData.sdk_partner),"&utm_medium=library&utm_campaign=import-counter&utm_content=upgrade&utm_term=").concat(n),children:[(0,At.jsxs)("div",{className:"flex items-center space-x-2 no-underline",children:[(0,At.jsx)(mi,{icon:i,size:14}),(0,At.jsx)("span",{children:(0,It.sprintf)((0,It.__)("%s/%s Imports","extendify-sdk"),e(),Number(t))})]}),(0,At.jsx)("span",{className:"text-white no-underline font-medium outline-none",children:(0,It.__)("Upgrade","extendify-sdk")})]})};function Ui(e){var t=e.children,n=B((function(e){return e.apiKey}));return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsxs)("aside",{className:"flex-shrink-0 sm:pl-6 py-0 sm:py-6 relative",children:[(0,At.jsx)("div",{className:"sm:w-56 lg:w-64 sticky flex flex-col lg:h-full",children:t[0]}),(0,At.jsx)("div",{className:"hidden sm:flex flex-col absolute bottom-0 mb-6 w-64 text-left space-y-4",children:!n.length&&(0,At.jsx)(Bi,{})})]}),(0,At.jsx)("main",{id:"extendify-templates",className:"w-full smp:l-12 sm:pt-6 h-full overflow-hidden",children:t[1]})]})}function qi(){var e=K((function(e){return e.updateType})),t=Y((function(e){return e.currentType?e.currentType:y}));return(0,At.jsxs)("div",{className:"text-left w-full bg-white px-6 sm:px-0 pb-4 sm:pb-8 mt-px border-b sm:border-0",children:[(0,At.jsx)("h4",{className:"sr-only",children:(0,It.__)("Type select","extendify-sdk")}),(0,At.jsxs)("button",{type:"button",className:Ot()({"cursor-pointer p-3.5 space-x-2 inline-flex items-center border border-black button-focus":!0,"bg-gray-900 text-white":"pattern"===t,"bg-transparent text-black":"pattern"!==t}),onClick:function(){return e("pattern")},children:[(0,At.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"M1 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM0 1V5C0 5.55 0.45 6 1 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H1C0.45 0 0 0.45 0 1Z"})}),(0,At.jsx)("span",{className:"",children:(0,It.__)("Patterns","extendify-sdk")})]}),(0,At.jsxs)("button",{type:"button",className:Ot()({"cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px":!0,"bg-gray-900 text-white":"template"===t,"bg-transparent text-black":"template"!==t}),onClick:function(){return e("template")},children:[(0,At.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"M7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM1 13H4C4.55 13 5 12.55 5 12V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V12C0 12.55 0.45 13 1 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM6 1V5C6 5.55 6.45 6 7 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H7C6.45 0 6 0.45 6 1Z"})}),(0,At.jsx)("span",{className:"",children:(0,It.__)("Page layouts","extendify-sdk")})]})]})}function Vi(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function zi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $i(e){var t=e.actionCallback,n=e.initialFocus,i=B((function(e){return e.apiKey.length})),o=zi((0,r.useState)(""),2),s=o[0],a=o[1],l=zi((0,r.useState)(""),2),c=l[0],u=l[1],d=zi((0,r.useState)(""),2),f=d[0],p=d[1],h=zi((0,r.useState)("info"),2),m=h[0],x=h[1],y=zi((0,r.useState)(!1),2),v=y[0],g=y[1],b=zi((0,r.useState)(!1),2),j=b[0],k=b[1],S=(0,r.useRef)(null),O=(0,r.useRef)(null);(0,r.useEffect)((function(){return a(B.getState().email),function(){return x("info")}}),[]),(0,r.useEffect)((function(){var e;j&&(null==S||null===(e=S.current)||void 0===e||e.focus())}),[j]);var C=function(){var e,t=(e=w().mark((function e(t){var n,r,i,o,a;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),g(!0),p(""),e.next=5,_(s,c);case 5:if(n=e.sent,r=n.token,i=n.error,o=n.exception,void 0===(a=n.message)){e.next=15;break}return x("error"),g(!1),p(a.length?a:"Error: Are you interacting with the wrong server?"),e.abrupt("return");case 15:if(!i&&!o){e.next=20;break}return x("error"),g(!1),p(i.length?i:o),e.abrupt("return");case 20:if(r&&"string"==typeof r){e.next=25;break}return x("error"),g(!1),p((0,It.__)("Something went wrong","extendify-sdk")),e.abrupt("return");case 25:x("success"),p("Success!"),k(!0),g(!1),B.setState({email:s,apiKey:r});case 30:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Vi(o,r,i,s,a,"next",e)}function a(e){Vi(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}();return j?(0,At.jsxs)("section",{className:"w-80 space-y-8 text-center pt-2 pb-4",children:[(0,At.jsx)(mi,{icon:Di,size:148}),(0,At.jsx)("p",{className:"text-lg text-extendify-black text-center leading-extra-tight font-semibold",children:(0,It.__)("You've signed in to Extendify","extendify-sdk")}),(0,At.jsx)(kt.Button,{ref:S,className:"px-4 p-2 cursor-pointer text-center rounded bg-extendify-main text-white",onClick:t,children:(0,It.__)("View patterns","extendify-sdk")})]}):i?(0,At.jsxs)("section",{className:"space-y-8 w-full pb-2",children:[(0,At.jsx)("p",{className:"text-base text-extendify-black leading-extra-tight",children:(0,It.__)("Account","extendify-sdk")}),(0,At.jsxs)("div",{className:"flex justify-between items-center",children:[(0,At.jsxs)("div",{className:"flex items-center space-x-2 -ml-2",children:[(0,At.jsx)(mi,{icon:Fi,size:48}),(0,At.jsx)("p",{className:"text-extendify-black",children:null!=s&&s.length?s:(0,It.__)("Logged In","extendify-sdk")})]}),window.location.search.indexOf("DEVMODE")>-1&&(0,At.jsx)(kt.Button,{className:"px-4 py-3 cursor-pointer text-center rounded bg-extendify-main text-white",onClick:function(){u(""),B.setState({apiKey:""}),setTimeout((function(){var e;null==O||null===(e=O.current)||void 0===e||e.focus()}),0)},children:(0,It.__)("Sign out","extendify-sdk")})]})]}):(0,At.jsxs)("section",{className:"w-80 text-left space-y-8 pb-6",children:[(0,At.jsxs)("div",{children:[(0,At.jsx)("p",{className:"text-lg text-extendify-black text-center leading-extra-tight font-semibold",children:(0,It.__)("Sign in to Extendify","extendify-sdk")}),(0,At.jsxs)("p",{className:"text-sm text-extendify-gray text-center space-x-1 leading-extra-tight",children:[(0,At.jsx)("span",{children:(0,It.__)("Don't have an account?","extendify-sdk")}),(0,At.jsx)("a",{href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign-in-form&utm_content=sign-up"),target:"_blank",className:"underline hover:no-underline text-extendify-gray",rel:"noreferrer",children:(0,It.__)("Sign up","extendify-sdk")})]})]}),(0,At.jsxs)("form",{onSubmit:C,className:"space-y-2",children:[(0,At.jsxs)("div",{className:"flex items-center",children:[(0,At.jsx)("label",{className:"sr-only",htmlFor:"extendifysdk-login-email",children:(0,It.__)("Email address","extendify-sdk")}),(0,At.jsx)("input",{ref:n,id:"extendifysdk-login-email",name:"extendifysdk-login-email",type:"email",className:"border-2 p-2 w-full rounded",placeholder:(0,It.__)("Email address","extendify-sdk"),value:s.length?s:"",onChange:function(e){return a(e.target.value)}})]}),(0,At.jsxs)("div",{className:"flex items-center",children:[(0,At.jsx)("label",{className:"sr-only",htmlFor:"extendifysdk-login-license",children:(0,It.__)("License key","extendify-sdk")}),(0,At.jsx)("input",{ref:O,id:"extendifysdk-login-license",name:"extendifysdk-login-license",type:"text",className:"border-2 p-2 w-full rounded",placeholder:(0,It.__)("License key","extendify-sdk"),value:c,onChange:function(e){return u(e.target.value)}})]}),(0,At.jsx)("div",{className:"pt-2 flex justify-center",children:(0,At.jsxs)("button",{type:"submit",className:"relative p-2 py-3 w-64 max-w-full flex justify-center cursor-pointer text-center rounded bg-extendify-main text-base text-white ",children:[(0,At.jsx)("span",{children:(0,It.__)("Sign In","extendify-sdk")}),v&&(0,At.jsx)("div",{className:"absolute right-2.5",children:(0,At.jsx)(kt.Spinner,{})})]})}),f&&(0,At.jsx)("div",{className:Ot()({"border-gray-900 text-gray-900":"info"===m,"border-wp-alert-red text-wp-alert-red":"error"===m,"border-extendify-main text-extendify-main":"success"===m}),children:f}),(0,At.jsx)("div",{className:"text-center pt-4",children:(0,At.jsx)("a",{target:"_blank",rel:"noreferrer",href:"https://extendify.com/guides/sign-in?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign-in-form&utm_content=need-help"),className:"underline hover:no-underline text-sm text-extendify-gray",children:(0,It.__)("Need Help?","extendify-sdk")})})]})]})}function Wi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ji(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wi(Object(n),!0).forEach((function(t){Zi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gi=function(e){return(0,At.jsx)(kt.Button,Ji(Ji({},e),{},{icon:wi,className:"text-extendify-black opacity-75 hover:opacity-100",showTooltip:!1,label:(0,It.__)("Close dialog","extendify-sdk")}))},Ki=(0,r.forwardRef)((function(e,t){var n=e.isOpen,i=e.heading,o=e.onRequestClose,s=e.children,a=(0,r.useRef)(null);return(0,At.jsx)(Re.Root,{appear:!0,show:n,as:r.Fragment,children:(0,At.jsx)(jt,{as:"div",static:!0,open:n,initialFocus:null!=t?t:a,className:"extendify-sdk",onClose:o,children:(0,At.jsxs)("div",{className:"fixed z-high inset-0 flex",children:[(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-50 transition",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,At.jsx)(jt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-300 translate transform",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,At.jsx)("div",{className:"m-auto relative w-full",children:(0,At.jsxs)("div",{className:"bg-white shadow-modal items-center justify-center m-auto max-w-lg relative rounded-sm w-full",children:[i?(0,At.jsxs)("div",{className:"border-b flex justify-between items-center leading-none pl-6 py-2 pr-3",children:[(0,At.jsx)("span",{className:"text-base text-extendify-black whitespace-nowrap",children:i}),(0,At.jsx)(Gi,{onClick:o})]}):(0,At.jsx)("div",{className:"absolute block px-6 py-4 top-0 right-0 ",children:(0,At.jsx)(Gi,{ref:a,onClick:o})}),(0,At.jsx)("div",{children:s})]})})})]})})})}));function Yi(e){var t=e.isOpen,n=e.onClose,i=(0,r.useRef)(null);return(0,At.jsx)(Ki,{heading:(0,It.__)("Settings","extendify-sdk"),isOpen:t,ref:i,onRequestClose:n,children:(0,At.jsx)("div",{className:"flex p-6 justify-center",children:(0,At.jsx)($i,{initialFocus:i,actionCallback:n})})})}function Xi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Qi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eo(e){var t=e.className,n=Y((function(e){return e.setOpen})),i=Xi((0,r.useState)(!1),2),o=i[0],s=i[1];return(0,At.jsx)("div",{className:t,children:(0,At.jsxs)("div",{className:"flex justify-between items-center px-6 sm:pl-6 sm:pr-12 h-full",children:[(0,At.jsx)("div",{className:"flex space-x-12 h-full",children:(0,At.jsx)("div",{className:"bg-transparent flex items-center space-x-1.5 lg:w-64 -ml-1",children:(0,At.jsx)(mi,{icon:Li,size:40})})}),(0,At.jsxs)("div",{className:"space-x-2 transform sm:translate-x-6",children:[(0,At.jsx)(kt.Button,{onClick:function(){return s(!0)},icon:(0,At.jsx)(mi,{icon:Fi,size:24}),label:(0,It.__)("Settings","extendify-sdk")}),o&&(0,At.jsx)(Yi,{isOpen:o,onClose:function(){return s(!1)}}),(0,At.jsx)(kt.Button,{onClick:function(){return n(!1)},icon:(0,At.jsx)(mi,{icon:wi,size:24}),label:(0,It.__)("Close library","extendify-sdk")})]})]})})}function to(){return(0,At.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto",children:[(0,At.jsx)(eo,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"}),(0,At.jsxs)("div",{className:"w-full flex-grow overflow-hidden",children:[(0,At.jsx)("button",{onClick:function(){return document.getElementById("extendify-templates").querySelector("button").focus()},className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,It.__)("Skip to content","extendify-sdk")}),(0,At.jsx)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:(0,At.jsxs)(Ui,{children:[(0,At.jsx)(An,{}),(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(qi,{}),(0,At.jsx)("div",{className:"relative h-full z-30 bg-white",children:(0,At.jsx)("div",{className:"absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40",children:(0,At.jsx)(Mi,{})})})]})]})})]})]})}function no(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ro(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ro(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var io=oi(["NeedsRegistrationModal","hasRequiredPlugins","hasPluginsActivated"]);function oo(e){var t=e.template,n=(0,r.useRef)(null),i=K((function(e){return e.activeTemplateBlocks})),o=B((function(e){return e.canImport})),s=B((function(e){return e.apiKey})),a=Y((function(e){return e.setOpen})),l=no((0,r.useState)(!1),2),c=l[0],u=l[1],d=no((0,r.useState)(!1),2),f=d[0],p=d[1],h=Or((function(e){return e.setWanted}));(0,r.useEffect)((function(){return io.check(t).then((function(){return p(!0)})),function(){return io.reset()&&p(!1)}}),[t]),(0,r.useEffect)((function(){!c&&n.current&&n.current.focus()}),[n,c,f]);var m=function(){Un(t),u(!0),h(t),si(io.stack).then((function(){setTimeout((function(){ui(i,t).then((function(){return a(!1)})).then((function(){return(0,r.render)((0,At.jsx)(Fo,{}),document.getElementById("extendify-root"))})).then((function(){return setTimeout((function(){return Y.setState({currentPage:"main"})}),500)}))}),100)}))};return f&&Object.keys(i).length?s||o()?c?(0,At.jsx)("button",{type:"button",disabled:!0,className:"components-button is-secondary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){},children:(0,It.__)("Importing...","extendify-sdk")}):(0,At.jsx)("button",{ref:n,type:"button",className:"components-button is-primary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){return m()},children:(0,It.sprintf)((0,It.__)("Add %s","extendify-sdk"),t.fields.type)}):(0,At.jsx)("a",{ref:n,className:"button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign_up&utm_content=single_page"),rel:"noreferrer",children:(0,It.__)("Sign up now","extendify-sdk")}):""}function so(e){var t=e.categories,n=e.styles,r=e.types,i=e.requiredPlugins;return(0,At.jsxs)(At.Fragment,{children:[t&&(0,At.jsxs)("div",{className:"w-full pb-4",children:[(0,At.jsx)("h3",{className:"text-sm m-0 mb-2",children:(0,It.__)("Categories:","extendify-sdk")}),(0,At.jsx)("div",{children:t.join(", ")})]}),n&&(0,At.jsxs)("div",{className:"w-full py-4",children:[(0,At.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,It.__)("Styles:","extendify-sdk")}),(0,At.jsx)("div",{children:n.join(", ")})]}),r&&(0,At.jsxs)("div",{className:"w-full py-4",children:[(0,At.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,It.__)("Types:","extendify-sdk")}),(0,At.jsx)("div",{children:r.join(", ")})]}),i.filter((function(e){return"editorplus"!==e})).length>0&&(0,At.jsxs)("div",{className:"pt-4 w-full",children:[(0,At.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,It.__)("Required Plugins:","extendify-sdk")}),(0,At.jsx)("div",{children:i.filter((function(e){return"editorplus"!==e})).map((function(e){return Et(e)})).join(", ")})]}),(0,At.jsx)("div",{className:"py-4 mt-4",children:(0,At.jsx)("a",{href:"https://extendify.com/what-happens-when-a-template-is-added?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sidebar"),rel:"noreferrer",target:"_blank",children:(0,It.__)("What happens when a page layout is added?","extendify-sdk")})})]})}function ao(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function lo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return co(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return co(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function co(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var uo=new Map;function fo(e){var t,n,i,o,s,a,l,c=e.template,u=c.fields,d=u.tax_categories,f=u.required_plugins,p=u.tax_style,h=u.tax_pattern_types,m=B((function(e){return e.apiKey})),x=lo((0,r.useState)([]),2),y=x[0],v=x[1],g=lo((0,r.useState)([]),2),b=g[0],j=g[1],k=tr(),S=K((function(e){return e.setActive})),O=function(e){v([]),j([]),requestAnimationFrame((function(){return S(e)}))},_=(0,r.useCallback)(function(){var e,t=(e=w().mark((function e(t,n){var r,i;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="".concat(c.id,"|").concat(t,"|").concat(n),!uo.has(r)){e.next=3;break}return e.abrupt("return",uo.get(r));case 3:return e.next=5,Bn(c,t,n);case 5:return i=e.sent,uo.set(r,i),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){ao(o,r,i,s,a,"next",e)}function a(e){ao(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e,n){return t.apply(this,arguments)}}(),[c]);return(0,r.useEffect)((function(){qn(c)}),[c]),(0,r.useEffect)((function(){_("related","pattern").then((function(e){k.current&&v(e)}))}),[c,_,k]),(0,At.jsxs)("div",{className:"flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px",children:[(0,At.jsxs)("div",{className:"lg:sticky top-0 bg-white flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl lg:border-b border-gray-300",children:[(0,At.jsx)("div",{className:"text-left m-0 h-full px-6 sm:p-0",children:(0,At.jsx)("h1",{className:"leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal",children:c.fields.display_title})}),(0,At.jsx)("div",{className:Ot()({"inline-flex sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3":!0,"top-16 mt-5":!m.length,"top-0":m.length>0}),children:(0,At.jsx)(oo,{template:c})})]}),(0,At.jsx)("div",{className:"max-w-screen-xl sm:w-full sm:m-0 sm:mb-8 m-6 border lg:border-t-0 border-gray-300 m-46",children:(0,At.jsx)("img",{className:"max-w-full w-full block",src:null!==(t=null==c||null===(n=c.fields)||void 0===n||null===(i=n.screenshot[0])||void 0===i||null===(o=i.thumbnails)||void 0===o||null===(s=o.full)||void 0===s?void 0:s.url)&&void 0!==t?t:null==c||null===(a=c.fields)||void 0===a||null===(l=a.screenshot[0])||void 0===l?void 0:l.url})}),(0,At.jsxs)("div",{className:"divide-y p-6 sm:p-0 mb-16",children:[y.length>0&&(0,At.jsxs)("section",{className:"mb-4",children:[(0,At.jsx)("h4",{className:"text-lg m-0 mb-4 text-left font-semibold",children:(0,It.__)("Related","extendify-sdk")}),(0,At.jsx)("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 gap-6",children:y.map((function(e){var t,n,r,i,o,s,a;return(0,At.jsx)("button",{type:"button",className:"min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer",onClick:function(){return O(e)},children:(0,At.jsx)("img",{className:"max-w-full block p-0 m-0 object-cover",src:null!==(t=null==e||null===(n=e.fields)||void 0===n||null===(r=n.screenshot[0])||void 0===r||null===(i=r.thumbnails)||void 0===i||null===(o=i.large)||void 0===o?void 0:o.url)&&void 0!==t?t:null==e||null===(s=e.fields)||void 0===s||null===(a=s.screenshot[0])||void 0===a?void 0:a.url})},e.id)}))})]}),b.length>0&&(0,At.jsxs)("section",{className:"mb-4 pt-6",children:[(0,At.jsx)("h4",{className:"text-lg m-0 mb-4 text-left font-semibold",children:(0,It.__)("Alternatives","extendify-sdk")}),(0,At.jsx)("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 gap-6",children:b.map((function(e){var t,n,r,i,o,s,a;return(0,At.jsx)("button",{type:"button",className:"min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer",onClick:function(){return O(e)},children:(0,At.jsx)("img",{className:"max-w-full block p-0 m-0 object-cover",src:null!==(t=null==e||null===(n=e.fields)||void 0===n||null===(r=n.screenshot[0])||void 0===r||null===(i=r.thumbnails)||void 0===i||null===(o=i.large)||void 0===o?void 0:o.url)&&void 0!==t?t:null==e||null===(s=e.fields)||void 0===s||null===(a=s.screenshot[0])||void 0===a?void 0:a.url})},e.id)}))})]})]}),(0,At.jsx)("div",{className:"text-xs text-left p-6 w-full block sm:hidden divide-y",children:(0,At.jsx)(so,{categories:d,types:h,requiredPlugins:f,styles:p})})]})}function po(e){var t=e.template,n=K((function(e){return e.setActive})),r=t.fields,i=r.tax_categories,o=r.required_plugins,s=r.tax_style,a=r.tax_pattern_types,l=B((function(e){return e.apiKey}));return(0,At.jsxs)("div",{className:"flex flex-col items-start justify-start",children:[!l.length&&(0,At.jsxs)("div",{className:"h-full flex sm:hidden w-full p-4 justify-between border items-center border-gray-300 bg-extendify-lightest",children:[(0,At.jsx)("a",{className:"button-extendify-main",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign_up&utm_content=main"),rel:"noreferrer",children:(0,It.__)("Sign up today to get unlimited access","extendify-sdk")}),(0,At.jsx)("button",{className:"components-button",onClick:function(){return Y.setState({currentPage:"login"})},children:(0,It.__)("Log in","extendify-sdk")})]}),(0,At.jsx)("div",{className:"p-6 sm:p-0",children:(0,At.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){Y.setState({currentPage:"main"}),n({})},children:[(0,At.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,At.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,At.jsx)("span",{className:"ml-4",children:(0,It.__)("Go back","extendify-sdk")})]})}),(0,At.jsx)("div",{className:"text-left pt-14 divide-y w-full hidden sm:block",children:(0,At.jsx)(so,{categories:i,types:a,requiredPlugins:o,styles:s})})]})}function ho(){var e=K((function(e){return e.activeTemplate}));return(0,At.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto",children:[(0,At.jsx)(eo,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"}),(0,At.jsxs)("div",{className:"w-full flex-grow overflow-hidden",children:[(0,At.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,It.__)("Skip to content","extendify-sdk")}),(0,At.jsx)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:(0,At.jsx)("div",{className:"absolute bg-white sm:flex inset-0 z-50 sm:space-x-12",children:(0,At.jsxs)(Ui,{children:[(0,At.jsx)(po,{template:e}),(0,At.jsx)(fo,{template:e})]})})})]})]})}function mo(e){switch(e.page){case"main":return(0,At.jsx)(to,{});case"single":return(0,At.jsx)(ho,{})}}const xo=(0,r.createElement)(bi,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(vi,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function yo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function go(){var e,t=yo((0,r.useState)(!(null!==(e=B.getState().noticesDismissedAt)&&void 0!==e&&e.welcome)),2),n=t[0],i=t[1],o=Y((function(e){return e.setOpen}));return n?(0,At.jsxs)("div",{className:"bg-extendify-secondary hidden lg:flex space-x-4 py-3 px-5 justify-center items-center relative",children:[(0,At.jsx)("span",{className:"text-black",children:(0,It.__)("Welcome to the Extendify Library","extendify-sdk")}),(0,At.jsx)("span",{className:"px-2 opacity-50","aria-hidden":"true",children:"|"}),(0,At.jsxs)("div",{className:"flex space-x-2 justify-center items-center",children:[(0,At.jsx)(kt.Button,{variant:"link",className:"text-black underline hover:no-underline p-0 h-auto",href:"https://extendify.com/welcome/?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=welcome-notice&utm_content=tell-me-more"),target:"_blank",children:(0,It.__)("Tell me more","extendify-sdk")}),(0,At.jsx)("span",{className:"font-bold","aria-hidden":"true",children:"•"}),(0,At.jsx)(kt.Button,{variant:"link",className:"text-black underline hover:no-underline p-0 h-auto",onClick:function(){document.getElementById("extendify-templates-inserter-btn").classList.add("invisible"),B.setState({enabled:!1}),o(!1)},children:(0,It.__)("Turn off the library","extendify-sdk")})]}),(0,At.jsx)("div",{className:"absolute right-1",children:(0,At.jsx)(kt.Button,{className:"opacity-50 hover:opacity-100 focus:opacity-100 text-extendify-black",icon:(0,At.jsx)(mi,{icon:xo}),label:(0,It.__)("Dismiss this notice","extendify-sdk"),onClick:function(){i(!1),B.setState({noticesDismissedAt:{welcome:(new Date).toISOString()}})},showTooltip:!1})})]}):null}function bo(){var e=(0,r.useRef)(null),t=Y((function(e){return e.open})),n=Y((function(e){return e.setOpen})),i=Y((function(e){return e.currentPage}));return(0,At.jsx)(Re.Root,{show:t,as:r.Fragment,children:(0,At.jsx)(jt,{as:"div",static:!0,className:"extendify-sdk",initialFocus:e,onClose:function(){return n(!1)},children:(0,At.jsx)("div",{className:"h-screen w-screen sm:h-auto m-auto sm:w-auto fixed z-high inset-0 overflow-y-auto",children:(0,At.jsxs)("div",{className:"flex h-full overflow-hidden p-4 lg:p-20 text-center w-full",children:[(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-50 transition",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,At.jsx)(jt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,At.jsx)(Re.Child,{as:r.Fragment,enter:"ease-out duration-300 translate transform",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,At.jsxs)("div",{ref:e,tabIndex:"0",className:"max-w-8xl mx-auto w-full",children:[(0,At.jsx)(mo,{page:i}),(0,At.jsx)(go,{})]})})]})})})})}const wo=wp.compose,jo=wp.hooks,ko=JSON.parse('{"t":["ext-absolute","ext-relative","ext-top-base","ext-top-lg","ext--top-base","ext--top-lg","ext-right-base","ext-right-lg","ext--right-base","ext--right-lg","ext-bottom-base","ext-bottom-lg","ext--bottom-base","ext--bottom-lg","ext-left-base","ext-left-lg","ext--left-base","ext--left-lg","ext-order-1","ext-order-2","ext-col-auto","ext-col-span-1","ext-col-span-2","ext-col-span-3","ext-col-span-4","ext-col-span-5","ext-col-span-6","ext-col-span-7","ext-col-span-8","ext-col-span-9","ext-col-span-10","ext-col-span-11","ext-col-span-12","ext-col-span-full","ext-col-start-1","ext-col-start-2","ext-col-start-3","ext-col-start-4","ext-col-start-5","ext-col-start-6","ext-col-start-7","ext-col-start-8","ext-col-start-9","ext-col-start-10","ext-col-start-11","ext-col-start-12","ext-col-start-13","ext-col-start-auto","ext-col-end-1","ext-col-end-2","ext-col-end-3","ext-col-end-4","ext-col-end-5","ext-col-end-6","ext-col-end-7","ext-col-end-8","ext-col-end-9","ext-col-end-10","ext-col-end-11","ext-col-end-12","ext-col-end-13","ext-col-end-auto","ext-row-auto","ext-row-span-1","ext-row-span-2","ext-row-span-3","ext-row-span-4","ext-row-span-5","ext-row-span-6","ext-row-span-full","ext-row-start-1","ext-row-start-2","ext-row-start-3","ext-row-start-4","ext-row-start-5","ext-row-start-6","ext-row-start-7","ext-row-start-auto","ext-row-end-1","ext-row-end-2","ext-row-end-3","ext-row-end-4","ext-row-end-5","ext-row-end-6","ext-row-end-7","ext-row-end-auto","ext-m-0","ext-m-auto","ext-m-base","ext-m-lg","ext--m-base","ext--m-lg","ext-mx-0","ext-mx-auto","ext-mx-base","ext-mx-lg","ext--mx-base","ext--mx-lg","ext-my-0","ext-my-auto","ext-my-base","ext-my-lg","ext--my-base","ext--my-lg","ext-mt-0","ext-mt-auto","ext-mt-base","ext-mt-lg","ext--mt-base","ext--mt-lg","ext-mr-0","ext-mr-auto","ext-mr-base","ext-mr-lg","ext--mr-base","ext--mr-lg","ext-mb-0","ext-mb-auto","ext-mb-base","ext-mb-lg","ext--mb-base","ext--mb-lg","ext-ml-0","ext-ml-auto","ext-ml-base","ext-ml-lg","ext--ml-base","ext--ml-lg","ext-block","ext-inline-block","ext-inline","ext-flex","ext-inline-flex","ext-grid","ext-inline-grid","ext-hidden","ext-w-auto","ext-w-full","ext-max-w-full","ext-flex-1","ext-flex-auto","ext-flex-initial","ext-flex-none","ext-flex-shrink-0","ext-flex-shrink","ext-flex-grow-0","ext-flex-grow","ext-list-none","ext-grid-cols-1","ext-grid-cols-2","ext-grid-cols-3","ext-grid-cols-4","ext-grid-cols-5","ext-grid-cols-6","ext-grid-cols-7","ext-grid-cols-8","ext-grid-cols-9","ext-grid-cols-10","ext-grid-cols-11","ext-grid-cols-12","ext-grid-cols-none","ext-grid-rows-1","ext-grid-rows-2","ext-grid-rows-3","ext-grid-rows-4","ext-grid-rows-5","ext-grid-rows-6","ext-grid-rows-none","ext-flex-row","ext-flex-row-reverse","ext-flex-col","ext-flex-col-reverse","ext-flex-wrap","ext-flex-wrap-reverse","ext-flex-nowrap","ext-items-start","ext-items-end","ext-items-center","ext-items-baseline","ext-items-stretch","ext-justify-start","ext-justify-end","ext-justify-center","ext-justify-between","ext-justify-around","ext-justify-evenly","ext-justify-items-start","ext-justify-items-end","ext-justify-items-center","ext-justify-items-stretch","ext-gap-0","ext-gap-base","ext-gap-lg","ext-gap-x-0","ext-gap-x-base","ext-gap-x-lg","ext-gap-y-0","ext-gap-y-base","ext-gap-y-lg","ext-justify-self-auto","ext-justify-self-start","ext-justify-self-end","ext-justify-self-center","ext-justify-self-stretch","ext-rounded-none","ext-rounded-full","ext-rounded-t-none","ext-rounded-t-full","ext-rounded-r-none","ext-rounded-r-full","ext-rounded-b-none","ext-rounded-b-full","ext-rounded-l-none","ext-rounded-l-full","ext-rounded-tl-none","ext-rounded-tl-full","ext-rounded-tr-none","ext-rounded-tr-full","ext-rounded-br-none","ext-rounded-br-full","ext-rounded-bl-none","ext-rounded-bl-full","ext-border-0","ext-border-t-0","ext-border-r-0","ext-border-b-0","ext-border-l-0","ext-p-0","ext-p-base","ext-p-lg","ext-px-0","ext-px-base","ext-px-lg","ext-py-0","ext-py-base","ext-py-lg","ext-pt-0","ext-pt-base","ext-pt-lg","ext-pr-0","ext-pr-base","ext-pr-lg","ext-pb-0","ext-pb-base","ext-pb-lg","ext-pl-0","ext-pl-base","ext-pl-lg","ext-text-left","ext-text-center","ext-text-right","ext-leading-none","ext-leading-tight","ext-leading-snug","ext-leading-normal","ext-leading-relaxed","ext-leading-loose","clip-path--rhombus","clip-path--diamond","clip-path--rhombus-alt","tablet\\\\:fullwidth-cols","desktop\\\\:fullwidth-cols","direction-rtl","direction-ltr","bring-to-front","text-stroke","text-stroke--primary","text-stroke--secondary","editor\\\\:no-caption","editor\\\\:no-inserter","editor\\\\:no-resize","editor\\\\:pointer-events-none","tablet\\\\:ext-absolute","tablet\\\\:ext-relative","tablet\\\\:ext-top-base","tablet\\\\:ext-top-lg","tablet\\\\:ext--top-base","tablet\\\\:ext--top-lg","tablet\\\\:ext-right-base","tablet\\\\:ext-right-lg","tablet\\\\:ext--right-base","tablet\\\\:ext--right-lg","tablet\\\\:ext-bottom-base","tablet\\\\:ext-bottom-lg","tablet\\\\:ext--bottom-base","tablet\\\\:ext--bottom-lg","tablet\\\\:ext-left-base","tablet\\\\:ext-left-lg","tablet\\\\:ext--left-base","tablet\\\\:ext--left-lg","tablet\\\\:ext-order-1","tablet\\\\:ext-order-2","tablet\\\\:ext-m-0","tablet\\\\:ext-m-auto","tablet\\\\:ext-m-base","tablet\\\\:ext-m-lg","tablet\\\\:ext--m-base","tablet\\\\:ext--m-lg","tablet\\\\:ext-mx-0","tablet\\\\:ext-mx-auto","tablet\\\\:ext-mx-base","tablet\\\\:ext-mx-lg","tablet\\\\:ext--mx-base","tablet\\\\:ext--mx-lg","tablet\\\\:ext-my-0","tablet\\\\:ext-my-auto","tablet\\\\:ext-my-base","tablet\\\\:ext-my-lg","tablet\\\\:ext--my-base","tablet\\\\:ext--my-lg","tablet\\\\:ext-mt-0","tablet\\\\:ext-mt-auto","tablet\\\\:ext-mt-base","tablet\\\\:ext-mt-lg","tablet\\\\:ext--mt-base","tablet\\\\:ext--mt-lg","tablet\\\\:ext-mr-0","tablet\\\\:ext-mr-auto","tablet\\\\:ext-mr-base","tablet\\\\:ext-mr-lg","tablet\\\\:ext--mr-base","tablet\\\\:ext--mr-lg","tablet\\\\:ext-mb-0","tablet\\\\:ext-mb-auto","tablet\\\\:ext-mb-base","tablet\\\\:ext-mb-lg","tablet\\\\:ext--mb-base","tablet\\\\:ext--mb-lg","tablet\\\\:ext-ml-0","tablet\\\\:ext-ml-auto","tablet\\\\:ext-ml-base","tablet\\\\:ext-ml-lg","tablet\\\\:ext--ml-base","tablet\\\\:ext--ml-lg","tablet\\\\:ext-block","tablet\\\\:ext-inline-block","tablet\\\\:ext-inline","tablet\\\\:ext-flex","tablet\\\\:ext-inline-flex","tablet\\\\:ext-grid","tablet\\\\:ext-inline-grid","tablet\\\\:ext-hidden","tablet\\\\:ext-w-auto","tablet\\\\:ext-w-full","tablet\\\\:ext-max-w-full","tablet\\\\:ext-flex-1","tablet\\\\:ext-flex-auto","tablet\\\\:ext-flex-initial","tablet\\\\:ext-flex-none","tablet\\\\:ext-flex-shrink-0","tablet\\\\:ext-flex-shrink","tablet\\\\:ext-flex-grow-0","tablet\\\\:ext-flex-grow","tablet\\\\:ext-list-none","tablet\\\\:ext-grid-cols-1","tablet\\\\:ext-grid-cols-2","tablet\\\\:ext-grid-cols-3","tablet\\\\:ext-grid-cols-4","tablet\\\\:ext-grid-cols-5","tablet\\\\:ext-grid-cols-6","tablet\\\\:ext-grid-cols-7","tablet\\\\:ext-grid-cols-8","tablet\\\\:ext-grid-cols-9","tablet\\\\:ext-grid-cols-10","tablet\\\\:ext-grid-cols-11","tablet\\\\:ext-grid-cols-12","tablet\\\\:ext-grid-cols-none","tablet\\\\:ext-flex-row","tablet\\\\:ext-flex-row-reverse","tablet\\\\:ext-flex-col","tablet\\\\:ext-flex-col-reverse","tablet\\\\:ext-flex-wrap","tablet\\\\:ext-flex-wrap-reverse","tablet\\\\:ext-flex-nowrap","tablet\\\\:ext-items-start","tablet\\\\:ext-items-end","tablet\\\\:ext-items-center","tablet\\\\:ext-items-baseline","tablet\\\\:ext-items-stretch","tablet\\\\:ext-justify-start","tablet\\\\:ext-justify-end","tablet\\\\:ext-justify-center","tablet\\\\:ext-justify-between","tablet\\\\:ext-justify-around","tablet\\\\:ext-justify-evenly","tablet\\\\:ext-justify-items-start","tablet\\\\:ext-justify-items-end","tablet\\\\:ext-justify-items-center","tablet\\\\:ext-justify-items-stretch","tablet\\\\:ext-justify-self-auto","tablet\\\\:ext-justify-self-start","tablet\\\\:ext-justify-self-end","tablet\\\\:ext-justify-self-center","tablet\\\\:ext-justify-self-stretch","tablet\\\\:ext-p-0","tablet\\\\:ext-p-base","tablet\\\\:ext-p-lg","tablet\\\\:ext-px-0","tablet\\\\:ext-px-base","tablet\\\\:ext-px-lg","tablet\\\\:ext-py-0","tablet\\\\:ext-py-base","tablet\\\\:ext-py-lg","tablet\\\\:ext-pt-0","tablet\\\\:ext-pt-base","tablet\\\\:ext-pt-lg","tablet\\\\:ext-pr-0","tablet\\\\:ext-pr-base","tablet\\\\:ext-pr-lg","tablet\\\\:ext-pb-0","tablet\\\\:ext-pb-base","tablet\\\\:ext-pb-lg","tablet\\\\:ext-pl-0","tablet\\\\:ext-pl-base","tablet\\\\:ext-pl-lg","tablet\\\\:ext-text-left","tablet\\\\:ext-text-center","tablet\\\\:ext-text-right","desktop\\\\:ext-absolute","desktop\\\\:ext-relative","desktop\\\\:ext-top-base","desktop\\\\:ext-top-lg","desktop\\\\:ext--top-base","desktop\\\\:ext--top-lg","desktop\\\\:ext-right-base","desktop\\\\:ext-right-lg","desktop\\\\:ext--right-base","desktop\\\\:ext--right-lg","desktop\\\\:ext-bottom-base","desktop\\\\:ext-bottom-lg","desktop\\\\:ext--bottom-base","desktop\\\\:ext--bottom-lg","desktop\\\\:ext-left-base","desktop\\\\:ext-left-lg","desktop\\\\:ext--left-base","desktop\\\\:ext--left-lg","desktop\\\\:ext-order-1","desktop\\\\:ext-order-2","desktop\\\\:ext-m-0","desktop\\\\:ext-m-auto","desktop\\\\:ext-m-base","desktop\\\\:ext-m-lg","desktop\\\\:ext--m-base","desktop\\\\:ext--m-lg","desktop\\\\:ext-mx-0","desktop\\\\:ext-mx-auto","desktop\\\\:ext-mx-base","desktop\\\\:ext-mx-lg","desktop\\\\:ext--mx-base","desktop\\\\:ext--mx-lg","desktop\\\\:ext-my-0","desktop\\\\:ext-my-auto","desktop\\\\:ext-my-base","desktop\\\\:ext-my-lg","desktop\\\\:ext--my-base","desktop\\\\:ext--my-lg","desktop\\\\:ext-mt-0","desktop\\\\:ext-mt-auto","desktop\\\\:ext-mt-base","desktop\\\\:ext-mt-lg","desktop\\\\:ext--mt-base","desktop\\\\:ext--mt-lg","desktop\\\\:ext-mr-0","desktop\\\\:ext-mr-auto","desktop\\\\:ext-mr-base","desktop\\\\:ext-mr-lg","desktop\\\\:ext--mr-base","desktop\\\\:ext--mr-lg","desktop\\\\:ext-mb-0","desktop\\\\:ext-mb-auto","desktop\\\\:ext-mb-base","desktop\\\\:ext-mb-lg","desktop\\\\:ext--mb-base","desktop\\\\:ext--mb-lg","desktop\\\\:ext-ml-0","desktop\\\\:ext-ml-auto","desktop\\\\:ext-ml-base","desktop\\\\:ext-ml-lg","desktop\\\\:ext--ml-base","desktop\\\\:ext--ml-lg","desktop\\\\:ext-block","desktop\\\\:ext-inline-block","desktop\\\\:ext-inline","desktop\\\\:ext-flex","desktop\\\\:ext-inline-flex","desktop\\\\:ext-grid","desktop\\\\:ext-inline-grid","desktop\\\\:ext-hidden","desktop\\\\:ext-w-auto","desktop\\\\:ext-w-full","desktop\\\\:ext-max-w-full","desktop\\\\:ext-flex-1","desktop\\\\:ext-flex-auto","desktop\\\\:ext-flex-initial","desktop\\\\:ext-flex-none","desktop\\\\:ext-flex-shrink-0","desktop\\\\:ext-flex-shrink","desktop\\\\:ext-flex-grow-0","desktop\\\\:ext-flex-grow","desktop\\\\:ext-list-none","desktop\\\\:ext-grid-cols-1","desktop\\\\:ext-grid-cols-2","desktop\\\\:ext-grid-cols-3","desktop\\\\:ext-grid-cols-4","desktop\\\\:ext-grid-cols-5","desktop\\\\:ext-grid-cols-6","desktop\\\\:ext-grid-cols-7","desktop\\\\:ext-grid-cols-8","desktop\\\\:ext-grid-cols-9","desktop\\\\:ext-grid-cols-10","desktop\\\\:ext-grid-cols-11","desktop\\\\:ext-grid-cols-12","desktop\\\\:ext-grid-cols-none","desktop\\\\:ext-flex-row","desktop\\\\:ext-flex-row-reverse","desktop\\\\:ext-flex-col","desktop\\\\:ext-flex-col-reverse","desktop\\\\:ext-flex-wrap","desktop\\\\:ext-flex-wrap-reverse","desktop\\\\:ext-flex-nowrap","desktop\\\\:ext-items-start","desktop\\\\:ext-items-end","desktop\\\\:ext-items-center","desktop\\\\:ext-items-baseline","desktop\\\\:ext-items-stretch","desktop\\\\:ext-justify-start","desktop\\\\:ext-justify-end","desktop\\\\:ext-justify-center","desktop\\\\:ext-justify-between","desktop\\\\:ext-justify-around","desktop\\\\:ext-justify-evenly","desktop\\\\:ext-justify-items-start","desktop\\\\:ext-justify-items-end","desktop\\\\:ext-justify-items-center","desktop\\\\:ext-justify-items-stretch","desktop\\\\:ext-justify-self-auto","desktop\\\\:ext-justify-self-start","desktop\\\\:ext-justify-self-end","desktop\\\\:ext-justify-self-center","desktop\\\\:ext-justify-self-stretch","desktop\\\\:ext-p-0","desktop\\\\:ext-p-base","desktop\\\\:ext-p-lg","desktop\\\\:ext-px-0","desktop\\\\:ext-px-base","desktop\\\\:ext-px-lg","desktop\\\\:ext-py-0","desktop\\\\:ext-py-base","desktop\\\\:ext-py-lg","desktop\\\\:ext-pt-0","desktop\\\\:ext-pt-base","desktop\\\\:ext-pt-lg","desktop\\\\:ext-pr-0","desktop\\\\:ext-pr-base","desktop\\\\:ext-pr-lg","desktop\\\\:ext-pb-0","desktop\\\\:ext-pb-base","desktop\\\\:ext-pb-lg","desktop\\\\:ext-pl-0","desktop\\\\:ext-pl-base","desktop\\\\:ext-pl-lg","desktop\\\\:ext-text-left","desktop\\\\:ext-text-center","desktop\\\\:ext-text-right"]}');function So(e){return function(e){if(Array.isArray(e))return Oo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Oo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oo(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_o(Object(n),!0).forEach((function(t){Eo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Eo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var No=(0,wo.createHigherOrderComponent)((function(e){return function(t){var n=t.attributes.extUtilities,r=ko.t.map((function(e){return e.replace(".","").replace(new RegExp("\\\\","g"),"")}));return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(e,Co({},t)),n&&(0,At.jsx)(di.InspectorAdvancedControls,{children:(0,At.jsx)(kt.FormTokenField,{label:(0,It.__)("Extendify Utilities","extendify-sdk"),tokenizeOnSpace:!0,value:n,suggestions:r,onChange:function(e){t.setAttributes({extUtilities:e})}})})]})}}),"utilityClassEdit");function Ao(e,t,n){var r=e.className,i=n.extUtilities,o=n.className;if(!i||!Object.keys(i).length)return e;var s=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return e.split(" ");case"[object Array]":return e;default:return[]}},a=new Set([].concat(So(s(o)),So(s(r)),So(s(i))));return Object.assign({},e,{className:So(a).join(" ")})}function Po(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}(0,jo.addFilter)("blocks.registerBlockType","extendify/utilities/attributes",(function(e){return Co(Co({},e),{},{attributes:Co(Co({},e.attributes),{},{extUtilities:{type:"array",default:[]}})})})),(0,jo.addFilter)("blocks.registerBlockType","extendify/utilities/addEditProps",(function(e){var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Ao(r,e,n)},e})),(0,jo.addFilter)("editor.BlockEdit","extendify/utilities/advancedClassControls",No),(0,jo.addFilter)("blocks.getSaveContent.extraProps","extendify/utilities/extra-props",Ao);var To=function(){return(e=w().mark((function e(){var t;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k.get("taxonomies-simple");case 2:return(t=e.sent)["tax_pattern_types_2.0"]&&(t.tax_pattern_types=t["tax_pattern_types_2.0"],delete t["tax_pattern_types_2.0"]),t["tax_page_types_2.0"]&&(t.tax_page_types=t["tax_page_types_2.0"],delete t["tax_page_types_2.0"]),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Po(o,r,i,s,a,"next",e)}function a(e){Po(o,r,i,s,a,"throw",e)}s(void 0)}))})();var e};function Mo(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Io(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Mo(o,r,i,s,a,"next",e)}function a(e){Mo(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Lo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ro(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ro(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fo(e){var t=e.show,n=void 0!==t&&t,i=Y((function(e){return e.open})),o=Y((function(e){return e.setOpen})),s=Lo((0,r.useState)(!1),2),a=s[0],l=s[1],c=(0,r.useCallback)((function(){return o(!0)}),[o]),u=(0,r.useCallback)((function(){return o(!1)}),[o]),d=K((function(e){return e.initTemplateData})),f=B((function(e){return e.uuid.length>0})),p=K((function(e){return Object.keys(e.taxonomyDefaultState).length>0}));return function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=K((function(e){return e.setupDefaultTaxonomies})),n=V((function(e){return e.setTaxonomies})),i=(0,r.useCallback)(Io(w().mark((function e(){var r;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,To();case 2:r=e.sent,r=Object.keys(r).filter((function(e){return e.startsWith("tax_")})).reduce((function(e,t){return e[t]=r[t],e}),{}),n(r),t();case 6:case"end":return e.stop()}}),e)}))),[n,t]);(0,r.useEffect)((function(){e&&i()}),[i,e])}(i),(0,r.useEffect)((function(){f&&p&&("single"===Y.getState().currentPage&&Y.setState({currentPage:"main"}),d(),l(!0))}),[f,p,d]),(0,r.useEffect)((function(){n&&o(!0)}),[n,o]),(0,r.useEffect)((function(){return window.addEventListener("extendify-sdk::open-library",c),window.addEventListener("extendify-sdk::close-library",u),function(){window.removeEventListener("extendify-sdk::open-library",c),window.removeEventListener("extendify-sdk::close-library",u)}}),[u,c]),a?(0,At.jsx)(bo,{}):null}const Do=wp.plugins,Bo=wp.editPost;var Uo=function(){return k.get("site-settings")},qo=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),k.post("site-settings",t,{headers:{"Content-Type":"multipart/form-data"}})};function Vo(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function zo(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Vo(o,r,i,s,a,"next",e)}function a(e){Vo(o,r,i,s,a,"throw",e)}s(void 0)}))}}var Ho={getItem:function(){var e=zo(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Uo();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),setItem:function(){var e=zo(w().mark((function e(t,n){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qo(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},$o=l(x((function(){return{enabled:!0}}),{name:"extendify-sitesettings",getStorage:function(){return Ho}}));function Wo(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function Jo(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Wo(o,r,i,s,a,"next",e)}function a(e){Wo(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Zo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Go(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Go(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Go(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Ko=function(){var e=(0,Cr.useSelect)((function(e){return e("core").canUser("create","users")})),t=Zo((0,r.useState)(B((function(e){return e.enabled}))),2),n=t[0],i=t[1],o=Zo((0,r.useState)($o((function(e){return e.enabled}))),2),s=o[0],a=o[1];function l(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.getElementById("extendify-templates-inserter-btn");t&&(e?t.classList.add("invisible"):t.classList.remove("invisible"))}function c(e){return u.apply(this,arguments)}function u(){return(u=Jo(w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B.setState({enabled:t});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return f.apply(this,arguments)}function f(){return(f=Jo(w().mark((function e(t){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$o.setState({enabled:t});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t){return h.apply(this,arguments)}function h(){return h=Jo(w().mark((function e(t,n){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("global"!==n){e.next=5;break}return e.next=3,d(t);case 3:e.next=7;break;case 5:return e.next=7,c(t);case 7:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}function m(e){"global"===e?a((function(t){return p(!t,e),!t})):i((function(t){return l(!t),p(!t,e),!t}))}return(0,r.useEffect)((function(){l(!n)}),[n]),(0,At.jsxs)(kt.Modal,{title:(0,It.__)("Extendify Settings","extendify-sdk"),onRequestClose:function(){var e=document.getElementById("extendify-util");(0,r.unmountComponentAtNode)(e)},children:[(0,At.jsx)(kt.ToggleControl,{label:e?(0,It.__)("Enable the library for myself","extendify-sdk"):(0,It.__)("Enable the library","extendify-sdk"),help:(0,It.__)("Publish with hundreds of patterns & page layouts","extendify-sdk"),checked:n,onChange:function(){return m("user")}}),e&&(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("br",{}),(0,At.jsx)(kt.ToggleControl,{label:(0,It.__)("Allow all users to publish with the library"),help:(0,It.__)("Everyone publishes with patterns & page layouts","extendify-sdk"),checked:s,onChange:function(){return m("global")}})]})]})};var Yo=function(e){var t,n;Ct(null===(t=e.target.closest("[data-extendify-identifier]"))||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.extendifyIdentifier)},Xo=function(){var e,t,n;return null===window.extendifySdkData.user||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.isAdmin)},Qo=function(){var e,t,n;return null===window.extendifySdkData.sitesettings||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.sitesettings)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)},es=(0,At.jsx)("div",{id:"extendify-templates-inserter",className:"extendify-sdk",children:(0,At.jsxs)("button",{style:"background:#D9F1EE;color:#1e1e1e;border:1px solid #949494 !important;font-weight:bold;font-size:14px;padding:8px;margin-right:8px",type:"button","data-extendify-identifier":"main-button",id:"extendify-templates-inserter-btn",className:"components-button",children:[(0,At.jsx)(mi,{icon:Li,size:24,className:"-ml-1 mr-1"}),(0,It.__)("Library","extendify-sdk")]})});window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){var e,t,n;(Qo()||Xo())&&(document.getElementById("extendify-templates-inserter-btn")||document.querySelector(".edit-post-header-toolbar")&&(document.querySelector(".edit-post-header-toolbar").insertAdjacentHTML("beforeend",(0,r.renderToString)(es)),document.getElementById("extendify-templates-inserter-btn").addEventListener("click",Yo),(null===window.extendifySdkData.user?Qo():null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)||document.getElementById("extendify-templates-inserter-btn").classList.add("invisible")))}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){if((Qo()||Xo())&&document.querySelector("[id$=patterns-view]")&&!document.getElementById("extendify-cta-button")){var e=(0,At.jsx)("div",{children:(0,At.jsx)("button",{id:"extendify-cta-button",style:"margin:1rem 1rem 0","data-extendify-identifier":"patterns-cta",className:"components-button is-secondary",children:(0,It.__)("Discover more patterns in Extendify Library","extendify-sdk")})});document.querySelector("[id$=patterns-view]").insertAdjacentHTML("afterbegin",(0,r.renderToString)(e)),document.getElementById("extendify-cta-button").addEventListener("click",Yo)}}),0)}));window._wpLoadBlockEditor&&(0,Do.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,At.jsx)(At.Fragment,{children:(0,At.jsxs)(Bo.PluginSidebarMoreMenuItem,{onClick:function(){var e=document.getElementById("extendify-util");(0,r.render)((0,At.jsx)(Ko,{}),e)},icon:(0,At.jsx)(mi,{icon:Li,size:24}),children:[" ",(0,It.__)("Extendify","extendify-sdk")]})})}}),[{register:function(){var e=(0,Cr.dispatch)("core/notices").createNotice,t=B.getState().incrementImports;window.addEventListener("extendify-sdk::template-inserted",(function(n){e("info",(0,It.__)("Page layout Added"),{isDismissible:!0,type:"snackbar"}),setTimeout((function(){var e;t(),Vn(null===(e=n.detail)||void 0===e?void 0:e.template)}),0)}))}},{register:function(){var e=this;window.addEventListener("extendify-sdk::softerror-encountered",(function(t){e[(0,_t.camelCase)(t.detail.type)](t.detail)}))},versionOutdated:function(e){(0,r.render)((0,At.jsx)(Lr,{title:e.data.title,message:e.data.message,buttonLabel:e.data.buttonLabel,forceOpen:!0}),document.getElementById("extendify-root"))}}].forEach((function(e){return e.register()})),window._wpLoadBlockEditor&&window.wp.domReady((function(){var e=Object.assign(document.createElement("div"),{id:"extendify-root"});if(document.body.append(e),(0,r.render)((0,At.jsx)(Fo,{}),e),e.parentNode.insertBefore(Object.assign(document.createElement("div"),{id:"extendify-util"}),e.nextSibling),Or.getState().importOnLoad){var t=Or.getState().wantedTemplate;setTimeout((function(){ui((0,g.rawHandler)({HTML:t.fields.code}),t)}),0)}Or.setState({importOnLoad:!1,wantedTemplate:{}})}))},42:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var s=i.apply(null,n);s&&e.push(s)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},716:()=>{},965:()=>{},525:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var s,a,l=i(e),c=1;c<arguments.length;c++){for(var u in s=Object(arguments[c]))n.call(s,u)&&(l[u]=s[u]);if(t){a=t(s);for(var d=0;d<a.length;d++)r.call(s,a[d])&&(l[a[d]]=s[a[d]])}}return l}},61:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var a,l=[],c=!1,u=-1;function d(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u<t;)a&&a[u].run();u=-1,t=l.length}a=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},426:(e,t,n)=>{"use strict";n(525);var r=n(995),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:s.current}}t.jsx=c,t.jsxs=c},246:(e,t,n)=>{"use strict";e.exports=n(426)},248:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof x?t:x,o=Object.create(i.prototype),s=new E(r||[]);return o._invoke=function(e,t,n){var r=d;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=O(s,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=u(e,t,n);if("normal"===l.type){if(r=n.done?h:f,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}(e,n,s),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",m={};function x(){}function y(){}function v(){}var g={};g[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==n&&r.call(w,o)&&(g=w);var j=v.prototype=x.prototype=Object.create(g);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,s,a){var l=u(e[i],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,a)}),(function(e){n("throw",e,s,a)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,a)}))}a(l.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=u(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function N(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return s.next=s}}return{next:A}}function A(){return{value:t,done:!0}}return y.prototype=j.constructor=v,v.constructor=y,y.displayName=l(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,a,"GeneratorFunction")),e.prototype=Object.create(j),e},e.awrap=function(e){return{__await:e}},k(S.prototype),S.prototype[s]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new S(c(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},k(j),l(j,a,"Generator"),j[o]=function(){return this},j.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=N,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return a.type="throw",a.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var l=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:N(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},995:e=>{"use strict";e.exports=React},843:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_from":"axios@0.21.4"}')}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,n,i,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,i,o]=e[u],a=!0,l=0;l<n.length;l++)(!1&o||s>=o)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=i();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={286:0,506:0,310:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,[s,a,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(l)var u=l(r)}for(t&&t(n);c<s.length;c++)o=s[c],r.o(e,o)&&e[o]&&e[o][0](),e[s[c]]=0;return r.O(u)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[506,310],(()=>r(363))),r.O(void 0,[506,310],(()=>r(716)));var i=r.O(void 0,[506,310],(()=>r(965)));i=r.O(i)})();
|
1 |
/*! For license information please see extendify-sdk.js.LICENSE.txt */
|
2 |
+
(()=>{var e,t={135:(e,t,n)=>{e.exports=n(248)},206:(e,t,n)=>{e.exports=n(57)},387:(e,t,n)=>{"use strict";var r=n(485),o=n(570),i=n(940),s=n(581),a=n(574),l=n(845),c=n(338),u=n(524),d=n(141),f=n(132);e.exports=function(e){return new Promise((function(t,n){var p,h=e.data,m=e.headers,x=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(h)&&delete m["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(g+":"+b)}var w=a(e.baseURL,e.url);function j(){if(v){var r="getAllResponseHeaders"in v?l(v.getAllResponseHeaders()):null,i={data:x&&"text"!==x&&"json"!==x?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v};o((function(e){t(e),y()}),(function(e){n(e),y()}),i),v=null}}if(v.open(e.method.toUpperCase(),s(w,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=j:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(j)},v.onabort=function(){v&&(n(u("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){n(u("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},r.isStandardBrowserEnv()){var k=(e.withCredentials||c(w))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;k&&(m[e.xsrfHeaderName]=k)}"setRequestHeader"in v&&r.forEach(m,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete m[t]:v.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),x&&"json"!==x&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){v&&(n(!e||e&&e.type?new f("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),h||(h=null),v.send(h)}))}},57:(e,t,n)=>{"use strict";var r=n(485),o=n(875),i=n(29),s=n(941);var a=function e(t){var n=new i(t),a=o(i.prototype.request,n);return r.extend(a,i.prototype,n),r.extend(a,n),a.create=function(n){return e(s(t,n))},a}(n(141));a.Axios=i,a.Cancel=n(132),a.CancelToken=n(603),a.isCancel=n(475),a.VERSION=n(345).version,a.all=function(e){return Promise.all(e)},a.spread=n(739),a.isAxiosError=n(835),e.exports=a,e.exports.default=a},132:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},603:(e,t,n)=>{"use strict";var r=n(132);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},475:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},29:(e,t,n)=>{"use strict";var r=n(485),o=n(581),i=n(96),s=n(9),a=n(941),l=n(144),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var u=[s,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(i),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{o=s(d)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},u.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=u},96:(e,t,n)=>{"use strict";var r=n(485);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},574:(e,t,n)=>{"use strict";var r=n(642),o=n(288);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},524:(e,t,n)=>{"use strict";var r=n(953);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},9:(e,t,n)=>{"use strict";var r=n(485),o=n(212),i=n(475),s=n(141),a=n(132);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a("canceled")}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return l(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},953:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},941:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function s(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function l(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,o=t(e);r.isUndefined(o)&&t!==l||(n[e]=o)})),n}},570:(e,t,n)=>{"use strict";var r=n(524);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},212:(e,t,n)=>{"use strict";var r=n(485),o=n(141);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},141:(e,t,n)=>{"use strict";var r=n(61),o=n(485),i=n(446),s=n(953),a={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(c=n(387)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e,t,n){if(o.isString(e))try{return(t||JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){u.headers[e]=o.merge(a)})),e.exports=u},345:e=>{e.exports={version:"0.24.0"}},875:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},581:(e,t,n)=>{"use strict";var r=n(485);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},288:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},940:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},642:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},835:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},338:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},446:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},845:(e,t,n)=>{"use strict";var r=n(485),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},739:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},144:(e,t,n)=>{"use strict";var r=n(345).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],s=t[i];if(s){var a=e[i],l=void 0===a||s(a,i,e);if(!0!==l)throw new TypeError("option "+i+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},485:(e,t,n)=>{"use strict";var r=n(875),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:l,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):i(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},353:(e,t,n)=>{"use strict";const r=wp.element;var o=n(363),i=n.n(o);function s(e){let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(o!==t){const e=t;t=r?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:(e,r,i)=>r||i?((e,r=o,i=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let s=r(t);function a(){const n=r(t);if(!i(s,n)){const t=s;e(s=n,t)}}return n.add(a),()=>n.delete(a)})(e,r,i):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,o,i),i}const a="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?o.useEffect:o.useLayoutEffect;function l(e){const t="function"==typeof e?s(e):e,n=(e=t.getState,n=Object.is)=>{const[,r]=(0,o.useReducer)((e=>e+1),0),i=t.getState(),s=(0,o.useRef)(i),l=(0,o.useRef)(e),c=(0,o.useRef)(n),u=(0,o.useRef)(!1),d=(0,o.useRef)();let f;void 0===d.current&&(d.current=e(i));let p=!1;(s.current!==i||l.current!==e||c.current!==n||u.current)&&(f=e(i),p=!n(d.current,f)),a((()=>{p&&(d.current=f),s.current=i,l.current=e,c.current=n,u.current=!1}));const h=(0,o.useRef)(i);a((()=>{const e=()=>{try{const e=t.getState(),n=l.current(e);c.current(d.current,n)||(s.current=e,d.current=n,r())}catch(e){u.current=!0,r()}},n=t.subscribe(e);return t.getState()!==h.current&&e(),n}),[]);const m=p?f:d.current;return(0,o.useDebugValue)(m),m};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n}var c=Object.defineProperty,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t)=>{for(var n in t||(t={}))d.call(t,n)&&p(e,n,t[n]);if(u)for(var n of u(t))f.call(t,n)&&p(e,n,t[n]);return e};Symbol();const m=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>m(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>m(t)(e)}}},x=(e,t)=>(n,r,o)=>{let i=h({getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>h(h({},t),e)},t);(i.blacklist||i.whitelist)&&console.warn(`The ${i.blacklist?"blacklist":"whitelist"} option is deprecated and will be removed in the next version. Please use the 'partialize' option instead.`);let s=!1;const a=new Set,l=new Set;let c;try{c=i.getStorage()}catch(e){}if(!c)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)}),r,o);c.removeItem||console.warn(`[zustand persist middleware] The given storage for item '${i.name}' does not contain a 'removeItem' method, which will be required in v4.`);const u=m(i.serialize),d=()=>{const e=i.partialize(h({},r()));let t;i.whitelist&&Object.keys(e).forEach((t=>{var n;!(null==(n=i.whitelist)?void 0:n.includes(t))&&delete e[t]})),i.blacklist&&i.blacklist.forEach((t=>delete e[t]));const n=u({state:e,version:i.version}).then((e=>c.setItem(i.name,e))).catch((e=>{t=e}));if(t)throw t;return n},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};const p=e(((...e)=>{n(...e),d()}),r,o);let x;const y=()=>{var e;if(!c)return;s=!1,a.forEach((e=>e(r())));const t=(null==(e=i.onRehydrateStorage)?void 0:e.call(i,r()))||void 0;return m(c.getItem.bind(c))(i.name).then((e=>{if(e)return i.deserialize(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===i.version)return e.state;if(i.migrate)return i.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>(x=i.merge(e,p),n(x,!0),d()))).then((()=>{null==t||t(x,void 0),s=!0,l.forEach((e=>e(x)))})).catch((e=>{null==t||t(void 0,e)}))};return o.persist={setOptions:e=>{i=h(h({},i),e),e.getStorage&&(c=e.getStorage())},clearStorage:()=>{var e;null==(e=null==c?void 0:c.removeItem)||e.call(c,i.name)},rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},y(),x||p};var y=l(x((function(e){return{open:!1,metaData:{},currentTaxonomies:{},currentType:"pattern",settingsModal:!1,updateCurrentTaxonomies:function(t){return e({currentTaxonomies:Object.assign({},t)})},updateCurrentType:function(t){return e({currentType:t})},setOpen:function(t){e({open:t})}}}),{name:"extendify-global-state"})),v=n(135),g=n.n(v),b=n(206),w=n.n(b)().create({baseURL:window.extendifySdkData.root,headers:{"X-WP-Nonce":window.extendifySdkData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify":!0}});function j(e){return Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}w.interceptors.response.use((function(e){return function(e){return Object.prototype.hasOwnProperty.call(e,"soft_error")&&window.dispatchEvent(new CustomEvent("extendify-sdk::softerror-encountered",{detail:e.soft_error,bubbles:!0})),e}(j(e))}),(function(e){return function(e){if(e.response)return console.error(e.response),Promise.reject(j(e.response))}(e)})),w.interceptors.request.use((function(e){return function(e){return e.headers["X-Extendify-Dev-Mode"]=window.location.search.indexOf("DEVMODE")>-1,e.headers["X-Extendify-Local-Mode"]=window.location.search.indexOf("LOCALMODE")>-1,e}(function(e){return e.data&&(e.data.remaining_imports=D.getState().remainingImports(),e.data.entry_point=D.getState().entryPoint,e.data.total_imports=D.getState().imports),e}(e))}),(function(e){return e}));var k=function(){return w.get("user")},O=function(e,t){var n=new FormData;return n.append("email",e),n.append("key",t),w.post("login",n,{headers:{"Content-Type":"multipart/form-data"}})},S=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),w.post("user",t,{headers:{"Content-Type":"multipart/form-data"}})},C=function(e){var t=new FormData;return t.append("email",e),w.post("register-mailing-list",t,{headers:{"Content-Type":"multipart/form-data"}})};function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function I(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){T(i,r,o,s,a,"next",e)}function a(e){T(i,r,o,s,a,"throw",e)}s(void 0)}))}}var L,M,R={getItem:(M=I(g().mark((function e(){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return M.apply(this,arguments)}),setItem:(L=I(g().mark((function e(t,n){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(e,t){return L.apply(this,arguments)})},D=l(x((function(e,t){return{email:"",apiKey:"",imports:0,uuid:"",sdkPartner:"",registration:{email:""},noticesDismissedAt:{},allowedImports:0,entryPoint:"not-set",enabled:null===window.extendifySdkData.sitesettings||(null===(n=window.extendifySdkData)||void 0===n||null===(r=n.sitesettings)||void 0===r||null===(o=r.state)||void 0===o?void 0:o.enabled),canInstallPlugins:!1,canActivatePlugins:!1,preferredOptions:{taxonomies:{},type:"",search:""},preferredOptionsHistory:{siteType:[]},incrementImports:function(){return e({imports:t().imports+1})},canImport:function(){return!!t().apiKey||Number(t().imports)<Number(t().allowedImports)},remainingImports:function(){if(t().apiKey)return"unlimited";var e=Number(t().allowedImports)-Number(t().imports);return e>0?e:0},updateSiteType:function(n){if(t().updatePreferredOption("tax_categories",n),n&&"Unknown"!==n){var r=new Set([n].concat(A(t().preferredOptionsHistory.siteType)));e({preferredOptionsHistory:Object.assign({},t().preferredOptionsHistory,{siteType:A(r).slice(0,3)})})}},updatePreferredOption:function(n,r){var o,i,s;Object.prototype.hasOwnProperty.call(t().preferredOptions,n)||(r=Object.assign({},null!==(i=null===(s=t().preferredOptions)||void 0===s?void 0:s.taxonomies)&&void 0!==i?i:{},N({},n,r)),n="taxonomies");var a="type"==n&&r!==(null===(o=t().preferredOptions)||void 0===o?void 0:o.type);e({preferredOptions:E({},Object.assign({},t().preferredOptions,N({},n,r),a?{taxonomies:{}}:{}))})}};var n,r,o}),{name:"extendify-user",getStorage:function(){return R}}));function F(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var U=l(x((function(e,t){return{taxonomies:{},openedTaxonomies:[],setTaxonomies:function(t){return e({taxonomies:t})},toggleOpenedTaxonomy:function(n,r){var o=t().openedTaxonomies;e({openedTaxonomies:r?[].concat(F(o),[n]):F(o.filter((function(e){return e!=n})))})}}}),{name:"extendify-taxonomies"}));function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){return function(e){if(Array.isArray(e))return H(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return H(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var W,J,G=l((function(e,t){return{templates:[],skipNextFetch:!1,fetchToken:null,taxonomyDefaultState:{},nextPage:"",searchParams:{taxonomies:{},type:"pattern"},initTemplateData:function(){e({activeTemplate:{}}),t().setupDefaultTaxonomies(),t().updateType(y.getState().currentType)},appendTemplates:function(n){return e({templates:$(new Map([].concat($(t().templates),$(n)).map((function(e){return[e.id,e]}))).values())})},setupDefaultTaxonomies:function(){var n,r,o,i,s=U.getState().taxonomies,a=Object.entries(s).reduce((function(e,t){return e[t[0]]=function(e){var t,n,r;return"tax_categories"===e?"Unknown":null!==(t=null===(n=U.getState())||void 0===n||null===(r=n.taxonomies[e][0])||void 0===r?void 0:r.term)&&void 0!==t?t:void 0}(t[0]),e}),{}),l={};a=Object.assign({},a,null!==(n=null===(r=D.getState().preferredOptions)||void 0===r?void 0:r.taxonomies)&&void 0!==n?n:{},null!==(o=null===(i=y.getState())||void 0===i?void 0:i.currentTaxonomies)&&void 0!==o?o:{}),l.taxonomies=Object.assign({},a),e({taxonomyDefaultState:a,searchParams:q({},Object.assign(t().searchParams,l))})},updateTaxonomies:function(e){var n,r,o={};(o.taxonomies=Object.assign({},t().searchParams.taxonomies,e),null!=o&&null!==(n=o.taxonomies)&&void 0!==n&&n.tax_categories)&&D.getState().updatePreferredOption("tax_categories",null==o||null===(r=o.taxonomies)||void 0===r?void 0:r.tax_categories);y.getState().updateCurrentTaxonomies(null==o?void 0:o.taxonomies),t().updateSearchParams(o)},updateType:function(e){y.getState().updateCurrentType(e),t().updateSearchParams({type:e})},updateSearchParams:function(n){null!=n&&n.taxonomies&&!Object.keys(n.taxonomies).length&&(n.taxonomies=t().taxonomyDefaultState);var r=Object.assign({},t().searchParams,n);JSON.stringify(r)!==JSON.stringify(t().searchParams)&&e({templates:[],nextPage:"",searchParams:r})}}}));function K(){return K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K.apply(this,arguments)}function Z(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Q(e,t){if(e in t){for(var n=t[e],r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return"function"==typeof n?n.apply(void 0,o):n}var s=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(s,Q),s}function ee(e){var t=e.props,n=e.slot,r=e.defaultTag,o=e.features,i=e.visible,s=void 0===i||i,a=e.name;if(s)return te(t,n,r,a);var l=null!=o?o:W.None;if(l&W.Static){var c=t.static,u=void 0!==c&&c,d=Z(t,["static"]);if(u)return te(d,n,r,a)}if(l&W.RenderStrategy){var f,p=t.unmount,h=void 0===p||p,m=Z(t,["unmount"]);return Q(h?J.Unmount:J.Hidden,((f={})[J.Unmount]=function(){return null},f[J.Hidden]=function(){return te(K({},m,{hidden:!0,style:{display:"none"}}),n,r,a)},f))}return te(t,n,r,a)}function te(e,t,n,r){var i;void 0===t&&(t={});var s=re(e,["unmount","static"]),a=s.as,l=void 0===a?n:a,c=s.children,u=s.refName,d=void 0===u?"ref":u,f=Z(s,["as","children","refName"]),p=void 0!==e.ref?((i={})[d]=e.ref,i):{},h="function"==typeof c?c(t):c;if(f.className&&"function"==typeof f.className&&(f.className=f.className(t)),l===o.Fragment&&Object.keys(f).length>0){if(!(0,o.isValidElement)(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+r+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(f).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,o.cloneElement)(h,Object.assign({},function(e,t,n){for(var r,o=Object.assign({},e),i=function(){var n,i=r.value;void 0!==e[i]&&void 0!==t[i]&&Object.assign(o,((n={})[i]=function(n){n.defaultPrevented||e[i](n),n.defaultPrevented||t[i](n)},n))},s=X(n);!(r=s()).done;)i();return o}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(re(f,["ref"])),h.props,["onClick"]),p))}return(0,o.createElement)(l,Object.assign({},re(f,["ref"]),l!==o.Fragment&&p),h)}function ne(e){var t;return Object.assign((0,o.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function re(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),o=X(t);!(n=o()).done;){var i=n.value;i in r&&delete r[i]}return r}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(W||(W={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(J||(J={}));var oe="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,ie={serverHandoffComplete:!1};function se(){var e=(0,o.useState)(ie.serverHandoffComplete),t=e[0],n=e[1];return(0,o.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,o.useEffect)((function(){!1===ie.serverHandoffComplete&&(ie.serverHandoffComplete=!0)}),[]),t}var ae=0;function le(){return++ae}function ce(){var e=se(),t=(0,o.useState)(e?le:null),n=t[0],r=t[1];return oe((function(){null===n&&r(le())}),[n]),null!=n?""+n:void 0}function ue(){var e=(0,o.useRef)(!1);return(0,o.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var de,fe,pe=(0,o.createContext)(null);function he(){return(0,o.useContext)(pe)}function me(e){var t=e.value,n=e.children;return i().createElement(pe.Provider,{value:t},n)}function xe(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=X(e.splice(0));!(t=n()).done;){var r=t.value;r()}}};return t}function ye(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function ve(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}function ge(e,t,n,r,o,i){var s=xe(),a=void 0!==i?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(i):function(){};return ve.apply(void 0,[e].concat(o)),ye.apply(void 0,[e].concat(t,n)),s.nextFrame((function(){ve.apply(void 0,[e].concat(n)),ye.apply(void 0,[e].concat(r)),s.add(function(e,t){var n=xe();if(!e)return n.dispose;var r=getComputedStyle(e),o=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),i=o[0],s=o[1];return 0!==i?n.setTimeout((function(){t(fe.Finished)}),i+s):t(fe.Finished),n.add((function(){return t(fe.Cancelled)})),n.dispose}(e,(function(n){return ve.apply(void 0,[e].concat(r,t)),ye.apply(void 0,[e].concat(o)),a(n)})))})),s.add((function(){return ve.apply(void 0,[e].concat(t,n,r,o))})),s.add((function(){return a(fe.Cancelled)})),s.dispose}function be(e){return void 0===e&&(e=""),(0,o.useMemo)((function(){return e.split(" ").filter((function(e){return e.trim().length>1}))}),[e])}pe.displayName="OpenClosedContext",function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(de||(de={})),function(e){e.Finished="finished",e.Cancelled="cancelled"}(fe||(fe={}));var we,je=(0,o.createContext)(null);je.displayName="TransitionContext",function(e){e.Visible="visible",e.Hidden="hidden"}(we||(we={}));var ke=(0,o.createContext)(null);function Oe(e){return"children"in e?Oe(e.children):e.current.filter((function(e){return e.state===we.Visible})).length>0}function Se(e){var t=(0,o.useRef)(e),n=(0,o.useRef)([]),r=ue();(0,o.useEffect)((function(){t.current=e}),[e]);var i=(0,o.useCallback)((function(e,o){var i;void 0===o&&(o=J.Hidden);var s=n.current.findIndex((function(t){return t.id===e}));-1!==s&&(Q(o,((i={})[J.Unmount]=function(){n.current.splice(s,1)},i[J.Hidden]=function(){n.current[s].state=we.Hidden},i)),!Oe(n)&&r.current&&(null==t.current||t.current()))}),[t,r,n]),s=(0,o.useCallback)((function(e){var t=n.current.find((function(t){return t.id===e}));return t?t.state!==we.Visible&&(t.state=we.Visible):n.current.push({id:e,state:we.Visible}),function(){return i(e,J.Unmount)}}),[n,i]);return(0,o.useMemo)((function(){return{children:n,register:s,unregister:i}}),[s,i,n])}function Ce(){}ke.displayName="NestingContext";var _e=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ee(e){for(var t,n={},r=X(_e);!(t=r()).done;){var o,i=t.value;n[i]=null!=(o=e[i])?o:Ce}return n}var Ne,Ae=W.RenderStrategy;function Pe(e){var t,n=e.beforeEnter,r=e.afterEnter,s=e.beforeLeave,a=e.afterLeave,l=e.enter,c=e.enterFrom,u=e.enterTo,d=e.entered,f=e.leave,p=e.leaveFrom,h=e.leaveTo,m=Z(e,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"]),x=(0,o.useRef)(null),y=(0,o.useState)(we.Visible),v=y[0],g=y[1],b=m.unmount?J.Unmount:J.Hidden,w=function(){var e=(0,o.useContext)(je);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),j=w.show,k=w.appear,O=w.initial,S=function(){var e=(0,o.useContext)(ke);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),C=S.register,_=S.unregister,E=ce(),N=(0,o.useRef)(!1),A=Se((function(){N.current||(g(we.Hidden),_(E),F.current.afterLeave())}));oe((function(){if(E)return C(E)}),[C,E]),oe((function(){var e;b===J.Hidden&&E&&(j&&v!==we.Visible?g(we.Visible):Q(v,((e={})[we.Hidden]=function(){return _(E)},e[we.Visible]=function(){return C(E)},e)))}),[v,E,C,_,j,b]);var P=be(l),T=be(c),I=be(u),L=be(d),M=be(f),R=be(p),D=be(h),F=function(e){var t=(0,o.useRef)(Ee(e));return(0,o.useEffect)((function(){t.current=Ee(e)}),[e]),t}({beforeEnter:n,afterEnter:r,beforeLeave:s,afterLeave:a}),B=se();(0,o.useEffect)((function(){if(B&&v===we.Visible&&null===x.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[x,v,B]);var U=O&&!k;oe((function(){var e=x.current;if(e&&!U)return N.current=!0,j&&F.current.beforeEnter(),j||F.current.beforeLeave(),j?ge(e,P,T,I,L,(function(e){N.current=!1,e===fe.Finished&&F.current.afterEnter()})):ge(e,M,R,D,L,(function(e){N.current=!1,e===fe.Finished&&(Oe(A)||(g(we.Hidden),_(E),F.current.afterLeave()))}))}),[F,E,N,_,A,x,U,j,P,T,I,M,R,D]);var z={ref:x},q=m;return i().createElement(ke.Provider,{value:A},i().createElement(me,{value:Q(v,(t={},t[we.Visible]=de.Open,t[we.Hidden]=de.Closed,t))},ee({props:K({},q,z),defaultTag:"div",features:Ae,visible:v===we.Visible,name:"Transition.Child"})))}function Te(e){var t,n=e.show,r=e.appear,s=void 0!==r&&r,a=e.unmount,l=Z(e,["show","appear","unmount"]),c=he();void 0===n&&null!==c&&(n=Q(c,((t={})[de.Open]=!0,t[de.Closed]=!1,t)));if(![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var u=(0,o.useState)(n?we.Visible:we.Hidden),d=u[0],f=u[1],p=Se((function(){f(we.Hidden)})),h=function(){var e=(0,o.useRef)(!0);return(0,o.useEffect)((function(){e.current=!1}),[]),e.current}(),m=(0,o.useMemo)((function(){return{show:n,appear:s||!h,initial:h}}),[n,s,h]);(0,o.useEffect)((function(){n?f(we.Visible):Oe(p)||f(we.Hidden)}),[n,p]);var x={unmount:a};return i().createElement(ke.Provider,{value:p},i().createElement(je.Provider,{value:m},ee({props:K({},x,{as:o.Fragment,children:i().createElement(Pe,Object.assign({},x,l))}),defaultTag:o.Fragment,features:Ae,visible:d===we.Visible,name:"Transition"})))}function Ie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(0,o.useRef)(t);return(0,o.useEffect)((function(){r.current=t}),[t]),(0,o.useCallback)((function(e){for(var t,n=X(r.current);!(t=n()).done;){var o=t.value;null!=o&&("function"==typeof o?o(e):o.current=e)}}),[r])}function Le(e){for(var t,n,r=e.parentElement,o=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(o=r),r=r.parentElement;var i=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!i||!function(e){if(!e)return!1;var t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(o))&&i}function Me(e,t,n){var r=(0,o.useRef)(t);r.current=t,(0,o.useEffect)((function(){function t(e){r.current.call(window,e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}Te.Child=function(e){var t=null!==(0,o.useContext)(je),n=null!==he();return!t&&n?i().createElement(Te,Object.assign({},e)):i().createElement(Pe,Object.assign({},e))},Te.Root=Te,function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(Ne||(Ne={}));var Re,De,Fe,Be,Ue,ze=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function qe(e){null==e||e.focus({preventScroll:!0})}function Ve(e,t){var n=Array.isArray(e)?e:function(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(ze))}(e),r=document.activeElement,o=function(){if(t&(Re.First|Re.Next))return Fe.Next;if(t&(Re.Previous|Re.Last))return Fe.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),i=function(){if(t&Re.First)return 0;if(t&Re.Previous)return Math.max(0,n.indexOf(r))-1;if(t&Re.Next)return Math.max(0,n.indexOf(r))+1;if(t&Re.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),s=t&Re.NoScroll?{preventScroll:!0}:{},a=0,l=n.length,c=void 0;do{var u;if(a>=l||a+l<=0)return De.Error;var d=i+a;if(t&Re.WrapAround)d=(d+l)%l;else{if(d<0)return De.Underflow;if(d>=l)return De.Overflow}null==(u=c=n[d])||u.focus(s),a+=o}while(c!==document.activeElement);return c.hasAttribute("tabindex")||c.setAttribute("tabindex","0"),De.Success}function $e(e,t,n){void 0===t&&(t=Ue.All);var r=void 0===n?{}:n,i=r.initialFocus,s=r.containers,a=(0,o.useRef)("undefined"!=typeof window?document.activeElement:null),l=(0,o.useRef)(null),c=ue(),u=Boolean(t&Ue.RestoreFocus),d=Boolean(t&Ue.InitialFocus);(0,o.useEffect)((function(){u&&(a.current=document.activeElement)}),[u]),(0,o.useEffect)((function(){if(u)return function(){qe(a.current),a.current=null}}),[u]),(0,o.useEffect)((function(){if(d&&e.current){var t=document.activeElement;if(null==i?void 0:i.current){if((null==i?void 0:i.current)===t)return void(l.current=t)}else if(e.current.contains(t))return void(l.current=t);(null==i?void 0:i.current)?qe(i.current):Ve(e.current,Re.First)===De.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),l.current=document.activeElement}}),[e,i,d]),Me("keydown",(function(n){t&Ue.TabLock&&e.current&&n.key===Ne.Tab&&(n.preventDefault(),Ve(e.current,(n.shiftKey?Re.Previous:Re.Next)|Re.WrapAround)===De.Success&&(l.current=document.activeElement))})),Me("focus",(function(n){if(t&Ue.FocusLock){var r=new Set(null==s?void 0:s.current);if(r.add(e),r.size){var o=l.current;if(o&&c.current){var i=n.target;i&&i instanceof HTMLElement?!function(e,t){for(var n,r=X(e);!(n=r()).done;){var o;if(null==(o=n.value.current)?void 0:o.contains(t))return!0}return!1}(r,i)?(n.preventDefault(),n.stopPropagation(),qe(o)):(l.current=i,qe(i)):qe(l.current)}}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(Re||(Re={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(De||(De={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(Fe||(Fe={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(Be||(Be={})),function(e){e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All"}(Ue||(Ue={}));var He=new Set,We=new Map;function Je(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Ge(e){var t=We.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var Ke=(0,o.createContext)(!1);function Ze(e){return i().createElement(Ke.Provider,{value:e.force},e.children)}const Ye=ReactDOM;function Xe(){var e=(0,o.useContext)(Ke),t=(0,o.useContext)(nt),n=(0,o.useState)((function(){if(!e&&null!==t)return null;if("undefined"==typeof window)return null;var n=document.getElementById("headlessui-portal-root");if(n)return n;var r=document.createElement("div");return r.setAttribute("id","headlessui-portal-root"),document.body.appendChild(r)})),r=n[0],i=n[1];return(0,o.useEffect)((function(){e||null!==t&&i(t.current)}),[t,i,e]),r}var Qe=o.Fragment;function et(e){var t=e,n=Xe(),r=(0,o.useState)((function(){return"undefined"==typeof window?null:document.createElement("div")}))[0],i=se();return oe((function(){if(n&&r)return n.appendChild(r),function(){var e;n&&(r&&(n.removeChild(r),n.childNodes.length<=0&&(null==(e=n.parentElement)||e.removeChild(n))))}}),[n,r]),i&&n&&r?(0,Ye.createPortal)(ee({props:t,defaultTag:Qe,name:"Portal"}),r):null}var tt=o.Fragment,nt=(0,o.createContext)(null);et.Group=function(e){var t=e.target,n=Z(e,["target"]);return i().createElement(nt.Provider,{value:t},ee({props:n,defaultTag:tt,name:"Popover.Group"}))};var rt=(0,o.createContext)(null);function ot(){var e=(0,o.useContext)(rt);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ot),t}return e}var it,st,at,lt,ct=(0,o.createContext)((function(){}));function ut(e){var t=e.children,n=e.onUpdate,r=e.type,s=e.element,a=(0,o.useContext)(ct),l=(0,o.useCallback)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];null==n||n.apply(void 0,t),a.apply(void 0,t)}),[a,n]);return oe((function(){return l(it.Add,r,s),function(){return l(it.Remove,r,s)}}),[l,r,s]),i().createElement(ct.Provider,{value:l},t)}ct.displayName="StackContext",function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(it||(it={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(at||(at={})),function(e){e[e.SetTitleId=0]="SetTitleId"}(lt||(lt={}));var dt=((st={})[lt.SetTitleId]=function(e,t){return e.titleId===t.id?e:K({},e,{titleId:t.id})},st),ft=(0,o.createContext)(null);function pt(e){var t=(0,o.useContext)(ft);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+vt.displayName+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,pt),n}return t}function ht(e,t){return Q(t.type,dt,e,t)}ft.displayName="DialogContext";var mt=W.RenderStrategy|W.Static,xt=ne((function(e,t){var n,r=e.open,s=e.onClose,a=e.initialFocus,l=Z(e,["open","onClose","initialFocus"]),c=(0,o.useState)(0),u=c[0],d=c[1],f=he();void 0===r&&null!==f&&(r=Q(f,((n={})[de.Open]=!0,n[de.Closed]=!1,n)));var p=(0,o.useRef)(new Set),h=(0,o.useRef)(null),m=Ie(h,t),x=e.hasOwnProperty("open")||null!==f,y=e.hasOwnProperty("onClose");if(!x&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!x)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+r);if("function"!=typeof s)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: "+s);var v=r?at.Open:at.Closed,g=null!==f?f===de.Open:v===at.Open,b=(0,o.useReducer)(ht,{titleId:null,descriptionId:null}),w=b[0],j=b[1],k=(0,o.useCallback)((function(){return s(!1)}),[s]),O=(0,o.useCallback)((function(e){return j({type:lt.SetTitleId,id:e})}),[j]),S=se()&&v===at.Open,C=u>1,_=null!==(0,o.useContext)(ft);$e(h,S?Q(C?"parent":"leaf",{parent:Ue.RestoreFocus,leaf:Ue.All}):Ue.None,{initialFocus:a,containers:p}),function(e,t){void 0===t&&(t=!0),oe((function(){if(t&&e.current){var n=e.current;He.add(n);for(var r,o=X(We.keys());!(r=o()).done;){var i=r.value;i.contains(n)&&(Ge(i),We.delete(i))}return document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=X(He);!(t=n()).done;){var r=t.value;if(e.contains(r))return}1===He.size&&(We.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Je(e))}})),function(){if(He.delete(n),He.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!We.has(e)){for(var t,n=X(He);!(t=n()).done;){var r=t.value;if(e.contains(r))return}We.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),Je(e)}}));else for(var e,t=X(We.keys());!(e=t()).done;){var r=e.value;Ge(r),We.delete(r)}}}}),[t])}(h,!!C&&S),Me("mousedown",(function(e){var t,n=e.target;v===at.Open&&(C||(null==(t=h.current)?void 0:t.contains(n))||k())})),Me("keydown",(function(e){e.key===Ne.Escape&&v===at.Open&&(C||(e.preventDefault(),e.stopPropagation(),k()))})),(0,o.useEffect)((function(){if(v===at.Open&&!_){var e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=n+"px",function(){document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}}),[v,_]),(0,o.useEffect)((function(){if(v===at.Open&&h.current){var e=new IntersectionObserver((function(e){for(var t,n=X(e);!(t=n()).done;){var r=t.value;0===r.boundingClientRect.x&&0===r.boundingClientRect.y&&0===r.boundingClientRect.width&&0===r.boundingClientRect.height&&k()}}));return e.observe(h.current),function(){return e.disconnect()}}}),[v,h,k]);var E=function(){var e=(0,o.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,o.useMemo)((function(){return function(e){var t=(0,o.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,o.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return i().createElement(rt.Provider,{value:r},e.children)}}),[n])]}(),N=E[0],A=E[1],P="headlessui-dialog-"+ce(),T=(0,o.useMemo)((function(){return[{dialogState:v,close:k,setTitleId:O},w]}),[v,w,k,O]),I=(0,o.useMemo)((function(){return{open:v===at.Open}}),[v]),L={ref:m,id:P,role:"dialog","aria-modal":v===at.Open||void 0,"aria-labelledby":w.titleId,"aria-describedby":N,onClick:function(e){e.stopPropagation()}},M=l;return i().createElement(ut,{type:"Dialog",element:h,onUpdate:(0,o.useCallback)((function(e,t,n){var r;"Dialog"===t&&Q(e,((r={})[it.Add]=function(){p.current.add(n),d((function(e){return e+1}))},r[it.Remove]=function(){p.current.add(n),d((function(e){return e-1}))},r))}),[])},i().createElement(Ze,{force:!0},i().createElement(et,null,i().createElement(ft.Provider,{value:T},i().createElement(et.Group,{target:h},i().createElement(Ze,{force:!1},i().createElement(A,{slot:I,name:"Dialog.Description"},ee({props:K({},M,L),slot:I,defaultTag:"div",features:mt,visible:g,name:"Dialog"}))))))))})),yt=ne((function e(t,n){var r=pt([vt.displayName,e.name].join("."))[0],i=r.dialogState,s=r.close,a=Ie(n),l="headlessui-dialog-overlay-"+ce(),c=(0,o.useCallback)((function(e){if(e.target===e.currentTarget){if(Le(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),s()}}),[s]),u=(0,o.useMemo)((function(){return{open:i===at.Open}}),[i]);return ee({props:K({},t,{ref:a,id:l,"aria-hidden":!0,onClick:c}),slot:u,defaultTag:"div",name:"Dialog.Overlay"})}));var vt=Object.assign(xt,{Overlay:yt,Title:function e(t){var n=pt([vt.displayName,e.name].join("."))[0],r=n.dialogState,i=n.setTitleId,s="headlessui-dialog-title-"+ce();(0,o.useEffect)((function(){return i(s),function(){return i(null)}}),[s,i]);var a=(0,o.useMemo)((function(){return{open:r===at.Open}}),[r]);return ee({props:K({},t,{id:s}),slot:a,defaultTag:"h2",name:"Dialog.Title"})},Description:function(e){var t=ot(),n="headlessui-description-"+ce();oe((function(){return t.register(n)}),[n,t.register]);var r=e,o=K({},t.props,{id:n});return ee({props:K({},r,o),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})}});const gt=wp.i18n,bt=wp.components;var wt=n(42),jt=n.n(wt);const kt=lodash;var Ot=function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"broken-event",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";D.setState({entryPoint:e}),window.dispatchEvent(new CustomEvent("extendify-sdk::".concat(t,"-library"),{detail:e,bubbles:!0}))}(e,"open")};function St(e){switch(e){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return e}function Ct(e){switch(e){case"tax_categories":return"Site Type";case"tax_pattern_types":return"Content"}return e.replace("tax_","").replace(/_/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}))}var _t=n(246);function Et(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function At(e){var t=Et(e.taxonomy,2),n=t[0],r=t[1],o=G((function(e){return e.updateTaxonomies})),i=G((function(e){return e.searchParams})),s=U((function(e){return e.openedTaxonomies})),a=U((function(e){return e.toggleOpenedTaxonomy})),l=function(e){return(null==i?void 0:i.taxonomies[n])===e.term},c=Object.values(r).filter((function(e){var t;return null==e||null===(t=e.type)||void 0===t?void 0:t.includes(i.type)})).length;return Object.keys(r).length&&c?(0,_t.jsx)(bt.PanelBody,{title:Ct(n),className:"ext-type-control p-0",initialOpen:s.includes(n)||"tax_pattern_types"===n||"tax_page_types"===n,onToggle:function(e){return a(n,e)},children:(0,_t.jsx)(bt.PanelRow,{children:(0,_t.jsx)("div",{className:"overflow-hidden w-full relative",children:(0,_t.jsx)("ul",{className:"py-1 m-0 w-full",children:Object.values(r).filter((function(e){var t;return null==e||null===(t=e.type)||void 0===t?void 0:t.includes(i.type)})).map((function(e){return(0,_t.jsx)("li",{className:"m-0 w-full",children:(0,_t.jsx)("button",{type:"button",className:"text-left text-sm cursor-pointer w-full flex justify-between items-center px-0 py-2 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){return o((t={},r=n,i=e.term,r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t));var t,r,i},children:(0,_t.jsx)("span",{className:jt()({"text-wp-theme-500":l(e)}),children:e.term})})},e.term)}))})})})}):null}function Pt(e){return Array.isArray?Array.isArray(e):"[object Array]"===Ft(e)}function Tt(e){return"string"==typeof e}function It(e){return"number"==typeof e}function Lt(e){return!0===e||!1===e||function(e){return Mt(e)&&null!==e}(e)&&"[object Boolean]"==Ft(e)}function Mt(e){return"object"==typeof e}function Rt(e){return null!=e}function Dt(e){return!e.trim().length}function Ft(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Bt=Object.prototype.hasOwnProperty;class Ut{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=zt(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function zt(e){let t=null,n=null,r=null,o=1;if(Tt(e)||Pt(e))r=e,t=qt(e),n=Vt(e);else{if(!Bt.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const i=e.name;if(r=i,Bt.call(e,"weight")&&(o=e.weight,o<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(i));t=qt(i),n=Vt(i)}return{path:t,id:n,weight:o,src:r}}function qt(e){return Pt(e)?e:e.split(".")}function Vt(e){return Pt(e)?e.join("."):e}var $t={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,t){let n=[],r=!1;const o=(e,t,i)=>{if(Rt(e))if(t[i]){const s=e[t[i]];if(!Rt(s))return;if(i===t.length-1&&(Tt(s)||It(s)||Lt(s)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(s));else if(Pt(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)o(s[e],t,i+1)}else t.length&&o(s,t,i+1)}else n.push(e)};return o(e,Tt(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}};const Ht=/[^ ]+/g;class Wt{constructor({getFn:e=$t.getFn}={}){this.norm=function(e=3){const t=new Map,n=Math.pow(10,e);return{get(e){const r=e.match(Ht).length;if(t.has(r))return t.get(r);const o=1/Math.sqrt(r),i=parseFloat(Math.round(o*n)/n);return t.set(r,i),i},clear(){t.clear()}}}(3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,Tt(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();Tt(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Rt(e)||Dt(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach(((t,r)=>{let o=this.getFn(e,t.path);if(Rt(o))if(Pt(o)){let e=[];const t=[{nestedArrIndex:-1,value:o}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(Rt(r))if(Tt(r)&&!Dt(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else Pt(r)&&r.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[r]=e}else if(!Dt(o)){let e={v:o,n:this.norm.get(o)};n.$[r]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function Jt(e,t,{getFn:n=$t.getFn}={}){const r=new Wt({getFn:n});return r.setKeys(e.map(zt)),r.setSources(t),r.create(),r}function Gt(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=$t.distance,ignoreLocation:i=$t.ignoreLocation}={}){const s=t/e.length;if(i)return s;const a=Math.abs(r-n);return o?s+a/o:a?1:s}const Kt=32;function Zt(e,t,n,{location:r=$t.location,distance:o=$t.distance,threshold:i=$t.threshold,findAllMatches:s=$t.findAllMatches,minMatchCharLength:a=$t.minMatchCharLength,includeMatches:l=$t.includeMatches,ignoreLocation:c=$t.ignoreLocation}={}){if(t.length>Kt)throw new Error(`Pattern length exceeds max of ${Kt}.`);const u=t.length,d=e.length,f=Math.max(0,Math.min(r,d));let p=i,h=f;const m=a>1||l,x=m?Array(d):[];let y;for(;(y=e.indexOf(t,h))>-1;){let e=Gt(t,{currentLocation:y,expectedLocation:f,distance:o,ignoreLocation:c});if(p=Math.min(e,p),h=y+u,m){let e=0;for(;e<u;)x[y+e]=1,e+=1}}h=-1;let v=[],g=1,b=u+d;const w=1<<u-1;for(let r=0;r<u;r+=1){let i=0,a=b;for(;i<a;){Gt(t,{errors:r,currentLocation:f+a,expectedLocation:f,distance:o,ignoreLocation:c})<=p?i=a:b=a,a=Math.floor((b-i)/2+i)}b=a;let l=Math.max(1,f-a+1),y=s?d:Math.min(f+a,d)+u,j=Array(y+2);j[y+1]=(1<<r)-1;for(let i=y;i>=l;i-=1){let s=i-1,a=n[e.charAt(s)];if(m&&(x[s]=+!!a),j[i]=(j[i+1]<<1|1)&a,r&&(j[i]|=(v[i+1]|v[i])<<1|1|v[i+1]),j[i]&w&&(g=Gt(t,{errors:r,currentLocation:s,expectedLocation:f,distance:o,ignoreLocation:c}),g<=p)){if(p=g,h=s,h<=f)break;l=Math.max(1,2*f-h)}}if(Gt(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:o,ignoreLocation:c})>p)break;v=j}const j={isMatch:h>=0,score:Math.max(.001,g)};if(m){const e=function(e=[],t=$t.minMatchCharLength){let n=[],r=-1,o=-1,i=0;for(let s=e.length;i<s;i+=1){let s=e[i];s&&-1===r?r=i:s||-1===r||(o=i-1,o-r+1>=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}(x,a);e.length?l&&(j.indices=e):j.isMatch=!1}return j}function Yt(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const o=e.charAt(n);t[o]=(t[o]||0)|1<<r-n-1}return t}class Xt{constructor(e,{location:t=$t.location,threshold:n=$t.threshold,distance:r=$t.distance,includeMatches:o=$t.includeMatches,findAllMatches:i=$t.findAllMatches,minMatchCharLength:s=$t.minMatchCharLength,isCaseSensitive:a=$t.isCaseSensitive,ignoreLocation:l=$t.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:o,findAllMatches:i,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const c=(e,t)=>{this.chunks.push({pattern:e,alphabet:Yt(e),startIndex:t})},u=this.pattern.length;if(u>Kt){let e=0;const t=u%Kt,n=u-t;for(;e<n;)c(this.pattern.substr(e,Kt),e),e+=Kt;if(t){const e=u-Kt;c(this.pattern.substr(e),e)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:n}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}const{location:r,distance:o,threshold:i,findAllMatches:s,minMatchCharLength:a,ignoreLocation:l}=this.options;let c=[],u=0,d=!1;this.chunks.forEach((({pattern:t,alphabet:f,startIndex:p})=>{const{isMatch:h,score:m,indices:x}=Zt(e,t,f,{location:r+p,distance:o,threshold:i,findAllMatches:s,minMatchCharLength:a,includeMatches:n,ignoreLocation:l});h&&(d=!0),u+=m,h&&x&&(c=[...c,...x])}));let f={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(f.indices=c),f}}class Qt{constructor(e){this.pattern=e}static isMultiMatch(e){return en(e,this.multiRegex)}static isSingleMatch(e){return en(e,this.singleRegex)}search(){}}function en(e,t){const n=e.match(t);return n?n[1]:null}class tn extends Qt{constructor(e,{location:t=$t.location,threshold:n=$t.threshold,distance:r=$t.distance,includeMatches:o=$t.includeMatches,findAllMatches:i=$t.findAllMatches,minMatchCharLength:s=$t.minMatchCharLength,isCaseSensitive:a=$t.isCaseSensitive,ignoreLocation:l=$t.ignoreLocation}={}){super(e),this._bitapSearch=new Xt(e,{location:t,threshold:n,distance:r,includeMatches:o,findAllMatches:i,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class nn extends Qt{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const r=[],o=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+o,r.push([t,n-1]);const i=!!r.length;return{isMatch:i,score:i?0:1,indices:r}}}const rn=[class extends Qt{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},nn,class extends Qt{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends Qt{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Qt{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Qt{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends Qt{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},tn],on=rn.length,sn=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;const an=new Set([tn.type,nn.type]);class ln{constructor(e,{isCaseSensitive:t=$t.isCaseSensitive,includeMatches:n=$t.includeMatches,minMatchCharLength:r=$t.minMatchCharLength,ignoreLocation:o=$t.ignoreLocation,findAllMatches:i=$t.findAllMatches,location:s=$t.location,threshold:a=$t.threshold,distance:l=$t.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:r,findAllMatches:i,ignoreLocation:o,location:s,threshold:a,distance:l},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let n=e.trim().split(sn).filter((e=>e&&!!e.trim())),r=[];for(let e=0,o=n.length;e<o;e+=1){const o=n[e];let i=!1,s=-1;for(;!i&&++s<on;){const e=rn[s];let n=e.isMultiMatch(o);n&&(r.push(new e(n,t)),i=!0)}if(!i)for(s=-1;++s<on;){const e=rn[s];let n=e.isSingleMatch(o);if(n){r.push(new e(n,t));break}}}return r}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let o=0,i=[],s=0;for(let r=0,a=t.length;r<a;r+=1){const a=t[r];i.length=0,o=0;for(let t=0,r=a.length;t<r;t+=1){const r=a[t],{isMatch:l,indices:c,score:u}=r.search(e);if(!l){s=0,o=0,i.length=0;break}if(o+=1,s+=u,n){const e=r.constructor.type;an.has(e)?i=[...i,...c]:i.push(c)}}if(o){let e={isMatch:!0,score:s/o};return n&&(e.indices=i),e}}return{isMatch:!1,score:1}}}const cn=[];function un(e,t){for(let n=0,r=cn.length;n<r;n+=1){let r=cn[n];if(r.condition(e,t))return new r(e,t)}return new Xt(e,t)}const dn="$and",fn="$or",pn="$path",hn="$val",mn=e=>!(!e[dn]&&!e[fn]),xn=e=>({[dn]:Object.keys(e).map((t=>({[t]:e[t]})))});function yn(e,t,{auto:n=!0}={}){const r=e=>{let o=Object.keys(e);const i=(e=>!!e[pn])(e);if(!i&&o.length>1&&!mn(e))return r(xn(e));if((e=>!Pt(e)&&Mt(e)&&!mn(e))(e)){const r=i?e[pn]:o[0],s=i?e[hn]:e[r];if(!Tt(s))throw new Error((e=>`Invalid value for key ${e}`)(r));const a={keyId:Vt(r),pattern:s};return n&&(a.searcher=un(s,t)),a}let s={children:[],operator:o[0]};return o.forEach((t=>{const n=e[t];Pt(n)&&n.forEach((e=>{s.children.push(r(e))}))})),s};return mn(e)||(e=xn(e)),r(e)}function vn(e,t){const n=e.matches;t.matches=[],Rt(n)&&n.forEach((e=>{if(!Rt(e.indices)||!e.indices.length)return;const{indices:n,value:r}=e;let o={indices:n,value:r};e.key&&(o.key=e.key.src),e.idx>-1&&(o.refIndex=e.idx),t.matches.push(o)}))}function gn(e,t){t.score=e.score}class bn{constructor(e,t={},n){this.options={...$t,...t},this.options.useExtendedSearch,this._keyStore=new Ut(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Wt))throw new Error("Incorrect 'index' type");this._myIndex=t||Jt(this.options.keys,this._docs,{getFn:this.options.getFn})}add(e){Rt(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,r=this._docs.length;n<r;n+=1){const o=this._docs[n];e(o,n)&&(this.removeAt(n),n-=1,r-=1,t.push(o))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:o,sortFn:i,ignoreFieldNorm:s}=this.options;let a=Tt(e)?Tt(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=$t.ignoreFieldNorm}){e.forEach((e=>{let n=1;e.matches.forEach((({key:e,norm:r,score:o})=>{const i=e?e.weight:null;n*=Math.pow(0===o&&i?Number.EPSILON:o,(i||1)*(t?1:r))})),e.score=n}))}(a,{ignoreFieldNorm:s}),o&&a.sort(i),It(t)&&t>-1&&(a=a.slice(0,t)),function(e,t,{includeMatches:n=$t.includeMatches,includeScore:r=$t.includeScore}={}){const o=[];return n&&o.push(vn),r&&o.push(gn),e.map((e=>{const{idx:n}=e,r={item:t[n],refIndex:n};return o.length&&o.forEach((t=>{t(e,r)})),r}))}(a,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const t=un(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:e,i:n,n:o})=>{if(!Rt(e))return;const{isMatch:i,score:s,indices:a}=t.searchIn(e);i&&r.push({item:e,idx:n,matches:[{score:s,value:e,norm:o,indices:a}]})})),r}_searchLogical(e){const t=yn(e,this.options),n=(e,t,r)=>{if(!e.children){const{keyId:n,searcher:o}=e,i=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:o});return i&&i.length?[{idx:r,item:t,matches:i}]:[]}switch(e.operator){case dn:{const o=[];for(let i=0,s=e.children.length;i<s;i+=1){const s=e.children[i],a=n(s,t,r);if(!a.length)return[];o.push(...a)}return o}case fn:{const o=[];for(let i=0,s=e.children.length;i<s;i+=1){const s=e.children[i],a=n(s,t,r);if(a.length){o.push(...a);break}}return o}}},r=this._myIndex.records,o={},i=[];return r.forEach((({$:e,i:r})=>{if(Rt(e)){let s=n(t,e,r);s.length&&(o[r]||(o[r]={idx:r,item:e,matches:[]},i.push(o[r])),s.forEach((({matches:e})=>{o[r].matches.push(...e)})))}})),i}_searchObjectList(e){const t=un(e,this.options),{keys:n,records:r}=this._myIndex,o=[];return r.forEach((({$:e,i:r})=>{if(!Rt(e))return;let i=[];n.forEach(((n,r)=>{i.push(...this._findMatches({key:n,value:e[r],searcher:t}))})),i.length&&o.push({idx:r,item:e,matches:i})})),o}_findMatches({key:e,value:t,searcher:n}){if(!Rt(t))return[];let r=[];if(Pt(t))t.forEach((({v:t,i:o,n:i})=>{if(!Rt(t))return;const{isMatch:s,score:a,indices:l}=n.searchIn(t);s&&r.push({score:a,key:e,value:t,idx:o,norm:i,indices:l})}));else{const{v:o,n:i}=t,{isMatch:s,score:a,indices:l}=n.searchIn(o);s&&r.push({score:a,key:e,value:o,norm:i,indices:l})}return r}}bn.version="6.4.6",bn.createIndex=Jt,bn.parseIndex=function(e,{getFn:t=$t.getFn}={}){const{keys:n,records:r}=e,o=new Wt({getFn:t});return o.setKeys(n),o.setIndexRecords(r),o},bn.config=$t,bn.parseQuery=yn,function(...e){cn.push(...e)}(ln);const wn=bn;function jn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var On=new Map;function Sn(e){var t=e.value,n=e.setValue,o=e.terms,i=D((function(e){return e.preferredOptionsHistory})),s=G((function(e){return e.searchParams})),a=jn((0,r.useState)(!1),2),l=a[0],c=a[1],u=(0,r.useRef)(),d=jn((0,r.useState)({}),2),f=d[0],p=d[1],h=jn((0,r.useState)(""),2),m=h[0],x=h[1],y=jn((0,r.useState)([]),2),v=y[0],g=y[1],b=(0,r.useMemo)((function(){return Object.values(o.filter((function(e){return null==e?void 0:e.featured})).sort((function(e,t){return e.term<t.term?-1:e.term>t.term?1:0})))}),[o]),w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(On.has(e))g(On.get(e));else{var t=f.search(e);On.set(e,null!=t&&t.length?t.map((function(e){return e.item})):b),g(On.get(e))}},j="Unknown"===t||!t.length;(0,r.useEffect)((function(){p(new wn(o,{keys:["term","parent","keywords"],minMatchCharLength:2,threshold:.3}))}),[o]),(0,r.useEffect)((function(){m.length||g(b)}),[b,m]),(0,r.useEffect)((function(){l&&u.current.focus()}),[l]);var k,O,S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,gt.__)("Suggestions","extendify-sdk");return e===b&&(t=(0,gt.__)("Examples","extendify-sdk")),(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("h4",{className:"mt-4 mb-2 text-left uppercase text-xs text-gray-700",children:t}),(0,_t.jsx)("ul",{className:"m-0",children:e.map((function(e){var t;Object.prototype.hasOwnProperty.call(e,"term")&&(e=e.term);var r=(null==s||null===(t=s.taxonomies)||void 0===t?void 0:t.tax_categories)===e;return(0,_t.jsx)("li",{className:"m-0 mb-1",children:(0,_t.jsx)("button",{type:"button",className:jt()("w-full text-left text-sm bg-transparent hover:text-wp-theme-500 m-0 pl-0 cursor-pointer",{"text-gray-800":!r}),onClick:function(){c(!1),n(e)},children:e})},e)}))})]})};return(0,_t.jsxs)("div",{className:"w-full bg-gray-100 rounded",children:[(0,_t.jsx)("button",{type:"button",onClick:function(){return c((function(e){return!e}))},className:"flex items-center justify-between text-gray-800 button-focus w-full p-4 m-0 cursor-pointer bg-gray-100 hover:bg-gray-150 rounded",children:(O=l?(0,gt.__)("What kind of site is this?","extendify-sdk"):t,(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsxs)("span",{className:"flex flex-col text-left",children:[(0,_t.jsx)("span",{className:"text-sm mb-1",children:(0,gt.__)("Site Type","extendify-sdk")}),(0,_t.jsx)("span",{className:"font-light text-xs",children:O})]}),(0,_t.jsxs)("span",{className:"flex items-center space-x-4",children:[j&&!l&&(0,_t.jsxs)("svg",{className:"text-wp-alert-red","aria-hidden":"true",focusable:"false",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("path",{className:"stroke-current",d:"M10.9982 4.05371C7.66149 4.05371 4.95654 6.75866 4.95654 10.0954C4.95654 13.4321 7.66149 16.137 10.9982 16.137C14.3349 16.137 17.0399 13.4321 17.0399 10.0954C17.0399 6.75866 14.3349 4.05371 10.9982 4.05371V4.05371Z",strokeWidth:"1.25"}),(0,_t.jsx)("path",{className:"fill-current",d:"M10.0205 12.8717C10.0205 12.3287 10.4508 11.8881 10.9938 11.8881C11.5368 11.8881 11.9774 12.3287 11.9774 12.8717C11.9774 13.4147 11.5368 13.8451 10.9938 13.8451C10.4508 13.8451 10.0205 13.4147 10.0205 12.8717Z"}),(0,_t.jsx)("path",{className:"fill-current",d:"M11.6495 10.2591C11.6086 10.6177 11.3524 10.9148 10.9938 10.9148C10.625 10.9148 10.3791 10.6074 10.3483 10.2591L10.0205 7.31855C9.95901 6.81652 10.4918 6.34521 10.9938 6.34521C11.4959 6.34521 12.0286 6.81652 11.9774 7.31855L11.6495 10.2591Z"})]}),(0,_t.jsx)("svg",{className:jt()("text-gray-700 stroke-current",{"transform rotate-90 -translate-x-1":l}),"aria-hidden":"true",focusable:"false",width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)("path",{d:"M1.24194 11.5952L6.24194 6.09519L1.24194 0.595215",strokeWidth:"1.5"})})]})]}))}),l&&(0,_t.jsxs)("div",{className:"p-4 pt-0",children:[(0,_t.jsxs)("div",{className:"relative my-2",children:[(0,_t.jsx)("label",{htmlFor:"site-type-search",className:"sr-only",children:(0,gt.__)("Search","extendify-sdk")}),(0,_t.jsx)("input",{ref:u,id:"site-type-search",value:m||"",onChange:function(e){return t=e.target.value,x(t),void w(t);var t},type:"text",className:"button-focus bg-white border-0 m-0 p-3.5 py-2.5 rounded text-sm w-full",placeholder:(0,gt.__)("Search","extendify-sdk")}),(0,_t.jsx)("svg",{className:"absolute top-2 right-2 hidden lg:block pointer-events-none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,_t.jsx)("path",{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})})]}),m.length>1&&v===b&&(0,_t.jsx)("p",{className:"text-left",children:(0,gt.__)("Nothing found...","extendify-sdk")}),v===b&&(null==i||null===(k=i.siteType)||void 0===k?void 0:k.length)>0&&(0,_t.jsx)("div",{className:"mb-8",children:S(null==i?void 0:i.siteType,(0,gt.__)("Recent","extendify-sdk"))}),v&&(0,_t.jsx)("div",{children:S(v)}),j||(0,_t.jsx)("button",{type:"button",className:"mt-4 w-full text-left text-sm bg-transparent hover:text-wp-theme-500 pl-0 cursor-pointer text-wp-theme-500",onClick:function(){c(!1),n("Unknown")},children:(0,gt.__)("Reset","extendify-sdk")})]})]})}function Cn(){var e,t,n,r=U((function(e){return e.taxonomies})),o=G((function(e){return e.searchParams})),i=D((function(e){return e.updateSiteType})),s=G((function(e){return e.updateTaxonomies}));return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("div",{className:"mb-8 mt-2 mx-6 sm:mx-0 sm:mt-0 pt-0.5",children:Object.keys(null!==(e=null==r?void 0:r.tax_categories)&&void 0!==e?e:{}).length>0&&(0,_t.jsx)(Sn,{value:null!==(t=null==o||null===(n=o.taxonomies)||void 0===n?void 0:n.tax_categories)&&void 0!==t?t:"",setValue:function(e){i(e),s({tax_categories:e})},terms:r.tax_categories})}),(0,_t.jsx)("div",{className:"mt-px flex-grow hidden overflow-y-auto pb-32 pt-px sm:block",children:(0,_t.jsx)(bt.Panel,{children:Object.entries(r).map((function(e){return"tax_categories"===e[0]?null:(0,_t.jsx)(At,{taxonomy:e},e[0])}))})})]})}const _n=function(e){let{icon:t,size:n=24,...o}=e;return(0,r.cloneElement)(t,{width:n,height:n,...o})},En=e=>(0,r.createElement)("circle",e),Nn=e=>(0,r.createElement)("g",e),An=e=>(0,r.createElement)("path",e),Pn=e=>(0,r.createElement)("rect",e),Tn=e=>{let{className:t,isPressed:n,...o}=e;const i={...o,className:jt()(t,{"is-pressed":n})||void 0,role:"img","aria-hidden":!0,focusable:!1};return(0,r.createElement)("svg",i)};const In=(0,_t.jsxs)(Tn,{viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)(An,{d:"M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z",stroke:"currentColor",strokeWidth:"1.25",fill:"none"}),(0,_t.jsx)(An,{d:"M6.34684 9.72526C6.34684 9.18224 6.77716 8.74168 7.32018 8.74168C7.8632 8.74168 8.30377 9.18224 8.30377 9.72526C8.30377 10.2683 7.8632 10.6986 7.32018 10.6986C6.77716 10.6986 6.34684 10.2683 6.34684 9.72526Z",fill:"currentColor"}),(0,_t.jsx)(An,{d:"M7.9759 7.11261C7.93492 7.47121 7.67878 7.76834 7.32018 7.76834C6.95134 7.76834 6.70544 7.46097 6.6747 7.11261L6.34684 4.1721C6.28537 3.67006 6.81814 3.19876 7.32018 3.19876C7.82222 3.19876 8.35499 3.67006 8.30377 4.1721L7.9759 7.11261Z",fill:"currentColor"})]});const Ln=(0,_t.jsx)(Tn,{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)(An,{"clip-rule":"evenodd",d:"m13.505 4h3.3044c.936 0 1.2747.10161 1.6171.29127.3424.19042.6102.46965.7934.82489.1831.356.2801.70824.2801 1.6814v3.43584c0 .9731-.0977 1.3254-.2801 1.6814-.1832.356-.4517.6344-.7934.8248-.153.0852-.3057.1552-.5112.2054v2.7344c0 1.503-.151 2.047-.4327 2.5968-.2828.5498-.6976.9799-1.2252 1.274-.5288.294-1.052.4498-2.4975.4498h-5.10341c-1.44549 0-1.96869-.1569-2.49747-.4498-.52878-.2941-.94242-.7254-1.22526-1.274-.28284-.5487-.43376-1.0938-.43376-2.5968v-5.3051c0-1.50301.15092-2.04701.43264-2.59682.28284-.54981.6976-.98106 1.22638-1.27514.52767-.29293 1.05198-.44985 2.49747-.44985h2.18511c.041-.44652.1265-.69015.2522-.93557.1832-.356.4517-.63523.7941-.82565.3417-.18966.6812-.29127 1.6171-.29127zm-1.6984 2.18698c0-.63769.4973-1.15464 1.1106-1.15464h4.4793c.6133 0 1.1106.51695 1.1106 1.15464v4.65692c0 .6377-.4973 1.1547-1.1106 1.1547h-4.4793c-.6133 0-1.1106-.517-1.1106-1.1547z",fill:"currentColor","fill-rule":"evenodd"})});const Mn=(0,_t.jsx)(Tn,{fill:"none",width:"150",height:"30",viewBox:"0 0 2524 492",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsxs)(Nn,{fill:"currentColor",children:[(0,_t.jsx)(An,{d:"m609.404 378.5c-24.334 0-46-5.5-65-16.5-18.667-11.333-33.334-26.667-44-46-10.667-19.667-16-42.167-16-67.5 0-25.667 5.166-48.333 15.5-68 10.333-19.667 24.833-35 43.5-46 18.666-11.333 40-17 64-17 25 0 46.5 5.333 64.5 16 18 10.333 31.833 24.833 41.5 43.5 10 18.667 15 41 15 67v18.5l-212 .5 1-39h150.5c0-17-5.5-30.667-16.5-41-10.667-10.333-25.167-15.5-43.5-15.5-14.334 0-26.5 3-36.5 9-9.667 6-17 15-22 27s-7.5 26.667-7.5 44c0 26.667 5.666 46.833 17 60.5 11.666 13.667 28.833 20.5 51.5 20.5 16.666 0 30.333-3.167 41-9.5 11-6.333 18.166-15.333 21.5-27h56.5c-5.334 27-18.667 48.167-40 63.5-21 15.333-47.667 23-80 23z"}),(0,_t.jsx)("path",{d:"m797.529 372h-69.5l85-121-85-126h71l54.5 84 52.5-84h68.5l-84 125.5 81.5 121.5h-70l-53-81.5z"}),(0,_t.jsx)("path",{d:"m994.142 125h155.998v51h-155.998zm108.498 247h-61v-324h61z"}),(0,_t.jsx)("path",{d:"m1278.62 378.5c-24.33 0-46-5.5-65-16.5-18.66-11.333-33.33-26.667-44-46-10.66-19.667-16-42.167-16-67.5 0-25.667 5.17-48.333 15.5-68 10.34-19.667 24.84-35 43.5-46 18.67-11.333 40-17 64-17 25 0 46.5 5.333 64.5 16 18 10.333 31.84 24.833 41.5 43.5 10 18.667 15 41 15 67v18.5l-212 .5 1-39h150.5c0-17-5.5-30.667-16.5-41-10.66-10.333-25.16-15.5-43.5-15.5-14.33 0-26.5 3-36.5 9-9.66 6-17 15-22 27s-7.5 26.667-7.5 44c0 26.667 5.67 46.833 17 60.5 11.67 13.667 28.84 20.5 51.5 20.5 16.67 0 30.34-3.167 41-9.5 11-6.333 18.17-15.333 21.5-27h56.5c-5.33 27-18.66 48.167-40 63.5-21 15.333-47.66 23-80 23z"}),(0,_t.jsx)("path",{d:"m1484.44 372h-61v-247h56.5l5 32c7.67-12.333 18.5-22 32.5-29 14.34-7 29.84-10.5 46.5-10.5 31 0 54.34 9.167 70 27.5 16 18.333 24 43.333 24 75v152h-61v-137.5c0-20.667-4.66-36-14-46-9.33-10.333-22-15.5-38-15.5-19 0-33.83 6-44.5 18-10.66 12-16 28-16 48z"}),(0,_t.jsx)("path",{d:"m1798.38 378.5c-24 0-44.67-5.333-62-16-17-11-30.34-26.167-40-45.5-9.34-19.333-14-41.833-14-67.5s4.66-48.333 14-68c9.66-20 23.5-35.667 41.5-47s39.33-17 64-17c17.33 0 33.16 3.5 47.5 10.5 14.33 6.667 25.33 16.167 33 28.5v-156.5h60.5v372h-56l-4-38.5c-7.34 14-18.67 25-34 33-15 8-31.84 12-50.5 12zm13.5-56c14.33 0 26.66-3 37-9 10.33-6.333 18.33-15.167 24-26.5 6-11.667 9-24.833 9-39.5 0-15-3-28-9-39-5.67-11.333-13.67-20.167-24-26.5-10.34-6.667-22.67-10-37-10-14 0-26.17 3.333-36.5 10-10.34 6.333-18.34 15.167-24 26.5-5.34 11.333-8 24.333-8 39s2.66 27.667 8 39c5.66 11.333 13.66 20.167 24 26.5 10.33 6.333 22.5 9.5 36.5 9.5z"}),(0,_t.jsx)("path",{d:"m1996.45 372v-247h61v247zm30-296.5c-10.34 0-19.17-3.5-26.5-10.5-7-7.3333-10.5-16.1667-10.5-26.5s3.5-19 10.5-26c7.33-6.99999 16.16-10.49998 26.5-10.49998 10.33 0 19 3.49999 26 10.49998 7.33 7 11 15.6667 11 26s-3.67 19.1667-11 26.5c-7 7-15.67 10.5-26 10.5z"}),(0,_t.jsx)("path",{d:"m2085.97 125h155v51h-155zm155.5-122.5v52c-3.33 0-6.83 0-10.5 0-3.33 0-6.83 0-10.5 0-15.33 0-25.67 3.6667-31 11-5 7.3333-7.5 17.1667-7.5 29.5v277h-60.5v-277c0-22.6667 3.67-40.8333 11-54.5 7.33-14 17.67-24.1667 31-30.5 13.33-6.66666 28.83-10 46.5-10 5 0 10.17.166671 15.5.5 5.67.333329 11 .99999 16 2z"}),(0,_t.jsx)("path",{d:"m2330.4 125 80.5 228-33 62.5-112-290.5zm-58 361.5v-50.5h36.5c8 0 15-1 21-3 6-1.667 11.34-5 16-10 5-5 9.17-12.333 12.5-22l102.5-276h63l-121 302c-9 22.667-20.33 39.167-34 49.5-13.66 10.333-30.66 15.5-51 15.5-8.66 0-16.83-.5-24.5-1.5-7.33-.667-14.33-2-21-4z"}),(0,_t.jsx)("path",{clipRule:"evenodd",d:"m226.926 25.1299h83.271c23.586 0 32.123 2.4639 40.751 7.0633 8.628 4.6176 15.378 11.389 19.993 20.0037 4.615 8.6329 7.059 17.1746 7.059 40.7738v83.3183c0 23.599-2.463 32.141-7.059 40.774-4.615 8.633-11.383 15.386-19.993 20.003-3.857 2.065-7.704 3.764-12.884 4.981v66.308c0 36.447-3.803 49.639-10.902 62.972-7.128 13.333-17.579 23.763-30.877 30.894-13.325 7.132-26.51 10.909-62.936 10.909h-128.605c-36.4268 0-49.6113-3.805-62.9367-10.909-13.3254-7.131-23.749-17.589-30.8765-30.894-7.12757-13.304-10.9308-26.525-10.9308-62.972v-128.649c0-36.447 3.80323-49.639 10.9026-62.972 7.1275-13.333 17.5793-23.7909 30.9047-30.9224 13.2972-7.1034 26.5099-10.9088 62.9367-10.9088h55.064c1.033-10.8281 3.188-16.7362 6.357-22.6877 4.615-8.6329 11.382-15.4043 20.01-20.0219 8.61-4.5994 17.165-7.0633 40.751-7.0633zm-42.798 53.0342c0-15.464 12.53-28 27.986-28h112.877c15.457 0 27.987 12.536 27.987 28v112.9319c0 15.464-12.53 28-27.987 28h-112.877c-15.456 0-27.986-12.536-27.986-28z",fillRule:"evenodd"})]})});const Rn=(0,_t.jsxs)(Tn,{viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)(An,{d:"M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z",stroke:"white",strokeWidth:"1.25"}),(0,_t.jsx)(An,{d:"M7.32458 10.0998L4.82458 7.59977M7.32458 10.0998V3.79764V10.0998ZM7.32458 10.0998L9.82458 7.59977L7.32458 10.0998Z",stroke:"white",strokeWidth:"1.25"})]});const Dn=(0,_t.jsx)(Tn,{fill:"none",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)(An,{clipRule:"evenodd",d:"m13 4c4.9545 0 9 4.04545 9 9 0 4.9545-4.0455 9-9 9-4.95455 0-9-4.0455-9-9 0-4.95455 4.04545-9 9-9zm5.0909 13.4545c-1.9545 3.8637-8.22726 3.8637-10.22726 0-.04546-.1818-.04546-.3636 0-.5454 2-3.8636 8.27276-3.8636 10.22726 0 .0909.1818.0909.3636 0 .5454zm-5.0909-8.90905c-1.2727 0-2.3182 1.04546-2.3182 2.31815 0 1.2728 1.0455 2.3182 2.3182 2.3182s2.3182-1.0454 2.3182-2.3182c0-1.27269-1.0455-2.31815-2.3182-2.31815z",fill:"currentColor",fillRule:"evenodd"})});const Fn=(0,_t.jsxs)(Tn,{fill:"none",viewBox:"0 0 151 148",width:"151",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)(En,{cx:"65.6441",cy:"66.6114",fill:"#0b4a43",r:"65.3897"}),(0,_t.jsxs)(Nn,{fill:"#cbc3f5",stroke:"#0b4a43",children:[(0,_t.jsx)(An,{d:"m61.73 11.3928 3.0825 8.3304.1197.3234.3234.1197 8.3304 3.0825-8.3304 3.0825-.3234.1197-.1197.3234-3.0825 8.3304-3.0825-8.3304-.1197-.3234-.3234-.1197-8.3304-3.0825 8.3304-3.0825.3234-.1197.1197-.3234z",strokeWidth:"1.5"}),(0,_t.jsx)(An,{d:"m84.3065 31.2718c0 5.9939-12.4614 22.323-18.6978 22.323h-17.8958v56.1522c3.5249.9 11.6535 0 17.8958 0h6.2364c11.2074 3.33 36.0089 7.991 45.5529 0l-9.294-62.1623c-2.267-1.7171-5.949-6.6968-2.55-12.8786 3.4-6.1817 2.55-18.0406 0-24.5756-1.871-4.79616-8.3289-8.90882-14.4482-8.90882s-7.0825 4.00668-6.7993 6.01003z",strokeWidth:"1.75"}),(0,_t.jsx)(Pn,{height:"45.5077",rx:"9.13723",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 191.5074 -96.0026)",width:"18.2745",x:"143.755",y:"47.7524"}),(0,_t.jsx)(Pn,{height:"42.3038",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 241.97 -50.348)",width:"17.4735",x:"146.159",y:"95.811"}),(0,_t.jsx)(Pn,{height:"55.9204",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 213.1347 -85.5913)",width:"17.4735",x:"149.363",y:"63.7717"}),(0,_t.jsx)(Pn,{height:"51.1145",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 229.1545 -69.5715)",width:"17.4735",x:"149.363",y:"79.7915"}),(0,_t.jsx)(An,{d:"m75.7483 105.349c.9858-25.6313-19.2235-42.0514-32.8401-44.0538v12.0146c8.5438 1.068 24.8303 9.7642 24.8303 36.0442 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z",strokeWidth:"1.75"}),(0,_t.jsx)(An,{d:"m68.5388 109.354c.9858-25.6312-19.2234-42.0513-32.8401-44.0537v12.0147c8.5438 1.0679 24.8303 9.7641 24.8303 36.044 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z",strokeWidth:"1.75"})]})]});const Bn=function(){var e=D((function(e){return e.remainingImports})),t=D((function(e){return e.allowedImports})),n=e()>0?"has-imports":"no-imports",r="has-imports"===n?"bg-extendify-main hover:bg-extendify-main-dark":"bg-extendify-alert",o="has-imports"===n?Rn:In;return(0,_t.jsxs)("a",{target:"_blank",rel:"noreferrer",className:jt()(r,"flex w-full no-underline button-focus -mt-10 text-sm justify-between py-3 px-4 text-white rounded"),href:"https://www.extendify.com/pricing/?utm_source=".concat(encodeURIComponent(window.extendifySdkData.sdk_partner),"&utm_medium=library&utm_campaign=import-counter&utm_content=upgrade&utm_term=").concat(n),children:[(0,_t.jsxs)("div",{className:"flex items-center space-x-2 no-underline",children:[(0,_t.jsx)(_n,{icon:o,size:14}),(0,_t.jsx)("span",{children:(0,gt.sprintf)((0,gt.__)("%s/%s Imports","extendify-sdk"),e(),Number(t))})]}),(0,_t.jsx)("span",{className:"text-white no-underline font-medium outline-none",children:(0,gt.__)("Upgrade","extendify-sdk")})]})};function Un(e){var t=e.children,n=D((function(e){return e.apiKey}));return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsxs)("aside",{className:"flex-shrink-0 sm:pl-8 py-0 relative",children:[(0,_t.jsx)("div",{className:"sm:w-56 lg:w-72 sticky flex flex-col lg:h-full",children:t[0]}),(0,_t.jsx)("div",{className:"hidden sm:flex flex-col absolute bottom-0 mb-8 w-72 text-left space-y-4",children:!n.length&&(0,_t.jsx)(Bn,{})})]}),(0,_t.jsx)("main",{id:"extendify-templates",className:"w-full smp:l-12 h-full overflow-hidden",children:t[1]})]})}const zn=(0,r.createElement)(Tn,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(An,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function qn(){var e=G((function(e){return e.updateType})),t=y((function(e){return e.currentType?e.currentType:"pattern"}));return(0,_t.jsxs)("div",{className:"text-center w-full md:pl-36 md:ml-2",children:[(0,_t.jsx)("h4",{className:"sr-only",children:(0,gt.__)("Type select","extendify-sdk")}),(0,_t.jsx)("button",{type:"button",className:jt()({"cursor-pointer text-xs leading-none m-0 py-2.5 px-4 min-w-sm border rounded-tl-sm rounded-bl-sm border-black button-focus":!0,"bg-gray-900 text-white":"pattern"===t,"bg-transparent text-black":"pattern"!==t}),onClick:function(){return e("pattern")},children:(0,_t.jsx)("span",{className:"",children:(0,gt.__)("Patterns","extendify-sdk")})}),(0,_t.jsx)("button",{type:"button",className:jt()({"cursor-pointer text-xs leading-none m-0 py-2.5 px-4 min-w-sm items-center border rounded-tr-sm rounded-br-sm border-black outline-none -ml-px button-focus":!0,"bg-gray-900 text-white":"template"===t,"bg-transparent text-black":"template"!==t}),onClick:function(){return e("template")},children:(0,_t.jsx)("span",{className:"",children:(0,gt.__)("Page Layouts","extendify-sdk")})})]})}function Vn(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function $n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wn(e){var t=e.actionCallback,n=e.initialFocus,o=D((function(e){return e.apiKey.length})),i=$n((0,r.useState)(""),2),s=i[0],a=i[1],l=$n((0,r.useState)(""),2),c=l[0],u=l[1],d=$n((0,r.useState)(""),2),f=d[0],p=d[1],h=$n((0,r.useState)("info"),2),m=h[0],x=h[1],y=$n((0,r.useState)(!1),2),v=y[0],b=y[1],w=$n((0,r.useState)(!1),2),j=w[0],k=w[1],S=(0,r.useRef)(null),C=(0,r.useRef)(null);(0,r.useEffect)((function(){return a(D.getState().email),function(){return x("info")}}),[]),(0,r.useEffect)((function(){var e;j&&(null==S||null===(e=S.current)||void 0===e||e.focus())}),[j]);var _=function(){var e,t=(e=g().mark((function e(t){var n,r,o,i,a;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),b(!0),p(""),e.next=5,O(s,c);case 5:if(n=e.sent,r=n.token,o=n.error,i=n.exception,void 0===(a=n.message)){e.next=15;break}return x("error"),b(!1),p(a.length?a:"Error: Are you interacting with the wrong server?"),e.abrupt("return");case 15:if(!o&&!i){e.next=20;break}return x("error"),b(!1),p(o.length?o:i),e.abrupt("return");case 20:if(r&&"string"==typeof r){e.next=25;break}return x("error"),b(!1),p((0,gt.__)("Something went wrong","extendify-sdk")),e.abrupt("return");case 25:x("success"),p("Success!"),k(!0),b(!1),D.setState({email:s,apiKey:r});case 30:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){Vn(i,r,o,s,a,"next",e)}function a(e){Vn(i,r,o,s,a,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}();return j?(0,_t.jsxs)("section",{className:"w-80 space-y-8 text-center pt-2 pb-4",children:[(0,_t.jsx)(_n,{icon:Fn,size:148}),(0,_t.jsx)("p",{className:"text-lg text-extendify-black text-center leading-extra-tight font-semibold",children:(0,gt.__)("You've signed in to Extendify","extendify-sdk")}),(0,_t.jsx)(bt.Button,{ref:S,className:"px-4 p-2 cursor-pointer text-center rounded bg-extendify-main text-white",onClick:t,children:(0,gt.__)("View patterns","extendify-sdk")})]}):o?(0,_t.jsxs)("section",{className:"space-y-8 w-full pb-2",children:[(0,_t.jsx)("p",{className:"text-base text-extendify-black leading-extra-tight",children:(0,gt.__)("Account","extendify-sdk")}),(0,_t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,_t.jsxs)("div",{className:"flex items-center space-x-2 -ml-2",children:[(0,_t.jsx)(_n,{icon:Dn,size:48}),(0,_t.jsx)("p",{className:"text-extendify-black",children:null!=s&&s.length?s:(0,gt.__)("Logged In","extendify-sdk")})]}),window.location.search.indexOf("DEVMODE")>-1&&(0,_t.jsx)(bt.Button,{className:"px-4 py-3 cursor-pointer text-center rounded bg-extendify-main hover:bg-extendify-main-dark text-white",onClick:function(){u(""),D.setState({apiKey:""}),setTimeout((function(){var e;null==C||null===(e=C.current)||void 0===e||e.focus()}),0)},children:(0,gt.__)("Sign out","extendify-sdk")})]})]}):(0,_t.jsxs)("section",{className:"w-80 text-left space-y-8 pb-6",children:[(0,_t.jsxs)("div",{children:[(0,_t.jsx)("p",{className:"text-lg text-extendify-black text-center leading-extra-tight font-semibold",children:(0,gt.__)("Sign in to Extendify","extendify-sdk")}),(0,_t.jsxs)("p",{className:"text-sm text-extendify-gray text-center space-x-1 leading-extra-tight",children:[(0,_t.jsx)("span",{children:(0,gt.__)("Don't have an account?","extendify-sdk")}),(0,_t.jsx)("a",{href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign-in-form&utm_content=sign-up"),target:"_blank",className:"underline hover:no-underline text-extendify-gray",rel:"noreferrer",children:(0,gt.__)("Sign up","extendify-sdk")})]})]}),(0,_t.jsxs)("form",{onSubmit:_,className:"space-y-2",children:[(0,_t.jsxs)("div",{className:"flex items-center",children:[(0,_t.jsx)("label",{className:"sr-only",htmlFor:"extendifysdk-login-email",children:(0,gt.__)("Email address","extendify-sdk")}),(0,_t.jsx)("input",{ref:n,id:"extendifysdk-login-email",name:"extendifysdk-login-email",type:"email",className:"border-2 p-2 w-full rounded",placeholder:(0,gt.__)("Email address","extendify-sdk"),value:s.length?s:"",onChange:function(e){return a(e.target.value)}})]}),(0,_t.jsxs)("div",{className:"flex items-center",children:[(0,_t.jsx)("label",{className:"sr-only",htmlFor:"extendifysdk-login-license",children:(0,gt.__)("License key","extendify-sdk")}),(0,_t.jsx)("input",{ref:C,id:"extendifysdk-login-license",name:"extendifysdk-login-license",type:"text",className:"border-2 p-2 w-full rounded",placeholder:(0,gt.__)("License key","extendify-sdk"),value:c,onChange:function(e){return u(e.target.value)}})]}),(0,_t.jsx)("div",{className:"pt-2 flex justify-center",children:(0,_t.jsxs)("button",{type:"submit",className:"relative p-2 py-3 w-72 max-w-full flex justify-center cursor-pointer text-center rounded bg-extendify-main hover:bg-extendify-main-dark text-base text-white ",children:[(0,_t.jsx)("span",{children:(0,gt.__)("Sign In","extendify-sdk")}),v&&(0,_t.jsx)("div",{className:"absolute right-2.5",children:(0,_t.jsx)(bt.Spinner,{})})]})}),f&&(0,_t.jsx)("div",{className:jt()({"border-gray-900 text-gray-900":"info"===m,"border-wp-alert-red text-wp-alert-red":"error"===m,"border-extendify-main text-extendify-main":"success"===m}),children:f}),(0,_t.jsx)("div",{className:"text-center pt-4",children:(0,_t.jsx)("a",{target:"_blank",rel:"noreferrer",href:"https://extendify.com/guides/sign-in?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=sign-in-form&utm_content=need-help"),className:"underline hover:no-underline text-sm text-extendify-gray",children:(0,gt.__)("Need Help?","extendify-sdk")})})]})]})}function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(n),!0).forEach((function(t){Kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zn=function(e){return(0,_t.jsx)(bt.Button,Gn(Gn({},e),{},{icon:(0,_t.jsx)(_n,{icon:zn}),className:"text-extendify-black opacity-75 hover:opacity-100",showTooltip:!1,label:(0,gt.__)("Close dialog","extendify-sdk")}))},Yn=(0,r.forwardRef)((function(e,t){var n=e.isOpen,o=e.heading,i=e.onRequestClose,s=e.children,a=(0,r.useRef)(null);return(0,_t.jsx)(Te.Root,{appear:!0,show:n,as:r.Fragment,children:(0,_t.jsx)(vt,{as:"div",static:!0,open:n,initialFocus:null!=t?t:a,className:"extendify-sdk",onClose:i,children:(0,_t.jsxs)("div",{className:"fixed z-high inset-0 flex",children:[(0,_t.jsx)(Te.Child,{as:r.Fragment,enter:"ease-out duration-50 transition",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,_t.jsx)(vt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-40 transition-opacity"})}),(0,_t.jsx)(Te.Child,{as:r.Fragment,enter:"ease-out duration-300 translate transform",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,_t.jsx)("div",{className:"m-auto relative w-full",children:(0,_t.jsxs)("div",{className:"bg-white shadow-modal items-center justify-center m-auto max-w-lg relative rounded-sm w-full",children:[o?(0,_t.jsxs)("div",{className:"border-b flex justify-between items-center leading-none pl-6 py-2 pr-3",children:[(0,_t.jsx)("span",{className:"text-base text-extendify-black whitespace-nowrap",children:o}),(0,_t.jsx)(Zn,{onClick:i})]}):(0,_t.jsx)("div",{className:"absolute block px-6 py-4 top-0 right-0 ",children:(0,_t.jsx)(Zn,{ref:a,onClick:i})}),(0,_t.jsx)("div",{children:s})]})})})]})})})}));function Xn(e){var t=e.isOpen,n=e.onClose,o=(0,r.useRef)(null);return(0,_t.jsx)(Yn,{heading:(0,gt.__)("Settings","extendify-sdk"),isOpen:t,ref:o,onRequestClose:n,children:(0,_t.jsx)("div",{className:"flex p-6 justify-center",children:(0,_t.jsx)(Wn,{initialFocus:o,actionCallback:n})})})}function Qn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return er(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tr(e){var t=e.className,n=y((function(e){return e.setOpen})),o=Qn((0,r.useState)(!1),2),i=o[0],s=o[1];return(0,_t.jsx)("div",{className:t,children:(0,_t.jsxs)("div",{className:"flex justify-between items-center px-6 sm:pl-6 sm:pr-12 h-full",children:[(0,_t.jsx)("div",{className:"flex space-x-12 h-full",children:(0,_t.jsx)("div",{className:"bg-transparent flex items-center space-x-1.5 lg:w-72 text-extendify-black",children:(0,_t.jsx)(_n,{icon:Ln,size:40})})}),(0,_t.jsx)(qn,{}),(0,_t.jsxs)("div",{className:"space-x-2 transform sm:translate-x-6 flex",children:[(0,_t.jsx)(bt.Button,{onClick:function(){return s(!0)},icon:(0,_t.jsx)(_n,{icon:Dn,size:24}),label:(0,gt.__)("Settings","extendify-sdk")}),i&&(0,_t.jsx)(Xn,{isOpen:i,onClose:function(){return s(!1)}}),(0,_t.jsx)(bt.Button,{onClick:function(){return n(!1)},icon:(0,_t.jsx)(_n,{icon:zn,size:24}),label:(0,gt.__)("Close library","extendify-sdk")})]})]})})}function nr(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function rr(){return rr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rr.apply(this,arguments)}function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?or(Object(n),!0).forEach((function(t){sr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ar={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0};class lr extends i().Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame((()=>{this.reCalculateColumnCount()}))):this.reCalculateColumnCount()}reCalculateColumnCount(){const e=window&&window.innerWidth||1/0;let t=this.props.breakpointCols;"object"!=typeof t&&(t={default:parseInt(t)||2});let n=1/0,r=t.default||2;for(let o in t){const i=parseInt(o);i>0&&e<=i&&i<n&&(n=i,r=t[o])}r=Math.max(1,parseInt(r)||1),this.state.columnCount!==r&&this.setState({columnCount:r})}itemsInColumns(){const e=this.state.columnCount,t=new Array(e),n=i().Children.toArray(this.props.children);for(let r=0;r<n.length;r++){const o=r%e;t[o]||(t[o]=[]),t[o].push(n[r])}return t}renderColumns(){const{column:e,columnAttrs:t={},columnClassName:n}=this.props,r=this.itemsInColumns(),o=100/r.length+"%";let s=n;s&&"string"!=typeof s&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===s&&(s="my-masonry-grid_column"));const a=ir(ir(ir({},e),t),{},{style:ir(ir({},t.style),{},{width:o}),className:s});return r.map(((e,t)=>i().createElement("div",rr({},a,{key:t}),e)))}logDeprecated(e){console.error("[Masonry]",e)}render(){const e=this.props,{children:t,breakpointCols:n,columnClassName:r,columnAttrs:o,column:s,className:a}=e,l=nr(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let c=a;return"string"!=typeof a&&(this.logDeprecated('The property "className" requires a string'),void 0===a&&(c="my-masonry-grid")),i().createElement("div",rr({},l,{className:c}),this.renderColumns())}}lr.defaultProps=ar;const cr=lr;function ur(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hr(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function mr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){hr(i,r,o,s,a,"next",e)}function a(e){hr(i,r,o,s,a,"throw",e)}s(void 0)}))}}var xr=0,yr=function(e){var t=arguments;return mr(g().mark((function n(){var r,o,i,s,a,l;return g().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=t.length>1&&void 0!==t[1]?t[1]:{},xr++,a="pattern"===e.type?"8":"4",n.next=5,w.post("templates",{filterByFormula:br(e),pageSize:null!==(r=null==s?void 0:s.pageSize)&&void 0!==r?r:a,categories:e.taxonomies,search:e.search,type:e.type,offset:null!==(o=s.offset)&&void 0!==o?o:"",initial:1===xr,request_count:xr,sdk_partner:null!==(i=D.getState().sdkPartner)&&void 0!==i?i:""});case 5:return l=n.sent,n.abrupt("return",l);case 7:case"end":return n.stop()}}),n)})))()},vr=function(e){var t;return w.post("templates/".concat(e.id),{template_id:e.id,maybe_import:!0,type:e.fields.type,pageSize:"1",template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},gr=function(e){var t,n,r;return w.post("templates/".concat(e.id),{template_id:e.id,imported:!0,base_pattern:null!==(t=null===(n=e.fields)||void 0===n?void 0:n.base_pattern[0])&&void 0!==t?t:"",type:e.fields.type,pageSize:"1",template_name:null===(r=e.fields)||void 0===r?void 0:r.title})},br=function(e){var t,n=e.taxonomies,r=e.type;n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(n),!0).forEach((function(t){pr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n);var o=[];"Unknown"===(null===(t=n)||void 0===t?void 0:t.tax_categories)&&(n.tax_categories="Default");var i=Object.entries(n).filter((function(e){var t=ur(e,2),n=t[0],o=t[1];return jr(n,o,r)})).filter((function(e){var t=ur(e,1)[0];return Boolean(t[1].length)})).map((function(e){var t=ur(e,2),n=t[0],r=t[1];return"".concat(n,' = "').concat(r,'"')})).join(", ");return i.length&&o.push(i),r.length&&o.push('{type}="'.concat(r,'"')),o.length?"AND(".concat(o.join(", "),")").replace(/\r?\n|\r/g,""):""},wr=new Map,jr=function(e,t,n){var r,o,i,s,a="".concat(e,"-").concat(t,"-").concat(n);if("tax_categories-Default-pattern"===a)return!0;wr.has(a)||wr.set(a,null===(r=U.getState())||void 0===r||null===(o=r.taxonomies[e])||void 0===o||null===(i=o.find((function(e){return(null==e?void 0:e.term)===t})))||void 0===i||null===(s=i.type)||void 0===s?void 0:s.includes(n));return wr.get(a)};function kr(){return kr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kr.apply(this,arguments)}var Or=new Map,Sr=new WeakMap,Cr=0;function _r(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(Sr.has(n)||(Cr+=1,Sr.set(n,Cr.toString())),Sr.get(n)):"0":e[t]);var n})).toString()}function Er(e,t,n){if(void 0===n&&(n={}),!e)return function(){};var r=function(e){var t=_r(e),n=Or.get(t);if(!n){var r,o=new Map,i=new IntersectionObserver((function(t){t.forEach((function(t){var n,i=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=o.get(t.target))||n.forEach((function(e){e(i,t)}))}))}),e);r=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:o},Or.set(t,n)}return n}(n),o=r.id,i=r.observer,s=r.elements,a=s.get(e)||[];return s.has(e)||s.set(e,a),a.push(t),i.observe(e),function(){a.splice(a.indexOf(t),1),0===a.length&&(s.delete(e),i.unobserve(e)),0===s.size&&(i.disconnect(),Or.delete(o))}}function Nr(e){return"function"!=typeof e.children}var Ar=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),Nr(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},i.componentWillUnmount=function(){this.unobserve(),this.node=null},i.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,o=e.trackVisibility,i=e.delay;this._unobserveCb=Er(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:o,delay:i})}},i.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},i.render=function(){if(!Nr(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var r=this.props,i=r.children,s=r.as,a=r.tag,l=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return(0,o.createElement)(s||a||"div",kr({ref:this.handleNode},l),i)},r}(o.Component);function Pr(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,i=t.trackVisibility,s=t.rootMargin,a=t.root,l=t.triggerOnce,c=t.skip,u=t.initialInView,d=(0,o.useRef)(),f=(0,o.useState)({inView:!!u}),p=f[0],h=f[1],m=(0,o.useCallback)((function(e){void 0!==d.current&&(d.current(),d.current=void 0),c||e&&(d.current=Er(e,(function(e,t){h({inView:e,entry:t}),t.isIntersecting&&l&&d.current&&(d.current(),d.current=void 0)}),{root:a,rootMargin:s,threshold:n,trackVisibility:i,delay:r}))}),[Array.isArray(n)?n.toString():n,a,s,l,c,i,r]);(0,o.useEffect)((function(){d.current||!p.entry||l||c||h({inView:!!u})}));var x=[m,p.inView,p.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}Ar.displayName="InView",Ar.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};var Tr=function(){return w.get("plugins")},Ir=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new FormData;return t.append("plugins",JSON.stringify(e)),w.post("plugins",t,{headers:{"Content-Type":"multipart/form-data"}})},Lr=function(){return w.get("active-plugins")};function Mr(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function Rr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){Mr(i,r,o,s,a,"next",e)}function a(e){Mr(i,r,o,s,a,"throw",e)}s(void 0)}))}}var Dr=[],Fr=[];function Br(e){return Ur.apply(this,arguments)}function Ur(){return(Ur=Rr(g().mark((function e(t){var n,r,o,i;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((o=(o=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(Dr.length){e.next=10;break}return e.t0=Object,e.next=8,Tr();case 8:e.t1=e.sent,Dr=e.t0.keys.call(e.t0,e.t1);case 10:return i=!!o.length&&o.filter((function(e){return!Dr.some((function(t){return t.includes(e)}))})),e.abrupt("return",i.length);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zr(e){return qr.apply(this,arguments)}function qr(){return(qr=Rr(g().mark((function e(t){var n,r,o,i;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((o=(o=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(Fr.length){e.next=10;break}return e.t0=Object,e.next=8,Lr();case 8:e.t1=e.sent,Fr=e.t0.values.call(e.t0,e.t1);case 10:if(!(i=!!o.length&&o.filter((function(e){return!Fr.some((function(t){return t.includes(e)}))})))){e.next=16;break}return e.next=14,Br(t);case 14:if(!e.sent){e.next=16;break}return e.abrupt("return",!1);case 16:return e.abrupt("return",i.length);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Vr=l(x((function(e){return{wantedTemplate:{},importOnLoad:!1,setWanted:function(t){return e({wantedTemplate:t})},removeWanted:function(){return e({wantedTemplate:{}})}}}),{name:"extendify-wanted-template"}));function $r(e){var t=e.msg;return(0,_t.jsxs)(bt.Modal,{style:{maxWidth:"500px"},title:(0,gt.__)("Error installing plugins","extendify-sdk"),isDismissible:!1,children:[(0,gt.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,_t.jsx)("br",{}),(0,_t.jsx)(bt.Notice,{isDismissible:!1,status:"error",children:t}),(0,_t.jsx)(bt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(Qr,{}),document.getElementById("extendify-root"))},children:(0,gt.__)("Go back","extendify-sdk")})]})}const Hr=wp.data;function Wr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gr(){var e=Wr((0,r.useState)(!1),2),t=e[0],n=e[1],o=function(){location.reload()};return(0,(0,Hr.select)("core/editor").isEditedPostDirty)()?(0,_t.jsxs)(bt.Modal,{title:(0,gt.__)("Reload required","extendify-sdk"),isDismissible:!1,children:[(0,_t.jsx)("p",{style:{maxWidth:"400px"},children:(0,gt.__)("Just one more thing! We need to reload the page to continue.","extendify-sdk")}),(0,_t.jsxs)(bt.ButtonGroup,{children:[(0,_t.jsx)(bt.Button,{isPrimary:!0,onClick:o,disabled:t,children:(0,gt.__)("Reload page","extendify-sdk")}),(0,_t.jsx)(bt.Button,{isSecondary:!0,onClick:function(){n(!0),(0,Hr.dispatch)("core/editor").savePost(),n(!1)},isBusy:t,style:{margin:"0 4px"},children:(0,gt.__)("Save changes","extendify-sdk")})]})]}):(o(),null)}function Kr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yr(){var e,t=Kr((0,r.useState)(""),2),n=t[0],o=t[1],i=Vr((function(e){return e.wantedTemplate})),s=null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return Ir(s).then((function(){Vr.setState({importOnLoad:!0}),(0,r.render)((0,_t.jsx)(Gr,{}),document.getElementById("extendify-root"))})).catch((function(e){var t=e.message;o(t)})),n?(0,_t.jsx)($r,{msg:n}):(0,_t.jsx)(bt.Modal,{title:(0,gt.__)("Installing plugins","extendify-sdk"),isDismissible:!1,children:(0,_t.jsx)(bt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,gt.__)("Installing...","extendify-sdk")})})}function Xr(){var e,t,n,o=Vr((function(e){return e.wantedTemplate})),i=(null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins)||[];return(0,_t.jsxs)(bt.Modal,{title:(0,gt.__)("Plugins required","extendify-sdk"),isDismissible:!1,children:[(0,_t.jsx)("p",{style:{maxWidth:"400px"},children:(0,gt.sprintf)((0,gt.__)("In order to add this %s to your site, the following plugins are required to be installed and activated.","extendify-sdk"),null!==(t=null==o||null===(n=o.fields)||void 0===n?void 0:n.type)&&void 0!==t?t:"template")}),(0,_t.jsx)("ul",{children:i.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,_t.jsx)("li",{children:St(e)},e)}))}),(0,_t.jsx)("p",{style:{maxWidth:"400px",fontWeight:"bold"},children:(0,gt.__)("Please contact a site admin for assistance in adding these plugins to your site.","extendify-sdk")}),(0,_t.jsx)(bt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(gi,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none"},children:(0,gt.__)("Return to library","extendify-sdk")})]})}function Qr(e){var t,n,o,i,s,a,l,c,u=Vr((function(e){return e.wantedTemplate})),d=(null==u||null===(t=u.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=D.getState())&&void 0!==n&&n.canInstallPlugins?(0,_t.jsxs)(bt.Modal,{title:null!==(o=e.title)&&void 0!==o?o:(0,gt.__)("Install required plugins","extendify-sdk"),isDismissible:!1,children:[(0,_t.jsx)("p",{style:{maxWidth:"400px"},children:null!==(i=e.message)&&void 0!==i?i:(0,gt.__)((0,gt.sprintf)("There is just one more step. This %s requires the following to be automatically installed and activated:",null!==(s=null==u||null===(a=u.fields)||void 0===a?void 0:a.type)&&void 0!==s?s:"template"),"extendify-sdk")}),(null===(l=e.message)||void 0===l?void 0:l.length)>0||(0,_t.jsx)("ul",{children:d.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,_t.jsx)("li",{children:St(e)},e)}))}),(0,_t.jsxs)(bt.ButtonGroup,{children:[(0,_t.jsx)(bt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(Yr,{}),document.getElementById("extendify-root"))},children:null!==(c=e.buttonLabel)&&void 0!==c?c:(0,gt.__)("Install Plugins","extendify-sdk")}),e.forceOpen||(0,_t.jsx)(bt.Button,{isTertiary:!0,onClick:function(){e.forceOpen||(0,r.render)((0,_t.jsx)(gi,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,gt.__)("No thanks, take me back","extendify-sdk")})]})]}):(0,_t.jsx)(Xr,{})}function eo(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}var to=function(){var e,t=(e=g().mark((function e(t){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Br(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,_t.jsx)(Qr,{}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasRequiredPlugins",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){eo(i,r,o,s,a,"next",e)}function a(e){eo(i,r,o,s,a,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}();function no(e){var t=e.msg;return(0,_t.jsxs)(bt.Modal,{style:{maxWidth:"500px"},title:(0,gt.__)("Error Activating plugins","extendify-sdk"),isDismissible:!1,children:[(0,gt.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,_t.jsx)("br",{}),(0,_t.jsx)(bt.Notice,{isDismissible:!1,status:"error",children:t}),(0,_t.jsx)(bt.Button,{isPrimary:!0,onClick:function(){(0,r.render)((0,_t.jsx)(lo,{}),document.getElementById("extendify-root"))},children:(0,gt.__)("Go back","extendify-sdk")})]})}function ro(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function oo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){ro(i,r,o,s,a,"next",e)}function a(e){ro(i,r,o,s,a,"throw",e)}s(void 0)}))}}function io(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return so(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return so(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function so(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ao(){var e,t=io((0,r.useState)(""),2),n=t[0],o=t[1],i=Vr((function(e){return e.wantedTemplate})),s=null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return Ir(s).then((function(){Vr.setState({importOnLoad:!0})})).then(oo(g().mark((function e(){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:(0,r.render)((0,_t.jsx)(Gr,{}),document.getElementById("extendify-root"));case 3:case"end":return e.stop()}}),e)})))).catch((function(e){var t=e.response;o(t.data.message)})),n?(0,_t.jsx)(no,{msg:n}):(0,_t.jsx)(bt.Modal,{title:(0,gt.__)("Activating plugins","extendify-sdk"),isDismissible:!1,children:(0,_t.jsx)(bt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,gt.__)("Activating...","extendify-sdk")})})}function lo(e){var t,n,o,i,s,a=Vr((function(e){return e.wantedTemplate})),l=(null==a||null===(t=a.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=D.getState())&&void 0!==n&&n.canActivatePlugins?(0,_t.jsx)(bt.Modal,{title:(0,gt.__)("Activate required plugins","extendify-sdk"),isDismissible:!1,children:(0,_t.jsxs)("div",{children:[(0,_t.jsx)("p",{style:{maxWidth:"400px"},children:null!==(o=e.message)&&void 0!==o?o:(0,gt.__)((0,gt.sprintf)("There is just one more step. This %s requires the following plugins to be installed and activated:",null!==(i=null==a||null===(s=a.fields)||void 0===s?void 0:s.type)&&void 0!==i?i:"template"),"extendify-sdk")}),(0,_t.jsx)("ul",{children:l.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,_t.jsx)("li",{children:St(e)},e)}))}),(0,_t.jsxs)(bt.ButtonGroup,{children:[(0,_t.jsx)(bt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(ao,{}),document.getElementById("extendify-root"))},children:(0,gt.__)("Activate Plugins","extendify-sdk")}),e.showClose&&(0,_t.jsx)(bt.Button,{isTertiary:!0,onClick:function(){return(0,r.render)((0,_t.jsx)(gi,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,gt.__)("No thanks, return to library","extendify-sdk")})]})]})}):(0,_t.jsx)(Xr,{})}function co(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}var uo=function(){var e,t=(e=g().mark((function e(t){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zr(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,_t.jsx)(lo,{showClose:!0}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasPluginsActivated",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){co(i,r,o,s,a,"next",e)}function a(e){co(i,r,o,s,a,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}();function fo(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function po(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ho(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ho(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mo(e){var t=e.finished,n=po((0,r.useState)(""),2),o=n[0],i=n[1],s=(0,r.useRef)(),a=function(){var e,n=(e=g().mark((function e(n){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.next=3,C(o);case 3:D.setState({registration:{email:o}}),t();case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){fo(i,r,o,s,a,"next",e)}function a(e){fo(i,r,o,s,a,"throw",e)}s(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,_t.jsxs)(bt.Modal,{className:"extendify-sdk",title:(0,gt.__)("One last step...","extendify-sdk"),isDismissible:!1,children:[(0,_t.jsx)("p",{className:"m-0 mb-4 max-w-md",children:(0,gt.__)("Register now to receive updates and special offers from Extendify","extendify-sdk")}),(0,_t.jsxs)("form",{onSubmit:a,className:"flex space-x-4 mb-8",children:[(0,_t.jsxs)("div",{className:"relative w-full max-w-xs",children:[(0,_t.jsx)("input",{id:"extendify-email-register",required:!0,onChange:function(e){return i(e.target.value)},type:"text",className:"extendify-special-input button-focus text-sm h-8 min-h-0 border border-gray-900 special-input placeholder-transparent rounded-none w-full px-2",placeholder:(0,gt.__)("Email","extendify-sdk")}),(0,_t.jsx)("label",{htmlFor:"extendify-email-register",className:"-top-3 bg-white absolute left-1 px-1 transition-all",children:(0,gt.__)("Email","extendify-sdk")})]}),(0,_t.jsx)("input",{type:"submit",className:"hidden"})]}),(0,_t.jsxs)(bt.ButtonGroup,{children:[(0,_t.jsx)(bt.Button,{ref:s,isPrimary:!0,onClick:a,children:(0,gt.__)("Submit and import","extendify-sdk")}),(0,_t.jsx)(bt.Button,{isTertiary:!0,onClick:t,style:{boxShadow:"none",margin:"0 4px"},children:(0,gt.__)("Skip and import","extendify-sdk")})]})]})}function xo(){var e;return{id:"NeedsRegistrationModal",pass:Boolean((null===(e=D.getState().registration)||void 0===e?void 0:e.email)||D.getState().apiKey),allow:function(){},deny:function(){return new Promise((function(e){(0,r.render)((0,_t.jsx)(mo,{finished:e}),document.getElementById("extendify-root"))}))}}}function yo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return vo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vo(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function vo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function go(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function bo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){go(i,r,o,s,a,"next",e)}function a(e){go(i,r,o,s,a,"throw",e)}s(void 0)}))}}function wo(e){return function(){return new jo(e.apply(this,arguments))}}function jo(e){var t,n;function r(t,n){try{var i=e[t](n),s=i.value,a=s instanceof ko;Promise.resolve(a?s.wrapped:s).then((function(e){a?r("return"===t?"return":"next",e):o(i.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise((function(i,s){var a={key:e,arg:o,resolve:i,reject:s,next:null};n?n=n.next=a:(t=n=a,r(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}function ko(e){this.wrapped=e}jo.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},jo.prototype.next=function(e){return this._invoke("next",e)},jo.prototype.throw=function(e){return this._invoke("throw",e)},jo.prototype.return=function(e){return this._invoke("return",e)};function Oo(e){return So.apply(this,arguments)}function So(){return(So=bo(g().mark((function e(t){var n;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Co(t);case 1:return e.next=4,n.next();case 4:if(!e.sent.done){e.next=7;break}return e.abrupt("break",9);case 7:e.next=1;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Co(e){return _o.apply(this,arguments)}function _o(){return(_o=wo(g().mark((function e(t){var n,r,o;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=yo(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,o();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function Eo(e,t){return(0,(0,Hr.dispatch)("core/block-editor").insertBlocks)(e).then((function(){window.dispatchEvent(new CustomEvent("extendify-sdk::template-inserted",{detail:{template:t},bubbles:!0}))}))}const No=wp.blockEditor,Ao=wp.blocks;var Po=["tagName","children"];function To(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Io(e){var t=e.tagName,n=void 0===t?"button":t,o=e.children,i=To(e,Po);return i.className=jt()(i.className,"bg-extendify-main hover:bg-extendify-main-dark py-3 pl-5 pr-3 w-60 rounded no-underline text-base text-white flex justify-center items-center space-x-2"),(0,r.createElement)(n,i,o)}function Lo(e){var t=e.onRequestClose,n=e.isOpen,o=e.left,i=e.right;return(0,_t.jsx)(Te.Root,{appear:!0,show:!0,as:r.Fragment,children:(0,_t.jsx)(vt,{as:"div",static:!0,open:n,className:"extendify-sdk",onClose:t,children:(0,_t.jsxs)("div",{className:"fixed z-high inset-0 flex",children:[(0,_t.jsx)(Te.Child,{as:r.Fragment,enter:"ease-out duration-50 transition",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,_t.jsx)(vt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-40 transition-opacity"})}),(0,_t.jsx)(Te.Child,{as:r.Fragment,enter:"ease-out duration-300 translate transform",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,_t.jsx)("div",{className:"m-auto",children:(0,_t.jsxs)("div",{className:"shadow-modal relative m-8 md:m-0 max-w-md rounded-sm md:flex bg-gray-100 items-center justify-center md:max-w-2xl",children:[(0,_t.jsxs)("button",{onClick:t,className:"absolute bg-transparent block p-4 top-0 right-0 rounded-md cursor-pointer text-gray-700 opacity-30 hover:opacity-100",children:[(0,_t.jsx)("span",{className:"sr-only",children:(0,gt.__)("Close","extendify-sdk")}),(0,_t.jsx)(_n,{icon:zn})]}),(0,_t.jsx)("div",{className:"rounded-md md:rounded-l-md md:rounded-tr-none bg-white p-12 text-center md:w-7/12 items-center",children:o}),(0,_t.jsx)("div",{className:"justify-center md:justify-none md:w-6/12 p-10 text-black hidden md:block ",children:i})]})})})]})})})}function Mo(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function Ro(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Do(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Do(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Do(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fo=(0,r.memo)((function(e){var t=e.blocks;return(0,_t.jsx)("div",{className:"with-light-shadow relative",children:(0,_t.jsx)(No.BlockPreview,{blocks:t,live:!1,viewportWidth:1400})})}),(function(e,t){return e.clientId==t.clientId})),Bo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:to,hasPluginsActivated:uo,NeedsRegistrationModal:xo,stack:[],check:function(t){var n=this;return bo(g().mark((function r(){var o,i,s,a;return g().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=yo(e),r.prev=1,o.s();case 3:if((i=o.n()).done){r.next=11;break}return s=i.value,r.next=7,n["".concat(s)](t);case 7:a=r.sent,n.stack.push(a.pass?a.allow:a.deny);case 9:r.next=3;break;case 11:r.next=16;break;case 13:r.prev=13,r.t0=r.catch(1),o.e(r.t0);case 16:return r.prev=16,o.f(),r.finish(16);case 19:case"end":return r.stop()}}),r,null,[[1,13,16,19]])})))()},reset:function(){this.stack=[]}}}(["NeedsRegistrationModal","hasRequiredPlugins","hasPluginsActivated"]);function Uo(e){var t,n=e.template,o=(0,r.useRef)(null),i=(0,r.useRef)(!1),s=D((function(e){return e.canImport})),a=y((function(e){return e.setOpen})),l=(0,Ao.rawHandler)({HTML:n.fields.code}),c=Ro((0,r.useState)(!1),2),u=c[0],d=c[1],f=Ro(Pr(),2),p=f[0],h=f[1],m=Ro((0,r.useState)(!1),2),x=m[0],v=m[1],b=function(){var e,t=(e=g().mark((function e(){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bo.check(n);case 2:Oo(Bo.stack).then((function(){setTimeout((function(){Eo(l,n).then((function(){return a(!1)})).then((function(){return(0,r.render)((0,_t.jsx)(gi,{}),document.getElementById("extendify-root"))})).then((function(){return Bo.reset()}))}),100)}));case 3:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){Mo(i,r,o,s,a,"next",e)}function a(e){Mo(i,r,o,s,a,"throw",e)}s(void 0)}))});return function(){return t.apply(this,arguments)}}(),w=function(){s()?(vr(n),b()):v(!0)};return(0,r.useEffect)((function(){!u&&h&&d(!0)}),[h,u,n]),(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsxs)("div",{role:"button",tabIndex:"0",ref:o,"aria-label":(0,gt.sprintf)((0,gt.__)("Press to import %s","extendify-sdk"),null==n||null===(t=n.fields)||void 0===t?void 0:t.type),className:"mb-8 cursor-pointer button-focus",onFocus:function(){i.current||(i.current=!0,Array.from(o.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).forEach((function(e){return e.setAttribute("tabIndex","-1")})))},onClick:w,onKeyDown:function(e){["Enter","Space"," "].includes(e.key)&&(e.stopPropagation(),e.preventDefault(),w())},children:[(0,_t.jsx)("div",{ref:p,className:"invisible absolute inset-0 pointer-events-none"}),u&&(0,_t.jsx)(Fo,{blocks:l})]}),x&&(0,_t.jsx)(Lo,{isOpen:x,onRequestClose:function(){return v(!1)},left:(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("div",{className:"flex space-x-2 items-center justify-center mb-10 text-extendify-black",children:Mn}),(0,_t.jsx)("h3",{className:"text-xl md:leading-3",children:(0,gt.__)("You're out of imports","extendify-sdk")}),(0,_t.jsx)("p",{className:"text-sm text-black",children:(0,gt.__)("Sign up today and get unlimited access to our entire collection of patterns and page layouts.","extendify-sdk")}),(0,_t.jsx)("div",{children:(0,_t.jsxs)(Io,{tagName:"a",target:"_blank",className:"m-auto mt-10",href:"https://extendify.com/pricing/?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=no-imports-modal&utm_content=get-unlimited-imports"),rel:"noreferrer",children:[(0,gt.__)("Get Unlimited Imports","extendify-sdk"),(0,_t.jsx)("svg",{fill:"none",height:"24",viewBox:"0 0 25 24",width:"25",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)("path",{d:"m10.3949 8.7864 5.5476-.02507m0 0-.0476 5.52507m.0476-5.52507c-2.357 2.35707-5.4183 5.41827-7.68101 7.68097",stroke:"currentColor",strokeWidth:"1.5"})})]})})]}),right:(0,_t.jsxs)("div",{className:"space-y-2",children:[(0,_t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.49271 18.0092C6.97815 17.1176 7.28413 15.9755 8.17569 15.4609C9.06724 14.946 10.2094 15.252 10.7243 16.1435C11.2389 17.0355 10.9329 18.1772 10.0413 18.6922C9.14978 19.2071 8.00764 18.9011 7.49271 18.0092V18.0092Z",fill:"currentColor"}),(0,_t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5073 6.12747C17.0218 7.01903 16.7158 8.16117 15.8243 8.67573C14.9327 9.19066 13.7906 8.88467 13.2757 7.99312C12.7611 7.10119 13.0671 5.95942 13.9586 5.44449C14.8502 4.92956 15.9923 5.23555 16.5073 6.12747V6.12747Z",fill:"currentColor"}),(0,_t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.60135 11.1355C5.11628 10.2439 6.25805 9.93793 7.14998 10.4525C8.04153 10.9674 8.34752 12.1096 7.83296 13.0011C7.31803 13.8927 6.17588 14.1987 5.28433 13.6841C4.39278 13.1692 4.08679 12.0274 4.60135 11.1355V11.1355Z",fill:"currentColor"}),(0,_t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.3986 13.0011C18.8837 13.8927 17.7419 14.1987 16.85 13.6841C15.9584 13.1692 15.6525 12.027 16.167 11.1355C16.682 10.2439 17.8241 9.93793 18.7157 10.4525C19.6072 10.9674 19.9132 12.1092 19.3986 13.0011V13.0011Z",fill:"currentColor"}),(0,_t.jsx)("path",{d:"M9.10857 8.92594C10.1389 8.92594 10.9742 8.09066 10.9742 7.06029C10.9742 6.02992 10.1389 5.19464 9.10857 5.19464C8.0782 5.19464 7.24292 6.02992 7.24292 7.06029C7.24292 8.09066 8.0782 8.92594 9.10857 8.92594Z",fill:"currentColor"}),(0,_t.jsx)("path",{d:"M14.8913 18.942C15.9217 18.942 16.7569 18.1067 16.7569 17.0763C16.7569 16.046 15.9217 15.2107 14.8913 15.2107C13.8609 15.2107 13.0256 16.046 13.0256 17.0763C13.0256 18.1067 13.8609 18.942 14.8913 18.942Z",fill:"currentColor"}),(0,_t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3841 13.0011C9.86951 12.1096 10.1755 10.9674 11.067 10.4525C11.9586 9.93793 13.1007 10.2439 13.6157 11.1355C14.1302 12.0274 13.8242 13.1692 12.9327 13.6841C12.0411 14.1987 10.899 13.8927 10.3841 13.0011V13.0011Z",fill:"currentColor"})]}),(0,_t.jsx)("span",{className:"text-sm leading-none",children:(0,gt.__)("Access to 100's of Patterns","extendify-sdk")})]}),(0,_t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_t.jsx)("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,_t.jsx)("path",{d:"m6 4.75h12c.6904 0 1.25.55964 1.25 1.25v12c0 .6904-.5596 1.25-1.25 1.25h-12c-.69036 0-1.25-.5596-1.25-1.25v-12c0-.69036.55964-1.25 1.25-1.25z"}),(0,_t.jsx)("path",{d:"m9.25 19v-14"})]})}),(0,_t.jsx)("span",{className:"text-sm leading-none",children:(0,gt.__)("Beautiful full page layouts","extendify-sdk")})]}),(0,_t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("circle",{cx:"12",cy:"12",r:"7.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,_t.jsx)("circle",{cx:"12",cy:"12",r:"4.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,_t.jsx)("circle",{cx:"11.9999",cy:"12.2",r:"6",transform:"rotate(-45 11.9999 12.2)",stroke:"currentColor",strokeWidth:"3",strokeDasharray:"1.5 4"})]}),(0,_t.jsx)("span",{className:"text-sm leading-none",children:(0,gt.__)("Fast and friendly support","extendify-sdk")})]}),(0,_t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_t.jsx)("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,_t.jsx)("path",{d:"m11.7758 3.45425c.0917-.18582.3567-.18581.4484 0l2.3627 4.78731c.0364.07379.1068.12493.1882.13676l5.2831.76769c.2051.02979.287.28178.1386.42642l-3.8229 3.72637c-.0589.0575-.0858.1402-.0719.2213l.9024 5.2618c.0351.2042-.1793.36-.3627.2635l-4.7254-2.4842c-.0728-.0383-.1598-.0383-.2326 0l-4.7254 2.4842c-.18341.0965-.39776-.0593-.36274-.2635l.90247-5.2618c.01391-.0811-.01298-.1638-.0719-.2213l-3.8229-3.72637c-.14838-.14464-.0665-.39663.13855-.42642l5.28312-.76769c.08143-.01183.15182-.06297.18823-.13676z",fill:"currentColor"})}),(0,_t.jsx)("span",{className:"text-sm leading-none",children:(0,gt.__)("14-Day guarantee","extendify-sdk")})]})]})})]})}function zo(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function qo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){zo(i,r,o,s,a,"next",e)}function a(e){zo(i,r,o,s,a,"throw",e)}s(void 0)}))}}function Vo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ho(){var e=function(){var e=(0,r.useRef)(!1);return(0,r.useEffect)((function(){return e.current=!0,function(){return e.current=!1}})),e}(),t=G((function(e){return e.templates})),n=G((function(e){return e.appendTemplates})),o=Vo((0,r.useState)(""),2),i=o[0],s=o[1],a=Vo((0,r.useState)(!1),2),l=a[0],c=a[1],u=Vo(Pr(),2),d=u[0],f=u[1],p=G((function(e){return e.updateSearchParams})),h=G((function(e){return e.searchParams})),m=(0,r.useRef)(G.getState().nextPage),x=(0,r.useRef)(G.getState().searchParams);(0,r.useEffect)((function(){return G.subscribe((function(e){return m.current=e}),(function(e){return e.nextPage}))}),[]),(0,r.useEffect)((function(){return G.subscribe((function(e){return x.current=e}),(function(e){return e.searchParams}))}),[]);var y=(0,r.useCallback)(qo(g().mark((function t(){var r,o;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s(""),c(!1),t.next=4,yr(x.current,{offset:m.current}).catch((function(e){console.error(e),s(e&&e.message?e.message:(0,gt.__)("Unknown error occured. Check browser console or contact support.","extendify-sdk"))}));case 4:if(o=t.sent,e.current){t.next=7;break}return t.abrupt("return");case 7:null!=o&&null!==(r=o.error)&&void 0!==r&&r.length&&s(null==o?void 0:o.error),null!=o&&o.records&&h===x.current&&(G.setState({nextPage:o.offset}),n(o.records),c(o.records.length<=0));case 9:case"end":return t.stop()}}),t)}))),[h,n,e]);if((0,r.useEffect)((function(){Object.keys(x.current.taxonomies).length&&(G.getState().skipNextFetch?G.setState({skipNextFetch:!1}):y())}),[y,x]),(0,r.useEffect)((function(){f&&y()}),[f,y]),i.length)return(0,_t.jsxs)("div",{className:"text-left",children:[(0,_t.jsx)("h2",{className:"text-left",children:(0,gt.__)("Server error","extendify-sdk")}),(0,_t.jsx)("code",{className:"block max-w-xl p-4 mb-4",style:{minHeight:"10rem"},children:i}),(0,_t.jsx)(bt.Button,{isTertiary:!0,onClick:function(){p({taxonomies:{},search:""}),y()},children:(0,gt.__)("Press here to reload experience")})]});if(l)return(0,_t.jsx)("h2",{className:"text-left",children:(0,gt.__)("No results found.","extendify-sdk")});if(!t.length)return(0,_t.jsx)("div",{className:"flex items-center justify-center w-full sm:mt-64",children:(0,_t.jsx)(bt.Spinner,{})});return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(cr,{breakpointCols:{default:2,1320:2,860:1,599:2,400:1},className:"flex -ml-8 w-auto pb-40 pt-0.5 pl-0.5",columnClassName:"pl-8 bg-clip-padding min-h-screen",children:t.map((function(e){return(0,_t.jsx)(Uo,{template:e},e.id)}))}),G.getState().nextPage&&(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("div",{className:"transform -translate-y-20",children:(0,_t.jsx)(bt.Spinner,{})}),(0,_t.jsx)("div",{className:"-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text",ref:d,style:{zIndex:-1}})]})]})}function Wo(e){var t=e.setOpen;return(0,_t.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto",children:[(0,_t.jsx)(tr,{className:"w-full h-20 flex-shrink-0",hideLibrary:function(){return t(!1)}}),(0,_t.jsxs)("div",{className:"w-full flex-grow overflow-hidden",children:[(0,_t.jsx)("button",{onClick:function(){return document.getElementById("extendify-templates").querySelector("button").focus()},className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,gt.__)("Skip to content","extendify-sdk")}),(0,_t.jsx)("div",{className:"sm:flex sm:space-x-12 relative mx-auto h-full",children:(0,_t.jsxs)(Un,{children:[(0,_t.jsx)(Cn,{}),(0,_t.jsx)("div",{className:"relative h-full z-30",children:(0,_t.jsx)("div",{className:"absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40",children:(0,_t.jsx)(Ho,{})})})]})})]})]})}const Jo=(0,r.createElement)(Tn,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(An,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function Go(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ko(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Go(Object(n),!0).forEach((function(t){Zo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Go(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Xo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qo={welcome:function(){var e=y((function(e){return e.setOpen}));return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("span",{className:"text-black",children:(0,gt.__)("Welcome to the Extendify Library","extendify-sdk")}),(0,_t.jsx)("span",{className:"px-2 opacity-50","aria-hidden":"true",children:"|"}),(0,_t.jsxs)("div",{className:"flex space-x-2 justify-center items-center",children:[(0,_t.jsx)(bt.Button,{variant:"link",className:"text-black underline hover:no-underline p-0 h-auto",href:"https://extendify.com/welcome/?utm_source=".concat(window.extendifySdkData.sdk_partner,"&utm_medium=library&utm_campaign=welcome-notice&utm_content=tell-me-more"),target:"_blank",children:(0,gt.__)("Tell me more","extendify-sdk")}),(0,_t.jsx)("span",{className:"font-bold","aria-hidden":"true",children:"•"}),(0,_t.jsx)(bt.Button,{variant:"link",className:"text-black underline hover:no-underline p-0 h-auto",onClick:function(){document.getElementById("extendify-templates-inserter-btn").classList.add("invisible"),D.setState({enabled:!1}),e(!1)},children:(0,gt.__)("Turn off the library","extendify-sdk")})]})]})},promotion:function(e){var t,n=e.promotionData;return console.log({promotionData:n}),(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("span",{className:"text-black",children:null!==(t=null==n?void 0:n.text)&&void 0!==t?t:""}),(0,_t.jsx)("span",{className:"px-2 opacity-50","aria-hidden":"true",children:"|"}),(0,_t.jsx)("div",{className:"flex space-x-2 justify-center items-center",children:(null==n?void 0:n.url)&&(0,_t.jsx)(bt.Button,{variant:"link",className:"text-black underline hover:no-underline p-0 h-auto",href:"".concat(n.url,"?utm_source=").concat(window.extendifySdkData.sdk_partner),target:"_blank",children:null==n?void 0:n.button_text})})]})}};function ei(){var e,t=Yo((0,r.useState)(null),2),n=t[0],o=t[1],i=(0,r.useRef)(!1),s=y((function(e){var t,n;return null===(t=e.metaData)||void 0===t||null===(n=t.banners)||void 0===n?void 0:n.footer})),a=null!==(e=Object.keys(Qo).find((function(e){return"promotion"===e?(null==s?void 0:s.key)&&!D.getState().noticesDismissedAt[s.key]:!D.getState().noticesDismissedAt[e]})))&&void 0!==e?e:null,l=Qo[a];return(0,r.useEffect)((function(){Qo[a]&&!i.current&&(o(!0),i.current=!0)}),[a]),n?(0,_t.jsxs)("div",{className:"bg-extendify-secondary hidden lg:flex space-x-4 py-3 px-5 justify-center items-center relative max-w-screen-4xl mx-auto",children:[(0,_t.jsx)(l,{promotionData:s}),(0,_t.jsx)("div",{className:"absolute right-1",children:(0,_t.jsx)(bt.Button,{className:"opacity-50 hover:opacity-100 focus:opacity-100 text-extendify-black",icon:(0,_t.jsx)(_n,{icon:Jo}),label:(0,gt.__)("Dismiss this notice","extendify-sdk"),onClick:function(){o(!1);var e="promotion"===a?s.key:a;D.setState({noticesDismissedAt:Object.assign({},Ko(Ko({},D.getState().noticesDismissedAt),{},Zo({},e,(new Date).toISOString())))})},showTooltip:!1})})]}):null}function ti(){var e=(0,r.useRef)(null),t=y((function(e){return e.open})),n=y((function(e){return e.setOpen}));return(0,_t.jsx)(Te.Root,{show:t,as:r.Fragment,children:(0,_t.jsx)(vt,{as:"div",static:!0,className:"extendify-sdk",initialFocus:e,onClose:function(){return n(!1)},children:(0,_t.jsx)("div",{className:"h-screen w-screen sm:h-auto m-auto sm:w-auto fixed z-high inset-0 overflow-y-auto",children:(0,_t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,_t.jsx)(Te.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,_t.jsx)(vt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-40 transition-opacity"})}),(0,_t.jsx)(Te.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,_t.jsxs)("div",{ref:e,tabIndex:"0",onClick:function(e){return e.target===e.currentTarget&&n(!1)},className:"fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all p-2 lg:p-16",children:[(0,_t.jsx)(Wo,{}),(0,_t.jsx)(ei,{})]})})]})})})})}const ni=wp.compose,ri=wp.hooks,oi=JSON.parse('{"t":["ext-absolute","ext-relative","ext-top-base","ext-top-lg","ext--top-base","ext--top-lg","ext-right-base","ext-right-lg","ext--right-base","ext--right-lg","ext-bottom-base","ext-bottom-lg","ext--bottom-base","ext--bottom-lg","ext-left-base","ext-left-lg","ext--left-base","ext--left-lg","ext-order-1","ext-order-2","ext-col-auto","ext-col-span-1","ext-col-span-2","ext-col-span-3","ext-col-span-4","ext-col-span-5","ext-col-span-6","ext-col-span-7","ext-col-span-8","ext-col-span-9","ext-col-span-10","ext-col-span-11","ext-col-span-12","ext-col-span-full","ext-col-start-1","ext-col-start-2","ext-col-start-3","ext-col-start-4","ext-col-start-5","ext-col-start-6","ext-col-start-7","ext-col-start-8","ext-col-start-9","ext-col-start-10","ext-col-start-11","ext-col-start-12","ext-col-start-13","ext-col-start-auto","ext-col-end-1","ext-col-end-2","ext-col-end-3","ext-col-end-4","ext-col-end-5","ext-col-end-6","ext-col-end-7","ext-col-end-8","ext-col-end-9","ext-col-end-10","ext-col-end-11","ext-col-end-12","ext-col-end-13","ext-col-end-auto","ext-row-auto","ext-row-span-1","ext-row-span-2","ext-row-span-3","ext-row-span-4","ext-row-span-5","ext-row-span-6","ext-row-span-full","ext-row-start-1","ext-row-start-2","ext-row-start-3","ext-row-start-4","ext-row-start-5","ext-row-start-6","ext-row-start-7","ext-row-start-auto","ext-row-end-1","ext-row-end-2","ext-row-end-3","ext-row-end-4","ext-row-end-5","ext-row-end-6","ext-row-end-7","ext-row-end-auto","ext-m-0","ext-m-auto","ext-m-base","ext-m-lg","ext--m-base","ext--m-lg","ext-mx-0","ext-mx-auto","ext-mx-base","ext-mx-lg","ext--mx-base","ext--mx-lg","ext-my-0","ext-my-auto","ext-my-base","ext-my-lg","ext--my-base","ext--my-lg","ext-mt-0","ext-mt-auto","ext-mt-base","ext-mt-lg","ext--mt-base","ext--mt-lg","ext-mr-0","ext-mr-auto","ext-mr-base","ext-mr-lg","ext--mr-base","ext--mr-lg","ext-mb-0","ext-mb-auto","ext-mb-base","ext-mb-lg","ext--mb-base","ext--mb-lg","ext-ml-0","ext-ml-auto","ext-ml-base","ext-ml-lg","ext--ml-base","ext--ml-lg","ext-block","ext-inline-block","ext-inline","ext-flex","ext-inline-flex","ext-grid","ext-inline-grid","ext-hidden","ext-w-auto","ext-w-full","ext-max-w-full","ext-flex-1","ext-flex-auto","ext-flex-initial","ext-flex-none","ext-flex-shrink-0","ext-flex-shrink","ext-flex-grow-0","ext-flex-grow","ext-list-none","ext-grid-cols-1","ext-grid-cols-2","ext-grid-cols-3","ext-grid-cols-4","ext-grid-cols-5","ext-grid-cols-6","ext-grid-cols-7","ext-grid-cols-8","ext-grid-cols-9","ext-grid-cols-10","ext-grid-cols-11","ext-grid-cols-12","ext-grid-cols-none","ext-grid-rows-1","ext-grid-rows-2","ext-grid-rows-3","ext-grid-rows-4","ext-grid-rows-5","ext-grid-rows-6","ext-grid-rows-none","ext-flex-row","ext-flex-row-reverse","ext-flex-col","ext-flex-col-reverse","ext-flex-wrap","ext-flex-wrap-reverse","ext-flex-nowrap","ext-items-start","ext-items-end","ext-items-center","ext-items-baseline","ext-items-stretch","ext-justify-start","ext-justify-end","ext-justify-center","ext-justify-between","ext-justify-around","ext-justify-evenly","ext-justify-items-start","ext-justify-items-end","ext-justify-items-center","ext-justify-items-stretch","ext-gap-0","ext-gap-base","ext-gap-lg","ext-gap-x-0","ext-gap-x-base","ext-gap-x-lg","ext-gap-y-0","ext-gap-y-base","ext-gap-y-lg","ext-justify-self-auto","ext-justify-self-start","ext-justify-self-end","ext-justify-self-center","ext-justify-self-stretch","ext-rounded-none","ext-rounded-full","ext-rounded-t-none","ext-rounded-t-full","ext-rounded-r-none","ext-rounded-r-full","ext-rounded-b-none","ext-rounded-b-full","ext-rounded-l-none","ext-rounded-l-full","ext-rounded-tl-none","ext-rounded-tl-full","ext-rounded-tr-none","ext-rounded-tr-full","ext-rounded-br-none","ext-rounded-br-full","ext-rounded-bl-none","ext-rounded-bl-full","ext-border-0","ext-border-t-0","ext-border-r-0","ext-border-b-0","ext-border-l-0","ext-p-0","ext-p-base","ext-p-lg","ext-px-0","ext-px-base","ext-px-lg","ext-py-0","ext-py-base","ext-py-lg","ext-pt-0","ext-pt-base","ext-pt-lg","ext-pr-0","ext-pr-base","ext-pr-lg","ext-pb-0","ext-pb-base","ext-pb-lg","ext-pl-0","ext-pl-base","ext-pl-lg","ext-text-left","ext-text-center","ext-text-right","ext-leading-none","ext-leading-tight","ext-leading-snug","ext-leading-normal","ext-leading-relaxed","ext-leading-loose","clip-path--rhombus","clip-path--diamond","clip-path--rhombus-alt","wp-block-columns[class*=\\"fullwidth-cols\\"]\\n","tablet\\\\:fullwidth-cols","desktop\\\\:fullwidth-cols","direction-rtl","direction-ltr","bring-to-front","text-stroke","text-stroke--primary","text-stroke--secondary","editor\\\\:no-caption","editor\\\\:no-inserter","editor\\\\:no-resize","editor\\\\:pointer-events-none","tablet\\\\:ext-absolute","tablet\\\\:ext-relative","tablet\\\\:ext-top-base","tablet\\\\:ext-top-lg","tablet\\\\:ext--top-base","tablet\\\\:ext--top-lg","tablet\\\\:ext-right-base","tablet\\\\:ext-right-lg","tablet\\\\:ext--right-base","tablet\\\\:ext--right-lg","tablet\\\\:ext-bottom-base","tablet\\\\:ext-bottom-lg","tablet\\\\:ext--bottom-base","tablet\\\\:ext--bottom-lg","tablet\\\\:ext-left-base","tablet\\\\:ext-left-lg","tablet\\\\:ext--left-base","tablet\\\\:ext--left-lg","tablet\\\\:ext-order-1","tablet\\\\:ext-order-2","tablet\\\\:ext-m-0","tablet\\\\:ext-m-auto","tablet\\\\:ext-m-base","tablet\\\\:ext-m-lg","tablet\\\\:ext--m-base","tablet\\\\:ext--m-lg","tablet\\\\:ext-mx-0","tablet\\\\:ext-mx-auto","tablet\\\\:ext-mx-base","tablet\\\\:ext-mx-lg","tablet\\\\:ext--mx-base","tablet\\\\:ext--mx-lg","tablet\\\\:ext-my-0","tablet\\\\:ext-my-auto","tablet\\\\:ext-my-base","tablet\\\\:ext-my-lg","tablet\\\\:ext--my-base","tablet\\\\:ext--my-lg","tablet\\\\:ext-mt-0","tablet\\\\:ext-mt-auto","tablet\\\\:ext-mt-base","tablet\\\\:ext-mt-lg","tablet\\\\:ext--mt-base","tablet\\\\:ext--mt-lg","tablet\\\\:ext-mr-0","tablet\\\\:ext-mr-auto","tablet\\\\:ext-mr-base","tablet\\\\:ext-mr-lg","tablet\\\\:ext--mr-base","tablet\\\\:ext--mr-lg","tablet\\\\:ext-mb-0","tablet\\\\:ext-mb-auto","tablet\\\\:ext-mb-base","tablet\\\\:ext-mb-lg","tablet\\\\:ext--mb-base","tablet\\\\:ext--mb-lg","tablet\\\\:ext-ml-0","tablet\\\\:ext-ml-auto","tablet\\\\:ext-ml-base","tablet\\\\:ext-ml-lg","tablet\\\\:ext--ml-base","tablet\\\\:ext--ml-lg","tablet\\\\:ext-block","tablet\\\\:ext-inline-block","tablet\\\\:ext-inline","tablet\\\\:ext-flex","tablet\\\\:ext-inline-flex","tablet\\\\:ext-grid","tablet\\\\:ext-inline-grid","tablet\\\\:ext-hidden","tablet\\\\:ext-w-auto","tablet\\\\:ext-w-full","tablet\\\\:ext-max-w-full","tablet\\\\:ext-flex-1","tablet\\\\:ext-flex-auto","tablet\\\\:ext-flex-initial","tablet\\\\:ext-flex-none","tablet\\\\:ext-flex-shrink-0","tablet\\\\:ext-flex-shrink","tablet\\\\:ext-flex-grow-0","tablet\\\\:ext-flex-grow","tablet\\\\:ext-list-none","tablet\\\\:ext-grid-cols-1","tablet\\\\:ext-grid-cols-2","tablet\\\\:ext-grid-cols-3","tablet\\\\:ext-grid-cols-4","tablet\\\\:ext-grid-cols-5","tablet\\\\:ext-grid-cols-6","tablet\\\\:ext-grid-cols-7","tablet\\\\:ext-grid-cols-8","tablet\\\\:ext-grid-cols-9","tablet\\\\:ext-grid-cols-10","tablet\\\\:ext-grid-cols-11","tablet\\\\:ext-grid-cols-12","tablet\\\\:ext-grid-cols-none","tablet\\\\:ext-flex-row","tablet\\\\:ext-flex-row-reverse","tablet\\\\:ext-flex-col","tablet\\\\:ext-flex-col-reverse","tablet\\\\:ext-flex-wrap","tablet\\\\:ext-flex-wrap-reverse","tablet\\\\:ext-flex-nowrap","tablet\\\\:ext-items-start","tablet\\\\:ext-items-end","tablet\\\\:ext-items-center","tablet\\\\:ext-items-baseline","tablet\\\\:ext-items-stretch","tablet\\\\:ext-justify-start","tablet\\\\:ext-justify-end","tablet\\\\:ext-justify-center","tablet\\\\:ext-justify-between","tablet\\\\:ext-justify-around","tablet\\\\:ext-justify-evenly","tablet\\\\:ext-justify-items-start","tablet\\\\:ext-justify-items-end","tablet\\\\:ext-justify-items-center","tablet\\\\:ext-justify-items-stretch","tablet\\\\:ext-justify-self-auto","tablet\\\\:ext-justify-self-start","tablet\\\\:ext-justify-self-end","tablet\\\\:ext-justify-self-center","tablet\\\\:ext-justify-self-stretch","tablet\\\\:ext-p-0","tablet\\\\:ext-p-base","tablet\\\\:ext-p-lg","tablet\\\\:ext-px-0","tablet\\\\:ext-px-base","tablet\\\\:ext-px-lg","tablet\\\\:ext-py-0","tablet\\\\:ext-py-base","tablet\\\\:ext-py-lg","tablet\\\\:ext-pt-0","tablet\\\\:ext-pt-base","tablet\\\\:ext-pt-lg","tablet\\\\:ext-pr-0","tablet\\\\:ext-pr-base","tablet\\\\:ext-pr-lg","tablet\\\\:ext-pb-0","tablet\\\\:ext-pb-base","tablet\\\\:ext-pb-lg","tablet\\\\:ext-pl-0","tablet\\\\:ext-pl-base","tablet\\\\:ext-pl-lg","tablet\\\\:ext-text-left","tablet\\\\:ext-text-center","tablet\\\\:ext-text-right","desktop\\\\:ext-absolute","desktop\\\\:ext-relative","desktop\\\\:ext-top-base","desktop\\\\:ext-top-lg","desktop\\\\:ext--top-base","desktop\\\\:ext--top-lg","desktop\\\\:ext-right-base","desktop\\\\:ext-right-lg","desktop\\\\:ext--right-base","desktop\\\\:ext--right-lg","desktop\\\\:ext-bottom-base","desktop\\\\:ext-bottom-lg","desktop\\\\:ext--bottom-base","desktop\\\\:ext--bottom-lg","desktop\\\\:ext-left-base","desktop\\\\:ext-left-lg","desktop\\\\:ext--left-base","desktop\\\\:ext--left-lg","desktop\\\\:ext-order-1","desktop\\\\:ext-order-2","desktop\\\\:ext-m-0","desktop\\\\:ext-m-auto","desktop\\\\:ext-m-base","desktop\\\\:ext-m-lg","desktop\\\\:ext--m-base","desktop\\\\:ext--m-lg","desktop\\\\:ext-mx-0","desktop\\\\:ext-mx-auto","desktop\\\\:ext-mx-base","desktop\\\\:ext-mx-lg","desktop\\\\:ext--mx-base","desktop\\\\:ext--mx-lg","desktop\\\\:ext-my-0","desktop\\\\:ext-my-auto","desktop\\\\:ext-my-base","desktop\\\\:ext-my-lg","desktop\\\\:ext--my-base","desktop\\\\:ext--my-lg","desktop\\\\:ext-mt-0","desktop\\\\:ext-mt-auto","desktop\\\\:ext-mt-base","desktop\\\\:ext-mt-lg","desktop\\\\:ext--mt-base","desktop\\\\:ext--mt-lg","desktop\\\\:ext-mr-0","desktop\\\\:ext-mr-auto","desktop\\\\:ext-mr-base","desktop\\\\:ext-mr-lg","desktop\\\\:ext--mr-base","desktop\\\\:ext--mr-lg","desktop\\\\:ext-mb-0","desktop\\\\:ext-mb-auto","desktop\\\\:ext-mb-base","desktop\\\\:ext-mb-lg","desktop\\\\:ext--mb-base","desktop\\\\:ext--mb-lg","desktop\\\\:ext-ml-0","desktop\\\\:ext-ml-auto","desktop\\\\:ext-ml-base","desktop\\\\:ext-ml-lg","desktop\\\\:ext--ml-base","desktop\\\\:ext--ml-lg","desktop\\\\:ext-block","desktop\\\\:ext-inline-block","desktop\\\\:ext-inline","desktop\\\\:ext-flex","desktop\\\\:ext-inline-flex","desktop\\\\:ext-grid","desktop\\\\:ext-inline-grid","desktop\\\\:ext-hidden","desktop\\\\:ext-w-auto","desktop\\\\:ext-w-full","desktop\\\\:ext-max-w-full","desktop\\\\:ext-flex-1","desktop\\\\:ext-flex-auto","desktop\\\\:ext-flex-initial","desktop\\\\:ext-flex-none","desktop\\\\:ext-flex-shrink-0","desktop\\\\:ext-flex-shrink","desktop\\\\:ext-flex-grow-0","desktop\\\\:ext-flex-grow","desktop\\\\:ext-list-none","desktop\\\\:ext-grid-cols-1","desktop\\\\:ext-grid-cols-2","desktop\\\\:ext-grid-cols-3","desktop\\\\:ext-grid-cols-4","desktop\\\\:ext-grid-cols-5","desktop\\\\:ext-grid-cols-6","desktop\\\\:ext-grid-cols-7","desktop\\\\:ext-grid-cols-8","desktop\\\\:ext-grid-cols-9","desktop\\\\:ext-grid-cols-10","desktop\\\\:ext-grid-cols-11","desktop\\\\:ext-grid-cols-12","desktop\\\\:ext-grid-cols-none","desktop\\\\:ext-flex-row","desktop\\\\:ext-flex-row-reverse","desktop\\\\:ext-flex-col","desktop\\\\:ext-flex-col-reverse","desktop\\\\:ext-flex-wrap","desktop\\\\:ext-flex-wrap-reverse","desktop\\\\:ext-flex-nowrap","desktop\\\\:ext-items-start","desktop\\\\:ext-items-end","desktop\\\\:ext-items-center","desktop\\\\:ext-items-baseline","desktop\\\\:ext-items-stretch","desktop\\\\:ext-justify-start","desktop\\\\:ext-justify-end","desktop\\\\:ext-justify-center","desktop\\\\:ext-justify-between","desktop\\\\:ext-justify-around","desktop\\\\:ext-justify-evenly","desktop\\\\:ext-justify-items-start","desktop\\\\:ext-justify-items-end","desktop\\\\:ext-justify-items-center","desktop\\\\:ext-justify-items-stretch","desktop\\\\:ext-justify-self-auto","desktop\\\\:ext-justify-self-start","desktop\\\\:ext-justify-self-end","desktop\\\\:ext-justify-self-center","desktop\\\\:ext-justify-self-stretch","desktop\\\\:ext-p-0","desktop\\\\:ext-p-base","desktop\\\\:ext-p-lg","desktop\\\\:ext-px-0","desktop\\\\:ext-px-base","desktop\\\\:ext-px-lg","desktop\\\\:ext-py-0","desktop\\\\:ext-py-base","desktop\\\\:ext-py-lg","desktop\\\\:ext-pt-0","desktop\\\\:ext-pt-base","desktop\\\\:ext-pt-lg","desktop\\\\:ext-pr-0","desktop\\\\:ext-pr-base","desktop\\\\:ext-pr-lg","desktop\\\\:ext-pb-0","desktop\\\\:ext-pb-base","desktop\\\\:ext-pb-lg","desktop\\\\:ext-pl-0","desktop\\\\:ext-pl-base","desktop\\\\:ext-pl-lg","desktop\\\\:ext-text-left","desktop\\\\:ext-text-center","desktop\\\\:ext-text-right"]}');function ii(e){return function(e){if(Array.isArray(e))return si(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return si(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ai(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function li(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ai(Object(n),!0).forEach((function(t){ci(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ci(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ui=(0,ni.createHigherOrderComponent)((function(e){return function(t){var n=t.attributes.extUtilities,r=oi.t.map((function(e){return e.replace(".","").replace(new RegExp("\\\\","g"),"")}));return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(e,li({},t)),n&&(0,_t.jsx)(No.InspectorAdvancedControls,{children:(0,_t.jsx)(bt.FormTokenField,{label:(0,gt.__)("Extendify Utilities","extendify-sdk"),tokenizeOnSpace:!0,value:n,suggestions:r,onChange:function(e){t.setAttributes({extUtilities:e})}})})]})}}),"utilityClassEdit");function di(e,t,n){var r=e.className,o=n.extUtilities,i=n.className;if(!o||!Object.keys(o).length)return e;var s=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return e.split(" ");case"[object Array]":return e;default:return[]}},a=new Set([].concat(ii(s(i)),ii(s(r)),ii(s(o))));return Object.assign({},e,{className:ii(a).join(" ")})}function fi(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}(0,ri.addFilter)("blocks.registerBlockType","extendify/utilities/attributes",(function(e){return li(li({},e),{},{attributes:li(li({},e.attributes),{},{extUtilities:{type:"array",default:[]}})})})),(0,ri.addFilter)("blocks.registerBlockType","extendify/utilities/addEditProps",(function(e){var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),di(r,e,n)},e})),(0,ri.addFilter)("editor.BlockEdit","extendify/utilities/advancedClassControls",ui),(0,ri.addFilter)("blocks.getSaveContent.extraProps","extendify/utilities/extra-props",di);var pi=function(){return(e=g().mark((function e(){var t;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.get("taxonomies-simple");case 2:return(t=e.sent)["tax_pattern_types_2.0"]&&(t.tax_pattern_types=t["tax_pattern_types_2.0"],delete t["tax_pattern_types_2.0"]),t["tax_page_types_2.0"]&&(t.tax_page_types=t["tax_page_types_2.0"],delete t["tax_page_types_2.0"]),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){fi(i,r,o,s,a,"next",e)}function a(e){fi(i,r,o,s,a,"throw",e)}s(void 0)}))})();var e};function hi(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function mi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){hi(i,r,o,s,a,"next",e)}function a(e){hi(i,r,o,s,a,"throw",e)}s(void 0)}))}}var xi=function(){return w.get("meta-data")};function yi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gi(e){var t=e.show,n=void 0!==t&&t,o=y((function(e){return e.open})),i=y((function(e){return e.setOpen})),s=yi((0,r.useState)(!1),2),a=s[0],l=s[1],c=(0,r.useCallback)((function(){return i(!0)}),[i]),u=(0,r.useCallback)((function(){return i(!1)}),[i]),d=G((function(e){return e.initTemplateData})),f=D((function(e){return e.uuid.length>0})),p=G((function(e){return Object.keys(e.taxonomyDefaultState).length>0}));return function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=G((function(e){return e.setupDefaultTaxonomies})),n=U((function(e){return e.setTaxonomies})),o=(0,r.useCallback)(mi(g().mark((function e(){var r,o;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pi();case 2:if(o=e.sent,o=Object.keys(o).filter((function(e){return e.startsWith("tax_")})).reduce((function(e,t){return e[t]=o[t],e}),{}),null!==(r=Object.keys(o))&&void 0!==r&&r.length){e.next=6;break}return e.abrupt("return");case 6:n(o),t();case 8:case"end":return e.stop()}}),e)}))),[n,t]);(0,r.useEffect)((function(){e&&o()}),[o,e])}(o),(0,r.useEffect)((function(){f&&p&&(d(),l(!0))}),[f,p,d]),(0,r.useEffect)((function(){n&&i(!0)}),[n,i]),(0,r.useEffect)((function(){xi().then((function(e){y.setState({metaData:e})}))}),[]),(0,r.useEffect)((function(){return window.addEventListener("extendify-sdk::open-library",c),window.addEventListener("extendify-sdk::close-library",u),function(){window.removeEventListener("extendify-sdk::open-library",c),window.removeEventListener("extendify-sdk::close-library",u)}}),[u,c]),a?(0,_t.jsx)(ti,{}):null}const bi=wp.plugins,wi=wp.editPost;var ji=function(){return w.get("site-settings")},ki=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),w.post("site-settings",t,{headers:{"Content-Type":"multipart/form-data"}})};function Oi(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function Si(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){Oi(i,r,o,s,a,"next",e)}function a(e){Oi(i,r,o,s,a,"throw",e)}s(void 0)}))}}var Ci={getItem:function(){var e=Si(g().mark((function e(){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ji();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),setItem:function(){var e=Si(g().mark((function e(t,n){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ki(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},_i=l(x((function(){return{enabled:!0}}),{name:"extendify-sitesettings",getStorage:function(){return Ci}}));function Ei(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function Ni(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){Ei(i,r,o,s,a,"next",e)}function a(e){Ei(i,r,o,s,a,"throw",e)}s(void 0)}))}}function Ai(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Ti=function(){var e=(0,Hr.useSelect)((function(e){return e("core").canUser("create","users")})),t=Ai((0,r.useState)(D((function(e){return e.enabled}))),2),n=t[0],o=t[1],i=Ai((0,r.useState)(_i((function(e){return e.enabled}))),2),s=i[0],a=i[1];function l(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.getElementById("extendify-templates-inserter-btn");t&&(e?t.classList.add("invisible"):t.classList.remove("invisible"))}function c(e){return u.apply(this,arguments)}function u(){return(u=Ni(g().mark((function e(t){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D.setState({enabled:t});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return f.apply(this,arguments)}function f(){return(f=Ni(g().mark((function e(t){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_i.setState({enabled:t});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t){return h.apply(this,arguments)}function h(){return h=Ni(g().mark((function e(t,n){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("global"!==n){e.next=5;break}return e.next=3,d(t);case 3:e.next=7;break;case 5:return e.next=7,c(t);case 7:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}function m(e){"global"===e?a((function(t){return p(!t,e),!t})):o((function(t){return l(!t),p(!t,e),!t}))}return(0,r.useEffect)((function(){l(!n)}),[n]),(0,_t.jsxs)(bt.Modal,{title:(0,gt.__)("Extendify Settings","extendify-sdk"),onRequestClose:function(){var e=document.getElementById("extendify-util");(0,r.unmountComponentAtNode)(e)},children:[(0,_t.jsx)(bt.ToggleControl,{label:e?(0,gt.__)("Enable the library for myself","extendify-sdk"):(0,gt.__)("Enable the library","extendify-sdk"),help:(0,gt.__)("Publish with hundreds of patterns & page layouts","extendify-sdk"),checked:n,onChange:function(){return m("user")}}),e&&(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("br",{}),(0,_t.jsx)(bt.ToggleControl,{label:(0,gt.__)("Allow all users to publish with the library"),help:(0,gt.__)("Everyone publishes with patterns & page layouts","extendify-sdk"),checked:s,onChange:function(){return m("global")}})]})]})};var Ii=function(e){var t,n;Ot(null===(t=e.target.closest("[data-extendify-identifier]"))||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.extendifyIdentifier)},Li=function(){var e,t,n;return null===window.extendifySdkData.user||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.isAdmin)},Mi=function(){var e,t,n;return null===window.extendifySdkData.sitesettings||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.sitesettings)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)},Ri=(0,_t.jsx)("div",{id:"extendify-templates-inserter",className:"extendify-sdk",children:(0,_t.jsxs)("button",{style:"background:#D9F1EE;color:#1e1e1e;border:1px solid #949494 !important;font-weight:bold;font-size:14px;padding:8px;margin-right:8px",type:"button","data-extendify-identifier":"main-button",id:"extendify-templates-inserter-btn",className:"components-button",children:[(0,_t.jsx)(_n,{icon:Ln,size:24,className:"-ml-1 mr-1"}),(0,gt.__)("Library","extendify-sdk")]})});if(window._wpLoadBlockEditor)var Di=window.wp.data.subscribe((function(){requestAnimationFrame((function(){var e,t,n;(Mi()||Li())&&(document.getElementById("extendify-templates-inserter-btn")||document.querySelector(".edit-post-header-toolbar")&&(document.querySelector(".edit-post-header-toolbar").insertAdjacentHTML("beforeend",(0,r.renderToString)(Ri)),document.getElementById("extendify-templates-inserter-btn").addEventListener("click",Ii),(null===window.extendifySdkData.user?Mi():null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)||document.getElementById("extendify-templates-inserter-btn").classList.add("invisible"),Di()))}))}));if(window._wpLoadBlockEditor)var Fi=window.wp.data.subscribe((function(){requestAnimationFrame((function(){if((Mi()||Li())&&document.querySelector("[id$=patterns-view]")&&!document.getElementById("extendify-cta-button")){var e=(0,_t.jsx)("div",{children:(0,_t.jsx)("button",{id:"extendify-cta-button",style:"margin:1rem 1rem 0","data-extendify-identifier":"patterns-cta",className:"components-button is-secondary",children:(0,gt.__)("Discover more patterns in Extendify Library","extendify-sdk")})});document.querySelector("[id$=patterns-view]").insertAdjacentHTML("afterbegin",(0,r.renderToString)(e)),document.getElementById("extendify-cta-button").addEventListener("click",Ii),Fi()}}))}));window._wpLoadBlockEditor&&(0,bi.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,_t.jsx)(_t.Fragment,{children:(0,_t.jsxs)(wi.PluginSidebarMoreMenuItem,{onClick:function(){var e=document.getElementById("extendify-util");(0,r.render)((0,_t.jsx)(Ti,{}),e)},icon:(0,_t.jsx)(_n,{icon:Ln,size:24}),children:[" ",(0,gt.__)("Extendify","extendify-sdk")]})})}}),[{register:function(){var e=(0,Hr.dispatch)("core/notices").createNotice,t=D.getState().incrementImports;window.addEventListener("extendify-sdk::template-inserted",(function(n){e("info",(0,gt.__)("Page layout Added"),{isDismissible:!0,type:"snackbar"}),setTimeout((function(){var e;t(),gr(null===(e=n.detail)||void 0===e?void 0:e.template)}),0)}))}},{register:function(){var e=this;window.addEventListener("extendify-sdk::softerror-encountered",(function(t){e[(0,kt.camelCase)(t.detail.type)](t.detail)}))},versionOutdated:function(e){(0,r.render)((0,_t.jsx)(Qr,{title:e.data.title,message:e.data.message,buttonLabel:e.data.buttonLabel,forceOpen:!0}),document.getElementById("extendify-root"))}}].forEach((function(e){return e.register()})),window._wpLoadBlockEditor&&window.wp.domReady((function(){var e=Object.assign(document.createElement("div"),{id:"extendify-root"});if(document.body.append(e),(0,r.render)((0,_t.jsx)(gi,{}),e),e.parentNode.insertBefore(Object.assign(document.createElement("div"),{id:"extendify-util"}),e.nextSibling),Vr.getState().importOnLoad){var t=Vr.getState().wantedTemplate;setTimeout((function(){Eo((0,Ao.rawHandler)({HTML:t.fields.code}),t)}),0)}Vr.setState({importOnLoad:!1,wantedTemplate:{}})}))},42:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var s=o.apply(null,n);s&&e.push(s)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},716:()=>{},965:()=>{},525:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var s,a,l=o(e),c=1;c<arguments.length;c++){for(var u in s=Object(arguments[c]))n.call(s,u)&&(l[u]=s[u]);if(t){a=t(s);for(var d=0;d<a.length;d++)r.call(s,a[d])&&(l[a[d]]=s[a[d]])}}return l}},61:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,l=[],c=!1,u=-1;function d(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u<t;)a&&a[u].run();u=-1,t=l.length}a=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},426:(e,t,n)=>{"use strict";n(525);var r=n(363),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.jsx=c,t.jsxs=c},246:(e,t,n)=>{"use strict";e.exports=n(426)},248:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof x?t:x,i=Object.create(o.prototype),s=new E(r||[]);return i._invoke=function(e,t,n){var r=d;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=S(s,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=u(e,t,n);if("normal"===l.type){if(r=n.done?h:f,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}(e,n,s),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",m={};function x(){}function y(){}function v(){}var g={};g[i]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==n&&r.call(w,i)&&(g=w);var j=v.prototype=x.prototype=Object.create(g);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,i,s,a){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,a)}),(function(e){n("throw",e,s,a)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,a)}))}a(l.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function S(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=u(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function N(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return s.next=s}}return{next:A}}function A(){return{value:t,done:!0}}return y.prototype=j.constructor=v,v.constructor=y,y.displayName=l(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,a,"GeneratorFunction")),e.prototype=Object.create(j),e},e.awrap=function(e){return{__await:e}},k(O.prototype),O.prototype[s]=function(){return this},e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var s=new O(c(t,n,r,o),i);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},k(j),l(j,a,"Generator"),j[i]=function(){return this},j.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=N,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return a.type="throw",a.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:N(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},363:e=>{"use strict";e.exports=React}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,o,i)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,o,i]=e[u],a=!0,l=0;l<n.length;l++)(!1&i||s>=i)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(a=!1,i<s&&(s=i));if(a){e.splice(u--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,o,i]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={286:0,506:0,310:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[s,a,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(l)var u=l(r)}for(t&&t(n);c<s.length;c++)i=s[c],r.o(e,i)&&e[i]&&e[i][0](),e[s[c]]=0;return r.O(u)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[506,310],(()=>r(353))),r.O(void 0,[506,310],(()=>r(716)));var o=r.O(void 0,[506,310],(()=>r(965)));o=r.O(o)})();
|
redux-core/extendify-sdk/public/build/extendify-utilities.css
CHANGED
@@ -1 +1,7 @@
|
|
1 |
-
.ext-absolute{position:absolute!important}.ext-relative{position:relative!important}.ext-top-base{top:var(--wp--style--block-gap,2rem)!important}.ext-top-lg{top:var(--extendify--spacing--large)!important}.ext--top-base{top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--top-lg{top:calc(var(--extendify--spacing--large)*-1)!important}.ext-right-base{right:var(--wp--style--block-gap,2rem)!important}.ext-right-lg{right:var(--extendify--spacing--large)!important}.ext--right-base{right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--right-lg{right:calc(var(--extendify--spacing--large)*-1)!important}.ext-bottom-base{bottom:var(--wp--style--block-gap,2rem)!important}.ext-bottom-lg{bottom:var(--extendify--spacing--large)!important}.ext--bottom-base{bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--bottom-lg{bottom:calc(var(--extendify--spacing--large)*-1)!important}.ext-left-base{left:var(--wp--style--block-gap,2rem)!important}.ext-left-lg{left:var(--extendify--spacing--large)!important}.ext--left-base{left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--left-lg{left:calc(var(--extendify--spacing--large)*-1)!important}.ext-order-1{order:1!important}.ext-order-2{order:2!important}.ext-col-auto{grid-column:auto!important}.ext-col-span-1{grid-column:span 1/span 1!important}.ext-col-span-2{grid-column:span 2/span 2!important}.ext-col-span-3{grid-column:span 3/span 3!important}.ext-col-span-4{grid-column:span 4/span 4!important}.ext-col-span-5{grid-column:span 5/span 5!important}.ext-col-span-6{grid-column:span 6/span 6!important}.ext-col-span-7{grid-column:span 7/span 7!important}.ext-col-span-8{grid-column:span 8/span 8!important}.ext-col-span-9{grid-column:span 9/span 9!important}.ext-col-span-10{grid-column:span 10/span 10!important}.ext-col-span-11{grid-column:span 11/span 11!important}.ext-col-span-12{grid-column:span 12/span 12!important}.ext-col-span-full{grid-column:1/-1!important}.ext-col-start-1{grid-column-start:1!important}.ext-col-start-2{grid-column-start:2!important}.ext-col-start-3{grid-column-start:3!important}.ext-col-start-4{grid-column-start:4!important}.ext-col-start-5{grid-column-start:5!important}.ext-col-start-6{grid-column-start:6!important}.ext-col-start-7{grid-column-start:7!important}.ext-col-start-8{grid-column-start:8!important}.ext-col-start-9{grid-column-start:9!important}.ext-col-start-10{grid-column-start:10!important}.ext-col-start-11{grid-column-start:11!important}.ext-col-start-12{grid-column-start:12!important}.ext-col-start-13{grid-column-start:13!important}.ext-col-start-auto{grid-column-start:auto!important}.ext-col-end-1{grid-column-end:1!important}.ext-col-end-2{grid-column-end:2!important}.ext-col-end-3{grid-column-end:3!important}.ext-col-end-4{grid-column-end:4!important}.ext-col-end-5{grid-column-end:5!important}.ext-col-end-6{grid-column-end:6!important}.ext-col-end-7{grid-column-end:7!important}.ext-col-end-8{grid-column-end:8!important}.ext-col-end-9{grid-column-end:9!important}.ext-col-end-10{grid-column-end:10!important}.ext-col-end-11{grid-column-end:11!important}.ext-col-end-12{grid-column-end:12!important}.ext-col-end-13{grid-column-end:13!important}.ext-col-end-auto{grid-column-end:auto!important}.ext-row-auto{grid-row:auto!important}.ext-row-span-1{grid-row:span 1/span 1!important}.ext-row-span-2{grid-row:span 2/span 2!important}.ext-row-span-3{grid-row:span 3/span 3!important}.ext-row-span-4{grid-row:span 4/span 4!important}.ext-row-span-5{grid-row:span 5/span 5!important}.ext-row-span-6{grid-row:span 6/span 6!important}.ext-row-span-full{grid-row:1/-1!important}.ext-row-start-1{grid-row-start:1!important}.ext-row-start-2{grid-row-start:2!important}.ext-row-start-3{grid-row-start:3!important}.ext-row-start-4{grid-row-start:4!important}.ext-row-start-5{grid-row-start:5!important}.ext-row-start-6{grid-row-start:6!important}.ext-row-start-7{grid-row-start:7!important}.ext-row-start-auto{grid-row-start:auto!important}.ext-row-end-1{grid-row-end:1!important}.ext-row-end-2{grid-row-end:2!important}.ext-row-end-3{grid-row-end:3!important}.ext-row-end-4{grid-row-end:4!important}.ext-row-end-5{grid-row-end:5!important}.ext-row-end-6{grid-row-end:6!important}.ext-row-end-7{grid-row-end:7!important}.ext-row-end-auto{grid-row-end:auto!important}.ext-m-0:not([style*=margin]){margin:0!important}.ext-m-auto:not([style*=margin]){margin:auto!important}.ext-m-base:not([style*=margin]){margin:var(--wp--style--block-gap,2rem)!important}.ext-m-lg:not([style*=margin]){margin:var(--extendify--spacing--large)!important}.ext--m-base:not([style*=margin]){margin:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--m-lg:not([style*=margin]){margin:calc(var(--extendify--spacing--large)*-1)!important}.ext-mx-0:not([style*=margin]){margin-left:0!important;margin-right:0!important}.ext-mx-auto:not([style*=margin]){margin-left:auto!important;margin-right:auto!important}.ext-mx-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important;margin-right:var(--wp--style--block-gap,2rem)!important}.ext-mx-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important;margin-right:var(--extendify--spacing--large)!important}.ext--mx-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mx-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important;margin-right:calc(var(--extendify--spacing--large)*-1)!important}.ext-my-0:not([style*=margin]){margin-bottom:0!important;margin-top:0!important}.ext-my-auto:not([style*=margin]){margin-bottom:auto!important;margin-top:auto!important}.ext-my-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:var(--wp--style--block-gap,2rem)!important}.ext-my-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important;margin-top:var(--extendify--spacing--large)!important}.ext--my-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--my-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important;margin-top:calc(var(--extendify--spacing--large)*-1)!important}.ext-mt-0:not([style*=margin]){margin-top:0!important}.ext-mt-auto:not([style*=margin]){margin-top:auto!important}.ext-mt-base:not([style*=margin]){margin-top:var(--wp--style--block-gap,2rem)!important}.ext-mt-lg:not([style*=margin]){margin-top:var(--extendify--spacing--large)!important}.ext--mt-base:not([style*=margin]){margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mt-lg:not([style*=margin]){margin-top:calc(var(--extendify--spacing--large)*-1)!important}.ext-mr-0:not([style*=margin]){margin-right:0!important}.ext-mr-auto:not([style*=margin]){margin-right:auto!important}.ext-mr-base:not([style*=margin]){margin-right:var(--wp--style--block-gap,2rem)!important}.ext-mr-lg:not([style*=margin]){margin-right:var(--extendify--spacing--large)!important}.ext--mr-base:not([style*=margin]){margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mr-lg:not([style*=margin]){margin-right:calc(var(--extendify--spacing--large)*-1)!important}.ext-mb-0:not([style*=margin]){margin-bottom:0!important}.ext-mb-auto:not([style*=margin]){margin-bottom:auto!important}.ext-mb-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important}.ext-mb-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important}.ext--mb-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mb-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important}.ext-ml-0:not([style*=margin]){margin-left:0!important}.ext-ml-auto:not([style*=margin]){margin-left:auto!important}.ext-ml-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important}.ext-ml-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important}.ext--ml-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--ml-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important}.ext-block{display:block!important}.ext-inline-block{display:inline-block!important}.ext-inline{display:inline!important}.ext-flex{display:flex!important}.ext-inline-flex{display:inline-flex!important}.ext-grid{display:grid!important}.ext-inline-grid{display:inline-grid!important}.ext-hidden{display:none!important}.ext-w-auto{width:auto!important}.ext-w-full{width:100%!important}.ext-max-w-full{max-width:100%!important}.ext-flex-1{flex:1 1 0%!important}.ext-flex-auto{flex:1 1 auto!important}.ext-flex-initial{flex:0 1 auto!important}.ext-flex-none{flex:none!important}.ext-flex-shrink-0{flex-shrink:0!important}.ext-flex-shrink{flex-shrink:1!important}.ext-flex-grow-0{flex-grow:0!important}.ext-flex-grow{flex-grow:1!important}.ext-list-none{list-style-type:none!important}.ext-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.ext-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ext-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.ext-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.ext-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.ext-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.ext-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.ext-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.ext-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))!important}.ext-grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.ext-grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))!important}.ext-grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))!important}.ext-grid-cols-none{grid-template-columns:none!important}.ext-grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))!important}.ext-grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))!important}.ext-grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))!important}.ext-grid-rows-4{grid-template-rows:repeat(4,minmax(0,1fr))!important}.ext-grid-rows-5{grid-template-rows:repeat(5,minmax(0,1fr))!important}.ext-grid-rows-6{grid-template-rows:repeat(6,minmax(0,1fr))!important}.ext-grid-rows-none{grid-template-rows:none!important}.ext-flex-row{flex-direction:row!important}.ext-flex-row-reverse{flex-direction:row-reverse!important}.ext-flex-col{flex-direction:column!important}.ext-flex-col-reverse{flex-direction:column-reverse!important}.ext-flex-wrap{flex-wrap:wrap!important}.ext-flex-wrap-reverse{flex-wrap:wrap-reverse!important}.ext-flex-nowrap{flex-wrap:nowrap!important}.ext-items-start{align-items:flex-start!important}.ext-items-end{align-items:flex-end!important}.ext-items-center{align-items:center!important}.ext-items-baseline{align-items:baseline!important}.ext-items-stretch{align-items:stretch!important}.ext-justify-start{justify-content:flex-start!important}.ext-justify-end{justify-content:flex-end!important}.ext-justify-center{justify-content:center!important}.ext-justify-between{justify-content:space-between!important}.ext-justify-around{justify-content:space-around!important}.ext-justify-evenly{justify-content:space-evenly!important}.ext-justify-items-start{justify-items:start!important}.ext-justify-items-end{justify-items:end!important}.ext-justify-items-center{justify-items:center!important}.ext-justify-items-stretch{justify-items:stretch!important}.ext-gap-0{gap:0!important}.ext-gap-base{gap:var(--wp--style--block-gap,2rem)!important}.ext-gap-lg{gap:var(--extendify--spacing--large)!important}.ext-gap-x-0{-moz-column-gap:0!important;column-gap:0!important}.ext-gap-x-base{-moz-column-gap:var(--wp--style--block-gap,2rem)!important;column-gap:var(--wp--style--block-gap,2rem)!important}.ext-gap-x-lg{-moz-column-gap:var(--extendify--spacing--large)!important;column-gap:var(--extendify--spacing--large)!important}.ext-gap-y-0{row-gap:0!important}.ext-gap-y-base{row-gap:var(--wp--style--block-gap,2rem)!important}.ext-gap-y-lg{row-gap:var(--extendify--spacing--large)!important}.ext-justify-self-auto{justify-self:auto!important}.ext-justify-self-start{justify-self:start!important}.ext-justify-self-end{justify-self:end!important}.ext-justify-self-center{justify-self:center!important}.ext-justify-self-stretch{justify-self:stretch!important}.ext-rounded-none{border-radius:0!important}.ext-rounded-full{border-radius:9999px!important}.ext-rounded-t-none{border-top-left-radius:0!important;border-top-right-radius:0!important}.ext-rounded-t-full{border-top-left-radius:9999px!important;border-top-right-radius:9999px!important}.ext-rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.ext-rounded-r-full{border-bottom-right-radius:9999px!important;border-top-right-radius:9999px!important}.ext-rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.ext-rounded-b-full{border-bottom-left-radius:9999px!important;border-bottom-right-radius:9999px!important}.ext-rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.ext-rounded-l-full{border-bottom-left-radius:9999px!important;border-top-left-radius:9999px!important}.ext-rounded-tl-none{border-top-left-radius:0!important}.ext-rounded-tl-full{border-top-left-radius:9999px!important}.ext-rounded-tr-none{border-top-right-radius:0!important}.ext-rounded-tr-full{border-top-right-radius:9999px!important}.ext-rounded-br-none{border-bottom-right-radius:0!important}.ext-rounded-br-full{border-bottom-right-radius:9999px!important}.ext-rounded-bl-none{border-bottom-left-radius:0!important}.ext-rounded-bl-full{border-bottom-left-radius:9999px!important}.ext-border-0{border-width:0!important}.ext-border-t-0{border-top-width:0!important}.ext-border-r-0{border-right-width:0!important}.ext-border-b-0{border-bottom-width:0!important}.ext-border-l-0{border-left-width:0!important}.ext-p-0:not([style*=padding]){padding:0!important}.ext-p-base:not([style*=padding]){padding:var(--wp--style--block-gap,2rem)!important}.ext-p-lg:not([style*=padding]){padding:var(--extendify--spacing--large)!important}.ext-px-0:not([style*=padding]){padding-left:0!important;padding-right:0!important}.ext-px-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important;padding-right:var(--wp--style--block-gap,2rem)!important}.ext-px-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important;padding-right:var(--extendify--spacing--large)!important}.ext-py-0:not([style*=padding]){padding-bottom:0!important;padding-top:0!important}.ext-py-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important;padding-top:var(--wp--style--block-gap,2rem)!important}.ext-py-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important;padding-top:var(--extendify--spacing--large)!important}.ext-pt-0:not([style*=padding]){padding-top:0!important}.ext-pt-base:not([style*=padding]){padding-top:var(--wp--style--block-gap,2rem)!important}.ext-pt-lg:not([style*=padding]){padding-top:var(--extendify--spacing--large)!important}.ext-pr-0:not([style*=padding]){padding-right:0!important}.ext-pr-base:not([style*=padding]){padding-right:var(--wp--style--block-gap,2rem)!important}.ext-pr-lg:not([style*=padding]){padding-right:var(--extendify--spacing--large)!important}.ext-pb-0:not([style*=padding]){padding-bottom:0!important}.ext-pb-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important}.ext-pb-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important}.ext-pl-0:not([style*=padding]){padding-left:0!important}.ext-pl-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important}.ext-pl-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important}.ext-text-left{text-align:left!important}.ext-text-center{text-align:center!important}.ext-text-right{text-align:right!important}.ext-leading-none{line-height:1!important}.ext-leading-tight{line-height:1.25!important}.ext-leading-snug{line-height:1.375!important}.ext-leading-normal{line-height:1.5!important}.ext-leading-relaxed{line-height:1.625!important}.ext-leading-loose{line-height:2!important}.clip-path--rhombus img{-webkit-clip-path:polygon(15% 6%,80% 29%,84% 93%,23% 69%);clip-path:polygon(15% 6%,80% 29%,84% 93%,23% 69%)}.clip-path--diamond img{-webkit-clip-path:polygon(5% 29%,60% 2%,91% 64%,36% 89%);clip-path:polygon(5% 29%,60% 2%,91% 64%,36% 89%)}.clip-path--rhombus-alt img{-webkit-clip-path:polygon(14% 9%,85% 24%,91% 89%,19% 76%);clip-path:polygon(14% 9%,85% 24%,91% 89%,19% 76%)}.wp-block-columns[class*=fullwidth-cols]{margin-bottom:unset}.ext .wp-block-columns .wp-block-column[style*=padding]{padding-left:0!important;padding-right:0!important}.ext .wp-block-columns+.wp-block-columns:not([class*=mt-]):not([class*=my-]):not([style*=margin]){margin-top:0!important}[class*=fullwidth-cols] .wp-block-column:first-child,[class*=fullwidth-cols] .wp-block-group:first-child{margin-top:0}[class*=fullwidth-cols] .wp-block-column:last-child,[class*=fullwidth-cols] .wp-block-group:last-child{margin-bottom:0}[class*=fullwidth-cols] .wp-block-column :first-child,[class*=fullwidth-cols] .wp-block-column:first-child *{margin-top:0}.ext .is-not-stacked-on-mobile .wp-block-column,[class*=fullwidth-cols] .wp-block-column :last-child{margin-bottom:0}.wp-block-columns[class*=fullwidth-cols]:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:last-child){margin-bottom:var(--wp--style--block-gap,2rem)}@media (min-width:782px){.wp-block-columns[class*=fullwidth-cols]:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:last-child){margin-bottom:0}}.wp-block-columns[class*=fullwidth-cols].is-not-stacked-on-mobile>.wp-block-column{margin-bottom:0!important}@media (min-width:600px) and (max-width:781px){.wp-block-columns[class*=fullwidth-cols]:not(.is-not-stacked-on-mobile)>.wp-block-column:nth-child(2n){margin-left:var(--wp--style--block-gap,2em)}}@media (max-width:781px){.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile){flex-wrap:wrap}.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important;margin-left:0!important}}@media (max-width:1079px){.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile){flex-wrap:wrap}.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important;margin-left:0!important}.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:last-child){margin-bottom:var(--wp--style--block-gap,2rem)!important}}.direction-rtl{direction:rtl}.direction-ltr{direction:ltr}.is-style-inline-list{padding-left:0!important}.is-style-inline-list li{list-style-type:none!important}@media (min-width:782px){.is-style-inline-list li{display:inline!important;margin-right:var(--wp--style--block-gap,2rem)!important}}@media (min-width:782px){.is-style-inline-list li:first-child{margin-left:0!important}}@media (min-width:782px){.is-style-inline-list li:last-child{margin-right:0!important}}.bring-to-front{position:relative;z-index:10}.text-stroke{-webkit-text-stroke-color:var(--wp--preset--color--background)}.text-stroke,.text-stroke--primary{-webkit-text-stroke-width:var(--wp--custom--typography--text-stroke-width,2px )}.text-stroke--primary{-webkit-text-stroke-color:var(--wp--preset--color--primary)}.text-stroke--secondary{-webkit-text-stroke-width:var(--wp--custom--typography--text-stroke-width,2px );-webkit-text-stroke-color:var(--wp--preset--color--secondary)}.editor\:no-caption .block-editor-rich-text__editable{display:none!important}.editor\:no-inserter .wp-block-column:not(.is-selected)>.block-list-appender,.editor\:no-inserter .wp-block-cover__inner-container>.block-list-appender,.editor\:no-inserter .wp-block-group__inner-container>.block-list-appender,.editor\:no-inserter>.block-list-appender{display:none}.editor\:no-resize .components-resizable-box__handle,.editor\:no-resize .components-resizable-box__handle:after,.editor\:no-resize .components-resizable-box__side-handle:before{display:none;pointer-events:none}.editor\:no-resize .components-resizable-box__container{display:block}.editor\:pointer-events-none{pointer-events:none}.is-style-angled{justify-content:flex-end}.ext .is-style-angled>[class*=_inner-container],.is-style-angled{align-items:center}.is-style-angled .wp-block-cover__image-background,.is-style-angled .wp-block-cover__video-background{-webkit-clip-path:polygon(0 0,30% 0,50% 100%,0 100%);clip-path:polygon(0 0,30% 0,50% 100%,0 100%);z-index:1}@media (min-width:782px){.is-style-angled .wp-block-cover__image-background,.is-style-angled .wp-block-cover__video-background{-webkit-clip-path:polygon(0 0,55% 0,65% 100%,0 100%);clip-path:polygon(0 0,55% 0,65% 100%,0 100%)}}.ext .wp-block[data-align=wide]{margin-bottom:0!important;margin-top:0!important}.has-foreground-color{color:var(--wp--preset--color--foreground,#000)!important}.has-foreground-background-color{background-color:var(--wp--preset--color--foreground,#000)!important}.has-background-color{color:var(--wp--preset--color--background,#fff)!important}.has-background-background-color{background-color:var(--wp--preset--color--background,#fff)!important}.has-primary-color{color:var(--wp--preset--color--primary,#4b5563)!important}.has-primary-background-color{background-color:var(--wp--preset--color--primary,#4b5563)!important}.has-secondary-color{color:var(--wp--preset--color--secondary,#9ca3af)!important}.has-secondary-background-color{background-color:var(--wp--preset--color--secondary,#9ca3af)!important}.ext.has-text-color h1,.ext.has-text-color h2,.ext.has-text-color h3,.ext.has-text-color h4,.ext.has-text-color h5,.ext.has-text-color h6,.ext.has-text-color p{color:currentColor}.editor-styles-wrapper .has-gigantic-font-size.wp-block,.has-gigantic-font-size{--fallback-size:clamp(var(--wp--preset--font-size--huge,22px),calc(1rem + var(--wp--custom--typography--gigantic--preferred, 5vw)),var(--wp--preset--font-size--huge,42px) * 2);font-size:var( --wp--preset--font-size--gigantic,var(--fallback-size ) )}.ext .ext-grid>[class*=_inner-container]{display:grid}.ext>[class*=_inner-container]>.ext-grid:not([class*=columns]),.ext>[class*=_inner-container]>.wp-block>.ext-grid:not([class*=columns]){display:initial!important}.ext .ext-grid-cols-1>[class*=_inner-container]{grid-template-columns:repeat(1,minmax(0,1fr))!important}.ext .ext-grid-cols-2>[class*=_inner-container]{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ext .ext-grid-cols-3>[class*=_inner-container]{grid-template-columns:repeat(3,minmax(0,1fr))!important}.ext .ext-grid-cols-4>[class*=_inner-container]{grid-template-columns:repeat(4,minmax(0,1fr))!important}.ext .ext-grid-cols-5>[class*=_inner-container]{grid-template-columns:repeat(5,minmax(0,1fr))!important}.ext .ext-grid-cols-6>[class*=_inner-container]{grid-template-columns:repeat(6,minmax(0,1fr))!important}.ext .ext-grid-cols-7>[class*=_inner-container]{grid-template-columns:repeat(7,minmax(0,1fr))!important}.ext .ext-grid-cols-8>[class*=_inner-container]{grid-template-columns:repeat(8,minmax(0,1fr))!important}.ext .ext-grid-cols-9>[class*=_inner-container]{grid-template-columns:repeat(9,minmax(0,1fr))!important}.ext .ext-grid-cols-10>[class*=_inner-container]{grid-template-columns:repeat(10,minmax(0,1fr))!important}.ext .ext-grid-cols-11>[class*=_inner-container]{grid-template-columns:repeat(11,minmax(0,1fr))!important}.ext .ext-grid-cols-12>[class*=_inner-container]{grid-template-columns:repeat(12,minmax(0,1fr))!important}.ext .ext-grid-cols-13>[class*=_inner-container]{grid-template-columns:repeat(13,minmax(0,1fr))!important}.ext .ext-grid-cols-none>[class*=_inner-container]{grid-template-columns:none!important}.ext .ext-grid-rows-1>[class*=_inner-container]{grid-template-rows:repeat(1,minmax(0,1fr))!important}.ext .ext-grid-rows-2>[class*=_inner-container]{grid-template-rows:repeat(2,minmax(0,1fr))!important}.ext .ext-grid-rows-3>[class*=_inner-container]{grid-template-rows:repeat(3,minmax(0,1fr))!important}.ext .ext-grid-rows-4>[class*=_inner-container]{grid-template-rows:repeat(4,minmax(0,1fr))!important}.ext .ext-grid-rows-5>[class*=_inner-container]{grid-template-rows:repeat(5,minmax(0,1fr))!important}.ext .ext-grid-rows-6>[class*=_inner-container]{grid-template-rows:repeat(6,minmax(0,1fr))!important}.ext .ext-grid-rows-none>[class*=_inner-container]{grid-template-rows:none!important}.ext .ext-items-start>[class*=_inner-container]{align-items:flex-start!important}.ext .ext-items-end>[class*=_inner-container]{align-items:flex-end!important}.ext .ext-items-center>[class*=_inner-container]{align-items:center!important}.ext .ext-items-baseline>[class*=_inner-container]{align-items:baseline!important}.ext .ext-items-stretch>[class*=_inner-container]{align-items:stretch!important}.ext.wp-block-group>:last-child{margin-bottom:0}.ext .wp-block-group__inner-container{padding:0!important}.ext.has-background{padding-left:var(--wp--style--block-gap,2rem);padding-right:var(--wp--style--block-gap,2rem)}.ext [class*=inner-container]>.alignwide [class*=inner-container]{max-width:var(--responsive--alignwide-width,120rem)}.ext [class*=inner-container]>.alignwide [class*=inner-container]>*{max-width:100%!important}.ext [class*=inner-container]>.alignfull [class*=inner-container]{max-width:100%}.ext [class*=inner-container]>.alignfull [class*=inner-container]>*{max-width:100%!important}.ext .wp-block-image{position:relative;text-align:center}.ext .wp-block-image img{display:inline-block;vertical-align:middle}body{--extendify--spacing--large:var(--wp--custom--spacing--large,clamp(2em,8vw,8em))}.ast-separate-container .ext .block-editor-block-list__layout{padding:0!important}.ext [data-block].wp-block-buttons .wp-block-button{margin-bottom:0;margin-top:0}.ext [data-block].wp-block-buttons .wp-block-button:first-child{margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:0!important}.ext .wp-block-group__inner-container figure.wp-block-gallery.alignfull{margin-bottom:unset;margin-top:unset}.ext .alignwide{margin-left:auto!important;margin-right:auto!important}@media (min-width:782px){.tablet\:ext-absolute{position:absolute!important}.tablet\:ext-relative{position:relative!important}.tablet\:ext-top-base{top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-top-lg{top:var(--extendify--spacing--large)!important}.tablet\:ext--top-base{top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--top-lg{top:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-right-base{right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-right-lg{right:var(--extendify--spacing--large)!important}.tablet\:ext--right-base{right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--right-lg{right:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-bottom-base{bottom:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-bottom-lg{bottom:var(--extendify--spacing--large)!important}.tablet\:ext--bottom-base{bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--bottom-lg{bottom:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-left-base{left:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-left-lg{left:var(--extendify--spacing--large)!important}.tablet\:ext--left-base{left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--left-lg{left:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-order-1{order:1!important}.tablet\:ext-order-2{order:2!important}.tablet\:ext-m-0:not([style*=margin]){margin:0!important}.tablet\:ext-m-auto:not([style*=margin]){margin:auto!important}.tablet\:ext-m-base:not([style*=margin]){margin:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-m-lg:not([style*=margin]){margin:var(--extendify--spacing--large)!important}.tablet\:ext--m-base:not([style*=margin]){margin:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--m-lg:not([style*=margin]){margin:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mx-0:not([style*=margin]){margin-left:0!important;margin-right:0!important}.tablet\:ext-mx-auto:not([style*=margin]){margin-left:auto!important;margin-right:auto!important}.tablet\:ext-mx-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important;margin-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mx-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important;margin-right:var(--extendify--spacing--large)!important}.tablet\:ext--mx-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mx-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important;margin-right:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-my-0:not([style*=margin]){margin-bottom:0!important;margin-top:0!important}.tablet\:ext-my-auto:not([style*=margin]){margin-bottom:auto!important;margin-top:auto!important}.tablet\:ext-my-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-my-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important;margin-top:var(--extendify--spacing--large)!important}.tablet\:ext--my-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--my-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important;margin-top:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mt-0:not([style*=margin]){margin-top:0!important}.tablet\:ext-mt-auto:not([style*=margin]){margin-top:auto!important}.tablet\:ext-mt-base:not([style*=margin]){margin-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mt-lg:not([style*=margin]){margin-top:var(--extendify--spacing--large)!important}.tablet\:ext--mt-base:not([style*=margin]){margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mt-lg:not([style*=margin]){margin-top:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mr-0:not([style*=margin]){margin-right:0!important}.tablet\:ext-mr-auto:not([style*=margin]){margin-right:auto!important}.tablet\:ext-mr-base:not([style*=margin]){margin-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mr-lg:not([style*=margin]){margin-right:var(--extendify--spacing--large)!important}.tablet\:ext--mr-base:not([style*=margin]){margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mr-lg:not([style*=margin]){margin-right:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mb-0:not([style*=margin]){margin-bottom:0!important}.tablet\:ext-mb-auto:not([style*=margin]){margin-bottom:auto!important}.tablet\:ext-mb-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mb-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important}.tablet\:ext--mb-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mb-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-ml-0:not([style*=margin]){margin-left:0!important}.tablet\:ext-ml-auto:not([style*=margin]){margin-left:auto!important}.tablet\:ext-ml-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-ml-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important}.tablet\:ext--ml-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--ml-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-block{display:block!important}.tablet\:ext-inline-block{display:inline-block!important}.tablet\:ext-inline{display:inline!important}.tablet\:ext-flex{display:flex!important}.tablet\:ext-inline-flex{display:inline-flex!important}.tablet\:ext-grid{display:grid!important}.tablet\:ext-inline-grid{display:inline-grid!important}.tablet\:ext-hidden{display:none!important}.tablet\:ext-w-auto{width:auto!important}.tablet\:ext-w-full{width:100%!important}.tablet\:ext-max-w-full{max-width:100%!important}.tablet\:ext-flex-1{flex:1 1 0%!important}.tablet\:ext-flex-auto{flex:1 1 auto!important}.tablet\:ext-flex-initial{flex:0 1 auto!important}.tablet\:ext-flex-none{flex:none!important}.tablet\:ext-flex-shrink-0{flex-shrink:0!important}.tablet\:ext-flex-shrink{flex-shrink:1!important}.tablet\:ext-flex-grow-0{flex-grow:0!important}.tablet\:ext-flex-grow{flex-grow:1!important}.tablet\:ext-list-none{list-style-type:none!important}.tablet\:ext-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.tablet\:ext-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.tablet\:ext-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.tablet\:ext-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.tablet\:ext-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.tablet\:ext-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.tablet\:ext-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.tablet\:ext-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.tablet\:ext-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))!important}.tablet\:ext-grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.tablet\:ext-grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))!important}.tablet\:ext-grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))!important}.tablet\:ext-grid-cols-none{grid-template-columns:none!important}.tablet\:ext-flex-row{flex-direction:row!important}.tablet\:ext-flex-row-reverse{flex-direction:row-reverse!important}.tablet\:ext-flex-col{flex-direction:column!important}.tablet\:ext-flex-col-reverse{flex-direction:column-reverse!important}.tablet\:ext-flex-wrap{flex-wrap:wrap!important}.tablet\:ext-flex-wrap-reverse{flex-wrap:wrap-reverse!important}.tablet\:ext-flex-nowrap{flex-wrap:nowrap!important}.tablet\:ext-items-start{align-items:flex-start!important}.tablet\:ext-items-end{align-items:flex-end!important}.tablet\:ext-items-center{align-items:center!important}.tablet\:ext-items-baseline{align-items:baseline!important}.tablet\:ext-items-stretch{align-items:stretch!important}.tablet\:ext-justify-start{justify-content:flex-start!important}.tablet\:ext-justify-end{justify-content:flex-end!important}.tablet\:ext-justify-center{justify-content:center!important}.tablet\:ext-justify-between{justify-content:space-between!important}.tablet\:ext-justify-around{justify-content:space-around!important}.tablet\:ext-justify-evenly{justify-content:space-evenly!important}.tablet\:ext-justify-items-start{justify-items:start!important}.tablet\:ext-justify-items-end{justify-items:end!important}.tablet\:ext-justify-items-center{justify-items:center!important}.tablet\:ext-justify-items-stretch{justify-items:stretch!important}.tablet\:ext-justify-self-auto{justify-self:auto!important}.tablet\:ext-justify-self-start{justify-self:start!important}.tablet\:ext-justify-self-end{justify-self:end!important}.tablet\:ext-justify-self-center{justify-self:center!important}.tablet\:ext-justify-self-stretch{justify-self:stretch!important}.tablet\:ext-p-0:not([style*=padding]){padding:0!important}.tablet\:ext-p-base:not([style*=padding]){padding:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-p-lg:not([style*=padding]){padding:var(--extendify--spacing--large)!important}.tablet\:ext-px-0:not([style*=padding]){padding-left:0!important;padding-right:0!important}.tablet\:ext-px-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important;padding-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-px-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important;padding-right:var(--extendify--spacing--large)!important}.tablet\:ext-py-0:not([style*=padding]){padding-bottom:0!important;padding-top:0!important}.tablet\:ext-py-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important;padding-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-py-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important;padding-top:var(--extendify--spacing--large)!important}.tablet\:ext-pt-0:not([style*=padding]){padding-top:0!important}.tablet\:ext-pt-base:not([style*=padding]){padding-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pt-lg:not([style*=padding]){padding-top:var(--extendify--spacing--large)!important}.tablet\:ext-pr-0:not([style*=padding]){padding-right:0!important}.tablet\:ext-pr-base:not([style*=padding]){padding-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pr-lg:not([style*=padding]){padding-right:var(--extendify--spacing--large)!important}.tablet\:ext-pb-0:not([style*=padding]){padding-bottom:0!important}.tablet\:ext-pb-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pb-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important}.tablet\:ext-pl-0:not([style*=padding]){padding-left:0!important}.tablet\:ext-pl-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pl-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important}.tablet\:ext-text-left{text-align:left!important}.tablet\:ext-text-center{text-align:center!important}.tablet\:ext-text-right{text-align:right!important}}@media (min-width:1080px){.desktop\:ext-absolute{position:absolute!important}.desktop\:ext-relative{position:relative!important}.desktop\:ext-top-base{top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-top-lg{top:var(--extendify--spacing--large)!important}.desktop\:ext--top-base{top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--top-lg{top:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-right-base{right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-right-lg{right:var(--extendify--spacing--large)!important}.desktop\:ext--right-base{right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--right-lg{right:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-bottom-base{bottom:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-bottom-lg{bottom:var(--extendify--spacing--large)!important}.desktop\:ext--bottom-base{bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--bottom-lg{bottom:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-left-base{left:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-left-lg{left:var(--extendify--spacing--large)!important}.desktop\:ext--left-base{left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--left-lg{left:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-order-1{order:1!important}.desktop\:ext-order-2{order:2!important}.desktop\:ext-m-0:not([style*=margin]){margin:0!important}.desktop\:ext-m-auto:not([style*=margin]){margin:auto!important}.desktop\:ext-m-base:not([style*=margin]){margin:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-m-lg:not([style*=margin]){margin:var(--extendify--spacing--large)!important}.desktop\:ext--m-base:not([style*=margin]){margin:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--m-lg:not([style*=margin]){margin:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mx-0:not([style*=margin]){margin-left:0!important;margin-right:0!important}.desktop\:ext-mx-auto:not([style*=margin]){margin-left:auto!important;margin-right:auto!important}.desktop\:ext-mx-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important;margin-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mx-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important;margin-right:var(--extendify--spacing--large)!important}.desktop\:ext--mx-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mx-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important;margin-right:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-my-0:not([style*=margin]){margin-bottom:0!important;margin-top:0!important}.desktop\:ext-my-auto:not([style*=margin]){margin-bottom:auto!important;margin-top:auto!important}.desktop\:ext-my-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-my-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important;margin-top:var(--extendify--spacing--large)!important}.desktop\:ext--my-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--my-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important;margin-top:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mt-0:not([style*=margin]){margin-top:0!important}.desktop\:ext-mt-auto:not([style*=margin]){margin-top:auto!important}.desktop\:ext-mt-base:not([style*=margin]){margin-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mt-lg:not([style*=margin]){margin-top:var(--extendify--spacing--large)!important}.desktop\:ext--mt-base:not([style*=margin]){margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mt-lg:not([style*=margin]){margin-top:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mr-0:not([style*=margin]){margin-right:0!important}.desktop\:ext-mr-auto:not([style*=margin]){margin-right:auto!important}.desktop\:ext-mr-base:not([style*=margin]){margin-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mr-lg:not([style*=margin]){margin-right:var(--extendify--spacing--large)!important}.desktop\:ext--mr-base:not([style*=margin]){margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mr-lg:not([style*=margin]){margin-right:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mb-0:not([style*=margin]){margin-bottom:0!important}.desktop\:ext-mb-auto:not([style*=margin]){margin-bottom:auto!important}.desktop\:ext-mb-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mb-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important}.desktop\:ext--mb-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mb-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-ml-0:not([style*=margin]){margin-left:0!important}.desktop\:ext-ml-auto:not([style*=margin]){margin-left:auto!important}.desktop\:ext-ml-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-ml-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important}.desktop\:ext--ml-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--ml-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-block{display:block!important}.desktop\:ext-inline-block{display:inline-block!important}.desktop\:ext-inline{display:inline!important}.desktop\:ext-flex{display:flex!important}.desktop\:ext-inline-flex{display:inline-flex!important}.desktop\:ext-grid{display:grid!important}.desktop\:ext-inline-grid{display:inline-grid!important}.desktop\:ext-hidden{display:none!important}.desktop\:ext-w-auto{width:auto!important}.desktop\:ext-w-full{width:100%!important}.desktop\:ext-max-w-full{max-width:100%!important}.desktop\:ext-flex-1{flex:1 1 0%!important}.desktop\:ext-flex-auto{flex:1 1 auto!important}.desktop\:ext-flex-initial{flex:0 1 auto!important}.desktop\:ext-flex-none{flex:none!important}.desktop\:ext-flex-shrink-0{flex-shrink:0!important}.desktop\:ext-flex-shrink{flex-shrink:1!important}.desktop\:ext-flex-grow-0{flex-grow:0!important}.desktop\:ext-flex-grow{flex-grow:1!important}.desktop\:ext-list-none{list-style-type:none!important}.desktop\:ext-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.desktop\:ext-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.desktop\:ext-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.desktop\:ext-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.desktop\:ext-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.desktop\:ext-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.desktop\:ext-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.desktop\:ext-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.desktop\:ext-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))!important}.desktop\:ext-grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.desktop\:ext-grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))!important}.desktop\:ext-grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))!important}.desktop\:ext-grid-cols-none{grid-template-columns:none!important}.desktop\:ext-flex-row{flex-direction:row!important}.desktop\:ext-flex-row-reverse{flex-direction:row-reverse!important}.desktop\:ext-flex-col{flex-direction:column!important}.desktop\:ext-flex-col-reverse{flex-direction:column-reverse!important}.desktop\:ext-flex-wrap{flex-wrap:wrap!important}.desktop\:ext-flex-wrap-reverse{flex-wrap:wrap-reverse!important}.desktop\:ext-flex-nowrap{flex-wrap:nowrap!important}.desktop\:ext-items-start{align-items:flex-start!important}.desktop\:ext-items-end{align-items:flex-end!important}.desktop\:ext-items-center{align-items:center!important}.desktop\:ext-items-baseline{align-items:baseline!important}.desktop\:ext-items-stretch{align-items:stretch!important}.desktop\:ext-justify-start{justify-content:flex-start!important}.desktop\:ext-justify-end{justify-content:flex-end!important}.desktop\:ext-justify-center{justify-content:center!important}.desktop\:ext-justify-between{justify-content:space-between!important}.desktop\:ext-justify-around{justify-content:space-around!important}.desktop\:ext-justify-evenly{justify-content:space-evenly!important}.desktop\:ext-justify-items-start{justify-items:start!important}.desktop\:ext-justify-items-end{justify-items:end!important}.desktop\:ext-justify-items-center{justify-items:center!important}.desktop\:ext-justify-items-stretch{justify-items:stretch!important}.desktop\:ext-justify-self-auto{justify-self:auto!important}.desktop\:ext-justify-self-start{justify-self:start!important}.desktop\:ext-justify-self-end{justify-self:end!important}.desktop\:ext-justify-self-center{justify-self:center!important}.desktop\:ext-justify-self-stretch{justify-self:stretch!important}.desktop\:ext-p-0:not([style*=padding]){padding:0!important}.desktop\:ext-p-base:not([style*=padding]){padding:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-p-lg:not([style*=padding]){padding:var(--extendify--spacing--large)!important}.desktop\:ext-px-0:not([style*=padding]){padding-left:0!important;padding-right:0!important}.desktop\:ext-px-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important;padding-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-px-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important;padding-right:var(--extendify--spacing--large)!important}.desktop\:ext-py-0:not([style*=padding]){padding-bottom:0!important;padding-top:0!important}.desktop\:ext-py-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important;padding-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-py-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important;padding-top:var(--extendify--spacing--large)!important}.desktop\:ext-pt-0:not([style*=padding]){padding-top:0!important}.desktop\:ext-pt-base:not([style*=padding]){padding-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pt-lg:not([style*=padding]){padding-top:var(--extendify--spacing--large)!important}.desktop\:ext-pr-0:not([style*=padding]){padding-right:0!important}.desktop\:ext-pr-base:not([style*=padding]){padding-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pr-lg:not([style*=padding]){padding-right:var(--extendify--spacing--large)!important}.desktop\:ext-pb-0:not([style*=padding]){padding-bottom:0!important}.desktop\:ext-pb-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pb-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important}.desktop\:ext-pl-0:not([style*=padding]){padding-left:0!important}.desktop\:ext-pl-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pl-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important}.desktop\:ext-text-left{text-align:left!important}.desktop\:ext-text-center{text-align:center!important}.desktop\:ext-text-right{text-align:right!important}}
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.ext-absolute{position:absolute!important}.ext-relative{position:relative!important}.ext-top-base{top:var(--wp--style--block-gap,2rem)!important}.ext-top-lg{top:var(--extendify--spacing--large)!important}.ext--top-base{top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--top-lg{top:calc(var(--extendify--spacing--large)*-1)!important}.ext-right-base{right:var(--wp--style--block-gap,2rem)!important}.ext-right-lg{right:var(--extendify--spacing--large)!important}.ext--right-base{right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--right-lg{right:calc(var(--extendify--spacing--large)*-1)!important}.ext-bottom-base{bottom:var(--wp--style--block-gap,2rem)!important}.ext-bottom-lg{bottom:var(--extendify--spacing--large)!important}.ext--bottom-base{bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--bottom-lg{bottom:calc(var(--extendify--spacing--large)*-1)!important}.ext-left-base{left:var(--wp--style--block-gap,2rem)!important}.ext-left-lg{left:var(--extendify--spacing--large)!important}.ext--left-base{left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--left-lg{left:calc(var(--extendify--spacing--large)*-1)!important}.ext-order-1{order:1!important}.ext-order-2{order:2!important}.ext-col-auto{grid-column:auto!important}.ext-col-span-1{grid-column:span 1/span 1!important}.ext-col-span-2{grid-column:span 2/span 2!important}.ext-col-span-3{grid-column:span 3/span 3!important}.ext-col-span-4{grid-column:span 4/span 4!important}.ext-col-span-5{grid-column:span 5/span 5!important}.ext-col-span-6{grid-column:span 6/span 6!important}.ext-col-span-7{grid-column:span 7/span 7!important}.ext-col-span-8{grid-column:span 8/span 8!important}.ext-col-span-9{grid-column:span 9/span 9!important}.ext-col-span-10{grid-column:span 10/span 10!important}.ext-col-span-11{grid-column:span 11/span 11!important}.ext-col-span-12{grid-column:span 12/span 12!important}.ext-col-span-full{grid-column:1/-1!important}.ext-col-start-1{grid-column-start:1!important}.ext-col-start-2{grid-column-start:2!important}.ext-col-start-3{grid-column-start:3!important}.ext-col-start-4{grid-column-start:4!important}.ext-col-start-5{grid-column-start:5!important}.ext-col-start-6{grid-column-start:6!important}.ext-col-start-7{grid-column-start:7!important}.ext-col-start-8{grid-column-start:8!important}.ext-col-start-9{grid-column-start:9!important}.ext-col-start-10{grid-column-start:10!important}.ext-col-start-11{grid-column-start:11!important}.ext-col-start-12{grid-column-start:12!important}.ext-col-start-13{grid-column-start:13!important}.ext-col-start-auto{grid-column-start:auto!important}.ext-col-end-1{grid-column-end:1!important}.ext-col-end-2{grid-column-end:2!important}.ext-col-end-3{grid-column-end:3!important}.ext-col-end-4{grid-column-end:4!important}.ext-col-end-5{grid-column-end:5!important}.ext-col-end-6{grid-column-end:6!important}.ext-col-end-7{grid-column-end:7!important}.ext-col-end-8{grid-column-end:8!important}.ext-col-end-9{grid-column-end:9!important}.ext-col-end-10{grid-column-end:10!important}.ext-col-end-11{grid-column-end:11!important}.ext-col-end-12{grid-column-end:12!important}.ext-col-end-13{grid-column-end:13!important}.ext-col-end-auto{grid-column-end:auto!important}.ext-row-auto{grid-row:auto!important}.ext-row-span-1{grid-row:span 1/span 1!important}.ext-row-span-2{grid-row:span 2/span 2!important}.ext-row-span-3{grid-row:span 3/span 3!important}.ext-row-span-4{grid-row:span 4/span 4!important}.ext-row-span-5{grid-row:span 5/span 5!important}.ext-row-span-6{grid-row:span 6/span 6!important}.ext-row-span-full{grid-row:1/-1!important}.ext-row-start-1{grid-row-start:1!important}.ext-row-start-2{grid-row-start:2!important}.ext-row-start-3{grid-row-start:3!important}.ext-row-start-4{grid-row-start:4!important}.ext-row-start-5{grid-row-start:5!important}.ext-row-start-6{grid-row-start:6!important}.ext-row-start-7{grid-row-start:7!important}.ext-row-start-auto{grid-row-start:auto!important}.ext-row-end-1{grid-row-end:1!important}.ext-row-end-2{grid-row-end:2!important}.ext-row-end-3{grid-row-end:3!important}.ext-row-end-4{grid-row-end:4!important}.ext-row-end-5{grid-row-end:5!important}.ext-row-end-6{grid-row-end:6!important}.ext-row-end-7{grid-row-end:7!important}.ext-row-end-auto{grid-row-end:auto!important}.ext-m-0:not([style*=margin]){margin:0!important}.ext-m-auto:not([style*=margin]){margin:auto!important}.ext-m-base:not([style*=margin]){margin:var(--wp--style--block-gap,2rem)!important}.ext-m-lg:not([style*=margin]){margin:var(--extendify--spacing--large)!important}.ext--m-base:not([style*=margin]){margin:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--m-lg:not([style*=margin]){margin:calc(var(--extendify--spacing--large)*-1)!important}.ext-mx-0:not([style*=margin]){margin-left:0!important;margin-right:0!important}.ext-mx-auto:not([style*=margin]){margin-left:auto!important;margin-right:auto!important}.ext-mx-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important;margin-right:var(--wp--style--block-gap,2rem)!important}.ext-mx-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important;margin-right:var(--extendify--spacing--large)!important}.ext--mx-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mx-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important;margin-right:calc(var(--extendify--spacing--large)*-1)!important}.ext-my-0:not([style*=margin]){margin-bottom:0!important;margin-top:0!important}.ext-my-auto:not([style*=margin]){margin-bottom:auto!important;margin-top:auto!important}.ext-my-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:var(--wp--style--block-gap,2rem)!important}.ext-my-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important;margin-top:var(--extendify--spacing--large)!important}.ext--my-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--my-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important;margin-top:calc(var(--extendify--spacing--large)*-1)!important}.ext-mt-0:not([style*=margin]){margin-top:0!important}.ext-mt-auto:not([style*=margin]){margin-top:auto!important}.ext-mt-base:not([style*=margin]){margin-top:var(--wp--style--block-gap,2rem)!important}.ext-mt-lg:not([style*=margin]){margin-top:var(--extendify--spacing--large)!important}.ext--mt-base:not([style*=margin]){margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mt-lg:not([style*=margin]){margin-top:calc(var(--extendify--spacing--large)*-1)!important}.ext-mr-0:not([style*=margin]){margin-right:0!important}.ext-mr-auto:not([style*=margin]){margin-right:auto!important}.ext-mr-base:not([style*=margin]){margin-right:var(--wp--style--block-gap,2rem)!important}.ext-mr-lg:not([style*=margin]){margin-right:var(--extendify--spacing--large)!important}.ext--mr-base:not([style*=margin]){margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mr-lg:not([style*=margin]){margin-right:calc(var(--extendify--spacing--large)*-1)!important}.ext-mb-0:not([style*=margin]){margin-bottom:0!important}.ext-mb-auto:not([style*=margin]){margin-bottom:auto!important}.ext-mb-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important}.ext-mb-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important}.ext--mb-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--mb-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important}.ext-ml-0:not([style*=margin]){margin-left:0!important}.ext-ml-auto:not([style*=margin]){margin-left:auto!important}.ext-ml-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important}.ext-ml-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important}.ext--ml-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.ext--ml-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important}.ext-block{display:block!important}.ext-inline-block{display:inline-block!important}.ext-inline{display:inline!important}.ext-flex{display:flex!important}.ext-inline-flex{display:inline-flex!important}.ext-grid{display:grid!important}.ext-inline-grid{display:inline-grid!important}.ext-hidden{display:none!important}.ext-w-auto{width:auto!important}.ext-w-full{width:100%!important}.ext-max-w-full{max-width:100%!important}.ext-flex-1{flex:1 1 0%!important}.ext-flex-auto{flex:1 1 auto!important}.ext-flex-initial{flex:0 1 auto!important}.ext-flex-none{flex:none!important}.ext-flex-shrink-0{flex-shrink:0!important}.ext-flex-shrink{flex-shrink:1!important}.ext-flex-grow-0{flex-grow:0!important}.ext-flex-grow{flex-grow:1!important}.ext-list-none{list-style-type:none!important}.ext-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.ext-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ext-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.ext-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.ext-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.ext-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.ext-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.ext-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.ext-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))!important}.ext-grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.ext-grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))!important}.ext-grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))!important}.ext-grid-cols-none{grid-template-columns:none!important}.ext-grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))!important}.ext-grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))!important}.ext-grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))!important}.ext-grid-rows-4{grid-template-rows:repeat(4,minmax(0,1fr))!important}.ext-grid-rows-5{grid-template-rows:repeat(5,minmax(0,1fr))!important}.ext-grid-rows-6{grid-template-rows:repeat(6,minmax(0,1fr))!important}.ext-grid-rows-none{grid-template-rows:none!important}.ext-flex-row{flex-direction:row!important}.ext-flex-row-reverse{flex-direction:row-reverse!important}.ext-flex-col{flex-direction:column!important}.ext-flex-col-reverse{flex-direction:column-reverse!important}.ext-flex-wrap{flex-wrap:wrap!important}.ext-flex-wrap-reverse{flex-wrap:wrap-reverse!important}.ext-flex-nowrap{flex-wrap:nowrap!important}.ext-items-start{align-items:flex-start!important}.ext-items-end{align-items:flex-end!important}.ext-items-center{align-items:center!important}.ext-items-baseline{align-items:baseline!important}.ext-items-stretch{align-items:stretch!important}.ext-justify-start{justify-content:flex-start!important}.ext-justify-end{justify-content:flex-end!important}.ext-justify-center{justify-content:center!important}.ext-justify-between{justify-content:space-between!important}.ext-justify-around{justify-content:space-around!important}.ext-justify-evenly{justify-content:space-evenly!important}.ext-justify-items-start{justify-items:start!important}.ext-justify-items-end{justify-items:end!important}.ext-justify-items-center{justify-items:center!important}.ext-justify-items-stretch{justify-items:stretch!important}.ext-gap-0{gap:0!important}.ext-gap-base{gap:var(--wp--style--block-gap,2rem)!important}.ext-gap-lg{gap:var(--extendify--spacing--large)!important}.ext-gap-x-0{-moz-column-gap:0!important;column-gap:0!important}.ext-gap-x-base{-moz-column-gap:var(--wp--style--block-gap,2rem)!important;column-gap:var(--wp--style--block-gap,2rem)!important}.ext-gap-x-lg{-moz-column-gap:var(--extendify--spacing--large)!important;column-gap:var(--extendify--spacing--large)!important}.ext-gap-y-0{row-gap:0!important}.ext-gap-y-base{row-gap:var(--wp--style--block-gap,2rem)!important}.ext-gap-y-lg{row-gap:var(--extendify--spacing--large)!important}.ext-justify-self-auto{justify-self:auto!important}.ext-justify-self-start{justify-self:start!important}.ext-justify-self-end{justify-self:end!important}.ext-justify-self-center{justify-self:center!important}.ext-justify-self-stretch{justify-self:stretch!important}.ext-rounded-none{border-radius:0!important}.ext-rounded-full{border-radius:9999px!important}.ext-rounded-t-none{border-top-left-radius:0!important;border-top-right-radius:0!important}.ext-rounded-t-full{border-top-left-radius:9999px!important;border-top-right-radius:9999px!important}.ext-rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.ext-rounded-r-full{border-bottom-right-radius:9999px!important;border-top-right-radius:9999px!important}.ext-rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.ext-rounded-b-full{border-bottom-left-radius:9999px!important;border-bottom-right-radius:9999px!important}.ext-rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.ext-rounded-l-full{border-bottom-left-radius:9999px!important;border-top-left-radius:9999px!important}.ext-rounded-tl-none{border-top-left-radius:0!important}.ext-rounded-tl-full{border-top-left-radius:9999px!important}.ext-rounded-tr-none{border-top-right-radius:0!important}.ext-rounded-tr-full{border-top-right-radius:9999px!important}.ext-rounded-br-none{border-bottom-right-radius:0!important}.ext-rounded-br-full{border-bottom-right-radius:9999px!important}.ext-rounded-bl-none{border-bottom-left-radius:0!important}.ext-rounded-bl-full{border-bottom-left-radius:9999px!important}.ext-border-0{border-width:0!important}.ext-border-t-0{border-top-width:0!important}.ext-border-r-0{border-right-width:0!important}.ext-border-b-0{border-bottom-width:0!important}.ext-border-l-0{border-left-width:0!important}.ext-p-0:not([style*=padding]){padding:0!important}.ext-p-base:not([style*=padding]){padding:var(--wp--style--block-gap,2rem)!important}.ext-p-lg:not([style*=padding]){padding:var(--extendify--spacing--large)!important}.ext-px-0:not([style*=padding]){padding-left:0!important;padding-right:0!important}.ext-px-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important;padding-right:var(--wp--style--block-gap,2rem)!important}.ext-px-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important;padding-right:var(--extendify--spacing--large)!important}.ext-py-0:not([style*=padding]){padding-bottom:0!important;padding-top:0!important}.ext-py-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important;padding-top:var(--wp--style--block-gap,2rem)!important}.ext-py-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important;padding-top:var(--extendify--spacing--large)!important}.ext-pt-0:not([style*=padding]){padding-top:0!important}.ext-pt-base:not([style*=padding]){padding-top:var(--wp--style--block-gap,2rem)!important}.ext-pt-lg:not([style*=padding]){padding-top:var(--extendify--spacing--large)!important}.ext-pr-0:not([style*=padding]){padding-right:0!important}.ext-pr-base:not([style*=padding]){padding-right:var(--wp--style--block-gap,2rem)!important}.ext-pr-lg:not([style*=padding]){padding-right:var(--extendify--spacing--large)!important}.ext-pb-0:not([style*=padding]){padding-bottom:0!important}.ext-pb-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important}.ext-pb-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important}.ext-pl-0:not([style*=padding]){padding-left:0!important}.ext-pl-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important}.ext-pl-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important}.ext-text-left{text-align:left!important}.ext-text-center{text-align:center!important}.ext-text-right{text-align:right!important}.ext-leading-none{line-height:1!important}.ext-leading-tight{line-height:1.25!important}.ext-leading-snug{line-height:1.375!important}.ext-leading-normal{line-height:1.5!important}.ext-leading-relaxed{line-height:1.625!important}.ext-leading-loose{line-height:2!important}.clip-path--rhombus img{-webkit-clip-path:polygon(15% 6%,80% 29%,84% 93%,23% 69%);clip-path:polygon(15% 6%,80% 29%,84% 93%,23% 69%)}.clip-path--diamond img{-webkit-clip-path:polygon(5% 29%,60% 2%,91% 64%,36% 89%);clip-path:polygon(5% 29%,60% 2%,91% 64%,36% 89%)}.clip-path--rhombus-alt img{-webkit-clip-path:polygon(14% 9%,85% 24%,91% 89%,19% 76%);clip-path:polygon(14% 9%,85% 24%,91% 89%,19% 76%)}.wp-block-columns[class*=fullwidth-cols]{margin-bottom:unset}.ext .wp-block-columns .wp-block-column[style*=padding]{padding-left:0!important;padding-right:0!important}.ext .wp-block-columns+.wp-block-columns:not([class*=mt-]):not([class*=my-]):not([style*=margin]){margin-top:0!important}[class*=fullwidth-cols] .wp-block-column:first-child,[class*=fullwidth-cols] .wp-block-group:first-child{margin-top:0}[class*=fullwidth-cols] .wp-block-column:last-child,[class*=fullwidth-cols] .wp-block-group:last-child{margin-bottom:0}[class*=fullwidth-cols] .wp-block-column :first-child,[class*=fullwidth-cols] .wp-block-column:first-child *{margin-top:0}.ext .is-not-stacked-on-mobile .wp-block-column,[class*=fullwidth-cols] .wp-block-column :last-child{margin-bottom:0}.wp-block-columns[class*=fullwidth-cols]:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:last-child){margin-bottom:var(--wp--style--block-gap,2rem)}@media (min-width:782px){.wp-block-columns[class*=fullwidth-cols]:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:last-child){margin-bottom:0}}.wp-block-columns[class*=fullwidth-cols].is-not-stacked-on-mobile>.wp-block-column{margin-bottom:0!important}@media (min-width:600px) and (max-width:781px){.wp-block-columns[class*=fullwidth-cols]:not(.is-not-stacked-on-mobile)>.wp-block-column:nth-child(2n){margin-left:var(--wp--style--block-gap,2em)}}@media (max-width:781px){.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile){flex-wrap:wrap}.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important;margin-left:0!important}}@media (max-width:1079px){.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile){flex-wrap:wrap}.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important;margin-left:0!important}.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:last-child){margin-bottom:var(--wp--style--block-gap,2rem)!important}}.direction-rtl{direction:rtl}.direction-ltr{direction:ltr}.is-style-inline-list{padding-left:0!important}.is-style-inline-list li{list-style-type:none!important}@media (min-width:782px){.is-style-inline-list li{display:inline!important;margin-right:var(--wp--style--block-gap,2rem)!important}}@media (min-width:782px){.is-style-inline-list li:first-child{margin-left:0!important}}@media (min-width:782px){.is-style-inline-list li:last-child{margin-right:0!important}}.bring-to-front{position:relative;z-index:10}.text-stroke{-webkit-text-stroke-color:var(--wp--preset--color--background)}.text-stroke,.text-stroke--primary{-webkit-text-stroke-width:var(
|
2 |
+
--wp--custom--typography--text-stroke-width,2px
|
3 |
+
)}.text-stroke--primary{-webkit-text-stroke-color:var(--wp--preset--color--primary)}.text-stroke--secondary{-webkit-text-stroke-width:var(
|
4 |
+
--wp--custom--typography--text-stroke-width,2px
|
5 |
+
);-webkit-text-stroke-color:var(--wp--preset--color--secondary)}.editor\:no-caption .block-editor-rich-text__editable{display:none!important}.editor\:no-inserter .wp-block-column:not(.is-selected)>.block-list-appender,.editor\:no-inserter .wp-block-cover__inner-container>.block-list-appender,.editor\:no-inserter .wp-block-group__inner-container>.block-list-appender,.editor\:no-inserter>.block-list-appender{display:none}.editor\:no-resize .components-resizable-box__handle,.editor\:no-resize .components-resizable-box__handle:after,.editor\:no-resize .components-resizable-box__side-handle:before{display:none;pointer-events:none}.editor\:no-resize .components-resizable-box__container{display:block}.editor\:pointer-events-none{pointer-events:none}.is-style-angled{justify-content:flex-end}.ext .is-style-angled>[class*=_inner-container],.is-style-angled{align-items:center}.is-style-angled .wp-block-cover__image-background,.is-style-angled .wp-block-cover__video-background{-webkit-clip-path:polygon(0 0,30% 0,50% 100%,0 100%);clip-path:polygon(0 0,30% 0,50% 100%,0 100%);z-index:1}@media (min-width:782px){.is-style-angled .wp-block-cover__image-background,.is-style-angled .wp-block-cover__video-background{-webkit-clip-path:polygon(0 0,55% 0,65% 100%,0 100%);clip-path:polygon(0 0,55% 0,65% 100%,0 100%)}}.ext .wp-block[data-align=wide]{margin-bottom:0!important;margin-top:0!important}.has-foreground-color{color:var(--wp--preset--color--foreground,#000)!important}.has-foreground-background-color{background-color:var(--wp--preset--color--foreground,#000)!important}.has-background-color{color:var(--wp--preset--color--background,#fff)!important}.has-background-background-color{background-color:var(--wp--preset--color--background,#fff)!important}.has-primary-color{color:var(--wp--preset--color--primary,#4b5563)!important}.has-primary-background-color{background-color:var(--wp--preset--color--primary,#4b5563)!important}.has-secondary-color{color:var(--wp--preset--color--secondary,#9ca3af)!important}.has-secondary-background-color{background-color:var(--wp--preset--color--secondary,#9ca3af)!important}.ext.has-text-color h1,.ext.has-text-color h2,.ext.has-text-color h3,.ext.has-text-color h4,.ext.has-text-color h5,.ext.has-text-color h6,.ext.has-text-color p{color:currentColor}.editor-styles-wrapper .has-gigantic-font-size.wp-block,.has-gigantic-font-size{--fallback-size:clamp(var(--wp--preset--font-size--huge,22px),calc(1rem + var(--wp--custom--typography--gigantic--preferred, 5vw)),var(--wp--preset--font-size--huge,42px) * 2);font-size:var(--wp--preset--font-size--gigantic,var(--fallback-size))}.ext .ext-grid>[class*=_inner-container]{display:grid}.ext>[class*=_inner-container]>.ext-grid:not([class*=columns]),.ext>[class*=_inner-container]>.wp-block>.ext-grid:not([class*=columns]){display:initial!important}.ext .ext-grid-cols-1>[class*=_inner-container]{grid-template-columns:repeat(1,minmax(0,1fr))!important}.ext .ext-grid-cols-2>[class*=_inner-container]{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ext .ext-grid-cols-3>[class*=_inner-container]{grid-template-columns:repeat(3,minmax(0,1fr))!important}.ext .ext-grid-cols-4>[class*=_inner-container]{grid-template-columns:repeat(4,minmax(0,1fr))!important}.ext .ext-grid-cols-5>[class*=_inner-container]{grid-template-columns:repeat(5,minmax(0,1fr))!important}.ext .ext-grid-cols-6>[class*=_inner-container]{grid-template-columns:repeat(6,minmax(0,1fr))!important}.ext .ext-grid-cols-7>[class*=_inner-container]{grid-template-columns:repeat(7,minmax(0,1fr))!important}.ext .ext-grid-cols-8>[class*=_inner-container]{grid-template-columns:repeat(8,minmax(0,1fr))!important}.ext .ext-grid-cols-9>[class*=_inner-container]{grid-template-columns:repeat(9,minmax(0,1fr))!important}.ext .ext-grid-cols-10>[class*=_inner-container]{grid-template-columns:repeat(10,minmax(0,1fr))!important}.ext .ext-grid-cols-11>[class*=_inner-container]{grid-template-columns:repeat(11,minmax(0,1fr))!important}.ext .ext-grid-cols-12>[class*=_inner-container]{grid-template-columns:repeat(12,minmax(0,1fr))!important}.ext .ext-grid-cols-13>[class*=_inner-container]{grid-template-columns:repeat(13,minmax(0,1fr))!important}.ext .ext-grid-cols-none>[class*=_inner-container]{grid-template-columns:none!important}.ext .ext-grid-rows-1>[class*=_inner-container]{grid-template-rows:repeat(1,minmax(0,1fr))!important}.ext .ext-grid-rows-2>[class*=_inner-container]{grid-template-rows:repeat(2,minmax(0,1fr))!important}.ext .ext-grid-rows-3>[class*=_inner-container]{grid-template-rows:repeat(3,minmax(0,1fr))!important}.ext .ext-grid-rows-4>[class*=_inner-container]{grid-template-rows:repeat(4,minmax(0,1fr))!important}.ext .ext-grid-rows-5>[class*=_inner-container]{grid-template-rows:repeat(5,minmax(0,1fr))!important}.ext .ext-grid-rows-6>[class*=_inner-container]{grid-template-rows:repeat(6,minmax(0,1fr))!important}.ext .ext-grid-rows-none>[class*=_inner-container]{grid-template-rows:none!important}.ext .ext-items-start>[class*=_inner-container]{align-items:flex-start!important}.ext .ext-items-end>[class*=_inner-container]{align-items:flex-end!important}.ext .ext-items-center>[class*=_inner-container]{align-items:center!important}.ext .ext-items-baseline>[class*=_inner-container]{align-items:baseline!important}.ext .ext-items-stretch>[class*=_inner-container]{align-items:stretch!important}.ext.wp-block-group>:last-child{margin-bottom:0}.ext .wp-block-group__inner-container{padding:0!important}.ext.has-background{padding-left:var(--wp--style--block-gap,2rem);padding-right:var(--wp--style--block-gap,2rem)}.ext [class*=inner-container]>.alignwide [class*=inner-container]{max-width:var(--responsive--alignwide-width,120rem)}.ext [class*=inner-container]>.alignwide [class*=inner-container]>*{max-width:100%!important}.ext [class*=inner-container]>.alignfull [class*=inner-container]{max-width:100%}.ext [class*=inner-container]>.alignfull [class*=inner-container]>*{max-width:100%!important}.ext .wp-block-image{position:relative;text-align:center}.ext .wp-block-image img{display:inline-block;vertical-align:middle}body{--extendify--spacing--large:var(
|
6 |
+
--wp--custom--spacing--large,clamp(2em,8vw,8em)
|
7 |
+
)}.ast-separate-container .ext .block-editor-block-list__layout{padding:0!important}.ext [data-block].wp-block-buttons .wp-block-button{margin-bottom:0;margin-top:0}.ext [data-block].wp-block-buttons .wp-block-button:first-child{margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:0!important}.ext .wp-block-group__inner-container figure.wp-block-gallery.alignfull{margin-bottom:unset;margin-top:unset}.ext .alignwide{margin-left:auto!important;margin-right:auto!important}@media (min-width:782px){.tablet\:ext-absolute{position:absolute!important}.tablet\:ext-relative{position:relative!important}.tablet\:ext-top-base{top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-top-lg{top:var(--extendify--spacing--large)!important}.tablet\:ext--top-base{top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--top-lg{top:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-right-base{right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-right-lg{right:var(--extendify--spacing--large)!important}.tablet\:ext--right-base{right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--right-lg{right:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-bottom-base{bottom:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-bottom-lg{bottom:var(--extendify--spacing--large)!important}.tablet\:ext--bottom-base{bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--bottom-lg{bottom:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-left-base{left:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-left-lg{left:var(--extendify--spacing--large)!important}.tablet\:ext--left-base{left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--left-lg{left:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-order-1{order:1!important}.tablet\:ext-order-2{order:2!important}.tablet\:ext-m-0:not([style*=margin]){margin:0!important}.tablet\:ext-m-auto:not([style*=margin]){margin:auto!important}.tablet\:ext-m-base:not([style*=margin]){margin:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-m-lg:not([style*=margin]){margin:var(--extendify--spacing--large)!important}.tablet\:ext--m-base:not([style*=margin]){margin:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--m-lg:not([style*=margin]){margin:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mx-0:not([style*=margin]){margin-left:0!important;margin-right:0!important}.tablet\:ext-mx-auto:not([style*=margin]){margin-left:auto!important;margin-right:auto!important}.tablet\:ext-mx-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important;margin-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mx-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important;margin-right:var(--extendify--spacing--large)!important}.tablet\:ext--mx-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mx-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important;margin-right:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-my-0:not([style*=margin]){margin-bottom:0!important;margin-top:0!important}.tablet\:ext-my-auto:not([style*=margin]){margin-bottom:auto!important;margin-top:auto!important}.tablet\:ext-my-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-my-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important;margin-top:var(--extendify--spacing--large)!important}.tablet\:ext--my-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--my-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important;margin-top:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mt-0:not([style*=margin]){margin-top:0!important}.tablet\:ext-mt-auto:not([style*=margin]){margin-top:auto!important}.tablet\:ext-mt-base:not([style*=margin]){margin-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mt-lg:not([style*=margin]){margin-top:var(--extendify--spacing--large)!important}.tablet\:ext--mt-base:not([style*=margin]){margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mt-lg:not([style*=margin]){margin-top:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mr-0:not([style*=margin]){margin-right:0!important}.tablet\:ext-mr-auto:not([style*=margin]){margin-right:auto!important}.tablet\:ext-mr-base:not([style*=margin]){margin-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mr-lg:not([style*=margin]){margin-right:var(--extendify--spacing--large)!important}.tablet\:ext--mr-base:not([style*=margin]){margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mr-lg:not([style*=margin]){margin-right:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-mb-0:not([style*=margin]){margin-bottom:0!important}.tablet\:ext-mb-auto:not([style*=margin]){margin-bottom:auto!important}.tablet\:ext-mb-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-mb-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important}.tablet\:ext--mb-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--mb-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-ml-0:not([style*=margin]){margin-left:0!important}.tablet\:ext-ml-auto:not([style*=margin]){margin-left:auto!important}.tablet\:ext-ml-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-ml-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important}.tablet\:ext--ml-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.tablet\:ext--ml-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important}.tablet\:ext-block{display:block!important}.tablet\:ext-inline-block{display:inline-block!important}.tablet\:ext-inline{display:inline!important}.tablet\:ext-flex{display:flex!important}.tablet\:ext-inline-flex{display:inline-flex!important}.tablet\:ext-grid{display:grid!important}.tablet\:ext-inline-grid{display:inline-grid!important}.tablet\:ext-hidden{display:none!important}.tablet\:ext-w-auto{width:auto!important}.tablet\:ext-w-full{width:100%!important}.tablet\:ext-max-w-full{max-width:100%!important}.tablet\:ext-flex-1{flex:1 1 0%!important}.tablet\:ext-flex-auto{flex:1 1 auto!important}.tablet\:ext-flex-initial{flex:0 1 auto!important}.tablet\:ext-flex-none{flex:none!important}.tablet\:ext-flex-shrink-0{flex-shrink:0!important}.tablet\:ext-flex-shrink{flex-shrink:1!important}.tablet\:ext-flex-grow-0{flex-grow:0!important}.tablet\:ext-flex-grow{flex-grow:1!important}.tablet\:ext-list-none{list-style-type:none!important}.tablet\:ext-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.tablet\:ext-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.tablet\:ext-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.tablet\:ext-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.tablet\:ext-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.tablet\:ext-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.tablet\:ext-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.tablet\:ext-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.tablet\:ext-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))!important}.tablet\:ext-grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.tablet\:ext-grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))!important}.tablet\:ext-grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))!important}.tablet\:ext-grid-cols-none{grid-template-columns:none!important}.tablet\:ext-flex-row{flex-direction:row!important}.tablet\:ext-flex-row-reverse{flex-direction:row-reverse!important}.tablet\:ext-flex-col{flex-direction:column!important}.tablet\:ext-flex-col-reverse{flex-direction:column-reverse!important}.tablet\:ext-flex-wrap{flex-wrap:wrap!important}.tablet\:ext-flex-wrap-reverse{flex-wrap:wrap-reverse!important}.tablet\:ext-flex-nowrap{flex-wrap:nowrap!important}.tablet\:ext-items-start{align-items:flex-start!important}.tablet\:ext-items-end{align-items:flex-end!important}.tablet\:ext-items-center{align-items:center!important}.tablet\:ext-items-baseline{align-items:baseline!important}.tablet\:ext-items-stretch{align-items:stretch!important}.tablet\:ext-justify-start{justify-content:flex-start!important}.tablet\:ext-justify-end{justify-content:flex-end!important}.tablet\:ext-justify-center{justify-content:center!important}.tablet\:ext-justify-between{justify-content:space-between!important}.tablet\:ext-justify-around{justify-content:space-around!important}.tablet\:ext-justify-evenly{justify-content:space-evenly!important}.tablet\:ext-justify-items-start{justify-items:start!important}.tablet\:ext-justify-items-end{justify-items:end!important}.tablet\:ext-justify-items-center{justify-items:center!important}.tablet\:ext-justify-items-stretch{justify-items:stretch!important}.tablet\:ext-justify-self-auto{justify-self:auto!important}.tablet\:ext-justify-self-start{justify-self:start!important}.tablet\:ext-justify-self-end{justify-self:end!important}.tablet\:ext-justify-self-center{justify-self:center!important}.tablet\:ext-justify-self-stretch{justify-self:stretch!important}.tablet\:ext-p-0:not([style*=padding]){padding:0!important}.tablet\:ext-p-base:not([style*=padding]){padding:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-p-lg:not([style*=padding]){padding:var(--extendify--spacing--large)!important}.tablet\:ext-px-0:not([style*=padding]){padding-left:0!important;padding-right:0!important}.tablet\:ext-px-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important;padding-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-px-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important;padding-right:var(--extendify--spacing--large)!important}.tablet\:ext-py-0:not([style*=padding]){padding-bottom:0!important;padding-top:0!important}.tablet\:ext-py-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important;padding-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-py-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important;padding-top:var(--extendify--spacing--large)!important}.tablet\:ext-pt-0:not([style*=padding]){padding-top:0!important}.tablet\:ext-pt-base:not([style*=padding]){padding-top:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pt-lg:not([style*=padding]){padding-top:var(--extendify--spacing--large)!important}.tablet\:ext-pr-0:not([style*=padding]){padding-right:0!important}.tablet\:ext-pr-base:not([style*=padding]){padding-right:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pr-lg:not([style*=padding]){padding-right:var(--extendify--spacing--large)!important}.tablet\:ext-pb-0:not([style*=padding]){padding-bottom:0!important}.tablet\:ext-pb-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pb-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important}.tablet\:ext-pl-0:not([style*=padding]){padding-left:0!important}.tablet\:ext-pl-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important}.tablet\:ext-pl-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important}.tablet\:ext-text-left{text-align:left!important}.tablet\:ext-text-center{text-align:center!important}.tablet\:ext-text-right{text-align:right!important}}@media (min-width:1080px){.desktop\:ext-absolute{position:absolute!important}.desktop\:ext-relative{position:relative!important}.desktop\:ext-top-base{top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-top-lg{top:var(--extendify--spacing--large)!important}.desktop\:ext--top-base{top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--top-lg{top:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-right-base{right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-right-lg{right:var(--extendify--spacing--large)!important}.desktop\:ext--right-base{right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--right-lg{right:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-bottom-base{bottom:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-bottom-lg{bottom:var(--extendify--spacing--large)!important}.desktop\:ext--bottom-base{bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--bottom-lg{bottom:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-left-base{left:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-left-lg{left:var(--extendify--spacing--large)!important}.desktop\:ext--left-base{left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--left-lg{left:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-order-1{order:1!important}.desktop\:ext-order-2{order:2!important}.desktop\:ext-m-0:not([style*=margin]){margin:0!important}.desktop\:ext-m-auto:not([style*=margin]){margin:auto!important}.desktop\:ext-m-base:not([style*=margin]){margin:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-m-lg:not([style*=margin]){margin:var(--extendify--spacing--large)!important}.desktop\:ext--m-base:not([style*=margin]){margin:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--m-lg:not([style*=margin]){margin:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mx-0:not([style*=margin]){margin-left:0!important;margin-right:0!important}.desktop\:ext-mx-auto:not([style*=margin]){margin-left:auto!important;margin-right:auto!important}.desktop\:ext-mx-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important;margin-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mx-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important;margin-right:var(--extendify--spacing--large)!important}.desktop\:ext--mx-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mx-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important;margin-right:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-my-0:not([style*=margin]){margin-bottom:0!important;margin-top:0!important}.desktop\:ext-my-auto:not([style*=margin]){margin-bottom:auto!important;margin-top:auto!important}.desktop\:ext-my-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important;margin-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-my-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important;margin-top:var(--extendify--spacing--large)!important}.desktop\:ext--my-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important;margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--my-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important;margin-top:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mt-0:not([style*=margin]){margin-top:0!important}.desktop\:ext-mt-auto:not([style*=margin]){margin-top:auto!important}.desktop\:ext-mt-base:not([style*=margin]){margin-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mt-lg:not([style*=margin]){margin-top:var(--extendify--spacing--large)!important}.desktop\:ext--mt-base:not([style*=margin]){margin-top:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mt-lg:not([style*=margin]){margin-top:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mr-0:not([style*=margin]){margin-right:0!important}.desktop\:ext-mr-auto:not([style*=margin]){margin-right:auto!important}.desktop\:ext-mr-base:not([style*=margin]){margin-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mr-lg:not([style*=margin]){margin-right:var(--extendify--spacing--large)!important}.desktop\:ext--mr-base:not([style*=margin]){margin-right:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mr-lg:not([style*=margin]){margin-right:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-mb-0:not([style*=margin]){margin-bottom:0!important}.desktop\:ext-mb-auto:not([style*=margin]){margin-bottom:auto!important}.desktop\:ext-mb-base:not([style*=margin]){margin-bottom:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-mb-lg:not([style*=margin]){margin-bottom:var(--extendify--spacing--large)!important}.desktop\:ext--mb-base:not([style*=margin]){margin-bottom:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--mb-lg:not([style*=margin]){margin-bottom:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-ml-0:not([style*=margin]){margin-left:0!important}.desktop\:ext-ml-auto:not([style*=margin]){margin-left:auto!important}.desktop\:ext-ml-base:not([style*=margin]){margin-left:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-ml-lg:not([style*=margin]){margin-left:var(--extendify--spacing--large)!important}.desktop\:ext--ml-base:not([style*=margin]){margin-left:calc(var(--wp--style--block-gap, 2rem)*-1)!important}.desktop\:ext--ml-lg:not([style*=margin]){margin-left:calc(var(--extendify--spacing--large)*-1)!important}.desktop\:ext-block{display:block!important}.desktop\:ext-inline-block{display:inline-block!important}.desktop\:ext-inline{display:inline!important}.desktop\:ext-flex{display:flex!important}.desktop\:ext-inline-flex{display:inline-flex!important}.desktop\:ext-grid{display:grid!important}.desktop\:ext-inline-grid{display:inline-grid!important}.desktop\:ext-hidden{display:none!important}.desktop\:ext-w-auto{width:auto!important}.desktop\:ext-w-full{width:100%!important}.desktop\:ext-max-w-full{max-width:100%!important}.desktop\:ext-flex-1{flex:1 1 0%!important}.desktop\:ext-flex-auto{flex:1 1 auto!important}.desktop\:ext-flex-initial{flex:0 1 auto!important}.desktop\:ext-flex-none{flex:none!important}.desktop\:ext-flex-shrink-0{flex-shrink:0!important}.desktop\:ext-flex-shrink{flex-shrink:1!important}.desktop\:ext-flex-grow-0{flex-grow:0!important}.desktop\:ext-flex-grow{flex-grow:1!important}.desktop\:ext-list-none{list-style-type:none!important}.desktop\:ext-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.desktop\:ext-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.desktop\:ext-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.desktop\:ext-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.desktop\:ext-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}.desktop\:ext-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}.desktop\:ext-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))!important}.desktop\:ext-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))!important}.desktop\:ext-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))!important}.desktop\:ext-grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))!important}.desktop\:ext-grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))!important}.desktop\:ext-grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))!important}.desktop\:ext-grid-cols-none{grid-template-columns:none!important}.desktop\:ext-flex-row{flex-direction:row!important}.desktop\:ext-flex-row-reverse{flex-direction:row-reverse!important}.desktop\:ext-flex-col{flex-direction:column!important}.desktop\:ext-flex-col-reverse{flex-direction:column-reverse!important}.desktop\:ext-flex-wrap{flex-wrap:wrap!important}.desktop\:ext-flex-wrap-reverse{flex-wrap:wrap-reverse!important}.desktop\:ext-flex-nowrap{flex-wrap:nowrap!important}.desktop\:ext-items-start{align-items:flex-start!important}.desktop\:ext-items-end{align-items:flex-end!important}.desktop\:ext-items-center{align-items:center!important}.desktop\:ext-items-baseline{align-items:baseline!important}.desktop\:ext-items-stretch{align-items:stretch!important}.desktop\:ext-justify-start{justify-content:flex-start!important}.desktop\:ext-justify-end{justify-content:flex-end!important}.desktop\:ext-justify-center{justify-content:center!important}.desktop\:ext-justify-between{justify-content:space-between!important}.desktop\:ext-justify-around{justify-content:space-around!important}.desktop\:ext-justify-evenly{justify-content:space-evenly!important}.desktop\:ext-justify-items-start{justify-items:start!important}.desktop\:ext-justify-items-end{justify-items:end!important}.desktop\:ext-justify-items-center{justify-items:center!important}.desktop\:ext-justify-items-stretch{justify-items:stretch!important}.desktop\:ext-justify-self-auto{justify-self:auto!important}.desktop\:ext-justify-self-start{justify-self:start!important}.desktop\:ext-justify-self-end{justify-self:end!important}.desktop\:ext-justify-self-center{justify-self:center!important}.desktop\:ext-justify-self-stretch{justify-self:stretch!important}.desktop\:ext-p-0:not([style*=padding]){padding:0!important}.desktop\:ext-p-base:not([style*=padding]){padding:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-p-lg:not([style*=padding]){padding:var(--extendify--spacing--large)!important}.desktop\:ext-px-0:not([style*=padding]){padding-left:0!important;padding-right:0!important}.desktop\:ext-px-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important;padding-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-px-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important;padding-right:var(--extendify--spacing--large)!important}.desktop\:ext-py-0:not([style*=padding]){padding-bottom:0!important;padding-top:0!important}.desktop\:ext-py-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important;padding-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-py-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important;padding-top:var(--extendify--spacing--large)!important}.desktop\:ext-pt-0:not([style*=padding]){padding-top:0!important}.desktop\:ext-pt-base:not([style*=padding]){padding-top:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pt-lg:not([style*=padding]){padding-top:var(--extendify--spacing--large)!important}.desktop\:ext-pr-0:not([style*=padding]){padding-right:0!important}.desktop\:ext-pr-base:not([style*=padding]){padding-right:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pr-lg:not([style*=padding]){padding-right:var(--extendify--spacing--large)!important}.desktop\:ext-pb-0:not([style*=padding]){padding-bottom:0!important}.desktop\:ext-pb-base:not([style*=padding]){padding-bottom:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pb-lg:not([style*=padding]){padding-bottom:var(--extendify--spacing--large)!important}.desktop\:ext-pl-0:not([style*=padding]){padding-left:0!important}.desktop\:ext-pl-base:not([style*=padding]){padding-left:var(--wp--style--block-gap,2rem)!important}.desktop\:ext-pl-lg:not([style*=padding]){padding-left:var(--extendify--spacing--large)!important}.desktop\:ext-text-left{text-align:left!important}.desktop\:ext-text-center{text-align:center!important}.desktop\:ext-text-right{text-align:right!important}}
|
redux-core/extendify-sdk/public/editorplus/editorplus.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(()=>{var t={135:(t,e,r)=>{t.exports=r(248)},248:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new P(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return T()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?p:d,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",y={};function v(){}function m(){}function w(){}var g={};g[i]=function(){return this};var x=Object.getPrototypeOf,b=x&&x(x(j([])));b&&b!==r&&n.call(b,i)&&(g=b);var E=w.prototype=v.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function k(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function j(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:T}}function T(){return{value:e,done:!0}}return m.prototype=E.constructor=w,w.constructor=m,m.displayName=u(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},L(_.prototype),_.prototype[a]=function(){return this},t.AsyncIterator=_,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(E),u(E,c,"Generator"),E[i]=function(){return this},E.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=r(135),e=r.n(t);const n=wp.data;function o(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t){var e,r=!1;if(!(t instanceof CSSRule))return!1;var n,o=["https://dl.airtable.com"],a=i(null!==(e=t.cssText.match(/[(http(s)?)://(www.)?a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g))&&void 0!==e?e:[]);try{var c=function(){var t=n.value;try{var e=new URL(t);if(!o.includes(e.origin))return r=!0,"break"}catch(e){var i=["https://","http://",".com"].some((function(e){return-1!==t.indexOf(e)})),a=-1!==t.indexOf(o[0]);if(i&&!a)return r=!0,"break"}};for(a.s();!(n=a.n()).done;){if("break"===c())break}}catch(t){a.e(t)}finally{a.f()}return r}function u(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null!==(t=null===(e=window.wp.data.select("core/editor").getEditedPostAttribute("meta"))||void 0===e?void 0:e.extendify_custom_stylesheet)&&void 0!==t?t:"";if("string"==typeof r){r=r.replace(/(.eplus_styles)/g,"");var n=document.querySelector("#extendify-root"),o="extendify-custom-stylesheet";if(document.getElementById(o))document.getElementById(o).innerHTML=r;else{var i=document.createElement("style");i.id=o,i.type="text/css",i.appendChild(document.createTextNode(r)),n.appendChild(i)}}}function l(t,e){var r,n,o="",a=function(t){return e.some((function(e){return t.startsWith(e)}))},u=i(null!==(r=null==t?void 0:t.cssRules)&&void 0!==r?r:[]);try{for(u.s();!(n=u.n()).done;){var l=n.value;if(l instanceof CSSMediaRule){var s;if(c(l))continue;for(var f=null!==(s=null==l?void 0:l.cssRules)&&void 0!==s?s:[],d=[],h=0,p=Object.keys(f);h<p.length;h++){var y=p[h];a((y in f?f[y]:{}).selectorText)||d.push(y)}for(var v=0,m=d;v<m.length;v++){var w=m[v];l.deleteRule(w)}o+=l.cssText}if(l instanceof CSSStyleRule){if(c(l))continue;o+=a(l.selectorText)?l.cssText:""}}}catch(t){u.e(t)}finally{u.f()}return o}window._wpLoadBlockEditor&&window.addEventListener("extendify-sdk::template-inserted",(function(t){var e,r,o,i,a=t.detail.template,c="editorplus-template.php";if(null!=a&&null!==(e=a.fields)&&void 0!==e&&null!==(r=e.instructions)&&void 0!==r&&r.includes("enable_page_template")){var u=null!==(o=null===(i=(0,n.select)("core/editor").getEditorSettings())||void 0===i?void 0:i.availableTemplates)&&void 0!==o?o:{};Object.keys(u).includes(c)&&(0,n.dispatch)("core/editor").editPost({template:c})}})),window._wpLoadBlockEditor&&window.addEventListener("extendify-sdk::template-inserted",function(){var t,r=(t=e().mark((function t(r){var o,i,a,c,s,f,d,h,p,y,v,m;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=r.detail.template,c=null!==(o=null==a||null===(i=a.fields)||void 0===i?void 0:i.stylesheet)&&void 0!==o?o:""){t.next=4;break}return t.abrupt("return");case 4:return t.prev=4,t.next=7,fetch(c);case 7:return t.next=9,t.sent.text();case 9:return d=t.sent,h=null!==(s=null===(f=(0,n.select)("core/editor").getEditedPostAttribute("meta"))||void 0===f?void 0:f.extendify_custom_stylesheet)&&void 0!==s?s:"",p=document.createElement("style"),y="extendify-stylesheet",p.id=y,p.type="text/css",p.appendChild(document.createTextNode(d)),document.querySelector("#extendify-root").appendChild(p),(v=document.getElementById(y)).sheet.disable=!0,m=l(null==v?void 0:v.sheet,[".extendify-",".eplus_styles",".eplus-",'[class*="extendify-"]','[class*="extendify"]']),m+=h,v.parentNode.removeChild(v),u(m),t.next=25,(0,n.dispatch)("core/editor").editPost({meta:{extendify_custom_stylesheet:m}});case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(4),console.error(t.t0);case 30:case"end":return t.stop()}}),t,null,[[4,27]])})),function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function c(t){o(a,n,i,c,u,"next",t)}function u(t){o(a,n,i,c,u,"throw",t)}c(void 0)}))});return function(t){return r.apply(this,arguments)}}()),window._wpLoadBlockEditor&&window.wp.domReady((function(){setTimeout((function(){return u()}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){var t="editorplus-template.php"===window.wp.data.select("core/editor").getEditedPostAttribute("template"),e=document.querySelector(".edit-post-visual-editor__post-title-wrapper"),r=document.querySelector(".editor-styles-wrapper");e&&r&&(t?(Promise.resolve().then((function(){return e.style.display="none"})),r.style.paddingTop="0",r.style.backgroundColor="#ffffff"):(e.style.removeProperty("display"),r.style.removeProperty("padding-top"),r.style.removeProperty("background-color")))}))})()})();
|
1 |
+
(()=>{if(window._wpLoadBlockEditor)var e=window.wp.data.subscribe((function(){var t="editorplus-template.php"===window.wp.data.select("core/editor").getEditedPostAttribute("template"),o=document.querySelector(".edit-post-visual-editor__post-title-wrapper"),r=document.querySelector(".editor-styles-wrapper");o&&r&&(t?(Promise.resolve().then((function(){return o.style.display="none"})),r.style.paddingTop="0",r.style.backgroundColor="#ffffff"):(o.style.removeProperty("display"),r.style.removeProperty("padding-top"),r.style.removeProperty("background-color")),e())}))})();
|
redux-core/extendify-sdk/readme.md
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
# Extendify SDK
|
2 |
|
3 |
Notable additional tools used:
|
4 |
-
|
5 |
-
-
|
6 |
-
-
|
|
|
7 |
|
8 |
<!-- TODO: Write doc on integration into other plugins -->
|
9 |
|
@@ -12,12 +13,13 @@ Notable additional tools used:
|
|
12 |
To get started, run `npm ci` then `npm run watch` to start a server. It's designed to proxy a server at `wordpres.test` to `localhost:3000` but we can extend that to be customizable via an environment variable or the like.
|
13 |
|
14 |
## Project structure
|
|
|
15 |
Below is a short description of the main files and directories of the application.
|
16 |
| Directory/File | Description |
|
17 |
| --- | --- |
|
18 |
| `/routes/api.php` | This file contains exposed REST endpoints. It's a custom router and essentially lets you define a route pattern and assign a class to handle it. |
|
19 |
| `/app` | This contains the server related files. It could even be renamed to `server` for clarity. |
|
20 |
-
| `/app/Controllers` | This directory contains controllers for various parts of the applications, like requesting templates or plugins.
|
21 |
| `/app/App.php` | This file contains information about the application. The intent is to make it dynamically generated from the readme, configs, etc |
|
22 |
| `/app/ApiRouter.php` | An abstraction for making interfacing with the REST api a little less painless |
|
23 |
| `/app/Admin.php` | Loads in our script and styles to the admin area |
|
@@ -29,15 +31,17 @@ Below is a short description of the main files and directories of the applicatio
|
|
29 |
| `/extendify-sdk.php` | This file decides whetehr to load the applocation, then loads it. This file shoudl probably remain withoug much logic. |
|
30 |
| `/bootstrap.php` | This file essentially does the loading. It could probably be combined with extendify-sdk, but it's an abstraction (and used to be much larger). |
|
31 |
|
32 |
-
|
33 |
## React application
|
|
|
34 |
The React part of the application starts by injecting a few buttons through the editor. You can find these in `buttons.js`. The app itself however is comprised of the main modal view, the api, some listeners to handle button clicks, and a "middleware" type section that will cycle through checks then take action based on pass/fail (this part was written quickly so will need tweaking with every addition).
|
35 |
|
36 |
TODO: complete this
|
37 |
| Directory/File | Description |
|
38 |
| --- | --- |
|
39 |
| `/src` | This is where the components are, as well as global listeners and helpers |
|
|
|
40 |
## Build files and configurations
|
|
|
41 |
Below is a just a few notes on the various build files we are currenly using
|
42 |
| Directory/File | Description |
|
43 |
| --- | --- |
|
@@ -48,4 +52,5 @@ Below is a just a few notes on the various build files we are currenly using
|
|
48 |
| `/.eslintrc.js` | A very opinionated style guide. |
|
49 |
|
50 |
## Testing
|
|
|
51 |
Coming soon!
|
1 |
# Extendify SDK
|
2 |
|
3 |
Notable additional tools used:
|
4 |
+
|
5 |
+
- [Laravel Mix](https://laravel-mix.com/) - A webpack wrapper + dev server
|
6 |
+
- [TailwindCSS](https://tailwindcss.com/) - A utility framework for styling. Also their [Headless UI](https://headlessui.dev/) package.
|
7 |
+
- [Zustand](https://github.com/pmndrs/zustand) - A not-opinionated state management solution
|
8 |
|
9 |
<!-- TODO: Write doc on integration into other plugins -->
|
10 |
|
13 |
To get started, run `npm ci` then `npm run watch` to start a server. It's designed to proxy a server at `wordpres.test` to `localhost:3000` but we can extend that to be customizable via an environment variable or the like.
|
14 |
|
15 |
## Project structure
|
16 |
+
|
17 |
Below is a short description of the main files and directories of the application.
|
18 |
| Directory/File | Description |
|
19 |
| --- | --- |
|
20 |
| `/routes/api.php` | This file contains exposed REST endpoints. It's a custom router and essentially lets you define a route pattern and assign a class to handle it. |
|
21 |
| `/app` | This contains the server related files. It could even be renamed to `server` for clarity. |
|
22 |
+
| `/app/Controllers` | This directory contains controllers for various parts of the applications, like requesting templates or plugins. |
|
23 |
| `/app/App.php` | This file contains information about the application. The intent is to make it dynamically generated from the readme, configs, etc |
|
24 |
| `/app/ApiRouter.php` | An abstraction for making interfacing with the REST api a little less painless |
|
25 |
| `/app/Admin.php` | Loads in our script and styles to the admin area |
|
31 |
| `/extendify-sdk.php` | This file decides whetehr to load the applocation, then loads it. This file shoudl probably remain withoug much logic. |
|
32 |
| `/bootstrap.php` | This file essentially does the loading. It could probably be combined with extendify-sdk, but it's an abstraction (and used to be much larger). |
|
33 |
|
|
|
34 |
## React application
|
35 |
+
|
36 |
The React part of the application starts by injecting a few buttons through the editor. You can find these in `buttons.js`. The app itself however is comprised of the main modal view, the api, some listeners to handle button clicks, and a "middleware" type section that will cycle through checks then take action based on pass/fail (this part was written quickly so will need tweaking with every addition).
|
37 |
|
38 |
TODO: complete this
|
39 |
| Directory/File | Description |
|
40 |
| --- | --- |
|
41 |
| `/src` | This is where the components are, as well as global listeners and helpers |
|
42 |
+
|
43 |
## Build files and configurations
|
44 |
+
|
45 |
Below is a just a few notes on the various build files we are currenly using
|
46 |
| Directory/File | Description |
|
47 |
| --- | --- |
|
52 |
| `/.eslintrc.js` | A very opinionated style guide. |
|
53 |
|
54 |
## Testing
|
55 |
+
|
56 |
Coming soon!
|
redux-core/extendify-sdk/readme.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
=== Extendify Sdk ===
|
2 |
Requires at least: 5.4
|
3 |
-
Stable tag:
|
4 |
Requires PHP: 5.6
|
5 |
Tested up to: 5.7.0
|
1 |
=== Extendify Sdk ===
|
2 |
Requires at least: 5.4
|
3 |
+
Stable tag: 13.1
|
4 |
Requires PHP: 5.6
|
5 |
Tested up to: 5.7.0
|
redux-core/extendify-sdk/src/ExtendifyLibrary.js
CHANGED
@@ -1,36 +1,33 @@
|
|
1 |
-
import {
|
2 |
-
useEffect, useCallback, useState,
|
3 |
-
} from '@wordpress/element'
|
4 |
import { useGlobalStore } from './state/GlobalState'
|
5 |
import { useUserStore } from './state/User'
|
6 |
import { useTemplatesStore } from './state/Templates'
|
7 |
-
import MainWindow from './pages/
|
8 |
import './utility-control'
|
9 |
import useTaxonomies from './hooks/useTaxonomies'
|
|
|
10 |
|
11 |
export default function ExtendifyLibrary({ show = false }) {
|
12 |
-
const open = useGlobalStore(state => state.open)
|
13 |
-
const setOpen = useGlobalStore(state => state.setOpen)
|
14 |
const [ready, setReady] = useState(false)
|
15 |
const showLibrary = useCallback(() => setOpen(true), [setOpen])
|
16 |
const hideLibrary = useCallback(() => setOpen(false), [setOpen])
|
17 |
-
const initTemplateData = useTemplatesStore(
|
|
|
|
|
18 |
|
19 |
// When the uuid of the user comes back from the database, we can
|
20 |
// assume that the state object is ready. This is important to check
|
21 |
// as the library may be "open" when loaded, but not ready.
|
22 |
-
const userStoreReady = useUserStore(state => state.uuid.length > 0)
|
23 |
-
const templatesStoreReady = useTemplatesStore(
|
|
|
|
|
24 |
useTaxonomies(open)
|
25 |
|
26 |
useEffect(() => {
|
27 |
if (userStoreReady && templatesStoreReady) {
|
28 |
-
// TODO: temporary needed until single views are removed.
|
29 |
-
if (useGlobalStore.getState().currentPage === 'single') {
|
30 |
-
useGlobalStore.setState({
|
31 |
-
currentPage: 'main',
|
32 |
-
})
|
33 |
-
}
|
34 |
initTemplateData()
|
35 |
setReady(true)
|
36 |
}
|
@@ -40,18 +37,32 @@ export default function ExtendifyLibrary({ show = false }) {
|
|
40 |
show && setOpen(true)
|
41 |
}, [show, setOpen])
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
// Let the visibility to be controlled from outside the application
|
44 |
useEffect(() => {
|
45 |
window.addEventListener('extendify-sdk::open-library', showLibrary)
|
46 |
window.addEventListener('extendify-sdk::close-library', hideLibrary)
|
47 |
return () => {
|
48 |
-
window.removeEventListener(
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
}, [hideLibrary, showLibrary])
|
52 |
|
53 |
if (!ready) {
|
54 |
return null
|
55 |
}
|
56 |
-
return <MainWindow/>
|
57 |
}
|
1 |
+
import { useEffect, useCallback, useState } from '@wordpress/element'
|
|
|
|
|
2 |
import { useGlobalStore } from './state/GlobalState'
|
3 |
import { useUserStore } from './state/User'
|
4 |
import { useTemplatesStore } from './state/Templates'
|
5 |
+
import MainWindow from './pages/MainWindow'
|
6 |
import './utility-control'
|
7 |
import useTaxonomies from './hooks/useTaxonomies'
|
8 |
+
import { General as GeneralApi } from './api/General'
|
9 |
|
10 |
export default function ExtendifyLibrary({ show = false }) {
|
11 |
+
const open = useGlobalStore((state) => state.open)
|
12 |
+
const setOpen = useGlobalStore((state) => state.setOpen)
|
13 |
const [ready, setReady] = useState(false)
|
14 |
const showLibrary = useCallback(() => setOpen(true), [setOpen])
|
15 |
const hideLibrary = useCallback(() => setOpen(false), [setOpen])
|
16 |
+
const initTemplateData = useTemplatesStore(
|
17 |
+
(state) => state.initTemplateData,
|
18 |
+
)
|
19 |
|
20 |
// When the uuid of the user comes back from the database, we can
|
21 |
// assume that the state object is ready. This is important to check
|
22 |
// as the library may be "open" when loaded, but not ready.
|
23 |
+
const userStoreReady = useUserStore((state) => state.uuid.length > 0)
|
24 |
+
const templatesStoreReady = useTemplatesStore(
|
25 |
+
(state) => Object.keys(state.taxonomyDefaultState).length > 0,
|
26 |
+
)
|
27 |
useTaxonomies(open)
|
28 |
|
29 |
useEffect(() => {
|
30 |
if (userStoreReady && templatesStoreReady) {
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
initTemplateData()
|
32 |
setReady(true)
|
33 |
}
|
37 |
show && setOpen(true)
|
38 |
}, [show, setOpen])
|
39 |
|
40 |
+
useEffect(() => {
|
41 |
+
GeneralApi.metaData().then((data) => {
|
42 |
+
useGlobalStore.setState({
|
43 |
+
metaData: data,
|
44 |
+
})
|
45 |
+
})
|
46 |
+
}, [])
|
47 |
+
|
48 |
// Let the visibility to be controlled from outside the application
|
49 |
useEffect(() => {
|
50 |
window.addEventListener('extendify-sdk::open-library', showLibrary)
|
51 |
window.addEventListener('extendify-sdk::close-library', hideLibrary)
|
52 |
return () => {
|
53 |
+
window.removeEventListener(
|
54 |
+
'extendify-sdk::open-library',
|
55 |
+
showLibrary,
|
56 |
+
)
|
57 |
+
window.removeEventListener(
|
58 |
+
'extendify-sdk::close-library',
|
59 |
+
hideLibrary,
|
60 |
+
)
|
61 |
}
|
62 |
}, [hideLibrary, showLibrary])
|
63 |
|
64 |
if (!ready) {
|
65 |
return null
|
66 |
}
|
67 |
+
return <MainWindow />
|
68 |
}
|
redux-core/extendify-sdk/src/api/Plugins.js
CHANGED
@@ -7,13 +7,11 @@ export const Plugins = {
|
|
7 |
installAndActivate(plugins = []) {
|
8 |
const formData = new FormData()
|
9 |
formData.append('plugins', JSON.stringify(plugins))
|
10 |
-
return api.post(
|
11 |
-
|
12 |
-
|
13 |
-
'Content-Type': 'multipart/form-data',
|
14 |
-
},
|
15 |
},
|
16 |
-
)
|
17 |
},
|
18 |
getActivated() {
|
19 |
return api.get('active-plugins')
|
7 |
installAndActivate(plugins = []) {
|
8 |
const formData = new FormData()
|
9 |
formData.append('plugins', JSON.stringify(plugins))
|
10 |
+
return api.post('plugins', formData, {
|
11 |
+
headers: {
|
12 |
+
'Content-Type': 'multipart/form-data',
|
|
|
|
|
13 |
},
|
14 |
+
})
|
15 |
},
|
16 |
getActivated() {
|
17 |
return api.get('active-plugins')
|
redux-core/extendify-sdk/src/api/SiteSettings.js
CHANGED
@@ -7,12 +7,10 @@ export const SiteSettings = {
|
|
7 |
setData(data) {
|
8 |
const formData = new FormData()
|
9 |
formData.append('data', JSON.stringify(data))
|
10 |
-
return api.post(
|
11 |
-
|
12 |
-
|
13 |
-
'Content-Type': 'multipart/form-data',
|
14 |
-
},
|
15 |
},
|
16 |
-
)
|
17 |
},
|
18 |
}
|
7 |
setData(data) {
|
8 |
const formData = new FormData()
|
9 |
formData.append('data', JSON.stringify(data))
|
10 |
+
return api.post('site-settings', formData, {
|
11 |
+
headers: {
|
12 |
+
'Content-Type': 'multipart/form-data',
|
|
|
|
|
13 |
},
|
14 |
+
})
|
15 |
},
|
16 |
}
|
redux-core/extendify-sdk/src/api/Templates.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import { Axios as api } from './axios'
|
2 |
-
import { templates as config } from '../config'
|
3 |
import { useTaxonomyStore } from '../state/Taxonomies'
|
4 |
import { useUserStore } from '../state/User'
|
5 |
|
@@ -8,9 +7,10 @@ let count = 0
|
|
8 |
export const Templates = {
|
9 |
async get(searchParams, options = {}) {
|
10 |
count++
|
|
|
11 |
const templates = await api.post('templates', {
|
12 |
filterByFormula: prepareFilterFormula(searchParams),
|
13 |
-
pageSize: options?.pageSize ??
|
14 |
categories: searchParams.taxonomies,
|
15 |
search: searchParams.search,
|
16 |
type: searchParams.type,
|
@@ -21,9 +21,7 @@ export const Templates = {
|
|
21 |
})
|
22 |
return templates
|
23 |
},
|
24 |
-
related(
|
25 |
-
template, queryType, wantedType,
|
26 |
-
) {
|
27 |
return api.post('related', {
|
28 |
pageSize: 4,
|
29 |
query_type: queryType,
|
@@ -42,16 +40,7 @@ export const Templates = {
|
|
42 |
template_id: template.id,
|
43 |
maybe_import: true,
|
44 |
type: template.fields.type,
|
45 |
-
pageSize:
|
46 |
-
template_name: template.fields?.title,
|
47 |
-
})
|
48 |
-
},
|
49 |
-
single(template) {
|
50 |
-
return api.post(`templates/${template.id}`, {
|
51 |
-
template_id: template.id,
|
52 |
-
single: true,
|
53 |
-
type: template.fields.type,
|
54 |
-
pageSize: config.templatesPerRequest,
|
55 |
template_name: template.fields?.title,
|
56 |
})
|
57 |
},
|
@@ -59,8 +48,9 @@ export const Templates = {
|
|
59 |
return api.post(`templates/${template.id}`, {
|
60 |
template_id: template.id,
|
61 |
imported: true,
|
|
|
62 |
type: template.fields.type,
|
63 |
-
pageSize:
|
64 |
template_name: template.fields?.title,
|
65 |
})
|
66 |
},
|
@@ -68,7 +58,7 @@ export const Templates = {
|
|
68 |
|
69 |
const prepareFilterFormula = (filters) => {
|
70 |
let { taxonomies, type } = filters
|
71 |
-
taxonomies = { ...
|
72 |
const formula = []
|
73 |
|
74 |
// In Airtable, we tag them as Default
|
@@ -78,9 +68,7 @@ const prepareFilterFormula = (filters) => {
|
|
78 |
|
79 |
// Builds the taxonomy list by looping over all supplied taxonomies
|
80 |
const taxFormula = Object.entries(taxonomies)
|
81 |
-
.filter(([tax, term]) => checkTermIsAvailableOnType(
|
82 |
-
tax, term, type,
|
83 |
-
))
|
84 |
.filter(([tax]) => Boolean(tax[1].length))
|
85 |
.map(([tax, term]) => `${tax} = "${term}"`)
|
86 |
.join(', ')
|
@@ -94,15 +82,19 @@ const prepareFilterFormula = (filters) => {
|
|
94 |
}
|
95 |
|
96 |
const termTypeMap = new Map()
|
97 |
-
const checkTermIsAvailableOnType = (
|
98 |
-
tax, term, type,
|
99 |
-
) => {
|
100 |
const key = `${tax}-${term}-${type}`
|
101 |
if (key === 'tax_categories-Default-pattern') {
|
102 |
return true
|
103 |
}
|
104 |
if (!termTypeMap.has(key)) {
|
105 |
-
termTypeMap.set(
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
return termTypeMap.get(key)
|
108 |
}
|
1 |
import { Axios as api } from './axios'
|
|
|
2 |
import { useTaxonomyStore } from '../state/Taxonomies'
|
3 |
import { useUserStore } from '../state/User'
|
4 |
|
7 |
export const Templates = {
|
8 |
async get(searchParams, options = {}) {
|
9 |
count++
|
10 |
+
const defaultpageSize = searchParams.type === 'pattern' ? '8' : '4'
|
11 |
const templates = await api.post('templates', {
|
12 |
filterByFormula: prepareFilterFormula(searchParams),
|
13 |
+
pageSize: options?.pageSize ?? defaultpageSize,
|
14 |
categories: searchParams.taxonomies,
|
15 |
search: searchParams.search,
|
16 |
type: searchParams.type,
|
21 |
})
|
22 |
return templates
|
23 |
},
|
24 |
+
related(template, queryType, wantedType) {
|
|
|
|
|
25 |
return api.post('related', {
|
26 |
pageSize: 4,
|
27 |
query_type: queryType,
|
40 |
template_id: template.id,
|
41 |
maybe_import: true,
|
42 |
type: template.fields.type,
|
43 |
+
pageSize: '1',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
template_name: template.fields?.title,
|
45 |
})
|
46 |
},
|
48 |
return api.post(`templates/${template.id}`, {
|
49 |
template_id: template.id,
|
50 |
imported: true,
|
51 |
+
base_pattern: template.fields?.base_pattern[0] ?? '',
|
52 |
type: template.fields.type,
|
53 |
+
pageSize: '1',
|
54 |
template_name: template.fields?.title,
|
55 |
})
|
56 |
},
|
58 |
|
59 |
const prepareFilterFormula = (filters) => {
|
60 |
let { taxonomies, type } = filters
|
61 |
+
taxonomies = { ...taxonomies }
|
62 |
const formula = []
|
63 |
|
64 |
// In Airtable, we tag them as Default
|
68 |
|
69 |
// Builds the taxonomy list by looping over all supplied taxonomies
|
70 |
const taxFormula = Object.entries(taxonomies)
|
71 |
+
.filter(([tax, term]) => checkTermIsAvailableOnType(tax, term, type))
|
|
|
|
|
72 |
.filter(([tax]) => Boolean(tax[1].length))
|
73 |
.map(([tax, term]) => `${tax} = "${term}"`)
|
74 |
.join(', ')
|
82 |
}
|
83 |
|
84 |
const termTypeMap = new Map()
|
85 |
+
const checkTermIsAvailableOnType = (tax, term, type) => {
|
|
|
|
|
86 |
const key = `${tax}-${term}-${type}`
|
87 |
if (key === 'tax_categories-Default-pattern') {
|
88 |
return true
|
89 |
}
|
90 |
if (!termTypeMap.has(key)) {
|
91 |
+
termTypeMap.set(
|
92 |
+
key,
|
93 |
+
useTaxonomyStore
|
94 |
+
.getState()
|
95 |
+
?.taxonomies[tax]?.find((item) => item?.term === term)
|
96 |
+
?.type?.includes(type),
|
97 |
+
)
|
98 |
}
|
99 |
return termTypeMap.get(key)
|
100 |
}
|
redux-core/extendify-sdk/src/api/User.js
CHANGED
@@ -15,45 +15,37 @@ export const User = {
|
|
15 |
const formData = new FormData()
|
16 |
formData.append('email', email)
|
17 |
formData.append('key', key)
|
18 |
-
return api.post(
|
19 |
-
|
20 |
-
|
21 |
-
'Content-Type': 'multipart/form-data',
|
22 |
-
},
|
23 |
},
|
24 |
-
)
|
25 |
},
|
26 |
register(email) {
|
27 |
const formData = new FormData()
|
28 |
formData.append('data', email)
|
29 |
-
return api.post(
|
30 |
-
|
31 |
-
|
32 |
-
'Content-Type': 'multipart/form-data',
|
33 |
-
},
|
34 |
},
|
35 |
-
)
|
36 |
},
|
37 |
setData(data) {
|
38 |
const formData = new FormData()
|
39 |
formData.append('data', JSON.stringify(data))
|
40 |
-
return api.post(
|
41 |
-
|
42 |
-
|
43 |
-
'Content-Type': 'multipart/form-data',
|
44 |
-
},
|
45 |
},
|
46 |
-
)
|
47 |
},
|
48 |
registerMailingList(email) {
|
49 |
const formData = new FormData()
|
50 |
formData.append('email', email)
|
51 |
-
return api.post(
|
52 |
-
|
53 |
-
|
54 |
-
'Content-Type': 'multipart/form-data',
|
55 |
-
},
|
56 |
},
|
57 |
-
)
|
58 |
},
|
59 |
}
|
15 |
const formData = new FormData()
|
16 |
formData.append('email', email)
|
17 |
formData.append('key', key)
|
18 |
+
return api.post('login', formData, {
|
19 |
+
headers: {
|
20 |
+
'Content-Type': 'multipart/form-data',
|
|
|
|
|
21 |
},
|
22 |
+
})
|
23 |
},
|
24 |
register(email) {
|
25 |
const formData = new FormData()
|
26 |
formData.append('data', email)
|
27 |
+
return api.post('register', formData, {
|
28 |
+
headers: {
|
29 |
+
'Content-Type': 'multipart/form-data',
|
|
|
|
|
30 |
},
|
31 |
+
})
|
32 |
},
|
33 |
setData(data) {
|
34 |
const formData = new FormData()
|
35 |
formData.append('data', JSON.stringify(data))
|
36 |
+
return api.post('user', formData, {
|
37 |
+
headers: {
|
38 |
+
'Content-Type': 'multipart/form-data',
|
|
|
|
|
39 |
},
|
40 |
+
})
|
41 |
},
|
42 |
registerMailingList(email) {
|
43 |
const formData = new FormData()
|
44 |
formData.append('email', email)
|
45 |
+
return api.post('register-mailing-list', formData, {
|
46 |
+
headers: {
|
47 |
+
'Content-Type': 'multipart/form-data',
|
|
|
|
|
48 |
},
|
49 |
+
})
|
50 |
},
|
51 |
}
|
redux-core/extendify-sdk/src/api/axios.js
CHANGED
@@ -27,7 +27,9 @@ function handleErrors(error) {
|
|
27 |
|
28 |
function addDefaults(request) {
|
29 |
if (request.data) {
|
30 |
-
request.data.remaining_imports = useUserStore
|
|
|
|
|
31 |
request.data.entry_point = useUserStore.getState().entryPoint
|
32 |
request.data.total_imports = useUserStore.getState().imports
|
33 |
}
|
@@ -35,26 +37,34 @@ function addDefaults(request) {
|
|
35 |
}
|
36 |
|
37 |
function checkDevMode(request) {
|
38 |
-
request.headers['X-Extendify-Dev-Mode'] =
|
39 |
-
|
|
|
|
|
40 |
return request
|
41 |
}
|
42 |
|
43 |
function checkForSoftError(response) {
|
44 |
if (Object.prototype.hasOwnProperty.call(response, 'soft_error')) {
|
45 |
-
window.dispatchEvent(
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
49 |
}
|
50 |
return response
|
51 |
}
|
52 |
|
53 |
-
Axios.interceptors.response.use(
|
54 |
-
(
|
|
|
|
|
55 |
|
56 |
// TODO: setup a pipe function instead of this nested pattern
|
57 |
-
Axios.interceptors.request.use(
|
58 |
-
(
|
|
|
|
|
59 |
|
60 |
export { Axios }
|
27 |
|
28 |
function addDefaults(request) {
|
29 |
if (request.data) {
|
30 |
+
request.data.remaining_imports = useUserStore
|
31 |
+
.getState()
|
32 |
+
.remainingImports()
|
33 |
request.data.entry_point = useUserStore.getState().entryPoint
|
34 |
request.data.total_imports = useUserStore.getState().imports
|
35 |
}
|
37 |
}
|
38 |
|
39 |
function checkDevMode(request) {
|
40 |
+
request.headers['X-Extendify-Dev-Mode'] =
|
41 |
+
window.location.search.indexOf('DEVMODE') > -1
|
42 |
+
request.headers['X-Extendify-Local-Mode'] =
|
43 |
+
window.location.search.indexOf('LOCALMODE') > -1
|
44 |
return request
|
45 |
}
|
46 |
|
47 |
function checkForSoftError(response) {
|
48 |
if (Object.prototype.hasOwnProperty.call(response, 'soft_error')) {
|
49 |
+
window.dispatchEvent(
|
50 |
+
new CustomEvent('extendify-sdk::softerror-encountered', {
|
51 |
+
detail: response.soft_error,
|
52 |
+
bubbles: true,
|
53 |
+
}),
|
54 |
+
)
|
55 |
}
|
56 |
return response
|
57 |
}
|
58 |
|
59 |
+
Axios.interceptors.response.use(
|
60 |
+
(response) => checkForSoftError(findResponse(response)),
|
61 |
+
(error) => handleErrors(error),
|
62 |
+
)
|
63 |
|
64 |
// TODO: setup a pipe function instead of this nested pattern
|
65 |
+
Axios.interceptors.request.use(
|
66 |
+
(request) => checkDevMode(addDefaults(request)),
|
67 |
+
(error) => error,
|
68 |
+
)
|
69 |
|
70 |
export { Axios }
|
redux-core/extendify-sdk/src/app.css
CHANGED
@@ -4,13 +4,15 @@
|
|
4 |
@tailwind utilities;
|
5 |
|
6 |
.extendify-sdk {
|
7 |
-
--tw-ring-inset: var(--tw-empty
|
8 |
--tw-ring-offset-width: 0px;
|
9 |
--tw-ring-offset-color: transparent;
|
10 |
--tw-ring-color: var(--wp-admin-theme-color);
|
11 |
}
|
12 |
|
13 |
-
.extendify-sdk *,
|
|
|
|
|
14 |
box-sizing: border-box;
|
15 |
border: 0 solid #e5e7eb;
|
16 |
}
|
@@ -57,19 +59,23 @@
|
|
57 |
}
|
58 |
|
59 |
/* A shim to ensure live previews w/o iframes display properly */
|
60 |
-
.block-editor-block-preview__content
|
|
|
|
|
61 |
@apply max-w-none;
|
62 |
}
|
63 |
|
64 |
/* Ensure our patterns display fullwidth on old themes + < 5.9 */
|
65 |
-
.block-editor-block-list__layout.is-root-container
|
66 |
-
|
|
|
67 |
}
|
68 |
|
69 |
.extendify-sdk .block-editor-block-preview__container {
|
70 |
/* no important */
|
71 |
@apply opacity-0;
|
72 |
-
animation: extendifyOpacityIn 200ms cubic-bezier(0.694, 0, 0.335, 1)
|
|
|
73 |
}
|
74 |
|
75 |
/* Remove excess margin for top-level patterns on < 5.9 */
|
@@ -80,19 +86,47 @@
|
|
80 |
}
|
81 |
|
82 |
/* Remove excess margin for top-level patterns on 5.9+ */
|
83 |
-
.editor-styles-wrapper:not(.block-editor-writing-flow)
|
84 |
-
|
|
|
|
|
85 |
}
|
86 |
|
87 |
@keyframes extendifyOpacityIn {
|
88 |
-
0% {
|
89 |
-
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
.extendify-sdk .with-light-shadow::after {
|
93 |
-
content:
|
94 |
@apply absolute inset-0 border-0 shadow-inner-sm;
|
95 |
}
|
96 |
.extendify-sdk .with-light-shadow:hover::after {
|
97 |
@apply shadow-inner-md;
|
98 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
@tailwind utilities;
|
5 |
|
6 |
.extendify-sdk {
|
7 |
+
--tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
|
8 |
--tw-ring-offset-width: 0px;
|
9 |
--tw-ring-offset-color: transparent;
|
10 |
--tw-ring-color: var(--wp-admin-theme-color);
|
11 |
}
|
12 |
|
13 |
+
.extendify-sdk *,
|
14 |
+
.extendify-sdk *:after,
|
15 |
+
.extendify-sdk *:before {
|
16 |
box-sizing: border-box;
|
17 |
border: 0 solid #e5e7eb;
|
18 |
}
|
59 |
}
|
60 |
|
61 |
/* A shim to ensure live previews w/o iframes display properly */
|
62 |
+
.block-editor-block-preview__content
|
63 |
+
.block-editor-block-list__layout.is-root-container
|
64 |
+
> .ext {
|
65 |
@apply max-w-none;
|
66 |
}
|
67 |
|
68 |
/* Ensure our patterns display fullwidth on old themes + < 5.9 */
|
69 |
+
.block-editor-block-list__layout.is-root-container
|
70 |
+
.ext.block-editor-block-list__block {
|
71 |
+
@apply max-w-full;
|
72 |
}
|
73 |
|
74 |
.extendify-sdk .block-editor-block-preview__container {
|
75 |
/* no important */
|
76 |
@apply opacity-0;
|
77 |
+
animation: extendifyOpacityIn 200ms cubic-bezier(0.694, 0, 0.335, 1)
|
78 |
+
forwards 0ms;
|
79 |
}
|
80 |
|
81 |
/* Remove excess margin for top-level patterns on < 5.9 */
|
86 |
}
|
87 |
|
88 |
/* Remove excess margin for top-level patterns on 5.9+ */
|
89 |
+
.editor-styles-wrapper:not(.block-editor-writing-flow)
|
90 |
+
> .is-root-container
|
91 |
+
:where(.wp-block)[data-align="full"] {
|
92 |
+
@apply my-0 !important;
|
93 |
}
|
94 |
|
95 |
@keyframes extendifyOpacityIn {
|
96 |
+
0% {
|
97 |
+
opacity: 0;
|
98 |
+
}
|
99 |
+
100% {
|
100 |
+
opacity: 1;
|
101 |
+
}
|
102 |
}
|
103 |
|
104 |
.extendify-sdk .with-light-shadow::after {
|
105 |
+
content: "";
|
106 |
@apply absolute inset-0 border-0 shadow-inner-sm;
|
107 |
}
|
108 |
.extendify-sdk .with-light-shadow:hover::after {
|
109 |
@apply shadow-inner-md;
|
110 |
}
|
111 |
+
|
112 |
+
/* Style contentType/pageType control in sidebar */
|
113 |
+
.components-panel__body.ext-type-control .components-panel__body-toggle {
|
114 |
+
@apply pl-0 pr-0;
|
115 |
+
}
|
116 |
+
|
117 |
+
.components-panel__body.ext-type-control .components-panel__body-title {
|
118 |
+
@apply m-0 border-b-0;
|
119 |
+
}
|
120 |
+
|
121 |
+
.components-panel__body.ext-type-control
|
122 |
+
.components-panel__body-title
|
123 |
+
.components-button {
|
124 |
+
@apply m-0 border-b-0 text-extendify-gray py-2 uppercase font-medium;
|
125 |
+
font-size: 11px; /* To match exactly from core UI */
|
126 |
+
}
|
127 |
+
|
128 |
+
.components-panel__body.ext-type-control
|
129 |
+
.components-button
|
130 |
+
.components-panel__arrow {
|
131 |
+
@apply right-0 text-extendify-gray;
|
132 |
+
}
|
redux-core/extendify-sdk/src/app.js
CHANGED
@@ -6,27 +6,39 @@ import { rawHandler } from '@wordpress/blocks'
|
|
6 |
import './buttons'
|
7 |
import './listeners'
|
8 |
|
9 |
-
window._wpLoadBlockEditor &&
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
31 |
})
|
32 |
-
})
|
6 |
import './buttons'
|
7 |
import './listeners'
|
8 |
|
9 |
+
window._wpLoadBlockEditor &&
|
10 |
+
window.wp.domReady(() => {
|
11 |
+
// Insert into the editor (note: Modal opens in a portal)
|
12 |
+
const extendify = Object.assign(document.createElement('div'), {
|
13 |
+
id: 'extendify-root',
|
14 |
+
})
|
15 |
+
document.body.append(extendify)
|
16 |
+
render(<ExtendifyLibrary />, extendify)
|
17 |
|
18 |
+
// Add an extra div to use for utility modals, etc
|
19 |
+
extendify.parentNode.insertBefore(
|
20 |
+
Object.assign(document.createElement('div'), {
|
21 |
+
id: 'extendify-util',
|
22 |
+
}),
|
23 |
+
extendify.nextSibling,
|
24 |
+
)
|
25 |
|
26 |
+
// Insert a template on page load if it exists in localstorage
|
27 |
+
// Note 6/28/21 - this was moved to after the render to possibly
|
28 |
+
// fix a bug where imports would go from 3->0.
|
29 |
+
if (useWantedTemplateStore.getState().importOnLoad) {
|
30 |
+
const template = useWantedTemplateStore.getState().wantedTemplate
|
31 |
+
setTimeout(() => {
|
32 |
+
injectTemplateBlocks(
|
33 |
+
rawHandler({ HTML: template.fields.code }),
|
34 |
+
template,
|
35 |
+
)
|
36 |
+
}, 0)
|
37 |
+
}
|
38 |
|
39 |
+
// Reset template state after checking if we need an import
|
40 |
+
useWantedTemplateStore.setState({
|
41 |
+
importOnLoad: false,
|
42 |
+
wantedTemplate: {},
|
43 |
+
})
|
44 |
})
|
|
redux-core/extendify-sdk/src/buttons.js
CHANGED
@@ -8,98 +8,129 @@ import { brandMark } from './components/icons/'
|
|
8 |
import LibraryAccessModal from './components/LibraryAccessModal'
|
9 |
|
10 |
const openLibrary = (event) => {
|
11 |
-
openModal(
|
|
|
|
|
|
|
12 |
}
|
13 |
|
14 |
// This returns true if the user object is null (Library never opened), or if it's enabled in the user settings
|
15 |
-
const isAdmin = () =>
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
const mainButton =
|
20 |
-
<
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
icon={
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
</div>
|
33 |
|
34 |
// Add the MAIN button when Gutenberg is available and ready
|
35 |
-
window._wpLoadBlockEditor
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
})
|
|
|
|
|
57 |
|
58 |
// The CTA button inside patterns
|
59 |
-
window._wpLoadBlockEditor
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
// This will add a button to enable or disable the library button
|
86 |
const LibraryEnableDisable = () => {
|
87 |
-
|
88 |
-
function setOpenSiteSettingsModal(){
|
89 |
const util = document.getElementById('extendify-util')
|
90 |
-
render(<LibraryAccessModal/>, util)
|
91 |
}
|
92 |
|
93 |
-
return
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
100 |
}
|
101 |
|
102 |
// Load this button always, which is used to enable or disable
|
103 |
-
window._wpLoadBlockEditor &&
|
104 |
-
|
105 |
-
|
|
8 |
import LibraryAccessModal from './components/LibraryAccessModal'
|
9 |
|
10 |
const openLibrary = (event) => {
|
11 |
+
openModal(
|
12 |
+
event.target.closest('[data-extendify-identifier]')?.dataset
|
13 |
+
?.extendifyIdentifier,
|
14 |
+
)
|
15 |
}
|
16 |
|
17 |
// This returns true if the user object is null (Library never opened), or if it's enabled in the user settings
|
18 |
+
const isAdmin = () =>
|
19 |
+
window.extendifySdkData.user === null ||
|
20 |
+
window.extendifySdkData?.user?.state?.isAdmin
|
21 |
+
const isGlobalLibraryEnabled = () =>
|
22 |
+
window.extendifySdkData.sitesettings === null ||
|
23 |
+
window.extendifySdkData?.sitesettings?.state?.enabled
|
24 |
+
const isLibraryEnabled = () =>
|
25 |
+
window.extendifySdkData.user === null
|
26 |
+
? isGlobalLibraryEnabled()
|
27 |
+
: window.extendifySdkData?.user?.state?.enabled
|
28 |
|
29 |
+
const mainButton = (
|
30 |
+
<div id="extendify-templates-inserter" className="extendify-sdk">
|
31 |
+
<button
|
32 |
+
style="background:#D9F1EE;color:#1e1e1e;border:1px solid #949494 !important;font-weight:bold;font-size:14px;padding:8px;margin-right:8px"
|
33 |
+
type="button"
|
34 |
+
data-extendify-identifier="main-button"
|
35 |
+
id="extendify-templates-inserter-btn"
|
36 |
+
className="components-button">
|
37 |
+
<Icon icon={brandMark} size={24} className="-ml-1 mr-1" />
|
38 |
+
{__('Library', 'extendify-sdk')}
|
39 |
+
</button>
|
40 |
+
</div>
|
41 |
+
)
|
|
|
42 |
|
43 |
// Add the MAIN button when Gutenberg is available and ready
|
44 |
+
if (window._wpLoadBlockEditor) {
|
45 |
+
const finish = window.wp.data.subscribe(() => {
|
46 |
+
requestAnimationFrame(() => {
|
47 |
+
if (!isGlobalLibraryEnabled() && !isAdmin()) {
|
48 |
+
return
|
49 |
+
}
|
50 |
|
51 |
+
// Redundant extra check added because of a bug where the above check wasn't working
|
52 |
+
if (document.getElementById('extendify-templates-inserter-btn')) {
|
53 |
+
return
|
54 |
+
}
|
55 |
+
if (!document.querySelector('.edit-post-header-toolbar')) {
|
56 |
+
return
|
57 |
+
}
|
58 |
+
document
|
59 |
+
.querySelector('.edit-post-header-toolbar')
|
60 |
+
.insertAdjacentHTML('beforeend', renderToString(mainButton))
|
61 |
+
document
|
62 |
+
.getElementById('extendify-templates-inserter-btn')
|
63 |
+
.addEventListener('click', openLibrary)
|
64 |
+
if (!isLibraryEnabled()) {
|
65 |
+
document
|
66 |
+
.getElementById('extendify-templates-inserter-btn')
|
67 |
+
.classList.add('invisible')
|
68 |
+
}
|
69 |
+
finish()
|
70 |
+
})
|
71 |
+
})
|
72 |
+
}
|
73 |
|
74 |
// The CTA button inside patterns
|
75 |
+
if (window._wpLoadBlockEditor) {
|
76 |
+
const finish = window.wp.data.subscribe(() => {
|
77 |
+
requestAnimationFrame(() => {
|
78 |
+
// Redundant extra check added because of a bug where the above check wasn't working
|
79 |
+
if (!isGlobalLibraryEnabled() && !isAdmin()) {
|
80 |
+
return
|
81 |
+
}
|
82 |
+
if (!document.querySelector('[id$=patterns-view]')) {
|
83 |
+
return
|
84 |
+
}
|
85 |
+
if (document.getElementById('extendify-cta-button')) {
|
86 |
+
return
|
87 |
+
}
|
88 |
+
const ctaButton = (
|
89 |
+
<div>
|
90 |
+
<button
|
91 |
+
id="extendify-cta-button"
|
92 |
+
style="margin:1rem 1rem 0"
|
93 |
+
data-extendify-identifier="patterns-cta"
|
94 |
+
className="components-button is-secondary">
|
95 |
+
{__(
|
96 |
+
'Discover more patterns in Extendify Library',
|
97 |
+
'extendify-sdk',
|
98 |
+
)}
|
99 |
+
</button>
|
100 |
+
</div>
|
101 |
+
)
|
102 |
+
document
|
103 |
+
.querySelector('[id$=patterns-view]')
|
104 |
+
.insertAdjacentHTML('afterbegin', renderToString(ctaButton))
|
105 |
+
document
|
106 |
+
.getElementById('extendify-cta-button')
|
107 |
+
.addEventListener('click', openLibrary)
|
108 |
+
finish()
|
109 |
+
})
|
110 |
+
})
|
111 |
+
}
|
112 |
|
113 |
// This will add a button to enable or disable the library button
|
114 |
const LibraryEnableDisable = () => {
|
115 |
+
function setOpenSiteSettingsModal() {
|
|
|
116 |
const util = document.getElementById('extendify-util')
|
117 |
+
render(<LibraryAccessModal />, util)
|
118 |
}
|
119 |
|
120 |
+
return (
|
121 |
+
<>
|
122 |
+
<PluginSidebarMoreMenuItem
|
123 |
+
onClick={setOpenSiteSettingsModal}
|
124 |
+
icon={<Icon icon={brandMark} size={24} />}>
|
125 |
+
{' '}
|
126 |
+
{__('Extendify', 'extendify-sdk')}
|
127 |
+
</PluginSidebarMoreMenuItem>
|
128 |
+
</>
|
129 |
+
)
|
130 |
}
|
131 |
|
132 |
// Load this button always, which is used to enable or disable
|
133 |
+
window._wpLoadBlockEditor &&
|
134 |
+
registerPlugin('extendify-settings-enable-disable', {
|
135 |
+
render: LibraryEnableDisable,
|
136 |
+
})
|
redux-core/extendify-sdk/src/components/FooterNotice.js
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { __ } from '@wordpress/i18n'
|
2 |
+
import { Icon, closeSmall } from '@wordpress/icons'
|
3 |
+
import { Button } from '@wordpress/components'
|
4 |
+
import WelcomeNotice from './notices/WelcomeNotice'
|
5 |
+
import PromotionNotice from './notices/PromotionNotice'
|
6 |
+
import { useUserStore } from '../state/User'
|
7 |
+
import { useGlobalStore } from '../state/GlobalState'
|
8 |
+
import { useState, useEffect, useRef } from '@wordpress/element'
|
9 |
+
|
10 |
+
const NoticesByPriority = {
|
11 |
+
welcome: WelcomeNotice,
|
12 |
+
promotion: PromotionNotice,
|
13 |
+
}
|
14 |
+
|
15 |
+
export default function FooterNotice() {
|
16 |
+
const [hasNotice, setHasNotice] = useState(null)
|
17 |
+
const once = useRef(false)
|
18 |
+
const promotionData = useGlobalStore(
|
19 |
+
(state) => state.metaData?.banners?.footer,
|
20 |
+
)
|
21 |
+
|
22 |
+
// Find the first notice key to use
|
23 |
+
const componentKey =
|
24 |
+
Object.keys(NoticesByPriority).find((key) => {
|
25 |
+
if (key === 'promotion') {
|
26 |
+
return (
|
27 |
+
// When checking promotions, use the key sent from the server
|
28 |
+
// to check whether it's been dismissed
|
29 |
+
promotionData?.key &&
|
30 |
+
!useUserStore.getState().noticesDismissedAt[
|
31 |
+
promotionData.key
|
32 |
+
]
|
33 |
+
)
|
34 |
+
}
|
35 |
+
return !useUserStore.getState().noticesDismissedAt[key]
|
36 |
+
}) ?? null
|
37 |
+
const Notice = NoticesByPriority[componentKey]
|
38 |
+
|
39 |
+
const dismiss = () => {
|
40 |
+
setHasNotice(false)
|
41 |
+
// The noticesDismissedAt key will either be the welcome notice,
|
42 |
+
// or a key passed in from the server, such as 'holiday-sale2077'
|
43 |
+
const key =
|
44 |
+
componentKey === 'promotion' ? promotionData.key : componentKey
|
45 |
+
useUserStore.setState({
|
46 |
+
noticesDismissedAt: Object.assign(
|
47 |
+
{},
|
48 |
+
{
|
49 |
+
...useUserStore.getState().noticesDismissedAt,
|
50 |
+
[key]: new Date().toISOString(),
|
51 |
+
},
|
52 |
+
),
|
53 |
+
})
|
54 |
+
}
|
55 |
+
|
56 |
+
useEffect(() => {
|
57 |
+
// Only show the notice once on main render and only if a notice exists.
|
58 |
+
if (NoticesByPriority[componentKey] && !once.current) {
|
59 |
+
setHasNotice(true)
|
60 |
+
once.current = true
|
61 |
+
}
|
62 |
+
}, [componentKey])
|
63 |
+
|
64 |
+
if (!hasNotice) {
|
65 |
+
return null
|
66 |
+
}
|
67 |
+
return (
|
68 |
+
<div className="bg-extendify-secondary hidden lg:flex space-x-4 py-3 px-5 justify-center items-center relative max-w-screen-4xl mx-auto">
|
69 |
+
{/* Pass all data to all components and let them decide what they use */}
|
70 |
+
<Notice promotionData={promotionData} />
|
71 |
+
<div className="absolute right-1">
|
72 |
+
<Button
|
73 |
+
className="opacity-50 hover:opacity-100 focus:opacity-100 text-extendify-black"
|
74 |
+
icon={<Icon icon={closeSmall} />}
|
75 |
+
label={__('Dismiss this notice', 'extendify-sdk')}
|
76 |
+
onClick={dismiss}
|
77 |
+
showTooltip={false}
|
78 |
+
/>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
)
|
82 |
+
}
|
redux-core/extendify-sdk/src/components/ImportButton.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
import {
|
2 |
-
useEffect, useState, useRef,
|
3 |
-
} from '@wordpress/element'
|
4 |
-
import { useTemplatesStore } from '../state/Templates'
|
5 |
-
import { AuthorizationCheck, Middleware } from '../middleware'
|
6 |
-
import { injectTemplateBlocks } from '../util/templateInjection'
|
7 |
-
import { useWantedTemplateStore } from '../state/Importing'
|
8 |
-
import { useUserStore } from '../state/User'
|
9 |
-
import { useGlobalStore } from '../state/GlobalState'
|
10 |
-
import { __, sprintf } from '@wordpress/i18n'
|
11 |
-
import { Templates as TemplatesApi } from '../api/Templates'
|
12 |
-
import { render } from '@wordpress/element'
|
13 |
-
import ExtendifyLibrary from '../ExtendifyLibrary'
|
14 |
-
|
15 |
-
const canImportMiddleware = Middleware(['NeedsRegistrationModal', 'hasRequiredPlugins', 'hasPluginsActivated'])
|
16 |
-
export function ImportButton({ template }) {
|
17 |
-
const importButtonRef = useRef(null)
|
18 |
-
const activeTemplateBlocks = useTemplatesStore(state => state.activeTemplateBlocks)
|
19 |
-
const canImport = useUserStore(state => state.canImport)
|
20 |
-
const apiKey = useUserStore(state => state.apiKey)
|
21 |
-
const setOpen = useGlobalStore(state => state.setOpen)
|
22 |
-
const [importing, setImporting] = useState(false)
|
23 |
-
const [middlewareChecked, setMiddlewareChecked] = useState(false)
|
24 |
-
const setWanted = useWantedTemplateStore(state => state.setWanted)
|
25 |
-
const importTemplates = () => {
|
26 |
-
AuthorizationCheck(canImportMiddleware.stack).then(() => {
|
27 |
-
// Give it a bit of time for the importing state to render
|
28 |
-
setTimeout(() => {
|
29 |
-
injectTemplateBlocks(activeTemplateBlocks, template)
|
30 |
-
.then(() => setOpen(false))
|
31 |
-
.then(() => render(<ExtendifyLibrary/>, document.getElementById('extendify-root')))
|
32 |
-
.then(() => setTimeout(() => useGlobalStore.setState({ currentPage: 'main' }), 500))
|
33 |
-
}, 100)
|
34 |
-
})
|
35 |
-
}
|
36 |
-
|
37 |
-
useEffect(() => {
|
38 |
-
canImportMiddleware.check(template).then(() => setMiddlewareChecked(true))
|
39 |
-
return () => canImportMiddleware.reset() && setMiddlewareChecked(false)
|
40 |
-
}, [template])
|
41 |
-
|
42 |
-
useEffect(() => {
|
43 |
-
if (!importing && importButtonRef.current) {
|
44 |
-
importButtonRef.current.focus()
|
45 |
-
}
|
46 |
-
}, [importButtonRef, importing, middlewareChecked])
|
47 |
-
|
48 |
-
const importTemplate = () => {
|
49 |
-
// This was added here to make the call fire before rendering is finished.
|
50 |
-
// This is because some users would drop this call otherwise.
|
51 |
-
TemplatesApi.maybeImport(template)
|
52 |
-
setImporting(true)
|
53 |
-
setWanted(template)
|
54 |
-
importTemplates()
|
55 |
-
}
|
56 |
-
|
57 |
-
if (!middlewareChecked || !Object.keys(activeTemplateBlocks).length) {
|
58 |
-
return ''
|
59 |
-
}
|
60 |
-
|
61 |
-
if (!apiKey && !canImport()) {
|
62 |
-
return <a
|
63 |
-
ref={importButtonRef}
|
64 |
-
className="button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5"
|
65 |
-
target="_blank"
|
66 |
-
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sign_up&utm_content=single_page`}
|
67 |
-
rel="noreferrer">
|
68 |
-
{__('Sign up now', 'extendify-sdk')}
|
69 |
-
</a>
|
70 |
-
}
|
71 |
-
|
72 |
-
if (importing) {
|
73 |
-
return <button
|
74 |
-
type="button"
|
75 |
-
disabled
|
76 |
-
className="components-button is-secondary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5"
|
77 |
-
onClick={() => {}}>
|
78 |
-
{__('Importing...', 'extendify-sdk')}
|
79 |
-
</button>
|
80 |
-
}
|
81 |
-
|
82 |
-
return <button
|
83 |
-
ref={importButtonRef}
|
84 |
-
type="button"
|
85 |
-
className="components-button is-primary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5"
|
86 |
-
onClick={() => importTemplate()}>
|
87 |
-
{sprintf(__('Add %s', 'extendify-sdk'), template.fields.type)}
|
88 |
-
</button>
|
89 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/components/ImportCounter.js
CHANGED
@@ -17,29 +17,41 @@ import { download } from './icons/'
|
|
17 |
import { useUserStore } from '../state/User'
|
18 |
|
19 |
function ImportCounter() {
|
20 |
-
const remainingImports = useUserStore(state => state.remainingImports)
|
21 |
-
const allowedImports = useUserStore(state => state.allowedImports)
|
22 |
const status = remainingImports() > 0 ? 'has-imports' : 'no-imports'
|
23 |
-
const backgroundColor =
|
|
|
|
|
|
|
24 |
const icon = status === 'has-imports' ? download : alert
|
25 |
|
26 |
-
return
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
</span>
|
38 |
-
</
|
39 |
-
|
40 |
-
{ __('Upgrade', 'extendify-sdk') }
|
41 |
-
</span>
|
42 |
-
</a>
|
43 |
}
|
44 |
|
45 |
export default ImportCounter
|
17 |
import { useUserStore } from '../state/User'
|
18 |
|
19 |
function ImportCounter() {
|
20 |
+
const remainingImports = useUserStore((state) => state.remainingImports)
|
21 |
+
const allowedImports = useUserStore((state) => state.allowedImports)
|
22 |
const status = remainingImports() > 0 ? 'has-imports' : 'no-imports'
|
23 |
+
const backgroundColor =
|
24 |
+
status === 'has-imports'
|
25 |
+
? 'bg-extendify-main hover:bg-extendify-main-dark'
|
26 |
+
: 'bg-extendify-alert'
|
27 |
const icon = status === 'has-imports' ? download : alert
|
28 |
|
29 |
+
return (
|
30 |
+
<a
|
31 |
+
target="_blank"
|
32 |
+
rel="noreferrer"
|
33 |
+
className={classnames(
|
34 |
+
backgroundColor,
|
35 |
+
'flex w-full no-underline button-focus -mt-10 text-sm justify-between py-3 px-4 text-white rounded',
|
36 |
+
)}
|
37 |
+
href={`https://www.extendify.com/pricing/?utm_source=${encodeURIComponent(
|
38 |
+
window.extendifySdkData.sdk_partner,
|
39 |
+
)}&utm_medium=library&utm_campaign=import-counter&utm_content=upgrade&utm_term=${status}`}>
|
40 |
+
<div className="flex items-center space-x-2 no-underline">
|
41 |
+
<Icon icon={icon} size={14} />
|
42 |
+
<span>
|
43 |
+
{sprintf(
|
44 |
+
__('%s/%s Imports', 'extendify-sdk'),
|
45 |
+
remainingImports(),
|
46 |
+
Number(allowedImports),
|
47 |
+
)}
|
48 |
+
</span>
|
49 |
+
</div>
|
50 |
+
<span className="text-white no-underline font-medium outline-none">
|
51 |
+
{__('Upgrade', 'extendify-sdk')}
|
52 |
</span>
|
53 |
+
</a>
|
54 |
+
)
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
export default ImportCounter
|
redux-core/extendify-sdk/src/components/ImportTemplateBlock.js
CHANGED
@@ -1,9 +1,6 @@
|
|
1 |
-
import {
|
2 |
-
useEffect, useState, useRef,memo,
|
3 |
-
} from '@wordpress/element'
|
4 |
import { AuthorizationCheck, Middleware } from '../middleware'
|
5 |
import { injectTemplateBlocks } from '../util/templateInjection'
|
6 |
-
import { useWantedTemplateStore } from '../state/Importing'
|
7 |
import { useUserStore } from '../state/User'
|
8 |
import { useGlobalStore } from '../state/GlobalState'
|
9 |
import { __, sprintf } from '@wordpress/i18n'
|
@@ -15,23 +12,33 @@ import { render } from '@wordpress/element'
|
|
15 |
import ExtendifyLibrary from '../ExtendifyLibrary'
|
16 |
import Primary from './buttons/Primary'
|
17 |
import SplitModal from './modals/SplitModal'
|
|
|
18 |
|
19 |
-
const LiveBlocksMemoized = memo(
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
}
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
export function ImportTemplateBlock({ template }) {
|
30 |
const importButtonRef = useRef(null)
|
31 |
const once = useRef(false)
|
32 |
-
const canImport = useUserStore(state => state.canImport)
|
33 |
-
const
|
34 |
-
const setOpen = useGlobalStore(state => state.setOpen)
|
35 |
const blocks = rawHandler({ HTML: template.fields.code })
|
36 |
const [hasBeenSeen, setHasBeenSeen] = useState(false)
|
37 |
const [onlyLoadInView, inView] = useInView()
|
@@ -40,8 +47,11 @@ export function ImportTemplateBlock({ template }) {
|
|
40 |
const focusTrapInnerBlocks = () => {
|
41 |
if (once.current) return
|
42 |
once.current = true
|
43 |
-
Array.from(
|
44 |
-
.
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
const importTemplates = async () => {
|
@@ -50,8 +60,13 @@ export function ImportTemplateBlock({ template }) {
|
|
50 |
setTimeout(() => {
|
51 |
injectTemplateBlocks(blocks, template)
|
52 |
.then(() => setOpen(false))
|
53 |
-
.then(() =>
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
55 |
}, 100)
|
56 |
})
|
57 |
}
|
@@ -65,13 +80,11 @@ export function ImportTemplateBlock({ template }) {
|
|
65 |
}
|
66 |
|
67 |
const importTemplate = () => {
|
68 |
-
if(!canImport()) {
|
69 |
setShowModal(true)
|
70 |
return
|
71 |
}
|
72 |
TemplatesApi.maybeImport(template)
|
73 |
-
// TODO: Is this needed? Check when removing all single page views
|
74 |
-
setWanted(template)
|
75 |
importTemplates()
|
76 |
}
|
77 |
|
@@ -81,76 +94,204 @@ export function ImportTemplateBlock({ template }) {
|
|
81 |
}
|
82 |
}, [inView, hasBeenSeen, template])
|
83 |
|
84 |
-
return
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
<
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
<
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
1 |
+
import { useEffect, useState, useRef, memo } from '@wordpress/element'
|
|
|
|
|
2 |
import { AuthorizationCheck, Middleware } from '../middleware'
|
3 |
import { injectTemplateBlocks } from '../util/templateInjection'
|
|
|
4 |
import { useUserStore } from '../state/User'
|
5 |
import { useGlobalStore } from '../state/GlobalState'
|
6 |
import { __, sprintf } from '@wordpress/i18n'
|
12 |
import ExtendifyLibrary from '../ExtendifyLibrary'
|
13 |
import Primary from './buttons/Primary'
|
14 |
import SplitModal from './modals/SplitModal'
|
15 |
+
import { brandLogo } from '../components/icons/'
|
16 |
|
17 |
+
const LiveBlocksMemoized = memo(
|
18 |
+
({ blocks }) => {
|
19 |
+
return (
|
20 |
+
<div className="with-light-shadow relative">
|
21 |
+
<BlockPreview
|
22 |
+
blocks={blocks}
|
23 |
+
live={false}
|
24 |
+
viewportWidth={1400}
|
25 |
+
/>
|
26 |
+
</div>
|
27 |
+
)
|
28 |
+
},
|
29 |
+
(oldBlocks, newBlocks) => oldBlocks.clientId == newBlocks.clientId,
|
30 |
+
)
|
31 |
+
const canImportMiddleware = Middleware([
|
32 |
+
'NeedsRegistrationModal',
|
33 |
+
'hasRequiredPlugins',
|
34 |
+
'hasPluginsActivated',
|
35 |
+
])
|
36 |
|
37 |
export function ImportTemplateBlock({ template }) {
|
38 |
const importButtonRef = useRef(null)
|
39 |
const once = useRef(false)
|
40 |
+
const canImport = useUserStore((state) => state.canImport)
|
41 |
+
const setOpen = useGlobalStore((state) => state.setOpen)
|
|
|
42 |
const blocks = rawHandler({ HTML: template.fields.code })
|
43 |
const [hasBeenSeen, setHasBeenSeen] = useState(false)
|
44 |
const [onlyLoadInView, inView] = useInView()
|
47 |
const focusTrapInnerBlocks = () => {
|
48 |
if (once.current) return
|
49 |
once.current = true
|
50 |
+
Array.from(
|
51 |
+
importButtonRef.current.querySelectorAll(
|
52 |
+
'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])',
|
53 |
+
),
|
54 |
+
).forEach((el) => el.setAttribute('tabIndex', '-1'))
|
55 |
}
|
56 |
|
57 |
const importTemplates = async () => {
|
60 |
setTimeout(() => {
|
61 |
injectTemplateBlocks(blocks, template)
|
62 |
.then(() => setOpen(false))
|
63 |
+
.then(() =>
|
64 |
+
render(
|
65 |
+
<ExtendifyLibrary />,
|
66 |
+
document.getElementById('extendify-root'),
|
67 |
+
),
|
68 |
+
)
|
69 |
+
.then(() => canImportMiddleware.reset())
|
70 |
}, 100)
|
71 |
})
|
72 |
}
|
80 |
}
|
81 |
|
82 |
const importTemplate = () => {
|
83 |
+
if (!canImport()) {
|
84 |
setShowModal(true)
|
85 |
return
|
86 |
}
|
87 |
TemplatesApi.maybeImport(template)
|
|
|
|
|
88 |
importTemplates()
|
89 |
}
|
90 |
|
94 |
}
|
95 |
}, [inView, hasBeenSeen, template])
|
96 |
|
97 |
+
return (
|
98 |
+
<>
|
99 |
+
<div
|
100 |
+
role="button"
|
101 |
+
tabIndex="0"
|
102 |
+
ref={importButtonRef}
|
103 |
+
aria-label={sprintf(
|
104 |
+
__('Press to import %s', 'extendify-sdk'),
|
105 |
+
template?.fields?.type,
|
106 |
+
)}
|
107 |
+
className="mb-8 cursor-pointer button-focus"
|
108 |
+
onFocus={focusTrapInnerBlocks}
|
109 |
+
onClick={importTemplate}
|
110 |
+
onKeyDown={handleKeyDown}>
|
111 |
+
<div
|
112 |
+
ref={onlyLoadInView}
|
113 |
+
className="invisible absolute inset-0 pointer-events-none"></div>
|
114 |
+
{hasBeenSeen && <LiveBlocksMemoized blocks={blocks} />}
|
115 |
+
</div>
|
116 |
+
{showModal && (
|
117 |
+
<SplitModal
|
118 |
+
isOpen={showModal}
|
119 |
+
onRequestClose={() => setShowModal(false)}
|
120 |
+
left={
|
121 |
+
<>
|
122 |
+
<div className="flex space-x-2 items-center justify-center mb-10 text-extendify-black">
|
123 |
+
{brandLogo}
|
124 |
+
</div>
|
125 |
|
126 |
+
<h3 className="text-xl md:leading-3">
|
127 |
+
{__("You're out of imports", 'extendify-sdk')}
|
128 |
+
</h3>
|
129 |
+
<p className="text-sm text-black">
|
130 |
+
{__(
|
131 |
+
'Sign up today and get unlimited access to our entire collection of patterns and page layouts.',
|
132 |
+
'extendify-sdk',
|
133 |
+
)}
|
134 |
+
</p>
|
135 |
+
<div>
|
136 |
+
<Primary
|
137 |
+
tagName="a"
|
138 |
+
target="_blank"
|
139 |
+
className="m-auto mt-10"
|
140 |
+
href={`https://extendify.com/pricing/?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=no-imports-modal&utm_content=get-unlimited-imports`}
|
141 |
+
rel="noreferrer">
|
142 |
+
{__(
|
143 |
+
'Get Unlimited Imports',
|
144 |
+
'extendify-sdk',
|
145 |
+
)}
|
146 |
+
<svg
|
147 |
+
fill="none"
|
148 |
+
height="24"
|
149 |
+
viewBox="0 0 25 24"
|
150 |
+
width="25"
|
151 |
+
xmlns="http://www.w3.org/2000/svg">
|
152 |
+
<path
|
153 |
+
d="m10.3949 8.7864 5.5476-.02507m0 0-.0476 5.52507m.0476-5.52507c-2.357 2.35707-5.4183 5.41827-7.68101 7.68097"
|
154 |
+
stroke="currentColor"
|
155 |
+
strokeWidth="1.5"
|
156 |
+
/>
|
157 |
+
</svg>
|
158 |
+
</Primary>
|
159 |
+
</div>
|
160 |
+
</>
|
161 |
+
}
|
162 |
+
right={
|
163 |
+
<div className="space-y-2">
|
164 |
+
<div className="flex items-center space-x-2">
|
165 |
+
<svg
|
166 |
+
width="24"
|
167 |
+
height="24"
|
168 |
+
viewBox="0 0 24 24"
|
169 |
+
fill="none"
|
170 |
+
xmlns="http://www.w3.org/2000/svg">
|
171 |
+
<path
|
172 |
+
fillRule="evenodd"
|
173 |
+
clipRule="evenodd"
|
174 |
+
d="M7.49271 18.0092C6.97815 17.1176 7.28413 15.9755 8.17569 15.4609C9.06724 14.946 10.2094 15.252 10.7243 16.1435C11.2389 17.0355 10.9329 18.1772 10.0413 18.6922C9.14978 19.2071 8.00764 18.9011 7.49271 18.0092V18.0092Z"
|
175 |
+
fill="currentColor"
|
176 |
+
/>
|
177 |
+
<path
|
178 |
+
fillRule="evenodd"
|
179 |
+
clipRule="evenodd"
|
180 |
+
d="M16.5073 6.12747C17.0218 7.01903 16.7158 8.16117 15.8243 8.67573C14.9327 9.19066 13.7906 8.88467 13.2757 7.99312C12.7611 7.10119 13.0671 5.95942 13.9586 5.44449C14.8502 4.92956 15.9923 5.23555 16.5073 6.12747V6.12747Z"
|
181 |
+
fill="currentColor"
|
182 |
+
/>
|
183 |
+
<path
|
184 |
+
fillRule="evenodd"
|
185 |
+
clipRule="evenodd"
|
186 |
+
d="M4.60135 11.1355C5.11628 10.2439 6.25805 9.93793 7.14998 10.4525C8.04153 10.9674 8.34752 12.1096 7.83296 13.0011C7.31803 13.8927 6.17588 14.1987 5.28433 13.6841C4.39278 13.1692 4.08679 12.0274 4.60135 11.1355V11.1355Z"
|
187 |
+
fill="currentColor"
|
188 |
+
/>
|
189 |
+
<path
|
190 |
+
fillRule="evenodd"
|
191 |
+
clipRule="evenodd"
|
192 |
+
d="M19.3986 13.0011C18.8837 13.8927 17.7419 14.1987 16.85 13.6841C15.9584 13.1692 15.6525 12.027 16.167 11.1355C16.682 10.2439 17.8241 9.93793 18.7157 10.4525C19.6072 10.9674 19.9132 12.1092 19.3986 13.0011V13.0011Z"
|
193 |
+
fill="currentColor"
|
194 |
+
/>
|
195 |
+
<path
|
196 |
+
d="M9.10857 8.92594C10.1389 8.92594 10.9742 8.09066 10.9742 7.06029C10.9742 6.02992 10.1389 5.19464 9.10857 5.19464C8.0782 5.19464 7.24292 6.02992 7.24292 7.06029C7.24292 8.09066 8.0782 8.92594 9.10857 8.92594Z"
|
197 |
+
fill="currentColor"
|
198 |
+
/>
|
199 |
+
<path
|
200 |
+
d="M14.8913 18.942C15.9217 18.942 16.7569 18.1067 16.7569 17.0763C16.7569 16.046 15.9217 15.2107 14.8913 15.2107C13.8609 15.2107 13.0256 16.046 13.0256 17.0763C13.0256 18.1067 13.8609 18.942 14.8913 18.942Z"
|
201 |
+
fill="currentColor"
|
202 |
+
/>
|
203 |
+
<path
|
204 |
+
fillRule="evenodd"
|
205 |
+
clipRule="evenodd"
|
206 |
+
d="M10.3841 13.0011C9.86951 12.1096 10.1755 10.9674 11.067 10.4525C11.9586 9.93793 13.1007 10.2439 13.6157 11.1355C14.1302 12.0274 13.8242 13.1692 12.9327 13.6841C12.0411 14.1987 10.899 13.8927 10.3841 13.0011V13.0011Z"
|
207 |
+
fill="currentColor"
|
208 |
+
/>
|
209 |
+
</svg>
|
210 |
+
<span className="text-sm leading-none">
|
211 |
+
{__(
|
212 |
+
"Access to 100's of Patterns",
|
213 |
+
'extendify-sdk',
|
214 |
+
)}
|
215 |
+
</span>
|
216 |
+
</div>
|
217 |
+
<div className="flex items-center space-x-2">
|
218 |
+
<svg
|
219 |
+
fill="none"
|
220 |
+
height="24"
|
221 |
+
viewBox="0 0 24 24"
|
222 |
+
width="24"
|
223 |
+
xmlns="http://www.w3.org/2000/svg">
|
224 |
+
<g stroke="currentColor" strokeWidth="1.5">
|
225 |
+
<path d="m6 4.75h12c.6904 0 1.25.55964 1.25 1.25v12c0 .6904-.5596 1.25-1.25 1.25h-12c-.69036 0-1.25-.5596-1.25-1.25v-12c0-.69036.55964-1.25 1.25-1.25z" />
|
226 |
+
<path d="m9.25 19v-14" />
|
227 |
+
</g>
|
228 |
+
</svg>
|
229 |
+
<span className="text-sm leading-none">
|
230 |
+
{__(
|
231 |
+
'Beautiful full page layouts',
|
232 |
+
'extendify-sdk',
|
233 |
+
)}
|
234 |
+
</span>
|
235 |
+
</div>
|
236 |
+
<div className="flex items-center space-x-2">
|
237 |
+
<svg
|
238 |
+
width="24"
|
239 |
+
height="24"
|
240 |
+
viewBox="0 0 24 24"
|
241 |
+
fill="none"
|
242 |
+
xmlns="http://www.w3.org/2000/svg">
|
243 |
+
<circle
|
244 |
+
cx="12"
|
245 |
+
cy="12"
|
246 |
+
r="7.25"
|
247 |
+
stroke="currentColor"
|
248 |
+
strokeWidth="1.5"
|
249 |
+
/>
|
250 |
+
<circle
|
251 |
+
cx="12"
|
252 |
+
cy="12"
|
253 |
+
r="4.25"
|
254 |
+
stroke="currentColor"
|
255 |
+
strokeWidth="1.5"
|
256 |
+
/>
|
257 |
+
<circle
|
258 |
+
cx="11.9999"
|
259 |
+
cy="12.2"
|
260 |
+
r="6"
|
261 |
+
transform="rotate(-45 11.9999 12.2)"
|
262 |
+
stroke="currentColor"
|
263 |
+
strokeWidth="3"
|
264 |
+
strokeDasharray="1.5 4"
|
265 |
+
/>
|
266 |
+
</svg>
|
267 |
|
268 |
+
<span className="text-sm leading-none">
|
269 |
+
{__(
|
270 |
+
'Fast and friendly support',
|
271 |
+
'extendify-sdk',
|
272 |
+
)}
|
273 |
+
</span>
|
274 |
+
</div>
|
275 |
+
<div className="flex items-center space-x-2">
|
276 |
+
<svg
|
277 |
+
fill="none"
|
278 |
+
height="24"
|
279 |
+
viewBox="0 0 24 24"
|
280 |
+
width="24"
|
281 |
+
xmlns="http://www.w3.org/2000/svg">
|
282 |
+
<path
|
283 |
+
d="m11.7758 3.45425c.0917-.18582.3567-.18581.4484 0l2.3627 4.78731c.0364.07379.1068.12493.1882.13676l5.2831.76769c.2051.02979.287.28178.1386.42642l-3.8229 3.72637c-.0589.0575-.0858.1402-.0719.2213l.9024 5.2618c.0351.2042-.1793.36-.3627.2635l-4.7254-2.4842c-.0728-.0383-.1598-.0383-.2326 0l-4.7254 2.4842c-.18341.0965-.39776-.0593-.36274-.2635l.90247-5.2618c.01391-.0811-.01298-.1638-.0719-.2213l-3.8229-3.72637c-.14838-.14464-.0665-.39663.13855-.42642l5.28312-.76769c.08143-.01183.15182-.06297.18823-.13676z"
|
284 |
+
fill="currentColor"
|
285 |
+
/>
|
286 |
+
</svg>
|
287 |
+
<span className="text-sm leading-none">
|
288 |
+
{__('14-Day guarantee', 'extendify-sdk')}
|
289 |
+
</span>
|
290 |
+
</div>
|
291 |
+
</div>
|
292 |
+
}
|
293 |
+
/>
|
294 |
+
)}
|
295 |
+
</>
|
296 |
+
)
|
297 |
}
|
redux-core/extendify-sdk/src/components/LibraryAccessModal.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
import { Modal } from '@wordpress/components'
|
2 |
-
import {
|
3 |
-
unmountComponentAtNode, useState, useEffect,
|
4 |
-
} from '@wordpress/element'
|
5 |
import { ToggleControl } from '@wordpress/components'
|
6 |
import { __ } from '@wordpress/i18n'
|
7 |
import { useSelect } from '@wordpress/data'
|
@@ -10,10 +8,16 @@ import { useUserStore } from '../state/User'
|
|
10 |
import { useSiteSettingsStore } from '../state/SiteSettings'
|
11 |
|
12 |
const LibraryAccessModal = () => {
|
13 |
-
const isAdmin = useSelect((select) =>
|
|
|
|
|
14 |
|
15 |
-
const [libraryforMyself, setLibraryforMyself] = useState(
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
|
18 |
const closeModal = () => {
|
19 |
const util = document.getElementById('extendify-util')
|
@@ -24,70 +28,83 @@ const LibraryAccessModal = () => {
|
|
24 |
hideButton(!libraryforMyself)
|
25 |
}, [libraryforMyself])
|
26 |
|
27 |
-
function hideButton(state=true){
|
28 |
-
const button = document.getElementById(
|
29 |
-
|
30 |
-
|
|
|
|
|
31 |
button.classList.add('invisible')
|
32 |
-
}
|
33 |
-
else{
|
34 |
button.classList.remove('invisible')
|
35 |
}
|
36 |
}
|
37 |
|
38 |
-
async function saveUser(value){
|
39 |
await useUserStore.setState({ enabled: value })
|
40 |
}
|
41 |
|
42 |
-
async function saveSetting(value){
|
43 |
await useSiteSettingsStore.setState({ enabled: value })
|
44 |
}
|
45 |
|
46 |
-
async function saveToggle(state,type){
|
47 |
-
if(type==='global') {
|
48 |
await saveSetting(state)
|
49 |
-
}
|
50 |
-
else {
|
51 |
await saveUser(state)
|
52 |
}
|
53 |
}
|
54 |
|
55 |
-
function handleToggle(type){
|
56 |
-
if(type==='global'){
|
57 |
setLibraryforEveryone((state) => {
|
58 |
-
saveToggle(!state,type)
|
59 |
return !state
|
60 |
})
|
61 |
-
}
|
62 |
-
else{
|
63 |
setLibraryforMyself((state) => {
|
64 |
hideButton(!state)
|
65 |
-
saveToggle(!state,type)
|
66 |
return !state
|
67 |
})
|
68 |
}
|
69 |
}
|
70 |
|
71 |
return (
|
72 |
-
<Modal
|
|
|
|
|
73 |
<ToggleControl
|
74 |
-
label={
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
/>
|
79 |
|
80 |
-
{
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
91 |
</Modal>
|
92 |
)
|
93 |
}
|
1 |
import { Modal } from '@wordpress/components'
|
2 |
+
import { unmountComponentAtNode, useState, useEffect } from '@wordpress/element'
|
|
|
|
|
3 |
import { ToggleControl } from '@wordpress/components'
|
4 |
import { __ } from '@wordpress/i18n'
|
5 |
import { useSelect } from '@wordpress/data'
|
8 |
import { useSiteSettingsStore } from '../state/SiteSettings'
|
9 |
|
10 |
const LibraryAccessModal = () => {
|
11 |
+
const isAdmin = useSelect((select) =>
|
12 |
+
select('core').canUser('create', 'users'),
|
13 |
+
)
|
14 |
|
15 |
+
const [libraryforMyself, setLibraryforMyself] = useState(
|
16 |
+
useUserStore((store) => store.enabled),
|
17 |
+
)
|
18 |
+
const [libraryforEveryone, setLibraryforEveryone] = useState(
|
19 |
+
useSiteSettingsStore((store) => store.enabled),
|
20 |
+
)
|
21 |
|
22 |
const closeModal = () => {
|
23 |
const util = document.getElementById('extendify-util')
|
28 |
hideButton(!libraryforMyself)
|
29 |
}, [libraryforMyself])
|
30 |
|
31 |
+
function hideButton(state = true) {
|
32 |
+
const button = document.getElementById(
|
33 |
+
'extendify-templates-inserter-btn',
|
34 |
+
)
|
35 |
+
if (!button) return
|
36 |
+
if (state) {
|
37 |
button.classList.add('invisible')
|
38 |
+
} else {
|
|
|
39 |
button.classList.remove('invisible')
|
40 |
}
|
41 |
}
|
42 |
|
43 |
+
async function saveUser(value) {
|
44 |
await useUserStore.setState({ enabled: value })
|
45 |
}
|
46 |
|
47 |
+
async function saveSetting(value) {
|
48 |
await useSiteSettingsStore.setState({ enabled: value })
|
49 |
}
|
50 |
|
51 |
+
async function saveToggle(state, type) {
|
52 |
+
if (type === 'global') {
|
53 |
await saveSetting(state)
|
54 |
+
} else {
|
|
|
55 |
await saveUser(state)
|
56 |
}
|
57 |
}
|
58 |
|
59 |
+
function handleToggle(type) {
|
60 |
+
if (type === 'global') {
|
61 |
setLibraryforEveryone((state) => {
|
62 |
+
saveToggle(!state, type)
|
63 |
return !state
|
64 |
})
|
65 |
+
} else {
|
|
|
66 |
setLibraryforMyself((state) => {
|
67 |
hideButton(!state)
|
68 |
+
saveToggle(!state, type)
|
69 |
return !state
|
70 |
})
|
71 |
}
|
72 |
}
|
73 |
|
74 |
return (
|
75 |
+
<Modal
|
76 |
+
title={__('Extendify Settings', 'extendify-sdk')}
|
77 |
+
onRequestClose={closeModal}>
|
78 |
<ToggleControl
|
79 |
+
label={
|
80 |
+
isAdmin
|
81 |
+
? __('Enable the library for myself', 'extendify-sdk')
|
82 |
+
: __('Enable the library', 'extendify-sdk')
|
83 |
+
}
|
84 |
+
help={__(
|
85 |
+
'Publish with hundreds of patterns & page layouts',
|
86 |
+
'extendify-sdk',
|
87 |
+
)}
|
88 |
+
checked={libraryforMyself}
|
89 |
+
onChange={() => handleToggle('user')}
|
90 |
/>
|
91 |
|
92 |
+
{isAdmin && (
|
93 |
+
<>
|
94 |
+
<br />
|
95 |
+
<ToggleControl
|
96 |
+
label={__(
|
97 |
+
'Allow all users to publish with the library',
|
98 |
+
)}
|
99 |
+
help={__(
|
100 |
+
'Everyone publishes with patterns & page layouts',
|
101 |
+
'extendify-sdk',
|
102 |
+
)}
|
103 |
+
checked={libraryforEveryone}
|
104 |
+
onChange={() => handleToggle('global')}
|
105 |
+
/>
|
106 |
+
</>
|
107 |
+
)}
|
108 |
</Modal>
|
109 |
)
|
110 |
}
|
redux-core/extendify-sdk/src/components/LoginInterface.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
import { useUserStore } from '../state/User'
|
2 |
-
import {
|
3 |
-
useState, useEffect, useRef,
|
4 |
-
} from '@wordpress/element'
|
5 |
import { User as UserApi } from '../api/User'
|
6 |
import { __ } from '@wordpress/i18n'
|
7 |
import classNames from 'classnames'
|
@@ -12,7 +10,7 @@ import { user } from './icons/'
|
|
12 |
import { success as successIcon } from './icons/'
|
13 |
|
14 |
export default function LoginInterface({ actionCallback, initialFocus }) {
|
15 |
-
const loggedIn = useUserStore(state => state.apiKey.length)
|
16 |
const [email, setEmail] = useState('')
|
17 |
const [apiKey, setApiKey] = useState('')
|
18 |
const [feedback, setFeedback] = useState('')
|
@@ -35,30 +33,35 @@ export default function LoginInterface({ actionCallback, initialFocus }) {
|
|
35 |
const logout = () => {
|
36 |
setApiKey('')
|
37 |
useUserStore.setState({ apiKey: '' })
|
38 |
-
setTimeout(() => {
|
|
|
|
|
39 |
}
|
40 |
|
41 |
const confirmKey = async (event) => {
|
42 |
event.preventDefault()
|
43 |
setIsWorking(true)
|
44 |
setFeedback('')
|
45 |
-
const { token, error, exception, message } = await UserApi.authenticate(
|
|
|
|
|
|
|
46 |
|
47 |
if (typeof message !== 'undefined') {
|
48 |
setFeedbackType('error')
|
49 |
setIsWorking(false)
|
50 |
-
setFeedback(
|
51 |
-
|
52 |
-
|
|
|
|
|
53 |
return
|
54 |
}
|
55 |
|
56 |
if (error || exception) {
|
57 |
setFeedbackType('error')
|
58 |
setIsWorking(false)
|
59 |
-
setFeedback(error.length
|
60 |
-
? error
|
61 |
-
: exception)
|
62 |
return
|
63 |
}
|
64 |
|
@@ -79,107 +82,137 @@ export default function LoginInterface({ actionCallback, initialFocus }) {
|
|
79 |
})
|
80 |
}
|
81 |
|
82 |
-
if(success) {
|
83 |
-
return
|
84 |
-
<
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
95 |
}
|
96 |
|
97 |
-
if(loggedIn) {
|
98 |
-
return
|
99 |
-
<
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
</div>
|
105 |
-
|
106 |
-
|
107 |
-
onClick={logout}>
|
108 |
-
{__('Sign out', 'extendify-sdk')}
|
109 |
-
</Button>}
|
110 |
-
</div>
|
111 |
-
</section>
|
112 |
}
|
113 |
|
114 |
-
return
|
115 |
-
<
|
116 |
-
<
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
<label className="sr-only" htmlFor="extendifysdk-login-email">
|
131 |
-
{__('Email address', 'extendify-sdk')}
|
132 |
-
</label>
|
133 |
-
<input
|
134 |
-
ref={initialFocus}
|
135 |
-
id="extendifysdk-login-email"
|
136 |
-
name="extendifysdk-login-email"
|
137 |
-
type="email"
|
138 |
-
className="border-2 p-2 w-full rounded"
|
139 |
-
placeholder={__('Email address', 'extendify-sdk')}
|
140 |
-
value={email.length
|
141 |
-
? email
|
142 |
-
: ''}
|
143 |
-
onChange={(event) => setEmail(event.target.value)}/>
|
144 |
-
</div>
|
145 |
-
<div className="flex items-center">
|
146 |
-
<label className="sr-only" htmlFor="extendifysdk-login-license">
|
147 |
-
{__('License key', 'extendify-sdk')}
|
148 |
-
</label>
|
149 |
-
<input
|
150 |
-
ref={licenseKeyRef}
|
151 |
-
id="extendifysdk-login-license"
|
152 |
-
name="extendifysdk-login-license"
|
153 |
-
type="text"
|
154 |
-
className="border-2 p-2 w-full rounded"
|
155 |
-
placeholder={__('License key', 'extendify-sdk')}
|
156 |
-
value={apiKey}
|
157 |
-
onChange={(event) => setApiKey(event.target.value)}/>
|
158 |
-
</div>
|
159 |
-
<div className="pt-2 flex justify-center">
|
160 |
-
<button
|
161 |
-
type="submit"
|
162 |
-
className="relative p-2 py-3 w-64 max-w-full flex justify-center cursor-pointer text-center rounded bg-extendify-main text-base text-white ">
|
163 |
-
<span>{__('Sign In', 'extendify-sdk')}</span>
|
164 |
-
{isWorking && <div className='absolute right-2.5'>
|
165 |
-
<Spinner/>
|
166 |
-
</div>}
|
167 |
-
</button>
|
168 |
-
</div>
|
169 |
-
{feedback &&
|
170 |
-
<div className={classNames({
|
171 |
-
'border-gray-900 text-gray-900': feedbackType === 'info',
|
172 |
-
'border-wp-alert-red text-wp-alert-red': feedbackType === 'error',
|
173 |
-
'border-extendify-main text-extendify-main': feedbackType === 'success',
|
174 |
-
})}>
|
175 |
-
{feedback}
|
176 |
</div>
|
177 |
-
}
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
1 |
import { useUserStore } from '../state/User'
|
2 |
+
import { useState, useEffect, useRef } from '@wordpress/element'
|
|
|
|
|
3 |
import { User as UserApi } from '../api/User'
|
4 |
import { __ } from '@wordpress/i18n'
|
5 |
import classNames from 'classnames'
|
10 |
import { success as successIcon } from './icons/'
|
11 |
|
12 |
export default function LoginInterface({ actionCallback, initialFocus }) {
|
13 |
+
const loggedIn = useUserStore((state) => state.apiKey.length)
|
14 |
const [email, setEmail] = useState('')
|
15 |
const [apiKey, setApiKey] = useState('')
|
16 |
const [feedback, setFeedback] = useState('')
|
33 |
const logout = () => {
|
34 |
setApiKey('')
|
35 |
useUserStore.setState({ apiKey: '' })
|
36 |
+
setTimeout(() => {
|
37 |
+
licenseKeyRef?.current?.focus()
|
38 |
+
}, 0)
|
39 |
}
|
40 |
|
41 |
const confirmKey = async (event) => {
|
42 |
event.preventDefault()
|
43 |
setIsWorking(true)
|
44 |
setFeedback('')
|
45 |
+
const { token, error, exception, message } = await UserApi.authenticate(
|
46 |
+
email,
|
47 |
+
apiKey,
|
48 |
+
)
|
49 |
|
50 |
if (typeof message !== 'undefined') {
|
51 |
setFeedbackType('error')
|
52 |
setIsWorking(false)
|
53 |
+
setFeedback(
|
54 |
+
message.length
|
55 |
+
? message
|
56 |
+
: 'Error: Are you interacting with the wrong server?',
|
57 |
+
)
|
58 |
return
|
59 |
}
|
60 |
|
61 |
if (error || exception) {
|
62 |
setFeedbackType('error')
|
63 |
setIsWorking(false)
|
64 |
+
setFeedback(error.length ? error : exception)
|
|
|
|
|
65 |
return
|
66 |
}
|
67 |
|
82 |
})
|
83 |
}
|
84 |
|
85 |
+
if (success) {
|
86 |
+
return (
|
87 |
+
<section className="w-80 space-y-8 text-center pt-2 pb-4">
|
88 |
+
<Icon icon={successIcon} size={148} />
|
89 |
+
<p className="text-lg text-extendify-black text-center leading-extra-tight font-semibold">
|
90 |
+
{__("You've signed in to Extendify", 'extendify-sdk')}
|
91 |
+
</p>
|
92 |
+
<Button
|
93 |
+
ref={viewPatternsButtonRef}
|
94 |
+
className="px-4 p-2 cursor-pointer text-center rounded bg-extendify-main text-white"
|
95 |
+
onClick={actionCallback}>
|
96 |
+
{__('View patterns', 'extendify-sdk')}
|
97 |
+
</Button>
|
98 |
+
</section>
|
99 |
+
)
|
100 |
}
|
101 |
|
102 |
+
if (loggedIn) {
|
103 |
+
return (
|
104 |
+
<section className="space-y-8 w-full pb-2">
|
105 |
+
<p className="text-base text-extendify-black leading-extra-tight">
|
106 |
+
{__('Account', 'extendify-sdk')}
|
107 |
+
</p>
|
108 |
+
<div className="flex justify-between items-center">
|
109 |
+
<div className="flex items-center space-x-2 -ml-2">
|
110 |
+
<Icon icon={user} size={48} />
|
111 |
+
<p className="text-extendify-black">
|
112 |
+
{email?.length
|
113 |
+
? email
|
114 |
+
: __('Logged In', 'extendify-sdk')}
|
115 |
+
</p>
|
116 |
+
</div>
|
117 |
+
{window.location.search.indexOf('DEVMODE') > -1 && (
|
118 |
+
<Button
|
119 |
+
className="px-4 py-3 cursor-pointer text-center rounded bg-extendify-main hover:bg-extendify-main-dark text-white"
|
120 |
+
onClick={logout}>
|
121 |
+
{__('Sign out', 'extendify-sdk')}
|
122 |
+
</Button>
|
123 |
+
)}
|
124 |
</div>
|
125 |
+
</section>
|
126 |
+
)
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
|
129 |
+
return (
|
130 |
+
<section className="w-80 text-left space-y-8 pb-6">
|
131 |
+
<div>
|
132 |
+
<p className="text-lg text-extendify-black text-center leading-extra-tight font-semibold">
|
133 |
+
{__('Sign in to Extendify', 'extendify-sdk')}
|
134 |
+
</p>
|
135 |
+
<p className="text-sm text-extendify-gray text-center space-x-1 leading-extra-tight">
|
136 |
+
<span>{__("Don't have an account?", 'extendify-sdk')}</span>
|
137 |
+
<a
|
138 |
+
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sign-in-form&utm_content=sign-up`}
|
139 |
+
target="_blank"
|
140 |
+
className="underline hover:no-underline text-extendify-gray"
|
141 |
+
rel="noreferrer">
|
142 |
+
{__('Sign up', 'extendify-sdk')}
|
143 |
+
</a>
|
144 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
</div>
|
146 |
+
<form onSubmit={confirmKey} className="space-y-2">
|
147 |
+
<div className="flex items-center">
|
148 |
+
<label
|
149 |
+
className="sr-only"
|
150 |
+
htmlFor="extendifysdk-login-email">
|
151 |
+
{__('Email address', 'extendify-sdk')}
|
152 |
+
</label>
|
153 |
+
<input
|
154 |
+
ref={initialFocus}
|
155 |
+
id="extendifysdk-login-email"
|
156 |
+
name="extendifysdk-login-email"
|
157 |
+
type="email"
|
158 |
+
className="border-2 p-2 w-full rounded"
|
159 |
+
placeholder={__('Email address', 'extendify-sdk')}
|
160 |
+
value={email.length ? email : ''}
|
161 |
+
onChange={(event) => setEmail(event.target.value)}
|
162 |
+
/>
|
163 |
+
</div>
|
164 |
+
<div className="flex items-center">
|
165 |
+
<label
|
166 |
+
className="sr-only"
|
167 |
+
htmlFor="extendifysdk-login-license">
|
168 |
+
{__('License key', 'extendify-sdk')}
|
169 |
+
</label>
|
170 |
+
<input
|
171 |
+
ref={licenseKeyRef}
|
172 |
+
id="extendifysdk-login-license"
|
173 |
+
name="extendifysdk-login-license"
|
174 |
+
type="text"
|
175 |
+
className="border-2 p-2 w-full rounded"
|
176 |
+
placeholder={__('License key', 'extendify-sdk')}
|
177 |
+
value={apiKey}
|
178 |
+
onChange={(event) => setApiKey(event.target.value)}
|
179 |
+
/>
|
180 |
+
</div>
|
181 |
+
<div className="pt-2 flex justify-center">
|
182 |
+
<button
|
183 |
+
type="submit"
|
184 |
+
className="relative p-2 py-3 w-72 max-w-full flex justify-center cursor-pointer text-center rounded bg-extendify-main hover:bg-extendify-main-dark text-base text-white ">
|
185 |
+
<span>{__('Sign In', 'extendify-sdk')}</span>
|
186 |
+
{isWorking && (
|
187 |
+
<div className="absolute right-2.5">
|
188 |
+
<Spinner />
|
189 |
+
</div>
|
190 |
+
)}
|
191 |
+
</button>
|
192 |
+
</div>
|
193 |
+
{feedback && (
|
194 |
+
<div
|
195 |
+
className={classNames({
|
196 |
+
'border-gray-900 text-gray-900':
|
197 |
+
feedbackType === 'info',
|
198 |
+
'border-wp-alert-red text-wp-alert-red':
|
199 |
+
feedbackType === 'error',
|
200 |
+
'border-extendify-main text-extendify-main':
|
201 |
+
feedbackType === 'success',
|
202 |
+
})}>
|
203 |
+
{feedback}
|
204 |
+
</div>
|
205 |
+
)}
|
206 |
+
<div className="text-center pt-4">
|
207 |
+
<a
|
208 |
+
target="_blank"
|
209 |
+
rel="noreferrer"
|
210 |
+
href={`https://extendify.com/guides/sign-in?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sign-in-form&utm_content=need-help`}
|
211 |
+
className="underline hover:no-underline text-sm text-extendify-gray">
|
212 |
+
{__('Need Help?', 'extendify-sdk')}
|
213 |
+
</a>
|
214 |
+
</div>
|
215 |
+
</form>
|
216 |
+
</section>
|
217 |
+
)
|
218 |
}
|
redux-core/extendify-sdk/src/components/SiteTypeSelector.js
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
-
import {
|
2 |
-
useEffect, useState, useRef, useMemo,
|
3 |
-
} from '@wordpress/element'
|
4 |
import { __ } from '@wordpress/i18n'
|
5 |
import classNames from 'classnames'
|
6 |
import Fuse from 'fuse.js'
|
@@ -10,19 +8,29 @@ import { useUserStore } from '../state/User'
|
|
10 |
const searchMemo = new Map()
|
11 |
|
12 |
export default function SiteTypeSelector({ value, setValue, terms }) {
|
13 |
-
const preferredOptionsHistory = useUserStore(
|
14 |
-
|
|
|
|
|
15 |
const [expanded, setExpanded] = useState(false)
|
16 |
const searchRef = useRef()
|
17 |
const [fuzzy, setFuzzy] = useState({})
|
18 |
const [tempValue, setTempValue] = useState('')
|
19 |
const [visibleChoices, setVisibleChoices] = useState([])
|
20 |
|
21 |
-
const examples = useMemo(
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
const updateSearch = (term) => {
|
28 |
setTempValue(term)
|
@@ -35,19 +43,26 @@ export default function SiteTypeSelector({ value, setValue, terms }) {
|
|
35 |
return
|
36 |
}
|
37 |
const results = fuzzy.search(term)
|
38 |
-
searchMemo.set(
|
|
|
|
|
|
|
39 |
setVisibleChoices(searchMemo.get(term))
|
40 |
}
|
41 |
|
42 |
-
const showRecent = () =>
|
|
|
|
|
43 |
const unknown = value === 'Unknown' || !value.length
|
44 |
|
45 |
useEffect(() => {
|
46 |
-
setFuzzy(
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
51 |
}, [terms])
|
52 |
|
53 |
useEffect(() => {
|
@@ -59,98 +74,174 @@ export default function SiteTypeSelector({ value, setValue, terms }) {
|
|
59 |
}, [expanded])
|
60 |
|
61 |
const contentHeader = (description) => {
|
62 |
-
return
|
63 |
-
|
64 |
-
<span className="
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
-
const choicesList = (
|
|
|
|
|
|
|
87 |
if (choices === examples) {
|
88 |
title = __('Examples', 'extendify-sdk')
|
89 |
}
|
90 |
-
return
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
|
117 |
-
return
|
118 |
-
<
|
119 |
-
|
120 |
-
onClick={() => setExpanded(((value) => !value))}
|
121 |
-
className="flex items-center justify-between text-gray-800 button-focus w-full p-4 m-0 cursor-pointer bg-gray-100 hover:bg-gray-150 rounded">
|
122 |
-
{contentHeader(expanded ? __('What kind of site is this?', 'extendify-sdk') : value)}
|
123 |
-
</button>
|
124 |
-
{expanded && <div className="p-4 pt-0">
|
125 |
-
<div className="relative my-2">
|
126 |
-
<label htmlFor="site-type-search" className="sr-only">
|
127 |
-
{__('Search', 'extendify-sdk')}
|
128 |
-
</label>
|
129 |
-
<input
|
130 |
-
ref={searchRef}
|
131 |
-
id="site-type-search"
|
132 |
-
value={tempValue || ''}
|
133 |
-
onChange={(event) => updateSearch(event.target.value)}
|
134 |
-
type="text"
|
135 |
-
className="button-focus bg-white border-0 m-0 p-3.5 py-2.5 rounded text-sm w-full"
|
136 |
-
placeholder={__('Search', 'extendify-sdk')} />
|
137 |
-
<svg className="absolute top-2 right-2 hidden lg:block pointer-events-none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="img" aria-hidden="true" focusable="false"><path d="M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"></path></svg>
|
138 |
-
</div>
|
139 |
-
{tempValue.length > 1 && visibleChoices === examples && <p className="text-left">
|
140 |
-
{__('Nothing found...', 'extendify-sdk')}
|
141 |
-
</p>}
|
142 |
-
{showRecent() && <div className="mb-8">
|
143 |
-
{choicesList(preferredOptionsHistory?.siteType, __('Recent', 'extendify-sdk'))}
|
144 |
-
</div>}
|
145 |
-
{visibleChoices && <div>
|
146 |
-
{choicesList(visibleChoices)}
|
147 |
-
</div>}
|
148 |
-
{unknown || <button
|
149 |
type="button"
|
150 |
-
|
151 |
-
|
152 |
-
{
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
1 |
+
import { useEffect, useState, useRef, useMemo } from '@wordpress/element'
|
|
|
|
|
2 |
import { __ } from '@wordpress/i18n'
|
3 |
import classNames from 'classnames'
|
4 |
import Fuse from 'fuse.js'
|
8 |
const searchMemo = new Map()
|
9 |
|
10 |
export default function SiteTypeSelector({ value, setValue, terms }) {
|
11 |
+
const preferredOptionsHistory = useUserStore(
|
12 |
+
(state) => state.preferredOptionsHistory,
|
13 |
+
)
|
14 |
+
const searchParams = useTemplatesStore((state) => state.searchParams)
|
15 |
const [expanded, setExpanded] = useState(false)
|
16 |
const searchRef = useRef()
|
17 |
const [fuzzy, setFuzzy] = useState({})
|
18 |
const [tempValue, setTempValue] = useState('')
|
19 |
const [visibleChoices, setVisibleChoices] = useState([])
|
20 |
|
21 |
+
const examples = useMemo(
|
22 |
+
() =>
|
23 |
+
Object.values(
|
24 |
+
terms
|
25 |
+
.filter((t) => t?.featured)
|
26 |
+
.sort((a, b) => {
|
27 |
+
if (a.term < b.term) return -1
|
28 |
+
if (a.term > b.term) return 1
|
29 |
+
return 0
|
30 |
+
}),
|
31 |
+
),
|
32 |
+
[terms],
|
33 |
+
)
|
34 |
|
35 |
const updateSearch = (term) => {
|
36 |
setTempValue(term)
|
43 |
return
|
44 |
}
|
45 |
const results = fuzzy.search(term)
|
46 |
+
searchMemo.set(
|
47 |
+
term,
|
48 |
+
results?.length ? results.map((t) => t.item) : examples,
|
49 |
+
)
|
50 |
setVisibleChoices(searchMemo.get(term))
|
51 |
}
|
52 |
|
53 |
+
const showRecent = () =>
|
54 |
+
visibleChoices === examples &&
|
55 |
+
preferredOptionsHistory?.siteType?.length > 0
|
56 |
const unknown = value === 'Unknown' || !value.length
|
57 |
|
58 |
useEffect(() => {
|
59 |
+
setFuzzy(
|
60 |
+
new Fuse(terms, {
|
61 |
+
keys: ['term', 'parent', 'keywords'],
|
62 |
+
minMatchCharLength: 2,
|
63 |
+
threshold: 0.3,
|
64 |
+
}),
|
65 |
+
)
|
66 |
}, [terms])
|
67 |
|
68 |
useEffect(() => {
|
74 |
}, [expanded])
|
75 |
|
76 |
const contentHeader = (description) => {
|
77 |
+
return (
|
78 |
+
<>
|
79 |
+
<span className="flex flex-col text-left">
|
80 |
+
<span className="text-sm mb-1">
|
81 |
+
{__('Site Type', 'extendify-sdk')}
|
82 |
+
</span>
|
83 |
+
<span className="font-light text-xs">{description}</span>
|
84 |
+
</span>
|
85 |
+
<span className="flex items-center space-x-4">
|
86 |
+
{unknown && !expanded && (
|
87 |
+
<svg
|
88 |
+
className="text-wp-alert-red"
|
89 |
+
aria-hidden="true"
|
90 |
+
focusable="false"
|
91 |
+
width="21"
|
92 |
+
height="21"
|
93 |
+
viewBox="0 0 21 21"
|
94 |
+
fill="none"
|
95 |
+
xmlns="http://www.w3.org/2000/svg">
|
96 |
+
<path
|
97 |
+
className="stroke-current"
|
98 |
+
d="M10.9982 4.05371C7.66149 4.05371 4.95654 6.75866 4.95654 10.0954C4.95654 13.4321 7.66149 16.137 10.9982 16.137C14.3349 16.137 17.0399 13.4321 17.0399 10.0954C17.0399 6.75866 14.3349 4.05371 10.9982 4.05371V4.05371Z"
|
99 |
+
strokeWidth="1.25"
|
100 |
+
/>
|
101 |
+
<path
|
102 |
+
className="fill-current"
|
103 |
+
d="M10.0205 12.8717C10.0205 12.3287 10.4508 11.8881 10.9938 11.8881C11.5368 11.8881 11.9774 12.3287 11.9774 12.8717C11.9774 13.4147 11.5368 13.8451 10.9938 13.8451C10.4508 13.8451 10.0205 13.4147 10.0205 12.8717Z"
|
104 |
+
/>
|
105 |
+
<path
|
106 |
+
className="fill-current"
|
107 |
+
d="M11.6495 10.2591C11.6086 10.6177 11.3524 10.9148 10.9938 10.9148C10.625 10.9148 10.3791 10.6074 10.3483 10.2591L10.0205 7.31855C9.95901 6.81652 10.4918 6.34521 10.9938 6.34521C11.4959 6.34521 12.0286 6.81652 11.9774 7.31855L11.6495 10.2591Z"
|
108 |
+
/>
|
109 |
+
</svg>
|
110 |
+
)}
|
111 |
+
<svg
|
112 |
+
className={classNames('text-gray-700 stroke-current', {
|
113 |
+
'transform rotate-90 -translate-x-1': expanded,
|
114 |
+
})}
|
115 |
+
aria-hidden="true"
|
116 |
+
focusable="false"
|
117 |
+
width="8"
|
118 |
+
height="13"
|
119 |
+
viewBox="0 0 8 13"
|
120 |
+
fill="none"
|
121 |
+
xmlns="http://www.w3.org/2000/svg">
|
122 |
+
<path
|
123 |
+
d="M1.24194 11.5952L6.24194 6.09519L1.24194 0.595215"
|
124 |
+
strokeWidth="1.5"
|
125 |
+
/>
|
126 |
+
</svg>
|
127 |
+
</span>
|
128 |
+
</>
|
129 |
+
)
|
130 |
}
|
131 |
|
132 |
+
const choicesList = (
|
133 |
+
choices,
|
134 |
+
title = __('Suggestions', 'extendify-sdk'),
|
135 |
+
) => {
|
136 |
if (choices === examples) {
|
137 |
title = __('Examples', 'extendify-sdk')
|
138 |
}
|
139 |
+
return (
|
140 |
+
<>
|
141 |
+
<h4 className="mt-4 mb-2 text-left uppercase text-xs text-gray-700">
|
142 |
+
{title}
|
143 |
+
</h4>
|
144 |
+
<ul className="m-0">
|
145 |
+
{choices.map((item) => {
|
146 |
+
if (
|
147 |
+
Object.prototype.hasOwnProperty.call(item, 'term')
|
148 |
+
) {
|
149 |
+
item = item.term
|
150 |
+
}
|
151 |
+
const current =
|
152 |
+
searchParams?.taxonomies?.tax_categories === item
|
153 |
+
return (
|
154 |
+
<li key={item} className="m-0 mb-1">
|
155 |
+
<button
|
156 |
+
type="button"
|
157 |
+
className={classNames(
|
158 |
+
'w-full text-left text-sm bg-transparent hover:text-wp-theme-500 m-0 pl-0 cursor-pointer',
|
159 |
+
{
|
160 |
+
'text-gray-800': !current,
|
161 |
+
},
|
162 |
+
)}
|
163 |
+
onClick={() => {
|
164 |
+
setExpanded(false)
|
165 |
+
setValue(item)
|
166 |
+
}}>
|
167 |
+
{item}
|
168 |
+
</button>
|
169 |
+
</li>
|
170 |
+
)
|
171 |
+
})}
|
172 |
+
</ul>
|
173 |
+
</>
|
174 |
+
)
|
175 |
}
|
176 |
|
177 |
+
return (
|
178 |
+
<div className="w-full bg-gray-100 rounded">
|
179 |
+
<button
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
type="button"
|
181 |
+
onClick={() => setExpanded((value) => !value)}
|
182 |
+
className="flex items-center justify-between text-gray-800 button-focus w-full p-4 m-0 cursor-pointer bg-gray-100 hover:bg-gray-150 rounded">
|
183 |
+
{contentHeader(
|
184 |
+
expanded
|
185 |
+
? __('What kind of site is this?', 'extendify-sdk')
|
186 |
+
: value,
|
187 |
+
)}
|
188 |
+
</button>
|
189 |
+
{expanded && (
|
190 |
+
<div className="p-4 pt-0">
|
191 |
+
<div className="relative my-2">
|
192 |
+
<label htmlFor="site-type-search" className="sr-only">
|
193 |
+
{__('Search', 'extendify-sdk')}
|
194 |
+
</label>
|
195 |
+
<input
|
196 |
+
ref={searchRef}
|
197 |
+
id="site-type-search"
|
198 |
+
value={tempValue || ''}
|
199 |
+
onChange={(event) =>
|
200 |
+
updateSearch(event.target.value)
|
201 |
+
}
|
202 |
+
type="text"
|
203 |
+
className="button-focus bg-white border-0 m-0 p-3.5 py-2.5 rounded text-sm w-full"
|
204 |
+
placeholder={__('Search', 'extendify-sdk')}
|
205 |
+
/>
|
206 |
+
<svg
|
207 |
+
className="absolute top-2 right-2 hidden lg:block pointer-events-none"
|
208 |
+
xmlns="http://www.w3.org/2000/svg"
|
209 |
+
viewBox="0 0 24 24"
|
210 |
+
width="24"
|
211 |
+
height="24"
|
212 |
+
role="img"
|
213 |
+
aria-hidden="true"
|
214 |
+
focusable="false">
|
215 |
+
<path d="M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"></path>
|
216 |
+
</svg>
|
217 |
+
</div>
|
218 |
+
{tempValue.length > 1 && visibleChoices === examples && (
|
219 |
+
<p className="text-left">
|
220 |
+
{__('Nothing found...', 'extendify-sdk')}
|
221 |
+
</p>
|
222 |
+
)}
|
223 |
+
{showRecent() && (
|
224 |
+
<div className="mb-8">
|
225 |
+
{choicesList(
|
226 |
+
preferredOptionsHistory?.siteType,
|
227 |
+
__('Recent', 'extendify-sdk'),
|
228 |
+
)}
|
229 |
+
</div>
|
230 |
+
)}
|
231 |
+
{visibleChoices && <div>{choicesList(visibleChoices)}</div>}
|
232 |
+
{unknown || (
|
233 |
+
<button
|
234 |
+
type="button"
|
235 |
+
className="mt-4 w-full text-left text-sm bg-transparent hover:text-wp-theme-500 pl-0 cursor-pointer text-wp-theme-500"
|
236 |
+
onClick={() => {
|
237 |
+
setExpanded(false)
|
238 |
+
setValue('Unknown')
|
239 |
+
}}>
|
240 |
+
{__('Reset', 'extendify-sdk')}
|
241 |
+
</button>
|
242 |
+
)}
|
243 |
+
</div>
|
244 |
+
)}
|
245 |
+
</div>
|
246 |
+
)
|
247 |
}
|
redux-core/extendify-sdk/src/components/TaxonomyList.js
CHANGED
@@ -1,39 +1,68 @@
|
|
1 |
import { getPluginDescription } from '../util/general'
|
2 |
import { __ } from '@wordpress/i18n'
|
3 |
|
4 |
-
export default function TaxonomyList({
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
</div>
|
29 |
-
|
30 |
-
|
31 |
-
<a
|
32 |
-
href={`https://extendify.com/what-happens-when-a-template-is-added?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sidebar`}
|
33 |
-
rel="noreferrer"
|
34 |
-
target="_blank">
|
35 |
-
{__('What happens when a page layout is added?', 'extendify-sdk')}
|
36 |
-
</a>
|
37 |
-
</div>
|
38 |
-
</>
|
39 |
}
|
1 |
import { getPluginDescription } from '../util/general'
|
2 |
import { __ } from '@wordpress/i18n'
|
3 |
|
4 |
+
export default function TaxonomyList({
|
5 |
+
categories,
|
6 |
+
styles,
|
7 |
+
types,
|
8 |
+
requiredPlugins,
|
9 |
+
}) {
|
10 |
+
return (
|
11 |
+
<>
|
12 |
+
{categories && (
|
13 |
+
<div className="w-full pb-4">
|
14 |
+
<h3 className="text-sm m-0 mb-2">
|
15 |
+
{__('Categories:', 'extendify-sdk')}
|
16 |
+
</h3>
|
17 |
+
<div>{categories.join(', ')}</div>
|
18 |
+
</div>
|
19 |
+
)}
|
20 |
+
{styles && (
|
21 |
+
<div className="w-full py-4">
|
22 |
+
<h3 className="text-sm m-0 my-2">
|
23 |
+
{__('Styles:', 'extendify-sdk')}
|
24 |
+
</h3>
|
25 |
+
<div>{styles.join(', ')}</div>
|
26 |
+
</div>
|
27 |
+
)}
|
28 |
+
{types && (
|
29 |
+
<div className="w-full py-4">
|
30 |
+
<h3 className="text-sm m-0 my-2">
|
31 |
+
{__('Types:', 'extendify-sdk')}
|
32 |
+
</h3>
|
33 |
+
<div>{types.join(', ')}</div>
|
34 |
+
</div>
|
35 |
+
)}
|
36 |
+
{/* // Hardcoded temporarily to not force EP install */}
|
37 |
+
{/* {requiredPlugins && <div className="pt-4 w-full"> */}
|
38 |
+
{requiredPlugins.filter((p) => p !== 'editorplus').length > 0 && (
|
39 |
+
<div className="pt-4 w-full">
|
40 |
+
<h3 className="text-sm m-0 my-2">
|
41 |
+
{__('Required Plugins:', 'extendify-sdk')}
|
42 |
+
</h3>
|
43 |
+
<div>
|
44 |
+
{
|
45 |
+
// Hardcoded temporarily to not force EP install
|
46 |
+
// requiredPlugins.map(p => getPluginDescription(p)).join(', ')
|
47 |
+
requiredPlugins
|
48 |
+
.filter((p) => p !== 'editorplus')
|
49 |
+
.map((p) => getPluginDescription(p))
|
50 |
+
.join(', ')
|
51 |
+
}
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
)}
|
55 |
+
<div className="py-4 mt-4">
|
56 |
+
<a
|
57 |
+
href={`https://extendify.com/what-happens-when-a-template-is-added?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sidebar`}
|
58 |
+
rel="noreferrer"
|
59 |
+
target="_blank">
|
60 |
+
{__(
|
61 |
+
'What happens when a page layout is added?',
|
62 |
+
'extendify-sdk',
|
63 |
+
)}
|
64 |
+
</a>
|
65 |
</div>
|
66 |
+
</>
|
67 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
redux-core/extendify-sdk/src/components/TaxonomySection.js
CHANGED
@@ -5,37 +5,60 @@ import { useTaxonomyStore } from '../state/Taxonomies'
|
|
5 |
import { getTaxonomyName } from '../util/general'
|
6 |
|
7 |
export default function TaxonomySection({ taxonomy: [title, data] }) {
|
8 |
-
const updateTaxonomies = useTemplatesStore(
|
9 |
-
|
10 |
-
|
11 |
-
const
|
|
|
|
|
|
|
|
|
12 |
const isCurrentTax = (tax) => searchParams?.taxonomies[title] === tax.term
|
13 |
-
const taxSupported = Object.values(data).filter((tax) =>
|
|
|
|
|
14 |
|
15 |
if (!Object.keys(data).length || !taxSupported) return null
|
16 |
-
return
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
5 |
import { getTaxonomyName } from '../util/general'
|
6 |
|
7 |
export default function TaxonomySection({ taxonomy: [title, data] }) {
|
8 |
+
const updateTaxonomies = useTemplatesStore(
|
9 |
+
(state) => state.updateTaxonomies,
|
10 |
+
)
|
11 |
+
const searchParams = useTemplatesStore((state) => state.searchParams)
|
12 |
+
const openedTaxonomies = useTaxonomyStore((state) => state.openedTaxonomies)
|
13 |
+
const toggleOpenedTaxonomy = useTaxonomyStore(
|
14 |
+
(state) => state.toggleOpenedTaxonomy,
|
15 |
+
)
|
16 |
const isCurrentTax = (tax) => searchParams?.taxonomies[title] === tax.term
|
17 |
+
const taxSupported = Object.values(data).filter((tax) =>
|
18 |
+
tax?.type?.includes(searchParams.type),
|
19 |
+
).length
|
20 |
|
21 |
if (!Object.keys(data).length || !taxSupported) return null
|
22 |
+
return (
|
23 |
+
<PanelBody
|
24 |
+
title={getTaxonomyName(title)}
|
25 |
+
className="ext-type-control p-0"
|
26 |
+
initialOpen={
|
27 |
+
openedTaxonomies.includes(title) ||
|
28 |
+
title === 'tax_pattern_types' ||
|
29 |
+
title === 'tax_page_types'
|
30 |
+
}
|
31 |
+
onToggle={(value) => toggleOpenedTaxonomy(title, value)}>
|
32 |
+
<PanelRow>
|
33 |
+
<div className="overflow-hidden w-full relative">
|
34 |
+
<ul className="py-1 m-0 w-full">
|
35 |
+
{Object.values(data)
|
36 |
+
.filter((tax) =>
|
37 |
+
tax?.type?.includes(searchParams.type),
|
38 |
+
)
|
39 |
+
.map((tax) => (
|
40 |
+
<li className="m-0 w-full" key={tax.term}>
|
41 |
+
<button
|
42 |
+
type="button"
|
43 |
+
className="text-left text-sm cursor-pointer w-full flex justify-between items-center px-0 py-2 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus"
|
44 |
+
onClick={() =>
|
45 |
+
updateTaxonomies({
|
46 |
+
[title]: tax.term,
|
47 |
+
})
|
48 |
+
}>
|
49 |
+
<span
|
50 |
+
className={classNames({
|
51 |
+
'text-wp-theme-500':
|
52 |
+
isCurrentTax(tax),
|
53 |
+
})}>
|
54 |
+
{tax.term}
|
55 |
+
</span>
|
56 |
+
</button>
|
57 |
+
</li>
|
58 |
+
))}
|
59 |
+
</ul>
|
60 |
+
</div>
|
61 |
+
</PanelRow>
|
62 |
+
</PanelBody>
|
63 |
+
)
|
64 |
}
|
redux-core/extendify-sdk/src/components/TemplateButton.js
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
import { Spinner } from '@wordpress/components'
|
2 |
-
import {
|
3 |
-
useState, useEffect, useRef,
|
4 |
-
} from '@wordpress/element'
|
5 |
-
import { useIsMounted } from '../hooks/helpers'
|
6 |
-
|
7 |
-
export const TemplateButtonSkeleton = () => <div className="aspect-w-1 aspect-h-1">
|
8 |
-
<div className="w-full h-full flex items-center justify-center bg-gray-100">
|
9 |
-
<Spinner/>
|
10 |
-
</div>
|
11 |
-
</div>
|
12 |
-
|
13 |
-
export default function TemplateButton({ template, imageLoaded, setActiveTemplate }) {
|
14 |
-
const [loaded, setLoaded] = useState(false)
|
15 |
-
const imageContainerRef = useRef()
|
16 |
-
const isMounted = useIsMounted()
|
17 |
-
|
18 |
-
useEffect(() => {
|
19 |
-
if (loaded || !isMounted.current) {
|
20 |
-
return
|
21 |
-
}
|
22 |
-
const img = new Image()
|
23 |
-
img.role = 'button'
|
24 |
-
img.className = 'max-w-full block m-auto object-cover'
|
25 |
-
img.onload = () => {
|
26 |
-
if (isMounted.current) {
|
27 |
-
setLoaded(true)
|
28 |
-
// Check the image wasn't already appended
|
29 |
-
if (imageContainerRef.current && !imageContainerRef.current.querySelector('img')) {
|
30 |
-
imageContainerRef.current.appendChild(img)
|
31 |
-
imageLoaded(template.id)
|
32 |
-
}
|
33 |
-
}
|
34 |
-
}
|
35 |
-
img.src = template?.fields?.screenshot[0]?.thumbnails?.large?.url ?? template?.fields?.screenshot[0]?.url
|
36 |
-
}, [template, imageLoaded, loaded, isMounted])
|
37 |
-
|
38 |
-
if (!loaded) {
|
39 |
-
return <TemplateButtonSkeleton/>
|
40 |
-
}
|
41 |
-
return (
|
42 |
-
<button
|
43 |
-
type="button"
|
44 |
-
className="flex mb-10 justify-items-center flex-grow h-80 border-gray-200 bg-white border focus:border-wp-theme-500 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer overflow-hidden"
|
45 |
-
onClick={setActiveTemplate}
|
46 |
-
ref={imageContainerRef}
|
47 |
-
>
|
48 |
-
</button>
|
49 |
-
)
|
50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/components/TemplateButtonLive.js
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
import { Spinner } from '@wordpress/components'
|
2 |
-
import { BlockPreview } from '@wordpress/block-editor'
|
3 |
-
import { rawHandler } from '@wordpress/blocks'
|
4 |
-
import { __, sprintf } from '@wordpress/i18n'
|
5 |
-
import {
|
6 |
-
useState, useEffect, useRef, memo,
|
7 |
-
} from '@wordpress/element'
|
8 |
-
import { useInView } from 'react-intersection-observer'
|
9 |
-
|
10 |
-
export const TemplateButtonLiveSkeleton = ({ extraClasses }) => (
|
11 |
-
<div className={`w-full h-40 flex items-center justify-center bg-gray-100 ${extraClasses}`}>
|
12 |
-
<Spinner/>
|
13 |
-
</div>
|
14 |
-
)
|
15 |
-
|
16 |
-
const LiveBlocksMemoized = memo(({ blocks }) => {
|
17 |
-
return <BlockPreview
|
18 |
-
blocks={blocks}
|
19 |
-
live={false}
|
20 |
-
viewportWidth={1400}/>
|
21 |
-
}, (oldBlocks, newBlocks) => oldBlocks.clientId == newBlocks.clientId)
|
22 |
-
|
23 |
-
export default function TemplateButtonLive({ template, setActiveTemplate }) {
|
24 |
-
// Converts HTML to blocks
|
25 |
-
const blocks = rawHandler({ HTML: template.fields.code })
|
26 |
-
const [hasBeenSeen, setHasBeenSeen] = useState(false)
|
27 |
-
const previewRef = useRef()
|
28 |
-
const [onlyLoadInView, inView] = useInView()
|
29 |
-
|
30 |
-
// This makes sure the component doesn't stop rendering before it's
|
31 |
-
// memoized in case the user scrolls too fast. ie once it's in view once, it
|
32 |
-
// will always be considered inView and visible
|
33 |
-
useEffect(() => {
|
34 |
-
if (!hasBeenSeen && inView) {
|
35 |
-
setHasBeenSeen(true)
|
36 |
-
}
|
37 |
-
}, [inView, hasBeenSeen])
|
38 |
-
|
39 |
-
// The live preview injects real, rendered html inside the component (not in an iFrame),
|
40 |
-
// which includes any sort of html elements, so we have can't use a button here.
|
41 |
-
return <div
|
42 |
-
role="button"
|
43 |
-
aria-label={sprintf(__('Open details about the %s', 'extendify-sdk'), template?.fields?.type)}
|
44 |
-
tabIndex="0"
|
45 |
-
className="mb-10 w-full relative focus:border-wp-theme-500 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer overflow-hidden"
|
46 |
-
onClick={setActiveTemplate}
|
47 |
-
onKeyDown={(e) => ['Enter', 'Space'].includes(e.key) && setActiveTemplate() }
|
48 |
-
ref={previewRef}
|
49 |
-
>
|
50 |
-
<div ref={onlyLoadInView} className="invisible absolute inset-0 pointer-events-none"></div>
|
51 |
-
{hasBeenSeen && <LiveBlocksMemoized blocks={blocks} />}
|
52 |
-
</div>
|
53 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/components/TypeSelect.js
CHANGED
@@ -2,35 +2,36 @@ import { __ } from '@wordpress/i18n'
|
|
2 |
import { useTemplatesStore } from '../state/Templates'
|
3 |
import classNames from 'classnames'
|
4 |
import { useGlobalStore } from '../state/GlobalState'
|
5 |
-
import { templates as config } from '../config'
|
6 |
|
7 |
export default function TypeSelect() {
|
8 |
-
const updateType = useTemplatesStore(state => state.updateType)
|
9 |
-
const currentType = useGlobalStore(state =>
|
|
|
|
|
10 |
|
11 |
-
return
|
12 |
-
<
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
</
|
35 |
-
|
36 |
}
|
2 |
import { useTemplatesStore } from '../state/Templates'
|
3 |
import classNames from 'classnames'
|
4 |
import { useGlobalStore } from '../state/GlobalState'
|
|
|
5 |
|
6 |
export default function TypeSelect() {
|
7 |
+
const updateType = useTemplatesStore((state) => state.updateType)
|
8 |
+
const currentType = useGlobalStore((state) =>
|
9 |
+
state.currentType ? state.currentType : 'pattern',
|
10 |
+
)
|
11 |
|
12 |
+
return (
|
13 |
+
<div className="text-center w-full md:pl-36 md:ml-2">
|
14 |
+
<h4 className="sr-only">{__('Type select', 'extendify-sdk')}</h4>
|
15 |
+
<button
|
16 |
+
type="button"
|
17 |
+
className={classNames({
|
18 |
+
'cursor-pointer text-xs leading-none m-0 py-2.5 px-4 min-w-sm border rounded-tl-sm rounded-bl-sm border-black button-focus': true,
|
19 |
+
'bg-gray-900 text-white': currentType === 'pattern',
|
20 |
+
'bg-transparent text-black': currentType !== 'pattern',
|
21 |
+
})}
|
22 |
+
onClick={() => updateType('pattern')}>
|
23 |
+
<span className="">{__('Patterns', 'extendify-sdk')}</span>
|
24 |
+
</button>
|
25 |
+
<button
|
26 |
+
type="button"
|
27 |
+
className={classNames({
|
28 |
+
'cursor-pointer text-xs leading-none m-0 py-2.5 px-4 min-w-sm items-center border rounded-tr-sm rounded-br-sm border-black outline-none -ml-px button-focus': true,
|
29 |
+
'bg-gray-900 text-white': currentType === 'template',
|
30 |
+
'bg-transparent text-black': currentType !== 'template',
|
31 |
+
})}
|
32 |
+
onClick={() => updateType('template')}>
|
33 |
+
<span className="">{__('Page Layouts', 'extendify-sdk')}</span>
|
34 |
+
</button>
|
35 |
+
</div>
|
36 |
+
)
|
37 |
}
|
redux-core/extendify-sdk/src/components/WelcomeNotice.js
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
import { __ } from '@wordpress/i18n'
|
2 |
-
import { Icon, closeSmall } from '@wordpress/icons'
|
3 |
-
import { Button } from '@wordpress/components'
|
4 |
-
import { useUserStore } from '../state/User'
|
5 |
-
import { useState } from '@wordpress/element'
|
6 |
-
import { useGlobalStore } from '../state/GlobalState'
|
7 |
-
|
8 |
-
export default function WelcomeNotice() {
|
9 |
-
const [visible, setVisible] = useState(!useUserStore.getState().noticesDismissedAt?.welcome)
|
10 |
-
const setOpen = useGlobalStore(state => state.setOpen)
|
11 |
-
|
12 |
-
const dismiss = () => {
|
13 |
-
setVisible(false)
|
14 |
-
useUserStore.setState({
|
15 |
-
noticesDismissedAt: {
|
16 |
-
welcome: (new Date).toISOString(),
|
17 |
-
},
|
18 |
-
})
|
19 |
-
}
|
20 |
-
|
21 |
-
const disableLibrary = () => {
|
22 |
-
const button = document.getElementById('extendify-templates-inserter-btn')
|
23 |
-
button.classList.add('invisible')
|
24 |
-
useUserStore.setState({ enabled: false })
|
25 |
-
setOpen(false)
|
26 |
-
}
|
27 |
-
|
28 |
-
if(!visible) return null
|
29 |
-
|
30 |
-
return <div className="bg-extendify-secondary hidden lg:flex space-x-4 py-3 px-5 justify-center items-center relative">
|
31 |
-
<span className='text-black'>
|
32 |
-
{ __('Welcome to the Extendify Library', 'extendify-sdk') }
|
33 |
-
</span>
|
34 |
-
<span className="px-2 opacity-50" aria-hidden="true">|</span>
|
35 |
-
<div className='flex space-x-2 justify-center items-center'>
|
36 |
-
<Button
|
37 |
-
variant="link"
|
38 |
-
className="text-black underline hover:no-underline p-0 h-auto"
|
39 |
-
href={`https://extendify.com/welcome/?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=welcome-notice&utm_content=tell-me-more`}
|
40 |
-
target="_blank"
|
41 |
-
>
|
42 |
-
{ __('Tell me more', 'extendify-sdk') }
|
43 |
-
</Button>
|
44 |
-
<span className="font-bold" aria-hidden="true">•</span>
|
45 |
-
<Button
|
46 |
-
variant="link"
|
47 |
-
className="text-black underline hover:no-underline p-0 h-auto"
|
48 |
-
onClick={ disableLibrary }
|
49 |
-
>
|
50 |
-
{ __('Turn off the library', 'extendify-sdk') }
|
51 |
-
</Button>
|
52 |
-
</div>
|
53 |
-
<div className="absolute right-1">
|
54 |
-
<Button
|
55 |
-
className="opacity-50 hover:opacity-100 focus:opacity-100 text-extendify-black"
|
56 |
-
icon={ <Icon icon={ closeSmall } /> }
|
57 |
-
label={ __('Dismiss this notice', 'extendify-sdk') }
|
58 |
-
onClick={ dismiss }
|
59 |
-
showTooltip={ false }
|
60 |
-
/>
|
61 |
-
</div>
|
62 |
-
</div>
|
63 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/components/buttons/Primary.js
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
import classNames from 'classnames'
|
2 |
import { createElement } from '@wordpress/element'
|
3 |
|
4 |
-
export default function Primary({ tagName='button', children, ...props }) {
|
5 |
-
props.className = classNames(
|
6 |
-
|
7 |
-
|
8 |
-
props,
|
9 |
-
children,
|
10 |
)
|
|
|
11 |
}
|
1 |
import classNames from 'classnames'
|
2 |
import { createElement } from '@wordpress/element'
|
3 |
|
4 |
+
export default function Primary({ tagName = 'button', children, ...props }) {
|
5 |
+
props.className = classNames(
|
6 |
+
props.className,
|
7 |
+
'bg-extendify-main hover:bg-extendify-main-dark py-3 pl-5 pr-3 w-60 rounded no-underline text-base text-white flex justify-center items-center space-x-2',
|
|
|
|
|
8 |
)
|
9 |
+
return createElement(tagName, props, children)
|
10 |
}
|
redux-core/extendify-sdk/src/components/icons/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
export { default as alert } from './library/alert'
|
2 |
export { default as brandMark } from './library/brand-mark'
|
|
|
3 |
export { default as download } from './library/download'
|
4 |
export { default as user } from './library/user'
|
5 |
export { default as success } from './library/success'
|
6 |
-
|
1 |
export { default as alert } from './library/alert'
|
2 |
export { default as brandMark } from './library/brand-mark'
|
3 |
+
export { default as brandLogo } from './library/brand-logo'
|
4 |
export { default as download } from './library/download'
|
5 |
export { default as user } from './library/user'
|
6 |
export { default as success } from './library/success'
|
|
redux-core/extendify-sdk/src/components/icons/library/alert.js
CHANGED
@@ -5,10 +5,21 @@ import { Path, SVG } from '@wordpress/primitives'
|
|
5 |
|
6 |
const alert = (
|
7 |
<SVG viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
|
8 |
-
<Path
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
</SVG>
|
12 |
)
|
13 |
|
14 |
-
export default alert
|
5 |
|
6 |
const alert = (
|
7 |
<SVG viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
|
8 |
+
<Path
|
9 |
+
d="M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z"
|
10 |
+
stroke="currentColor"
|
11 |
+
strokeWidth="1.25"
|
12 |
+
fill="none"
|
13 |
+
/>
|
14 |
+
<Path
|
15 |
+
d="M6.34684 9.72526C6.34684 9.18224 6.77716 8.74168 7.32018 8.74168C7.8632 8.74168 8.30377 9.18224 8.30377 9.72526C8.30377 10.2683 7.8632 10.6986 7.32018 10.6986C6.77716 10.6986 6.34684 10.2683 6.34684 9.72526Z"
|
16 |
+
fill="currentColor"
|
17 |
+
/>
|
18 |
+
<Path
|
19 |
+
d="M7.9759 7.11261C7.93492 7.47121 7.67878 7.76834 7.32018 7.76834C6.95134 7.76834 6.70544 7.46097 6.6747 7.11261L6.34684 4.1721C6.28537 3.67006 6.81814 3.19876 7.32018 3.19876C7.82222 3.19876 8.35499 3.67006 8.30377 4.1721L7.9759 7.11261Z"
|
20 |
+
fill="currentColor"
|
21 |
+
/>
|
22 |
</SVG>
|
23 |
)
|
24 |
|
25 |
+
export default alert
|
redux-core/extendify-sdk/src/components/icons/library/brand-logo.js
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WordPress dependencies
|
3 |
+
*/
|
4 |
+
import { Path, SVG, G } from '@wordpress/primitives'
|
5 |
+
|
6 |
+
const brandLogo = (
|
7 |
+
<SVG
|
8 |
+
fill="none"
|
9 |
+
width="150"
|
10 |
+
height="30"
|
11 |
+
viewBox="0 0 2524 492"
|
12 |
+
xmlns="http://www.w3.org/2000/svg">
|
13 |
+
<G fill="currentColor">
|
14 |
+
<Path d="m609.404 378.5c-24.334 0-46-5.5-65-16.5-18.667-11.333-33.334-26.667-44-46-10.667-19.667-16-42.167-16-67.5 0-25.667 5.166-48.333 15.5-68 10.333-19.667 24.833-35 43.5-46 18.666-11.333 40-17 64-17 25 0 46.5 5.333 64.5 16 18 10.333 31.833 24.833 41.5 43.5 10 18.667 15 41 15 67v18.5l-212 .5 1-39h150.5c0-17-5.5-30.667-16.5-41-10.667-10.333-25.167-15.5-43.5-15.5-14.334 0-26.5 3-36.5 9-9.667 6-17 15-22 27s-7.5 26.667-7.5 44c0 26.667 5.666 46.833 17 60.5 11.666 13.667 28.833 20.5 51.5 20.5 16.666 0 30.333-3.167 41-9.5 11-6.333 18.166-15.333 21.5-27h56.5c-5.334 27-18.667 48.167-40 63.5-21 15.333-47.667 23-80 23z" />
|
15 |
+
<path d="m797.529 372h-69.5l85-121-85-126h71l54.5 84 52.5-84h68.5l-84 125.5 81.5 121.5h-70l-53-81.5z" />
|
16 |
+
<path d="m994.142 125h155.998v51h-155.998zm108.498 247h-61v-324h61z" />
|
17 |
+
<path d="m1278.62 378.5c-24.33 0-46-5.5-65-16.5-18.66-11.333-33.33-26.667-44-46-10.66-19.667-16-42.167-16-67.5 0-25.667 5.17-48.333 15.5-68 10.34-19.667 24.84-35 43.5-46 18.67-11.333 40-17 64-17 25 0 46.5 5.333 64.5 16 18 10.333 31.84 24.833 41.5 43.5 10 18.667 15 41 15 67v18.5l-212 .5 1-39h150.5c0-17-5.5-30.667-16.5-41-10.66-10.333-25.16-15.5-43.5-15.5-14.33 0-26.5 3-36.5 9-9.66 6-17 15-22 27s-7.5 26.667-7.5 44c0 26.667 5.67 46.833 17 60.5 11.67 13.667 28.84 20.5 51.5 20.5 16.67 0 30.34-3.167 41-9.5 11-6.333 18.17-15.333 21.5-27h56.5c-5.33 27-18.66 48.167-40 63.5-21 15.333-47.66 23-80 23z" />
|
18 |
+
<path d="m1484.44 372h-61v-247h56.5l5 32c7.67-12.333 18.5-22 32.5-29 14.34-7 29.84-10.5 46.5-10.5 31 0 54.34 9.167 70 27.5 16 18.333 24 43.333 24 75v152h-61v-137.5c0-20.667-4.66-36-14-46-9.33-10.333-22-15.5-38-15.5-19 0-33.83 6-44.5 18-10.66 12-16 28-16 48z" />
|
19 |
+
<path d="m1798.38 378.5c-24 0-44.67-5.333-62-16-17-11-30.34-26.167-40-45.5-9.34-19.333-14-41.833-14-67.5s4.66-48.333 14-68c9.66-20 23.5-35.667 41.5-47s39.33-17 64-17c17.33 0 33.16 3.5 47.5 10.5 14.33 6.667 25.33 16.167 33 28.5v-156.5h60.5v372h-56l-4-38.5c-7.34 14-18.67 25-34 33-15 8-31.84 12-50.5 12zm13.5-56c14.33 0 26.66-3 37-9 10.33-6.333 18.33-15.167 24-26.5 6-11.667 9-24.833 9-39.5 0-15-3-28-9-39-5.67-11.333-13.67-20.167-24-26.5-10.34-6.667-22.67-10-37-10-14 0-26.17 3.333-36.5 10-10.34 6.333-18.34 15.167-24 26.5-5.34 11.333-8 24.333-8 39s2.66 27.667 8 39c5.66 11.333 13.66 20.167 24 26.5 10.33 6.333 22.5 9.5 36.5 9.5z" />
|
20 |
+
<path d="m1996.45 372v-247h61v247zm30-296.5c-10.34 0-19.17-3.5-26.5-10.5-7-7.3333-10.5-16.1667-10.5-26.5s3.5-19 10.5-26c7.33-6.99999 16.16-10.49998 26.5-10.49998 10.33 0 19 3.49999 26 10.49998 7.33 7 11 15.6667 11 26s-3.67 19.1667-11 26.5c-7 7-15.67 10.5-26 10.5z" />
|
21 |
+
<path d="m2085.97 125h155v51h-155zm155.5-122.5v52c-3.33 0-6.83 0-10.5 0-3.33 0-6.83 0-10.5 0-15.33 0-25.67 3.6667-31 11-5 7.3333-7.5 17.1667-7.5 29.5v277h-60.5v-277c0-22.6667 3.67-40.8333 11-54.5 7.33-14 17.67-24.1667 31-30.5 13.33-6.66666 28.83-10 46.5-10 5 0 10.17.166671 15.5.5 5.67.333329 11 .99999 16 2z" />
|
22 |
+
<path d="m2330.4 125 80.5 228-33 62.5-112-290.5zm-58 361.5v-50.5h36.5c8 0 15-1 21-3 6-1.667 11.34-5 16-10 5-5 9.17-12.333 12.5-22l102.5-276h63l-121 302c-9 22.667-20.33 39.167-34 49.5-13.66 10.333-30.66 15.5-51 15.5-8.66 0-16.83-.5-24.5-1.5-7.33-.667-14.33-2-21-4z" />
|
23 |
+
<path
|
24 |
+
clipRule="evenodd"
|
25 |
+
d="m226.926 25.1299h83.271c23.586 0 32.123 2.4639 40.751 7.0633 8.628 4.6176 15.378 11.389 19.993 20.0037 4.615 8.6329 7.059 17.1746 7.059 40.7738v83.3183c0 23.599-2.463 32.141-7.059 40.774-4.615 8.633-11.383 15.386-19.993 20.003-3.857 2.065-7.704 3.764-12.884 4.981v66.308c0 36.447-3.803 49.639-10.902 62.972-7.128 13.333-17.579 23.763-30.877 30.894-13.325 7.132-26.51 10.909-62.936 10.909h-128.605c-36.4268 0-49.6113-3.805-62.9367-10.909-13.3254-7.131-23.749-17.589-30.8765-30.894-7.12757-13.304-10.9308-26.525-10.9308-62.972v-128.649c0-36.447 3.80323-49.639 10.9026-62.972 7.1275-13.333 17.5793-23.7909 30.9047-30.9224 13.2972-7.1034 26.5099-10.9088 62.9367-10.9088h55.064c1.033-10.8281 3.188-16.7362 6.357-22.6877 4.615-8.6329 11.382-15.4043 20.01-20.0219 8.61-4.5994 17.165-7.0633 40.751-7.0633zm-42.798 53.0342c0-15.464 12.53-28 27.986-28h112.877c15.457 0 27.987 12.536 27.987 28v112.9319c0 15.464-12.53 28-27.987 28h-112.877c-15.456 0-27.986-12.536-27.986-28z"
|
26 |
+
fillRule="evenodd"
|
27 |
+
/>
|
28 |
+
</G>
|
29 |
+
</SVG>
|
30 |
+
)
|
31 |
+
|
32 |
+
export default brandLogo
|
redux-core/extendify-sdk/src/components/icons/library/brand-mark.js
CHANGED
@@ -4,10 +4,14 @@
|
|
4 |
import { Path, SVG } from '@wordpress/primitives'
|
5 |
|
6 |
const brandMark = (
|
7 |
-
<SVG viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
8 |
-
<Path
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
</SVG>
|
11 |
)
|
12 |
|
13 |
-
export default brandMark
|
4 |
import { Path, SVG } from '@wordpress/primitives'
|
5 |
|
6 |
const brandMark = (
|
7 |
+
<SVG fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
8 |
+
<Path
|
9 |
+
clip-rule="evenodd"
|
10 |
+
d="m13.505 4h3.3044c.936 0 1.2747.10161 1.6171.29127.3424.19042.6102.46965.7934.82489.1831.356.2801.70824.2801 1.6814v3.43584c0 .9731-.0977 1.3254-.2801 1.6814-.1832.356-.4517.6344-.7934.8248-.153.0852-.3057.1552-.5112.2054v2.7344c0 1.503-.151 2.047-.4327 2.5968-.2828.5498-.6976.9799-1.2252 1.274-.5288.294-1.052.4498-2.4975.4498h-5.10341c-1.44549 0-1.96869-.1569-2.49747-.4498-.52878-.2941-.94242-.7254-1.22526-1.274-.28284-.5487-.43376-1.0938-.43376-2.5968v-5.3051c0-1.50301.15092-2.04701.43264-2.59682.28284-.54981.6976-.98106 1.22638-1.27514.52767-.29293 1.05198-.44985 2.49747-.44985h2.18511c.041-.44652.1265-.69015.2522-.93557.1832-.356.4517-.63523.7941-.82565.3417-.18966.6812-.29127 1.6171-.29127zm-1.6984 2.18698c0-.63769.4973-1.15464 1.1106-1.15464h4.4793c.6133 0 1.1106.51695 1.1106 1.15464v4.65692c0 .6377-.4973 1.1547-1.1106 1.1547h-4.4793c-.6133 0-1.1106-.517-1.1106-1.1547z"
|
11 |
+
fill="currentColor"
|
12 |
+
fill-rule="evenodd"
|
13 |
+
/>
|
14 |
</SVG>
|
15 |
)
|
16 |
|
17 |
+
export default brandMark
|
redux-core/extendify-sdk/src/components/icons/library/download.js
CHANGED
@@ -5,8 +5,16 @@ import { Path, SVG } from '@wordpress/primitives'
|
|
5 |
|
6 |
const download = (
|
7 |
<SVG viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
8 |
-
<Path
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
</SVG>
|
11 |
)
|
12 |
|
5 |
|
6 |
const download = (
|
7 |
<SVG viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
8 |
+
<Path
|
9 |
+
d="M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z"
|
10 |
+
stroke="white"
|
11 |
+
strokeWidth="1.25"
|
12 |
+
/>
|
13 |
+
<Path
|
14 |
+
d="M7.32458 10.0998L4.82458 7.59977M7.32458 10.0998V3.79764V10.0998ZM7.32458 10.0998L9.82458 7.59977L7.32458 10.0998Z"
|
15 |
+
stroke="white"
|
16 |
+
strokeWidth="1.25"
|
17 |
+
/>
|
18 |
</SVG>
|
19 |
)
|
20 |
|
redux-core/extendify-sdk/src/components/icons/library/success.js
CHANGED
@@ -1,22 +1,68 @@
|
|
1 |
/**
|
2 |
* WordPress dependencies
|
3 |
*/
|
4 |
-
import {
|
5 |
-
Path, SVG, G, Circle, Rect,
|
6 |
-
} from '@wordpress/primitives'
|
7 |
|
8 |
const download = (
|
9 |
-
<SVG
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
<G fill="#cbc3f5" stroke="#0b4a43">
|
12 |
-
<Path
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
<
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
</G>
|
21 |
</SVG>
|
22 |
)
|
1 |
/**
|
2 |
* WordPress dependencies
|
3 |
*/
|
4 |
+
import { Path, SVG, G, Circle, Rect } from '@wordpress/primitives'
|
|
|
|
|
5 |
|
6 |
const download = (
|
7 |
+
<SVG
|
8 |
+
fill="none"
|
9 |
+
viewBox="0 0 151 148"
|
10 |
+
width="151"
|
11 |
+
xmlns="http://www.w3.org/2000/svg">
|
12 |
+
<Circle cx="65.6441" cy="66.6114" fill="#0b4a43" r="65.3897" />
|
13 |
<G fill="#cbc3f5" stroke="#0b4a43">
|
14 |
+
<Path
|
15 |
+
d="m61.73 11.3928 3.0825 8.3304.1197.3234.3234.1197 8.3304 3.0825-8.3304 3.0825-.3234.1197-.1197.3234-3.0825 8.3304-3.0825-8.3304-.1197-.3234-.3234-.1197-8.3304-3.0825 8.3304-3.0825.3234-.1197.1197-.3234z"
|
16 |
+
strokeWidth="1.5"
|
17 |
+
/>
|
18 |
+
<Path
|
19 |
+
d="m84.3065 31.2718c0 5.9939-12.4614 22.323-18.6978 22.323h-17.8958v56.1522c3.5249.9 11.6535 0 17.8958 0h6.2364c11.2074 3.33 36.0089 7.991 45.5529 0l-9.294-62.1623c-2.267-1.7171-5.949-6.6968-2.55-12.8786 3.4-6.1817 2.55-18.0406 0-24.5756-1.871-4.79616-8.3289-8.90882-14.4482-8.90882s-7.0825 4.00668-6.7993 6.01003z"
|
20 |
+
strokeWidth="1.75"
|
21 |
+
/>
|
22 |
+
<Rect
|
23 |
+
height="45.5077"
|
24 |
+
rx="9.13723"
|
25 |
+
strokeWidth="1.75"
|
26 |
+
transform="matrix(0 1 -1 0 191.5074 -96.0026)"
|
27 |
+
width="18.2745"
|
28 |
+
x="143.755"
|
29 |
+
y="47.7524"
|
30 |
+
/>
|
31 |
+
<Rect
|
32 |
+
height="42.3038"
|
33 |
+
rx="8.73674"
|
34 |
+
strokeWidth="1.75"
|
35 |
+
transform="matrix(0 1 -1 0 241.97 -50.348)"
|
36 |
+
width="17.4735"
|
37 |
+
x="146.159"
|
38 |
+
y="95.811"
|
39 |
+
/>
|
40 |
+
<Rect
|
41 |
+
height="55.9204"
|
42 |
+
rx="8.73674"
|
43 |
+
strokeWidth="1.75"
|
44 |
+
transform="matrix(0 1 -1 0 213.1347 -85.5913)"
|
45 |
+
width="17.4735"
|
46 |
+
x="149.363"
|
47 |
+
y="63.7717"
|
48 |
+
/>
|
49 |
+
<Rect
|
50 |
+
height="51.1145"
|
51 |
+
rx="8.73674"
|
52 |
+
strokeWidth="1.75"
|
53 |
+
transform="matrix(0 1 -1 0 229.1545 -69.5715)"
|
54 |
+
width="17.4735"
|
55 |
+
x="149.363"
|
56 |
+
y="79.7915"
|
57 |
+
/>
|
58 |
+
<Path
|
59 |
+
d="m75.7483 105.349c.9858-25.6313-19.2235-42.0514-32.8401-44.0538v12.0146c8.5438 1.068 24.8303 9.7642 24.8303 36.0442 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z"
|
60 |
+
strokeWidth="1.75"
|
61 |
+
/>
|
62 |
+
<Path
|
63 |
+
d="m68.5388 109.354c.9858-25.6312-19.2234-42.0513-32.8401-44.0537v12.0147c8.5438 1.0679 24.8303 9.7641 24.8303 36.044 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z"
|
64 |
+
strokeWidth="1.75"
|
65 |
+
/>
|
66 |
</G>
|
67 |
</SVG>
|
68 |
)
|
redux-core/extendify-sdk/src/components/icons/library/user.js
CHANGED
@@ -5,7 +5,12 @@ import { Path, SVG } from '@wordpress/primitives'
|
|
5 |
|
6 |
const user = (
|
7 |
<SVG fill="none" viewBox="0 0 25 25" xmlns="http://www.w3.org/2000/svg">
|
8 |
-
<Path
|
|
|
|
|
|
|
|
|
|
|
9 |
</SVG>
|
10 |
)
|
11 |
|
5 |
|
6 |
const user = (
|
7 |
<SVG fill="none" viewBox="0 0 25 25" xmlns="http://www.w3.org/2000/svg">
|
8 |
+
<Path
|
9 |
+
clipRule="evenodd"
|
10 |
+
d="m13 4c4.9545 0 9 4.04545 9 9 0 4.9545-4.0455 9-9 9-4.95455 0-9-4.0455-9-9 0-4.95455 4.04545-9 9-9zm5.0909 13.4545c-1.9545 3.8637-8.22726 3.8637-10.22726 0-.04546-.1818-.04546-.3636 0-.5454 2-3.8636 8.27276-3.8636 10.22726 0 .0909.1818.0909.3636 0 .5454zm-5.0909-8.90905c-1.2727 0-2.3182 1.04546-2.3182 2.31815 0 1.2728 1.0455 2.3182 2.3182 2.3182s2.3182-1.0454 2.3182-2.3182c0-1.27269-1.0455-2.31815-2.3182-2.31815z"
|
11 |
+
fill="currentColor"
|
12 |
+
fillRule="evenodd"
|
13 |
+
/>
|
14 |
</SVG>
|
15 |
)
|
16 |
|
redux-core/extendify-sdk/src/components/modals/Modal.js
CHANGED
@@ -1,62 +1,73 @@
|
|
1 |
import { Dialog, Transition } from '@headlessui/react'
|
2 |
-
import {
|
3 |
-
Fragment, useRef, forwardRef,
|
4 |
-
} from '@wordpress/element'
|
5 |
import { __ } from '@wordpress/i18n'
|
6 |
-
import { close } from '@wordpress/icons'
|
7 |
import { Button } from '@wordpress/components'
|
8 |
|
9 |
const CloseButton = (props) => {
|
10 |
-
return
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
17 |
}
|
18 |
|
19 |
-
export const Modal = forwardRef(
|
20 |
-
|
|
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
</div>
|
58 |
-
</
|
59 |
-
</
|
60 |
-
|
61 |
-
|
62 |
-
|
1 |
import { Dialog, Transition } from '@headlessui/react'
|
2 |
+
import { Fragment, useRef, forwardRef } from '@wordpress/element'
|
|
|
|
|
3 |
import { __ } from '@wordpress/i18n'
|
4 |
+
import { Icon, close } from '@wordpress/icons'
|
5 |
import { Button } from '@wordpress/components'
|
6 |
|
7 |
const CloseButton = (props) => {
|
8 |
+
return (
|
9 |
+
<Button
|
10 |
+
{...props}
|
11 |
+
icon={<Icon icon={close} />}
|
12 |
+
className="text-extendify-black opacity-75 hover:opacity-100"
|
13 |
+
showTooltip={false}
|
14 |
+
label={__('Close dialog', 'extendify-sdk')}
|
15 |
+
/>
|
16 |
+
)
|
17 |
}
|
18 |
|
19 |
+
export const Modal = forwardRef(
|
20 |
+
({ isOpen, heading, onRequestClose, children }, initialFocus) => {
|
21 |
+
const focusBackup = useRef(null)
|
22 |
|
23 |
+
return (
|
24 |
+
<Transition.Root appear show={isOpen} as={Fragment}>
|
25 |
+
<Dialog
|
26 |
+
as="div"
|
27 |
+
static
|
28 |
+
open={isOpen}
|
29 |
+
initialFocus={initialFocus ?? focusBackup}
|
30 |
+
className="extendify-sdk"
|
31 |
+
onClose={onRequestClose}>
|
32 |
+
<div className="fixed z-high inset-0 flex">
|
33 |
+
<Transition.Child
|
34 |
+
as={Fragment}
|
35 |
+
enter="ease-out duration-50 transition"
|
36 |
+
enterFrom="opacity-0"
|
37 |
+
enterTo="opacity-100">
|
38 |
+
<Dialog.Overlay className="fixed inset-0 bg-black bg-opacity-40 transition-opacity" />
|
39 |
+
</Transition.Child>
|
40 |
+
<Transition.Child
|
41 |
+
as={Fragment}
|
42 |
+
enter="ease-out duration-300 translate transform"
|
43 |
+
enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
|
44 |
+
enterTo="opacity-100 translate-y-0">
|
45 |
+
<div className="m-auto relative w-full">
|
46 |
+
<div className="bg-white shadow-modal items-center justify-center m-auto max-w-lg relative rounded-sm w-full">
|
47 |
+
{heading ? (
|
48 |
+
<div className="border-b flex justify-between items-center leading-none pl-6 py-2 pr-3">
|
49 |
+
<span className="text-base text-extendify-black whitespace-nowrap">
|
50 |
+
{heading}
|
51 |
+
</span>
|
52 |
+
<CloseButton
|
53 |
+
onClick={onRequestClose}
|
54 |
+
/>
|
55 |
+
</div>
|
56 |
+
) : (
|
57 |
+
<div className="absolute block px-6 py-4 top-0 right-0 ">
|
58 |
+
<CloseButton
|
59 |
+
ref={focusBackup}
|
60 |
+
onClick={onRequestClose}
|
61 |
+
/>
|
62 |
+
</div>
|
63 |
+
)}
|
64 |
+
<div>{children}</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</Transition.Child>
|
68 |
</div>
|
69 |
+
</Dialog>
|
70 |
+
</Transition.Root>
|
71 |
+
)
|
72 |
+
},
|
73 |
+
)
|
redux-core/extendify-sdk/src/components/modals/SettingsModal.js
CHANGED
@@ -6,15 +6,18 @@ import { Modal } from './Modal'
|
|
6 |
export default function SettingsModal({ isOpen, onClose }) {
|
7 |
const initialFocus = useRef(null)
|
8 |
|
9 |
-
return
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
<
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
20 |
}
|
6 |
export default function SettingsModal({ isOpen, onClose }) {
|
7 |
const initialFocus = useRef(null)
|
8 |
|
9 |
+
return (
|
10 |
+
<Modal
|
11 |
+
heading={__('Settings', 'extendify-sdk')}
|
12 |
+
isOpen={isOpen}
|
13 |
+
ref={initialFocus}
|
14 |
+
onRequestClose={onClose}>
|
15 |
+
<div className="flex p-6 justify-center">
|
16 |
+
<LoginInterface
|
17 |
+
initialFocus={initialFocus}
|
18 |
+
actionCallback={onClose}
|
19 |
+
/>
|
20 |
+
</div>
|
21 |
+
</Modal>
|
22 |
+
)
|
23 |
}
|
redux-core/extendify-sdk/src/components/modals/SplitModal.js
CHANGED
@@ -4,48 +4,48 @@ import { Dialog, Transition } from '@headlessui/react'
|
|
4 |
import { Fragment } from '@wordpress/element'
|
5 |
|
6 |
export default function SplitModal({ onRequestClose, isOpen, left, right }) {
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
<
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
</div>
|
45 |
</div>
|
46 |
-
</
|
47 |
-
</
|
48 |
-
</
|
49 |
-
</
|
50 |
-
|
51 |
}
|
4 |
import { Fragment } from '@wordpress/element'
|
5 |
|
6 |
export default function SplitModal({ onRequestClose, isOpen, left, right }) {
|
7 |
+
return (
|
8 |
+
<Transition.Root appear show={true} as={Fragment}>
|
9 |
+
<Dialog
|
10 |
+
as="div"
|
11 |
+
static
|
12 |
+
open={isOpen}
|
13 |
+
className="extendify-sdk"
|
14 |
+
onClose={onRequestClose}>
|
15 |
+
<div className="fixed z-high inset-0 flex">
|
16 |
+
<Transition.Child
|
17 |
+
as={Fragment}
|
18 |
+
enter="ease-out duration-50 transition"
|
19 |
+
enterFrom="opacity-0"
|
20 |
+
enterTo="opacity-100">
|
21 |
+
<Dialog.Overlay className="fixed inset-0 bg-black bg-opacity-40 transition-opacity" />
|
22 |
+
</Transition.Child>
|
23 |
+
<Transition.Child
|
24 |
+
as={Fragment}
|
25 |
+
enter="ease-out duration-300 translate transform"
|
26 |
+
enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
|
27 |
+
enterTo="opacity-100 translate-y-0">
|
28 |
+
<div className="m-auto">
|
29 |
+
<div className="shadow-modal relative m-8 md:m-0 max-w-md rounded-sm md:flex bg-gray-100 items-center justify-center md:max-w-2xl">
|
30 |
+
<button
|
31 |
+
onClick={onRequestClose}
|
32 |
+
className="absolute bg-transparent block p-4 top-0 right-0 rounded-md cursor-pointer text-gray-700 opacity-30 hover:opacity-100">
|
33 |
+
<span className="sr-only">
|
34 |
+
{__('Close', 'extendify-sdk')}
|
35 |
+
</span>
|
36 |
+
<Icon icon={close} />
|
37 |
+
</button>
|
38 |
+
<div className="rounded-md md:rounded-l-md md:rounded-tr-none bg-white p-12 text-center md:w-7/12 items-center">
|
39 |
+
{left}
|
40 |
+
</div>
|
41 |
+
<div className="justify-center md:justify-none md:w-6/12 p-10 text-black hidden md:block ">
|
42 |
+
{right}
|
43 |
+
</div>
|
44 |
</div>
|
45 |
</div>
|
46 |
+
</Transition.Child>
|
47 |
+
</div>
|
48 |
+
</Dialog>
|
49 |
+
</Transition.Root>
|
50 |
+
)
|
51 |
}
|
redux-core/extendify-sdk/src/components/notices/PromotionNotice.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Button } from '@wordpress/components'
|
2 |
+
|
3 |
+
export default function PromotionNotice({ promotionData }) {
|
4 |
+
console.log({ promotionData })
|
5 |
+
return (
|
6 |
+
<>
|
7 |
+
<span className="text-black">{promotionData?.text ?? ''}</span>
|
8 |
+
<span className="px-2 opacity-50" aria-hidden="true">
|
9 |
+
|
|
10 |
+
</span>
|
11 |
+
<div className="flex space-x-2 justify-center items-center">
|
12 |
+
{promotionData?.url && (
|
13 |
+
<Button
|
14 |
+
variant="link"
|
15 |
+
className="text-black underline hover:no-underline p-0 h-auto"
|
16 |
+
href={`${promotionData.url}?utm_source=${window.extendifySdkData.sdk_partner}`}
|
17 |
+
target="_blank">
|
18 |
+
{promotionData?.button_text}
|
19 |
+
</Button>
|
20 |
+
)}
|
21 |
+
</div>
|
22 |
+
</>
|
23 |
+
)
|
24 |
+
}
|
redux-core/extendify-sdk/src/components/notices/WelcomeNotice.js
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { __ } from '@wordpress/i18n'
|
2 |
+
import { Button } from '@wordpress/components'
|
3 |
+
import { useUserStore } from '../../state/User'
|
4 |
+
import { useGlobalStore } from '../../state/GlobalState'
|
5 |
+
|
6 |
+
export default function WelcomeNotice() {
|
7 |
+
const setOpen = useGlobalStore((state) => state.setOpen)
|
8 |
+
|
9 |
+
const disableLibrary = () => {
|
10 |
+
const button = document.getElementById(
|
11 |
+
'extendify-templates-inserter-btn',
|
12 |
+
)
|
13 |
+
button.classList.add('invisible')
|
14 |
+
useUserStore.setState({ enabled: false })
|
15 |
+
setOpen(false)
|
16 |
+
}
|
17 |
+
|
18 |
+
return (
|
19 |
+
<>
|
20 |
+
<span className="text-black">
|
21 |
+
{__('Welcome to the Extendify Library', 'extendify-sdk')}
|
22 |
+
</span>
|
23 |
+
<span className="px-2 opacity-50" aria-hidden="true">
|
24 |
+
|
|
25 |
+
</span>
|
26 |
+
<div className="flex space-x-2 justify-center items-center">
|
27 |
+
<Button
|
28 |
+
variant="link"
|
29 |
+
className="text-black underline hover:no-underline p-0 h-auto"
|
30 |
+
href={`https://extendify.com/welcome/?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=welcome-notice&utm_content=tell-me-more`}
|
31 |
+
target="_blank">
|
32 |
+
{__('Tell me more', 'extendify-sdk')}
|
33 |
+
</Button>
|
34 |
+
<span className="font-bold" aria-hidden="true">
|
35 |
+
•
|
36 |
+
</span>
|
37 |
+
<Button
|
38 |
+
variant="link"
|
39 |
+
className="text-black underline hover:no-underline p-0 h-auto"
|
40 |
+
onClick={disableLibrary}>
|
41 |
+
{__('Turn off the library', 'extendify-sdk')}
|
42 |
+
</Button>
|
43 |
+
</div>
|
44 |
+
</>
|
45 |
+
)
|
46 |
+
}
|
redux-core/extendify-sdk/src/config.js
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
export const templates = {
|
2 |
-
defaultType: 'pattern',
|
3 |
-
templatesPerRequest: 12,
|
4 |
-
}
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/hooks/helpers.js
CHANGED
@@ -5,7 +5,7 @@ export function useIsMounted() {
|
|
5 |
|
6 |
useEffect(() => {
|
7 |
isMounted.current = true
|
8 |
-
return () => isMounted.current = false
|
9 |
})
|
10 |
return isMounted
|
11 |
}
|
5 |
|
6 |
useEffect(() => {
|
7 |
isMounted.current = true
|
8 |
+
return () => (isMounted.current = false)
|
9 |
})
|
10 |
return isMounted
|
11 |
}
|
redux-core/extendify-sdk/src/hooks/useTaxonomies.js
CHANGED
@@ -3,9 +3,11 @@ import { Taxonomies as TaxonomiesApi } from '../api/Taxonomies'
|
|
3 |
import { useTaxonomyStore } from '../state/Taxonomies'
|
4 |
import { useTemplatesStore } from '../state/Templates'
|
5 |
|
6 |
-
export default function useTaxonomies(fetchImmediately=false) {
|
7 |
-
const setupDefaultTaxonomies = useTemplatesStore(
|
8 |
-
|
|
|
|
|
9 |
const fetchTaxonomies = useCallback(async () => {
|
10 |
let tax = await TaxonomiesApi.get()
|
11 |
// Only allow items that have the 'tax_' prefix
|
@@ -15,6 +17,9 @@ export default function useTaxonomies(fetchImmediately=false) {
|
|
15 |
taxFiltered[key] = tax[key]
|
16 |
return taxFiltered
|
17 |
}, {})
|
|
|
|
|
|
|
18 |
setTaxonomies(tax)
|
19 |
setupDefaultTaxonomies()
|
20 |
}, [setTaxonomies, setupDefaultTaxonomies])
|
3 |
import { useTaxonomyStore } from '../state/Taxonomies'
|
4 |
import { useTemplatesStore } from '../state/Templates'
|
5 |
|
6 |
+
export default function useTaxonomies(fetchImmediately = false) {
|
7 |
+
const setupDefaultTaxonomies = useTemplatesStore(
|
8 |
+
(state) => state.setupDefaultTaxonomies,
|
9 |
+
)
|
10 |
+
const setTaxonomies = useTaxonomyStore((state) => state.setTaxonomies)
|
11 |
const fetchTaxonomies = useCallback(async () => {
|
12 |
let tax = await TaxonomiesApi.get()
|
13 |
// Only allow items that have the 'tax_' prefix
|
17 |
taxFiltered[key] = tax[key]
|
18 |
return taxFiltered
|
19 |
}, {})
|
20 |
+
if (!Object.keys(tax)?.length) {
|
21 |
+
return
|
22 |
+
}
|
23 |
setTaxonomies(tax)
|
24 |
setupDefaultTaxonomies()
|
25 |
}, [setTaxonomies, setupDefaultTaxonomies])
|
redux-core/extendify-sdk/src/listeners/index.js
CHANGED
@@ -1,7 +1,3 @@
|
|
1 |
import { templateHandler } from './template-inserted'
|
2 |
import { softErrorHandler } from './softerror-encountered'
|
3 |
-
|
4 |
-
[
|
5 |
-
templateHandler,
|
6 |
-
softErrorHandler,
|
7 |
-
].forEach(listener => listener.register())
|
1 |
import { templateHandler } from './template-inserted'
|
2 |
import { softErrorHandler } from './softerror-encountered'
|
3 |
+
;[templateHandler, softErrorHandler].forEach((listener) => listener.register())
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/listeners/softerror-encountered.js
CHANGED
@@ -5,17 +5,22 @@ import RequiredPluginsModal from '../middleware/hasRequiredPlugins/RequiredPlugi
|
|
5 |
// use this to trigger an error from outside the application
|
6 |
export const softErrorHandler = {
|
7 |
register() {
|
8 |
-
window.addEventListener(
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
11 |
},
|
12 |
versionOutdated(error) {
|
13 |
-
render(
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
20 |
},
|
21 |
}
|
5 |
// use this to trigger an error from outside the application
|
6 |
export const softErrorHandler = {
|
7 |
register() {
|
8 |
+
window.addEventListener(
|
9 |
+
'extendify-sdk::softerror-encountered',
|
10 |
+
(event) => {
|
11 |
+
this[camelCase(event.detail.type)](event.detail)
|
12 |
+
},
|
13 |
+
)
|
14 |
},
|
15 |
versionOutdated(error) {
|
16 |
+
render(
|
17 |
+
<RequiredPluginsModal
|
18 |
+
title={error.data.title}
|
19 |
+
message={error.data.message}
|
20 |
+
buttonLabel={error.data.buttonLabel}
|
21 |
+
forceOpen={true}
|
22 |
+
/>,
|
23 |
+
document.getElementById('extendify-root'),
|
24 |
+
)
|
25 |
},
|
26 |
}
|
redux-core/extendify-sdk/src/listeners/template-inserted.js
CHANGED
@@ -9,18 +9,16 @@ export const templateHandler = {
|
|
9 |
const { createNotice } = dispatch('core/notices')
|
10 |
const increaseImports = useUserStore.getState().incrementImports
|
11 |
window.addEventListener('extendify-sdk::template-inserted', (event) => {
|
12 |
-
createNotice(
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
},
|
17 |
-
)
|
18 |
// This is put off to the stack in attempt to fix a bug where
|
19 |
// some users are having their imports go from 3->0 in an instant
|
20 |
setTimeout(() => {
|
21 |
increaseImports()
|
22 |
Templates.import(event.detail?.template)
|
23 |
-
},0)
|
24 |
})
|
25 |
},
|
26 |
}
|
9 |
const { createNotice } = dispatch('core/notices')
|
10 |
const increaseImports = useUserStore.getState().incrementImports
|
11 |
window.addEventListener('extendify-sdk::template-inserted', (event) => {
|
12 |
+
createNotice('info', __('Page layout Added'), {
|
13 |
+
isDismissible: true,
|
14 |
+
type: 'snackbar',
|
15 |
+
})
|
|
|
|
|
16 |
// This is put off to the stack in attempt to fix a bug where
|
17 |
// some users are having their imports go from 3->0 in an instant
|
18 |
setTimeout(() => {
|
19 |
increaseImports()
|
20 |
Templates.import(event.detail?.template)
|
21 |
+
}, 0)
|
22 |
})
|
23 |
},
|
24 |
}
|
redux-core/extendify-sdk/src/middleware/NeedsPermissionModal.js
CHANGED
@@ -6,36 +6,60 @@ import { useWantedTemplateStore } from '../state/Importing'
|
|
6 |
import { getPluginDescription } from '../util/general'
|
7 |
|
8 |
export default function NeedsPermissionModal() {
|
9 |
-
const wantedTemplate = useWantedTemplateStore(
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
const requiredPlugins = wantedTemplate?.fields?.required_plugins || []
|
12 |
-
return
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
6 |
import { getPluginDescription } from '../util/general'
|
7 |
|
8 |
export default function NeedsPermissionModal() {
|
9 |
+
const wantedTemplate = useWantedTemplateStore(
|
10 |
+
(store) => store.wantedTemplate,
|
11 |
+
)
|
12 |
+
const closeModal = () =>
|
13 |
+
render(
|
14 |
+
<ExtendifyLibrary show={true} />,
|
15 |
+
document.getElementById('extendify-root'),
|
16 |
+
)
|
17 |
const requiredPlugins = wantedTemplate?.fields?.required_plugins || []
|
18 |
+
return (
|
19 |
+
<Modal
|
20 |
+
title={__('Plugins required', 'extendify-sdk')}
|
21 |
+
isDismissible={false}>
|
22 |
+
<p
|
23 |
+
style={{
|
24 |
+
maxWidth: '400px',
|
25 |
+
}}>
|
26 |
+
{sprintf(
|
27 |
+
__(
|
28 |
+
'In order to add this %s to your site, the following plugins are required to be installed and activated.',
|
29 |
+
'extendify-sdk',
|
30 |
+
),
|
31 |
+
wantedTemplate?.fields?.type ?? 'template',
|
32 |
+
)}
|
33 |
+
</p>
|
34 |
+
<ul>
|
35 |
+
{
|
36 |
+
// Hardcoded temporarily to not force EP install
|
37 |
+
// requiredPlugins.map((plugin) =>
|
38 |
+
requiredPlugins
|
39 |
+
.filter((p) => p !== 'editorplus')
|
40 |
+
.map((plugin) => (
|
41 |
+
<li key={plugin}>{getPluginDescription(plugin)}</li>
|
42 |
+
))
|
43 |
+
}
|
44 |
+
</ul>
|
45 |
+
<p
|
46 |
+
style={{
|
47 |
+
maxWidth: '400px',
|
48 |
+
fontWeight: 'bold',
|
49 |
+
}}>
|
50 |
+
{__(
|
51 |
+
'Please contact a site admin for assistance in adding these plugins to your site.',
|
52 |
+
'extendify-sdk',
|
53 |
+
)}
|
54 |
+
</p>
|
55 |
+
<Button
|
56 |
+
isPrimary
|
57 |
+
onClick={closeModal}
|
58 |
+
style={{
|
59 |
+
boxShadow: 'none',
|
60 |
+
}}>
|
61 |
+
{__('Return to library', 'extendify-sdk')}
|
62 |
+
</Button>
|
63 |
+
</Modal>
|
64 |
+
)
|
65 |
}
|
redux-core/extendify-sdk/src/middleware/NeedsRegistrationModal.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
-
import {
|
3 |
-
Modal, Button, ButtonGroup,
|
4 |
-
} from '@wordpress/components'
|
5 |
import { render, useRef } from '@wordpress/element'
|
6 |
import { useUserStore } from '../state/User'
|
7 |
import { useState } from '@wordpress/element'
|
@@ -20,48 +18,70 @@ export default function NeedsRegistrationModal({ finished }) {
|
|
20 |
finished()
|
21 |
}
|
22 |
|
23 |
-
return
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
export function check() {
|
58 |
return {
|
59 |
id: 'NeedsRegistrationModal',
|
60 |
-
pass:
|
|
|
|
|
|
|
61 |
allow() {},
|
62 |
deny() {
|
63 |
return new Promise((finished) => {
|
64 |
-
render(
|
|
|
|
|
|
|
65 |
})
|
66 |
},
|
67 |
}
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
+
import { Modal, Button, ButtonGroup } from '@wordpress/components'
|
|
|
|
|
3 |
import { render, useRef } from '@wordpress/element'
|
4 |
import { useUserStore } from '../state/User'
|
5 |
import { useState } from '@wordpress/element'
|
18 |
finished()
|
19 |
}
|
20 |
|
21 |
+
return (
|
22 |
+
<Modal
|
23 |
+
className="extendify-sdk"
|
24 |
+
title={__('One last step...', 'extendify-sdk')}
|
25 |
+
isDismissible={false}>
|
26 |
+
<p className="m-0 mb-4 max-w-md">
|
27 |
+
{__(
|
28 |
+
'Register now to receive updates and special offers from Extendify',
|
29 |
+
'extendify-sdk',
|
30 |
+
)}
|
31 |
+
</p>
|
32 |
+
<form
|
33 |
+
onSubmit={registerAndContinue}
|
34 |
+
className="flex space-x-4 mb-8">
|
35 |
+
<div className="relative w-full max-w-xs">
|
36 |
+
<input
|
37 |
+
id="extendify-email-register"
|
38 |
+
required
|
39 |
+
onChange={(event) => setEmail(event.target.value)}
|
40 |
+
type="text"
|
41 |
+
className="extendify-special-input button-focus text-sm h-8 min-h-0 border border-gray-900 special-input placeholder-transparent rounded-none w-full px-2"
|
42 |
+
placeholder={__('Email', 'extendify-sdk')}
|
43 |
+
/>
|
44 |
+
<label
|
45 |
+
htmlFor="extendify-email-register"
|
46 |
+
className="-top-3 bg-white absolute left-1 px-1 transition-all">
|
47 |
+
{__('Email', 'extendify-sdk')}
|
48 |
+
</label>
|
49 |
+
</div>
|
50 |
+
<input type="submit" className="hidden" />
|
51 |
+
</form>
|
52 |
|
53 |
+
<ButtonGroup>
|
54 |
+
<Button ref={submitRef} isPrimary onClick={registerAndContinue}>
|
55 |
+
{__('Submit and import', 'extendify-sdk')}
|
56 |
+
</Button>
|
57 |
+
<Button
|
58 |
+
isTertiary
|
59 |
+
onClick={finished}
|
60 |
+
style={{
|
61 |
+
boxShadow: 'none',
|
62 |
+
margin: '0 4px',
|
63 |
+
}}>
|
64 |
+
{__('Skip and import', 'extendify-sdk')}
|
65 |
+
</Button>
|
66 |
+
</ButtonGroup>
|
67 |
+
</Modal>
|
68 |
+
)
|
69 |
}
|
70 |
|
71 |
export function check() {
|
72 |
return {
|
73 |
id: 'NeedsRegistrationModal',
|
74 |
+
pass: Boolean(
|
75 |
+
useUserStore.getState().registration?.email ||
|
76 |
+
useUserStore.getState().apiKey,
|
77 |
+
),
|
78 |
allow() {},
|
79 |
deny() {
|
80 |
return new Promise((finished) => {
|
81 |
+
render(
|
82 |
+
<NeedsRegistrationModal finished={finished} />,
|
83 |
+
document.getElementById('extendify-root'),
|
84 |
+
)
|
85 |
})
|
86 |
},
|
87 |
}
|
redux-core/extendify-sdk/src/middleware/ReloadRequiredModal.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
-
import {
|
3 |
-
Modal, Button, ButtonGroup,
|
4 |
-
} from '@wordpress/components'
|
5 |
import { useState } from '@wordpress/element'
|
6 |
import { dispatch, select } from '@wordpress/data'
|
7 |
|
@@ -21,23 +19,33 @@ export default function ReloadRequiredModal() {
|
|
21 |
reload()
|
22 |
return null
|
23 |
}
|
24 |
-
return
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
+
import { Modal, Button, ButtonGroup } from '@wordpress/components'
|
|
|
|
|
3 |
import { useState } from '@wordpress/element'
|
4 |
import { dispatch, select } from '@wordpress/data'
|
5 |
|
19 |
reload()
|
20 |
return null
|
21 |
}
|
22 |
+
return (
|
23 |
+
<Modal
|
24 |
+
title={__('Reload required', 'extendify-sdk')}
|
25 |
+
isDismissible={false}>
|
26 |
+
<p
|
27 |
+
style={{
|
28 |
+
maxWidth: '400px',
|
29 |
+
}}>
|
30 |
+
{__(
|
31 |
+
'Just one more thing! We need to reload the page to continue.',
|
32 |
+
'extendify-sdk',
|
33 |
+
)}
|
34 |
+
</p>
|
35 |
+
<ButtonGroup>
|
36 |
+
<Button isPrimary onClick={reload} disabled={isSaving}>
|
37 |
+
{__('Reload page', 'extendify-sdk')}
|
38 |
+
</Button>
|
39 |
+
<Button
|
40 |
+
isSecondary
|
41 |
+
onClick={saveChanges}
|
42 |
+
isBusy={isSaving}
|
43 |
+
style={{
|
44 |
+
margin: '0 4px',
|
45 |
+
}}>
|
46 |
+
{__('Save changes', 'extendify-sdk')}
|
47 |
+
</Button>
|
48 |
+
</ButtonGroup>
|
49 |
+
</Modal>
|
50 |
+
)
|
51 |
}
|
redux-core/extendify-sdk/src/middleware/hasPluginsActivated/ActivatePluginsModal.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
import { __, sprintf } from '@wordpress/i18n'
|
2 |
-
import {
|
3 |
-
Modal, Button, ButtonGroup,
|
4 |
-
} from '@wordpress/components'
|
5 |
import { render } from '@wordpress/element'
|
6 |
import ActivatingModal from './ActivatingModal'
|
7 |
import ExtendifyLibrary from '../../ExtendifyLibrary'
|
@@ -11,47 +9,73 @@ import { useUserStore } from '../../state/User'
|
|
11 |
import NeedsPermissionModal from '../NeedsPermissionModal'
|
12 |
|
13 |
export default function ActivatePluginsModal(props) {
|
14 |
-
const wantedTemplate = useWantedTemplateStore(
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
const requiredPlugins = wantedTemplate?.fields?.required_plugins || []
|
18 |
|
19 |
if (!useUserStore.getState()?.canActivatePlugins) {
|
20 |
-
return <NeedsPermissionModal/>
|
21 |
}
|
22 |
|
23 |
-
return
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
</
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
1 |
import { __, sprintf } from '@wordpress/i18n'
|
2 |
+
import { Modal, Button, ButtonGroup } from '@wordpress/components'
|
|
|
|
|
3 |
import { render } from '@wordpress/element'
|
4 |
import ActivatingModal from './ActivatingModal'
|
5 |
import ExtendifyLibrary from '../../ExtendifyLibrary'
|
9 |
import NeedsPermissionModal from '../NeedsPermissionModal'
|
10 |
|
11 |
export default function ActivatePluginsModal(props) {
|
12 |
+
const wantedTemplate = useWantedTemplateStore(
|
13 |
+
(store) => store.wantedTemplate,
|
14 |
+
)
|
15 |
+
const closeModal = () =>
|
16 |
+
render(
|
17 |
+
<ExtendifyLibrary show={true} />,
|
18 |
+
document.getElementById('extendify-root'),
|
19 |
+
)
|
20 |
+
const installPlugins = () =>
|
21 |
+
render(<ActivatingModal />, document.getElementById('extendify-root'))
|
22 |
const requiredPlugins = wantedTemplate?.fields?.required_plugins || []
|
23 |
|
24 |
if (!useUserStore.getState()?.canActivatePlugins) {
|
25 |
+
return <NeedsPermissionModal />
|
26 |
}
|
27 |
|
28 |
+
return (
|
29 |
+
<Modal
|
30 |
+
title={__('Activate required plugins', 'extendify-sdk')}
|
31 |
+
isDismissible={false}>
|
32 |
+
<div>
|
33 |
+
<p
|
34 |
+
style={{
|
35 |
+
maxWidth: '400px',
|
36 |
+
}}>
|
37 |
+
{props.message ??
|
38 |
+
__(
|
39 |
+
sprintf(
|
40 |
+
'There is just one more step. This %s requires the following plugins to be installed and activated:',
|
41 |
+
wantedTemplate?.fields?.type ?? 'template',
|
42 |
+
),
|
43 |
+
'extendify-sdk',
|
44 |
+
)}
|
45 |
+
</p>
|
46 |
+
<ul>
|
47 |
+
{
|
48 |
+
// Hardcoded temporarily to not force EP install
|
49 |
+
// requiredPlugins.map((plugin) =>
|
50 |
+
requiredPlugins
|
51 |
+
.filter((p) => p !== 'editorplus')
|
52 |
+
.map((plugin) => (
|
53 |
+
<li key={plugin}>
|
54 |
+
{getPluginDescription(plugin)}
|
55 |
+
</li>
|
56 |
+
))
|
57 |
+
}
|
58 |
+
</ul>
|
59 |
+
<ButtonGroup>
|
60 |
+
<Button isPrimary onClick={installPlugins}>
|
61 |
+
{__('Activate Plugins', 'extendify-sdk')}
|
62 |
+
</Button>
|
63 |
+
{props.showClose && (
|
64 |
+
<Button
|
65 |
+
isTertiary
|
66 |
+
onClick={closeModal}
|
67 |
+
style={{
|
68 |
+
boxShadow: 'none',
|
69 |
+
margin: '0 4px',
|
70 |
+
}}>
|
71 |
+
{__(
|
72 |
+
'No thanks, return to library',
|
73 |
+
'extendify-sdk',
|
74 |
+
)}
|
75 |
+
</Button>
|
76 |
+
)}
|
77 |
+
</ButtonGroup>
|
78 |
+
</div>
|
79 |
+
</Modal>
|
80 |
+
)
|
81 |
}
|
redux-core/extendify-sdk/src/middleware/hasPluginsActivated/ActivatingModal.js
CHANGED
@@ -8,40 +8,51 @@ import ReloadRequiredModal from '../ReloadRequiredModal'
|
|
8 |
|
9 |
export default function ActivatingModal() {
|
10 |
const [errorMessage, setErrorMessage] = useState('')
|
11 |
-
const wantedTemplate = useWantedTemplateStore(
|
|
|
|
|
12 |
|
13 |
// Hardcoded temporarily to not force EP install
|
14 |
// const required = wantedTemplate?.fields?.required_plugins
|
15 |
-
const required = wantedTemplate?.fields?.required_plugins.filter(
|
|
|
|
|
16 |
|
17 |
-
Plugins.installAndActivate(required)
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
})
|
21 |
-
}).then(async () => {
|
22 |
-
await new Promise((resolve) => setTimeout(resolve, 1000))
|
23 |
-
render(<ReloadRequiredModal />, document.getElementById('extendify-root'))
|
24 |
-
})
|
25 |
.catch(({ response }) => {
|
26 |
setErrorMessage(response.data.message)
|
27 |
})
|
28 |
|
29 |
if (errorMessage) {
|
30 |
-
return <ErrorActivating msg={errorMessage}/>
|
31 |
}
|
32 |
|
33 |
-
return
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
47 |
}
|
8 |
|
9 |
export default function ActivatingModal() {
|
10 |
const [errorMessage, setErrorMessage] = useState('')
|
11 |
+
const wantedTemplate = useWantedTemplateStore(
|
12 |
+
(store) => store.wantedTemplate,
|
13 |
+
)
|
14 |
|
15 |
// Hardcoded temporarily to not force EP install
|
16 |
// const required = wantedTemplate?.fields?.required_plugins
|
17 |
+
const required = wantedTemplate?.fields?.required_plugins.filter(
|
18 |
+
(p) => p !== 'editorplus',
|
19 |
+
)
|
20 |
|
21 |
+
Plugins.installAndActivate(required)
|
22 |
+
.then(() => {
|
23 |
+
useWantedTemplateStore.setState({
|
24 |
+
importOnLoad: true,
|
25 |
+
})
|
26 |
+
})
|
27 |
+
.then(async () => {
|
28 |
+
await new Promise((resolve) => setTimeout(resolve, 1000))
|
29 |
+
render(
|
30 |
+
<ReloadRequiredModal />,
|
31 |
+
document.getElementById('extendify-root'),
|
32 |
+
)
|
33 |
})
|
|
|
|
|
|
|
|
|
34 |
.catch(({ response }) => {
|
35 |
setErrorMessage(response.data.message)
|
36 |
})
|
37 |
|
38 |
if (errorMessage) {
|
39 |
+
return <ErrorActivating msg={errorMessage} />
|
40 |
}
|
41 |
|
42 |
+
return (
|
43 |
+
<Modal
|
44 |
+
title={__('Activating plugins', 'extendify-sdk')}
|
45 |
+
isDismissible={false}>
|
46 |
+
<Button
|
47 |
+
style={{
|
48 |
+
width: '100%',
|
49 |
+
}}
|
50 |
+
disabled
|
51 |
+
isPrimary
|
52 |
+
isBusy
|
53 |
+
onClick={() => {}}>
|
54 |
+
{__('Activating...', 'extendify-sdk')}
|
55 |
+
</Button>
|
56 |
+
</Modal>
|
57 |
+
)
|
58 |
}
|
redux-core/extendify-sdk/src/middleware/hasPluginsActivated/ErrorActivating.js
CHANGED
@@ -1,29 +1,34 @@
|
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
-
import {
|
3 |
-
Modal, Button, Notice,
|
4 |
-
} from '@wordpress/components'
|
5 |
import { render } from '@wordpress/element'
|
6 |
import ActivatePluginsModal from './ActivatePluginsModal'
|
7 |
|
8 |
export default function ErrorActivating({ msg }) {
|
9 |
const goBack = () => {
|
10 |
-
render(
|
|
|
|
|
|
|
11 |
}
|
12 |
|
13 |
-
return
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
}
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
+
import { Modal, Button, Notice } from '@wordpress/components'
|
|
|
|
|
3 |
import { render } from '@wordpress/element'
|
4 |
import ActivatePluginsModal from './ActivatePluginsModal'
|
5 |
|
6 |
export default function ErrorActivating({ msg }) {
|
7 |
const goBack = () => {
|
8 |
+
render(
|
9 |
+
<ActivatePluginsModal />,
|
10 |
+
document.getElementById('extendify-root'),
|
11 |
+
)
|
12 |
}
|
13 |
|
14 |
+
return (
|
15 |
+
<Modal
|
16 |
+
style={{
|
17 |
+
maxWidth: '500px',
|
18 |
+
}}
|
19 |
+
title={__('Error Activating plugins', 'extendify-sdk')}
|
20 |
+
isDismissible={false}>
|
21 |
+
{__(
|
22 |
+
'You have encountered an error that we cannot recover from. Please try again.',
|
23 |
+
'extendify-sdk',
|
24 |
+
)}
|
25 |
+
<br />
|
26 |
+
<Notice isDismissible={false} status="error">
|
27 |
+
{msg}
|
28 |
+
</Notice>
|
29 |
+
<Button isPrimary onClick={goBack}>
|
30 |
+
{__('Go back', 'extendify-sdk')}
|
31 |
+
</Button>
|
32 |
+
</Modal>
|
33 |
+
)
|
34 |
}
|
redux-core/extendify-sdk/src/middleware/hasPluginsActivated/index.js
CHANGED
@@ -9,7 +9,10 @@ export const hasPluginsActivated = async (template) => {
|
|
9 |
allow() {},
|
10 |
deny() {
|
11 |
return new Promise(() => {
|
12 |
-
render(
|
|
|
|
|
|
|
13 |
})
|
14 |
},
|
15 |
}
|
9 |
allow() {},
|
10 |
deny() {
|
11 |
return new Promise(() => {
|
12 |
+
render(
|
13 |
+
<ActivatePluginsModal showClose={true} />,
|
14 |
+
document.getElementById('extendify-root'),
|
15 |
+
)
|
16 |
})
|
17 |
},
|
18 |
}
|
redux-core/extendify-sdk/src/middleware/hasRequiredPlugins/ErrorInstalling.js
CHANGED
@@ -1,25 +1,33 @@
|
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
-
import {
|
3 |
-
Modal, Button, Notice,
|
4 |
-
} from '@wordpress/components'
|
5 |
import { render } from '@wordpress/element'
|
6 |
import RequiredPluginsModal from './RequiredPluginsModal'
|
7 |
|
8 |
export default function ErrorInstalling({ msg }) {
|
9 |
-
const goBack = () =>
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
return
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
1 |
import { __ } from '@wordpress/i18n'
|
2 |
+
import { Modal, Button, Notice } from '@wordpress/components'
|
|
|
|
|
3 |
import { render } from '@wordpress/element'
|
4 |
import RequiredPluginsModal from './RequiredPluginsModal'
|
5 |
|
6 |
export default function ErrorInstalling({ msg }) {
|
7 |
+
const goBack = () =>
|
8 |
+
render(
|
9 |
+
<RequiredPluginsModal />,
|
10 |
+
document.getElementById('extendify-root'),
|
11 |
+
)
|
12 |
|
13 |
+
return (
|
14 |
+
<Modal
|
15 |
+
style={{
|
16 |
+
maxWidth: '500px',
|
17 |
+
}}
|
18 |
+
title={__('Error installing plugins', 'extendify-sdk')}
|
19 |
+
isDismissible={false}>
|
20 |
+
{__(
|
21 |
+
'You have encountered an error that we cannot recover from. Please try again.',
|
22 |
+
'extendify-sdk',
|
23 |
+
)}
|
24 |
+
<br />
|
25 |
+
<Notice isDismissible={false} status="error">
|
26 |
+
{msg}
|
27 |
+
</Notice>
|
28 |
+
<Button isPrimary onClick={goBack}>
|
29 |
+
{__('Go back', 'extendify-sdk')}
|
30 |
+
</Button>
|
31 |
+
</Modal>
|
32 |
+
)
|
33 |
}
|
redux-core/extendify-sdk/src/middleware/hasRequiredPlugins/InstallingModal.js
CHANGED
@@ -8,33 +8,48 @@ import ReloadRequiredModal from '../ReloadRequiredModal'
|
|
8 |
|
9 |
export default function InstallingModal() {
|
10 |
const [errorMessage, setErrorMessage] = useState('')
|
11 |
-
const wantedTemplate = useWantedTemplateStore(
|
|
|
|
|
12 |
|
13 |
// Hardcoded temporarily to not force EP install
|
14 |
// const required = wantedTemplate?.fields?.required_plugins
|
15 |
-
const required = wantedTemplate?.fields?.required_plugins.filter(
|
|
|
|
|
16 |
|
17 |
-
Plugins.installAndActivate(required)
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
})
|
21 |
-
render(<ReloadRequiredModal />, document.getElementById('extendify-root'))
|
22 |
-
})
|
23 |
.catch(({ message }) => {
|
24 |
setErrorMessage(message)
|
25 |
})
|
26 |
|
27 |
if (errorMessage) {
|
28 |
-
return <ErrorInstalling msg={errorMessage}/>
|
29 |
}
|
30 |
|
31 |
-
return
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
8 |
|
9 |
export default function InstallingModal() {
|
10 |
const [errorMessage, setErrorMessage] = useState('')
|
11 |
+
const wantedTemplate = useWantedTemplateStore(
|
12 |
+
(store) => store.wantedTemplate,
|
13 |
+
)
|
14 |
|
15 |
// Hardcoded temporarily to not force EP install
|
16 |
// const required = wantedTemplate?.fields?.required_plugins
|
17 |
+
const required = wantedTemplate?.fields?.required_plugins.filter(
|
18 |
+
(p) => p !== 'editorplus',
|
19 |
+
)
|
20 |
|
21 |
+
Plugins.installAndActivate(required)
|
22 |
+
.then(() => {
|
23 |
+
useWantedTemplateStore.setState({
|
24 |
+
importOnLoad: true,
|
25 |
+
})
|
26 |
+
render(
|
27 |
+
<ReloadRequiredModal />,
|
28 |
+
document.getElementById('extendify-root'),
|
29 |
+
)
|
30 |
})
|
|
|
|
|
31 |
.catch(({ message }) => {
|
32 |
setErrorMessage(message)
|
33 |
})
|
34 |
|
35 |
if (errorMessage) {
|
36 |
+
return <ErrorInstalling msg={errorMessage} />
|
37 |
}
|
38 |
|
39 |
+
return (
|
40 |
+
<Modal
|
41 |
+
title={__('Installing plugins', 'extendify-sdk')}
|
42 |
+
isDismissible={false}>
|
43 |
+
<Button
|
44 |
+
style={{
|
45 |
+
width: '100%',
|
46 |
+
}}
|
47 |
+
disabled
|
48 |
+
isPrimary
|
49 |
+
isBusy
|
50 |
+
onClick={() => {}}>
|
51 |
+
{__('Installing...', 'extendify-sdk')}
|
52 |
+
</Button>
|
53 |
+
</Modal>
|
54 |
+
)
|
55 |
}
|
redux-core/extendify-sdk/src/middleware/hasRequiredPlugins/RequiredPluginsModal.js
CHANGED
@@ -1,8 +1,6 @@
|
|
1 |
import { __, sprintf } from '@wordpress/i18n'
|
2 |
import ExtendifyLibrary from '../../ExtendifyLibrary'
|
3 |
-
import {
|
4 |
-
Modal, Button, ButtonGroup,
|
5 |
-
} from '@wordpress/components'
|
6 |
import { render } from '@wordpress/element'
|
7 |
import InstallingModal from './InstallingModal'
|
8 |
import { useWantedTemplateStore } from '../../state/Importing'
|
@@ -11,50 +9,77 @@ import { useUserStore } from '../../state/User'
|
|
11 |
import NeedsPermissionModal from '../NeedsPermissionModal'
|
12 |
|
13 |
export default function RequiredPluginsModal(props) {
|
14 |
-
const wantedTemplate = useWantedTemplateStore(
|
|
|
|
|
15 |
const closeModal = () => {
|
16 |
if (props.forceOpen) {
|
17 |
return
|
18 |
}
|
19 |
-
render(
|
|
|
|
|
|
|
20 |
}
|
21 |
-
const installPlugins = () =>
|
|
|
22 |
const requiredPlugins = wantedTemplate?.fields?.required_plugins || []
|
23 |
|
24 |
if (!useUserStore.getState()?.canInstallPlugins) {
|
25 |
-
return <NeedsPermissionModal/>
|
26 |
}
|
27 |
|
28 |
-
return
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
<p style={{
|
33 |
-
maxWidth: '400px',
|
34 |
-
}}>
|
35 |
-
{props.message ?? __(sprintf('There is just one more step. This %s requires the following to be automatically installed and activated:',
|
36 |
-
wantedTemplate?.fields?.type ?? 'template'),
|
37 |
-
'extendify-sdk')}
|
38 |
-
</p>
|
39 |
-
{props.message?.length > 0 || <ul>
|
40 |
-
{
|
41 |
-
// Hardcoded temporarily to not force EP install
|
42 |
-
// requiredPlugins.map((plugin) =>
|
43 |
-
requiredPlugins.filter((p) => p !== 'editorplus').map((plugin) =>
|
44 |
-
<li key={plugin}>
|
45 |
-
{getPluginDescription(plugin)}
|
46 |
-
</li>)
|
47 |
}
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
1 |
import { __, sprintf } from '@wordpress/i18n'
|
2 |
import ExtendifyLibrary from '../../ExtendifyLibrary'
|
3 |
+
import { Modal, Button, ButtonGroup } from '@wordpress/components'
|
|
|
|
|
4 |
import { render } from '@wordpress/element'
|
5 |
import InstallingModal from './InstallingModal'
|
6 |
import { useWantedTemplateStore } from '../../state/Importing'
|
9 |
import NeedsPermissionModal from '../NeedsPermissionModal'
|
10 |
|
11 |
export default function RequiredPluginsModal(props) {
|
12 |
+
const wantedTemplate = useWantedTemplateStore(
|
13 |
+
(store) => store.wantedTemplate,
|
14 |
+
)
|
15 |
const closeModal = () => {
|
16 |
if (props.forceOpen) {
|
17 |
return
|
18 |
}
|
19 |
+
render(
|
20 |
+
<ExtendifyLibrary show={true} />,
|
21 |
+
document.getElementById('extendify-root'),
|
22 |
+
)
|
23 |
}
|
24 |
+
const installPlugins = () =>
|
25 |
+
render(<InstallingModal />, document.getElementById('extendify-root'))
|
26 |
const requiredPlugins = wantedTemplate?.fields?.required_plugins || []
|
27 |
|
28 |
if (!useUserStore.getState()?.canInstallPlugins) {
|
29 |
+
return <NeedsPermissionModal />
|
30 |
}
|
31 |
|
32 |
+
return (
|
33 |
+
<Modal
|
34 |
+
title={
|
35 |
+
props.title ?? __('Install required plugins', 'extendify-sdk')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
+
isDismissible={false}>
|
38 |
+
<p
|
39 |
+
style={{
|
40 |
+
maxWidth: '400px',
|
41 |
+
}}>
|
42 |
+
{props.message ??
|
43 |
+
__(
|
44 |
+
sprintf(
|
45 |
+
'There is just one more step. This %s requires the following to be automatically installed and activated:',
|
46 |
+
wantedTemplate?.fields?.type ?? 'template',
|
47 |
+
),
|
48 |
+
'extendify-sdk',
|
49 |
+
)}
|
50 |
+
</p>
|
51 |
+
{props.message?.length > 0 || (
|
52 |
+
<ul>
|
53 |
+
{
|
54 |
+
// Hardcoded temporarily to not force EP install
|
55 |
+
// requiredPlugins.map((plugin) =>
|
56 |
+
requiredPlugins
|
57 |
+
.filter((p) => p !== 'editorplus')
|
58 |
+
.map((plugin) => (
|
59 |
+
<li key={plugin}>
|
60 |
+
{getPluginDescription(plugin)}
|
61 |
+
</li>
|
62 |
+
))
|
63 |
+
}
|
64 |
+
</ul>
|
65 |
+
)}
|
66 |
+
<ButtonGroup>
|
67 |
+
<Button isPrimary onClick={installPlugins}>
|
68 |
+
{props.buttonLabel ??
|
69 |
+
__('Install Plugins', 'extendify-sdk')}
|
70 |
+
</Button>
|
71 |
+
{props.forceOpen || (
|
72 |
+
<Button
|
73 |
+
isTertiary
|
74 |
+
onClick={closeModal}
|
75 |
+
style={{
|
76 |
+
boxShadow: 'none',
|
77 |
+
margin: '0 4px',
|
78 |
+
}}>
|
79 |
+
{__('No thanks, take me back', 'extendify-sdk')}
|
80 |
+
</Button>
|
81 |
+
)}
|
82 |
+
</ButtonGroup>
|
83 |
+
</Modal>
|
84 |
+
)
|
85 |
}
|
redux-core/extendify-sdk/src/middleware/hasRequiredPlugins/index.js
CHANGED
@@ -9,7 +9,10 @@ export const hasRequiredPlugins = async (template) => {
|
|
9 |
allow() {},
|
10 |
deny() {
|
11 |
return new Promise(() => {
|
12 |
-
render(
|
|
|
|
|
|
|
13 |
})
|
14 |
},
|
15 |
}
|
9 |
allow() {},
|
10 |
deny() {
|
11 |
return new Promise(() => {
|
12 |
+
render(
|
13 |
+
<RequiredPluginsModal />,
|
14 |
+
document.getElementById('extendify-root'),
|
15 |
+
)
|
16 |
})
|
17 |
},
|
18 |
}
|
redux-core/extendify-sdk/src/middleware/helpers.js
CHANGED
@@ -17,11 +17,11 @@ export async function checkIfUserNeedsToInstallPlugins(template) {
|
|
17 |
// if no dependencies are required, then this will be false automatically
|
18 |
const weNeedInstalls = required.length
|
19 |
? required.filter((plugin) => {
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
: false
|
26 |
|
27 |
return weNeedInstalls.length
|
@@ -43,11 +43,11 @@ export async function checkIfUserNeedsToActivatePlugins(template) {
|
|
43 |
// if no dependencies are required, then this will be false automatically
|
44 |
const weNeedActivations = required.length
|
45 |
? required.filter((plugin) => {
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
: false
|
52 |
|
53 |
// if the plugins we need to have activated are not even installed, handle them elsewhere
|
17 |
// if no dependencies are required, then this will be false automatically
|
18 |
const weNeedInstalls = required.length
|
19 |
? required.filter((plugin) => {
|
20 |
+
// TODO: if we have better data to work with this can be more literal
|
21 |
+
return !installedPlugins.some((k) => {
|
22 |
+
return k.includes(plugin)
|
23 |
+
})
|
24 |
+
})
|
25 |
: false
|
26 |
|
27 |
return weNeedInstalls.length
|
43 |
// if no dependencies are required, then this will be false automatically
|
44 |
const weNeedActivations = required.length
|
45 |
? required.filter((plugin) => {
|
46 |
+
// TODO: if we have better data to work with this can be more literal
|
47 |
+
return !activatedPlugins.some((k) => {
|
48 |
+
return k.includes(plugin)
|
49 |
+
})
|
50 |
+
})
|
51 |
: false
|
52 |
|
53 |
// if the plugins we need to have activated are not even installed, handle them elsewhere
|
redux-core/extendify-sdk/src/middleware/index.js
CHANGED
@@ -11,9 +11,7 @@ export const Middleware = (middleware = []) => {
|
|
11 |
async check(template) {
|
12 |
for (const m of middleware) {
|
13 |
const cb = await this[`${m}`](template)
|
14 |
-
this.stack.push(cb.pass
|
15 |
-
? cb.allow
|
16 |
-
: cb.deny)
|
17 |
}
|
18 |
},
|
19 |
reset() {
|
11 |
async check(template) {
|
12 |
for (const m of middleware) {
|
13 |
const cb = await this[`${m}`](template)
|
14 |
+
this.stack.push(cb.pass ? cb.allow : cb.deny)
|
|
|
|
|
15 |
}
|
16 |
},
|
17 |
reset() {
|
redux-core/extendify-sdk/src/pages/GridView.js
CHANGED
@@ -1,33 +1,200 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
import { __ } from '@wordpress/i18n'
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
export default function GridView() {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
</div>
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import Masonry from 'react-masonry-css'
|
5 |
+
|
6 |
+
/**
|
7 |
+
* WordPress dependencies
|
8 |
+
*/
|
9 |
+
import { useEffect, useState, useCallback, useRef } from '@wordpress/element'
|
10 |
+
import { Spinner, Button } from '@wordpress/components'
|
11 |
import { __ } from '@wordpress/i18n'
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Internal dependencies
|
15 |
+
*/
|
16 |
+
import { useTemplatesStore } from '../state/Templates'
|
17 |
+
import { Templates as TemplatesApi } from '../api/Templates'
|
18 |
+
import { useInView } from 'react-intersection-observer'
|
19 |
+
import { useIsMounted } from '../hooks/helpers'
|
20 |
+
import { ImportTemplateBlock } from '../components/ImportTemplateBlock'
|
21 |
|
22 |
export default function GridView() {
|
23 |
+
const isMounted = useIsMounted()
|
24 |
+
const templates = useTemplatesStore((state) => state.templates)
|
25 |
+
|
26 |
+
const appendTemplates = useTemplatesStore((state) => state.appendTemplates)
|
27 |
+
const [serverError, setServerError] = useState('')
|
28 |
+
const [nothingFound, setNothingFound] = useState(false)
|
29 |
+
// const [imagesLoaded, setImagesLoaded] = useState([])
|
30 |
+
const [loadMoreRef, inView] = useInView()
|
31 |
+
|
32 |
+
const updateSearchParams = useTemplatesStore(
|
33 |
+
(state) => state.updateSearchParams,
|
34 |
+
)
|
35 |
+
const searchParamsRaw = useTemplatesStore((state) => state.searchParams)
|
36 |
+
|
37 |
+
// Store the next page in case we have pagination
|
38 |
+
const nextPage = useRef(useTemplatesStore.getState().nextPage)
|
39 |
+
const searchParams = useRef(useTemplatesStore.getState().searchParams)
|
40 |
+
// Connect to the store on mount, disconnect on unmount, catch state-changes in a reference
|
41 |
+
useEffect(
|
42 |
+
() =>
|
43 |
+
useTemplatesStore.subscribe(
|
44 |
+
(n) => (nextPage.current = n),
|
45 |
+
(state) => state.nextPage,
|
46 |
+
),
|
47 |
+
[],
|
48 |
+
)
|
49 |
+
useEffect(
|
50 |
+
() =>
|
51 |
+
useTemplatesStore.subscribe(
|
52 |
+
(s) => (searchParams.current = s),
|
53 |
+
(state) => state.searchParams,
|
54 |
+
),
|
55 |
+
[],
|
56 |
+
)
|
57 |
+
|
58 |
+
// Fetch the templates then add them to the current state
|
59 |
+
// TODO: This works, but it's not really doing what it's intended to do
|
60 |
+
// as it has a side effect in there, and isn't pure.
|
61 |
+
// It could be extracted to a hook
|
62 |
+
const fetchTemplates = useCallback(async () => {
|
63 |
+
setServerError('')
|
64 |
+
setNothingFound(false)
|
65 |
+
const response = await TemplatesApi.get(searchParams.current, {
|
66 |
+
offset: nextPage.current,
|
67 |
+
}).catch((error) => {
|
68 |
+
console.error(error)
|
69 |
+
setServerError(
|
70 |
+
error && error.message
|
71 |
+
? error.message
|
72 |
+
: __(
|
73 |
+
'Unknown error occured. Check browser console or contact support.',
|
74 |
+
'extendify-sdk',
|
75 |
+
),
|
76 |
+
)
|
77 |
+
})
|
78 |
+
if (!isMounted.current) {
|
79 |
+
return
|
80 |
+
}
|
81 |
+
if (response?.error?.length) {
|
82 |
+
setServerError(response?.error)
|
83 |
+
}
|
84 |
+
if (response?.records && searchParamsRaw === searchParams.current) {
|
85 |
+
useTemplatesStore.setState({
|
86 |
+
nextPage: response.offset,
|
87 |
+
})
|
88 |
+
appendTemplates(response.records)
|
89 |
+
setNothingFound(response.records.length <= 0)
|
90 |
+
}
|
91 |
+
}, [searchParamsRaw, appendTemplates, isMounted])
|
92 |
+
|
93 |
+
// This is the main driver for loading templates
|
94 |
+
// This loads the initial batch of templates. But if we don't yet have taxonomies.
|
95 |
+
// There's also an option to skip loading on first mount
|
96 |
+
useEffect(() => {
|
97 |
+
if (!Object.keys(searchParams.current.taxonomies).length) {
|
98 |
+
return
|
99 |
+
}
|
100 |
+
|
101 |
+
if (useTemplatesStore.getState().skipNextFetch) {
|
102 |
+
// This is useful if the templates are fetched already and
|
103 |
+
// the library moves to/from another state that re-renders
|
104 |
+
// The point is to keep the logic close to the list. That may change someday
|
105 |
+
useTemplatesStore.setState({
|
106 |
+
skipNextFetch: false,
|
107 |
+
})
|
108 |
+
return
|
109 |
+
}
|
110 |
+
// setImagesLoaded([])
|
111 |
+
fetchTemplates()
|
112 |
+
}, [fetchTemplates, searchParams])
|
113 |
+
|
114 |
+
// Fetches when the load more is in view
|
115 |
+
useEffect(() => {
|
116 |
+
inView && fetchTemplates()
|
117 |
+
}, [inView, fetchTemplates])
|
118 |
+
|
119 |
+
if (serverError.length) {
|
120 |
+
return (
|
121 |
+
<div className="text-left">
|
122 |
+
<h2 className="text-left">
|
123 |
+
{__('Server error', 'extendify-sdk')}
|
124 |
+
</h2>
|
125 |
+
<code
|
126 |
+
className="block max-w-xl p-4 mb-4"
|
127 |
+
style={{
|
128 |
+
minHeight: '10rem',
|
129 |
+
}}>
|
130 |
+
{serverError}
|
131 |
+
</code>
|
132 |
+
<Button
|
133 |
+
isTertiary
|
134 |
+
onClick={() => {
|
135 |
+
// setImagesLoaded([])
|
136 |
+
updateSearchParams({
|
137 |
+
taxonomies: {},
|
138 |
+
search: '',
|
139 |
+
})
|
140 |
+
fetchTemplates()
|
141 |
+
}}>
|
142 |
+
{__('Press here to reload experience')}
|
143 |
+
</Button>
|
144 |
</div>
|
145 |
+
)
|
146 |
+
}
|
147 |
+
|
148 |
+
if (nothingFound) {
|
149 |
+
return (
|
150 |
+
<h2 className="text-left">
|
151 |
+
{__('No results found.', 'extendify-sdk')}
|
152 |
+
</h2>
|
153 |
+
)
|
154 |
+
}
|
155 |
+
|
156 |
+
if (!templates.length) {
|
157 |
+
return (
|
158 |
+
<div className="flex items-center justify-center w-full sm:mt-64">
|
159 |
+
<Spinner />
|
160 |
+
</div>
|
161 |
+
)
|
162 |
+
}
|
163 |
+
|
164 |
+
const breakpointColumnsObj = {
|
165 |
+
default: 2,
|
166 |
+
1320: 2,
|
167 |
+
860: 1,
|
168 |
+
599: 2,
|
169 |
+
400: 1,
|
170 |
+
}
|
171 |
+
|
172 |
+
return (
|
173 |
+
<>
|
174 |
+
<Masonry
|
175 |
+
breakpointCols={breakpointColumnsObj}
|
176 |
+
className="flex -ml-8 w-auto pb-40 pt-0.5 pl-0.5"
|
177 |
+
columnClassName="pl-8 bg-clip-padding min-h-screen">
|
178 |
+
{templates.map((template) => {
|
179 |
+
return (
|
180 |
+
<ImportTemplateBlock
|
181 |
+
key={template.id}
|
182 |
+
template={template}
|
183 |
+
/>
|
184 |
+
)
|
185 |
+
})}
|
186 |
+
</Masonry>
|
187 |
+
{useTemplatesStore.getState().nextPage && (
|
188 |
+
<>
|
189 |
+
<div className="transform -translate-y-20">
|
190 |
+
<Spinner />
|
191 |
+
</div>
|
192 |
+
<div
|
193 |
+
className="-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text"
|
194 |
+
ref={loadMoreRef}
|
195 |
+
style={{ zIndex: -1 }}></div>
|
196 |
+
</>
|
197 |
+
)}
|
198 |
+
</>
|
199 |
+
)
|
200 |
}
|
redux-core/extendify-sdk/src/pages/MainContent.js
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
import { useTemplatesStore } from '../state/Templates'
|
2 |
-
import SidebarMain from '../layout/sidebars/SidebarMain'
|
3 |
-
import TemplatesList from './TemplatesList'
|
4 |
-
import TemplatesSingle from './TemplatesSingle'
|
5 |
-
import HasSidebar from '../layout/HasSidebar'
|
6 |
-
import TypeSelect from '../components/TypeSelect'
|
7 |
-
import { __ } from '@wordpress/i18n'
|
8 |
-
import SidebarSingle from '../layout/sidebars/SidebarSingle'
|
9 |
-
import Toolbar from '../layout/Toolbar'
|
10 |
-
|
11 |
-
export default function MainContent({ setOpen }) {
|
12 |
-
const activeTemplate = useTemplatesStore(state => state.activeTemplate)
|
13 |
-
return <div className="bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto">
|
14 |
-
<Toolbar
|
15 |
-
className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"
|
16 |
-
hideLibrary={() => setOpen(false)}/>
|
17 |
-
<div className="w-full flex-grow overflow-hidden">
|
18 |
-
<a href="#extendify-templates" className="sr-only focus:not-sr-only focus:text-blue-500">
|
19 |
-
{__('Skip to content', 'extendify-sdk')}
|
20 |
-
</a>
|
21 |
-
<div className="sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full">
|
22 |
-
{!!Object.keys(activeTemplate).length &&
|
23 |
-
<div className="absolute bg-white sm:flex inset-0 z-50 sm:space-x-12">
|
24 |
-
<HasSidebar>
|
25 |
-
<SidebarSingle template={activeTemplate}/>
|
26 |
-
<TemplatesSingle template={activeTemplate}/>
|
27 |
-
</HasSidebar>
|
28 |
-
</div>
|
29 |
-
}
|
30 |
-
<HasSidebar>
|
31 |
-
<SidebarMain/>
|
32 |
-
<>
|
33 |
-
<TypeSelect/>
|
34 |
-
{/* TODO: we may want to inject this as a portal so it can directly share state with SidebarMain.js */}
|
35 |
-
<div className="relative h-full z-30 bg-white">
|
36 |
-
<div className="absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40">
|
37 |
-
<TemplatesList/>
|
38 |
-
</div>
|
39 |
-
</div>
|
40 |
-
</>
|
41 |
-
</HasSidebar>
|
42 |
-
</div>
|
43 |
-
</div>
|
44 |
-
</div>
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/pages/{parts/MainWindow.js → MainWindow.js}
RENAMED
@@ -1,14 +1,13 @@
|
|
1 |
import { Fragment, useRef } from '@wordpress/element'
|
2 |
import { Dialog, Transition } from '@headlessui/react'
|
3 |
-
import { useGlobalStore } from '
|
4 |
-
import
|
5 |
-
import
|
6 |
|
7 |
export default function MainWindow() {
|
8 |
const containerRef = useRef(null)
|
9 |
-
const open = useGlobalStore(state => state.open)
|
10 |
-
const setOpen = useGlobalStore(state => state.setOpen)
|
11 |
-
const currentPage = useGlobalStore(state => state.currentPage)
|
12 |
|
13 |
return (
|
14 |
<Transition.Root show={open} as={Fragment}>
|
@@ -17,30 +16,31 @@ export default function MainWindow() {
|
|
17 |
static
|
18 |
className="extendify-sdk"
|
19 |
initialFocus={containerRef}
|
20 |
-
onClose={() => setOpen(false)}
|
21 |
-
>
|
22 |
<div className="h-screen w-screen sm:h-auto m-auto sm:w-auto fixed z-high inset-0 overflow-y-auto">
|
23 |
-
<div className="flex h-
|
24 |
<Transition.Child
|
25 |
as={Fragment}
|
26 |
-
enter="ease-out duration-
|
27 |
enterFrom="opacity-0"
|
28 |
-
enterTo="opacity-100"
|
29 |
-
|
30 |
-
<Dialog.Overlay className="fixed inset-0 bg-black bg-opacity-30 transition-opacity" />
|
31 |
</Transition.Child>
|
32 |
<Transition.Child
|
33 |
as={Fragment}
|
34 |
-
enter="ease-out duration-300
|
35 |
enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
|
36 |
-
enterTo="opacity-100 translate-y-0"
|
37 |
-
>
|
38 |
<div
|
39 |
ref={containerRef}
|
40 |
tabIndex="0"
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
44 |
</div>
|
45 |
</Transition.Child>
|
46 |
</div>
|
1 |
import { Fragment, useRef } from '@wordpress/element'
|
2 |
import { Dialog, Transition } from '@headlessui/react'
|
3 |
+
import { useGlobalStore } from '../state/GlobalState'
|
4 |
+
import Layout from './layout/Layout'
|
5 |
+
import FooterNotice from '../components/FooterNotice'
|
6 |
|
7 |
export default function MainWindow() {
|
8 |
const containerRef = useRef(null)
|
9 |
+
const open = useGlobalStore((state) => state.open)
|
10 |
+
const setOpen = useGlobalStore((state) => state.setOpen)
|
|
|
11 |
|
12 |
return (
|
13 |
<Transition.Root show={open} as={Fragment}>
|
16 |
static
|
17 |
className="extendify-sdk"
|
18 |
initialFocus={containerRef}
|
19 |
+
onClose={() => setOpen(false)}>
|
|
|
20 |
<div className="h-screen w-screen sm:h-auto m-auto sm:w-auto fixed z-high inset-0 overflow-y-auto">
|
21 |
+
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
22 |
<Transition.Child
|
23 |
as={Fragment}
|
24 |
+
enter="ease-out duration-300"
|
25 |
enterFrom="opacity-0"
|
26 |
+
enterTo="opacity-100">
|
27 |
+
<Dialog.Overlay className="fixed inset-0 bg-black bg-opacity-40 transition-opacity" />
|
|
|
28 |
</Transition.Child>
|
29 |
<Transition.Child
|
30 |
as={Fragment}
|
31 |
+
enter="ease-out duration-300"
|
32 |
enterFrom="opacity-0 translate-y-4 sm:translate-y-5"
|
33 |
+
enterTo="opacity-100 translate-y-0">
|
|
|
34 |
<div
|
35 |
ref={containerRef}
|
36 |
tabIndex="0"
|
37 |
+
onClick={(e) =>
|
38 |
+
e.target === e.currentTarget &&
|
39 |
+
setOpen(false)
|
40 |
+
}
|
41 |
+
className="fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all p-2 lg:p-16">
|
42 |
+
<Layout />
|
43 |
+
<FooterNotice />
|
44 |
</div>
|
45 |
</Transition.Child>
|
46 |
</div>
|
redux-core/extendify-sdk/src/pages/Router.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
import GridView from './GridView.js'
|
2 |
-
import SingleView from './SingleView.js'
|
3 |
-
|
4 |
-
// This used to be doing more so we may be able to
|
5 |
-
// refactor it out since it's barely being used now
|
6 |
-
export default function Router({ page }) {
|
7 |
-
|
8 |
-
switch (page) {
|
9 |
-
case 'main': return <GridView/>
|
10 |
-
case 'single': return <SingleView/>
|
11 |
-
}
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/pages/Sidebar.js
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { useTemplatesStore } from '../state/Templates'
|
2 |
+
import { Panel } from '@wordpress/components'
|
3 |
+
import TaxonomySection from '../components/TaxonomySection'
|
4 |
+
import { useTaxonomyStore } from '../state/Taxonomies'
|
5 |
+
import SiteTypeSelector from '../components/SiteTypeSelector'
|
6 |
+
import { useUserStore } from '../state/User'
|
7 |
+
|
8 |
+
export default function SidebarMain() {
|
9 |
+
const taxonomies = useTaxonomyStore((state) => state.taxonomies)
|
10 |
+
const searchParams = useTemplatesStore((state) => state.searchParams)
|
11 |
+
const updateSiteType = useUserStore((state) => state.updateSiteType)
|
12 |
+
const updateTaxonomies = useTemplatesStore(
|
13 |
+
(state) => state.updateTaxonomies,
|
14 |
+
)
|
15 |
+
|
16 |
+
return (
|
17 |
+
<>
|
18 |
+
<div className="mb-8 mt-2 mx-6 sm:mx-0 sm:mt-0 pt-0.5">
|
19 |
+
{Object.keys(taxonomies?.tax_categories ?? {}).length > 0 && (
|
20 |
+
<SiteTypeSelector
|
21 |
+
value={searchParams?.taxonomies?.tax_categories ?? ''}
|
22 |
+
setValue={(term) => {
|
23 |
+
updateSiteType(term)
|
24 |
+
updateTaxonomies({ tax_categories: term })
|
25 |
+
}}
|
26 |
+
terms={taxonomies.tax_categories}
|
27 |
+
/>
|
28 |
+
)}
|
29 |
+
</div>
|
30 |
+
<div className="mt-px flex-grow hidden overflow-y-auto pb-32 pt-px sm:block">
|
31 |
+
<Panel>
|
32 |
+
{Object.entries(taxonomies).map((taxonomy) => {
|
33 |
+
// Tax categories has been extracted to display above
|
34 |
+
if (taxonomy[0] === 'tax_categories') return null
|
35 |
+
return (
|
36 |
+
<TaxonomySection
|
37 |
+
key={taxonomy[0]}
|
38 |
+
taxonomy={taxonomy}
|
39 |
+
/>
|
40 |
+
)
|
41 |
+
})}
|
42 |
+
</Panel>
|
43 |
+
</div>
|
44 |
+
</>
|
45 |
+
)
|
46 |
+
}
|
redux-core/extendify-sdk/src/pages/SingleView.js
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
import { useTemplatesStore } from '../state/Templates'
|
2 |
-
import Single from './parts/Single'
|
3 |
-
import HasSidebar from './parts/HasSidebar'
|
4 |
-
import { __ } from '@wordpress/i18n'
|
5 |
-
import SidebarSingle from './parts/sidebars/SidebarSingle'
|
6 |
-
import Toolbar from './parts/Toolbar'
|
7 |
-
|
8 |
-
export default function SingleView() {
|
9 |
-
const activeTemplate = useTemplatesStore(state => state.activeTemplate)
|
10 |
-
return <div className="bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto">
|
11 |
-
<Toolbar className="w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0"/>
|
12 |
-
<div className="w-full flex-grow overflow-hidden">
|
13 |
-
<a href="#extendify-templates" className="sr-only focus:not-sr-only focus:text-blue-500">
|
14 |
-
{__('Skip to content', 'extendify-sdk')}
|
15 |
-
</a>
|
16 |
-
<div className="sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full">
|
17 |
-
<div className="absolute bg-white sm:flex inset-0 z-50 sm:space-x-12">
|
18 |
-
<HasSidebar>
|
19 |
-
<SidebarSingle template={activeTemplate}/>
|
20 |
-
<Single template={activeTemplate}/>
|
21 |
-
</HasSidebar>
|
22 |
-
</div>
|
23 |
-
</div>
|
24 |
-
</div>
|
25 |
-
</div>
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/pages/layout/HasSidebar.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { useUserStore } from '../../state/User'
|
2 |
+
import ImportCounter from '../../components/ImportCounter'
|
3 |
+
|
4 |
+
export default function HasSidebar({ children }) {
|
5 |
+
const apiKey = useUserStore((state) => state.apiKey)
|
6 |
+
return (
|
7 |
+
<>
|
8 |
+
<aside className="flex-shrink-0 sm:pl-8 py-0 relative">
|
9 |
+
<div className="sm:w-56 lg:w-72 sticky flex flex-col lg:h-full">
|
10 |
+
{children[0]}
|
11 |
+
</div>
|
12 |
+
<div className="hidden sm:flex flex-col absolute bottom-0 mb-8 w-72 text-left space-y-4">
|
13 |
+
{!apiKey.length && <ImportCounter />}
|
14 |
+
</div>
|
15 |
+
</aside>
|
16 |
+
<main
|
17 |
+
id="extendify-templates"
|
18 |
+
className="w-full smp:l-12 h-full overflow-hidden">
|
19 |
+
{children[1]}
|
20 |
+
</main>
|
21 |
+
</>
|
22 |
+
)
|
23 |
+
}
|
redux-core/extendify-sdk/src/pages/layout/Layout.js
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WordPress dependencies
|
3 |
+
*/
|
4 |
+
import { __ } from '@wordpress/i18n'
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Internal dependencies
|
8 |
+
*/
|
9 |
+
import Sidebar from '../Sidebar'
|
10 |
+
import HasSidebar from './HasSidebar'
|
11 |
+
import Toolbar from './Toolbar'
|
12 |
+
import GridView from '../GridView'
|
13 |
+
|
14 |
+
export default function Layout({ setOpen }) {
|
15 |
+
return (
|
16 |
+
<div className="bg-white h-full flex flex-col items-center relative max-w-screen-4xl mx-auto">
|
17 |
+
<Toolbar
|
18 |
+
className="w-full h-20 flex-shrink-0"
|
19 |
+
hideLibrary={() => setOpen(false)}
|
20 |
+
/>
|
21 |
+
<div className="w-full flex-grow overflow-hidden">
|
22 |
+
<button
|
23 |
+
onClick={() =>
|
24 |
+
document
|
25 |
+
.getElementById('extendify-templates')
|
26 |
+
.querySelector('button')
|
27 |
+
.focus()
|
28 |
+
}
|
29 |
+
className="sr-only focus:not-sr-only focus:text-blue-500">
|
30 |
+
{__('Skip to content', 'extendify-sdk')}
|
31 |
+
</button>
|
32 |
+
<div className="sm:flex sm:space-x-12 relative mx-auto h-full">
|
33 |
+
<HasSidebar>
|
34 |
+
<Sidebar />
|
35 |
+
<div className="relative h-full z-30">
|
36 |
+
<div className="absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40">
|
37 |
+
<GridView />
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
</HasSidebar>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
)
|
45 |
+
}
|
redux-core/extendify-sdk/src/pages/layout/Toolbar.js
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { __ } from '@wordpress/i18n'
|
2 |
+
import { useState } from '@wordpress/element'
|
3 |
+
import { Icon, close } from '@wordpress/icons'
|
4 |
+
import { Button } from '@wordpress/components'
|
5 |
+
|
6 |
+
import TypeSelect from '../../components/TypeSelect'
|
7 |
+
import { useGlobalStore } from '../../state/GlobalState'
|
8 |
+
import { user } from '../../components/icons/'
|
9 |
+
import SettingsModal from '../../components/modals/SettingsModal'
|
10 |
+
import { brandMark } from '../../components/icons/'
|
11 |
+
|
12 |
+
export default function Toolbar({ className }) {
|
13 |
+
const setOpen = useGlobalStore((state) => state.setOpen)
|
14 |
+
const [openModal, setOpenModal] = useState(false)
|
15 |
+
|
16 |
+
return (
|
17 |
+
<div className={className}>
|
18 |
+
<div className="flex justify-between items-center px-6 sm:pl-6 sm:pr-12 h-full">
|
19 |
+
<div className="flex space-x-12 h-full">
|
20 |
+
<div className="bg-transparent flex items-center space-x-1.5 lg:w-72 text-extendify-black">
|
21 |
+
<Icon icon={brandMark} size={40} />
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
<TypeSelect />
|
25 |
+
<div className="space-x-2 transform sm:translate-x-6 flex">
|
26 |
+
<Button
|
27 |
+
onClick={() => setOpenModal(true)}
|
28 |
+
icon={<Icon icon={user} size={24} />}
|
29 |
+
label={__('Settings', 'extendify-sdk')}
|
30 |
+
/>
|
31 |
+
|
32 |
+
{openModal && (
|
33 |
+
<SettingsModal
|
34 |
+
isOpen={openModal}
|
35 |
+
onClose={() => setOpenModal(false)}
|
36 |
+
/>
|
37 |
+
)}
|
38 |
+
|
39 |
+
<Button
|
40 |
+
onClick={() => setOpen(false)}
|
41 |
+
icon={<Icon icon={close} size={24} />}
|
42 |
+
label={__('Close library', 'extendify-sdk')}
|
43 |
+
/>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
)
|
48 |
+
}
|
redux-core/extendify-sdk/src/pages/parts/Grid.js
DELETED
@@ -1,158 +0,0 @@
|
|
1 |
-
import {
|
2 |
-
useEffect, useState, useCallback, useRef,
|
3 |
-
} from '@wordpress/element'
|
4 |
-
import { useTemplatesStore } from '../../state/Templates'
|
5 |
-
import { Templates as TemplatesApi } from '../../api/Templates'
|
6 |
-
import { useInView } from 'react-intersection-observer'
|
7 |
-
import { Spinner, Button } from '@wordpress/components'
|
8 |
-
import { __, sprintf } from '@wordpress/i18n'
|
9 |
-
import { useIsMounted } from '../../hooks/helpers'
|
10 |
-
import TemplateButton from '../../components/TemplateButton'
|
11 |
-
import Masonry from 'react-masonry-css'
|
12 |
-
import { ImportTemplateBlock } from '../../components/ImportTemplateBlock'
|
13 |
-
|
14 |
-
export default function TemplatesList() {
|
15 |
-
const isMounted = useIsMounted()
|
16 |
-
const templates = useTemplatesStore(state => state.templates)
|
17 |
-
|
18 |
-
const setActiveTemplate = useTemplatesStore(state => state.setActive)
|
19 |
-
const appendTemplates = useTemplatesStore(state => state.appendTemplates)
|
20 |
-
const [serverError, setServerError] = useState('')
|
21 |
-
const [nothingFound, setNothingFound] = useState(false)
|
22 |
-
// const [imagesLoaded, setImagesLoaded] = useState([])
|
23 |
-
const [loadMoreRef, inView] = useInView()
|
24 |
-
|
25 |
-
const updateSearchParams = useTemplatesStore(state => state.updateSearchParams)
|
26 |
-
const searchParamsRaw = useTemplatesStore(state => state.searchParams)
|
27 |
-
|
28 |
-
// Store the next page in case we have pagination
|
29 |
-
const nextPage = useRef(useTemplatesStore.getState().nextPage)
|
30 |
-
const searchParams = useRef(useTemplatesStore.getState().searchParams)
|
31 |
-
// Connect to the store on mount, disconnect on unmount, catch state-changes in a reference
|
32 |
-
useEffect(() => useTemplatesStore.subscribe(n => (nextPage.current = n),
|
33 |
-
state => state.nextPage), [])
|
34 |
-
useEffect(() => useTemplatesStore.subscribe(s => (searchParams.current = s),
|
35 |
-
state => state.searchParams), [])
|
36 |
-
|
37 |
-
// Fetch the templates then add them to the current state
|
38 |
-
// TODO: This works, but it's not really doing what it's intended to do
|
39 |
-
// as it has a side effect in there, and isn't pure.
|
40 |
-
// It could be extracted to a hook
|
41 |
-
const fetchTemplates = useCallback(async () => {
|
42 |
-
setServerError('')
|
43 |
-
setNothingFound(false)
|
44 |
-
const response = await TemplatesApi.get(searchParams.current, { offset: nextPage.current })
|
45 |
-
.catch((error) => {
|
46 |
-
console.error(error)
|
47 |
-
setServerError(error && error.message
|
48 |
-
? error.message
|
49 |
-
: __('Unknown error occured. Check browser console or contact support.', 'extendify-sdk'))
|
50 |
-
})
|
51 |
-
if (!isMounted.current) {
|
52 |
-
return
|
53 |
-
}
|
54 |
-
if (response?.error?.length) {
|
55 |
-
setServerError(response?.error)
|
56 |
-
}
|
57 |
-
if (response?.records && searchParamsRaw === searchParams.current) {
|
58 |
-
useTemplatesStore.setState({
|
59 |
-
nextPage: response.offset,
|
60 |
-
})
|
61 |
-
appendTemplates(response.records)
|
62 |
-
setNothingFound(response.records.length <= 0)
|
63 |
-
}
|
64 |
-
}, [searchParamsRaw, appendTemplates, isMounted])
|
65 |
-
|
66 |
-
// This is the main driver for loading templates
|
67 |
-
// This loads the initial batch of templates. But if we don't yet have taxonomies.
|
68 |
-
// There's also an option to skip loading on first mount
|
69 |
-
useEffect(() => {
|
70 |
-
if (!Object.keys(searchParams.current.taxonomies).length) {
|
71 |
-
return
|
72 |
-
}
|
73 |
-
|
74 |
-
if (useTemplatesStore.getState().skipNextFetch) {
|
75 |
-
// This is useful if the templates are fetched already and
|
76 |
-
// the library moves to/from another state that re-renders
|
77 |
-
// The point is to keep the logic close to the list. That may change someday
|
78 |
-
useTemplatesStore.setState({
|
79 |
-
skipNextFetch: false,
|
80 |
-
})
|
81 |
-
return
|
82 |
-
}
|
83 |
-
// setImagesLoaded([])
|
84 |
-
fetchTemplates()
|
85 |
-
}, [fetchTemplates, searchParams])
|
86 |
-
|
87 |
-
// Fetches when the load more is in view
|
88 |
-
useEffect(() => {
|
89 |
-
inView && fetchTemplates()
|
90 |
-
}, [inView, fetchTemplates])
|
91 |
-
|
92 |
-
if (serverError.length) {
|
93 |
-
return <div className="text-left">
|
94 |
-
<h2 className="text-left">{__('Server error', 'extendify-sdk')}</h2>
|
95 |
-
<code className="block max-w-xl p-4 mb-4" style={{
|
96 |
-
minHeight: '10rem',
|
97 |
-
}}>{serverError}</code>
|
98 |
-
<Button isTertiary onClick={() => {
|
99 |
-
// setImagesLoaded([])
|
100 |
-
updateSearchParams({
|
101 |
-
taxonomies: {},
|
102 |
-
search: '',
|
103 |
-
})
|
104 |
-
fetchTemplates()
|
105 |
-
}}>{ __('Press here to reload experience')}</Button>
|
106 |
-
</div>
|
107 |
-
}
|
108 |
-
|
109 |
-
if (nothingFound) {
|
110 |
-
return <h2 className="text-left">{__('No results found.', 'extendify-sdk')}</h2>
|
111 |
-
}
|
112 |
-
|
113 |
-
if (!templates.length) {
|
114 |
-
return <div className="flex items-center justify-center w-full sm:mt-64">
|
115 |
-
<Spinner/>
|
116 |
-
</div>
|
117 |
-
}
|
118 |
-
|
119 |
-
const breakpointColumnsObj = {
|
120 |
-
default: 3,
|
121 |
-
1320: 2,
|
122 |
-
860: 1,
|
123 |
-
599: 2,
|
124 |
-
400: 1,
|
125 |
-
}
|
126 |
-
|
127 |
-
return <>
|
128 |
-
<Masonry
|
129 |
-
breakpointCols={breakpointColumnsObj}
|
130 |
-
className="flex -ml-8 w-auto pb-40"
|
131 |
-
columnClassName="pl-8 bg-clip-padding">
|
132 |
-
{templates.map((template) => {
|
133 |
-
if (searchParamsRaw.type === 'pattern') {
|
134 |
-
return <ImportTemplateBlock
|
135 |
-
key={template.id}
|
136 |
-
template={template}
|
137 |
-
/>
|
138 |
-
}
|
139 |
-
return <TemplateButton
|
140 |
-
key={template.id}
|
141 |
-
template={template}
|
142 |
-
setActiveTemplate={() => setActiveTemplate(template)}
|
143 |
-
imageLoaded={() => {}}
|
144 |
-
/>
|
145 |
-
})}
|
146 |
-
</Masonry>
|
147 |
-
{useTemplatesStore.getState().nextPage && <>
|
148 |
-
<div
|
149 |
-
className="-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text"
|
150 |
-
ref={loadMoreRef}
|
151 |
-
style={{ zIndex: -1 }}>
|
152 |
-
</div>
|
153 |
-
<div className="my-4">
|
154 |
-
<Spinner/>
|
155 |
-
</div>
|
156 |
-
</>}
|
157 |
-
</>
|
158 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/pages/parts/HasSidebar.js
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
import { useUserStore } from '../../state/User'
|
2 |
-
import ImportCounter from '../../components/ImportCounter'
|
3 |
-
|
4 |
-
export default function HasSidebar({ children }) {
|
5 |
-
const apiKey = useUserStore(state => state.apiKey)
|
6 |
-
return <>
|
7 |
-
<aside className="flex-shrink-0 sm:pl-6 py-0 sm:py-6 relative">
|
8 |
-
<div className="sm:w-56 lg:w-64 sticky flex flex-col lg:h-full">{children[0]}</div>
|
9 |
-
<div className="hidden sm:flex flex-col absolute bottom-0 mb-6 w-64 text-left space-y-4">
|
10 |
-
{ !apiKey.length && <ImportCounter /> }
|
11 |
-
</div>
|
12 |
-
</aside>
|
13 |
-
<main
|
14 |
-
id="extendify-templates"
|
15 |
-
className="w-full smp:l-12 sm:pt-6 h-full overflow-hidden">
|
16 |
-
{children[1]}
|
17 |
-
</main>
|
18 |
-
</>
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/pages/parts/Single.js
DELETED
@@ -1,117 +0,0 @@
|
|
1 |
-
import { ImportButton } from '../../components/ImportButton'
|
2 |
-
import { __ } from '@wordpress/i18n'
|
3 |
-
import classNames from 'classnames'
|
4 |
-
import { useUserStore } from '../../state/User'
|
5 |
-
import {
|
6 |
-
useEffect, useState, useCallback,
|
7 |
-
} from '@wordpress/element'
|
8 |
-
import { Templates as TemplatesApi } from '../../api/Templates'
|
9 |
-
import TaxonomyList from '../../components/TaxonomyList'
|
10 |
-
import { useIsMounted } from '../../hooks/helpers'
|
11 |
-
import { useTemplatesStore } from '../../state/Templates'
|
12 |
-
|
13 |
-
const relatedMap = new Map()
|
14 |
-
|
15 |
-
export default function Single({ template }) {
|
16 |
-
const {
|
17 |
-
tax_categories: categories,
|
18 |
-
required_plugins: requiredPlugins,
|
19 |
-
tax_style: styles,
|
20 |
-
tax_pattern_types: types,
|
21 |
-
} = template.fields
|
22 |
-
const apiKey = useUserStore(state => state.apiKey)
|
23 |
-
const [related, setRelated] = useState([])
|
24 |
-
const [alternatives, setAlternatives] = useState([])
|
25 |
-
const isMounted = useIsMounted()
|
26 |
-
const setActiveTemplate = useTemplatesStore(state => state.setActive)
|
27 |
-
|
28 |
-
const changeTemplate = (template) => {
|
29 |
-
setRelated([])
|
30 |
-
setAlternatives([])
|
31 |
-
requestAnimationFrame(() => setActiveTemplate(template))
|
32 |
-
}
|
33 |
-
|
34 |
-
const fetchRelated = useCallback(async (queryType, wantedType) => {
|
35 |
-
const key = `${template.id}|${queryType}|${wantedType}`
|
36 |
-
if (relatedMap.has(key)) {
|
37 |
-
return relatedMap.get(key)
|
38 |
-
}
|
39 |
-
const results = await TemplatesApi.related(
|
40 |
-
template, queryType, wantedType,
|
41 |
-
)
|
42 |
-
relatedMap.set(key, results)
|
43 |
-
return results
|
44 |
-
}, [template])
|
45 |
-
|
46 |
-
useEffect(() => { TemplatesApi.single(template) }, [template])
|
47 |
-
useEffect(() => {
|
48 |
-
fetchRelated('related', 'pattern').then((results) => {
|
49 |
-
isMounted.current && setRelated(results)
|
50 |
-
// fetchRelated('alternatives', template.fields.type).then((results) => {
|
51 |
-
// isMounted.current && setAlternatives(results)
|
52 |
-
// })
|
53 |
-
})
|
54 |
-
}, [template, fetchRelated, isMounted])
|
55 |
-
|
56 |
-
return <div className="flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px">
|
57 |
-
<div className="lg:sticky top-0 bg-white flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl lg:border-b border-gray-300">
|
58 |
-
<div className="text-left m-0 h-full px-6 sm:p-0">
|
59 |
-
<h1 className="leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal">{template.fields.display_title}</h1>
|
60 |
-
</div>
|
61 |
-
<div className={classNames({
|
62 |
-
'inline-flex sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3': true,
|
63 |
-
'top-16 mt-5': !apiKey.length,
|
64 |
-
'top-0': apiKey.length > 0,
|
65 |
-
})}>
|
66 |
-
<ImportButton template={template} />
|
67 |
-
</div>
|
68 |
-
</div>
|
69 |
-
<div className="max-w-screen-xl sm:w-full sm:m-0 sm:mb-8 m-6 border lg:border-t-0 border-gray-300 m-46">
|
70 |
-
<img
|
71 |
-
className="max-w-full w-full block"
|
72 |
-
src={template?.fields?.screenshot[0]?.thumbnails?.full?.url ?? template?.fields?.screenshot[0]?.url}/>
|
73 |
-
</div>
|
74 |
-
|
75 |
-
<div className="divide-y p-6 sm:p-0 mb-16">
|
76 |
-
{related.length > 0 && <section className="mb-4">
|
77 |
-
<h4 className="text-lg m-0 mb-4 text-left font-semibold">{__('Related', 'extendify-sdk')}</h4>
|
78 |
-
<div className="grid md:grid-cols-2 xl:grid-cols-4 gap-6">
|
79 |
-
{related.map((template) => {
|
80 |
-
return <button key={template.id}
|
81 |
-
type="button"
|
82 |
-
className="min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer"
|
83 |
-
onClick={() => changeTemplate(template)}>
|
84 |
-
<img
|
85 |
-
className="max-w-full block p-0 m-0 object-cover"
|
86 |
-
src={template?.fields?.screenshot[0]?.thumbnails?.large?.url ?? template?.fields?.screenshot[0]?.url}/>
|
87 |
-
</button>
|
88 |
-
})}
|
89 |
-
</div>
|
90 |
-
</section>}
|
91 |
-
{alternatives.length > 0 && <section className="mb-4 pt-6">
|
92 |
-
<h4 className="text-lg m-0 mb-4 text-left font-semibold">{__('Alternatives', 'extendify-sdk')}</h4>
|
93 |
-
<div className="grid md:grid-cols-2 xl:grid-cols-4 gap-6">
|
94 |
-
{alternatives.map((template) => {
|
95 |
-
return <button key={template.id}
|
96 |
-
type="button"
|
97 |
-
className="min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer"
|
98 |
-
onClick={() => changeTemplate(template)}>
|
99 |
-
<img
|
100 |
-
className="max-w-full block p-0 m-0 object-cover"
|
101 |
-
src={template?.fields?.screenshot[0]?.thumbnails?.large?.url ?? template?.fields?.screenshot[0]?.url}/>
|
102 |
-
</button>
|
103 |
-
})}
|
104 |
-
</div>
|
105 |
-
</section>}
|
106 |
-
</div>
|
107 |
-
|
108 |
-
{/* Hides on desktop and is repeated in the single sidebar too */}
|
109 |
-
<div className="text-xs text-left p-6 w-full block sm:hidden divide-y">
|
110 |
-
<TaxonomyList
|
111 |
-
categories={categories}
|
112 |
-
types={types}
|
113 |
-
requiredPlugins={requiredPlugins}
|
114 |
-
styles={styles}/>
|
115 |
-
</div>
|
116 |
-
</div>
|
117 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/pages/parts/Toolbar.js
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
import { __ } from '@wordpress/i18n'
|
2 |
-
import { useState } from '@wordpress/element'
|
3 |
-
import { Icon, close } from '@wordpress/icons'
|
4 |
-
import { Button } from '@wordpress/components'
|
5 |
-
|
6 |
-
import { useGlobalStore } from '../../state/GlobalState'
|
7 |
-
import { user } from '../../components/icons/'
|
8 |
-
import SettingsModal from '../../components/modals/SettingsModal'
|
9 |
-
import { brandMark } from '../../components/icons/'
|
10 |
-
|
11 |
-
export default function Toolbar({ className }) {
|
12 |
-
const setOpen = useGlobalStore(state => state.setOpen)
|
13 |
-
const [openModal, setOpenModal] = useState(false)
|
14 |
-
|
15 |
-
return <div className={className}>
|
16 |
-
<div className="flex justify-between items-center px-6 sm:pl-6 sm:pr-12 h-full">
|
17 |
-
<div className="flex space-x-12 h-full">
|
18 |
-
<div className="bg-transparent flex items-center space-x-1.5 lg:w-64 -ml-1">
|
19 |
-
<Icon icon={ brandMark } size={ 40 } />
|
20 |
-
</div>
|
21 |
-
</div>
|
22 |
-
<div className="space-x-2 transform sm:translate-x-6">
|
23 |
-
|
24 |
-
<Button
|
25 |
-
onClick={() => setOpenModal(true)}
|
26 |
-
icon={<Icon icon={ user } size={ 24 } />}
|
27 |
-
label={__('Settings', 'extendify-sdk')}
|
28 |
-
/>
|
29 |
-
|
30 |
-
{ openModal &&
|
31 |
-
<SettingsModal
|
32 |
-
isOpen={openModal}
|
33 |
-
onClose={() => setOpenModal(false)}/>
|
34 |
-
}
|
35 |
-
|
36 |
-
<Button
|
37 |
-
onClick={() => setOpen(false) }
|
38 |
-
icon={<Icon icon={ close } size={ 24 } />}
|
39 |
-
label={__('Close library', 'extendify-sdk')}
|
40 |
-
/>
|
41 |
-
</div>
|
42 |
-
</div>
|
43 |
-
</div>
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/pages/parts/sidebars/SidebarMain.js
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
import { useTemplatesStore } from '../../../state/Templates'
|
2 |
-
import { Panel } from '@wordpress/components'
|
3 |
-
import TaxonomySection from '../../../components/TaxonomySection'
|
4 |
-
import { useTaxonomyStore } from '../../../state/Taxonomies'
|
5 |
-
import SiteTypeSelector from '../../../components/SiteTypeSelector'
|
6 |
-
import { useUserStore } from '../../../state/User'
|
7 |
-
|
8 |
-
export default function SidebarMain() {
|
9 |
-
const taxonomies = useTaxonomyStore(state => state.taxonomies)
|
10 |
-
const searchParams = useTemplatesStore(state => state.searchParams)
|
11 |
-
const updateSiteType = useUserStore(state => state.updateSiteType)
|
12 |
-
const updateTaxonomies = useTemplatesStore(state => state.updateTaxonomies)
|
13 |
-
|
14 |
-
return <>
|
15 |
-
<div className="mt-px bg-white mb-8 mx-6 pt-6 lg:mx-0 lg:pt-0">
|
16 |
-
{Object.keys(taxonomies?.tax_categories ?? {}).length > 0 && <SiteTypeSelector
|
17 |
-
value={searchParams?.taxonomies?.tax_categories ?? ''}
|
18 |
-
setValue={(term) => {
|
19 |
-
updateSiteType(term)
|
20 |
-
updateTaxonomies({ tax_categories: term })
|
21 |
-
}}
|
22 |
-
terms={taxonomies.tax_categories} />}
|
23 |
-
</div>
|
24 |
-
<div className="mt-px flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block">
|
25 |
-
<Panel>
|
26 |
-
{Object.entries(taxonomies).map((taxonomy) => {
|
27 |
-
// Tax categories has been extracted to display above
|
28 |
-
if (taxonomy[0] === 'tax_categories') return null
|
29 |
-
return <TaxonomySection
|
30 |
-
key={taxonomy[0]}
|
31 |
-
taxonomy={taxonomy} />
|
32 |
-
})}
|
33 |
-
</Panel>
|
34 |
-
</div>
|
35 |
-
</>
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/pages/parts/sidebars/SidebarSingle.js
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
import { __ } from '@wordpress/i18n'
|
2 |
-
import { useGlobalStore } from '../../../state/GlobalState'
|
3 |
-
import { useTemplatesStore } from '../../../state/Templates'
|
4 |
-
import { useUserStore } from '../../../state/User'
|
5 |
-
import TaxonomyList from '../../../components/TaxonomyList'
|
6 |
-
|
7 |
-
export default function SidebarSingle({ template }) {
|
8 |
-
const setActiveTemplate = useTemplatesStore(state => state.setActive)
|
9 |
-
const {
|
10 |
-
tax_categories: categories,
|
11 |
-
required_plugins: requiredPlugins,
|
12 |
-
tax_style: styles,
|
13 |
-
tax_pattern_types: types,
|
14 |
-
} = template.fields
|
15 |
-
const apiKey = useUserStore(state => state.apiKey)
|
16 |
-
|
17 |
-
const goBack = () => {
|
18 |
-
useGlobalStore.setState({ currentPage: 'main' })
|
19 |
-
setActiveTemplate({})
|
20 |
-
}
|
21 |
-
|
22 |
-
return <div className="flex flex-col items-start justify-start">
|
23 |
-
{!apiKey.length && <div className="h-full flex sm:hidden w-full p-4 justify-between border items-center border-gray-300 bg-extendify-lightest">
|
24 |
-
<a
|
25 |
-
className="button-extendify-main"
|
26 |
-
target="_blank"
|
27 |
-
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.sdk_partner}&utm_medium=library&utm_campaign=sign_up&utm_content=main`}
|
28 |
-
rel="noreferrer">
|
29 |
-
{__('Sign up today to get unlimited access', 'extendify-sdk')}
|
30 |
-
</a>
|
31 |
-
<button
|
32 |
-
className="components-button"
|
33 |
-
onClick={() => useGlobalStore.setState({
|
34 |
-
currentPage: 'login',
|
35 |
-
})}>
|
36 |
-
{__('Log in', 'extendify-sdk')}
|
37 |
-
</button>
|
38 |
-
</div>}
|
39 |
-
<div className="p-6 sm:p-0">
|
40 |
-
<button
|
41 |
-
type="button"
|
42 |
-
className="cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus"
|
43 |
-
onClick={goBack}>
|
44 |
-
<svg className="fill-current" width="8" height="12" viewBox="0 0 8 12" xmlns="http://www.w3.org/2000/svg">
|
45 |
-
<path d="M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"/>
|
46 |
-
</svg>
|
47 |
-
<span className="ml-4">{__('Go back', 'extendify-sdk')}</span>
|
48 |
-
</button>
|
49 |
-
</div>
|
50 |
-
{/* Hides on mobile and is repeated at the bottom of the single page too */}
|
51 |
-
<div className="text-left pt-14 divide-y w-full hidden sm:block">
|
52 |
-
<TaxonomyList
|
53 |
-
categories={categories}
|
54 |
-
types={types}
|
55 |
-
requiredPlugins={requiredPlugins}
|
56 |
-
styles={styles}/>
|
57 |
-
</div>
|
58 |
-
</div>
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redux-core/extendify-sdk/src/state/GlobalState.js
CHANGED
@@ -1,26 +1,25 @@
|
|
1 |
import create from 'zustand'
|
2 |
import { persist } from 'zustand/middleware'
|
3 |
-
import { useTemplatesStore } from './Templates'
|
4 |
-
import { templates as config } from '../config'
|
5 |
|
6 |
-
export const useGlobalStore = create(
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
1 |
import create from 'zustand'
|
2 |
import { persist } from 'zustand/middleware'
|
|
|
|
|
3 |
|
4 |
+
export const useGlobalStore = create(
|
5 |
+
persist(
|
6 |
+
(set) => ({
|
7 |
+
open: false,
|
8 |
+
metaData: {},
|
9 |
+
currentTaxonomies: {},
|
10 |
+
currentType: 'pattern',
|
11 |
+
settingsModal: false,
|
12 |
+
updateCurrentTaxonomies: (data) =>
|
13 |
+
set({
|
14 |
+
currentTaxonomies: Object.assign({}, data),
|
15 |
+
}),
|
16 |
+
updateCurrentType: (data) => set({ currentType: data }),
|
17 |
+
setOpen: (value) => {
|
18 |
+
set({ open: value })
|
19 |
+
},
|
20 |
+
}),
|
21 |
+
{
|
22 |
+
name: 'extendify-global-state',
|
23 |
+
},
|
24 |
+
),
|
25 |
+
)
|
redux-core/extendify-sdk/src/state/Importing.js
CHANGED
@@ -1,16 +1,22 @@
|
|
1 |
import create from 'zustand'
|
2 |
import { persist } from 'zustand/middleware'
|
3 |
|
4 |
-
export const useWantedTemplateStore = create(
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import create from 'zustand'
|
2 |
import { persist } from 'zustand/middleware'
|
3 |
|
4 |
+
export const useWantedTemplateStore = create(
|
5 |
+
persist(
|
6 |
+
(set) => ({
|
7 |
+
wantedTemplate: {},
|
8 |
+
importOnLoad: false,
|
9 |
+
setWanted: (template) =>
|
10 |
+
set({
|
11 |
+
wantedTemplate: template,
|
12 |
+
}),
|
13 |
+
removeWanted: () =>
|
14 |
+
set({
|
15 |
+
wantedTemplate: {},
|
16 |
+
}),
|
17 |
+
}),
|
18 |
+
{
|
19 |
+
name: 'extendify-wanted-template',
|
20 |
+
},
|
21 |
+
),
|
22 |
+
)
|
redux-core/extendify-sdk/src/state/SiteSettings.js
CHANGED
@@ -7,9 +7,14 @@ const storage = {
|
|
7 |
setItem: async (_name, value) => await SiteSettings.setData(value),
|
8 |
}
|
9 |
|
10 |
-
export const useSiteSettingsStore = create(
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
7 |
setItem: async (_name, value) => await SiteSettings.setData(value),
|
8 |
}
|
9 |
|
10 |
+
export const useSiteSettingsStore = create(
|
11 |
+
persist(
|
12 |
+
() => ({
|
13 |
+
enabled: true,
|
14 |
+
}),
|
15 |
+
{
|
16 |
+
name: 'extendify-sitesettings',
|
17 |
+
getStorage: () => storage,
|
18 |
+
},
|
19 |
+
),
|
20 |
+
)
|
redux-core/extendify-sdk/src/state/Taxonomies.js
CHANGED
@@ -1,19 +1,27 @@
|
|
1 |
import create from 'zustand'
|
2 |
import { persist } from 'zustand/middleware'
|
3 |
|
4 |
-
export const useTaxonomyStore = create(
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import create from 'zustand'
|
2 |
import { persist } from 'zustand/middleware'
|
3 |
|
4 |
+
export const useTaxonomyStore = create(
|
5 |
+
persist(
|
6 |
+
(set, get) => ({
|
7 |
+
taxonomies: {},
|
8 |
+
openedTaxonomies: [],
|
9 |
+
setTaxonomies: (taxonomies) =>
|
10 |
+
set({
|
11 |
+
taxonomies,
|
12 |
+
}),
|
13 |
+
// This is here because I couldn't get the sidebar components to hold state on re-render
|
14 |
+
toggleOpenedTaxonomy: (tax, add) => {
|
15 |
+
const opened = get().openedTaxonomies
|
16 |
+
set({
|
17 |
+
openedTaxonomies: add
|
18 |
+
? [...opened, tax]
|
19 |
+
: [...opened.filter((t) => t != tax)],
|
20 |
+
})
|
21 |
+
},
|
22 |
+
}),
|
23 |
+
{
|
24 |
+
name: 'extendify-taxonomies',
|
25 |
+
},
|
26 |
+
),
|
27 |
+
)
|
redux-core/extendify-sdk/src/state/Templates.js
CHANGED
@@ -1,25 +1,22 @@
|
|
1 |
import create from 'zustand'
|
2 |
-
import { templates as config } from '../config'
|
3 |
-
import { rawHandler } from '@wordpress/blocks'
|
4 |
import { useGlobalStore } from './GlobalState'
|
5 |
import { useUserStore } from './User'
|
6 |
import { useTaxonomyStore } from './Taxonomies'
|
7 |
|
8 |
-
const defaultCategoryForType = (tax) =>
|
9 |
-
|
10 |
-
|
|
|
11 |
|
12 |
export const useTemplatesStore = create((set, get) => ({
|
13 |
templates: [],
|
14 |
skipNextFetch: false,
|
15 |
fetchToken: null,
|
16 |
-
activeTemplate: {},
|
17 |
-
activeTemplateBlocks: {},
|
18 |
taxonomyDefaultState: {},
|
19 |
nextPage: '',
|
20 |
searchParams: {
|
21 |
taxonomies: {},
|
22 |
-
type:
|
23 |
},
|
24 |
initTemplateData() {
|
25 |
set({
|
@@ -28,17 +25,25 @@ export const useTemplatesStore = create((set, get) => ({
|
|
28 |
get().setupDefaultTaxonomies()
|
29 |
get().updateType(useGlobalStore.getState().currentType)
|
30 |
},
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
38 |
setupDefaultTaxonomies: () => {
|
39 |
const taxonomies = useTaxonomyStore.getState().taxonomies
|
40 |
-
let taxonomyDefaultState = Object.entries(taxonomies).reduce(
|
41 |
-
(state
|
|
|
|
|
|
|
|
|
42 |
const tax = {}
|
43 |
|
44 |
taxonomyDefaultState = Object.assign(
|
@@ -61,28 +66,22 @@ export const useTemplatesStore = create((set, get) => ({
|
|
61 |
},
|
62 |
})
|
63 |
},
|
64 |
-
setActive: (template) => {
|
65 |
-
set({ activeTemplate: template })
|
66 |
-
|
67 |
-
// If we havea template, we should move that that page
|
68 |
-
if (Object.keys(template).length > 0) {
|
69 |
-
useGlobalStore.setState({ currentPage: 'single' })
|
70 |
-
}
|
71 |
-
|
72 |
-
// This will convert the template to blocks for quick(er) injection
|
73 |
-
if (template?.fields?.code) {
|
74 |
-
set({ activeTemplateBlocks: rawHandler({ HTML: template.fields.code }) })
|
75 |
-
}
|
76 |
-
},
|
77 |
updateTaxonomies: (params) => {
|
78 |
const data = {}
|
79 |
data.taxonomies = Object.assign(
|
80 |
-
{},
|
|
|
|
|
81 |
)
|
82 |
if (data?.taxonomies?.tax_categories) {
|
83 |
// This is what the user "prefers", which may be used outside the library
|
84 |
// which is persisted to the database, where as the global library state is in local storage
|
85 |
-
useUserStore
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
useGlobalStore.getState().updateCurrentTaxonomies(data?.taxonomies)
|
88 |
get().updateSearchParams(data)
|
@@ -97,12 +96,12 @@ export const useTemplatesStore = create((set, get) => ({
|
|
97 |
params.taxonomies = get().taxonomyDefaultState
|
98 |
}
|
99 |
|
100 |
-
const searchParams = Object.assign(
|
101 |
-
{}, get().searchParams, params,
|
102 |
-
)
|
103 |
|
104 |
// If the params are the same then don't update
|
105 |
-
if (
|
|
|
|
|
106 |
return
|
107 |
}
|
108 |
|
1 |
import create from 'zustand'
|
|
|
|
|
2 |
import { useGlobalStore } from './GlobalState'
|
3 |
import { useUserStore } from './User'
|
4 |
import { useTaxonomyStore } from './Taxonomies'
|
5 |
|
6 |
+
const defaultCategoryForType = (tax) =>
|
7 |
+
tax === 'tax_categories'
|
8 |
+
? 'Unknown'
|
9 |
+
: useTaxonomyStore.getState()?.taxonomies[tax][0]?.term ?? undefined
|
10 |
|
11 |
export const useTemplatesStore = create((set, get) => ({
|
12 |
templates: [],
|
13 |
skipNextFetch: false,
|
14 |
fetchToken: null,
|
|
|
|
|
15 |
taxonomyDefaultState: {},
|
16 |
nextPage: '',
|
17 |
searchParams: {
|
18 |
taxonomies: {},
|
19 |
+
type: 'pattern',
|
20 |
},
|
21 |
initTemplateData() {
|
22 |
set({
|
25 |
get().setupDefaultTaxonomies()
|
26 |
get().updateType(useGlobalStore.getState().currentType)
|
27 |
},
|
28 |
+
appendTemplates: (templates) =>
|
29 |
+
set({
|
30 |
+
templates: [
|
31 |
+
...new Map(
|
32 |
+
[...get().templates, ...templates].map((item) => [
|
33 |
+
item.id,
|
34 |
+
item,
|
35 |
+
]),
|
36 |
+
).values(),
|
37 |
+
],
|
38 |
+
}),
|
39 |
setupDefaultTaxonomies: () => {
|
40 |
const taxonomies = useTaxonomyStore.getState().taxonomies
|
41 |
+
let taxonomyDefaultState = Object.entries(taxonomies).reduce(
|
42 |
+
(state, current) => (
|
43 |
+
(state[current[0]] = defaultCategoryForType(current[0])), state
|
44 |
+
),
|
45 |
+
{},
|
46 |
+
)
|
47 |
const tax = {}
|
48 |
|
49 |
taxonomyDefaultState = Object.assign(
|
66 |
},
|
67 |
})
|
68 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
updateTaxonomies: (params) => {
|
70 |
const data = {}
|
71 |
data.taxonomies = Object.assign(
|
72 |
+
{},
|
73 |
+
get().searchParams.taxonomies,
|
74 |
+
params,
|
75 |
)
|
76 |
if (data?.taxonomies?.tax_categories) {
|
77 |
// This is what the user "prefers", which may be used outside the library
|
78 |
// which is persisted to the database, where as the global library state is in local storage
|
79 |
+
useUserStore
|
80 |
+
.getState()
|
81 |
+
.updatePreferredOption(
|
82 |
+
'tax_categories',
|
83 |
+
data?.taxonomies?.tax_categories,
|
84 |
+
)
|
85 |
}
|
86 |
useGlobalStore.getState().updateCurrentTaxonomies(data?.taxonomies)
|
87 |
get().updateSearchParams(data)
|
96 |
params.taxonomies = get().taxonomyDefaultState
|
97 |
}
|
98 |
|
99 |
+
const searchParams = Object.assign({}, get().searchParams, params)
|
|
|
|
|
100 |
|
101 |
// If the params are the same then don't update
|
102 |
+
if (
|
103 |
+
JSON.stringify(searchParams) === JSON.stringify(get().searchParams)
|
104 |
+
) {
|
105 |
return
|
106 |
}
|
107 |
|
redux-core/extendify-sdk/src/state/User.js
CHANGED
@@ -7,81 +7,99 @@ const storage = {
|
|
7 |
setItem: async (_name, value) => await User.setData(value),
|
8 |
}
|
9 |
|
10 |
-
const isGlobalLibraryEnabled = () =>
|
|
|
|
|
11 |
|
12 |
-
export const useUserStore = create(
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
preferredOptions: {
|
30 |
-
taxonomies: {},
|
31 |
-
type: '',
|
32 |
-
search: '',
|
33 |
-
},
|
34 |
-
preferredOptionsHistory: {
|
35 |
-
siteType: [],
|
36 |
-
},
|
37 |
-
incrementImports: () => set({ imports: get().imports + 1 }),
|
38 |
-
canImport: () => get().apiKey
|
39 |
-
? true
|
40 |
-
: (Number(get().imports) < Number(get().allowedImports)),
|
41 |
-
remainingImports: () => {
|
42 |
-
if (get().apiKey) {
|
43 |
-
return 'unlimited'
|
44 |
-
}
|
45 |
-
const remaining = Number(get().allowedImports) - Number(get().imports)
|
46 |
-
return remaining > 0 ? remaining : 0
|
47 |
-
},
|
48 |
-
updateSiteType: (value) => {
|
49 |
-
get().updatePreferredOption('tax_categories', value)
|
50 |
-
if (!value || value === 'Unknown') return
|
51 |
-
|
52 |
-
const history = new Set([value, ...get().preferredOptionsHistory.siteType])
|
53 |
-
set({
|
54 |
-
preferredOptionsHistory: Object.assign(
|
55 |
-
{}, get().preferredOptionsHistory, {
|
56 |
-
siteType: [...history].slice(0, 3),
|
57 |
-
},
|
58 |
-
),
|
59 |
-
})
|
60 |
-
},
|
61 |
-
updatePreferredOption: (option, value) => {
|
62 |
-
// If the option doesn't exist, assume it's a taxonomy
|
63 |
-
if (!Object.prototype.hasOwnProperty.call(get().preferredOptions, option)) {
|
64 |
-
value = Object.assign(
|
65 |
-
{},
|
66 |
-
get().preferredOptions?.taxonomies ?? {},
|
67 |
-
{ [option]: value },
|
68 |
-
)
|
69 |
-
option = 'taxonomies'
|
70 |
-
}
|
71 |
-
// Reset if the type changes from template/pattern/etc
|
72 |
-
const resetTaxonomies = (option == 'type' && value !== get().preferredOptions?.type)
|
73 |
-
set({
|
74 |
preferredOptions: {
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
},
|
82 |
-
})
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
|
7 |
setItem: async (_name, value) => await User.setData(value),
|
8 |
}
|
9 |
|
10 |
+
const isGlobalLibraryEnabled = () =>
|
11 |
+
window.extendifySdkData.sitesettings === null ||
|
12 |
+
window.extendifySdkData?.sitesettings?.state?.enabled
|
13 |
|
14 |
+
export const useUserStore = create(
|
15 |
+
persist(
|
16 |
+
(set, get) => ({
|
17 |
+
email: '',
|
18 |
+
apiKey: '',
|
19 |
+
imports: 0,
|
20 |
+
uuid: '',
|
21 |
+
sdkPartner: '',
|
22 |
+
registration: {
|
23 |
+
email: '',
|
24 |
+
},
|
25 |
+
noticesDismissedAt: {},
|
26 |
+
allowedImports: 0,
|
27 |
+
entryPoint: 'not-set',
|
28 |
+
enabled: isGlobalLibraryEnabled(),
|
29 |
+
canInstallPlugins: false,
|
30 |
+
canActivatePlugins: false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
preferredOptions: {
|
32 |
+
taxonomies: {},
|
33 |
+
type: '',
|
34 |
+
search: '',
|
35 |
+
},
|
36 |
+
preferredOptionsHistory: {
|
37 |
+
siteType: [],
|
38 |
+
},
|
39 |
+
incrementImports: () => set({ imports: get().imports + 1 }),
|
40 |
+
canImport: () =>
|
41 |
+
get().apiKey
|
42 |
+
? true
|
43 |
+
: Number(get().imports) < Number(get().allowedImports),
|
44 |
+
remainingImports: () => {
|
45 |
+
if (get().apiKey) {
|
46 |
+
return 'unlimited'
|
47 |
+
}
|
48 |
+
const remaining =
|
49 |
+
Number(get().allowedImports) - Number(get().imports)
|
50 |
+
return remaining > 0 ? remaining : 0
|
51 |
+
},
|
52 |
+
updateSiteType: (value) => {
|
53 |
+
get().updatePreferredOption('tax_categories', value)
|
54 |
+
if (!value || value === 'Unknown') return
|
55 |
+
|
56 |
+
const history = new Set([
|
57 |
+
value,
|
58 |
+
...get().preferredOptionsHistory.siteType,
|
59 |
+
])
|
60 |
+
set({
|
61 |
+
preferredOptionsHistory: Object.assign(
|
62 |
+
{},
|
63 |
+
get().preferredOptionsHistory,
|
64 |
+
{
|
65 |
+
siteType: [...history].slice(0, 3),
|
66 |
+
},
|
67 |
+
),
|
68 |
+
})
|
69 |
+
},
|
70 |
+
updatePreferredOption: (option, value) => {
|
71 |
+
// If the option doesn't exist, assume it's a taxonomy
|
72 |
+
if (
|
73 |
+
!Object.prototype.hasOwnProperty.call(
|
74 |
+
get().preferredOptions,
|
75 |
+
option,
|
76 |
+
)
|
77 |
+
) {
|
78 |
+
value = Object.assign(
|
79 |
+
{},
|
80 |
+
get().preferredOptions?.taxonomies ?? {},
|
81 |
+
{ [option]: value },
|
82 |
+
)
|
83 |
+
option = 'taxonomies'
|
84 |
+
}
|
85 |
+
// Reset if the type changes from template/pattern/etc
|
86 |
+
const resetTaxonomies =
|
87 |
+
option == 'type' && value !== get().preferredOptions?.type
|
88 |
+
set({
|
89 |
+
preferredOptions: {
|
90 |
+
...Object.assign(
|
91 |
+
{},
|
92 |
+
get().preferredOptions,
|
93 |
+
{ [option]: value },
|
94 |
+
resetTaxonomies ? { taxonomies: {} } : {},
|
95 |
+
),
|
96 |
+
},
|
97 |
+
})
|
98 |
},
|
99 |
+
}),
|
100 |
+
{
|
101 |
+
name: 'extendify-user',
|
102 |
+
getStorage: () => storage,
|
103 |
+
},
|
104 |
+
),
|
105 |
+
)
|
redux-core/extendify-sdk/src/util/general.js
CHANGED
@@ -19,9 +19,7 @@ export function search(string, searchString) {
|
|
19 |
searchString = toLower(searchString)
|
20 |
|
21 |
// comparing
|
22 |
-
return -1 !== searchString.indexOf(string)
|
23 |
-
? true
|
24 |
-
: false
|
25 |
}
|
26 |
|
27 |
export const openModal = (source) => setModalVisibility(source, 'open')
|
@@ -30,24 +28,33 @@ export function setModalVisibility(source = 'broken-event', state = 'open') {
|
|
30 |
useUserStore.setState({
|
31 |
entryPoint: source,
|
32 |
})
|
33 |
-
window.dispatchEvent(
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
37 |
}
|
38 |
|
39 |
export function getPluginDescription(plugin) {
|
40 |
switch (plugin) {
|
41 |
-
case 'editorplus':
|
42 |
-
|
|
|
|
|
43 |
}
|
44 |
return plugin
|
45 |
}
|
46 |
|
47 |
export function getTaxonomyName(key) {
|
48 |
switch (key) {
|
49 |
-
case 'tax_categories':
|
50 |
-
|
|
|
|
|
51 |
}
|
52 |
-
return key
|
|
|
|
|
|
|
53 |
}
|
19 |
searchString = toLower(searchString)
|
20 |
|
21 |
// comparing
|
22 |
+
return -1 !== searchString.indexOf(string) ? true : false
|
|
|
|
|
23 |
}
|
24 |
|
25 |
export const openModal = (source) => setModalVisibility(source, 'open')
|
28 |
useUserStore.setState({
|
29 |
entryPoint: source,
|
30 |
})
|
31 |
+
window.dispatchEvent(
|
32 |
+
new CustomEvent(`extendify-sdk::${state}-library`, {
|
33 |
+
detail: source,
|
34 |
+
bubbles: true,
|
35 |
+
}),
|
36 |
+
)
|
37 |
}
|
38 |
|
39 |
export function getPluginDescription(plugin) {
|
40 |
switch (plugin) {
|
41 |
+
case 'editorplus':
|
42 |
+
return 'Editor Plus'
|
43 |
+
case 'ml-slider':
|
44 |
+
return 'MetaSlider'
|
45 |
}
|
46 |
return plugin
|
47 |
}
|
48 |
|
49 |
export function getTaxonomyName(key) {
|
50 |
switch (key) {
|
51 |
+
case 'tax_categories':
|
52 |
+
return 'Site Type'
|
53 |
+
case 'tax_pattern_types':
|
54 |
+
return 'Content'
|
55 |
}
|
56 |
+
return key
|
57 |
+
.replace('tax_', '')
|
58 |
+
.replace(/_/g, ' ')
|
59 |
+
.replace(/\b\w/g, (l) => l.toUpperCase())
|
60 |
}
|
redux-core/extendify-sdk/src/util/templateInjection.js
CHANGED
@@ -3,12 +3,13 @@ import { dispatch } from '@wordpress/data'
|
|
3 |
export function injectTemplateBlocks(blocks, templateRaw) {
|
4 |
const { insertBlocks } = dispatch('core/block-editor')
|
5 |
return insertBlocks(blocks).then(() => {
|
6 |
-
window.dispatchEvent(
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
12 |
})
|
13 |
-
|
14 |
}
|
3 |
export function injectTemplateBlocks(blocks, templateRaw) {
|
4 |
const { insertBlocks } = dispatch('core/block-editor')
|
5 |
return insertBlocks(blocks).then(() => {
|
6 |
+
window.dispatchEvent(
|
7 |
+
new CustomEvent('extendify-sdk::template-inserted', {
|
8 |
+
detail: {
|
9 |
+
template: templateRaw,
|
10 |
+
},
|
11 |
+
bubbles: true,
|
12 |
+
}),
|
13 |
+
)
|
14 |
})
|
|
|
15 |
}
|
redux-core/extendify-sdk/src/utility-control/index.js
CHANGED
@@ -29,9 +29,7 @@ function addEditProps(settings) {
|
|
29 |
props = existingGetEditWrapperProps(attributes)
|
30 |
}
|
31 |
|
32 |
-
return addSaveProps(
|
33 |
-
props, settings, attributes,
|
34 |
-
)
|
35 |
}
|
36 |
|
37 |
return settings
|
@@ -46,36 +44,32 @@ const utilityClassEdit = createHigherOrderComponent((BlockEdit) => {
|
|
46 |
return s.replace('.', '').replace(new RegExp('\\\\', 'g'), '')
|
47 |
})
|
48 |
|
49 |
-
return
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
68 |
}
|
69 |
}, 'utilityClassEdit')
|
70 |
|
71 |
-
function addSaveProps(
|
72 |
-
saveElementProps, blockType, attributes,
|
73 |
-
) {
|
74 |
let { className: generatedClasses } = saveElementProps
|
75 |
-
let {
|
76 |
-
extUtilities: classes,
|
77 |
-
className: additionalClasses,
|
78 |
-
} = attributes
|
79 |
|
80 |
if (!classes || !Object.keys(classes).length) {
|
81 |
return saveElementProps
|
@@ -84,9 +78,12 @@ function addSaveProps(
|
|
84 |
// EK seems to be converting string values to objects in some situations
|
85 |
const normalizeAsArray = (item) => {
|
86 |
switch (Object.prototype.toString.call(item)) {
|
87 |
-
case '[object String]':
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
90 |
}
|
91 |
}
|
92 |
const classesCombined = new Set([
|
@@ -95,11 +92,9 @@ function addSaveProps(
|
|
95 |
...normalizeAsArray(classes),
|
96 |
])
|
97 |
|
98 |
-
return Object.assign(
|
99 |
-
|
100 |
-
|
101 |
-
{ className: [...classesCombined].join(' ') },
|
102 |
-
)
|
103 |
}
|
104 |
|
105 |
addFilter(
|
29 |
props = existingGetEditWrapperProps(attributes)
|
30 |
}
|
31 |
|
32 |
+
return addSaveProps(props, settings, attributes)
|
|
|
|
|
33 |
}
|
34 |
|
35 |
return settings
|
44 |
return s.replace('.', '').replace(new RegExp('\\\\', 'g'), '')
|
45 |
})
|
46 |
|
47 |
+
return (
|
48 |
+
<>
|
49 |
+
<BlockEdit {...props} />
|
50 |
+
{classes && (
|
51 |
+
<InspectorAdvancedControls>
|
52 |
+
<FormTokenField
|
53 |
+
label={__('Extendify Utilities', 'extendify-sdk')}
|
54 |
+
tokenizeOnSpace={true}
|
55 |
+
value={classes}
|
56 |
+
suggestions={suggestionList}
|
57 |
+
onChange={(value) => {
|
58 |
+
props.setAttributes({
|
59 |
+
extUtilities: value,
|
60 |
+
})
|
61 |
+
}}
|
62 |
+
/>
|
63 |
+
</InspectorAdvancedControls>
|
64 |
+
)}
|
65 |
+
</>
|
66 |
+
)
|
67 |
}
|
68 |
}, 'utilityClassEdit')
|
69 |
|
70 |
+
function addSaveProps(saveElementProps, blockType, attributes) {
|
|
|
|
|
71 |
let { className: generatedClasses } = saveElementProps
|
72 |
+
let { extUtilities: classes, className: additionalClasses } = attributes
|
|
|
|
|
|
|
73 |
|
74 |
if (!classes || !Object.keys(classes).length) {
|
75 |
return saveElementProps
|
78 |
// EK seems to be converting string values to objects in some situations
|
79 |
const normalizeAsArray = (item) => {
|
80 |
switch (Object.prototype.toString.call(item)) {
|
81 |
+
case '[object String]':
|
82 |
+
return item.split(' ')
|
83 |
+
case '[object Array]':
|
84 |
+
return item
|
85 |
+
default:
|
86 |
+
return []
|
87 |
}
|
88 |
}
|
89 |
const classesCombined = new Set([
|
92 |
...normalizeAsArray(classes),
|
93 |
])
|
94 |
|
95 |
+
return Object.assign({}, saveElementProps, {
|
96 |
+
className: [...classesCombined].join(' '),
|
97 |
+
})
|
|
|
|
|
98 |
}
|
99 |
|
100 |
addFilter(
|
redux-core/extendify-sdk/tailwind.config.js
CHANGED
@@ -28,9 +28,11 @@ module.exports = {
|
|
28 |
order: {},
|
29 |
// Extend will add on to TW config, where the above will override and replace
|
30 |
extend: {
|
31 |
-
boxShadow:{
|
32 |
-
'inner-sm':
|
33 |
-
|
|
|
|
|
34 |
modal: ' 0 0 0 1px rgba(0,0,0,0.1),0 3px 15px -3px rgba(0,0,0,0.035),0 0 1px rgba(0,0,0,.05)',
|
35 |
},
|
36 |
maxWidth: {
|
@@ -38,6 +40,7 @@ module.exports = {
|
|
38 |
},
|
39 |
minWidth: {
|
40 |
md2: '960px',
|
|
|
41 |
},
|
42 |
minHeight: {
|
43 |
20: '5rem',
|
@@ -51,8 +54,8 @@ module.exports = {
|
|
51 |
extendify: {
|
52 |
lightest: '#f8fffe',
|
53 |
light: '#e7f8f5',
|
54 |
-
main: '#
|
55 |
-
'main-dark':'#05312C',
|
56 |
link: '#299875',
|
57 |
bright: '#30a850',
|
58 |
alert: '#841010',
|
@@ -69,12 +72,12 @@ module.exports = {
|
|
69 |
wp: {
|
70 |
alert: {
|
71 |
yellow: '#f0b849',
|
72 |
-
red:
|
73 |
-
green:
|
74 |
},
|
75 |
},
|
76 |
gray: {
|
77 |
-
50:
|
78 |
100: '#f0f0f0',
|
79 |
150: '#eaeaea', // This wasn't a variable but I saw it on buttons
|
80 |
200: '#e0e0e0', // Used sparingly for light borders.
|
28 |
order: {},
|
29 |
// Extend will add on to TW config, where the above will override and replace
|
30 |
extend: {
|
31 |
+
boxShadow: {
|
32 |
+
'inner-sm':
|
33 |
+
'inset 0 0 0 1px rgba(0,0,0,0.1),0 3px 15px -3px rgba(0,0,0,0.025),0 0 1px rgba(0,0,0,.02)',
|
34 |
+
'inner-md':
|
35 |
+
'inset 0 0 0 1px rgba(0,0,0,0.2),0 3px 15px -3px rgba(0,0,0,0.025),0 0 1px rgba(0,0,0,.02)',
|
36 |
modal: ' 0 0 0 1px rgba(0,0,0,0.1),0 3px 15px -3px rgba(0,0,0,0.035),0 0 1px rgba(0,0,0,.05)',
|
37 |
},
|
38 |
maxWidth: {
|
40 |
},
|
41 |
minWidth: {
|
42 |
md2: '960px',
|
43 |
+
sm: '7rem',
|
44 |
},
|
45 |
minHeight: {
|
46 |
20: '5rem',
|
54 |
extendify: {
|
55 |
lightest: '#f8fffe',
|
56 |
light: '#e7f8f5',
|
57 |
+
main: '#0B4A43',
|
58 |
+
'main-dark': '#05312C',
|
59 |
link: '#299875',
|
60 |
bright: '#30a850',
|
61 |
alert: '#841010',
|
72 |
wp: {
|
73 |
alert: {
|
74 |
yellow: '#f0b849',
|
75 |
+
red: '#cc1818',
|
76 |
+
green: '#4ab866',
|
77 |
},
|
78 |
},
|
79 |
gray: {
|
80 |
+
50: '#fafafa',
|
81 |
100: '#f0f0f0',
|
82 |
150: '#eaeaea', // This wasn't a variable but I saw it on buttons
|
83 |
200: '#e0e0e0', // Used sparingly for light borders.
|
redux-core/extendify-sdk/utility-framework/classes/clip-path.css
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
.clip-path--rhombus img {
|
2 |
-
|
3 |
}
|
4 |
|
5 |
.clip-path--diamond img {
|
6 |
-
|
7 |
}
|
8 |
|
9 |
.clip-path--rhombus-alt img {
|
10 |
-
|
11 |
-
}
|
1 |
.clip-path--rhombus img {
|
2 |
+
clip-path: polygon(15% 6%, 80% 29%, 84% 93%, 23% 69%);
|
3 |
}
|
4 |
|
5 |
.clip-path--diamond img {
|
6 |
+
clip-path: polygon(5% 29%, 60% 2%, 91% 64%, 36% 89%);
|
7 |
}
|
8 |
|
9 |
.clip-path--rhombus-alt img {
|
10 |
+
clip-path: polygon(14% 9%, 85% 24%, 91% 89%, 19% 76%);
|
11 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/columns.css
CHANGED
@@ -9,20 +9,22 @@ We use it here to ensure columns blocks display well across themes.
|
|
9 |
|
10 |
/* Some popular themes use padding instead of core's margin for columns; remove it */
|
11 |
.ext .wp-block-columns .wp-block-column[style*="padding"] {
|
12 |
-
|
13 |
-
|
14 |
}
|
15 |
|
16 |
/* Some popular themes add double spacing between columns; remove it */
|
17 |
-
.ext
|
18 |
-
|
19 |
-
|
|
|
|
|
20 |
}
|
21 |
|
22 |
[class*="fullwidth-cols"] .wp-block-column:first-child,
|
23 |
[class*="fullwidth-cols"] .wp-block-group:first-child {
|
24 |
/* no suggestion */
|
25 |
-
@apply ext-mt-0
|
26 |
}
|
27 |
|
28 |
[class*="fullwidth-cols"] .wp-block-column:last-child,
|
@@ -33,45 +35,49 @@ We use it here to ensure columns blocks display well across themes.
|
|
33 |
|
34 |
[class*="fullwidth-cols"] .wp-block-column:first-child * {
|
35 |
/* no suggestion */
|
36 |
-
@apply ext-mt-0
|
37 |
}
|
38 |
|
39 |
[class*="fullwidth-cols"] .wp-block-column *:first-child {
|
40 |
/* no suggestion */
|
41 |
-
@apply ext-mt-0
|
42 |
}
|
43 |
|
44 |
[class*="fullwidth-cols"] .wp-block-column *:last-child {
|
45 |
/* no suggestion */
|
46 |
-
@apply ext-mb-0
|
47 |
}
|
48 |
|
49 |
.ext .is-not-stacked-on-mobile .wp-block-column {
|
50 |
/* no suggestion */
|
51 |
-
@apply ext-mb-0
|
52 |
}
|
53 |
|
54 |
/* Add base margin bottom to all columns */
|
55 |
-
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile)
|
|
|
56 |
/* no suggestion */
|
57 |
@apply ext-mb-base;
|
58 |
}
|
59 |
|
60 |
@screen tablet {
|
61 |
-
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile)
|
|
|
62 |
/* no suggestion */
|
63 |
@apply ext-mb-0;
|
64 |
}
|
65 |
}
|
66 |
|
67 |
/* Remove margin bottom from "not-stacked" columns */
|
68 |
-
.wp-block-columns[class*="fullwidth-cols"].is-not-stacked-on-mobile
|
|
|
69 |
/* no suggestion */
|
70 |
@apply ext-mb-0 !important;
|
71 |
}
|
72 |
|
73 |
@media (min-width: 600px) and (max-width: 781px) {
|
74 |
-
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile)
|
|
|
75 |
/* no suggestion */
|
76 |
margin-left: var(--wp--style--block-gap, 2em);
|
77 |
}
|
@@ -86,7 +92,8 @@ We use it here to ensure columns blocks display well across themes.
|
|
86 |
@apply ext-flex-wrap;
|
87 |
}
|
88 |
|
89 |
-
.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)
|
|
|
90 |
@apply ext-ml-0 !important;
|
91 |
flex-basis: 100% !important; /* Required to negate core/columns flex-basis */
|
92 |
}
|
@@ -97,12 +104,14 @@ We use it here to ensure columns blocks display well across themes.
|
|
97 |
@apply ext-flex-wrap;
|
98 |
}
|
99 |
|
100 |
-
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)
|
|
|
101 |
@apply ext-ml-0 !important;
|
102 |
flex-basis: 100% !important; /* Required to negate core/columns flex-basis */
|
103 |
}
|
104 |
|
105 |
-
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)
|
|
|
106 |
@apply ext-mb-base !important;
|
107 |
}
|
108 |
}
|
9 |
|
10 |
/* Some popular themes use padding instead of core's margin for columns; remove it */
|
11 |
.ext .wp-block-columns .wp-block-column[style*="padding"] {
|
12 |
+
/* no suggestion */
|
13 |
+
@apply ext-px-0 !important;
|
14 |
}
|
15 |
|
16 |
/* Some popular themes add double spacing between columns; remove it */
|
17 |
+
.ext
|
18 |
+
.wp-block-columns
|
19 |
+
+ .wp-block-columns:not([class*="mt-"]):not([class*="my-"]) {
|
20 |
+
/* no suggestion */
|
21 |
+
@apply ext-mt-0 !important;
|
22 |
}
|
23 |
|
24 |
[class*="fullwidth-cols"] .wp-block-column:first-child,
|
25 |
[class*="fullwidth-cols"] .wp-block-group:first-child {
|
26 |
/* no suggestion */
|
27 |
+
@apply ext-mt-0;
|
28 |
}
|
29 |
|
30 |
[class*="fullwidth-cols"] .wp-block-column:last-child,
|
35 |
|
36 |
[class*="fullwidth-cols"] .wp-block-column:first-child * {
|
37 |
/* no suggestion */
|
38 |
+
@apply ext-mt-0;
|
39 |
}
|
40 |
|
41 |
[class*="fullwidth-cols"] .wp-block-column *:first-child {
|
42 |
/* no suggestion */
|
43 |
+
@apply ext-mt-0;
|
44 |
}
|
45 |
|
46 |
[class*="fullwidth-cols"] .wp-block-column *:last-child {
|
47 |
/* no suggestion */
|
48 |
+
@apply ext-mb-0;
|
49 |
}
|
50 |
|
51 |
.ext .is-not-stacked-on-mobile .wp-block-column {
|
52 |
/* no suggestion */
|
53 |
+
@apply ext-mb-0;
|
54 |
}
|
55 |
|
56 |
/* Add base margin bottom to all columns */
|
57 |
+
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile)
|
58 |
+
> .wp-block-column:not(:last-child) {
|
59 |
/* no suggestion */
|
60 |
@apply ext-mb-base;
|
61 |
}
|
62 |
|
63 |
@screen tablet {
|
64 |
+
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile)
|
65 |
+
> .wp-block-column:not(:last-child) {
|
66 |
/* no suggestion */
|
67 |
@apply ext-mb-0;
|
68 |
}
|
69 |
}
|
70 |
|
71 |
/* Remove margin bottom from "not-stacked" columns */
|
72 |
+
.wp-block-columns[class*="fullwidth-cols"].is-not-stacked-on-mobile
|
73 |
+
> .wp-block-column {
|
74 |
/* no suggestion */
|
75 |
@apply ext-mb-0 !important;
|
76 |
}
|
77 |
|
78 |
@media (min-width: 600px) and (max-width: 781px) {
|
79 |
+
.wp-block-columns[class*="fullwidth-cols"]:not(.is-not-stacked-on-mobile)
|
80 |
+
> .wp-block-column:nth-child(even) {
|
81 |
/* no suggestion */
|
82 |
margin-left: var(--wp--style--block-gap, 2em);
|
83 |
}
|
92 |
@apply ext-flex-wrap;
|
93 |
}
|
94 |
|
95 |
+
.tablet\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)
|
96 |
+
> .wp-block-column {
|
97 |
@apply ext-ml-0 !important;
|
98 |
flex-basis: 100% !important; /* Required to negate core/columns flex-basis */
|
99 |
}
|
104 |
@apply ext-flex-wrap;
|
105 |
}
|
106 |
|
107 |
+
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)
|
108 |
+
> .wp-block-column {
|
109 |
@apply ext-ml-0 !important;
|
110 |
flex-basis: 100% !important; /* Required to negate core/columns flex-basis */
|
111 |
}
|
112 |
|
113 |
+
.desktop\:fullwidth-cols.wp-block-columns:not(.is-not-stacked-on-mobile)
|
114 |
+
> .wp-block-column:not(:last-child) {
|
115 |
@apply ext-mb-base !important;
|
116 |
}
|
117 |
}
|
redux-core/extendify-sdk/utility-framework/classes/direction.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
.direction-rtl {
|
2 |
-
|
3 |
}
|
4 |
|
5 |
.direction-ltr {
|
6 |
-
|
7 |
-
}
|
1 |
.direction-rtl {
|
2 |
+
direction: rtl;
|
3 |
}
|
4 |
|
5 |
.direction-ltr {
|
6 |
+
direction: ltr;
|
7 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/editor/no-caption.css
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
.editor\:no-caption .block-editor-rich-text__editable {
|
2 |
-
display: none !important
|
3 |
-
}
|
1 |
.editor\:no-caption .block-editor-rich-text__editable {
|
2 |
+
display: none !important;
|
3 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/editor/no-inserter.css
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
.editor\:no-inserter > .block-list-appender,
|
2 |
.editor\:no-inserter .wp-block-group__inner-container > .block-list-appender {
|
3 |
-
display: none
|
4 |
}
|
5 |
.editor\:no-inserter .wp-block-cover__inner-container > .block-list-appender {
|
6 |
-
display: none
|
7 |
}
|
8 |
.editor\:no-inserter .wp-block-column:not(.is-selected) > .block-list-appender {
|
9 |
-
display: none
|
10 |
-
}
|
1 |
.editor\:no-inserter > .block-list-appender,
|
2 |
.editor\:no-inserter .wp-block-group__inner-container > .block-list-appender {
|
3 |
+
display: none;
|
4 |
}
|
5 |
.editor\:no-inserter .wp-block-cover__inner-container > .block-list-appender {
|
6 |
+
display: none;
|
7 |
}
|
8 |
.editor\:no-inserter .wp-block-column:not(.is-selected) > .block-list-appender {
|
9 |
+
display: none;
|
10 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/editor/no-resize.css
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
.editor\:no-resize .components-resizable-box__handle::after,
|
2 |
.editor\:no-resize .components-resizable-box__side-handle::before,
|
3 |
-
.editor\:no-resize .components-resizable-box__handle{
|
4 |
display: none;
|
5 |
-
pointer-events: none
|
6 |
}
|
7 |
|
8 |
.editor\:no-resize .components-resizable-box__container {
|
9 |
-
display: block
|
10 |
-
}
|
1 |
.editor\:no-resize .components-resizable-box__handle::after,
|
2 |
.editor\:no-resize .components-resizable-box__side-handle::before,
|
3 |
+
.editor\:no-resize .components-resizable-box__handle {
|
4 |
display: none;
|
5 |
+
pointer-events: none;
|
6 |
}
|
7 |
|
8 |
.editor\:no-resize .components-resizable-box__container {
|
9 |
+
display: block;
|
10 |
+
}
|
redux-core/extendify-sdk/utility-framework/classes/editor/pointer-events.css
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
.editor\:pointer-events-none {
|
2 |
-
pointer-events:none
|
3 |
}
|
1 |
.editor\:pointer-events-none {
|
2 |
+
pointer-events: none;
|
3 |
}
|
redux-core/extendify-sdk/utility-framework/classes/inline-list.css
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
|
2 |
/* Use "is-style-" prefix to support adding this style to the core/list block */
|
3 |
.is-style-inline-list {
|
4 |
@apply ext-pl-0 !important;
|
|
|
1 |
/* Use "is-style-" prefix to support adding this style to the core/list block */
|
2 |
.is-style-inline-list {
|
3 |
@apply ext-pl-0 !important;
|
redux-core/extendify-sdk/utility-framework/classes/misc.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
.bring-to-front {
|
2 |
-
|
3 |
-
|
4 |
}
|
1 |
.bring-to-front {
|
2 |
+
position: relative;
|
3 |
+
z-index: 10;
|
4 |
}
|
redux-core/extendify-sdk/utility-framework/classes/text-stroke.css
CHANGED
@@ -1,14 +1,23 @@
|
|
1 |
.text-stroke {
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
4 |
}
|
5 |
|
6 |
.text-stroke--primary {
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
9 |
}
|
10 |
|
11 |
.text-stroke--secondary {
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
}
|
1 |
.text-stroke {
|
2 |
+
-webkit-text-stroke-width: var(
|
3 |
+
--wp--custom--typography--text-stroke-width,
|
4 |
+
2px
|
5 |
+
);
|
6 |
+
-webkit-text-stroke-color: var(--wp--preset--color--background);
|
7 |
}
|
8 |
|
9 |
.text-stroke--primary {
|
10 |
+
-webkit-text-stroke-width: var(
|
11 |
+
--wp--custom--typography--text-stroke-width,
|
12 |
+
2px
|
13 |
+
);
|
14 |
+
-webkit-text-stroke-color: var(--wp--preset--color--primary);
|
15 |
}
|
16 |
|
17 |
.text-stroke--secondary {
|
18 |
+
-webkit-text-stroke-width: var(
|
19 |
+
--wp--custom--typography--text-stroke-width,
|
20 |
+
2px
|
21 |
+
);
|
22 |
+
-webkit-text-stroke-color: var(--wp--preset--color--secondary);
|
23 |
}
|
redux-core/extendify-sdk/utility-framework/extendify-utilities.css
CHANGED
@@ -1,33 +1,35 @@
|
|
1 |
-
@import
|
2 |
-
@import
|
3 |
-
@import
|
4 |
-
|
5 |
-
@import
|
6 |
-
@import
|
7 |
-
@import
|
8 |
-
@import
|
9 |
-
@import
|
10 |
-
@import
|
11 |
-
|
12 |
-
@import
|
13 |
-
@import
|
14 |
-
@import
|
15 |
-
@import
|
16 |
-
|
17 |
-
@import
|
18 |
-
|
19 |
-
@import
|
20 |
-
@import
|
21 |
-
@import
|
22 |
-
@import
|
23 |
-
@import
|
24 |
-
@import
|
25 |
-
|
26 |
|
27 |
body {
|
28 |
/* no suggestion */
|
29 |
/* We need to abstract this out of tailwind.config because clamp doesnt translate with negative margins */
|
30 |
-
--extendify--spacing--large: var(
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
/* Astra */
|
@@ -47,10 +49,10 @@ body {
|
|
47 |
}
|
48 |
|
49 |
/* Twenty Twenty adds a lot of margin automatically to blocks. We only want our own margin added to our patterns. */
|
50 |
-
.ext .wp-block-group__inner-container figure.wp-block-gallery.alignfull
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
}
|
55 |
|
56 |
/* Ensure no funky business is assigned to alignwide */
|
1 |
+
@import "tailwindcss/base";
|
2 |
+
@import "tailwindcss/components";
|
3 |
+
@import "tailwindcss/utilities";
|
4 |
+
|
5 |
+
@import "./classes/clip-path";
|
6 |
+
@import "./classes/columns";
|
7 |
+
@import "./classes/direction";
|
8 |
+
@import "./classes/inline-list";
|
9 |
+
@import "./classes/misc";
|
10 |
+
@import "./classes/text-stroke";
|
11 |
+
|
12 |
+
@import "./classes/editor/no-caption";
|
13 |
+
@import "./classes/editor/no-inserter";
|
14 |
+
@import "./classes/editor/no-resize";
|
15 |
+
@import "./classes/editor/pointer-events";
|
16 |
+
|
17 |
+
@import "./block-styles/cover-angled";
|
18 |
+
|
19 |
+
@import "./fallback/align";
|
20 |
+
@import "./fallback/colors";
|
21 |
+
@import "./fallback/font-sizes";
|
22 |
+
@import "./fallback/grid";
|
23 |
+
@import "./fallback/group";
|
24 |
+
@import "./fallback/image";
|
|
|
25 |
|
26 |
body {
|
27 |
/* no suggestion */
|
28 |
/* We need to abstract this out of tailwind.config because clamp doesnt translate with negative margins */
|
29 |
+
--extendify--spacing--large: var(
|
30 |
+
--wp--custom--spacing--large,
|
31 |
+
clamp(2em, 8vw, 8em)
|
32 |
+
);
|
33 |
}
|
34 |
|
35 |
/* Astra */
|
49 |
}
|
50 |
|
51 |
/* Twenty Twenty adds a lot of margin automatically to blocks. We only want our own margin added to our patterns. */
|
52 |
+
.ext .wp-block-group__inner-container figure.wp-block-gallery.alignfull {
|
53 |
+
/* no suggestion */
|
54 |
+
margin-top: unset;
|
55 |
+
margin-bottom: unset;
|
56 |
}
|
57 |
|
58 |
/* Ensure no funky business is assigned to alignwide */
|
redux-core/extendify-sdk/utility-framework/fallback/colors.css
CHANGED
@@ -20,22 +20,22 @@
|
|
20 |
|
21 |
.has-primary-color {
|
22 |
/* no suggestion */
|
23 |
-
color: var(--wp--preset--color--primary, #
|
24 |
}
|
25 |
|
26 |
.has-primary-background-color {
|
27 |
/* no suggestion */
|
28 |
-
background-color: var(--wp--preset--color--primary, #
|
29 |
}
|
30 |
|
31 |
.has-secondary-color {
|
32 |
/* no suggestion */
|
33 |
-
color: var(--wp--preset--color--secondary, #
|
34 |
}
|
35 |
|
36 |
.has-secondary-background-color {
|
37 |
/* no suggestion */
|
38 |
-
background-color: var(--wp--preset--color--secondary, #
|
39 |
}
|
40 |
|
41 |
/* Ensure themes that target specific elements use the right colors */
|
@@ -46,6 +46,6 @@
|
|
46 |
.ext.has-text-color h4,
|
47 |
.ext.has-text-color h5,
|
48 |
.ext.has-text-color h6 {
|
49 |
-
/* no suggestion */
|
50 |
color: currentColor;
|
51 |
}
|
20 |
|
21 |
.has-primary-color {
|
22 |
/* no suggestion */
|
23 |
+
color: var(--wp--preset--color--primary, #4b5563) !important;
|
24 |
}
|
25 |
|
26 |
.has-primary-background-color {
|
27 |
/* no suggestion */
|
28 |
+
background-color: var(--wp--preset--color--primary, #4b5563) !important;
|
29 |
}
|
30 |
|
31 |
.has-secondary-color {
|
32 |
/* no suggestion */
|
33 |
+
color: var(--wp--preset--color--secondary, #9ca3af) !important;
|
34 |
}
|
35 |
|
36 |
.has-secondary-background-color {
|
37 |
/* no suggestion */
|
38 |
+
background-color: var(--wp--preset--color--secondary, #9ca3af) !important;
|
39 |
}
|
40 |
|
41 |
/* Ensure themes that target specific elements use the right colors */
|
46 |
.ext.has-text-color h4,
|
47 |
.ext.has-text-color h5,
|
48 |
.ext.has-text-color h6 {
|
49 |
+
/* no suggestion */
|
50 |
color: currentColor;
|
51 |
}
|
redux-core/extendify-sdk/utility-framework/fallback/font-sizes.css
CHANGED
@@ -2,6 +2,10 @@
|
|
2 |
.editor-styles-wrapper .has-gigantic-font-size.wp-block {
|
3 |
/* no suggestion */
|
4 |
/* Have to be specific for how Neve targets headings */
|
5 |
-
--fallback-size: clamp(
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
}
|
2 |
.editor-styles-wrapper .has-gigantic-font-size.wp-block {
|
3 |
/* no suggestion */
|
4 |
/* Have to be specific for how Neve targets headings */
|
5 |
+
--fallback-size: clamp(
|
6 |
+
var(--wp--preset--font-size--huge, 22px),
|
7 |
+
calc(1rem + var(--wp--custom--typography--gigantic--preferred, 5vw)),
|
8 |
+
var(--wp--preset--font-size--huge, 42px) * 2
|
9 |
+
);
|
10 |
+
font-size: var(--wp--preset--font-size--gigantic, var(--fallback-size));
|
11 |
}
|
redux-core/extendify-sdk/utility-framework/fallback/grid.css
CHANGED
@@ -6,7 +6,10 @@
|
|
6 |
|
7 |
/* Unhinge grid for container blocks in classic themes, and < 5.9 */
|
8 |
.ext > [class*="_inner-container"] > .ext-grid:not([class*="columns"]),
|
9 |
-
.ext
|
|
|
|
|
|
|
10 |
/* no suggestion */
|
11 |
display: initial !important;
|
12 |
}
|
6 |
|
7 |
/* Unhinge grid for container blocks in classic themes, and < 5.9 */
|
8 |
.ext > [class*="_inner-container"] > .ext-grid:not([class*="columns"]),
|
9 |
+
.ext
|
10 |
+
> [class*="_inner-container"]
|
11 |
+
> .wp-block
|
12 |
+
> .ext-grid:not([class*="columns"]) {
|
13 |
/* no suggestion */
|
14 |
display: initial !important;
|
15 |
}
|
redux-core/extendify-sdk/utility-framework/fallback/group.css
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
@apply ext-mb-0;
|
4 |
}
|
5 |
|
6 |
-
|
7 |
.ext .wp-block-group__inner-container {
|
8 |
/* no suggestion */
|
9 |
@apply ext-p-0 !important;
|
@@ -15,22 +15,22 @@
|
|
15 |
}
|
16 |
|
17 |
/* Fallback for classic theme group blocks */
|
18 |
-
.ext *[class*=inner-container] > .alignwide *[class*=inner-container] {
|
19 |
/* no suggestion */
|
20 |
max-width: var(--responsive--alignwide-width, 120rem);
|
21 |
}
|
22 |
|
23 |
-
.ext *[class*=inner-container] > .alignwide *[class*=inner-container] > * {
|
24 |
/* no suggestion */
|
25 |
@apply ext-max-w-full !important;
|
26 |
}
|
27 |
|
28 |
-
.ext *[class*=inner-container] > .alignfull *[class*=inner-container] {
|
29 |
/* no suggestion */
|
30 |
@apply ext-max-w-full;
|
31 |
}
|
32 |
|
33 |
-
.ext *[class*=inner-container] > .alignfull *[class*=inner-container] > * {
|
34 |
/* no suggestion */
|
35 |
@apply ext-max-w-full !important;
|
36 |
}
|
3 |
@apply ext-mb-0;
|
4 |
}
|
5 |
|
6 |
+
/* For <5.9 */
|
7 |
.ext .wp-block-group__inner-container {
|
8 |
/* no suggestion */
|
9 |
@apply ext-p-0 !important;
|
15 |
}
|
16 |
|
17 |
/* Fallback for classic theme group blocks */
|
18 |
+
.ext *[class*="inner-container"] > .alignwide *[class*="inner-container"] {
|
19 |
/* no suggestion */
|
20 |
max-width: var(--responsive--alignwide-width, 120rem);
|
21 |
}
|
22 |
|
23 |
+
.ext *[class*="inner-container"] > .alignwide *[class*="inner-container"] > * {
|
24 |
/* no suggestion */
|
25 |
@apply ext-max-w-full !important;
|
26 |
}
|
27 |
|
28 |
+
.ext *[class*="inner-container"] > .alignfull *[class*="inner-container"] {
|
29 |
/* no suggestion */
|
30 |
@apply ext-max-w-full;
|
31 |
}
|
32 |
|
33 |
+
.ext *[class*="inner-container"] > .alignfull *[class*="inner-container"] > * {
|
34 |
/* no suggestion */
|
35 |
@apply ext-max-w-full !important;
|
36 |
}
|
redux-core/extendify-sdk/utility-framework/suggestions.config.js
CHANGED
@@ -16,8 +16,9 @@ const utilities = [
|
|
16 |
'list-none',
|
17 |
'border(-.{1})?-0',
|
18 |
]
|
19 |
-
const withPrefix = (classes) => classes.map(c => `ext-${c}`)
|
20 |
-
const withBreakpoints = (classes) =>
|
|
|
21 |
|
22 |
module.exports = {
|
23 |
suggestions: withBreakpoints(withPrefix(utilities)),
|
16 |
'list-none',
|
17 |
'border(-.{1})?-0',
|
18 |
]
|
19 |
+
const withPrefix = (classes) => classes.map((c) => `ext-${c}`)
|
20 |
+
const withBreakpoints = (classes) =>
|
21 |
+
classes.map((c) => `(${[...breakpoints, ''].join(':|')})${c}`)
|
22 |
|
23 |
module.exports = {
|
24 |
suggestions: withBreakpoints(withPrefix(utilities)),
|
redux-core/extendify-sdk/utility-framework/suggestions.json
CHANGED
@@ -261,6 +261,7 @@
|
|
261 |
"clip-path--rhombus",
|
262 |
"clip-path--diamond",
|
263 |
"clip-path--rhombus-alt",
|
|
|
264 |
"tablet\\:fullwidth-cols",
|
265 |
"desktop\\:fullwidth-cols",
|
266 |
"direction-rtl",
|
261 |
"clip-path--rhombus",
|
262 |
"clip-path--diamond",
|
263 |
"clip-path--rhombus-alt",
|
264 |
+
"wp-block-columns[class*=\"fullwidth-cols\"]\n",
|
265 |
"tablet\\:fullwidth-cols",
|
266 |
"desktop\\:fullwidth-cols",
|
267 |
"direction-rtl",
|
redux-core/extendify-sdk/utility-framework/tailwind.config.js
CHANGED
@@ -5,7 +5,7 @@ module.exports = {
|
|
5 |
enabled: true,
|
6 |
content: [],
|
7 |
safelist: {
|
8 |
-
greedy: suggestions?.map(s => new RegExp(`^${s}$`)) ?? [],
|
9 |
},
|
10 |
},
|
11 |
prefix: 'ext-',
|
5 |
enabled: true,
|
6 |
content: [],
|
7 |
safelist: {
|
8 |
+
greedy: suggestions?.map((s) => new RegExp(`^${s}$`)) ?? [],
|
9 |
},
|
10 |
},
|
11 |
prefix: 'ext-',
|
redux-core/extendify-sdk/webpack.mix.js
CHANGED
@@ -1,12 +1,15 @@
|
|
1 |
const path = require('path')
|
2 |
-
const camelCaseDash = (string) =>
|
|
|
3 |
const mix = require('laravel-mix')
|
4 |
const fs = require('fs')
|
5 |
const semver = require('semver')
|
6 |
const requiredNodeVersion = require('./package').engines.node
|
7 |
|
8 |
if (!semver.satisfies(process.version, requiredNodeVersion)) {
|
9 |
-
console.log(
|
|
|
|
|
10 |
process.exit(1)
|
11 |
}
|
12 |
|
@@ -32,10 +35,13 @@ const externals = [
|
|
32 |
'codeEditor',
|
33 |
'rich-text',
|
34 |
]
|
35 |
-
const globals = externals.reduce(
|
36 |
-
|
37 |
-
|
38 |
-
}
|
|
|
|
|
|
|
39 |
|
40 |
const webpackConfig = (context) => {
|
41 |
return {
|
@@ -64,15 +70,14 @@ mix.browserSync({
|
|
64 |
mix.js('src/app.js', 'public/build/extendify-sdk.js')
|
65 |
.webpackConfig(webpackConfig(path.resolve(__dirname, 'src')))
|
66 |
.react()
|
67 |
-
.postCss(
|
68 |
-
'
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
)
|
76 |
|
77 |
mix.js('editorplus/editorplus.js', 'public/editorplus/editorplus.min.js')
|
78 |
.webpackConfig(webpackConfig(path.resolve(__dirname, 'editorplus')))
|
@@ -81,9 +86,13 @@ mix.js('editorplus/editorplus.js', 'public/editorplus/editorplus.min.js')
|
|
81 |
// Utility specific processing
|
82 |
const blockList = new Set()
|
83 |
const buildBlockList = (css) => {
|
84 |
-
css.walkRules(rule => {
|
85 |
// Allows us to ignore some rules from being processed/purged
|
86 |
-
if (
|
|
|
|
|
|
|
|
|
87 |
blockList.add(rule.selector.replace('.', '').split(' ')[0])
|
88 |
}
|
89 |
})
|
@@ -95,19 +104,23 @@ const extractSuggestions = (css) => {
|
|
95 |
notes: 'This file is generated in webpack.mix.js. Do not edit directly.',
|
96 |
suggestions: [],
|
97 |
}
|
98 |
-
css.walkRules(rule => {
|
99 |
-
data.suggestions.push(
|
100 |
-
.
|
101 |
-
|
102 |
-
|
|
|
|
|
103 |
})
|
104 |
try {
|
105 |
-
data.suggestions = [...new Set(data.suggestions)].filter(
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
111 |
console.error(error)
|
112 |
}
|
113 |
return css
|
@@ -119,14 +132,19 @@ mix.postCss(
|
|
119 |
[
|
120 |
require('postcss-import'),
|
121 |
buildBlockList,
|
122 |
-
require('tailwindcss')({
|
123 |
-
|
124 |
-
// Removes top level TW styles like *::before {}
|
125 |
-
rule.selector.startsWith('*') && rule.remove()
|
126 |
-
// This appends the :not() exception to padding and margins
|
127 |
-
new RegExp('[:]?[^a-z]-?p[a-z]?-.+').test(rule) && (rule.selector += ':not([style*="padding"])') ||
|
128 |
-
new RegExp('[:]?[^a-z]-?m[a-z]?-.+').test(rule) && (rule.selector += ':not([style*="margin"])')
|
129 |
}),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
extractSuggestions,
|
131 |
],
|
132 |
)
|
1 |
const path = require('path')
|
2 |
+
const camelCaseDash = (string) =>
|
3 |
+
string.replace(/-([a-z])/g, (_match, letter) => letter.toUpperCase())
|
4 |
const mix = require('laravel-mix')
|
5 |
const fs = require('fs')
|
6 |
const semver = require('semver')
|
7 |
const requiredNodeVersion = require('./package').engines.node
|
8 |
|
9 |
if (!semver.satisfies(process.version, requiredNodeVersion)) {
|
10 |
+
console.log(
|
11 |
+
`Please switch to node version ${requiredNodeVersion} to build. You're currently on ${process.version}. Use FNM or NVM to manage node versions and auto switching.`,
|
12 |
+
)
|
13 |
process.exit(1)
|
14 |
}
|
15 |
|
35 |
'codeEditor',
|
36 |
'rich-text',
|
37 |
]
|
38 |
+
const globals = externals.reduce(
|
39 |
+
(externals, name) => ({
|
40 |
+
...externals,
|
41 |
+
[`@wordpress/${name}`]: `wp.${camelCaseDash(name)}`,
|
42 |
+
}),
|
43 |
+
{},
|
44 |
+
)
|
45 |
|
46 |
const webpackConfig = (context) => {
|
47 |
return {
|
70 |
mix.js('src/app.js', 'public/build/extendify-sdk.js')
|
71 |
.webpackConfig(webpackConfig(path.resolve(__dirname, 'src')))
|
72 |
.react()
|
73 |
+
.postCss('src/app.css', 'public/build/extendify-sdk.css', [
|
74 |
+
require('tailwindcss'),
|
75 |
+
(css) =>
|
76 |
+
css.walkRules((rule) => {
|
77 |
+
rule.selector.startsWith('*') && rule.remove()
|
78 |
+
}),
|
79 |
+
require('postcss-safe-important'),
|
80 |
+
])
|
|
|
81 |
|
82 |
mix.js('editorplus/editorplus.js', 'public/editorplus/editorplus.min.js')
|
83 |
.webpackConfig(webpackConfig(path.resolve(__dirname, 'editorplus')))
|
86 |
// Utility specific processing
|
87 |
const blockList = new Set()
|
88 |
const buildBlockList = (css) => {
|
89 |
+
css.walkRules((rule) => {
|
90 |
// Allows us to ignore some rules from being processed/purged
|
91 |
+
if (
|
92 |
+
rule?.nodes.find(
|
93 |
+
(n) => n.type === 'comment' && n.text === 'no suggestion',
|
94 |
+
)
|
95 |
+
) {
|
96 |
blockList.add(rule.selector.replace('.', '').split(' ')[0])
|
97 |
}
|
98 |
})
|
104 |
notes: 'This file is generated in webpack.mix.js. Do not edit directly.',
|
105 |
suggestions: [],
|
106 |
}
|
107 |
+
css.walkRules((rule) => {
|
108 |
+
data.suggestions.push(
|
109 |
+
rule.selector
|
110 |
+
.replace('.', '')
|
111 |
+
.replace(new RegExp(':not\\(([^\\)]*)\\)'), '')
|
112 |
+
.split(/ |.wp-/)[0],
|
113 |
+
)
|
114 |
})
|
115 |
try {
|
116 |
+
data.suggestions = [...new Set(data.suggestions)].filter(
|
117 |
+
(c) => !classesToExclude.includes(c),
|
118 |
+
)
|
119 |
+
fs.writeFileSync(
|
120 |
+
__dirname + '/utility-framework/suggestions.json',
|
121 |
+
JSON.stringify(data, null, 4),
|
122 |
+
)
|
123 |
+
} catch (error) {
|
124 |
console.error(error)
|
125 |
}
|
126 |
return css
|
132 |
[
|
133 |
require('postcss-import'),
|
134 |
buildBlockList,
|
135 |
+
require('tailwindcss')({
|
136 |
+
config: 'utility-framework/tailwind.config.js',
|
|
|
|
|
|
|
|
|
|
|
137 |
}),
|
138 |
+
(css) =>
|
139 |
+
css.walkRules((rule) => {
|
140 |
+
// Removes top level TW styles like *::before {}
|
141 |
+
rule.selector.startsWith('*') && rule.remove()
|
142 |
+
// This appends the :not() exception to padding and margins
|
143 |
+
;(new RegExp('[:]?[^a-z]-?p[a-z]?-.+').test(rule) &&
|
144 |
+
(rule.selector += ':not([style*="padding"])')) ||
|
145 |
+
(new RegExp('[:]?[^a-z]-?m[a-z]?-.+').test(rule) &&
|
146 |
+
(rule.selector += ':not([style*="margin"])'))
|
147 |
+
}),
|
148 |
extractSuggestions,
|
149 |
],
|
150 |
)
|
redux-core/framework.php
CHANGED
@@ -29,7 +29,7 @@ defined( 'ABSPATH' ) || exit;
|
|
29 |
|
30 |
require_once dirname( __FILE__ ) . '/class-redux-core.php';
|
31 |
|
32 |
-
Redux_Core::$version = '4.3.
|
33 |
Redux_Core::$redux_path = dirname( __FILE__ );
|
34 |
Redux_Core::instance();
|
35 |
|
29 |
|
30 |
require_once dirname( __FILE__ ) . '/class-redux-core.php';
|
31 |
|
32 |
+
Redux_Core::$version = '4.3.4';
|
33 |
Redux_Core::$redux_path = dirname( __FILE__ );
|
34 |
Redux_Core::instance();
|
35 |
|
redux-core/inc/classes/class-redux-functions-ex.php
CHANGED
@@ -301,7 +301,7 @@ if ( ! class_exists( 'Redux_Functions_Ex', false ) ) {
|
|
301 |
$theme_paths = array_unique( $theme_paths );
|
302 |
$file_path = self::wp_normalize_path( $file );
|
303 |
|
304 |
-
$filename = explode(
|
305 |
|
306 |
end( $filename );
|
307 |
|
301 |
$theme_paths = array_unique( $theme_paths );
|
302 |
$file_path = self::wp_normalize_path( $file );
|
303 |
|
304 |
+
$filename = explode( DIRECTORY_SEPARATOR, $file );
|
305 |
|
306 |
end( $filename );
|
307 |
|
redux-core/inc/classes/class-redux-helpers.php
CHANGED
@@ -120,7 +120,7 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
|
|
120 |
*/
|
121 |
public static function isFieldInUseByType( array $fields, array $field = array() ): bool { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
|
122 |
// phpcs:ignore Squiz.PHP.CommentedOutCode
|
123 |
-
_deprecated_function( __CLASS__ . '::' . __FUNCTION__, 'Redux 4.0', 'Redux_Helpers::
|
124 |
return self::is_field_in_use_by_type( $fields, $field );
|
125 |
}
|
126 |
|
@@ -1182,9 +1182,9 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
|
|
1182 |
|
1183 |
$sysinfo['redux_instances'][ $inst ]['extensions'] = Redux::get_extensions( $inst );
|
1184 |
|
1185 |
-
if ( isset( $data->extensions[
|
1186 |
-
$data->extensions[
|
1187 |
-
$sysinfo['redux_instances'][ $inst ][
|
1188 |
}
|
1189 |
|
1190 |
if ( isset( $data->args['templates_path'] ) && '' !== $data->args['templates_path'] ) {
|
@@ -2022,7 +2022,7 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
|
|
2022 |
'deep-purple' => array( '#EDE7F6', '#D1C4E9', '#B39DDB', '#9575CD', '#7E57C2', '#673AB7', '#5E35B1', '#512DA8', '#4527A0', '#311B92', '#B388FF', '#7C4DFF', '#651FFF', '#6200EA' ),
|
2023 |
'indigo' => array( '#E8EAF6', '#C5CAE9', '#9FA8DA', '#7986CB', '#5C6BC0', '#3F51B5', '#3949AB', '#303F9F', '#283593', '#1A237E', '#8C9EFF', '#536DFE', '#3D5AFE', '#304FFE' ),
|
2024 |
'blue' => array( '#E3F2FD', '#BBDEFB', '#90CAF9', '#64B5F6', '#42A5F5', '#2196F3', '#1E88E5', '#1976D2', '#1565C0', '#0D47A1', '#82B1FF', '#448AFF', '#2979FF', '#2962FF' ),
|
2025 |
-
'
|
2026 |
'cyan' => array( '#E0F7FA', '#B2EBF2', '#80DEEA', '#4DD0E1', '#26C6DA', '#00BCD4', '#00ACC1', '#0097A7', '#00838F', '#006064', '#84FFFF', '#18FFFF', '#00E5FF', '#00B8D4' ),
|
2027 |
'teal' => array( '#E0F2F1', '#B2DFDB', '#80CBC4', '#4DB6AC', '#26A69A', '#009688', '#00897B', '#00796B', '#00695C', '#004D40', '#A7FFEB', '#64FFDA', '#1DE9B6', '#00BFA5' ),
|
2028 |
'green' => array( '#E8F5E9', '#C8E6C9', '#A5D6A7', '#81C784', '#66BB6A', '#4CAF50', '#43A047', '#388E3C', '#2E7D32', '#1B5E20', '#B9F6CA', '#69F0AE', '#00E676', '#00C853' ),
|
@@ -2033,8 +2033,8 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
|
|
2033 |
'orange' => array( '#FFF3E0', '#FFE0B2', '#FFCC80', '#FFB74D', '#FFA726', '#FF9800', '#FB8C00', '#F57C00', '#EF6C00', '#E65100', '#FFD180', '#FFAB40', '#FF9100', '#FF6D00' ),
|
2034 |
'deep-orange' => array( '#FBE9A7', '#FFCCBC', '#FFAB91', '#FF8A65', '#FF7043', '#FF5722', '#F4511E', '#E64A19', '#D84315', '#BF360C', '#FF9E80', '#FF6E40', '#FF3D00', '#DD2600' ),
|
2035 |
'brown' => array( '#EFEBE9', '#D7CCC8', '#BCAAA4', '#A1887F', '#8D6E63', '#795548', '#6D4C41', '#5D4037', '#4E342E', '#3E2723' ),
|
2036 |
-
'
|
2037 |
-
'blue-
|
2038 |
);
|
2039 |
|
2040 |
$mui_arr = array(
|
120 |
*/
|
121 |
public static function isFieldInUseByType( array $fields, array $field = array() ): bool { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
|
122 |
// phpcs:ignore Squiz.PHP.CommentedOutCode
|
123 |
+
_deprecated_function( __CLASS__ . '::' . __FUNCTION__, 'Redux 4.0', 'Redux_Helpers::is_field_in_use_by_type( $parent, $field )' );
|
124 |
return self::is_field_in_use_by_type( $fields, $field );
|
125 |
}
|
126 |
|
1182 |
|
1183 |
$sysinfo['redux_instances'][ $inst ]['extensions'] = Redux::get_extensions( $inst );
|
1184 |
|
1185 |
+
if ( isset( $data->extensions['metaboxes'] ) ) {
|
1186 |
+
$data->extensions['metaboxes']->init();
|
1187 |
+
$sysinfo['redux_instances'][ $inst ]['metaboxes'] = $data->extensions['metaboxes']->boxes;
|
1188 |
}
|
1189 |
|
1190 |
if ( isset( $data->args['templates_path'] ) && '' !== $data->args['templates_path'] ) {
|
2022 |
'deep-purple' => array( '#EDE7F6', '#D1C4E9', '#B39DDB', '#9575CD', '#7E57C2', '#673AB7', '#5E35B1', '#512DA8', '#4527A0', '#311B92', '#B388FF', '#7C4DFF', '#651FFF', '#6200EA' ),
|
2023 |
'indigo' => array( '#E8EAF6', '#C5CAE9', '#9FA8DA', '#7986CB', '#5C6BC0', '#3F51B5', '#3949AB', '#303F9F', '#283593', '#1A237E', '#8C9EFF', '#536DFE', '#3D5AFE', '#304FFE' ),
|
2024 |
'blue' => array( '#E3F2FD', '#BBDEFB', '#90CAF9', '#64B5F6', '#42A5F5', '#2196F3', '#1E88E5', '#1976D2', '#1565C0', '#0D47A1', '#82B1FF', '#448AFF', '#2979FF', '#2962FF' ),
|
2025 |
+
'light-blue' => array( '#E1F5FE', '#B3E5FC', '#81D4fA', '#4fC3F7', '#29B6FC', '#03A9F4', '#039BE5', '#0288D1', '#0277BD', '#01579B', '#80D8FF', '#40C4FF', '#00B0FF', '#0091EA' ),
|
2026 |
'cyan' => array( '#E0F7FA', '#B2EBF2', '#80DEEA', '#4DD0E1', '#26C6DA', '#00BCD4', '#00ACC1', '#0097A7', '#00838F', '#006064', '#84FFFF', '#18FFFF', '#00E5FF', '#00B8D4' ),
|
2027 |
'teal' => array( '#E0F2F1', '#B2DFDB', '#80CBC4', '#4DB6AC', '#26A69A', '#009688', '#00897B', '#00796B', '#00695C', '#004D40', '#A7FFEB', '#64FFDA', '#1DE9B6', '#00BFA5' ),
|
2028 |
'green' => array( '#E8F5E9', '#C8E6C9', '#A5D6A7', '#81C784', '#66BB6A', '#4CAF50', '#43A047', '#388E3C', '#2E7D32', '#1B5E20', '#B9F6CA', '#69F0AE', '#00E676', '#00C853' ),
|
2033 |
'orange' => array( '#FFF3E0', '#FFE0B2', '#FFCC80', '#FFB74D', '#FFA726', '#FF9800', '#FB8C00', '#F57C00', '#EF6C00', '#E65100', '#FFD180', '#FFAB40', '#FF9100', '#FF6D00' ),
|
2034 |
'deep-orange' => array( '#FBE9A7', '#FFCCBC', '#FFAB91', '#FF8A65', '#FF7043', '#FF5722', '#F4511E', '#E64A19', '#D84315', '#BF360C', '#FF9E80', '#FF6E40', '#FF3D00', '#DD2600' ),
|
2035 |
'brown' => array( '#EFEBE9', '#D7CCC8', '#BCAAA4', '#A1887F', '#8D6E63', '#795548', '#6D4C41', '#5D4037', '#4E342E', '#3E2723' ),
|
2036 |
+
'gray' => array( '#FAFAFA', '#F5F5F5', '#EEEEEE', '#E0E0E0', '#BDBDBD', '#9E9E9E', '#757575', '#616161', '#424242', '#212121', '#000000', '#ffffff' ),
|
2037 |
+
'blue-gray' => array( '#ECEFF1', '#CFD8DC', '#B0BBC5', '#90A4AE', '#78909C', '#607D8B', '#546E7A', '#455A64', '#37474F', '#263238' ),
|
2038 |
);
|
2039 |
|
2040 |
$mui_arr = array(
|
redux-core/inc/fields/color/class-redux-color.php
CHANGED
@@ -25,7 +25,7 @@ if ( ! class_exists( 'Redux_Color', false ) ) {
|
|
25 |
public function set_defaults() {
|
26 |
$defaults = array(
|
27 |
'transparent' => true,
|
28 |
-
'
|
29 |
);
|
30 |
|
31 |
$this->field = wp_parse_args( $this->field, $defaults );
|
25 |
public function set_defaults() {
|
26 |
$defaults = array(
|
27 |
'transparent' => true,
|
28 |
+
'color_alpha' => false,
|
29 |
);
|
30 |
|
31 |
$this->field = wp_parse_args( $this->field, $defaults );
|
redux-core/inc/fields/color_gradient/class-redux-color-gradient.php
CHANGED
@@ -59,7 +59,6 @@ if ( ! class_exists( 'Redux_Color_Gradient', false ) ) {
|
|
59 |
'preview' => false,
|
60 |
'preview_height' => '150px',
|
61 |
'transparent' => true,
|
62 |
-
'alpha' => false,
|
63 |
'gradient-type' => false,
|
64 |
'gradient-reach' => false,
|
65 |
'gradient-angle' => false,
|
59 |
'preview' => false,
|
60 |
'preview_height' => '150px',
|
61 |
'transparent' => true,
|
|
|
62 |
'gradient-type' => false,
|
63 |
'gradient-reach' => false,
|
64 |
'gradient-angle' => false,
|
redux-core/inc/fields/media/class-redux-media.php
CHANGED
@@ -37,7 +37,7 @@ if ( ! class_exists( 'Redux_Media', false ) ) {
|
|
37 |
'width' => '',
|
38 |
'height' => '',
|
39 |
'thumbnail' => '',
|
40 |
-
'filter'
|
41 |
'grayscale' => array(
|
42 |
'checked' => false,
|
43 |
'value' => 0,
|
@@ -89,7 +89,7 @@ if ( ! class_exists( 'Redux_Media', false ) ) {
|
|
89 |
'placeholder' => esc_html__( 'No media selected', 'redux-framework' ),
|
90 |
'readonly' => true,
|
91 |
'class' => '',
|
92 |
-
'filter'
|
93 |
'grayscale' => false,
|
94 |
'blur' => false,
|
95 |
'sepia' => false,
|
37 |
'width' => '',
|
38 |
'height' => '',
|
39 |
'thumbnail' => '',
|
40 |
+
'filter' => array(
|
41 |
'grayscale' => array(
|
42 |
'checked' => false,
|
43 |
'value' => 0,
|
89 |
'placeholder' => esc_html__( 'No media selected', 'redux-framework' ),
|
90 |
'readonly' => true,
|
91 |
'class' => '',
|
92 |
+
'filter' => array(
|
93 |
'grayscale' => false,
|
94 |
'blur' => false,
|
95 |
'sepia' => false,
|
redux-framework.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* Plugin URI: http://wordpress.org/plugins/redux-framework
|
9 |
* GitHub URI: reduxframework/redux-framework
|
10 |
* Description: Build better sites in WordPress fast!
|
11 |
-
* Version: 4.3.
|
12 |
* Requires at least: 4.0
|
13 |
* Requires PHP: 7.1
|
14 |
* Author: Extendify
|
8 |
* Plugin URI: http://wordpress.org/plugins/redux-framework
|
9 |
* GitHub URI: reduxframework/redux-framework
|
10 |
* Description: Build better sites in WordPress fast!
|
11 |
+
* Version: 4.3.4
|
12 |
* Requires at least: 4.0
|
13 |
* Requires PHP: 7.1
|
14 |
* Author: Extendify
|
sample/sections/color-selection/color-palette.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Redux
|
4 |
*
|
5 |
* For full documentation, please visit: http:https://devs.redux.io/
|
6 |
*
|
7 |
-
* @package Redux
|
8 |
*/
|
9 |
|
10 |
defined( 'ABSPATH' ) || exit;
|
@@ -13,7 +13,7 @@ Redux::set_section(
|
|
13 |
$opt_name,
|
14 |
array(
|
15 |
'title' => esc_html__( 'Color Palette', 'your-textdomain-here' ),
|
16 |
-
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/palette
|
17 |
'id' => 'color-palette',
|
18 |
'subsection' => true,
|
19 |
'fields' => array(
|
@@ -47,7 +47,7 @@ Redux::set_section(
|
|
47 |
'id' => 'opt-color-palette-mui-all',
|
48 |
'type' => 'color_palette',
|
49 |
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
|
50 |
-
'subtitle' => esc_html__( 'All Material
|
51 |
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
|
52 |
'default' => '#F44336',
|
53 |
'options' => array(
|
@@ -59,7 +59,7 @@ Redux::set_section(
|
|
59 |
'id' => 'opt-color-palette-mui-primary',
|
60 |
'type' => 'color_palette',
|
61 |
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
|
62 |
-
'subtitle' => esc_html__( 'Primary Material
|
63 |
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
|
64 |
'default' => '#000000',
|
65 |
'options' => array(
|
@@ -73,7 +73,7 @@ Redux::set_section(
|
|
73 |
'id' => 'opt-color-palette-mui-red',
|
74 |
'type' => 'color_palette',
|
75 |
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
|
76 |
-
'subtitle' => esc_html__( 'Red Material
|
77 |
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
|
78 |
'default' => '#FF1744',
|
79 |
'options' => array(
|
@@ -85,7 +85,7 @@ Redux::set_section(
|
|
85 |
'id' => 'opt-color-palette-mui-a100',
|
86 |
'type' => 'color_palette',
|
87 |
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
|
88 |
-
'subtitle' => esc_html__( 'A100 Material
|
89 |
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
|
90 |
'default' => '#FF80AB',
|
91 |
'options' => array(
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Redux Color Palette Sample config.
|
4 |
*
|
5 |
* For full documentation, please visit: http:https://devs.redux.io/
|
6 |
*
|
7 |
+
* @package Redux
|
8 |
*/
|
9 |
|
10 |
defined( 'ABSPATH' ) || exit;
|
13 |
$opt_name,
|
14 |
array(
|
15 |
'title' => esc_html__( 'Color Palette', 'your-textdomain-here' ),
|
16 |
+
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/color-palette.html" target="_blank">https://devs.redux.io/core-fields/palette-color.html</a>',
|
17 |
'id' => 'color-palette',
|
18 |
'subsection' => true,
|
19 |
'fields' => array(
|
47 |
'id' => 'opt-color-palette-mui-all',
|
48 |
'type' => 'color_palette',
|
49 |
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
|
50 |
+
'subtitle' => esc_html__( 'All Material Design Colors.', 'your-textdomain-here' ),
|
51 |
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
|
52 |
'default' => '#F44336',
|
53 |
'options' => array(
|
59 |
'id' => 'opt-color-palette-mui-primary',
|
60 |
'type' => 'color_palette',
|
61 |
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
|
62 |
+
'subtitle' => esc_html__( 'Primary Material Design Colors.', 'your-textdomain-here' ),
|
63 |
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
|
64 |
'default' => '#000000',
|
65 |
'options' => array(
|
73 |
'id' => 'opt-color-palette-mui-red',
|
74 |
'type' => 'color_palette',
|
75 |
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
|
76 |
+
'subtitle' => esc_html__( 'Red Material Design Colors.', 'your-textdomain-here' ),
|
77 |
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
|
78 |
'default' => '#FF1744',
|
79 |
'options' => array(
|
85 |
'id' => 'opt-color-palette-mui-a100',
|
86 |
'type' => 'color_palette',
|
87 |
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
|
88 |
+
'subtitle' => esc_html__( 'A100 Material Design Colors.', 'your-textdomain-here' ),
|
89 |
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
|
90 |
'default' => '#FF80AB',
|
91 |
'options' => array(
|
sample/sections/design-fields/box-shadow.php
CHANGED
@@ -13,17 +13,13 @@ Redux::set_section(
|
|
13 |
array(
|
14 |
'title' => esc_html__( 'Box Shadow', 'your-textdomain-here' ),
|
15 |
'id' => 'design-box-shadow',
|
16 |
-
|
17 |
-
// 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/box-shadow.html" target="_blank">https://devs.redux.io/core-fields/box_shadow.html</a>',
|
18 |
'subsection' => true,
|
19 |
'fields' => array(
|
20 |
array(
|
21 |
'id' => 'opt-box_shadow',
|
22 |
'type' => 'box_shadow',
|
23 |
'output' => array( '.site-header' ),
|
24 |
-
'color_alpha' => array(
|
25 |
-
'inset-shadow' => true,
|
26 |
-
),
|
27 |
'media_query' => array(
|
28 |
'output' => true,
|
29 |
'compiler' => true,
|
13 |
array(
|
14 |
'title' => esc_html__( 'Box Shadow', 'your-textdomain-here' ),
|
15 |
'id' => 'design-box-shadow',
|
16 |
+
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/box-shadow.html" target="_blank">https://devs.redux.io/core-fields/box_shadow.html</a>',
|
|
|
17 |
'subsection' => true,
|
18 |
'fields' => array(
|
19 |
array(
|
20 |
'id' => 'opt-box_shadow',
|
21 |
'type' => 'box_shadow',
|
22 |
'output' => array( '.site-header' ),
|
|
|
|
|
|
|
23 |
'media_query' => array(
|
24 |
'output' => true,
|
25 |
'compiler' => true,
|
sample/sections/media-uploads/media.php
CHANGED
@@ -56,15 +56,15 @@ Redux::set_section(
|
|
56 |
// Can be set to false to allow any media type, or can also be set to any mime type.
|
57 |
'mode' => false,
|
58 |
|
59 |
-
'desc'
|
60 |
-
'subtitle'
|
61 |
),
|
62 |
array(
|
63 |
'id' => 'opt-media-filter',
|
64 |
'type' => 'media',
|
65 |
'url' => true,
|
66 |
'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
|
67 |
-
'compiler' =>
|
68 |
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
|
69 |
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
|
70 |
'preview_size' => 'full',
|
56 |
// Can be set to false to allow any media type, or can also be set to any mime type.
|
57 |
'mode' => false,
|
58 |
|
59 |
+
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
|
60 |
+
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
|
61 |
),
|
62 |
array(
|
63 |
'id' => 'opt-media-filter',
|
64 |
'type' => 'media',
|
65 |
'url' => true,
|
66 |
'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
|
67 |
+
'compiler' => true,
|
68 |
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
|
69 |
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
|
70 |
'preview_size' => 'full',
|