Version Description
Download this release
Release Info
Developer | razvanpapadopol |
Plugin | Full Site Editing |
Version | 3.6678 |
Comparing to | |
See all releases |
Code changes from version 3.6512 to 3.6678
- full-site-editing-plugin.php +2 -2
- readme.txt +1 -1
- starter-page-templates/dist/starter-page-templates.asset.php +1 -1
- starter-page-templates/dist/starter-page-templates.css +1 -1
- starter-page-templates/dist/starter-page-templates.js +1 -1
- starter-page-templates/dist/starter-page-templates.rtl.css +1 -1
- starter-page-templates/page-patterns-plugin.tsx +16 -2
- starter-page-templates/store.ts +3 -1
- wpcom-block-editor-nux/class-wp-rest-wpcom-block-editor-nux-status-controller.php +4 -0
- wpcom-block-editor-nux/dist/wpcom-block-editor-nux.asset.php +1 -1
- wpcom-block-editor-nux/dist/wpcom-block-editor-nux.js +2 -2
- wpcom-block-editor-nux/src/block-editor-nux.js +25 -9
- wpcom-block-editor-nux/src/store.js +10 -2
- wpcom-block-editor-nux/src/test/store.test.js +4 -4
- wpcom-block-editor-nux/src/welcome-tour/tour-launch.js +1 -1
full-site-editing-plugin.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
-
* Version: 3.
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
@@ -42,7 +42,7 @@ namespace A8C\FSE;
|
|
42 |
*
|
43 |
* @var string
|
44 |
*/
|
45 |
-
define( 'A8C_ETK_PLUGIN_VERSION', '3.
|
46 |
|
47 |
// Always include these helper files for dotcom FSE.
|
48 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
+
* Version: 3.6678
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
42 |
*
|
43 |
* @var string
|
44 |
*/
|
45 |
+
define( 'A8C_ETK_PLUGIN_VERSION', '3.6678' );
|
46 |
|
47 |
// Always include these helper files for dotcom FSE.
|
48 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic
|
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.5
|
5 |
Tested up to: 5.6
|
6 |
-
Stable tag: 3.
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.5
|
5 |
Tested up to: 5.6
|
6 |
+
Stable tag: 3.6678
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
starter-page-templates/dist/starter-page-templates.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => 'a8494ac70bec2b9e5619f811a0e87a83');
|
starter-page-templates/dist/starter-page-templates.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@keyframes onboarding-loading-pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.mshots-image__loader{animation:onboarding-loading-pulse 1.6s ease-in-out infinite;background:#f0f0f0;color:transparent}.mshots-image__loader:after{content:"\00a0"}.mshots-image__container{height:100%}.hover-scroll{background-size:100%;background-position:top;background-repeat:no-repeat;margin-left:auto;margin-right:auto}.hover-scroll:hover{background-position:bottom}.mshots-image-visible{animation:fadein 1.5s}@keyframes fadein{0%{opacity:0}to{opacity:1}}@font-face{font-display:swap;font-family:Recoleta;font-weight:400;src:url(https://s1.wp.com/i/fonts/recoleta/400.woff2) format("woff2"),url(https://s1.wp.com/i/fonts/recoleta/400.woff) format("woff")}.wp-brand-font{font-family:"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400}[lang*=af] .wp-brand-font,[lang*=ca] .wp-brand-font,[lang*=cs] .wp-brand-font,[lang*=da] .wp-brand-font,[lang*=de] .wp-brand-font,[lang*=en] .wp-brand-font,[lang*=es] .wp-brand-font,[lang*=eu] .wp-brand-font,[lang*=fi] .wp-brand-font,[lang*=fr] .wp-brand-font,[lang*=gl] .wp-brand-font,[lang*=hr] .wp-brand-font,[lang*=hu] .wp-brand-font,[lang*=id] .wp-brand-font,[lang*=is] .wp-brand-font,[lang*=it] .wp-brand-font,[lang*=lv] .wp-brand-font,[lang*=mt] .wp-brand-font,[lang*=nb] .wp-brand-font,[lang*=nl] .wp-brand-font,[lang*=pl] .wp-brand-font,[lang*=pt] .wp-brand-font,[lang*=ro] .wp-brand-font,[lang*=ru] .wp-brand-font,[lang*=sk] .wp-brand-font,[lang*=sl] .wp-brand-font,[lang*=sq] .wp-brand-font,[lang*=sr] .wp-brand-font,[lang*=sv] .wp-brand-font,[lang*=sw] .wp-brand-font,[lang*=tr] .wp-brand-font,[lang*=uz] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}@media screen and (min-width:600px){.page-pattern-modal{width:calc(100% - 32px);height:90vh;overflow-y:hidden;padding-bottom:24px}.page-pattern-modal .components-modal__content{padding:0 32px 24px}}@media screen and (min-width:961px){.page-pattern-modal{width:calc(100% - 64px)}}.page-pattern-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch;margin-top:-1px;padding:0 16px 16px}.page-pattern-modal .components-modal__header{border-bottom:none;margin-right:-16px}.page-pattern-modal__heading{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;margin:0;font-size:2rem;line-height:1.25}@media screen and (min-width:600px){.page-pattern-modal__heading{font-size:2.25rem;line-height:1.1}}@media screen and (min-width:961px){.page-pattern-modal__heading{font-size:3rem;line-height:1.35}}.page-pattern-modal__description{color:#646970;margin:0 0 24px;font-size:1rem;line-height:1.5}@media screen and (min-width:600px){.page-pattern-modal__inner{padding:0 20px}}.pattern-selector-control{margin-bottom:20px}.pattern-selector-control .components-base-control__label{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.pattern-selector-control__options{display:grid;grid-template-columns:1fr;column-gap:1.5em;row-gap:3em}@media screen and (min-width:600px){.pattern-selector-control__options{margin-top:0;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}}@media screen and (min-width:1648px){.pattern-selector-control__options{grid-template-columns:repeat(auto-fill,minmax(350px,1fr))}}@media screen and (min-width:2000px){.pattern-selector-control__options{grid-template-columns:repeat(auto-fill,minmax(500px,1fr))}}.pattern-selector-item__label{display:block;width:100%;text-align:center;border:none;cursor:pointer;appearance:none;padding:0;overflow:hidden;background-color:#fff;position:relative;transform:translateZ(0);color:#50575e}.pattern-selector-item__label:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent}.pattern-selector-item__label:hover{color:var(--color-text)}.pattern-selector-item__label:hover .pattern-selector-item__preview-wrap{border:1px solid #646970}.pattern-selector-item__preview-wrap{width:100%;display:block;background:#fff;border-radius:0;overflow:hidden;height:0;padding-top:65%;position:relative;opacity:1;transform:translateZ(0);border:1px solid #dcdcde;margin:0 auto 1em}.pattern-selector-item__preview-wrap.is-rendering{opacity:.5}.pattern-selector-item__media,.pattern-selector-item__preview-wrap-inner-position{position:absolute;top:0;left:0;width:100%;height:100%}.pattern-selector-item__media{display:block;object-fit:cover}@media screen and (min-width:600px){.page-pattern-modal__sidebar{position:fixed;width:230px;padding-right:22px;pointer-events:none}.page-pattern-modal__sidebar>*{pointer-events:auto}.page-pattern-modal__sidebar .page-pattern-modal__category-list{pointer-events:none}.page-pattern-modal__sidebar .page-pattern-modal__category-list .page-pattern-modal__category-button{pointer-events:auto}}@media screen and (min-width:961px){.page-pattern-modal__sidebar{width:324px;padding-right:48px}}.page-pattern-modal__category-list{display:none;margin:0;padding-top:35px}@media screen and (min-width:600px){.page-pattern-modal__category-list{display:block}}.page-pattern-modal__category-list .components-button.is-tertiary{display:block;width:auto;height:auto;color:#50575e;font-size:.875rem;margin-left:-12px;padding:6px 12px;box-shadow:none}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):hover{box-shadow:none;color:var(--color-text)!important}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):active{background:transparent}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.page-pattern-modal__category-list .page-pattern-modal__category-item-selection-wrapper{border-bottom:2px solid transparent;padding-bottom:2px}.page-pattern-modal__category-list .components-menu-item__button:not(:disabled)[aria-selected=true]{color:var(--color-text);font-weight:600}.page-pattern-modal__category-list .components-menu-item__button:not(:disabled)[aria-selected=true] .page-pattern-modal__category-item-selection-wrapper{border-bottom-color:var(--color-text)}.page-pattern-modal__button-container{display:grid;grid-template-columns:1fr 1fr;column-gap:8px}@media screen and (min-width:600px){.page-pattern-modal__button-container{display:inline}}.components-button.page-pattern-modal__blank-button{min-height:40px;box-shadow:inset 0 0 0 1px #dcdcde;color:var(--color-text)}.components-button.page-pattern-modal__blank-button:active{color:var(--color-text)}.components-button.page-pattern-modal__blank-button.is-secondary:hover:not(:disabled){box-shadow:inset 0 0 0 1px #646970;color:var(--color-text)}.components-button.page-pattern-modal__blank-button.is-secondary:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.page-pattern-modal__blank-button.is-secondary:hover:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid transparent}.wp-core-ui select.page-pattern-modal__mobile-category-dropdown{font-size:13px;border-color:#dcdcde}@media screen and (min-width:600px){.wp-core-ui select.page-pattern-modal__mobile-category-dropdown{display:none}}@media screen and (min-width:600px){.page-pattern-modal__pattern-list-container{padding-left:230px}}@media screen and (min-width:961px){.page-pattern-modal__pattern-list-container{padding-left:324px}}.sidebar-modal-opener{display:flex;flex-direction:column;align-items:center;justify-content:center}.sidebar-modal-opener .pattern-selector-item__label{max-width:300px}.sidebar-modal-opener__warning-modal{display:flex;flex-direction:column;justify-content:center;align-items:center}.sidebar-modal-opener__warning-text{max-width:300px;font-size:1rem;line-height:1.5rem}.sidebar-modal-opener__warning-options{float:right;margin-top:20px}.sidebar-modal-opener__warning-options .components-button{margin-left:12px}
|
1 |
+
@keyframes onboarding-loading-pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.mshots-image__loader{animation:onboarding-loading-pulse 1.6s ease-in-out infinite;background:#f0f0f0;color:transparent}.mshots-image__loader:after{content:"\00a0"}.mshots-image__container{height:100%}.hover-scroll{background-size:100%;background-position:top;background-repeat:no-repeat;margin-left:auto;margin-right:auto}.hover-scroll:hover{background-position:bottom}.mshots-image-visible{animation:fadein 1.5s}@keyframes fadein{0%{opacity:0}to{opacity:1}}@font-face{font-display:swap;font-family:Recoleta;font-weight:400;src:url(https://s1.wp.com/i/fonts/recoleta/400.woff2) format("woff2"),url(https://s1.wp.com/i/fonts/recoleta/400.woff) format("woff")}.wp-brand-font{font-family:"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400}[lang*=af] .wp-brand-font,[lang*=ca] .wp-brand-font,[lang*=cs] .wp-brand-font,[lang*=da] .wp-brand-font,[lang*=de] .wp-brand-font,[lang*=en] .wp-brand-font,[lang*=es] .wp-brand-font,[lang*=eu] .wp-brand-font,[lang*=fi] .wp-brand-font,[lang*=fr] .wp-brand-font,[lang*=gl] .wp-brand-font,[lang*=hr] .wp-brand-font,[lang*=hu] .wp-brand-font,[lang*=id] .wp-brand-font,[lang*=is] .wp-brand-font,[lang*=it] .wp-brand-font,[lang*=lv] .wp-brand-font,[lang*=mt] .wp-brand-font,[lang*=nb] .wp-brand-font,[lang*=nl] .wp-brand-font,[lang*=pl] .wp-brand-font,[lang*=pt] .wp-brand-font,[lang*=ro] .wp-brand-font,[lang*=ru] .wp-brand-font,[lang*=sk] .wp-brand-font,[lang*=sl] .wp-brand-font,[lang*=sq] .wp-brand-font,[lang*=sr] .wp-brand-font,[lang*=sv] .wp-brand-font,[lang*=sw] .wp-brand-font,[lang*=tr] .wp-brand-font,[lang*=uz] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}@media screen and (min-width:600px){.page-pattern-modal{width:calc(100% - 32px);height:90vh;overflow-y:hidden;padding-bottom:24px}.page-pattern-modal .components-modal__content{padding:0 32px 24px}}@media screen and (min-width:961px){.page-pattern-modal{width:calc(100% - 64px)}}.page-pattern-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch;margin-top:-1px;padding:0 16px 16px}.page-pattern-modal .components-modal__header{border-bottom:none;margin-right:-16px}.page-pattern-modal__heading{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;margin:0;font-size:2rem;line-height:1.25}@media screen and (min-width:600px){.page-pattern-modal__heading{font-size:2.25rem;line-height:1.1}}@media screen and (min-width:961px){.page-pattern-modal__heading--default{font-size:3rem;line-height:1.35}}.page-pattern-modal__description{color:#646970;margin:0 0 24px;font-size:1rem;line-height:1.5}@media screen and (min-width:600px){.page-pattern-modal__inner{padding:0 20px}}.pattern-selector-control{margin-bottom:20px}.pattern-selector-control .components-base-control__label{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.pattern-selector-control__options{display:grid;grid-template-columns:1fr;column-gap:1.5em;row-gap:3em}@media screen and (min-width:600px){.pattern-selector-control__options{margin-top:0;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}}@media screen and (min-width:1648px){.pattern-selector-control__options{grid-template-columns:repeat(auto-fill,minmax(350px,1fr))}}@media screen and (min-width:2000px){.pattern-selector-control__options{grid-template-columns:repeat(auto-fill,minmax(500px,1fr))}}.pattern-selector-item__label{display:block;width:100%;text-align:center;border:none;cursor:pointer;appearance:none;padding:0;overflow:hidden;background-color:#fff;position:relative;transform:translateZ(0);color:#50575e}.pattern-selector-item__label:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent}.pattern-selector-item__label:hover{color:var(--color-text)}.pattern-selector-item__label:hover .pattern-selector-item__preview-wrap{border:1px solid #646970}.pattern-selector-item__preview-wrap{width:100%;display:block;background:#fff;border-radius:0;overflow:hidden;height:0;padding-top:65%;position:relative;opacity:1;transform:translateZ(0);border:1px solid #dcdcde;margin:0 auto 1em}.pattern-selector-item__preview-wrap.is-rendering{opacity:.5}.pattern-selector-item__media,.pattern-selector-item__preview-wrap-inner-position{position:absolute;top:0;left:0;width:100%;height:100%}.pattern-selector-item__media{display:block;object-fit:cover}@media screen and (min-width:600px){.page-pattern-modal__sidebar{position:fixed;width:230px;padding-right:22px;pointer-events:none}.page-pattern-modal__sidebar>*{pointer-events:auto}.page-pattern-modal__sidebar .page-pattern-modal__category-list{pointer-events:none}.page-pattern-modal__sidebar .page-pattern-modal__category-list .page-pattern-modal__category-button{pointer-events:auto}}@media screen and (min-width:961px){.page-pattern-modal__sidebar{width:324px;padding-right:48px}}.page-pattern-modal__category-list{display:none;margin:0;padding-top:35px}@media screen and (min-width:600px){.page-pattern-modal__category-list{display:block}}.page-pattern-modal__category-list .components-button.is-tertiary{display:block;width:auto;height:auto;color:#50575e;font-size:.875rem;margin-left:-12px;padding:6px 12px;box-shadow:none}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):hover{box-shadow:none;color:var(--color-text)!important}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):active{background:transparent}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.page-pattern-modal__category-list .page-pattern-modal__category-item-selection-wrapper{border-bottom:2px solid transparent;padding-bottom:2px}.page-pattern-modal__category-list .components-menu-item__button:not(:disabled)[aria-selected=true]{color:var(--color-text);font-weight:600}.page-pattern-modal__category-list .components-menu-item__button:not(:disabled)[aria-selected=true] .page-pattern-modal__category-item-selection-wrapper{border-bottom-color:var(--color-text)}.page-pattern-modal__button-container{display:grid;grid-template-columns:1fr 1fr;column-gap:8px}@media screen and (min-width:600px){.page-pattern-modal__button-container{display:inline}}.components-button.page-pattern-modal__blank-button{min-height:40px;box-shadow:inset 0 0 0 1px #dcdcde;color:var(--color-text)}.components-button.page-pattern-modal__blank-button:active{color:var(--color-text)}.components-button.page-pattern-modal__blank-button.is-secondary:hover:not(:disabled){box-shadow:inset 0 0 0 1px #646970;color:var(--color-text)}.components-button.page-pattern-modal__blank-button.is-secondary:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.page-pattern-modal__blank-button.is-secondary:hover:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid transparent}.wp-core-ui select.page-pattern-modal__mobile-category-dropdown{font-size:13px;border-color:#dcdcde}@media screen and (min-width:600px){.wp-core-ui select.page-pattern-modal__mobile-category-dropdown{display:none}}@media screen and (min-width:600px){.page-pattern-modal__pattern-list-container{padding-left:230px}}@media screen and (min-width:961px){.page-pattern-modal__pattern-list-container{padding-left:324px}}.sidebar-modal-opener{display:flex;flex-direction:column;align-items:center;justify-content:center}.sidebar-modal-opener .pattern-selector-item__label{max-width:300px}.sidebar-modal-opener__warning-modal{display:flex;flex-direction:column;justify-content:center;align-items:center}.sidebar-modal-opener__warning-text{max-width:300px;font-size:1rem;line-height:1.5rem}.sidebar-modal-opener__warning-options{float:right;margin-top:20px}.sidebar-modal-opener__warning-options .components-button{margin-left:12px}
|
starter-page-templates/dist/starter-page-templates.js
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!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)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===i)for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},3089:function(){},556:function(){},1378:function(e){var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o,a=365.25*o;function s(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,u){u=u||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var u=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*o;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(e);if("number"===c&&isFinite(e))return u.long?function(e){var i=Math.abs(e);if(i>=o)return s(e,i,o,"day");if(i>=r)return s(e,i,r,"hour");if(i>=n)return s(e,i,n,"minute");if(i>=t)return s(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=o)return Math.round(e/o)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=n)return Math.round(e/n)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},4028:function(e,t,n){"use strict";n.d(t,{P:function(){return f}});var r=n(7560),o=n(9394),i=n(3027),a=(n(5742),n(5707)),s=n(5799),u=n(5018),c="isInsertingPagePattern",l="automattic/full-site-editing/inserting-pattern";function f(e){var t=(0,a.useDispatch)("automattic/starter-page-layouts").setOpenState,n=(0,a.useDispatch)("core/block-editor").replaceInnerBlocks,f=(0,a.useDispatch)("core/editor").editPost,p=(0,a.useDispatch)("core/edit-post").toggleFeature,d=(0,a.useDispatch)("core/nux").disableTips,m=(0,a.useSelect)((function(e){return{isOpen:(0,e("automattic/starter-page-layouts").isOpen)(),isWelcomeGuideActive:e("core/edit-post").isFeatureActive("welcomeGuide"),areTipsEnabled:!!e("core/nux")&&e("core/nux").areTipsEnabled()}})),g=(0,a.useSelect)((function(e){return{getMeta:function(){return e("core/editor").getEditedPostAttribute("meta")},postContentBlock:e("core/editor").getBlocks().find((function(e){return"a8c/post-content"===e.name}))}})),v=g.getMeta,y=g.postContentBlock,h=(0,i.useCallback)((function(e){var t=v();f({meta:(0,o.Z)((0,o.Z)({},t),{},{_starter_page_template:e})})}),[f,v]),b=(0,i.useCallback)((function(e,t){(0,s.addFilter)(c,l,(function(){return!0})),e&&f({title:e}),n(y?y.clientId:"",t,!1),(0,s.removeFilter)(c,l)}),[f,y,n]),C=m.isWelcomeGuideActive,w=m.areTipsEnabled,_=(0,i.useCallback)((function(){C?p("welcomeGuide"):w&&d()}),[w,d,C,p]);return(0,i.createElement)(u.Z,(0,r.Z)({},m,{setOpenState:t,savePatternChoice:h,insertPattern:b,hideWelcomeGuide:_},e))}},7168:function(e,t,n){"use strict";var r=n(4530),o=n(5707);(0,o.registerStore)("automattic/starter-page-layouts",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"CLOSED",t=arguments.length>1?arguments[1]:void 0,n=t.type,o=(0,r.Z)(t,["type"]);return"SET_IS_OPEN"===n?o.openState:e},actions:{setOpenState:function(e){return{type:"SET_IS_OPEN",openState:e||"CLOSED"}}},selectors:{isOpen:function(e){return"CLOSED"!==e}}})},5671:function(e,t,n){"use strict";var r=n(1119),o=n(3258),i=n(9394),a=n(3027),s=n(6141),u=n(2779),c=n.n(u),l=n(791),f=n(8049),p=n.n(f),d=(n(556),p()("design-picker:mshots-image"));var m=function(e,t){var n=(0,s.useState)(),r=(0,o.Z)(n,2),a=r[0],u=r[1],c=(0,s.useState)(0),f=(0,o.Z)(c,2),p=f[0],m=f[1],g=(0,s.useRef)(e),v=(0,s.useRef)(),y=(0,s.useRef)(),h=(0,s.useRef)(),b=(0,s.useRef)();return b.current=t,(0,s.useEffect)((function(){(t!==b.current||e!==g.current&&v.current)&&(d("resetting mShotsUrl request"),e!==g.current&&d("src changed\nfrom",g.current,"\nto",e),t!==b.current&&d("options changed\nfrom",b.current,"\nto",t),h.current&&h.current.onload&&(h.current.onload=null,y.current&&(clearTimeout(y.current),y.current=void 0)),u(void 0),m(0),h.current=v.current,b.current=t,g.current=e);var n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r="https://s0.wp.com/mshots/v1/";return(0,l.addQueryArgs)(r+encodeURIComponent(e),(0,i.Z)((0,i.Z)({},t),{},{count:n}))}(e,t,p),r=new Image;return r.onload=function(){400!==r.naturalWidth||300!==r.naturalHeight?u(r):p<10&&(y.current=setTimeout((function(){return m((function(e){return e+1}))}),500*p))},r.src=n,v.current=r,function(){v.current&&v.current.onload&&(v.current.onload=null),clearTimeout(y.current)}}),[e,p,t]),a};t.Z=function(e){var t=e.url,n=e["aria-labelledby"],o=e.alt,s=e.options,u=e.scrollable,l=void 0!==u&&u,f=m(t,s),p=(null==f?void 0:f.src)||"",d=!!p,g=(null==f?void 0:f.src)&&"url( ".concat(null==f?void 0:f.src," )"),v=((null==f?void 0:f.naturalHeight)||600)/400,y={backgroundImage:g,transition:"background-position ".concat(v,"s")},h=(0,i.Z)({},l?y:{}),b=c()("mshots-image__container",l&&"hover-scroll",d?"mshots-image-visible":"mshots-image__loader");return l||!d?(0,a.createElement)("div",{className:b,style:h,"aria-labelledby":n}):(0,a.createElement)("img",(0,r.Z)({className:b,style:h,src:p,alt:o,"aria-labelledby":n},"alt",o))}},5018:function(e,t,n){"use strict";var r=n(3258),o=n(54),i=n(4659),a=n(4730),s=n(3989),u=n(5663),c=n(9049),l=n(1119),f=n(3027),p=n(3804),d=n(3163),m=n(7997),g=n(9314),v=n(1417),y=n(9958),h=n(7884),b=n(2656),C=n(5480),w=n(2531),_=n(9988),__=d.__,Z=function(e){(0,u.Z)(n,e);var t=(0,c.Z)(n);function n(e){var r;return(0,i.Z)(this,n),r=t.call(this,e),(0,l.Z)((0,s.Z)(r),"getBlocksByPatternSlugs",(0,p.memoize)((function(e){var t=e.reduce((function(e,t){var n=t.name,o=t.html;return e[n]=o?(0,g.parse)((0,b.Z)(o,r.props.siteInformation)):[],e}),{});return r.filterPatternsWithMissingBlocks(t)}))),(0,l.Z)((0,s.Z)(r),"getBlocksForSelection",(function(e){var t=r.getBlocksByPatternSlug(e);return(0,C.Z)(t,(function(e){return"core/button"===e.name&&void 0!==e.attributes.url&&(e.attributes.url="#"),e}))})),(0,l.Z)((0,s.Z)(r),"setPattern",(function(e){if((0,h.E2)(e),r.props.savePatternChoice(e),"blank"===e)return r.props.insertPattern("",[]),void r.props.setOpenState(!1);var t=r.props.patterns.find((function(t){return t.name===e})),n=((null==t?void 0:t.categories)||{}).hasOwnProperty("home"),o=r.getBlocksForSelection(e),i=n?null:(null==t?void 0:t.title)||"";o&&o.length?(r.props.insertPattern(i,o),r.props.setOpenState(!1)):r.props.setOpenState(!1)})),(0,l.Z)((0,s.Z)(r),"handleCategorySelection",(function(e){r.setState({selectedCategory:e})})),(0,l.Z)((0,s.Z)(r),"closeModal",(function(){(0,h.GI)(),r.props.setOpenState(!1)})),(0,l.Z)((0,s.Z)(r),"getPatternGroups",(function(){if(!r.props.patterns.length)return null;var e,t={},n=(0,o.Z)(r.props.patterns);try{for(n.s();!(e=n.n()).done;){var i=e.value;for(var a in i.categories)a in t||(t[a]=i.categories[a])}}catch(s){n.e(s)}finally{n.f()}return(0,_.x)(["featured","about","blog","home","gallery","services","contact"],t)})),(0,l.Z)((0,s.Z)(r),"getPatternsForGroup",(function(e){if(!r.props.patterns.length)return null;if("blank"===e)return[{name:"blank",title:"Blank",html:"",ID:null}];var t,n=[],i=(0,o.Z)(r.props.patterns);try{for(i.s();!(t=i.n()).done;){var a=t.value;for(var s in a.categories)s===e&&n.push(a)}}catch(u){i.e(u)}finally{i.f()}return n})),(0,l.Z)((0,s.Z)(r),"getPatternCategories",(function(){var e=r.getPatternGroups();if(!e)return null;var t=[];for(var n in e)t.push({slug:n,name:e[n].title});return t})),(0,l.Z)((0,s.Z)(r),"renderPatternGroup",(function(){var e,t,n=r.state.selectedCategory;if(!n)return null;var o=r.getPatternsForGroup(n);if(null==o||!o.length)return null;var i=null===(e=r.getPatternGroups())||void 0===e||null===(t=e[n])||void 0===t?void 0:t.title;return r.renderPatternsList(o,i)})),(0,l.Z)((0,s.Z)(r),"renderPatternsList",(function(e,t){if(!e.length)return null;var n,o=r.getBlocksByPatternSlugs(r.props.patterns),i=Object.keys(o),a=(n=i,e.filter((function(e){return n.includes(e.name)})));return a.length?(0,f.createElement)(y.Z,{label:__("Layout","full-site-editing"),legendLabel:t,patterns:a,onPatternSelect:r.setPattern,theme:r.props.theme,locale:r.props.locale,siteInformation:r.props.siteInformation}):null})),r.state={selectedCategory:r.getDefaultSelectedCategory()},r}return(0,a.Z)(n,[{key:"filterPatternsWithMissingBlocks",value:function(e){return Object.entries(e).reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0],i=n[1];return(0,w.Z)(i)&&i.length||(e[o]=i),e}),{})}},{key:"componentDidMount",value:function(){this.props.isOpen&&this.trackCurrentView()}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen&&this.trackCurrentView(),(this.props.isWelcomeGuideActive||this.props.areTipsEnabled)&&this.props.hideWelcomeGuide()}},{key:"trackCurrentView",value:function(){(0,h.Fk)("add-page")}},{key:"getDefaultSelectedCategory",value:function(){var e=this.getPatternCategories();return null!=e&&e.length?e[0].slug:null}},{key:"getBlocksByPatternSlug",value:function(e){var t,n;return null!==(t=null===(n=this.getBlocksByPatternSlugs(this.props.patterns))||void 0===n?void 0:n[e])&&void 0!==t?t:[]}},{key:"render",value:function(){var e,t,n=this,r=this.state.selectedCategory,o=this.props,i=o.isOpen,a=o.instanceId;return i?(0,f.createElement)(m.Modal,{title:"",className:"page-pattern-modal",onRequestClose:this.closeModal,aria:{labelledby:"page-pattern-modal__heading-".concat(a),describedby:"page-pattern-modal__description-".concat(a)}},(0,f.createElement)("div",{className:"page-pattern-modal__inner"},(0,f.createElement)("div",{className:"page-pattern-modal__sidebar"},(0,f.createElement)("h1",{id:"page-pattern-modal__heading-".concat(a),className:"page-pattern-modal__heading"},__("Add a page","full-site-editing")),(0,f.createElement)("p",{id:"page-pattern-modal__description-".concat(a),className:"page-pattern-modal__description"},__("Pick a pre-defined layout or start with a blank page.","full-site-editing")),(0,f.createElement)("div",{className:"page-pattern-modal__button-container"},(0,f.createElement)(m.Button,{isSecondary:!0,onClick:function(){return n.setPattern("blank")},className:"page-pattern-modal__blank-button"},__("Blank page","full-site-editing")),(0,f.createElement)("select",{className:"page-pattern-modal__mobile-category-dropdown",value:null!=r?r:void 0,onChange:function(e){return n.handleCategorySelection(e.currentTarget.value)}},null===(e=this.getPatternCategories())||void 0===e?void 0:e.map((function(e){var t=e.slug,n=e.name;return(0,f.createElement)("option",{key:t,value:t},n)})))),(0,f.createElement)(m.VisuallyHidden,{as:"h2",id:"page-pattern-modal__list-heading-".concat(a)},__("Page categories","full-site-editing")),(0,f.createElement)(m.NavigableMenu,{className:"page-pattern-modal__category-list",orientation:"vertical","aria-labelledby":"page-pattern-modal__list-heading-".concat(a),onNavigate:function(e,t){var r;return n.handleCategorySelection(null!==(r=t.dataset.slug)&&void 0!==r?r:null)}},null===(t=this.getPatternCategories())||void 0===t?void 0:t.map((function(e){var t=e.slug,o=e.name;return(0,f.createElement)(m.MenuItem,{key:t,isTertiary:!0,"aria-selected":t===r,"data-slug":t,onClick:function(){return n.handleCategorySelection(t)},className:"page-pattern-modal__category-button",tabIndex:t===r?void 0:-1},(0,f.createElement)("span",{className:"page-pattern-modal__category-item-selection-wrapper"},o))})))),(0,f.createElement)("div",{className:"page-pattern-modal__pattern-list-container"},this.renderPatternGroup()))):null}}]),n}(f.Component);t.Z=(0,v.withInstanceId)(Z)},9958:function(e,t,n){"use strict";var r=n(3027),o=n(7997),i=n(8695),a=n(2656),s=n(1417),u=function(){};t.Z=(0,r.memo)((0,s.withInstanceId)((function(e){var t=e.instanceId,n=e.label,s=e.legendLabel,c=e.patterns,l=void 0===c?[]:c,f=e.theme,p=void 0===f?"maywood":f,d=e.locale,m=void 0===d?"en":d,g=e.onPatternSelect,v=void 0===g?u:g,y=e.siteInformation,h=void 0===y?{}:y;return Array.isArray(l)&&l.length?(0,r.createElement)(o.BaseControl,{id:"pattern-selector-control__".concat(t),label:n,className:"pattern-selector-control"},(0,r.createElement)("ul",{className:"pattern-selector-control__options","data-testid":"pattern-selector-control-options","aria-label":s},l.map((function(e){var t=e.ID,n=e.name,o=e.title,u=e.description;return(0,r.createElement)("li",{key:"".concat(t,"-").concat(n,"-").concat(s)},(0,r.createElement)(i.Z,{value:n,title:(0,a.Z)(o,h),description:u,onSelect:v,patternPostID:t,theme:p,locale:m}))})))):null})))},8695:function(e,t,n){"use strict";var r=n(3027),o=n(5671);t.Z=function(e){var t=e.value,n=e.onSelect,i=e.title,a=e.description,s=e.theme,u=e.locale,c=e.patternPostID;if(null==i||null==t)return null;var l="".concat("https://public-api.wordpress.com/rest/v1/template/demo/").concat(encodeURIComponent(s),"/").concat(encodeURIComponent("dotcompatterns.wordpress.com"),"/?post_id=").concat(encodeURIComponent(null!=c?c:""),"&language=").concat(encodeURIComponent(u)),f="pattern-selector-item__preview-label__".concat(t),p=(0,r.createElement)(o.Z,{url:l,"aria-labelledby":f,alt:i,options:{vpw:1024,vph:1024,w:660,screen_height:3600},scrollable:!0});return(0,r.createElement)("button",{type:"button",className:"pattern-selector-item__label",value:t,onClick:function(){return n(t)}},(0,r.createElement)("span",{className:"pattern-selector-item__preview-wrap"},(0,r.createElement)("div",{className:"pattern-selector-item__preview-wrap-inner-position"},p)),(0,r.createElement)("div",{id:f},a))}},2531:function(e,t){"use strict";t.Z=function e(t){return!!t.find((function(t){return"core/missing"===t.name||!(!t.innerBlocks||!t.innerBlocks.length)&&e(t.innerBlocks)}))}},9988:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(t),r=e.filter((function(e){return n.includes(e)})),o=n.filter((function(t){return!e.includes(t)}));return r.concat(o.sort()).reduce((function(e,n){return e[n]=t[n],e}),{})}n.d(t,{x:function(){return r}})},5480:function(e,t,n){"use strict";var r=n(9314);t.Z=function e(t,n){return t.map((function(t){return(t=n((0,r.cloneBlock)(t))).innerBlocks&&t.innerBlocks.length&&(t.innerBlocks=e(t.innerBlocks,n)),t}))}},2656:function(e,t,n){"use strict";var r=n(3163),_x=r._x,o={Address:_x("123 Main St","default address","full-site-editing"),Phone:_x("555-555-5555","default phone number","full-site-editing"),CompanyName:_x("Your Company Name","default company name","full-site-editing"),Vertical:_x("Business","default vertical name","full-site-editing")},i={CompanyName:"title",Address:"address",Phone:"phone",Vertical:"vertical"};function a(e,t){return e in t}t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.replace(/{{(\w+)}}/g,(function(e,n){var r=a(n,o)?o[n]:"",s=a(n,i)?i[n]:"";return t[s]||r||n})):""}},7884:function(e,t,n){"use strict";n.d(t,{Z:function(){return o},Fk:function(){return i},GI:function(){return a},E2:function(){return s}}),window._tkq=window._tkq||[];var r=null,o=function(e){r=e,window._tkq.push(["identifyUser",e.userid,e.username])},i=function(e){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_view",{blog_id:r.blogid,source:e}])},a=function(){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_dismiss",{blog_id:r.blogid}])},s=function(e){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_template_selected",{blog_id:r.blogid,pattern:e}])}},8049:function(e,t,n){var r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(2632)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},2632:function(e,t,n){var r=n(5182);e.exports=function(e){function t(e){var n,r,i,a=null;function s(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];if(s.enabled){var i=s,a=Number(new Date),u=a-(n||a);i.diff=u,i.prev=n,i.curr=a,n=a,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var c=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return"%";c++;var o=t.formatters[n];if("function"==typeof o){var a=r[c];e=o.call(i,a),r.splice(c,1),c--}return e})),t.formatArgs.call(i,r);var l=i.log||t.log;l.apply(i,r)}}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=o,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(r!==t.namespaces&&(r=t.namespaces,i=t.enabled(e)),i)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(s),s}function o(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(r(t.names.map(i)),r(t.skips.map(i).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},6141:function(e){"use strict";e.exports=window.React},3804:function(e){"use strict";e.exports=window.lodash},9314:function(e){"use strict";e.exports=window.wp.blocks},7997:function(e){"use strict";e.exports=window.wp.components},1417:function(e){"use strict";e.exports=window.wp.compose},5707:function(e){"use strict";e.exports=window.wp.data},3027:function(e){"use strict";e.exports=window.wp.element},5799:function(e){"use strict";e.exports=window.wp.hooks},3163:function(e){"use strict";e.exports=window.wp.i18n},5742:function(e){"use strict";e.exports=window.wp.nux},1200:function(e){"use strict";e.exports=window.wp.plugins},791:function(e){"use strict";e.exports=window.wp.url}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r);var e,t=n(3027),o=n(1200),i=n(5707),a=n(7884),s=n(4028),u=(n(7168),n(3089),null!==(e=window.starterPageTemplatesConfig)&&void 0!==e?e:{}),c=u.templates,l=void 0===c?[]:c,f=u.tracksUserData,p=u.screenAction,d=u.theme,m=u.locale;f&&(0,a.Z)(f),"add"===p&&(0,i.dispatch)("automattic/starter-page-layouts").setOpenState("OPEN_FROM_ADD_PAGE"),(0,o.registerPlugin)("page-patterns",{render:function(){return(0,t.createElement)(s.P,{patterns:l,theme:d,locale:m})},icon:void 0})}(),window.EditingToolkit=r}();
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!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)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===i)for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},3089:function(){},556:function(){},1378:function(e){var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o,a=365.25*o;function s(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,u){u=u||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var u=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*o;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(e);if("number"===c&&isFinite(e))return u.long?function(e){var i=Math.abs(e);if(i>=o)return s(e,i,o,"day");if(i>=r)return s(e,i,r,"hour");if(i>=n)return s(e,i,n,"minute");if(i>=t)return s(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=o)return Math.round(e/o)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=n)return Math.round(e/n)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},4028:function(e,t,n){"use strict";n.d(t,{P:function(){return p}});var r=n(7560),o=n(9394),i=n(3027),a=(n(5742),n(5707)),s=n(5799),u=n(5018),c=n(3163),__=c.__,l="isInsertingPagePattern",f="automattic/full-site-editing/inserting-pattern";function p(e){var t=(0,a.useDispatch)("automattic/starter-page-layouts").setOpenState,n=(0,a.useDispatch)("automattic/wpcom-welcome-guide").setUsedPageOrPatternsModal,c=(0,a.useDispatch)("core/block-editor").replaceInnerBlocks,p=(0,a.useDispatch)("core/editor").editPost,d=(0,a.useDispatch)("core/edit-post").toggleFeature,m=(0,a.useDispatch)("core/nux").disableTips,g=(0,a.useSelect)((function(e){var t=e("automattic/starter-page-layouts"),n=t.isOpen,r=t.isPatternPicker;return(0,o.Z)({isOpen:n(),isWelcomeGuideActive:e("core/edit-post").isFeatureActive("welcomeGuide"),areTipsEnabled:!!e("core/nux")&&e("core/nux").areTipsEnabled()},r()&&{title:__("Choose a Pattern","full-site-editing"),description:__("Pick a pre-defined layout or continue with a blank page","full-site-editing")})})),v=(0,a.useSelect)((function(e){return{getMeta:function(){return e("core/editor").getEditedPostAttribute("meta")},postContentBlock:e("core/editor").getBlocks().find((function(e){return"a8c/post-content"===e.name}))}})),y=v.getMeta,h=v.postContentBlock,b=(0,i.useCallback)((function(e){var t=y();p({meta:(0,o.Z)((0,o.Z)({},t),{},{_starter_page_template:e})})}),[p,y]),C=(0,i.useCallback)((function(e,t){(0,s.addFilter)(l,f,(function(){return!0})),e&&p({title:e}),c(h?h.clientId:"",t,!1),(0,s.removeFilter)(l,f)}),[p,h,c]),w=g.isWelcomeGuideActive,_=g.areTipsEnabled,Z=(0,i.useCallback)((function(){w?d("welcomeGuide"):_&&m()}),[_,m,w,d]),k=(0,i.useCallback)((function(){n(),t("CLOSED")}),[t,n]);return(0,i.createElement)(u.Z,(0,r.Z)({},g,{onClose:k,savePatternChoice:b,insertPattern:C,hideWelcomeGuide:Z},e))}},7168:function(e,t,n){"use strict";var r=n(4530),o=n(5707);(0,o.registerStore)("automattic/starter-page-layouts",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"CLOSED",t=arguments.length>1?arguments[1]:void 0,n=t.type,o=(0,r.Z)(t,["type"]);return"SET_IS_OPEN"===n?o.openState:e},actions:{setOpenState:function(e){return{type:"SET_IS_OPEN",openState:e||"CLOSED"}}},selectors:{isOpen:function(e){return"CLOSED"!==e},isPatternPicker:function(e){return"OPEN_FOR_BLANK_CANVAS"===e}}})},5671:function(e,t,n){"use strict";var r=n(1119),o=n(3258),i=n(9394),a=n(3027),s=n(6141),u=n(2779),c=n.n(u),l=n(791),f=n(8049),p=n.n(f),d=(n(556),p()("design-picker:mshots-image"));var m=function(e,t){var n=(0,s.useState)(),r=(0,o.Z)(n,2),a=r[0],u=r[1],c=(0,s.useState)(0),f=(0,o.Z)(c,2),p=f[0],m=f[1],g=(0,s.useRef)(e),v=(0,s.useRef)(),y=(0,s.useRef)(),h=(0,s.useRef)(),b=(0,s.useRef)();return b.current=t,(0,s.useEffect)((function(){(t!==b.current||e!==g.current&&v.current)&&(d("resetting mShotsUrl request"),e!==g.current&&d("src changed\nfrom",g.current,"\nto",e),t!==b.current&&d("options changed\nfrom",b.current,"\nto",t),h.current&&h.current.onload&&(h.current.onload=null,y.current&&(clearTimeout(y.current),y.current=void 0)),u(void 0),m(0),h.current=v.current,b.current=t,g.current=e);var n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r="https://s0.wp.com/mshots/v1/";return(0,l.addQueryArgs)(r+encodeURIComponent(e),(0,i.Z)((0,i.Z)({},t),{},{count:n}))}(e,t,p),r=new Image;return r.onload=function(){400!==r.naturalWidth||300!==r.naturalHeight?u(r):p<10&&(y.current=setTimeout((function(){return m((function(e){return e+1}))}),500*p))},r.src=n,v.current=r,function(){v.current&&v.current.onload&&(v.current.onload=null),clearTimeout(y.current)}}),[e,p,t]),a};t.Z=function(e){var t=e.url,n=e["aria-labelledby"],o=e.alt,s=e.options,u=e.scrollable,l=void 0!==u&&u,f=m(t,s),p=(null==f?void 0:f.src)||"",d=!!p,g=(null==f?void 0:f.src)&&"url( ".concat(null==f?void 0:f.src," )"),v=((null==f?void 0:f.naturalHeight)||600)/400,y={backgroundImage:g,transition:"background-position ".concat(v,"s")},h=(0,i.Z)({},l?y:{}),b=c()("mshots-image__container",l&&"hover-scroll",d?"mshots-image-visible":"mshots-image__loader");return l||!d?(0,a.createElement)("div",{className:b,style:h,"aria-labelledby":n}):(0,a.createElement)("img",(0,r.Z)({className:b,style:h,src:p,alt:o,"aria-labelledby":n},"alt",o))}},5018:function(e,t,n){"use strict";var r=n(3258),o=n(54),i=n(4659),a=n(4730),s=n(3989),u=n(5663),c=n(9049),l=n(1119),f=n(3027),p=n(2779),d=n.n(p),m=n(3804),g=n(3163),v=n(7997),y=n(9314),h=n(1417),b=n(9958),C=n(7884),w=n(2656),_=n(5480),Z=n(2531),k=n(9988),__=g.__,F=function(e){(0,u.Z)(n,e);var t=(0,c.Z)(n);function n(e){var r;return(0,i.Z)(this,n),r=t.call(this,e),(0,l.Z)((0,s.Z)(r),"getBlocksByPatternSlugs",(0,m.memoize)((function(e){var t=e.reduce((function(e,t){var n=t.name,o=t.html;return e[n]=o?(0,y.parse)((0,w.Z)(o,r.props.siteInformation)):[],e}),{});return r.filterPatternsWithMissingBlocks(t)}))),(0,l.Z)((0,s.Z)(r),"getBlocksForSelection",(function(e){var t=r.getBlocksByPatternSlug(e);return(0,_.Z)(t,(function(e){return"core/button"===e.name&&void 0!==e.attributes.url&&(e.attributes.url="#"),e}))})),(0,l.Z)((0,s.Z)(r),"setPattern",(function(e){if((0,C.E2)(e),r.props.savePatternChoice(e),"blank"===e)return r.props.insertPattern("",[]),void r.props.onClose();var t=r.props.patterns.find((function(t){return t.name===e})),n=((null==t?void 0:t.categories)||{}).hasOwnProperty("home"),o=r.getBlocksForSelection(e),i=n?null:(null==t?void 0:t.title)||"";o&&o.length?(r.props.insertPattern(i,o),r.props.onClose()):r.props.onClose()})),(0,l.Z)((0,s.Z)(r),"handleCategorySelection",(function(e){r.setState({selectedCategory:e})})),(0,l.Z)((0,s.Z)(r),"closeModal",(function(){(0,C.GI)(),r.props.onClose()})),(0,l.Z)((0,s.Z)(r),"getPatternGroups",(function(){if(!r.props.patterns.length)return null;var e,t={},n=(0,o.Z)(r.props.patterns);try{for(n.s();!(e=n.n()).done;){var i=e.value;for(var a in i.categories)a in t||(t[a]=i.categories[a])}}catch(s){n.e(s)}finally{n.f()}return(0,k.x)(["featured","about","blog","home","gallery","services","contact"],t)})),(0,l.Z)((0,s.Z)(r),"getPatternsForGroup",(function(e){if(!r.props.patterns.length)return null;if("blank"===e)return[{name:"blank",title:"Blank",html:"",ID:null}];var t,n=[],i=(0,o.Z)(r.props.patterns);try{for(i.s();!(t=i.n()).done;){var a=t.value;for(var s in a.categories)s===e&&n.push(a)}}catch(u){i.e(u)}finally{i.f()}return n})),(0,l.Z)((0,s.Z)(r),"getPatternCategories",(function(){var e=r.getPatternGroups();if(!e)return null;var t=[];for(var n in e)t.push({slug:n,name:e[n].title});return t})),(0,l.Z)((0,s.Z)(r),"renderPatternGroup",(function(){var e,t,n=r.state.selectedCategory;if(!n)return null;var o=r.getPatternsForGroup(n);if(null==o||!o.length)return null;var i=null===(e=r.getPatternGroups())||void 0===e||null===(t=e[n])||void 0===t?void 0:t.title;return r.renderPatternsList(o,i)})),(0,l.Z)((0,s.Z)(r),"renderPatternsList",(function(e,t){if(!e.length)return null;var n,o=r.getBlocksByPatternSlugs(r.props.patterns),i=Object.keys(o),a=(n=i,e.filter((function(e){return n.includes(e.name)})));return a.length?(0,f.createElement)(b.Z,{label:__("Layout","full-site-editing"),legendLabel:t,patterns:a,onPatternSelect:r.setPattern,theme:r.props.theme,locale:r.props.locale,siteInformation:r.props.siteInformation}):null})),r.state={selectedCategory:r.getDefaultSelectedCategory()},r}return(0,a.Z)(n,[{key:"filterPatternsWithMissingBlocks",value:function(e){return Object.entries(e).reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0],i=n[1];return(0,Z.Z)(i)&&i.length||(e[o]=i),e}),{})}},{key:"componentDidMount",value:function(){this.props.isOpen&&this.trackCurrentView()}},{key:"componentDidUpdate",value:function(e){!e.isOpen&&this.props.isOpen&&this.trackCurrentView(),(this.props.isWelcomeGuideActive||this.props.areTipsEnabled)&&this.props.hideWelcomeGuide()}},{key:"trackCurrentView",value:function(){(0,C.Fk)("add-page")}},{key:"getDefaultSelectedCategory",value:function(){var e=this.getPatternCategories();return null!=e&&e.length?e[0].slug:null}},{key:"getBlocksByPatternSlug",value:function(e){var t,n;return null!==(t=null===(n=this.getBlocksByPatternSlugs(this.props.patterns))||void 0===n?void 0:n[e])&&void 0!==t?t:[]}},{key:"render",value:function(){var e,t,n=this,r=this.state.selectedCategory,o=this.props,i=o.isOpen,a=o.instanceId;return i?(0,f.createElement)(v.Modal,{title:"",className:"page-pattern-modal",onRequestClose:this.closeModal,aria:{labelledby:"page-pattern-modal__heading-".concat(a),describedby:"page-pattern-modal__description-".concat(a)}},(0,f.createElement)("div",{className:"page-pattern-modal__inner"},(0,f.createElement)("div",{className:"page-pattern-modal__sidebar"},(0,f.createElement)("h1",{id:"page-pattern-modal__heading-".concat(a),className:d()("page-pattern-modal__heading",{"page-pattern-modal__heading--default":!this.props.title})},this.props.title||__("Add a page","full-site-editing")),(0,f.createElement)("p",{id:"page-pattern-modal__description-".concat(a),className:"page-pattern-modal__description"},this.props.description||__("Pick a pre-defined layout or start with a blank page.","full-site-editing")),(0,f.createElement)("div",{className:"page-pattern-modal__button-container"},(0,f.createElement)(v.Button,{isSecondary:!0,onClick:function(){return n.setPattern("blank")},className:"page-pattern-modal__blank-button"},__("Blank page","full-site-editing")),(0,f.createElement)("select",{className:"page-pattern-modal__mobile-category-dropdown",value:null!=r?r:void 0,onChange:function(e){return n.handleCategorySelection(e.currentTarget.value)}},null===(e=this.getPatternCategories())||void 0===e?void 0:e.map((function(e){var t=e.slug,n=e.name;return(0,f.createElement)("option",{key:t,value:t},n)})))),(0,f.createElement)(v.VisuallyHidden,{as:"h2",id:"page-pattern-modal__list-heading-".concat(a)},__("Page categories","full-site-editing")),(0,f.createElement)(v.NavigableMenu,{className:"page-pattern-modal__category-list",orientation:"vertical","aria-labelledby":"page-pattern-modal__list-heading-".concat(a),onNavigate:function(e,t){var r;return n.handleCategorySelection(null!==(r=t.dataset.slug)&&void 0!==r?r:null)}},null===(t=this.getPatternCategories())||void 0===t?void 0:t.map((function(e){var t=e.slug,o=e.name;return(0,f.createElement)(v.MenuItem,{key:t,isTertiary:!0,"aria-selected":t===r,"data-slug":t,onClick:function(){return n.handleCategorySelection(t)},className:"page-pattern-modal__category-button",tabIndex:t===r?void 0:-1},(0,f.createElement)("span",{className:"page-pattern-modal__category-item-selection-wrapper"},o))})))),(0,f.createElement)("div",{className:"page-pattern-modal__pattern-list-container"},this.renderPatternGroup()))):null}}]),n}(f.Component);t.Z=(0,h.withInstanceId)(F)},9958:function(e,t,n){"use strict";var r=n(3027),o=n(7997),i=n(8695),a=n(2656),s=n(1417),u=function(){};t.Z=(0,r.memo)((0,s.withInstanceId)((function(e){var t=e.instanceId,n=e.label,s=e.legendLabel,c=e.patterns,l=void 0===c?[]:c,f=e.theme,p=void 0===f?"maywood":f,d=e.locale,m=void 0===d?"en":d,g=e.onPatternSelect,v=void 0===g?u:g,y=e.siteInformation,h=void 0===y?{}:y;return Array.isArray(l)&&l.length?(0,r.createElement)(o.BaseControl,{id:"pattern-selector-control__".concat(t),label:n,className:"pattern-selector-control"},(0,r.createElement)("ul",{className:"pattern-selector-control__options","data-testid":"pattern-selector-control-options","aria-label":s},l.map((function(e){var t=e.ID,n=e.name,o=e.title,u=e.description;return(0,r.createElement)("li",{key:"".concat(t,"-").concat(n,"-").concat(s)},(0,r.createElement)(i.Z,{value:n,title:(0,a.Z)(o,h),description:u,onSelect:v,patternPostID:t,theme:p,locale:m}))})))):null})))},8695:function(e,t,n){"use strict";var r=n(3027),o=n(5671);t.Z=function(e){var t=e.value,n=e.onSelect,i=e.title,a=e.description,s=e.theme,u=e.locale,c=e.patternPostID;if(null==i||null==t)return null;var l="".concat("https://public-api.wordpress.com/rest/v1/template/demo/").concat(encodeURIComponent(s),"/").concat(encodeURIComponent("dotcompatterns.wordpress.com"),"/?post_id=").concat(encodeURIComponent(null!=c?c:""),"&language=").concat(encodeURIComponent(u)),f="pattern-selector-item__preview-label__".concat(t),p=(0,r.createElement)(o.Z,{url:l,"aria-labelledby":f,alt:i,options:{vpw:1024,vph:1024,w:660,screen_height:3600},scrollable:!0});return(0,r.createElement)("button",{type:"button",className:"pattern-selector-item__label",value:t,onClick:function(){return n(t)}},(0,r.createElement)("span",{className:"pattern-selector-item__preview-wrap"},(0,r.createElement)("div",{className:"pattern-selector-item__preview-wrap-inner-position"},p)),(0,r.createElement)("div",{id:f},a))}},2531:function(e,t){"use strict";t.Z=function e(t){return!!t.find((function(t){return"core/missing"===t.name||!(!t.innerBlocks||!t.innerBlocks.length)&&e(t.innerBlocks)}))}},9988:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(t),r=e.filter((function(e){return n.includes(e)})),o=n.filter((function(t){return!e.includes(t)}));return r.concat(o.sort()).reduce((function(e,n){return e[n]=t[n],e}),{})}n.d(t,{x:function(){return r}})},5480:function(e,t,n){"use strict";var r=n(9314);t.Z=function e(t,n){return t.map((function(t){return(t=n((0,r.cloneBlock)(t))).innerBlocks&&t.innerBlocks.length&&(t.innerBlocks=e(t.innerBlocks,n)),t}))}},2656:function(e,t,n){"use strict";var r=n(3163),_x=r._x,o={Address:_x("123 Main St","default address","full-site-editing"),Phone:_x("555-555-5555","default phone number","full-site-editing"),CompanyName:_x("Your Company Name","default company name","full-site-editing"),Vertical:_x("Business","default vertical name","full-site-editing")},i={CompanyName:"title",Address:"address",Phone:"phone",Vertical:"vertical"};function a(e,t){return e in t}t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.replace(/{{(\w+)}}/g,(function(e,n){var r=a(n,o)?o[n]:"",s=a(n,i)?i[n]:"";return t[s]||r||n})):""}},7884:function(e,t,n){"use strict";n.d(t,{Z:function(){return o},Fk:function(){return i},GI:function(){return a},E2:function(){return s}}),window._tkq=window._tkq||[];var r=null,o=function(e){r=e,window._tkq.push(["identifyUser",e.userid,e.username])},i=function(e){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_view",{blog_id:r.blogid,source:e}])},a=function(){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_dismiss",{blog_id:r.blogid}])},s=function(e){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_template_selected",{blog_id:r.blogid,pattern:e}])}},8049:function(e,t,n){var r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(2632)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},2632:function(e,t,n){var r=n(5182);e.exports=function(e){function t(e){var n,r,i,a=null;function s(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];if(s.enabled){var i=s,a=Number(new Date),u=a-(n||a);i.diff=u,i.prev=n,i.curr=a,n=a,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var c=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return"%";c++;var o=t.formatters[n];if("function"==typeof o){var a=r[c];e=o.call(i,a),r.splice(c,1),c--}return e})),t.formatArgs.call(i,r);var l=i.log||t.log;l.apply(i,r)}}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=o,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(r!==t.namespaces&&(r=t.namespaces,i=t.enabled(e)),i)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(s),s}function o(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(r(t.names.map(i)),r(t.skips.map(i).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},6141:function(e){"use strict";e.exports=window.React},3804:function(e){"use strict";e.exports=window.lodash},9314:function(e){"use strict";e.exports=window.wp.blocks},7997:function(e){"use strict";e.exports=window.wp.components},1417:function(e){"use strict";e.exports=window.wp.compose},5707:function(e){"use strict";e.exports=window.wp.data},3027:function(e){"use strict";e.exports=window.wp.element},5799:function(e){"use strict";e.exports=window.wp.hooks},3163:function(e){"use strict";e.exports=window.wp.i18n},5742:function(e){"use strict";e.exports=window.wp.nux},1200:function(e){"use strict";e.exports=window.wp.plugins},791:function(e){"use strict";e.exports=window.wp.url}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r);var e,t=n(3027),o=n(1200),i=n(5707),a=n(7884),s=n(4028),u=(n(7168),n(3089),null!==(e=window.starterPageTemplatesConfig)&&void 0!==e?e:{}),c=u.templates,l=void 0===c?[]:c,f=u.tracksUserData,p=u.screenAction,d=u.theme,m=u.locale;f&&(0,a.Z)(f),"add"===p&&(0,i.dispatch)("automattic/starter-page-layouts").setOpenState("OPEN_FROM_ADD_PAGE"),(0,o.registerPlugin)("page-patterns",{render:function(){return(0,t.createElement)(s.P,{patterns:l,theme:d,locale:m})},icon:void 0})}(),window.EditingToolkit=r}();
|
starter-page-templates/dist/starter-page-templates.rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@keyframes onboarding-loading-pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.mshots-image__loader{animation:onboarding-loading-pulse 1.6s ease-in-out infinite;background:#f0f0f0;color:transparent}.mshots-image__loader:after{content:"\00a0"}.mshots-image__container{height:100%}.hover-scroll{background-size:100%;background-position:top;background-repeat:no-repeat;margin-right:auto;margin-left:auto}.hover-scroll:hover{background-position:bottom}.mshots-image-visible{animation:fadein 1.5s}@keyframes fadein{0%{opacity:0}to{opacity:1}}@font-face{font-display:swap;font-family:Recoleta;font-weight:400;src:url(https://s1.wp.com/i/fonts/recoleta/400.woff2) format("woff2"),url(https://s1.wp.com/i/fonts/recoleta/400.woff) format("woff")}.wp-brand-font{font-family:"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400}[lang*=af] .wp-brand-font,[lang*=ca] .wp-brand-font,[lang*=cs] .wp-brand-font,[lang*=da] .wp-brand-font,[lang*=de] .wp-brand-font,[lang*=en] .wp-brand-font,[lang*=es] .wp-brand-font,[lang*=eu] .wp-brand-font,[lang*=fi] .wp-brand-font,[lang*=fr] .wp-brand-font,[lang*=gl] .wp-brand-font,[lang*=hr] .wp-brand-font,[lang*=hu] .wp-brand-font,[lang*=id] .wp-brand-font,[lang*=is] .wp-brand-font,[lang*=it] .wp-brand-font,[lang*=lv] .wp-brand-font,[lang*=mt] .wp-brand-font,[lang*=nb] .wp-brand-font,[lang*=nl] .wp-brand-font,[lang*=pl] .wp-brand-font,[lang*=pt] .wp-brand-font,[lang*=ro] .wp-brand-font,[lang*=ru] .wp-brand-font,[lang*=sk] .wp-brand-font,[lang*=sl] .wp-brand-font,[lang*=sq] .wp-brand-font,[lang*=sr] .wp-brand-font,[lang*=sv] .wp-brand-font,[lang*=sw] .wp-brand-font,[lang*=tr] .wp-brand-font,[lang*=uz] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}@media screen and (min-width:600px){.page-pattern-modal{width:calc(100% - 32px);height:90vh;overflow-y:hidden;padding-bottom:24px}.page-pattern-modal .components-modal__content{padding:0 32px 24px}}@media screen and (min-width:961px){.page-pattern-modal{width:calc(100% - 64px)}}.page-pattern-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch;margin-top:-1px;padding:0 16px 16px}.page-pattern-modal .components-modal__header{border-bottom:none;margin-left:-16px}.page-pattern-modal__heading{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;margin:0;font-size:2rem;line-height:1.25}@media screen and (min-width:600px){.page-pattern-modal__heading{font-size:2.25rem;line-height:1.1}}@media screen and (min-width:961px){.page-pattern-modal__heading{font-size:3rem;line-height:1.35}}.page-pattern-modal__description{color:#646970;margin:0 0 24px;font-size:1rem;line-height:1.5}@media screen and (min-width:600px){.page-pattern-modal__inner{padding:0 20px}}.pattern-selector-control{margin-bottom:20px}.pattern-selector-control .components-base-control__label{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.pattern-selector-control__options{display:grid;grid-template-columns:1fr;column-gap:1.5em;row-gap:3em}@media screen and (min-width:600px){.pattern-selector-control__options{margin-top:0;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}}@media screen and (min-width:1648px){.pattern-selector-control__options{grid-template-columns:repeat(auto-fill,minmax(350px,1fr))}}@media screen and (min-width:2000px){.pattern-selector-control__options{grid-template-columns:repeat(auto-fill,minmax(500px,1fr))}}.pattern-selector-item__label{display:block;width:100%;text-align:center;border:none;cursor:pointer;appearance:none;padding:0;overflow:hidden;background-color:#fff;position:relative;transform:translateZ(0);color:#50575e}.pattern-selector-item__label:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent}.pattern-selector-item__label:hover{color:var(--color-text)}.pattern-selector-item__label:hover .pattern-selector-item__preview-wrap{border:1px solid #646970}.pattern-selector-item__preview-wrap{width:100%;display:block;background:#fff;border-radius:0;overflow:hidden;height:0;padding-top:65%;position:relative;opacity:1;transform:translateZ(0);border:1px solid #dcdcde;margin:0 auto 1em}.pattern-selector-item__preview-wrap.is-rendering{opacity:.5}.pattern-selector-item__media,.pattern-selector-item__preview-wrap-inner-position{position:absolute;top:0;right:0;width:100%;height:100%}.pattern-selector-item__media{display:block;object-fit:cover}@media screen and (min-width:600px){.page-pattern-modal__sidebar{position:fixed;width:230px;padding-left:22px;pointer-events:none}.page-pattern-modal__sidebar>*{pointer-events:auto}.page-pattern-modal__sidebar .page-pattern-modal__category-list{pointer-events:none}.page-pattern-modal__sidebar .page-pattern-modal__category-list .page-pattern-modal__category-button{pointer-events:auto}}@media screen and (min-width:961px){.page-pattern-modal__sidebar{width:324px;padding-left:48px}}.page-pattern-modal__category-list{display:none;margin:0;padding-top:35px}@media screen and (min-width:600px){.page-pattern-modal__category-list{display:block}}.page-pattern-modal__category-list .components-button.is-tertiary{display:block;width:auto;height:auto;color:#50575e;font-size:.875rem;margin-right:-12px;padding:6px 12px;box-shadow:none}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):hover{box-shadow:none;color:var(--color-text)!important}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):active{background:transparent}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.page-pattern-modal__category-list .page-pattern-modal__category-item-selection-wrapper{border-bottom:2px solid transparent;padding-bottom:2px}.page-pattern-modal__category-list .components-menu-item__button:not(:disabled)[aria-selected=true]{color:var(--color-text);font-weight:600}.page-pattern-modal__category-list .components-menu-item__button:not(:disabled)[aria-selected=true] .page-pattern-modal__category-item-selection-wrapper{border-bottom-color:var(--color-text)}.page-pattern-modal__button-container{display:grid;grid-template-columns:1fr 1fr;column-gap:8px}@media screen and (min-width:600px){.page-pattern-modal__button-container{display:inline}}.components-button.page-pattern-modal__blank-button{min-height:40px;box-shadow:inset 0 0 0 1px #dcdcde;color:var(--color-text)}.components-button.page-pattern-modal__blank-button:active{color:var(--color-text)}.components-button.page-pattern-modal__blank-button.is-secondary:hover:not(:disabled){box-shadow:inset 0 0 0 1px #646970;color:var(--color-text)}.components-button.page-pattern-modal__blank-button.is-secondary:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.page-pattern-modal__blank-button.is-secondary:hover:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid transparent}.wp-core-ui select.page-pattern-modal__mobile-category-dropdown{font-size:13px;border-color:#dcdcde}@media screen and (min-width:600px){.wp-core-ui select.page-pattern-modal__mobile-category-dropdown{display:none}}@media screen and (min-width:600px){.page-pattern-modal__pattern-list-container{padding-right:230px}}@media screen and (min-width:961px){.page-pattern-modal__pattern-list-container{padding-right:324px}}.sidebar-modal-opener{display:flex;flex-direction:column;align-items:center;justify-content:center}.sidebar-modal-opener .pattern-selector-item__label{max-width:300px}.sidebar-modal-opener__warning-modal{display:flex;flex-direction:column;justify-content:center;align-items:center}.sidebar-modal-opener__warning-text{max-width:300px;font-size:1rem;line-height:1.5rem}.sidebar-modal-opener__warning-options{float:left;margin-top:20px}.sidebar-modal-opener__warning-options .components-button{margin-right:12px}
|
1 |
+
@keyframes onboarding-loading-pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.mshots-image__loader{animation:onboarding-loading-pulse 1.6s ease-in-out infinite;background:#f0f0f0;color:transparent}.mshots-image__loader:after{content:"\00a0"}.mshots-image__container{height:100%}.hover-scroll{background-size:100%;background-position:top;background-repeat:no-repeat;margin-right:auto;margin-left:auto}.hover-scroll:hover{background-position:bottom}.mshots-image-visible{animation:fadein 1.5s}@keyframes fadein{0%{opacity:0}to{opacity:1}}@font-face{font-display:swap;font-family:Recoleta;font-weight:400;src:url(https://s1.wp.com/i/fonts/recoleta/400.woff2) format("woff2"),url(https://s1.wp.com/i/fonts/recoleta/400.woff) format("woff")}.wp-brand-font{font-family:"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400}[lang*=af] .wp-brand-font,[lang*=ca] .wp-brand-font,[lang*=cs] .wp-brand-font,[lang*=da] .wp-brand-font,[lang*=de] .wp-brand-font,[lang*=en] .wp-brand-font,[lang*=es] .wp-brand-font,[lang*=eu] .wp-brand-font,[lang*=fi] .wp-brand-font,[lang*=fr] .wp-brand-font,[lang*=gl] .wp-brand-font,[lang*=hr] .wp-brand-font,[lang*=hu] .wp-brand-font,[lang*=id] .wp-brand-font,[lang*=is] .wp-brand-font,[lang*=it] .wp-brand-font,[lang*=lv] .wp-brand-font,[lang*=mt] .wp-brand-font,[lang*=nb] .wp-brand-font,[lang*=nl] .wp-brand-font,[lang*=pl] .wp-brand-font,[lang*=pt] .wp-brand-font,[lang*=ro] .wp-brand-font,[lang*=ru] .wp-brand-font,[lang*=sk] .wp-brand-font,[lang*=sl] .wp-brand-font,[lang*=sq] .wp-brand-font,[lang*=sr] .wp-brand-font,[lang*=sv] .wp-brand-font,[lang*=sw] .wp-brand-font,[lang*=tr] .wp-brand-font,[lang*=uz] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}@media screen and (min-width:600px){.page-pattern-modal{width:calc(100% - 32px);height:90vh;overflow-y:hidden;padding-bottom:24px}.page-pattern-modal .components-modal__content{padding:0 32px 24px}}@media screen and (min-width:961px){.page-pattern-modal{width:calc(100% - 64px)}}.page-pattern-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch;margin-top:-1px;padding:0 16px 16px}.page-pattern-modal .components-modal__header{border-bottom:none;margin-left:-16px}.page-pattern-modal__heading{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400;letter-spacing:-.4px;margin:0;font-size:2rem;line-height:1.25}@media screen and (min-width:600px){.page-pattern-modal__heading{font-size:2.25rem;line-height:1.1}}@media screen and (min-width:961px){.page-pattern-modal__heading--default{font-size:3rem;line-height:1.35}}.page-pattern-modal__description{color:#646970;margin:0 0 24px;font-size:1rem;line-height:1.5}@media screen and (min-width:600px){.page-pattern-modal__inner{padding:0 20px}}.pattern-selector-control{margin-bottom:20px}.pattern-selector-control .components-base-control__label{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.pattern-selector-control__options{display:grid;grid-template-columns:1fr;column-gap:1.5em;row-gap:3em}@media screen and (min-width:600px){.pattern-selector-control__options{margin-top:0;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}}@media screen and (min-width:1648px){.pattern-selector-control__options{grid-template-columns:repeat(auto-fill,minmax(350px,1fr))}}@media screen and (min-width:2000px){.pattern-selector-control__options{grid-template-columns:repeat(auto-fill,minmax(500px,1fr))}}.pattern-selector-item__label{display:block;width:100%;text-align:center;border:none;cursor:pointer;appearance:none;padding:0;overflow:hidden;background-color:#fff;position:relative;transform:translateZ(0);color:#50575e}.pattern-selector-item__label:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent}.pattern-selector-item__label:hover{color:var(--color-text)}.pattern-selector-item__label:hover .pattern-selector-item__preview-wrap{border:1px solid #646970}.pattern-selector-item__preview-wrap{width:100%;display:block;background:#fff;border-radius:0;overflow:hidden;height:0;padding-top:65%;position:relative;opacity:1;transform:translateZ(0);border:1px solid #dcdcde;margin:0 auto 1em}.pattern-selector-item__preview-wrap.is-rendering{opacity:.5}.pattern-selector-item__media,.pattern-selector-item__preview-wrap-inner-position{position:absolute;top:0;right:0;width:100%;height:100%}.pattern-selector-item__media{display:block;object-fit:cover}@media screen and (min-width:600px){.page-pattern-modal__sidebar{position:fixed;width:230px;padding-left:22px;pointer-events:none}.page-pattern-modal__sidebar>*{pointer-events:auto}.page-pattern-modal__sidebar .page-pattern-modal__category-list{pointer-events:none}.page-pattern-modal__sidebar .page-pattern-modal__category-list .page-pattern-modal__category-button{pointer-events:auto}}@media screen and (min-width:961px){.page-pattern-modal__sidebar{width:324px;padding-left:48px}}.page-pattern-modal__category-list{display:none;margin:0;padding-top:35px}@media screen and (min-width:600px){.page-pattern-modal__category-list{display:block}}.page-pattern-modal__category-list .components-button.is-tertiary{display:block;width:auto;height:auto;color:#50575e;font-size:.875rem;margin-right:-12px;padding:6px 12px;box-shadow:none}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):hover{box-shadow:none;color:var(--color-text)!important}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):active{background:transparent}.page-pattern-modal__category-list .components-button.is-tertiary.is-tertiary:not(:disabled):focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.page-pattern-modal__category-list .page-pattern-modal__category-item-selection-wrapper{border-bottom:2px solid transparent;padding-bottom:2px}.page-pattern-modal__category-list .components-menu-item__button:not(:disabled)[aria-selected=true]{color:var(--color-text);font-weight:600}.page-pattern-modal__category-list .components-menu-item__button:not(:disabled)[aria-selected=true] .page-pattern-modal__category-item-selection-wrapper{border-bottom-color:var(--color-text)}.page-pattern-modal__button-container{display:grid;grid-template-columns:1fr 1fr;column-gap:8px}@media screen and (min-width:600px){.page-pattern-modal__button-container{display:inline}}.components-button.page-pattern-modal__blank-button{min-height:40px;box-shadow:inset 0 0 0 1px #dcdcde;color:var(--color-text)}.components-button.page-pattern-modal__blank-button:active{color:var(--color-text)}.components-button.page-pattern-modal__blank-button.is-secondary:hover:not(:disabled){box-shadow:inset 0 0 0 1px #646970;color:var(--color-text)}.components-button.page-pattern-modal__blank-button.is-secondary:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.page-pattern-modal__blank-button.is-secondary:hover:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:3px solid transparent}.wp-core-ui select.page-pattern-modal__mobile-category-dropdown{font-size:13px;border-color:#dcdcde}@media screen and (min-width:600px){.wp-core-ui select.page-pattern-modal__mobile-category-dropdown{display:none}}@media screen and (min-width:600px){.page-pattern-modal__pattern-list-container{padding-right:230px}}@media screen and (min-width:961px){.page-pattern-modal__pattern-list-container{padding-right:324px}}.sidebar-modal-opener{display:flex;flex-direction:column;align-items:center;justify-content:center}.sidebar-modal-opener .pattern-selector-item__label{max-width:300px}.sidebar-modal-opener__warning-modal{display:flex;flex-direction:column;justify-content:center;align-items:center}.sidebar-modal-opener__warning-text{max-width:300px;font-size:1rem;line-height:1.5rem}.sidebar-modal-opener__warning-options{float:left;margin-top:20px}.sidebar-modal-opener__warning-options .components-button{margin-right:12px}
|
starter-page-templates/page-patterns-plugin.tsx
CHANGED
@@ -6,6 +6,7 @@ import { useSelect, useDispatch } from '@wordpress/data';
|
|
6 |
import { addFilter, removeFilter } from '@wordpress/hooks';
|
7 |
import { PagePatternModal, PatternDefinition } from '@automattic/page-pattern-modal';
|
8 |
import React, { useCallback } from '@wordpress/element';
|
|
|
9 |
|
10 |
const INSERTING_HOOK_NAME = 'isInsertingPagePattern';
|
11 |
const INSERTING_HOOK_NAMESPACE = 'automattic/full-site-editing/inserting-pattern';
|
@@ -18,19 +19,27 @@ interface PagePatternsPluginProps {
|
|
18 |
|
19 |
export function PagePatternsPlugin( props: PagePatternsPluginProps ): JSX.Element {
|
20 |
const { setOpenState } = useDispatch( 'automattic/starter-page-layouts' );
|
|
|
21 |
const { replaceInnerBlocks } = useDispatch( 'core/block-editor' );
|
22 |
const { editPost } = useDispatch( 'core/editor' );
|
23 |
const { toggleFeature } = useDispatch( 'core/edit-post' );
|
24 |
const { disableTips } = useDispatch( 'core/nux' );
|
25 |
|
26 |
const selectProps = useSelect( ( select ) => {
|
27 |
-
const { isOpen } = select( 'automattic/starter-page-layouts' );
|
28 |
return {
|
29 |
isOpen: isOpen(),
|
30 |
isWelcomeGuideActive: select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) as boolean, // Gutenberg 7.2.0 or higher
|
31 |
areTipsEnabled: select( 'core/nux' )
|
32 |
? ( select( 'core/nux' ).areTipsEnabled() as boolean )
|
33 |
: false, // Gutenberg 7.1.0 or lower
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
};
|
35 |
} );
|
36 |
|
@@ -88,10 +97,15 @@ export function PagePatternsPlugin( props: PagePatternsPluginProps ): JSX.Elemen
|
|
88 |
}
|
89 |
}, [ areTipsEnabled, disableTips, isWelcomeGuideActive, toggleFeature ] );
|
90 |
|
|
|
|
|
|
|
|
|
|
|
91 |
return (
|
92 |
<PagePatternModal
|
93 |
{ ...selectProps }
|
94 |
-
|
95 |
savePatternChoice={ savePatternChoice }
|
96 |
insertPattern={ insertPattern }
|
97 |
hideWelcomeGuide={ hideWelcomeGuide }
|
6 |
import { addFilter, removeFilter } from '@wordpress/hooks';
|
7 |
import { PagePatternModal, PatternDefinition } from '@automattic/page-pattern-modal';
|
8 |
import React, { useCallback } from '@wordpress/element';
|
9 |
+
import { __ } from '@wordpress/i18n';
|
10 |
|
11 |
const INSERTING_HOOK_NAME = 'isInsertingPagePattern';
|
12 |
const INSERTING_HOOK_NAMESPACE = 'automattic/full-site-editing/inserting-pattern';
|
19 |
|
20 |
export function PagePatternsPlugin( props: PagePatternsPluginProps ): JSX.Element {
|
21 |
const { setOpenState } = useDispatch( 'automattic/starter-page-layouts' );
|
22 |
+
const { setUsedPageOrPatternsModal } = useDispatch( 'automattic/wpcom-welcome-guide' );
|
23 |
const { replaceInnerBlocks } = useDispatch( 'core/block-editor' );
|
24 |
const { editPost } = useDispatch( 'core/editor' );
|
25 |
const { toggleFeature } = useDispatch( 'core/edit-post' );
|
26 |
const { disableTips } = useDispatch( 'core/nux' );
|
27 |
|
28 |
const selectProps = useSelect( ( select ) => {
|
29 |
+
const { isOpen, isPatternPicker } = select( 'automattic/starter-page-layouts' );
|
30 |
return {
|
31 |
isOpen: isOpen(),
|
32 |
isWelcomeGuideActive: select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) as boolean, // Gutenberg 7.2.0 or higher
|
33 |
areTipsEnabled: select( 'core/nux' )
|
34 |
? ( select( 'core/nux' ).areTipsEnabled() as boolean )
|
35 |
: false, // Gutenberg 7.1.0 or lower
|
36 |
+
...( isPatternPicker() && {
|
37 |
+
title: __( 'Choose a Pattern', 'full-site-editing' ),
|
38 |
+
description: __(
|
39 |
+
'Pick a pre-defined layout or continue with a blank page',
|
40 |
+
'full-site-editing'
|
41 |
+
),
|
42 |
+
} ),
|
43 |
};
|
44 |
} );
|
45 |
|
97 |
}
|
98 |
}, [ areTipsEnabled, disableTips, isWelcomeGuideActive, toggleFeature ] );
|
99 |
|
100 |
+
const handleClose = useCallback( () => {
|
101 |
+
setUsedPageOrPatternsModal();
|
102 |
+
setOpenState( 'CLOSED' );
|
103 |
+
}, [ setOpenState, setUsedPageOrPatternsModal ] );
|
104 |
+
|
105 |
return (
|
106 |
<PagePatternModal
|
107 |
{ ...selectProps }
|
108 |
+
onClose={ handleClose }
|
109 |
savePatternChoice={ savePatternChoice }
|
110 |
insertPattern={ insertPattern }
|
111 |
hideWelcomeGuide={ hideWelcomeGuide }
|
starter-page-templates/store.ts
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
import { registerStore } from '@wordpress/data';
|
5 |
import type { Reducer } from 'redux';
|
6 |
|
7 |
-
type OpenState = 'CLOSED' | 'OPEN_FROM_ADD_PAGE';
|
8 |
type Action = ReturnType< typeof actions.setOpenState >;
|
9 |
|
10 |
const reducer: Reducer< OpenState, Action > = ( state = 'CLOSED', { type, ...action } ) =>
|
@@ -19,6 +19,7 @@ const actions = {
|
|
19 |
|
20 |
const selectors = {
|
21 |
isOpen: ( state: OpenState ): boolean => 'CLOSED' !== state,
|
|
|
22 |
};
|
23 |
|
24 |
const STORE_KEY = 'automattic/starter-page-layouts';
|
@@ -39,5 +40,6 @@ declare module '@wordpress/data' {
|
|
39 |
key: 'automattic/starter-page-layouts'
|
40 |
): {
|
41 |
isOpen: () => ReturnType< typeof selectors.isOpen >;
|
|
|
42 |
};
|
43 |
}
|
4 |
import { registerStore } from '@wordpress/data';
|
5 |
import type { Reducer } from 'redux';
|
6 |
|
7 |
+
type OpenState = 'CLOSED' | 'OPEN_FROM_ADD_PAGE' | 'OPEN_FOR_BLANK_CANVAS';
|
8 |
type Action = ReturnType< typeof actions.setOpenState >;
|
9 |
|
10 |
const reducer: Reducer< OpenState, Action > = ( state = 'CLOSED', { type, ...action } ) =>
|
19 |
|
20 |
const selectors = {
|
21 |
isOpen: ( state: OpenState ): boolean => 'CLOSED' !== state,
|
22 |
+
isPatternPicker: ( state: OpenState ): boolean => 'OPEN_FOR_BLANK_CANVAS' === state,
|
23 |
};
|
24 |
|
25 |
const STORE_KEY = 'automattic/starter-page-layouts';
|
40 |
key: 'automattic/starter-page-layouts'
|
41 |
): {
|
42 |
isOpen: () => ReturnType< typeof selectors.isOpen >;
|
43 |
+
isPatternPicker: () => ReturnType< typeof selectors.isPatternPicker >;
|
44 |
};
|
45 |
}
|
wpcom-block-editor-nux/class-wp-rest-wpcom-block-editor-nux-status-controller.php
CHANGED
@@ -76,9 +76,13 @@ class WP_REST_WPCOM_Block_Editor_NUX_Status_Controller extends \WP_REST_Controll
|
|
76 |
*/
|
77 |
public function get_nux_status() {
|
78 |
|
|
|
|
|
79 |
if ( wp_is_mobile() ) {
|
80 |
// Designs for welcome tour on mobile are in progress, until then do not show on mobile.
|
81 |
$variant = 'modal';
|
|
|
|
|
82 |
} else {
|
83 |
$variant = 'tour';
|
84 |
}
|
76 |
*/
|
77 |
public function get_nux_status() {
|
78 |
|
79 |
+
$should_open_patterns_panel = (bool) get_option( 'was_created_with_blank_canvas_design' );
|
80 |
+
|
81 |
if ( wp_is_mobile() ) {
|
82 |
// Designs for welcome tour on mobile are in progress, until then do not show on mobile.
|
83 |
$variant = 'modal';
|
84 |
+
} elseif ( $should_open_patterns_panel ) {
|
85 |
+
$variant = 'blank-canvas-tour';
|
86 |
} else {
|
87 |
$variant = 'tour';
|
88 |
}
|
wpcom-block-editor-nux/dist/wpcom-block-editor-nux.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '118256d54ccb171d443f1945ade71c78');
|
wpcom-block-editor-nux/dist/wpcom-block-editor-nux.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
!function(){var e={5270:function(e){e.exports=function(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},e.exports.default=e.exports,e.exports.__esModule=!0},1232:function(e,t,n){var r=n(5270);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},1357:function(e,t,n){"use strict";function r(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}n.d(t,{Z:function(){return r}})},9507:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return r}})},1119:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},7560:function(e,t,n){"use strict";function r(){return(r=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}).apply(this,arguments)}n.d(t,{Z:function(){return r}})},6483:function(e,t,n){"use strict";function r(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,i,o=[],_n=!0,s=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);_n=!0);}catch(
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!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)&&n.length){var s=i.apply(null,n);s&&e.push(s)}else if("object"===o)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},3421:function(e,t){"use strict";var n=decodeURIComponent,r=encodeURIComponent,i=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},2699:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,i),r(n)},e.once("error",o)),e.once(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function a(e,t,n,r){var i,o,s,a;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var a=u.length,l=h(u,a);for(n=0;n<a;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return a(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return a(this,e,t,!0)},o.prototype.once=function(e,t){return c(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4495:function(e,t,n){"use strict";var r=n(212),i=n(9561);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},8032:function(e,t,n){"use strict";var r=n(212),i=n(4495),o=n(713),s=n(9561),c=r.sum32,u=r.sum32_4,a=r.sum32_5,l=o.ch32,d=o.maj32,f=o.s0_256,p=o.s1_256,h=o.g0_256,m=o.g1_256,g=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function w(){if(!(this instanceof w))return new w;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(w,g),e.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=u(m(n[r-2]),n[r-7],h(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],g=this.h[2],v=this.h[3],w=this.h[4],y=this.h[5],_=this.h[6],b=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var C=a(b,p(w),l(w,y,_),this.k[r],n[r]),E=c(f(i),d(i,o,g));b=_,_=y,y=w,w=c(v,C),v=g,g=o,o=i,i=c(C,E)}this.h[0]=c(this.h[0],i),this.h[1]=c(this.h[1],o),this.h[2]=c(this.h[2],g),this.h[3]=c(this.h[3],v),this.h[4]=c(this.h[4],w),this.h[5]=c(this.h[5],y),this.h[6]=c(this.h[6],_),this.h[7]=c(this.h[7],b)},w.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:function(e,t,n){"use strict";var r=n(212).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?s(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},212:function(e,t,n){"use strict";var r=n(9561),i=n(1285);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=c(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=s(i)),n+=u(i.toString(16))}return n},t.zero2=c,t.zero8=u,t.join32=function(e,t,n,i){var o=n-t;r(o%4==0);for(var s=new Array(o/4),c=0,u=t;c<s.length;c++,u+=4){var a;a="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[c]=a>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,s=(o<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,s,c){var u=0,a=t;return u+=(a=a+r>>>0)<t?1:0,u+=(a=a+o>>>0)<o?1:0,e+n+i+s+(u+=(a=a+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,o,s,c){return t+r+o+c>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,s,c,u,a){var l=0,d=t;return l+=(d=d+r>>>0)<t?1:0,l+=(d=d+o>>>0)<o?1:0,l+=(d=d+c>>>0)<c?1:0,e+n+i+s+u+(l+=(d=d+a>>>0)<a?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,s,c,u,a){return t+r+o+c+a>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},1285:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},9255:function(){},8394:function(){},9561:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},1378:function(e){var t=1e3,n=60*t,r=60*n,i=24*r,o=7*i,s=365.25*i;function c(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,u){u=u||{};var a=typeof e;if("string"===a&&e.length>0)return function(e){if((e=String(e)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(e);if("number"===a&&isFinite(e))return u.long?function(e){var o=Math.abs(e);if(o>=i)return c(e,o,i,"day");if(o>=r)return c(e,o,r,"hour");if(o>=n)return c(e,o,n,"minute");if(o>=t)return c(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=i)return Math.round(e/i)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7869:function(e,t,n){"use strict";var r=n(3027),i=(n(3945),n(7997)),o=n(1200),s=n(5707),c=n(849),u=n(4655),a=n(2753),l=n(374);(0,o.registerPlugin)("wpcom-block-editor-nux",{render:function(){var e,t=(0,s.useSelect)((function(e){return{show:e("automattic/wpcom-welcome-guide").isWelcomeGuideShown(),isLoaded:e("automattic/wpcom-welcome-guide").isWelcomeGuideStatusLoaded(),variant:e("automattic/wpcom-welcome-guide").getWelcomeGuideVariant(),isNewPageLayoutModalOpen:e("automattic/starter-page-layouts")&&e("automattic/starter-page-layouts").isOpen()}})),n=t.show,o=t.isNewPageLayoutModalOpen,d=t.isLoaded,f=t.variant,p=(0,s.useDispatch)("automattic/wpcom-welcome-guide").fetchWelcomeGuideStatus;return(0,r.useEffect)((function(){d||p()}),[p,d]),!n||o?null:"tour"===f?(0,r.createElement)(c.Iw,{localeSlug:null!==(e=window.wpcomBlockEditorNuxLocale)&&void 0!==e?e:u.OP},(0,r.createElement)(a.Z,null),";"):"modal"===f&&i.Guide&&i.GuidePage?(0,r.createElement)(l.Z,null):null}})},1568:function(e,t,n){"use strict";var r=n(5707),i=(n(5742),(0,r.subscribe)((function(){var e;(0,r.dispatch)("core/nux").disableTips(),null!==(e=(0,r.select)("core/edit-post"))&&void 0!==e&&e.isFeatureActive("welcomeGuide")&&(0,r.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),i()})));(0,r.subscribe)((function(){var e;(0,r.select)("core/nux").areTipsEnabled()&&((0,r.dispatch)("core/nux").disableTips(),(0,r.dispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide(!0)),null!==(e=(0,r.select)("core/edit-post"))&&void 0!==e&&e.isFeatureActive("welcomeGuide")&&((0,r.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),(0,r.dispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide(!0,{openedManually:!0}))}))},3945:function(e,t,n){"object"==typeof window&&window.wpcomBlockEditorNuxAssetsUrl&&(n.p=window.wpcomBlockEditorNuxAssetsUrl)},1970:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});n(8681);var r=n(7606),i=n.n(r),o=n(9866),s=n(5707),c=(0,s.combineReducers)({welcomeGuideManuallyOpened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"WPCOM_WELCOME_GUIDE_SHOW_SET":return void 0!==t.openedManually?t.openedManually:e;case"WPCOM_WELCOME_GUIDE_RESET_STORE":return!1;default:return e}},showWelcomeGuide:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS":return t.response.show_welcome_guide;case"WPCOM_WELCOME_GUIDE_SHOW_SET":return t.show;case"WPCOM_WELCOME_GUIDE_RESET_STORE":return;default:return e}},tourRating:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"WPCOM_WELCOME_GUIDE_TOUR_RATING_SET":return t.tourRating;case"WPCOM_WELCOME_GUIDE_RESET_STORE":return;default:return e}},welcomeGuideVariant:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"tour",t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS":return t.response.variant;case"WPCOM_WELCOME_GUIDE_RESET_STORE":return"tour";default:return e}}}),u={fetchWelcomeGuideStatus:regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,o.apiFetch)({path:"/wpcom/v2/block-editor/nux"});case 2:return t=e.sent,e.abrupt("return",{type:"WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS",response:t});case 4:case"end":return e.stop()}}),e)})),setShowWelcomeGuide:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.openedManually;return i()({path:"/wpcom/v2/block-editor/nux",method:"POST",data:{show_welcome_guide:e}}),{type:"WPCOM_WELCOME_GUIDE_SHOW_SET",show:e,openedManually:n}},setTourRating:function(e){return{type:"WPCOM_WELCOME_GUIDE_TOUR_RATING_SET",tourRating:e}},resetStore:function(){return{type:"WPCOM_WELCOME_GUIDE_RESET_STORE"}}},a={isWelcomeGuideManuallyOpened:function(e){return e.welcomeGuideManuallyOpened},isWelcomeGuideShown:function(e){return!!e.showWelcomeGuide},isWelcomeGuideStatusLoaded:function(e){return void 0!==e.showWelcomeGuide},getTourRating:function(e){return e.tourRating},getWelcomeGuideVariant:function(e){return e.welcomeGuideVariant}};function l(){return(0,s.registerStore)("automattic/wpcom-welcome-guide",{reducer:c,actions:u,selectors:a,controls:o.controls,persist:!0})}},374:function(e,t,n){"use strict";var r=n(7560),i=n(3027),o=n(7997),s=n(5707),c=n(3163),u=n(6115),a=(n(9255),n(9931)),l=n.n(a),d=n(1467),f=n.n(d),p=n(7828),h=n.n(p),m=n(7397),g=n.n(m),__=c.__;function v(e){var t=e.pageNumber,n=e.isLastPage,r=e.alignBottom,s=void 0!==r&&r,c=e.heading,a=e.description,l=e.imgSrc;return(0,i.useEffect)((function(){var e;(0,u.jN)("calypso_editor_wpcom_nux_slide_view",{slide_number:t,is_last_slide:n,is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding})}),[]),(0,i.createElement)(o.GuidePage,{className:"wpcom-block-editor-nux__page"},(0,i.createElement)("div",{className:"wpcom-block-editor-nux__text"},(0,i.createElement)("h1",{className:"wpcom-block-editor-nux__heading"},c),(0,i.createElement)("div",{className:"wpcom-block-editor-nux__description"},a)),(0,i.createElement)("div",{className:"wpcom-block-editor-nux__visual"},(0,i.createElement)("img",{key:l,src:l,alt:"","aria-hidden":"true",className:"wpcom-block-editor-nux__image"+(s?" align-bottom":"")})))}t.Z=function(){var e=(0,s.useSelect)((function(e){return{show:e("automattic/wpcom-welcome-guide").isWelcomeGuideShown(),isNewPageLayoutModalOpen:e("automattic/starter-page-layouts")&&e("automattic/starter-page-layouts").isOpen(),isManuallyOpened:e("automattic/wpcom-welcome-guide").isWelcomeGuideManuallyOpened()}})),t=e.show,n=e.isNewPageLayoutModalOpen,c=e.isManuallyOpened,a=(0,s.useDispatch)("core/edit-post").closeGeneralSidebar,d=(0,s.useDispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide;if((0,i.useEffect)((function(){t&&a()}),[a,t]),(0,i.useEffect)((function(){var e;t&&!n&&(0,u.jN)("calypso_editor_wpcom_nux_open",{is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding,is_manually_opened:c})}),[c,n,t]),!t||n)return null;var p=[{heading:__("Welcome to your website","full-site-editing"),description:__("Edit your homepage, add the pages you need, and change your site’s look and feel.","full-site-editing"),imgSrc:f(),alignBottom:!0},{heading:__("Add or edit your content","full-site-editing"),description:__("Edit the placeholder content we’ve started you off with, or click the plus sign to add more content.","full-site-editing"),imgSrc:l()},{heading:__("Preview your site as you go","full-site-editing"),description:__("As you edit your site content, click “Preview” to see your site the way your visitors will.","full-site-editing"),imgSrc:h(),alignBottom:!0},{heading:__("Hidden until you’re ready","full-site-editing"),description:__("Your site will remain hidden until launched. Click “Launch” in the toolbar to share it with the world.","full-site-editing"),imgSrc:g(),alignBottom:!0}];return(0,i.createElement)(o.Guide,{className:"wpcom-block-editor-nux",contentLabel:__("Welcome to your website","full-site-editing"),finishButtonText:__("Get started","full-site-editing"),onFinish:function(){var e;(0,u.jN)("calypso_editor_wpcom_nux_dismiss",{is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding}),d(!1,{openedManually:!1})}},p.map((function(e,t){return(0,i.createElement)(v,(0,r.Z)({key:e.heading,pageNumber:t+1,isLastPage:t===p.length-1},e))})))}},8574:function(e,t,n){"use strict";var r=n(3027),i=n(2418),o=(0,r.createElement)(i.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M14.086 5.412l3.476-.015c-.627.625-1.225 1.22-1.82 1.81l-.03.031c-.977.971-1.944 1.934-3.015 3.004l1.06 1.061c1.07-1.07 2.036-2.03 3.013-3.002l.03-.03 1.817-1.808-.03 3.448 1.5.013.046-5.28.007-.759-.76.003-5.301.024.007 1.5zM9.914 18.587l-3.476.016c.627-.625 1.225-1.22 1.82-1.81l.03-.031c.977-.971 1.944-1.934 3.015-3.004l-1.06-1.061c-1.07 1.069-2.036 2.03-3.012 3.001l-.001.001-.03.03-1.817 1.808.03-3.448-1.5-.013-.046 5.279-.007.76.76-.003 5.301-.024-.007-1.5z",fill:"#50575E"}));t.Z=o},6139:function(e,t,n){"use strict";var r=n(3027),i=n(2418),o=(0,r.createElement)(i.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.514 9.988l-3.476.016c.627-.626 1.225-1.22 1.82-1.811l.03-.03v-.001c.977-.971 1.944-1.933 3.015-3.004l-1.06-1.06c-1.07 1.069-2.037 2.03-3.013 3.001l-.03.03-1.818 1.809.03-3.449-1.5-.013-.045 5.28-.007.76.76-.004 5.301-.024-.007-1.5zM5.486 14.012l3.477-.016-1.82 1.811-.03.03c-.977.972-1.945 1.934-3.015 3.005l1.06 1.06c1.07-1.068 2.035-2.03 3.012-3V16.9l.03-.03 1.818-1.809-.03 3.449 1.5.013.046-5.28.006-.76-.76.004-5.3.024.006 1.5z",fill:"#fff"}));t.Z=o},4308:function(e,t,n){"use strict";var r=n(3027),i=n(2418),o=(0,r.createElement)(i.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.131 19.12a.667.667 0 001.227-.417l-.436-4.989h3.88c.954 0 1.64-.916 1.37-1.831L17.42 5.919a.286.286 0 00-.274-.205H9.429v7.588l3.702 5.818zm-5.417-5.977V5.714h-2v7.429h2zm5.98 8a2.381 2.381 0 01-2.01-1.103l-3.297-5.183H4V4h13.145a2 2 0 011.919 1.436l1.753 5.963a3.143 3.143 0 01-3.015 4.03h-2.01l.274 3.125a2.381 2.381 0 01-2.372 2.589z",fill:"#000"}));t.Z=o},9425:function(e,t,n){"use strict";var r=n(3027),i=n(2418),o=(0,r.createElement)(i.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/SVG"},(0,r.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.131 4.023a.667.667 0 011.227.416l-.436 4.99h3.88c.954 0 1.64.916 1.37 1.831l-1.753 5.963a.286.286 0 01-.274.206H9.429V9.84l3.702-5.818zM7.714 10v7.428h-2V10h2zm5.98-8c-.814 0-1.572.416-2.01 1.103L8.388 8.286H4v10.857h13.145a2 2 0 001.919-1.436l1.753-5.963a3.143 3.143 0 00-3.015-4.03h-2.01l.274-3.125A2.381 2.381 0 0013.694 2z",fill:"#000"}));t.Z=o},9483:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(3027),i=n(3804),o=n(3163),s=n(2418),c=n(7997),__=o.__;function u(e){var t=e.currentPage,n=e.numberOfPages,s=e.setCurrentPage;return(0,r.createElement)("ul",{className:"components-guide__page-control","aria-label":__("Guide controls","full-site-editing")},(0,i.times)(n,(function(e){return(0,r.createElement)("li",{key:e,"aria-current":e===t?"step":void 0},(0,r.createElement)(c.Button,{key:e,icon:(0,r.createElement)(a,{isSelected:e===t}),"aria-label":(0,o.sprintf)(__("Page %1$d of %2$d","full-site-editing"),e+1,n),onClick:function(){return s(e)}}))})))}var a=function(e){var t=e.isSelected;return(0,r.createElement)(s.SVG,{width:"6",height:"6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(s.Circle,{cx:"3",cy:"3",r:"3",fill:t?"#32373C":"#E1E3E6"}))}},2069:function(e,t,n){"use strict";var r=n(3027),i=(n(8394),n(9483)),o=n(6139),s=n(9425),c=n(4308),u=n(2779),a=n.n(u),l=n(7997),d=n(8565),f=n(5707),p=n(6115),h=n(3163),__=h.__;function m(e){var t=e.cardIndex,n=e.lastCardIndex,o=e.onDismiss,s=e.setCurrentCardIndex,c=__("Start Tour","full-site-editing"),u=__("Next","full-site-editing");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Z,{currentPage:t,numberOfPages:n+1,setCurrentPage:s}),(0,r.createElement)("div",null,0===t?(0,r.createElement)(l.Button,{isTertiary:!0,onClick:function(){return o("no-thanks-btn")}},__("Skip","full-site-editing")):(0,r.createElement)(l.Button,{isTertiary:!0,onClick:function(){return s(t-1)}},__("Back","full-site-editing")),(0,r.createElement)(l.Button,{className:"welcome-tour-card__next-btn",isPrimary:!0,onClick:function(){return s(t+1)}},0===t?c:u)))}function g(e){var t=e.onMinimize,n=e.onDismiss,i=e.slideNumber;return(0,r.createElement)("div",{className:"welcome-tour-card__overlay-controls"},(0,r.createElement)(l.Flex,null,(0,r.createElement)(l.Button,{label:__("Minimize Tour","full-site-editing"),isPrimary:!0,className:"welcome-tour-card__minimize-icon",icon:o.Z,iconSize:24,onClick:function(){var e;t(!0),(0,p.jN)("calypso_editor_wpcom_tour_minimize",{is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding,slide_number:i})}}),(0,r.createElement)(l.Button,{label:__("Close Tour","full-site-editing"),isPrimary:!0,icon:d.Z,iconSize:24,onClick:function(){return n("close-btn")}})))}function v(){var e=!1,t=(0,f.useSelect)((function(e){return e("automattic/wpcom-welcome-guide").getTourRating()})),n=(0,f.useDispatch)("automattic/wpcom-welcome-guide").setTourRating;!e&&t&&(e=!0);var i=function(t){var r;e||(e=!0,n(t?"thumbs-up":"thumbs-down"),(0,p.jN)("calypso_editor_wpcom_tour_rate",{thumbs_up:t,is_gutenboarding:null===(r=window.calypsoifyGutenberg)||void 0===r?void 0:r.isGutenboarding}))};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",{className:"welcome-tour__end-text"},__("Did you find this guide helpful?","full-site-editing")),(0,r.createElement)("div",null,(0,r.createElement)(l.Button,{"aria-label":__("Rate thumbs up","full-site-editing"),className:a()("welcome-tour__end-icon",{active:"thumbs-up"===t}),disabled:e,icon:s.Z,onClick:function(){return i(!0)},iconSize:24}),(0,r.createElement)(l.Button,{"aria-label":__("Rate thumbs down","full-site-editing"),className:a()("welcome-tour__end-icon",{active:"thumbs-down"===t}),disabled:e,icon:c.Z,onClick:function(){return i(!1)},iconSize:24})))}t.Z=function(e){var t,n=e.cardContent,i=e.cardIndex,o=e.justMaximized,s=e.lastCardIndex,c=e.onMinimize,u=e.onDismiss,a=e.setJustMaximized,d=e.setCurrentCardIndex,f=n.description,h=n.heading,w=n.imgSrc,y=i===s;return t=function(){var e;o?a(!1):(0,p.jN)("calypso_editor_wpcom_tour_slide_view",{slide_number:i+1,is_last_slide:y,slide_heading:h,is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding})},(0,r.useEffect)(t,[]),(0,r.createElement)(l.Card,{className:"welcome-tour-card",isElevated:!0},(0,r.createElement)(g,{setJustMaximized:a,onDismiss:u,onMinimize:c,slideNumber:i+1}),(0,r.createElement)(l.CardMedia,null,(0,r.createElement)("img",{alt:__("Editor Welcome Tour","full-site-editing"),src:w})),(0,r.createElement)(l.CardBody,null,(0,r.createElement)("h2",{className:"welcome-tour-card__heading"},h),(0,r.createElement)("p",{className:"welcome-tour-card__description"},f,y?(0,r.createElement)(l.Button,{className:"welcome-tour-card__description",isTertiary:!0,onClick:function(){return d(0)}},__("Restart tour","full-site-editing")):null)),(0,r.createElement)(l.CardFooter,null,y?(0,r.createElement)(v,null):(0,r.createElement)(m,{cardIndex:i,lastCardIndex:s,onDismiss:u,setCurrentCardIndex:d})))}},1227:function(e,t,n){"use strict";var r=n(3027),i=n(3163),o=n(7997),s=n(7498),__=i.__;t.Z=function(e){return[{heading:__("Welcome to WordPress!","full-site-editing"),description:__("Continue on with this short tour to learn the fundamentals of the WordPress editor.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-welcome.png",animation:null},{heading:__("Everything is a block","full-site-editing"),description:__("In the WordPress Editor, paragraphs, images, and videos are all blocks.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-all-blocks.gif",animation:null},{heading:__("Adding a new block","full-site-editing"),description:__("Click + to open the inserter. Then click the block you want to add.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-add-block.gif",animation:"block-inserter"},{heading:__("Click a block to change it","full-site-editing"),description:__("Use the toolbar to change the appearance of a selected block. Try making it bold.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-make-bold.gif",animation:null},{heading:__("More Options","full-site-editing"),description:__("Click the settings icon to see even more options.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-more-options.gif",animation:null},{heading:__("Undo any mistake","full-site-editing"),description:__("Click the Undo button if you've made a mistake.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-undo.gif",animation:"undo-button"},{heading:__("Drag & drop","full-site-editing"),description:__("To move blocks around, click and drag the handle.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-move-block.gif",animation:"undo-button"},{heading:__("Congratulations!","full-site-editing"),description:(0,r.createInterpolateElement)(__("You've learned the basics. Remember, your site is private until you <link_to_launch_site_docs>decide to launch</link_to_launch_site_docs>. View the <link_to_editor_docs>block editing docs</link_to_editor_docs> to learn more.","full-site-editing"),{link_to_launch_site_docs:(0,r.createElement)(o.ExternalLink,{href:(0,s.aq)("https://wordpress.com/support/settings/privacy-settings/#launch-your-site",e)}),link_to_editor_docs:(0,r.createElement)(o.ExternalLink,{href:(0,s.aq)("https://wordpress.com/support/wordpress-editor/",e)})}),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-finish.png",animation:"block-inserter"}]}},2753:function(e,t,n){"use strict";var r=n(3258),i=n(3027),o=n(2069),s=n(1227),c=n(8574),u=(n(8394),n(7997)),a=n(5869),l=n(5707),d=n(6115),f=n(3163),p=n(849),__=f.__;function h(){var e=(0,p.bU)(),t=(0,s.Z)(e),n=(0,i.useState)(!1),c=(0,r.Z)(n,2),u=c[0],a=c[1],f=(0,i.useState)(0),h=(0,r.Z)(f,2),g=h[0],v=h[1],w=(0,i.useState)(!1),y=(0,r.Z)(w,2),_=y[0],b=y[1],C=(0,l.useDispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide;t.forEach((function(e){return(new window.Image).src=e.imgSrc}));return(0,i.createElement)("div",{className:"wpcom-editor-welcome-tour-frame",onMouseDownCapture:function(e){e.preventDefault()}},u?(0,i.createElement)(m,{onMaximize:a,setJustMaximized:b,slideNumber:g+1}):(0,i.createElement)(o.Z,{cardContent:t[g],cardIndex:g,justMaximized:_,key:g,lastCardIndex:t.length-1,onDismiss:function(e){var t;(0,d.jN)("calypso_editor_wpcom_tour_dismiss",{is_gutenboarding:null===(t=window.calypsoifyGutenberg)||void 0===t?void 0:t.isGutenboarding,slide_number:g+1,action:e}),C(!1,{openedManually:!1})},onMinimize:a,setJustMaximized:b,setCurrentCardIndex:v}))}function m(e){var t=e.onMaximize,n=e.setJustMaximized,r=e.slideNumber;return(0,i.createElement)(u.Button,{onClick:function(){var e;t(!1),n(!0),(0,d.jN)("calypso_editor_wpcom_tour_maximize",{is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding,slide_number:r})},className:"wpcom-editor-welcome-tour__resume-btn"},(0,i.createElement)(u.Flex,{gap:13},(0,i.createElement)("p",null,__("Click to resume tutorial","full-site-editing")),(0,i.createElement)(a.Z,{icon:c.Z,size:24})))}t.Z=function(){var e=(0,i.useRef)(document.createElement("div")).current,t=(0,l.useSelect)((function(e){return{show:e("automattic/wpcom-welcome-guide").isWelcomeGuideShown(),isNewPageLayoutModalOpen:e("automattic/starter-page-layouts")&&e("automattic/starter-page-layouts").isOpen(),isManuallyOpened:e("automattic/wpcom-welcome-guide").isWelcomeGuideManuallyOpened()}})),n=t.show,r=t.isNewPageLayoutModalOpen,o=t.isManuallyOpened,c=(0,l.useDispatch)("core/edit-post").closeGeneralSidebar,u=(0,p.bU)();return(new window.Image).src=(0,s.Z)(u)[0].imgSrc,(0,i.useEffect)((function(){n&&c()}),[c,n]),(0,i.useEffect)((function(){var t;if(n||r)return e.classList.add("wpcom-editor-welcome-tour-portal-parent"),document.body.appendChild(e),(0,d.jN)("calypso_editor_wpcom_tour_open",{is_gutenboarding:null===(t=window.calypsoifyGutenberg)||void 0===t?void 0:t.isGutenboarding,is_manually_opened:o}),function(){document.body.removeChild(e)}}),[r,o,n,e]),!n||r?null:(0,i.createElement)("div",null,(0,i.createPortal)((0,i.createElement)(h,null),e))}},6115:function(e,t,n){"use strict";n.d(t,{jN:function(){return r.jN}});n(1694),n(6209),n(9377);var r=n(9792);n(3722)},9377:function(e,t,n){"use strict";"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}))},9792:function(e,t,n){"use strict";n.d(t,{jN:function(){return f}});var r,i=n(9394),o=n(3804),s=(n(3421),n(2699)),c=n(4898),u=(n(6209),n(1694),n(9377),n(9358)),a=["a8c_cookie_banner_ok","wcadmin_storeprofiler_create_jetpack_account","wcadmin_storeprofiler_connect_store","wcadmin_storeprofiler_login_jetpack_account","wcadmin_storeprofiler_payment_login","wcadmin_storeprofiler_payment_create_account","calypso_checkout_switch_to_p_24","calypso_checkout_composite_p24_submit_clicked"];Promise.resolve();function l(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&(0,c.ve)("//stats.wp.com/w.js?63");var d=new s.EventEmitter;function f(e,t){if(t=t||{},(0,u.Z)('Record event "%s" called with props %o',e,t),e.startsWith("calypso_")||(0,o.includes)(a,e)){if(r){var n=r(t);t=(0,i.Z)((0,i.Z)({},t),n)}t=(0,o.omitBy)(t,(function(e){return void 0===e})),(0,u.Z)('Recording event "%s" with actual props %o',e,t),l(["recordEvent",e,t]),d.emit("record-event",e,t)}else(0,u.Z)('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}},3722:function(e,t,n){"use strict";n(9792)},6209:function(e,t,n){"use strict";n(4)},9358:function(e,t,n){"use strict";var r=n(8049),i=n.n(r);t.Z=i()("calypso:analytics")},1694:function(e,t,n){"use strict";n(9358)},4:function(e,t,n){"use strict";n(8032)},849:function(e,t,n){"use strict";n.d(t,{Iw:function(){return l},bU:function(){return f}});var r=n(7560),i=n(3258),o=n(3027),s=n(6141),c=n(1417),u=n(3163),a=(0,s.createContext)(null),l=function(e){var t=e.children,n=e.localeSlug;return(0,o.createElement)(a.Provider,{value:n},t)};function d(){var e,t;return null===(e=u.getLocaleData())||void 0===e||null===(t=e[""])||void 0===t?void 0:t.language}function f(){var e=(0,s.useContext)(a),t=!!e,n=(0,s.useState)(d()),r=(0,i.Z)(n,2),o=r[0],c=r[1];return(0,s.useEffect)((function(){if(!t)return c(d()),u.subscribe((function(){c(d())}))}),[t]),e||o||"en"}(0,c.createHigherOrderComponent)((function(e){return function(t){var n=f();return(0,o.createElement)(e,(0,r.Z)({locale:n},t))}}),"withLocale")},4655:function(e,t,n){"use strict";n.d(t,{OP:function(){return r},GG:function(){return i},iT:function(){return o},xn:function(){return s},Xb:function(){return c},hI:function(){return u},mL:function(){return a},vS:function(){return l},_r:function(){return d}});var r="en",i=["en","ja","es","pt","fr","pt-br"],o=["en","fr","de"],s=["en","fr","de"],c={"pt-br":"br",br:"bre",zh:"zh-cn","zh-hk":"zh-tw","zh-sg":"zh-cn",kr:"ko"},u=["ar","de","en","es","fr","he","id","it","ja","ko","nl","pt-br","ru","sv","tr","zh-cn","zh-tw"],a=["ar","de","el","en","es","fa","fi","fr","id","it","ja","nl","pt","pt-br","ru","sv","th","tl","tr"],l=["es","pt-br","de","fr","he","ja","it","nl","ru","tr","id","zh-cn","zh-tw","ko","ar","sv"],d=["en","ar","de","es","fr","he","id","it","ja","ko","nl","pt-br","ro","ru","sv","tr","zh-cn","zh-tw"]},7498:function(e,t,n){"use strict";n.d(t,{aq:function(){return h}});var r=n(7560),i=n(3027),o=n(6141),s=n(1417),c=n(849),u=n(4655),a="http://__domain__.invalid",l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n,r){return t.includes(r)&&"en"!==r&&n.pathname.substr(0,r.length+2)!=="/"+r+"/"&&(n.host="".concat(u.Xb[r]||r,".").concat(e)),n}},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(r,i){return r.host="wordpress.com","object"==typeof n&&n instanceof RegExp&&!n.test(r.pathname)&&(t=[]),r.pathname=e+r.pathname,t.includes(i)&&"en"!==i&&(r.pathname=i+r.pathname),r}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){return"object"==typeof t&&t instanceof RegExp&&!t.test(n.pathname)||e.includes(r)&&"en"!==r&&(n.pathname=r+n.pathname),n}},p={"wordpress.com/support/":f(u.hI),"wordpress.com/forums/":f(u.mL),"wordpress.com/blog/":f(u.GG,/^\/blog\/?$/),"wordpress.com/tos/":f(u.vS),"wordpress.com/wp-admin/":l("wordpress.com",u.vS),"wordpress.com/wp-login.php":l("wordpress.com",u.vS),"jetpack.com":l("jetpack.com",u._r),"en.support.wordpress.com":d("/support",u.hI),"en.blog.wordpress.com":d("/blog",u.GG,/^\/$/),"en.forums.wordpress.com":d("/forums",u.mL),"automattic.com/privacy/":f(u.iT),"automattic.com/cookies/":f(u.xn),"wordpress.com/help/contact/":function(e,t,n){return n?e:(e.pathname=e.pathname.replace(/\/help\//,"/support/"),f(u.hI)(e,t))},"wordpress.com":function(e,t){return/^\/(checkout|me)(\/|$)/.test(e.pathname)||/\/([a-z0-9-]+\.)+[a-z]{2,}\/?$/.test(e.pathname)?e:f(u.vS)(e,t)}};function h(e,t){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];try{n=new URL(String(e),a)}catch(c){return e}if(n.origin===a)return e;n.protocol="https:",n.hostname="",n.pathname.endsWith(".php")||(n.pathname=(n.pathname+"/").replace(/\/+$/,"/"));var i=n.pathname.substr(0,1+n.pathname.indexOf("/",1));if("en.wordpress.com"===n.host&&(n.host="wordpress.com"),"/"+t+"/"===i)return e;for(var o=[n.host,n.host+i,n.host+n.pathname],s=o.length-1;s>=0;s--)if(o[s]in p)return p[o[s]](n,t,r).href;return e}function m(){var e=(0,c.bU)();return(0,o.useCallback)((function(t,n,r){return h(t,n||e,r)}),[e])}(0,s.createHigherOrderComponent)((function(e){return function(t){var n=m();return(0,i.createElement)(e,(0,r.Z)({localizeUrl:n},t))}}),"withLocalizeUrl")},3340:function(e,t,n){"use strict";n.d(t,{hg:function(){return c},lZ:function(){return u},_W:function(){return l},Yt:function(){return d}});var r=n(8049),i=n.n(r)()("lib/load-script/callback-handler"),o=new Map;function s(){return o}function c(e){return s().has(e)}function u(e,t){var n=s();c(e)?(i('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(i('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=s(),r=n.get(e);if(r){var o='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));i(o),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function l(){var e=this.getAttribute("src");i('Handling successful request for "'.concat(e,'"')),a(e),this.onload=null}function d(){var e=this.getAttribute("src");i('Handling failed request for "'.concat(e,'"')),a(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}},5606:function(e,t,n){"use strict";n.d(t,{C:function(){return c},k:function(){return u}});var r=n(8049),i=n.n(r),o=n(3340),s=i()("lib/load-script/dom-operations");function c(e){s('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=o._W,t.onerror=o.Yt,t}function u(e){s("Attaching element to head"),document.head.appendChild(e)}},4898:function(e,t,n){"use strict";n.d(t,{ve:function(){return c}});var r=n(8049),i=n.n(r),o=n(3340),s=n(5606);i()("package/load-script");function c(e,t){if(!(0,o.hg)(e)&&(0,s.k)((0,s.C)(e)),"function"!=typeof t)return new Promise((function(t,n){(0,o.lZ)(e,(function(e){null===e?t():n(e)}))}));(0,o.lZ)(e,t)}},8049:function(e,t,n){var r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(2632)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},2632:function(e,t,n){var r=n(5182);e.exports=function(e){function t(e){var n,r,o,s=null;function c(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(c.enabled){var o=c,s=Number(new Date),u=s-(n||s);o.diff=u,o.prev=n,o.curr=s,n=s,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return"%";a++;var i=t.formatters[n];if("function"==typeof i){var s=r[a];e=i.call(o,s),r.splice(a,1),a--}return e})),t.formatArgs.call(o,r);var l=o.log||t.log;l.apply(o,r)}}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=i,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(c),c}function i(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(r(t.names.map(o)),r(t.skips.map(o).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},9931:function(e,t,n){e.exports=n.p+"images/block-picker-53b676a08dd25f523d4adb0157a40b4c.svg"},1467:function(e,t,n){e.exports=n.p+"images/editor-1a0c404dcc59d4a340edb4649127f4c9.svg"},7828:function(e,t,n){e.exports=n.p+"images/preview-a2ab6dbfd49f58a76c13c9dab8b09e0e.svg"},7397:function(e,t,n){e.exports=n.p+"images/private-598e2a26fcb0c685d165d750fdf02364.svg"},6141:function(e){"use strict";e.exports=window.React},8681:function(e){"use strict";e.exports=window["a8c-fse-common-data-stores"]},3804:function(e){"use strict";e.exports=window.lodash},7606:function(e){"use strict";e.exports=window.wp.apiFetch},7997:function(e){"use strict";e.exports=window.wp.components},1417:function(e){"use strict";e.exports=window.wp.compose},5707:function(e){"use strict";e.exports=window.wp.data},9866:function(e){"use strict";e.exports=window.wp.dataControls},3027:function(e){"use strict";e.exports=window.wp.element},3163:function(e){"use strict";e.exports=window.wp.i18n},5742:function(e){"use strict";e.exports=window.wp.nux},1200:function(e){"use strict";e.exports=window.wp.plugins},2418:function(e){"use strict";e.exports=window.wp.primitives}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e}();var r={};!function(){"use strict";n.r(r);var e=n(1970);n(1568),n(7869);(0,e.z)()}(),window.EditingToolkit=r}();
|
1 |
+
!function(){var e={5270:function(e){e.exports=function(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},e.exports.default=e.exports,e.exports.__esModule=!0},1232:function(e,t,n){var r=n(5270);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},1357:function(e,t,n){"use strict";function r(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}n.d(t,{Z:function(){return r}})},9507:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return r}})},1119:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},7560:function(e,t,n){"use strict";function r(){return(r=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}).apply(this,arguments)}n.d(t,{Z:function(){return r}})},6483:function(e,t,n){"use strict";function r(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,i,o=[],_n=!0,s=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);_n=!0);}catch(u){s=!0,i=u}finally{try{_n||null==n.return||n.return()}finally{if(s)throw i}}return o}}n.d(t,{Z:function(){return r}})},9007:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:function(){return r}})},9394:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(1119);function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},4530:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(8283);function i(e,t){if(null==e)return{};var n,i,o=(0,r.Z)(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},8283:function(e,t,n){"use strict";function r(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}n.d(t,{Z:function(){return r}})},3258:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(9507),i=n(6483),o=n(237),s=n(9007);function u(e,t){return(0,r.Z)(e)||(0,i.Z)(e,t)||(0,o.Z)(e,t)||(0,s.Z)()}},237:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1357);function i(e,t){if(e){if("string"==typeof e)return(0,r.Z)(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)?(0,r.Z)(e,t):void 0}}},1557:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},1359:function(e){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},5182:function(e,t,n){var r=n(1232),i=n(1557),o=n(6487),s=n(1359);e.exports=function(e){return r(e)||i(e)||o(e)||s()},e.exports.default=e.exports,e.exports.__esModule=!0},6487:function(e,t,n){var r=n(5270);e.exports=function(e,t){if(e){if("string"==typeof e)return r(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)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},5869:function(e,t,n){"use strict";var r=n(1119),i=n(4530),o=n(3027);function s(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}t.Z=function(e){var t=e.icon,n=e.size,u=void 0===n?24:n,c=(0,i.Z)(e,["icon","size"]);return(0,o.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:u,height:u},c))}},8565:function(e,t,n){"use strict";var r=n(3027),i=n(2418),o=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(i.Path,{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"}));t.Z=o},2779:function(e,t){var n;
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!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)&&n.length){var s=i.apply(null,n);s&&e.push(s)}else if("object"===o)for(var u in n)r.call(n,u)&&n[u]&&e.push(u)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},3421:function(e,t){"use strict";var n=decodeURIComponent,r=encodeURIComponent,i=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},2699:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,i),r(n)},e.once("error",o)),e.once(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function a(e,t,n,r){var i,o,s,a;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var a=c.length,l=h(c,a);for(n=0;n<a;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return a(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return a(this,e,t,!0)},o.prototype.once=function(e,t){return u(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4495:function(e,t,n){"use strict";var r=n(212),i=n(9561);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},8032:function(e,t,n){"use strict";var r=n(212),i=n(4495),o=n(713),s=n(9561),u=r.sum32,c=r.sum32_4,a=r.sum32_5,l=o.ch32,d=o.maj32,f=o.s0_256,p=o.s1_256,h=o.g0_256,m=o.g1_256,g=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function w(){if(!(this instanceof w))return new w;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(w,g),e.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(m(n[r-2]),n[r-7],h(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],g=this.h[2],v=this.h[3],w=this.h[4],y=this.h[5],_=this.h[6],b=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var C=a(b,p(w),l(w,y,_),this.k[r],n[r]),E=u(f(i),d(i,o,g));b=_,_=y,y=w,w=u(v,C),v=g,g=o,o=i,i=u(C,E)}this.h[0]=u(this.h[0],i),this.h[1]=u(this.h[1],o),this.h[2]=u(this.h[2],g),this.h[3]=u(this.h[3],v),this.h[4]=u(this.h[4],w),this.h[5]=u(this.h[5],y),this.h[6]=u(this.h[6],_),this.h[7]=u(this.h[7],b)},w.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:function(e,t,n){"use strict";var r=n(212).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?s(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},212:function(e,t,n){"use strict";var r=n(9561),i=n(1285);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function u(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=u(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=s(i)),n+=c(i.toString(16))}return n},t.zero2=u,t.zero8=c,t.join32=function(e,t,n,i){var o=n-t;r(o%4==0);for(var s=new Array(o/4),u=0,c=t;u<s.length;u++,c+=4){var a;a="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],s[u]=a>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,s=(o<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,s,u){var c=0,a=t;return c+=(a=a+r>>>0)<t?1:0,c+=(a=a+o>>>0)<o?1:0,e+n+i+s+(c+=(a=a+u>>>0)<u?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,o,s,u){return t+r+o+u>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,s,u,c,a){var l=0,d=t;return l+=(d=d+r>>>0)<t?1:0,l+=(d=d+o>>>0)<o?1:0,l+=(d=d+u>>>0)<u?1:0,e+n+i+s+c+(l+=(d=d+a>>>0)<a?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,s,u,c,a){return t+r+o+u+a>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},1285:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},9255:function(){},8394:function(){},9561:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},1378:function(e){var t=1e3,n=60*t,r=60*n,i=24*r,o=7*i,s=365.25*i;function u(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,c){c=c||{};var a=typeof e;if("string"===a&&e.length>0)return function(e){if((e=String(e)).length>100)return;var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!u)return;var c=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===a&&isFinite(e))return c.long?function(e){var o=Math.abs(e);if(o>=i)return u(e,o,i,"day");if(o>=r)return u(e,o,r,"hour");if(o>=n)return u(e,o,n,"minute");if(o>=t)return u(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=i)return Math.round(e/i)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7869:function(e,t,n){"use strict";var r=n(3027),i=(n(3945),n(7997)),o=n(1200),s=n(5707),u=n(849),c=n(4655),a=n(2753),l=n(374),d=n(1970);(0,o.registerPlugin)("wpcom-block-editor-nux",{render:function(){var e,t=(0,s.useSelect)((function(e){var t=e("automattic/wpcom-welcome-guide"),n=e("automattic/starter-page-layouts");return{show:t.isWelcomeGuideShown(),isLoaded:t.isWelcomeGuideStatusLoaded(),variant:t.getWelcomeGuideVariant(),isManuallyOpened:t.isWelcomeGuideManuallyOpened(),isNewPageLayoutModalOpen:null==n?void 0:n.isOpen()}}),[]),n=t.show,o=t.isLoaded,f=t.variant,p=t.isManuallyOpened,h=t.isNewPageLayoutModalOpen,m=(0,s.useDispatch)("automattic/starter-page-layouts").setOpenState,g=(0,s.useDispatch)("automattic/wpcom-welcome-guide").fetchWelcomeGuideStatus;return(0,r.useEffect)((function(){o||g()}),[g,o]),!n||h?null:f!==d.yn||p?f===d.Sz?(0,r.createElement)(u.Iw,{localeSlug:null!==(e=window.wpcomBlockEditorNuxLocale)&&void 0!==e?e:c.OP},(0,r.createElement)(a.Z,null),";"):"modal"===f&&i.Guide&&i.GuidePage?(0,r.createElement)(l.Z,null):null:(m("OPEN_FOR_BLANK_CANVAS"),null)}})},1568:function(e,t,n){"use strict";var r=n(5707),i=(n(5742),(0,r.subscribe)((function(){var e;(0,r.dispatch)("core/nux").disableTips(),null!==(e=(0,r.select)("core/edit-post"))&&void 0!==e&&e.isFeatureActive("welcomeGuide")&&(0,r.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),i()})));(0,r.subscribe)((function(){var e;(0,r.select)("core/nux").areTipsEnabled()&&((0,r.dispatch)("core/nux").disableTips(),(0,r.dispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide(!0)),null!==(e=(0,r.select)("core/edit-post"))&&void 0!==e&&e.isFeatureActive("welcomeGuide")&&((0,r.dispatch)("core/edit-post").toggleFeature("welcomeGuide"),(0,r.dispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide(!0,{openedManually:!0}))}))},3945:function(e,t,n){"object"==typeof window&&window.wpcomBlockEditorNuxAssetsUrl&&(n.p=window.wpcomBlockEditorNuxAssetsUrl)},1970:function(e,t,n){"use strict";n.d(t,{Sz:function(){return u},yn:function(){return c},z2:function(){return f}});n(8681);var r=n(7606),i=n.n(r),o=n(9866),s=n(5707),u="tour",c="blank-canvas-tour",a=(0,s.combineReducers)({welcomeGuideManuallyOpened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"WPCOM_WELCOME_GUIDE_SHOW_SET":return void 0!==t.openedManually?t.openedManually:e;case"WPCOM_WELCOME_GUIDE_RESET_STORE":return!1;default:return e}},showWelcomeGuide:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS":return t.response.show_welcome_guide;case"WPCOM_WELCOME_GUIDE_SHOW_SET":return t.show;case"WPCOM_WELCOME_GUIDE_RESET_STORE":return;default:return e}},tourRating:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"WPCOM_WELCOME_GUIDE_TOUR_RATING_SET":return t.tourRating;case"WPCOM_WELCOME_GUIDE_RESET_STORE":return;default:return e}},welcomeGuideVariant:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS":return t.response.variant;case"WPCOM_HAS_USED_PATTERNS_MODAL":return e===c?u:e;case"WPCOM_WELCOME_GUIDE_RESET_STORE":return u;default:return e}}}),l={fetchWelcomeGuideStatus:regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,o.apiFetch)({path:"/wpcom/v2/block-editor/nux"});case 2:return t=e.sent,e.abrupt("return",{type:"WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS",response:t});case 4:case"end":return e.stop()}}),e)})),setShowWelcomeGuide:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.openedManually;return i()({path:"/wpcom/v2/block-editor/nux",method:"POST",data:{show_welcome_guide:e}}),{type:"WPCOM_WELCOME_GUIDE_SHOW_SET",show:e,openedManually:n}},setTourRating:function(e){return{type:"WPCOM_WELCOME_GUIDE_TOUR_RATING_SET",tourRating:e}},setUsedPageOrPatternsModal:function(){return{type:"WPCOM_HAS_USED_PATTERNS_MODAL"}},resetStore:function(){return{type:"WPCOM_WELCOME_GUIDE_RESET_STORE"}}},d={isWelcomeGuideManuallyOpened:function(e){return e.welcomeGuideManuallyOpened},isWelcomeGuideShown:function(e){return!!e.showWelcomeGuide},isWelcomeGuideStatusLoaded:function(e){return void 0!==e.showWelcomeGuide},getTourRating:function(e){return e.tourRating},getWelcomeGuideVariant:function(e){return e.welcomeGuideVariant}};function f(){return(0,s.registerStore)("automattic/wpcom-welcome-guide",{reducer:a,actions:l,selectors:d,controls:o.controls,persist:!0})}},374:function(e,t,n){"use strict";var r=n(7560),i=n(3027),o=n(7997),s=n(5707),u=n(3163),c=n(6115),a=(n(9255),n(9931)),l=n.n(a),d=n(1467),f=n.n(d),p=n(7828),h=n.n(p),m=n(7397),g=n.n(m),__=u.__;function v(e){var t=e.pageNumber,n=e.isLastPage,r=e.alignBottom,s=void 0!==r&&r,u=e.heading,a=e.description,l=e.imgSrc;return(0,i.useEffect)((function(){var e;(0,c.jN)("calypso_editor_wpcom_nux_slide_view",{slide_number:t,is_last_slide:n,is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding})}),[]),(0,i.createElement)(o.GuidePage,{className:"wpcom-block-editor-nux__page"},(0,i.createElement)("div",{className:"wpcom-block-editor-nux__text"},(0,i.createElement)("h1",{className:"wpcom-block-editor-nux__heading"},u),(0,i.createElement)("div",{className:"wpcom-block-editor-nux__description"},a)),(0,i.createElement)("div",{className:"wpcom-block-editor-nux__visual"},(0,i.createElement)("img",{key:l,src:l,alt:"","aria-hidden":"true",className:"wpcom-block-editor-nux__image"+(s?" align-bottom":"")})))}t.Z=function(){var e=(0,s.useSelect)((function(e){return{show:e("automattic/wpcom-welcome-guide").isWelcomeGuideShown(),isNewPageLayoutModalOpen:e("automattic/starter-page-layouts")&&e("automattic/starter-page-layouts").isOpen(),isManuallyOpened:e("automattic/wpcom-welcome-guide").isWelcomeGuideManuallyOpened()}})),t=e.show,n=e.isNewPageLayoutModalOpen,u=e.isManuallyOpened,a=(0,s.useDispatch)("core/edit-post").closeGeneralSidebar,d=(0,s.useDispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide;if((0,i.useEffect)((function(){t&&a()}),[a,t]),(0,i.useEffect)((function(){var e;t&&!n&&(0,c.jN)("calypso_editor_wpcom_nux_open",{is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding,is_manually_opened:u})}),[u,n,t]),!t||n)return null;var p=[{heading:__("Welcome to your website","full-site-editing"),description:__("Edit your homepage, add the pages you need, and change your site’s look and feel.","full-site-editing"),imgSrc:f(),alignBottom:!0},{heading:__("Add or edit your content","full-site-editing"),description:__("Edit the placeholder content we’ve started you off with, or click the plus sign to add more content.","full-site-editing"),imgSrc:l()},{heading:__("Preview your site as you go","full-site-editing"),description:__("As you edit your site content, click “Preview” to see your site the way your visitors will.","full-site-editing"),imgSrc:h(),alignBottom:!0},{heading:__("Hidden until you’re ready","full-site-editing"),description:__("Your site will remain hidden until launched. Click “Launch” in the toolbar to share it with the world.","full-site-editing"),imgSrc:g(),alignBottom:!0}];return(0,i.createElement)(o.Guide,{className:"wpcom-block-editor-nux",contentLabel:__("Welcome to your website","full-site-editing"),finishButtonText:__("Get started","full-site-editing"),onFinish:function(){var e;(0,c.jN)("calypso_editor_wpcom_nux_dismiss",{is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding}),d(!1,{openedManually:!1})}},p.map((function(e,t){return(0,i.createElement)(v,(0,r.Z)({key:e.heading,pageNumber:t+1,isLastPage:t===p.length-1},e))})))}},8574:function(e,t,n){"use strict";var r=n(3027),i=n(2418),o=(0,r.createElement)(i.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M14.086 5.412l3.476-.015c-.627.625-1.225 1.22-1.82 1.81l-.03.031c-.977.971-1.944 1.934-3.015 3.004l1.06 1.061c1.07-1.07 2.036-2.03 3.013-3.002l.03-.03 1.817-1.808-.03 3.448 1.5.013.046-5.28.007-.759-.76.003-5.301.024.007 1.5zM9.914 18.587l-3.476.016c.627-.625 1.225-1.22 1.82-1.81l.03-.031c.977-.971 1.944-1.934 3.015-3.004l-1.06-1.061c-1.07 1.069-2.036 2.03-3.012 3.001l-.001.001-.03.03-1.817 1.808.03-3.448-1.5-.013-.046 5.279-.007.76.76-.003 5.301-.024-.007-1.5z",fill:"#50575E"}));t.Z=o},6139:function(e,t,n){"use strict";var r=n(3027),i=n(2418),o=(0,r.createElement)(i.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.514 9.988l-3.476.016c.627-.626 1.225-1.22 1.82-1.811l.03-.03v-.001c.977-.971 1.944-1.933 3.015-3.004l-1.06-1.06c-1.07 1.069-2.037 2.03-3.013 3.001l-.03.03-1.818 1.809.03-3.449-1.5-.013-.045 5.28-.007.76.76-.004 5.301-.024-.007-1.5zM5.486 14.012l3.477-.016-1.82 1.811-.03.03c-.977.972-1.945 1.934-3.015 3.005l1.06 1.06c1.07-1.068 2.035-2.03 3.012-3V16.9l.03-.03 1.818-1.809-.03 3.449 1.5.013.046-5.28.006-.76-.76.004-5.3.024.006 1.5z",fill:"#fff"}));t.Z=o},4308:function(e,t,n){"use strict";var r=n(3027),i=n(2418),o=(0,r.createElement)(i.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.131 19.12a.667.667 0 001.227-.417l-.436-4.989h3.88c.954 0 1.64-.916 1.37-1.831L17.42 5.919a.286.286 0 00-.274-.205H9.429v7.588l3.702 5.818zm-5.417-5.977V5.714h-2v7.429h2zm5.98 8a2.381 2.381 0 01-2.01-1.103l-3.297-5.183H4V4h13.145a2 2 0 011.919 1.436l1.753 5.963a3.143 3.143 0 01-3.015 4.03h-2.01l.274 3.125a2.381 2.381 0 01-2.372 2.589z",fill:"#000"}));t.Z=o},9425:function(e,t,n){"use strict";var r=n(3027),i=n(2418),o=(0,r.createElement)(i.SVG,{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/SVG"},(0,r.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.131 4.023a.667.667 0 011.227.416l-.436 4.99h3.88c.954 0 1.64.916 1.37 1.831l-1.753 5.963a.286.286 0 01-.274.206H9.429V9.84l3.702-5.818zM7.714 10v7.428h-2V10h2zm5.98-8c-.814 0-1.572.416-2.01 1.103L8.388 8.286H4v10.857h13.145a2 2 0 001.919-1.436l1.753-5.963a3.143 3.143 0 00-3.015-4.03h-2.01l.274-3.125A2.381 2.381 0 0013.694 2z",fill:"#000"}));t.Z=o},9483:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(3027),i=n(3804),o=n(3163),s=n(2418),u=n(7997),__=o.__;function c(e){var t=e.currentPage,n=e.numberOfPages,s=e.setCurrentPage;return(0,r.createElement)("ul",{className:"components-guide__page-control","aria-label":__("Guide controls","full-site-editing")},(0,i.times)(n,(function(e){return(0,r.createElement)("li",{key:e,"aria-current":e===t?"step":void 0},(0,r.createElement)(u.Button,{key:e,icon:(0,r.createElement)(a,{isSelected:e===t}),"aria-label":(0,o.sprintf)(__("Page %1$d of %2$d","full-site-editing"),e+1,n),onClick:function(){return s(e)}}))})))}var a=function(e){var t=e.isSelected;return(0,r.createElement)(s.SVG,{width:"6",height:"6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(s.Circle,{cx:"3",cy:"3",r:"3",fill:t?"#32373C":"#E1E3E6"}))}},2069:function(e,t,n){"use strict";var r=n(3027),i=(n(8394),n(9483)),o=n(6139),s=n(9425),u=n(4308),c=n(2779),a=n.n(c),l=n(7997),d=n(8565),f=n(5707),p=n(6115),h=n(3163),__=h.__;function m(e){var t=e.cardIndex,n=e.lastCardIndex,o=e.onDismiss,s=e.setCurrentCardIndex,u=__("Start Tour","full-site-editing"),c=__("Next","full-site-editing");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Z,{currentPage:t,numberOfPages:n+1,setCurrentPage:s}),(0,r.createElement)("div",null,0===t?(0,r.createElement)(l.Button,{isTertiary:!0,onClick:function(){return o("no-thanks-btn")}},__("Skip","full-site-editing")):(0,r.createElement)(l.Button,{isTertiary:!0,onClick:function(){return s(t-1)}},__("Back","full-site-editing")),(0,r.createElement)(l.Button,{className:"welcome-tour-card__next-btn",isPrimary:!0,onClick:function(){return s(t+1)}},0===t?u:c)))}function g(e){var t=e.onMinimize,n=e.onDismiss,i=e.slideNumber;return(0,r.createElement)("div",{className:"welcome-tour-card__overlay-controls"},(0,r.createElement)(l.Flex,null,(0,r.createElement)(l.Button,{label:__("Minimize Tour","full-site-editing"),isPrimary:!0,className:"welcome-tour-card__minimize-icon",icon:o.Z,iconSize:24,onClick:function(){var e;t(!0),(0,p.jN)("calypso_editor_wpcom_tour_minimize",{is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding,slide_number:i})}}),(0,r.createElement)(l.Button,{label:__("Close Tour","full-site-editing"),isPrimary:!0,icon:d.Z,iconSize:24,onClick:function(){return n("close-btn")}})))}function v(){var e=!1,t=(0,f.useSelect)((function(e){return e("automattic/wpcom-welcome-guide").getTourRating()})),n=(0,f.useDispatch)("automattic/wpcom-welcome-guide").setTourRating;!e&&t&&(e=!0);var i=function(t){var r;e||(e=!0,n(t?"thumbs-up":"thumbs-down"),(0,p.jN)("calypso_editor_wpcom_tour_rate",{thumbs_up:t,is_gutenboarding:null===(r=window.calypsoifyGutenberg)||void 0===r?void 0:r.isGutenboarding}))};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",{className:"welcome-tour__end-text"},__("Did you find this guide helpful?","full-site-editing")),(0,r.createElement)("div",null,(0,r.createElement)(l.Button,{"aria-label":__("Rate thumbs up","full-site-editing"),className:a()("welcome-tour__end-icon",{active:"thumbs-up"===t}),disabled:e,icon:s.Z,onClick:function(){return i(!0)},iconSize:24}),(0,r.createElement)(l.Button,{"aria-label":__("Rate thumbs down","full-site-editing"),className:a()("welcome-tour__end-icon",{active:"thumbs-down"===t}),disabled:e,icon:u.Z,onClick:function(){return i(!1)},iconSize:24})))}t.Z=function(e){var t,n=e.cardContent,i=e.cardIndex,o=e.justMaximized,s=e.lastCardIndex,u=e.onMinimize,c=e.onDismiss,a=e.setJustMaximized,d=e.setCurrentCardIndex,f=n.description,h=n.heading,w=n.imgSrc,y=i===s;return t=function(){var e;o?a(!1):(0,p.jN)("calypso_editor_wpcom_tour_slide_view",{slide_number:i+1,is_last_slide:y,slide_heading:h,is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding})},(0,r.useEffect)(t,[]),(0,r.createElement)(l.Card,{className:"welcome-tour-card",isElevated:!0},(0,r.createElement)(g,{setJustMaximized:a,onDismiss:c,onMinimize:u,slideNumber:i+1}),(0,r.createElement)(l.CardMedia,null,(0,r.createElement)("img",{alt:__("Editor Welcome Tour","full-site-editing"),src:w})),(0,r.createElement)(l.CardBody,null,(0,r.createElement)("h2",{className:"welcome-tour-card__heading"},h),(0,r.createElement)("p",{className:"welcome-tour-card__description"},f,y?(0,r.createElement)(l.Button,{className:"welcome-tour-card__description",isTertiary:!0,onClick:function(){return d(0)}},__("Restart tour","full-site-editing")):null)),(0,r.createElement)(l.CardFooter,null,y?(0,r.createElement)(v,null):(0,r.createElement)(m,{cardIndex:i,lastCardIndex:s,onDismiss:c,setCurrentCardIndex:d})))}},1227:function(e,t,n){"use strict";var r=n(3027),i=n(3163),o=n(7997),s=n(7498),__=i.__;t.Z=function(e){return[{heading:__("Welcome to WordPress!","full-site-editing"),description:__("Continue on with this short tour to learn the fundamentals of the WordPress editor.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-welcome.png",animation:null},{heading:__("Everything is a block","full-site-editing"),description:__("In the WordPress Editor, paragraphs, images, and videos are all blocks.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-all-blocks.gif",animation:null},{heading:__("Adding a new block","full-site-editing"),description:__("Click + to open the inserter. Then click the block you want to add.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-add-block.gif",animation:"block-inserter"},{heading:__("Click a block to change it","full-site-editing"),description:__("Use the toolbar to change the appearance of a selected block. Try making it bold.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-make-bold.gif",animation:null},{heading:__("More Options","full-site-editing"),description:__("Click the settings icon to see even more options.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-more-options.gif",animation:null},{heading:__("Undo any mistake","full-site-editing"),description:__("Click the Undo button if you've made a mistake.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-undo.gif",animation:"undo-button"},{heading:__("Drag & drop","full-site-editing"),description:__("To move blocks around, click and drag the handle.","full-site-editing"),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-move-block.gif",animation:"undo-button"},{heading:__("Congratulations!","full-site-editing"),description:(0,r.createInterpolateElement)(__("You've learned the basics. Remember, your site is private until you <link_to_launch_site_docs>decide to launch</link_to_launch_site_docs>. View the <link_to_editor_docs>block editing docs</link_to_editor_docs> to learn more.","full-site-editing"),{link_to_launch_site_docs:(0,r.createElement)(o.ExternalLink,{href:(0,s.aq)("https://wordpress.com/support/settings/privacy-settings/#launch-your-site",e)}),link_to_editor_docs:(0,r.createElement)(o.ExternalLink,{href:(0,s.aq)("https://wordpress.com/support/wordpress-editor/",e)})}),imgSrc:"https://s0.wp.com/i/editor-welcome-tour/slide-finish.png",animation:"block-inserter"}]}},2753:function(e,t,n){"use strict";var r=n(3258),i=n(3027),o=n(2069),s=n(1227),u=n(8574),c=(n(8394),n(7997)),a=n(5869),l=n(5707),d=n(6115),f=n(3163),p=n(849),__=f.__;function h(){var e=(0,p.bU)(),t=(0,s.Z)(e),n=(0,i.useState)(!1),u=(0,r.Z)(n,2),c=u[0],a=u[1],f=(0,i.useState)(0),h=(0,r.Z)(f,2),g=h[0],v=h[1],w=(0,i.useState)(!1),y=(0,r.Z)(w,2),_=y[0],b=y[1],C=(0,l.useDispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide;t.forEach((function(e){return(new window.Image).src=e.imgSrc}));return(0,i.createElement)("div",{className:"wpcom-editor-welcome-tour-frame",onMouseDownCapture:function(e){e.preventDefault()}},c?(0,i.createElement)(m,{onMaximize:a,setJustMaximized:b,slideNumber:g+1}):(0,i.createElement)(o.Z,{cardContent:t[g],cardIndex:g,justMaximized:_,key:g,lastCardIndex:t.length-1,onDismiss:function(e){var t;(0,d.jN)("calypso_editor_wpcom_tour_dismiss",{is_gutenboarding:null===(t=window.calypsoifyGutenberg)||void 0===t?void 0:t.isGutenboarding,slide_number:g+1,action:e}),C(!1,{openedManually:!1})},onMinimize:a,setJustMaximized:b,setCurrentCardIndex:v}))}function m(e){var t=e.onMaximize,n=e.setJustMaximized,r=e.slideNumber;return(0,i.createElement)(c.Button,{onClick:function(){var e;t(!1),n(!0),(0,d.jN)("calypso_editor_wpcom_tour_maximize",{is_gutenboarding:null===(e=window.calypsoifyGutenberg)||void 0===e?void 0:e.isGutenboarding,slide_number:r})},className:"wpcom-editor-welcome-tour__resume-btn"},(0,i.createElement)(c.Flex,{gap:13},(0,i.createElement)("p",null,__("Click to resume tutorial","full-site-editing")),(0,i.createElement)(a.Z,{icon:u.Z,size:24})))}t.Z=function(){var e=(0,i.useRef)(document.createElement("div")).current,t=(0,l.useSelect)((function(e){return{show:e("automattic/wpcom-welcome-guide").isWelcomeGuideShown(),isNewPageLayoutModalOpen:e("automattic/starter-page-layouts")&&e("automattic/starter-page-layouts").isOpen(),isManuallyOpened:e("automattic/wpcom-welcome-guide").isWelcomeGuideManuallyOpened()}})),n=t.show,r=t.isNewPageLayoutModalOpen,o=t.isManuallyOpened,u=(0,l.useDispatch)("core/edit-post").closeGeneralSidebar,c=(0,p.bU)();return(new window.Image).src=(0,s.Z)(c)[0].imgSrc,(0,i.useEffect)((function(){n&&u()}),[u,n]),(0,i.useEffect)((function(){var t;if(n||r)return e.classList.add("wpcom-editor-welcome-tour-portal-parent"),document.body.appendChild(e),(0,d.jN)("calypso_editor_wpcom_tour_open",{is_gutenboarding:null===(t=window.calypsoifyGutenberg)||void 0===t?void 0:t.isGutenboarding,is_manually_opened:o}),function(){document.body.removeChild(e)}}),[r,o,n,e]),!n||r?null:(0,i.createElement)("div",null,(0,i.createPortal)((0,i.createElement)(h,null),e))}},6115:function(e,t,n){"use strict";n.d(t,{jN:function(){return r.jN}});n(1694),n(6209),n(9377);var r=n(9792);n(3722)},9377:function(e,t,n){"use strict";"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}))},9792:function(e,t,n){"use strict";n.d(t,{jN:function(){return f}});var r,i=n(9394),o=n(3804),s=(n(3421),n(2699)),u=n(4898),c=(n(6209),n(1694),n(9377),n(9358)),a=["a8c_cookie_banner_ok","wcadmin_storeprofiler_create_jetpack_account","wcadmin_storeprofiler_connect_store","wcadmin_storeprofiler_login_jetpack_account","wcadmin_storeprofiler_payment_login","wcadmin_storeprofiler_payment_create_account","calypso_checkout_switch_to_p_24","calypso_checkout_composite_p24_submit_clicked"];Promise.resolve();function l(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&(0,u.ve)("//stats.wp.com/w.js?63");var d=new s.EventEmitter;function f(e,t){if(t=t||{},(0,c.Z)('Record event "%s" called with props %o',e,t),e.startsWith("calypso_")||(0,o.includes)(a,e)){if(r){var n=r(t);t=(0,i.Z)((0,i.Z)({},t),n)}t=(0,o.omitBy)(t,(function(e){return void 0===e})),(0,c.Z)('Recording event "%s" with actual props %o',e,t),l(["recordEvent",e,t]),d.emit("record-event",e,t)}else(0,c.Z)('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}},3722:function(e,t,n){"use strict";n(9792)},6209:function(e,t,n){"use strict";n(4)},9358:function(e,t,n){"use strict";var r=n(8049),i=n.n(r);t.Z=i()("calypso:analytics")},1694:function(e,t,n){"use strict";n(9358)},4:function(e,t,n){"use strict";n(8032)},849:function(e,t,n){"use strict";n.d(t,{Iw:function(){return l},bU:function(){return f}});var r=n(7560),i=n(3258),o=n(3027),s=n(6141),u=n(1417),c=n(3163),a=(0,s.createContext)(null),l=function(e){var t=e.children,n=e.localeSlug;return(0,o.createElement)(a.Provider,{value:n},t)};function d(){var e,t;return null===(e=c.getLocaleData())||void 0===e||null===(t=e[""])||void 0===t?void 0:t.language}function f(){var e=(0,s.useContext)(a),t=!!e,n=(0,s.useState)(d()),r=(0,i.Z)(n,2),o=r[0],u=r[1];return(0,s.useEffect)((function(){if(!t)return u(d()),c.subscribe((function(){u(d())}))}),[t]),e||o||"en"}(0,u.createHigherOrderComponent)((function(e){return function(t){var n=f();return(0,o.createElement)(e,(0,r.Z)({locale:n},t))}}),"withLocale")},4655:function(e,t,n){"use strict";n.d(t,{OP:function(){return r},GG:function(){return i},iT:function(){return o},xn:function(){return s},Xb:function(){return u},hI:function(){return c},mL:function(){return a},vS:function(){return l},_r:function(){return d}});var r="en",i=["en","ja","es","pt","fr","pt-br"],o=["en","fr","de"],s=["en","fr","de"],u={"pt-br":"br",br:"bre",zh:"zh-cn","zh-hk":"zh-tw","zh-sg":"zh-cn",kr:"ko"},c=["ar","de","en","es","fr","he","id","it","ja","ko","nl","pt-br","ru","sv","tr","zh-cn","zh-tw"],a=["ar","de","el","en","es","fa","fi","fr","id","it","ja","nl","pt","pt-br","ru","sv","th","tl","tr"],l=["es","pt-br","de","fr","he","ja","it","nl","ru","tr","id","zh-cn","zh-tw","ko","ar","sv"],d=["en","ar","de","es","fr","he","id","it","ja","ko","nl","pt-br","ro","ru","sv","tr","zh-cn","zh-tw"]},7498:function(e,t,n){"use strict";n.d(t,{aq:function(){return h}});var r=n(7560),i=n(3027),o=n(6141),s=n(1417),u=n(849),c=n(4655),a="http://__domain__.invalid",l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n,r){return t.includes(r)&&"en"!==r&&n.pathname.substr(0,r.length+2)!=="/"+r+"/"&&(n.host="".concat(c.Xb[r]||r,".").concat(e)),n}},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(r,i){return r.host="wordpress.com","object"==typeof n&&n instanceof RegExp&&!n.test(r.pathname)&&(t=[]),r.pathname=e+r.pathname,t.includes(i)&&"en"!==i&&(r.pathname=i+r.pathname),r}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){return"object"==typeof t&&t instanceof RegExp&&!t.test(n.pathname)||e.includes(r)&&"en"!==r&&(n.pathname=r+n.pathname),n}},p={"wordpress.com/support/":f(c.hI),"wordpress.com/forums/":f(c.mL),"wordpress.com/blog/":f(c.GG,/^\/blog\/?$/),"wordpress.com/tos/":f(c.vS),"wordpress.com/wp-admin/":l("wordpress.com",c.vS),"wordpress.com/wp-login.php":l("wordpress.com",c.vS),"jetpack.com":l("jetpack.com",c._r),"en.support.wordpress.com":d("/support",c.hI),"en.blog.wordpress.com":d("/blog",c.GG,/^\/$/),"en.forums.wordpress.com":d("/forums",c.mL),"automattic.com/privacy/":f(c.iT),"automattic.com/cookies/":f(c.xn),"wordpress.com/help/contact/":function(e,t,n){return n?e:(e.pathname=e.pathname.replace(/\/help\//,"/support/"),f(c.hI)(e,t))},"wordpress.com":function(e,t){return/^\/(checkout|me)(\/|$)/.test(e.pathname)||/\/([a-z0-9-]+\.)+[a-z]{2,}\/?$/.test(e.pathname)?e:f(c.vS)(e,t)}};function h(e,t){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];try{n=new URL(String(e),a)}catch(u){return e}if(n.origin===a)return e;n.protocol="https:",n.hostname="",n.pathname.endsWith(".php")||(n.pathname=(n.pathname+"/").replace(/\/+$/,"/"));var i=n.pathname.substr(0,1+n.pathname.indexOf("/",1));if("en.wordpress.com"===n.host&&(n.host="wordpress.com"),"/"+t+"/"===i)return e;for(var o=[n.host,n.host+i,n.host+n.pathname],s=o.length-1;s>=0;s--)if(o[s]in p)return p[o[s]](n,t,r).href;return e}function m(){var e=(0,u.bU)();return(0,o.useCallback)((function(t,n,r){return h(t,n||e,r)}),[e])}(0,s.createHigherOrderComponent)((function(e){return function(t){var n=m();return(0,i.createElement)(e,(0,r.Z)({localizeUrl:n},t))}}),"withLocalizeUrl")},3340:function(e,t,n){"use strict";n.d(t,{hg:function(){return u},lZ:function(){return c},_W:function(){return l},Yt:function(){return d}});var r=n(8049),i=n.n(r)()("lib/load-script/callback-handler"),o=new Map;function s(){return o}function u(e){return s().has(e)}function c(e,t){var n=s();u(e)?(i('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(i('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=s(),r=n.get(e);if(r){var o='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));i(o),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function l(){var e=this.getAttribute("src");i('Handling successful request for "'.concat(e,'"')),a(e),this.onload=null}function d(){var e=this.getAttribute("src");i('Handling failed request for "'.concat(e,'"')),a(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}},5606:function(e,t,n){"use strict";n.d(t,{C:function(){return u},k:function(){return c}});var r=n(8049),i=n.n(r),o=n(3340),s=i()("lib/load-script/dom-operations");function u(e){s('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=o._W,t.onerror=o.Yt,t}function c(e){s("Attaching element to head"),document.head.appendChild(e)}},4898:function(e,t,n){"use strict";n.d(t,{ve:function(){return u}});var r=n(8049),i=n.n(r),o=n(3340),s=n(5606);i()("package/load-script");function u(e,t){if(!(0,o.hg)(e)&&(0,s.k)((0,s.C)(e)),"function"!=typeof t)return new Promise((function(t,n){(0,o.lZ)(e,(function(e){null===e?t():n(e)}))}));(0,o.lZ)(e,t)}},8049:function(e,t,n){var r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(2632)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},2632:function(e,t,n){var r=n(5182);e.exports=function(e){function t(e){var n,r,o,s=null;function u(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(u.enabled){var o=u,s=Number(new Date),c=s-(n||s);o.diff=c,o.prev=n,o.curr=s,n=s,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return"%";a++;var i=t.formatters[n];if("function"==typeof i){var s=r[a];e=i.call(o,s),r.splice(a,1),a--}return e})),t.formatArgs.call(o,r);var l=o.log||t.log;l.apply(o,r)}}return u.namespace=e,u.useColors=t.useColors(),u.color=t.selectColor(e),u.extend=i,u.destroy=t.destroy,Object.defineProperty(u,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(u),u}function i(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(r(t.names.map(o)),r(t.skips.map(o).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},9931:function(e,t,n){e.exports=n.p+"images/block-picker-53b676a08dd25f523d4adb0157a40b4c.svg"},1467:function(e,t,n){e.exports=n.p+"images/editor-1a0c404dcc59d4a340edb4649127f4c9.svg"},7828:function(e,t,n){e.exports=n.p+"images/preview-a2ab6dbfd49f58a76c13c9dab8b09e0e.svg"},7397:function(e,t,n){e.exports=n.p+"images/private-598e2a26fcb0c685d165d750fdf02364.svg"},6141:function(e){"use strict";e.exports=window.React},8681:function(e){"use strict";e.exports=window["a8c-fse-common-data-stores"]},3804:function(e){"use strict";e.exports=window.lodash},7606:function(e){"use strict";e.exports=window.wp.apiFetch},7997:function(e){"use strict";e.exports=window.wp.components},1417:function(e){"use strict";e.exports=window.wp.compose},5707:function(e){"use strict";e.exports=window.wp.data},9866:function(e){"use strict";e.exports=window.wp.dataControls},3027:function(e){"use strict";e.exports=window.wp.element},3163:function(e){"use strict";e.exports=window.wp.i18n},5742:function(e){"use strict";e.exports=window.wp.nux},1200:function(e){"use strict";e.exports=window.wp.plugins},2418:function(e){"use strict";e.exports=window.wp.primitives}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e}();var r={};!function(){"use strict";n.r(r);var e=n(1970);n(1568),n(7869);(0,e.z2)()}(),window.EditingToolkit=r}();
|
wpcom-block-editor-nux/src/block-editor-nux.js
CHANGED
@@ -16,17 +16,26 @@ import { LocaleProvider, i18nDefaultLocaleSlug } from '@automattic/i18n-utils';
|
|
16 |
*/
|
17 |
import LaunchWpcomWelcomeTour from './welcome-tour/tour-launch';
|
18 |
import WpcomNux from './welcome-modal/wpcom-nux';
|
|
|
19 |
|
20 |
registerPlugin( 'wpcom-block-editor-nux', {
|
21 |
render: function WpcomBlockEditorNux() {
|
22 |
-
const { show,
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
const { fetchWelcomeGuideStatus } = useDispatch( 'automattic/wpcom-welcome-guide' );
|
32 |
|
@@ -41,7 +50,14 @@ registerPlugin( 'wpcom-block-editor-nux', {
|
|
41 |
return null;
|
42 |
}
|
43 |
|
44 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
return (
|
46 |
<LocaleProvider localeSlug={ window.wpcomBlockEditorNuxLocale ?? i18nDefaultLocaleSlug }>
|
47 |
<LaunchWpcomWelcomeTour />;
|
16 |
*/
|
17 |
import LaunchWpcomWelcomeTour from './welcome-tour/tour-launch';
|
18 |
import WpcomNux from './welcome-modal/wpcom-nux';
|
19 |
+
import { DEFAULT_VARIANT, BLANK_CANVAS_VARIANT } from './store';
|
20 |
|
21 |
registerPlugin( 'wpcom-block-editor-nux', {
|
22 |
render: function WpcomBlockEditorNux() {
|
23 |
+
const { show, isLoaded, variant, isManuallyOpened, isNewPageLayoutModalOpen } = useSelect(
|
24 |
+
( select ) => {
|
25 |
+
const welcomeGuideStoreSelect = select( 'automattic/wpcom-welcome-guide' );
|
26 |
+
const starterPageLayoutsStoreSelect = select( 'automattic/starter-page-layouts' );
|
27 |
+
return {
|
28 |
+
show: welcomeGuideStoreSelect.isWelcomeGuideShown(),
|
29 |
+
isLoaded: welcomeGuideStoreSelect.isWelcomeGuideStatusLoaded(),
|
30 |
+
variant: welcomeGuideStoreSelect.getWelcomeGuideVariant(),
|
31 |
+
isManuallyOpened: welcomeGuideStoreSelect.isWelcomeGuideManuallyOpened(),
|
32 |
+
isNewPageLayoutModalOpen: starterPageLayoutsStoreSelect?.isOpen(), // Handle the case where SPT is not initalized.
|
33 |
+
};
|
34 |
+
},
|
35 |
+
[]
|
36 |
+
);
|
37 |
+
|
38 |
+
const { setOpenState } = useDispatch( 'automattic/starter-page-layouts' );
|
39 |
|
40 |
const { fetchWelcomeGuideStatus } = useDispatch( 'automattic/wpcom-welcome-guide' );
|
41 |
|
50 |
return null;
|
51 |
}
|
52 |
|
53 |
+
// Open patterns panel before Welcome Tour if necessary (e.g. when using Blank Canvas theme)
|
54 |
+
// Do this only when Welcome Tour is not manually opened.
|
55 |
+
if ( variant === BLANK_CANVAS_VARIANT && ! isManuallyOpened ) {
|
56 |
+
setOpenState( 'OPEN_FOR_BLANK_CANVAS' );
|
57 |
+
return null;
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( variant === DEFAULT_VARIANT ) {
|
61 |
return (
|
62 |
<LocaleProvider localeSlug={ window.wpcomBlockEditorNuxLocale ?? i18nDefaultLocaleSlug }>
|
63 |
<LaunchWpcomWelcomeTour />;
|
wpcom-block-editor-nux/src/store.js
CHANGED
@@ -6,6 +6,9 @@ import apiFetch from '@wordpress/api-fetch';
|
|
6 |
import { apiFetch as apiFetchControls, controls } from '@wordpress/data-controls';
|
7 |
import { combineReducers, registerStore } from '@wordpress/data';
|
8 |
|
|
|
|
|
|
|
9 |
const showWelcomeGuideReducer = ( state = undefined, action ) => {
|
10 |
switch ( action.type ) {
|
11 |
case 'WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS':
|
@@ -47,12 +50,14 @@ const tourRatingReducer = ( state = undefined, action ) => {
|
|
47 |
}
|
48 |
};
|
49 |
|
50 |
-
const welcomeGuideVariantReducer = ( state =
|
51 |
switch ( action.type ) {
|
52 |
case 'WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS':
|
53 |
return action.response.variant;
|
|
|
|
|
54 |
case 'WPCOM_WELCOME_GUIDE_RESET_STORE':
|
55 |
-
return
|
56 |
default:
|
57 |
return state;
|
58 |
}
|
@@ -90,6 +95,9 @@ const actions = {
|
|
90 |
setTourRating: ( tourRating ) => {
|
91 |
return { type: 'WPCOM_WELCOME_GUIDE_TOUR_RATING_SET', tourRating };
|
92 |
},
|
|
|
|
|
|
|
93 |
// The `resetStore` action is only used for testing to reset the
|
94 |
// store inbetween tests.
|
95 |
resetStore: () => ( {
|
6 |
import { apiFetch as apiFetchControls, controls } from '@wordpress/data-controls';
|
7 |
import { combineReducers, registerStore } from '@wordpress/data';
|
8 |
|
9 |
+
export const DEFAULT_VARIANT = 'tour';
|
10 |
+
export const BLANK_CANVAS_VARIANT = 'blank-canvas-tour';
|
11 |
+
|
12 |
const showWelcomeGuideReducer = ( state = undefined, action ) => {
|
13 |
switch ( action.type ) {
|
14 |
case 'WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS':
|
50 |
}
|
51 |
};
|
52 |
|
53 |
+
const welcomeGuideVariantReducer = ( state = DEFAULT_VARIANT, action ) => {
|
54 |
switch ( action.type ) {
|
55 |
case 'WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS':
|
56 |
return action.response.variant;
|
57 |
+
case 'WPCOM_HAS_USED_PATTERNS_MODAL':
|
58 |
+
return state === BLANK_CANVAS_VARIANT ? DEFAULT_VARIANT : state;
|
59 |
case 'WPCOM_WELCOME_GUIDE_RESET_STORE':
|
60 |
+
return DEFAULT_VARIANT;
|
61 |
default:
|
62 |
return state;
|
63 |
}
|
95 |
setTourRating: ( tourRating ) => {
|
96 |
return { type: 'WPCOM_WELCOME_GUIDE_TOUR_RATING_SET', tourRating };
|
97 |
},
|
98 |
+
setUsedPageOrPatternsModal: () => {
|
99 |
+
return { type: 'WPCOM_HAS_USED_PATTERNS_MODAL' };
|
100 |
+
},
|
101 |
// The `resetStore` action is only used for testing to reset the
|
102 |
// store inbetween tests.
|
103 |
resetStore: () => ( {
|
wpcom-block-editor-nux/src/test/store.test.js
CHANGED
@@ -7,7 +7,7 @@ import waitForExpect from 'wait-for-expect';
|
|
7 |
* Internal dependencies
|
8 |
*/
|
9 |
import { dispatch, select } from '@wordpress/data';
|
10 |
-
import { register } from '../store';
|
11 |
|
12 |
const STORE_KEY = 'automattic/wpcom-welcome-guide';
|
13 |
|
@@ -45,7 +45,7 @@ test( 'resetting the store', async () => {
|
|
45 |
expect( select( STORE_KEY ).isWelcomeGuideShown() ).toBe( false );
|
46 |
expect( select( STORE_KEY ).isWelcomeGuideStatusLoaded() ).toBe( false );
|
47 |
expect( select( STORE_KEY ).getTourRating() ).toBeUndefined();
|
48 |
-
expect( select( STORE_KEY ).getWelcomeGuideVariant() ).toBe(
|
49 |
} );
|
50 |
|
51 |
test( "by default the store isn't loaded", () => {
|
@@ -56,7 +56,7 @@ test( "by default the store isn't loaded", () => {
|
|
56 |
test( 'after fetching the guide status the store is loaded', async () => {
|
57 |
window.fetch.mockResolvedValue( {
|
58 |
status: 200,
|
59 |
-
json: () => Promise.resolve( { show_welcome_guide: true, variant:
|
60 |
} );
|
61 |
|
62 |
dispatch( STORE_KEY ).fetchWelcomeGuideStatus();
|
@@ -75,7 +75,7 @@ test( 'after fetching the guide status the store is loaded', async () => {
|
|
75 |
const isWelcomeGuideShown = select( STORE_KEY ).isWelcomeGuideShown();
|
76 |
expect( isWelcomeGuideShown ).toBe( true );
|
77 |
const welcomeGuideVariant = select( STORE_KEY ).getWelcomeGuideVariant();
|
78 |
-
expect( welcomeGuideVariant ).toBe(
|
79 |
} );
|
80 |
|
81 |
test( 'toggle welcome guide visibility', () => {
|
7 |
* Internal dependencies
|
8 |
*/
|
9 |
import { dispatch, select } from '@wordpress/data';
|
10 |
+
import { register, DEFAULT_VARIANT } from '../store';
|
11 |
|
12 |
const STORE_KEY = 'automattic/wpcom-welcome-guide';
|
13 |
|
45 |
expect( select( STORE_KEY ).isWelcomeGuideShown() ).toBe( false );
|
46 |
expect( select( STORE_KEY ).isWelcomeGuideStatusLoaded() ).toBe( false );
|
47 |
expect( select( STORE_KEY ).getTourRating() ).toBeUndefined();
|
48 |
+
expect( select( STORE_KEY ).getWelcomeGuideVariant() ).toBe( DEFAULT_VARIANT );
|
49 |
} );
|
50 |
|
51 |
test( "by default the store isn't loaded", () => {
|
56 |
test( 'after fetching the guide status the store is loaded', async () => {
|
57 |
window.fetch.mockResolvedValue( {
|
58 |
status: 200,
|
59 |
+
json: () => Promise.resolve( { show_welcome_guide: true, variant: DEFAULT_VARIANT } ),
|
60 |
} );
|
61 |
|
62 |
dispatch( STORE_KEY ).fetchWelcomeGuideStatus();
|
75 |
const isWelcomeGuideShown = select( STORE_KEY ).isWelcomeGuideShown();
|
76 |
expect( isWelcomeGuideShown ).toBe( true );
|
77 |
const welcomeGuideVariant = select( STORE_KEY ).getWelcomeGuideVariant();
|
78 |
+
expect( welcomeGuideVariant ).toBe( DEFAULT_VARIANT );
|
79 |
} );
|
80 |
|
81 |
test( 'toggle welcome guide visibility', () => {
|
wpcom-block-editor-nux/src/welcome-tour/tour-launch.js
CHANGED
@@ -21,7 +21,7 @@ function LaunchWpcomWelcomeTour() {
|
|
21 |
const portalParent = useRef( document.createElement( 'div' ) ).current;
|
22 |
const { show, isNewPageLayoutModalOpen, isManuallyOpened } = useSelect( ( select ) => ( {
|
23 |
show: select( 'automattic/wpcom-welcome-guide' ).isWelcomeGuideShown(),
|
24 |
-
// Handle the case where the new page
|
25 |
isNewPageLayoutModalOpen:
|
26 |
select( 'automattic/starter-page-layouts' ) &&
|
27 |
select( 'automattic/starter-page-layouts' ).isOpen(),
|
21 |
const portalParent = useRef( document.createElement( 'div' ) ).current;
|
22 |
const { show, isNewPageLayoutModalOpen, isManuallyOpened } = useSelect( ( select ) => ( {
|
23 |
show: select( 'automattic/wpcom-welcome-guide' ).isWelcomeGuideShown(),
|
24 |
+
// Handle the case where the new page pattern modal is initialized and open
|
25 |
isNewPageLayoutModalOpen:
|
26 |
select( 'automattic/starter-page-layouts' ) &&
|
27 |
select( 'automattic/starter-page-layouts' ).isOpen(),
|