Full Site Editing - Version 3.2913

Version Description

Download this release

Release Info

Developer philipmjackson
Plugin Icon wp plugin Full Site Editing
Version 3.2913
Comparing to
See all releases

Code changes from version 3.2798 to 3.2913

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.2798
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.2798' );
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.2913
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.2913' );
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.2798
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.2913
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', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill'), 'version' => '0b7c57c73f7b388b15a29b88081b2117');
1
+ <?php return array('dependencies' => array('lodash', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill'), 'version' => 'c05beaa8c52c751a5b9c78b55a08b81f');
starter-page-templates/dist/starter-page-templates.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e={357:function(e,t,n){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}})},507:function(e,t,n){function r(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return r}})},989:function(e,t,n){function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},659:function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},730:function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{Z:function(){return o}})},54:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(237);function o(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw i}}}}},49:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(630),o=n(733),a=n(591);function i(e){var t=(0,o.Z)();return function(){var n,o=(0,r.Z)(e);if(t){var i=(0,r.Z)(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return(0,a.Z)(this,n)}}},119:function(e,t,n){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}})},630:function(e,t,n){function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,{Z:function(){return r}})},663:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(938);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,r.Z)(e,t)}},733:function(e,t,n){function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return r}})},483:function(e,t,n){function r(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(l){r=!0,o=l}finally{try{_n||null==i.return||i.return()}finally{if(r)throw o}}return n}}n.d(t,{Z:function(){return r}})},7:function(e,t,n){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}})},394:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(119);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},530:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(283);function o(e,t){if(null==e)return{};var n,o,a=(0,r.Z)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},283:function(e,t,n){function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{Z:function(){return r}})},591:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(929),o=n(989);function a(e,t){return!t||"object"!==(0,r.Z)(t)&&"function"!=typeof t?(0,o.Z)(e):t}},938:function(e,t,n){function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{Z:function(){return r}})},258:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(507),o=n(483),a=n(237),i=n(7);function l(e,t){return(0,r.Z)(e)||(0,o.Z)(e,t)||(0,a.Z)(e,t)||(0,i.Z)()}},929:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,{Z:function(){return r}})},237:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(357);function o(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}}},580:function(){},166:function(e,t,n){n.d(t,{O:function(){return s}});var r=n(394),o=(n(742),n(417)),a=n(707),i=n(799),l=n(577),c="isInsertingPageTemplate",u="automattic/full-site-editing/inserting-template",s=(0,o.compose)((0,a.withSelect)((function(e){var t=e("automattic/starter-page-layouts").isOpen,n=e("core/editor").getBlocks();return{isOpen:t(),getMeta:function(){return e("core/editor").getEditedPostAttribute("meta")},currentPostTitle:e("core/editor").getCurrentPost().title,postContentBlock:n.find((function(e){return"a8c/post-content"===e.name})),isWelcomeGuideActive:e("core/edit-post").isFeatureActive("welcomeGuide"),areTipsEnabled:!!e("core/nux")&&e("core/nux").areTipsEnabled()}})),(0,a.withDispatch)((function(e,t){var n=e("core/editor");return{setOpenState:e("automattic/starter-page-layouts").setOpenState,saveTemplateChoice:function(e){var o=t.getMeta();n.editPost({meta:(0,r.Z)((0,r.Z)({},o),{},{_starter_page_template:e})})},insertTemplate:function(r,o){(0,i.addFilter)(c,u,(function(){return!0})),r&&n.editPost({title:r});var a=t.postContentBlock;e("core/block-editor").replaceInnerBlocks(a?a.clientId:"",o,!1),(0,i.removeFilter)(c,u)},hideWelcomeGuide:function(){t.isWelcomeGuideActive?e("core/edit-post").toggleFeature("welcomeGuide"):t.areTipsEnabled&&e("core/nux").disableTips()}}})))(l.Z)},791:function(e,t,n){var r=n(530),o=n(707);(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}}})},577:function(e,t,n){var r=n(258),o=n(54),a=n(659),i=n(730),l=n(989),c=n(663),u=n(49),s=n(119),p=n(27),f=n(804),d=n(163),m=n(997),g=n(314),v=n(417),y=n(934),b=n(998),h=n(818),_=n(541),w=n(43),Z=n(68),__=d.__,O=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var r;return(0,a.Z)(this,n),r=t.call(this,e),(0,s.Z)((0,l.Z)(r),"getBlocksByTemplateSlugs",(0,f.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,h.Z)(o,r.props.siteInformation)):[],e}),{});return r.filterTemplatesWithMissingBlocks(t)}))),(0,s.Z)((0,l.Z)(r),"getBlocksForSelection",(function(e){var t=r.getBlocksByTemplateSlug(e);return(0,_.Z)(t,(function(e){return"core/button"===e.name&&void 0!==e.attributes.url&&(e.attributes.url="#"),e}))})),(0,s.Z)((0,l.Z)(r),"setTemplate",(function(e){if((0,b.E2)(e),r.props.saveTemplateChoice(e),"blank"===e)return r.props.insertTemplate("",[]),void r.props.setOpenState(!1);var t=r.props.templates.find((function(t){return t.name===e})),n=(t.categories||{}).hasOwnProperty("home"),o=r.getBlocksForSelection(e),a=n?null:t.title||"";o&&o.length?(r.props.insertTemplate(a,o),r.props.setOpenState(!1)):r.props.setOpenState(!1)})),(0,s.Z)((0,l.Z)(r),"handleCategorySelection",(function(e){r.setState({selectedCategory:e})})),(0,s.Z)((0,l.Z)(r),"closeModal",(function(){(0,b.GI)(),r.props.setOpenState(!1)})),(0,s.Z)((0,l.Z)(r),"getTemplateGroups",(function(){if(!r.props.templates.length)return null;var e,t={},n=(0,o.Z)(r.props.templates);try{for(n.s();!(e=n.n()).done;){var a=e.value;for(var i in a.categories)i in t||(t[i]=a.categories[i])}}catch(l){n.e(l)}finally{n.f()}return(0,Z.x)(["featured","about","blog","home","gallery","services","contact"],t)})),(0,s.Z)((0,l.Z)(r),"getTemplatesForGroup",(function(e){if(!r.props.templates.length)return null;if("blank"===e)return[{name:"blank",title:"Blank",html:""}];var t,n=[],a=(0,o.Z)(r.props.templates);try{for(a.s();!(t=a.n()).done;){var i=t.value;for(var l in i.categories)l===e&&n.push(i)}}catch(c){a.e(c)}finally{a.f()}return n})),(0,s.Z)((0,l.Z)(r),"getTemplateCategories",(function(){var e=r.getTemplateGroups();if(!e)return null;var t=[];for(var n in e)t.push({slug:n,name:e[n].title});return t})),(0,s.Z)((0,l.Z)(r),"renderTemplateGroup",(function(e,t){var n=r.getTemplatesForGroup(e);return n.length?r.renderTemplatesList(n,t):null})),(0,s.Z)((0,l.Z)(r),"renderTemplatesList",(function(e,t){if(!e.length)return null;var n,o=r.getBlocksByTemplateSlugs(r.props.templates),a=Object.keys(o),i=(n=a,e.filter((function(e){return n.includes(e.name)})));return i.length?(0,p.createElement)(y.Z,{label:__("Layout","full-site-editing"),legendLabel:t,templates:i,onTemplateSelect:r.setTemplate,theme:r.props.theme,locale:r.props.locale,siteInformation:r.props.siteInformation}):null})),r.state={selectedCategory:r.getDefaultSelectedCategory()},r}return(0,i.Z)(n,[{key:"filterTemplatesWithMissingBlocks",value:function(e){return Object.entries(e).reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0],a=n[1];return(0,w.Z)(a)&&a.length||(e[o]=a),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,b.Fk)("add-page")}},{key:"getDefaultSelectedCategory",value:function(){var e=this.getTemplateCategories();return null!=e&&e.length?e[0].slug:null}},{key:"getBlocksByTemplateSlug",value:function(e){var t,n;return null!==(t=null===(n=this.getBlocksByTemplateSlugs(this.props.templates))||void 0===n?void 0:n[e])&&void 0!==t?t:[]}},{key:"render",value:function(){var e,t=this,n=this.state.selectedCategory,r=this.props,o=r.isOpen,a=r.instanceId;return o?(0,p.createElement)(m.Modal,{className:"page-template-modal",onRequestClose:this.closeModal,aria:{labelledby:"page-template-modal__heading-".concat(a),describedby:"page-template-modal__description-".concat(a)}},(0,p.createElement)("div",{className:"page-template-modal__inner"},(0,p.createElement)("div",{className:"page-template-modal__sidebar"},(0,p.createElement)("h1",{id:"page-template-modal__heading-".concat(a),className:"page-template-modal__heading"},__("Add a page","full-site-editing")),(0,p.createElement)("p",{id:"page-template-modal__description-".concat(a),className:"page-template-modal__description"},__("Pick a pre-defined layout or start with a blank page.","full-site-editing")),(0,p.createElement)("div",{className:"page-template-modal__button-container"},(0,p.createElement)(m.Button,{isSecondary:!0,onClick:function(){return t.setTemplate("blank")},className:"page-template-modal__blank-button"},__("Blank page","full-site-editing")),(0,p.createElement)("select",{className:"page-template-modal__mobile-category-dropdown",value:n,onChange:function(e){return t.handleCategorySelection(e.currentTarget.value)}},this.getTemplateCategories().map((function(e){var t=e.slug,n=e.name;return(0,p.createElement)("option",{key:t,value:t},n)})))),(0,p.createElement)(m.VisuallyHidden,{as:"h2",id:"page-template-modal__list-heading-".concat(a)},__("Page categories","full-site-editing")),(0,p.createElement)(m.NavigableMenu,{className:"page-template-modal__category-list",orientation:"vertical","aria-labelledby":"page-template-modal__list-heading-".concat(a),onNavigate:function(e,n){return t.handleCategorySelection(n.dataset.slug)}},this.getTemplateCategories().map((function(e){var r=e.slug,o=e.name;return(0,p.createElement)(m.MenuItem,{key:r,isTertiary:!0,"aria-selected":r===n,"data-slug":r,onClick:function(){return t.handleCategorySelection(r)},className:"page-template-modal__category-button",tabIndex:r===n?null:-1},(0,p.createElement)("span",{className:"page-template-modal__category-item-selection-wrapper"},o))})))),(0,p.createElement)("div",{className:"page-template-modal__template-list-container"},this.renderTemplateGroup(n,null===(e=this.getTemplateGroups()[n])||void 0===e?void 0:e.title)))):null}}]),n}(p.Component);t.Z=(0,v.withInstanceId)(O)},934:function(e,t,n){var r=n(27),o=n(997),a=n(364),i=n(818),l=function(){};t.Z=(0,r.memo)((function(e){var t=e.label,n=e.legendLabel,c=e.templates,u=void 0===c?[]:c,s=e.theme,p=void 0===s?"maywood":s,f=e.locale,d=void 0===f?"en":f,m=e.onTemplateSelect,g=void 0===m?l:m,v=e.siteInformation,y=void 0===v?{}:v;return Array.isArray(u)&&u.length?(0,r.createElement)(o.BaseControl,{label:t,className:"template-selector-control"},(0,r.createElement)("ul",{className:"template-selector-control__options","data-testid":"template-selector-control-options","aria-label":n},u.map((function(e){var t=e.ID,o=e.name,l=e.title,c=e.description;return(0,r.createElement)("li",{key:"".concat(t,"-").concat(o,"-").concat(n),className:"template-selector-control__template"},(0,r.createElement)(a.Z,{value:o,title:(0,i.Z)(l,y),description:c,onSelect:g,templatePostID:t,theme:p,locale:d}))})))):null}))},364:function(e,t,n){var r=n(27);t.Z=function(e){var t=e.value,n=e.onSelect,o=e.title,a=e.description,i=e.theme,l=e.locale,c=e.templatePostID,u=void 0===c?null:c;if(null==o||null==t)return null;var s="".concat("https://public-api.wordpress.com/rest/v1/template/demo/").concat(encodeURIComponent(i),"/").concat(encodeURIComponent("dotcompatterns.wordpress.com"),"/?post_id=").concat(encodeURIComponent(u),"&language=").concat(encodeURIComponent(l)),p="https://s0.wordpress.com/mshots/v1/"+encodeURIComponent(s)+"?vpw=1024&vph=1024&w=660&h=430",f=(0,r.createElement)("img",{className:"template-selector-item__media",src:p,alt:o,onLoad:function(e){var t=e.target;-1===t.src.indexOf("reload=1")&&setTimeout((function(){t.src=t.src+"&reload=1"}),1e4)}});return(0,r.createElement)("button",{type:"button",className:"template-selector-item__label",value:t,onClick:function(){return n(t)}},(0,r.createElement)("span",{className:"template-selector-item__preview-wrap"},f),a)}},43:function(e,t){t.Z=function e(t){return!!t.find((function(t){return"core/missing"===t.name||!(!t.innerBlocks||!t.innerBlocks.length)&&e(t.innerBlocks)}))}},68:function(e,t,n){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}})},541:function(e,t,n){var r=n(314);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}))}},818:function(e,t,n){var r=n(163),_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")},a={CompanyName:"title",Address:"address",Phone:"phone",Vertical:"vertical"};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=o[n];return t[a[n]]||r||n})):""}},998:function(e,t,n){n.d(t,{Z:function(){return o},Fk:function(){return a},GI:function(){return i},E2:function(){return l}}),window._tkq=window._tkq||[];var r=null,o=function(e){r=e,window._tkq.push(["identifyUser",e.userid,e.username])},a=function(e){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_view",{blog_id:r.blogid,source:e}])},i=function(){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_dismiss",{blog_id:r.blogid}])},l=function(e){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_template_selected",{blog_id:r.blogid,template:e}])}},804:function(e){e.exports=window.lodash},314:function(e){e.exports=window.wp.blocks},997:function(e){e.exports=window.wp.components},417:function(e){e.exports=window.wp.compose},707:function(e){e.exports=window.wp.data},27:function(e){e.exports=window.wp.element},799:function(e){e.exports=window.wp.hooks},163:function(e){e.exports=window.wp.i18n},742:function(e){e.exports=window.wp.nux},200:function(e){e.exports=window.wp.plugins}},t={};function n(r){if(t[r])return t[r].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.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(){n.r(r);var e=n(27),t=n(200),o=n(707),a=n(998),i=n(166),l=(n(791),n(580),window.starterPageTemplatesConfig),c=l.templates,u=void 0===c?[]:c,s=l.tracksUserData,p=l.screenAction,f=l.theme,d=l.locale;s&&(0,a.Z)(s),"add"===p&&(0,o.dispatch)("automattic/starter-page-layouts").setOpenState("OPEN_FROM_ADD_PAGE"),(0,t.registerPlugin)("page-templates",{render:function(){return(0,e.createElement)(i.O,{templates:u,theme:f,locale:d})}})}();var o=window;for(var a in r)o[a]=r[a];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})}();
1
+ !function(){"use strict";var e={357:function(e,t,n){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}})},507:function(e,t,n){function r(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return r}})},989:function(e,t,n){function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},659:function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},730:function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{Z:function(){return o}})},54:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(237);function o(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw i}}}}},49:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(630),o=n(733),a=n(591);function i(e){var t=(0,o.Z)();return function(){var n,o=(0,r.Z)(e);if(t){var i=(0,r.Z)(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return(0,a.Z)(this,n)}}},119:function(e,t,n){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}})},560:function(e,t,n){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}})},630:function(e,t,n){function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,{Z:function(){return r}})},663:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(938);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,r.Z)(e,t)}},733:function(e,t,n){function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return r}})},483:function(e,t,n){function r(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(l){r=!0,o=l}finally{try{_n||null==i.return||i.return()}finally{if(r)throw o}}return n}}n.d(t,{Z:function(){return r}})},7:function(e,t,n){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}})},394:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(119);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},530:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(283);function o(e,t){if(null==e)return{};var n,o,a=(0,r.Z)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},283:function(e,t,n){function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{Z:function(){return r}})},591:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(929),o=n(989);function a(e,t){return!t||"object"!==(0,r.Z)(t)&&"function"!=typeof t?(0,o.Z)(e):t}},938:function(e,t,n){function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{Z:function(){return r}})},258:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(507),o=n(483),a=n(237),i=n(7);function l(e,t){return(0,r.Z)(e)||(0,o.Z)(e,t)||(0,a.Z)(e,t)||(0,i.Z)()}},929:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,{Z:function(){return r}})},237:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(357);function o(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}}},580:function(){},774:function(e,t,n){n.d(t,{O:function(){return p}});var r=n(560),o=n(394),a=n(27),i=(n(742),n(707)),l=n(799),c=n(18),u="isInsertingPageTemplate",s="automattic/full-site-editing/inserting-template";function p(e){var t=(0,i.useDispatch)("automattic/starter-page-layouts").setOpenState,n=(0,i.useDispatch)("core/block-editor").replaceInnerBlocks,p=(0,i.useDispatch)("core/editor").editPost,f=(0,i.useDispatch)("core/edit-post").toggleFeature,d=(0,i.useDispatch)("core/nux").disableTips,m=(0,i.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,i.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,b=(0,a.useCallback)((function(e){var t=v();p({meta:(0,o.Z)((0,o.Z)({},t),{},{_starter_page_template:e})})}),[p,v]),h=(0,a.useCallback)((function(e,t){(0,l.addFilter)(u,s,(function(){return!0})),e&&p({title:e}),n(y?y.clientId:"",t,!1),(0,l.removeFilter)(u,s)}),[p,y,n]),_=m.isWelcomeGuideActive,w=m.areTipsEnabled,Z=(0,a.useCallback)((function(){_?f("welcomeGuide"):w&&d()}),[w,d,_,f]);return(0,a.createElement)(c.Z,(0,r.Z)({},m,{setOpenState:t,saveTemplateChoice:b,insertTemplate:h,hideWelcomeGuide:Z},e))}},168:function(e,t,n){var r=n(530),o=n(707);(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}}})},18:function(e,t,n){var r=n(258),o=n(54),a=n(659),i=n(730),l=n(989),c=n(663),u=n(49),s=n(119),p=n(27),f=n(804),d=n(163),m=n(997),g=n(314),v=n(417),y=n(229),b=n(610),h=n(206),_=n(721),w=n(382),Z=n(517),__=d.__,O=function(e){(0,c.Z)(n,e);var t=(0,u.Z)(n);function n(e){var r;return(0,a.Z)(this,n),r=t.call(this,e),(0,s.Z)((0,l.Z)(r),"getBlocksByTemplateSlugs",(0,f.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,h.Z)(o,r.props.siteInformation)):[],e}),{});return r.filterTemplatesWithMissingBlocks(t)}))),(0,s.Z)((0,l.Z)(r),"getBlocksForSelection",(function(e){var t=r.getBlocksByTemplateSlug(e);return(0,_.Z)(t,(function(e){return"core/button"===e.name&&void 0!==e.attributes.url&&(e.attributes.url="#"),e}))})),(0,s.Z)((0,l.Z)(r),"setTemplate",(function(e){if((0,b.E2)(e),r.props.saveTemplateChoice(e),"blank"===e)return r.props.insertTemplate("",[]),void r.props.setOpenState(!1);var t=r.props.templates.find((function(t){return t.name===e})),n=((null==t?void 0:t.categories)||{}).hasOwnProperty("home"),o=r.getBlocksForSelection(e),a=n?null:(null==t?void 0:t.title)||"";o&&o.length?(r.props.insertTemplate(a,o),r.props.setOpenState(!1)):r.props.setOpenState(!1)})),(0,s.Z)((0,l.Z)(r),"handleCategorySelection",(function(e){r.setState({selectedCategory:e})})),(0,s.Z)((0,l.Z)(r),"closeModal",(function(){(0,b.GI)(),r.props.setOpenState(!1)})),(0,s.Z)((0,l.Z)(r),"getTemplateGroups",(function(){if(!r.props.templates.length)return null;var e,t={},n=(0,o.Z)(r.props.templates);try{for(n.s();!(e=n.n()).done;){var a=e.value;for(var i in a.categories)i in t||(t[i]=a.categories[i])}}catch(l){n.e(l)}finally{n.f()}return(0,Z.x)(["featured","about","blog","home","gallery","services","contact"],t)})),(0,s.Z)((0,l.Z)(r),"getTemplatesForGroup",(function(e){if(!r.props.templates.length)return null;if("blank"===e)return[{name:"blank",title:"Blank",html:"",ID:null}];var t,n=[],a=(0,o.Z)(r.props.templates);try{for(a.s();!(t=a.n()).done;){var i=t.value;for(var l in i.categories)l===e&&n.push(i)}}catch(c){a.e(c)}finally{a.f()}return n})),(0,s.Z)((0,l.Z)(r),"getTemplateCategories",(function(){var e=r.getTemplateGroups();if(!e)return null;var t=[];for(var n in e)t.push({slug:n,name:e[n].title});return t})),(0,s.Z)((0,l.Z)(r),"renderTemplateGroup",(function(){var e,t,n=r.state.selectedCategory;if(!n)return null;var o=r.getTemplatesForGroup(n);if(null==o||!o.length)return null;var a=null===(e=r.getTemplateGroups())||void 0===e||null===(t=e[n])||void 0===t?void 0:t.title;return r.renderTemplatesList(o,a)})),(0,s.Z)((0,l.Z)(r),"renderTemplatesList",(function(e,t){if(!e.length)return null;var n,o=r.getBlocksByTemplateSlugs(r.props.templates),a=Object.keys(o),i=(n=a,e.filter((function(e){return n.includes(e.name)})));return i.length?(0,p.createElement)(y.Z,{label:__("Layout","full-site-editing"),legendLabel:t,templates:i,onTemplateSelect:r.setTemplate,theme:r.props.theme,locale:r.props.locale,siteInformation:r.props.siteInformation}):null})),r.state={selectedCategory:r.getDefaultSelectedCategory()},r}return(0,i.Z)(n,[{key:"filterTemplatesWithMissingBlocks",value:function(e){return Object.entries(e).reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0],a=n[1];return(0,w.Z)(a)&&a.length||(e[o]=a),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,b.Fk)("add-page")}},{key:"getDefaultSelectedCategory",value:function(){var e=this.getTemplateCategories();return null!=e&&e.length?e[0].slug:null}},{key:"getBlocksByTemplateSlug",value:function(e){var t,n;return null!==(t=null===(n=this.getBlocksByTemplateSlugs(this.props.templates))||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,a=o.isOpen,i=o.instanceId;return a?(0,p.createElement)(m.Modal,{title:"",className:"page-template-modal",onRequestClose:this.closeModal,aria:{labelledby:"page-template-modal__heading-".concat(i),describedby:"page-template-modal__description-".concat(i)}},(0,p.createElement)("div",{className:"page-template-modal__inner"},(0,p.createElement)("div",{className:"page-template-modal__sidebar"},(0,p.createElement)("h1",{id:"page-template-modal__heading-".concat(i),className:"page-template-modal__heading"},__("Add a page","full-site-editing")),(0,p.createElement)("p",{id:"page-template-modal__description-".concat(i),className:"page-template-modal__description"},__("Pick a pre-defined layout or start with a blank page.","full-site-editing")),(0,p.createElement)("div",{className:"page-template-modal__button-container"},(0,p.createElement)(m.Button,{isSecondary:!0,onClick:function(){return n.setTemplate("blank")},className:"page-template-modal__blank-button"},__("Blank page","full-site-editing")),(0,p.createElement)("select",{className:"page-template-modal__mobile-category-dropdown",value:null!=r?r:void 0,onChange:function(e){return n.handleCategorySelection(e.currentTarget.value)}},null===(e=this.getTemplateCategories())||void 0===e?void 0:e.map((function(e){var t=e.slug,n=e.name;return(0,p.createElement)("option",{key:t,value:t},n)})))),(0,p.createElement)(m.VisuallyHidden,{as:"h2",id:"page-template-modal__list-heading-".concat(i)},__("Page categories","full-site-editing")),(0,p.createElement)(m.NavigableMenu,{className:"page-template-modal__category-list",orientation:"vertical","aria-labelledby":"page-template-modal__list-heading-".concat(i),onNavigate:function(e,t){var r;return n.handleCategorySelection(null!==(r=t.dataset.slug)&&void 0!==r?r:null)}},null===(t=this.getTemplateCategories())||void 0===t?void 0:t.map((function(e){var t=e.slug,o=e.name;return(0,p.createElement)(m.MenuItem,{key:t,isTertiary:!0,"aria-selected":t===r,"data-slug":t,onClick:function(){return n.handleCategorySelection(t)},className:"page-template-modal__category-button",tabIndex:t===r?void 0:-1},(0,p.createElement)("span",{className:"page-template-modal__category-item-selection-wrapper"},o))})))),(0,p.createElement)("div",{className:"page-template-modal__template-list-container"},this.renderTemplateGroup()))):null}}]),n}(p.Component);t.Z=(0,v.withInstanceId)(O)},229:function(e,t,n){var r=n(27),o=n(997),a=n(417),i=n(715),l=n(206),c=function(){};t.Z=(0,r.memo)((0,a.withInstanceId)((function(e){var t=e.instanceId,n=e.label,a=e.legendLabel,u=e.templates,s=void 0===u?[]:u,p=e.theme,f=void 0===p?"maywood":p,d=e.locale,m=void 0===d?"en":d,g=e.onTemplateSelect,v=void 0===g?c:g,y=e.siteInformation,b=void 0===y?{}:y;return Array.isArray(s)&&s.length?(0,r.createElement)(o.BaseControl,{id:"template-selector-control__".concat(t),label:n,className:"template-selector-control"},(0,r.createElement)("ul",{className:"template-selector-control__options","data-testid":"template-selector-control-options","aria-label":a},s.map((function(e){var t=e.ID,n=e.name,o=e.title,c=e.description;return(0,r.createElement)("li",{key:"".concat(t,"-").concat(n,"-").concat(a),className:"template-selector-control__template"},(0,r.createElement)(i.Z,{value:n,title:(0,l.Z)(o,b),description:c,onSelect:v,templatePostID:t,theme:f,locale:m}))})))):null})))},715:function(e,t,n){var r=n(27);t.Z=function(e){var t=e.value,n=e.onSelect,o=e.title,a=e.description,i=e.theme,l=e.locale,c=e.templatePostID;if(null==o||null==t)return null;var u="".concat("https://public-api.wordpress.com/rest/v1/template/demo/").concat(encodeURIComponent(i),"/").concat(encodeURIComponent("dotcompatterns.wordpress.com"),"/?post_id=").concat(encodeURIComponent(null!=c?c:""),"&language=").concat(encodeURIComponent(l)),s="https://s0.wordpress.com/mshots/v1/"+encodeURIComponent(u)+"?vpw=1024&vph=1024&w=660&h=430",p=(0,r.createElement)("img",{className:"template-selector-item__media",src:s,alt:o,onLoad:function(e){var t=e.currentTarget;-1===t.src.indexOf("reload=1")&&setTimeout((function(){t.src=t.src+"&reload=1"}),1e4)}});return(0,r.createElement)("button",{type:"button",className:"template-selector-item__label",value:t,onClick:function(){return n(t)}},(0,r.createElement)("span",{className:"template-selector-item__preview-wrap"},p),a)}},382:function(e,t){t.Z=function e(t){return!!t.find((function(t){return"core/missing"===t.name||!(!t.innerBlocks||!t.innerBlocks.length)&&e(t.innerBlocks)}))}},517:function(e,t,n){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}})},721:function(e,t,n){var r=n(314);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}))}},206:function(e,t,n){var r=n(163),_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")},a={CompanyName:"title",Address:"address",Phone:"phone",Vertical:"vertical"};function i(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=i(n,o)?o[n]:"",l=i(n,a)?a[n]:"";return t[l]||r||n})):""}},610:function(e,t,n){n.d(t,{Z:function(){return o},Fk:function(){return a},GI:function(){return i},E2:function(){return l}}),window._tkq=window._tkq||[];var r=null,o=function(e){r=e,window._tkq.push(["identifyUser",e.userid,e.username])},a=function(e){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_view",{blog_id:r.blogid,source:e}])},i=function(){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_dismiss",{blog_id:r.blogid}])},l=function(e){r&&window._tkq.push(["recordEvent","a8c_full_site_editing_template_selector_template_selected",{blog_id:r.blogid,template:e}])}},804:function(e){e.exports=window.lodash},314:function(e){e.exports=window.wp.blocks},997:function(e){e.exports=window.wp.components},417:function(e){e.exports=window.wp.compose},707:function(e){e.exports=window.wp.data},27:function(e){e.exports=window.wp.element},799:function(e){e.exports=window.wp.hooks},163:function(e){e.exports=window.wp.i18n},742:function(e){e.exports=window.wp.nux},200:function(e){e.exports=window.wp.plugins}},t={};function n(r){if(t[r])return t[r].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.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(){n.r(r);var e,t=n(27),o=n(200),a=n(707),i=n(610),l=n(774),c=(n(168),n(580),null!==(e=window.starterPageTemplatesConfig)&&void 0!==e?e:{}),u=c.templates,s=void 0===u?[]:u,p=c.tracksUserData,f=c.screenAction,d=c.theme,m=c.locale;p&&(0,i.Z)(p),"add"===f&&(0,a.dispatch)("automattic/starter-page-layouts").setOpenState("OPEN_FROM_ADD_PAGE"),(0,o.registerPlugin)("page-templates",{render:function(){return(0,t.createElement)(l.O,{templates:s,theme:d,locale:m})},icon:void 0})}();var o=window;for(var a in r)o[a]=r[a];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})}();
starter-page-templates/{index.js → index.tsx} RENAMED
@@ -3,7 +3,8 @@
3
  */
4
  import { registerPlugin } from '@wordpress/plugins';
5
  import { dispatch } from '@wordpress/data';
6
- import { initializeTracksWithIdentity } from '@automattic/page-template-modal';
 
7
 
8
  /**
9
  * Internal dependencies
@@ -12,14 +13,21 @@ import { PageTemplatesPlugin } from './page-template-plugin';
12
  import './store';
13
  import './index.scss';
14
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  // Load config passed from backend.
16
- const {
17
- templates = [],
18
- tracksUserData,
19
- screenAction,
20
- theme,
21
- locale,
22
- } = window.starterPageTemplatesConfig;
23
 
24
  if ( tracksUserData ) {
25
  initializeTracksWithIdentity( tracksUserData );
@@ -35,4 +43,9 @@ registerPlugin( 'page-templates', {
35
  render: () => {
36
  return <PageTemplatesPlugin templates={ templates } theme={ theme } locale={ locale } />;
37
  },
 
 
 
 
 
38
  } );
3
  */
4
  import { registerPlugin } from '@wordpress/plugins';
5
  import { dispatch } from '@wordpress/data';
6
+ import { initializeTracksWithIdentity, LayoutDefinition } from '@automattic/page-template-modal';
7
+ import React from '@wordpress/element';
8
 
9
  /**
10
  * Internal dependencies
13
  import './store';
14
  import './index.scss';
15
 
16
+ declare global {
17
+ interface Window {
18
+ starterPageTemplatesConfig?: {
19
+ templates?: LayoutDefinition[];
20
+ locale?: string;
21
+ theme?: string;
22
+ screenAction?: string;
23
+ tracksUserData?: Parameters< typeof initializeTracksWithIdentity >[ 0 ];
24
+ };
25
+ }
26
+ }
27
+
28
  // Load config passed from backend.
29
+ const { templates = [], tracksUserData, screenAction, theme, locale } =
30
+ window.starterPageTemplatesConfig ?? {};
 
 
 
 
 
31
 
32
  if ( tracksUserData ) {
33
  initializeTracksWithIdentity( tracksUserData );
43
  render: () => {
44
  return <PageTemplatesPlugin templates={ templates } theme={ theme } locale={ locale } />;
45
  },
46
+
47
+ // `registerPlugin()` types assume `icon` is mandatory however it isn't
48
+ // actually required.
49
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
+ icon: undefined as any,
51
  } );
starter-page-templates/page-template-plugin.js DELETED
@@ -1,73 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import '@wordpress/nux';
5
- import { compose } from '@wordpress/compose';
6
- import { withDispatch, withSelect } from '@wordpress/data';
7
- import { addFilter, removeFilter } from '@wordpress/hooks';
8
- import { PageTemplateModal } from '@automattic/page-template-modal';
9
-
10
- const INSERTING_HOOK_NAME = 'isInsertingPageTemplate';
11
- const INSERTING_HOOK_NAMESPACE = 'automattic/full-site-editing/inserting-template';
12
-
13
- export const PageTemplatesPlugin = compose(
14
- withSelect( ( select ) => {
15
- const getMeta = () => select( 'core/editor' ).getEditedPostAttribute( 'meta' );
16
- const { isOpen } = select( 'automattic/starter-page-layouts' );
17
- const currentBlocks = select( 'core/editor' ).getBlocks();
18
- return {
19
- isOpen: isOpen(),
20
- getMeta,
21
- currentPostTitle: select( 'core/editor' ).getCurrentPost().title,
22
- postContentBlock: currentBlocks.find( ( block ) => block.name === 'a8c/post-content' ),
23
- isWelcomeGuideActive: select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ), // Gutenberg 7.2.0 or higher
24
- areTipsEnabled: select( 'core/nux' ) ? select( 'core/nux' ).areTipsEnabled() : false, // Gutenberg 7.1.0 or lower
25
- };
26
- } ),
27
- withDispatch( ( dispatch, ownProps ) => {
28
- const editorDispatcher = dispatch( 'core/editor' );
29
- const { setOpenState } = dispatch( 'automattic/starter-page-layouts' );
30
- return {
31
- setOpenState,
32
- saveTemplateChoice: ( name ) => {
33
- // Save selected template slug in meta.
34
- const currentMeta = ownProps.getMeta();
35
- editorDispatcher.editPost( {
36
- meta: {
37
- ...currentMeta,
38
- _starter_page_template: name,
39
- },
40
- } );
41
- },
42
- insertTemplate: ( title, blocks ) => {
43
- // Add filter to let the tracking library know we are inserting a template.
44
- addFilter( INSERTING_HOOK_NAME, INSERTING_HOOK_NAMESPACE, () => true );
45
-
46
- // Set post title.
47
- if ( title ) {
48
- editorDispatcher.editPost( { title } );
49
- }
50
-
51
- // Replace blocks.
52
- const postContentBlock = ownProps.postContentBlock;
53
- dispatch( 'core/block-editor' ).replaceInnerBlocks(
54
- postContentBlock ? postContentBlock.clientId : '',
55
- blocks,
56
- false
57
- );
58
-
59
- // Remove filter.
60
- removeFilter( INSERTING_HOOK_NAME, INSERTING_HOOK_NAMESPACE );
61
- },
62
- hideWelcomeGuide: () => {
63
- if ( ownProps.isWelcomeGuideActive ) {
64
- // Gutenberg 7.2.0 or higher.
65
- dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' );
66
- } else if ( ownProps.areTipsEnabled ) {
67
- // Gutenberg 7.1.0 or lower.
68
- dispatch( 'core/nux' ).disableTips();
69
- }
70
- },
71
- };
72
- } )
73
- )( PageTemplateModal );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
starter-page-templates/page-template-plugin.tsx ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import '@wordpress/nux';
5
+ import { useSelect, useDispatch } from '@wordpress/data';
6
+ import { addFilter, removeFilter } from '@wordpress/hooks';
7
+ import { LayoutDefinition, PageTemplateModal } from '@automattic/page-template-modal';
8
+ import React, { useCallback } from '@wordpress/element';
9
+
10
+ const INSERTING_HOOK_NAME = 'isInsertingPageTemplate';
11
+ const INSERTING_HOOK_NAMESPACE = 'automattic/full-site-editing/inserting-template';
12
+
13
+ interface PageTemplatesPluginProps {
14
+ templates: LayoutDefinition[];
15
+ locale?: string;
16
+ theme?: string;
17
+ }
18
+
19
+ export function PageTemplatesPlugin( props: PageTemplatesPluginProps ): 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
+
37
+ const { getMeta, postContentBlock } = useSelect( ( select ) => {
38
+ const getMeta = () => select( 'core/editor' ).getEditedPostAttribute( 'meta' );
39
+ const currentBlocks = select( 'core/editor' ).getBlocks();
40
+ return {
41
+ getMeta,
42
+ postContentBlock: currentBlocks.find( ( block ) => block.name === 'a8c/post-content' ),
43
+ };
44
+ } );
45
+
46
+ const saveTemplateChoice = useCallback(
47
+ ( name: string ) => {
48
+ // Save selected template slug in meta.
49
+ const currentMeta = getMeta();
50
+ editPost( {
51
+ meta: {
52
+ ...currentMeta,
53
+ _starter_page_template: name,
54
+ },
55
+ } );
56
+ },
57
+ [ editPost, getMeta ]
58
+ );
59
+
60
+ const insertTemplate = useCallback(
61
+ ( title, blocks ) => {
62
+ // Add filter to let the tracking library know we are inserting a template.
63
+ addFilter( INSERTING_HOOK_NAME, INSERTING_HOOK_NAMESPACE, () => true );
64
+
65
+ // Set post title.
66
+ if ( title ) {
67
+ editPost( { title } );
68
+ }
69
+
70
+ // Replace blocks.
71
+ replaceInnerBlocks( postContentBlock ? postContentBlock.clientId : '', blocks, false );
72
+
73
+ // Remove filter.
74
+ removeFilter( INSERTING_HOOK_NAME, INSERTING_HOOK_NAMESPACE );
75
+ },
76
+ [ editPost, postContentBlock, replaceInnerBlocks ]
77
+ );
78
+
79
+ const { isWelcomeGuideActive, areTipsEnabled } = selectProps;
80
+
81
+ const hideWelcomeGuide = useCallback( () => {
82
+ if ( isWelcomeGuideActive ) {
83
+ // Gutenberg 7.2.0 or higher.
84
+ toggleFeature( 'welcomeGuide' );
85
+ } else if ( areTipsEnabled ) {
86
+ // Gutenberg 7.1.0 or lower.
87
+ disableTips();
88
+ }
89
+ }, [ areTipsEnabled, disableTips, isWelcomeGuideActive, toggleFeature ] );
90
+
91
+ return (
92
+ <PageTemplateModal
93
+ { ...selectProps }
94
+ setOpenState={ setOpenState }
95
+ saveTemplateChoice={ saveTemplateChoice }
96
+ insertTemplate={ insertTemplate }
97
+ hideWelcomeGuide={ hideWelcomeGuide }
98
+ { ...props }
99
+ />
100
+ );
101
+ }
starter-page-templates/store.js DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { registerStore } from '@wordpress/data';
5
-
6
- const reducer = ( state = 'CLOSED', { type, ...action } ) =>
7
- 'SET_IS_OPEN' === type ? action.openState : state;
8
-
9
- const actions = {
10
- setOpenState: ( openState ) => ( {
11
- type: 'SET_IS_OPEN',
12
- openState: openState || 'CLOSED',
13
- } ),
14
- };
15
-
16
- const selectors = {
17
- isOpen: ( state ) => 'CLOSED' !== state,
18
- };
19
-
20
- registerStore( 'automattic/starter-page-layouts', {
21
- reducer,
22
- actions,
23
- selectors,
24
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
starter-page-templates/store.ts ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
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 } ) =>
11
+ 'SET_IS_OPEN' === type ? action.openState : state;
12
+
13
+ const actions = {
14
+ setOpenState: ( openState: OpenState | false ) => ( {
15
+ type: 'SET_IS_OPEN' as const,
16
+ openState: openState || 'CLOSED',
17
+ } ),
18
+ };
19
+
20
+ const selectors = {
21
+ isOpen: ( state: OpenState ): boolean => 'CLOSED' !== state,
22
+ };
23
+
24
+ const STORE_KEY = 'automattic/starter-page-layouts';
25
+
26
+ registerStore( STORE_KEY, {
27
+ // In reality the store can dispatch any action, however `reducer` has a
28
+ // strongly typed action type to make the typings inside the function
29
+ // easier to work with.
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ reducer: reducer as any,
32
+ actions,
33
+ selectors,
34
+ } );
35
+
36
+ declare module '@wordpress/data' {
37
+ function dispatch( key: 'automattic/starter-page-layouts' ): typeof actions;
38
+ function select(
39
+ key: 'automattic/starter-page-layouts'
40
+ ): {
41
+ isOpen: () => ReturnType< typeof selectors.isOpen >;
42
+ };
43
+ }
wpcom-block-editor-nux/class-wp-rest-wpcom-block-editor-nux-status-controller.php CHANGED
@@ -89,13 +89,8 @@ class WP_REST_WPCOM_Block_Editor_NUX_Status_Controller extends \WP_REST_Controll
89
 
90
  return rest_ensure_response(
91
  array(
92
- 'show_welcome_guide' => $show_welcome_guide,
93
- 'variant' => $variant,
94
-
95
- // These are legacy rest params that can be removed after
96
- // we know the new JS files have been deployed.
97
- 'is_nux_enabled' => $show_welcome_guide,
98
- 'welcome_tour_show_variant' => 'tour' === $variant,
99
  )
100
  );
101
  }
@@ -107,14 +102,8 @@ class WP_REST_WPCOM_Block_Editor_NUX_Status_Controller extends \WP_REST_Controll
107
  * @return WP_REST_Response
108
  */
109
  public function update_nux_status( $request ) {
110
- $params = $request->get_json_params();
111
- if ( isset( $params['show_welcome_guide'] ) ) {
112
- $nux_status = $params['show_welcome_guide'] ? 'enabled' : 'dismissed';
113
- } else {
114
- // This legacy rest param can be removed after we know the new
115
- // JS files have been deployed.
116
- $nux_status = $params['isNuxEnabled'] ? 'enabled' : 'dismissed';
117
- }
118
  if ( has_action( 'wpcom_block_editor_nux_update_status' ) ) {
119
  do_action( 'wpcom_block_editor_nux_update_status', $nux_status );
120
  }
89
 
90
  return rest_ensure_response(
91
  array(
92
+ 'show_welcome_guide' => $show_welcome_guide,
93
+ 'variant' => $variant,
 
 
 
 
 
94
  )
95
  );
96
  }
102
  * @return WP_REST_Response
103
  */
104
  public function update_nux_status( $request ) {
105
+ $params = $request->get_json_params();
106
+ $nux_status = $params['show_welcome_guide'] ? 'enabled' : 'dismissed';
 
 
 
 
 
 
107
  if ( has_action( 'wpcom_block_editor_nux_update_status' ) ) {
108
  do_action( 'wpcom_block_editor_nux_update_status', $nux_status );
109
  }
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', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '69dd73e3ee746bc644bdf7fe70196a4c');
1
+ <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => 'b04ba723044e8bca6e0c4c0d5fb12f06');
wpcom-block-editor-nux/dist/wpcom-block-editor-nux.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 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):m(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 m(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=m(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,m=o.g0_256,h=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(h(n[r-2]),n[r-7],m(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}}},4664:function(){},9722: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(2753),c=n(374);(0,o.registerPlugin)("wpcom-block-editor-nux",{render:function(){var e=(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()}})),t=e.show,n=e.isNewPageLayoutModalOpen,o=e.isLoaded,a=e.variant,l=(0,s.useDispatch)("automattic/wpcom-welcome-guide").fetchWelcomeGuideStatus;return(0,r.useEffect)((function(){o||l()}),[l,o]),!t||n?null:"tour"===a?(0,r.createElement)(u.Z,null):"modal"===a&&i.Guide&&i.GuidePage?(0,r.createElement)(c.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(8681);var r=n(7606),i=n.n(r),o=n(9866),s=n(5707),u=(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;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 void 0!==t.response.show_welcome_guide?t.response.show_welcome_guide:t.response.is_nux_enabled;case"WPCOM_WELCOME_GUIDE_SHOW_SET":return t.show;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;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 void 0!==t.response.variant?t.response.variant:t.response.welcome_tour_show_variant?"tour":"modal";default:return e}}}),c={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,isNuxEnabled:e}}),{type:"WPCOM_WELCOME_GUIDE_SHOW_SET",show:e,openedManually:n}},setTourRating:function(e){return{type:"WPCOM_WELCOME_GUIDE_TOUR_RATING_SET",tourRating:e}}};(0,s.registerStore)("automattic/wpcom-welcome-guide",{reducer:u,actions:c,selectors:{isWelcomeGuideManuallyOpened:function(e){return e.isTourManuallyOpened},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}},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(4664),n(9931)),l=n.n(a),d=n(1467),f=n.n(d),p=n(7828),m=n.n(p),h=n(7397),g=n.n(h),__=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:m(),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(9722),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),m=n(3163),__=m.__;function h(e){var t=e.cardIndex,n=e.lastCardIndex,o=e.onDismiss,s=e.setCurrentCardIndex;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?"Start Tour":"Next","full-site-editing"))))}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,{"aria-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,{"aria-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?"),(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,m=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:m,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"},m),(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"):null)),(0,r.createElement)(l.CardFooter,null,y?(0,r.createElement)(v,null):(0,r.createElement)(h,{cardIndex:i,lastCardIndex:s,onDismiss:c,setCurrentCardIndex:d})))}},1227:function(e,t,n){"use strict";var r=n(3163),__=r.__;t.Z=function(){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:__("You’ve now learned the basics. Remember, your site is always private until you decide to launch.","full-site-editing"),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(9722),n(7997)),a=n(5869),l=n(5707),d=n(6115),f=n(3163),__=f.__;function p(){var e=(0,s.Z)(),t=(0,i.useState)(!1),n=(0,r.Z)(t,2),u=n[0],c=n[1],a=(0,i.useState)(0),f=(0,r.Z)(a,2),p=f[0],h=f[1],g=(0,i.useState)(!1),v=(0,r.Z)(g,2),w=v[0],y=v[1],_=(0,l.useDispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide;e.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:c,setJustMaximized:y,slideNumber:p+1}):(0,i.createElement)(o.Z,{cardContent:e[p],cardIndex:p,justMaximized:w,key:p,lastCardIndex:e.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:p+1,action:e}),_(!1,{openedManually:!1})},onMinimize:c,setJustMaximized:y,setCurrentCardIndex:h}))}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;return(new window.Image).src=(0,s.Z)()[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)(p,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,o.isUndefined),(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)},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"},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},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){if(t[r])return t[r].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.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);n(1970),n(1568),n(7869)}();var i=window;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})}();
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):m(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 m(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=m(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,m=o.g0_256,h=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(h(n[r-2]),n[r-7],m(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],b=this.h[6],_=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var C=a(_,p(w),l(w,y,b),this.k[r],n[r]),E=u(f(i),d(i,o,g));_=b,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],b),this.h[7]=u(this.h[7],_)},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}}},4664:function(){},9722: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(2753),c=n(374);(0,o.registerPlugin)("wpcom-block-editor-nux",{render:function(){var e=(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()}})),t=e.show,n=e.isNewPageLayoutModalOpen,o=e.isLoaded,a=e.variant,l=(0,s.useDispatch)("automattic/wpcom-welcome-guide").fetchWelcomeGuideStatus;return(0,r.useEffect)((function(){o||l()}),[l,o]),!t||n?null:"tour"===a?(0,r.createElement)(u.Z,null):"modal"===a&&i.Guide&&i.GuidePage?(0,r.createElement)(c.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(8681);var r=n(7606),i=n.n(r),o=n(9866),s=n(5707),u=(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;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;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;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;default:return e}}}),c={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}}};(0,s.registerStore)("automattic/wpcom-welcome-guide",{reducer:u,actions:c,selectors:{isWelcomeGuideManuallyOpened:function(e){return e.isTourManuallyOpened},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}},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(4664),n(9931)),l=n.n(a),d=n(1467),f=n.n(d),p=n(7828),m=n.n(p),h=n(7397),g=n.n(h),__=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:m(),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(9722),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),m=n(3163),__=m.__;function h(e){var t=e.cardIndex,n=e.lastCardIndex,o=e.onDismiss,s=e.setCurrentCardIndex;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?"Start Tour":"Next","full-site-editing"))))}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,{"aria-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,{"aria-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?"),(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,m=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:m,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"},m),(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"):null)),(0,r.createElement)(l.CardFooter,null,y?(0,r.createElement)(v,null):(0,r.createElement)(h,{cardIndex:i,lastCardIndex:s,onDismiss:c,setCurrentCardIndex:d})))}},1227:function(e,t,n){"use strict";var r=n(3163),__=r.__;t.Z=function(){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:__("You’ve now learned the basics. Remember, your site is always private until you decide to launch.","full-site-editing"),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(9722),n(7997)),a=n(5869),l=n(5707),d=n(6115),f=n(3163),__=f.__;function p(){var e=(0,s.Z)(),t=(0,i.useState)(!1),n=(0,r.Z)(t,2),u=n[0],c=n[1],a=(0,i.useState)(0),f=(0,r.Z)(a,2),p=f[0],h=f[1],g=(0,i.useState)(!1),v=(0,r.Z)(g,2),w=v[0],y=v[1],b=(0,l.useDispatch)("automattic/wpcom-welcome-guide").setShowWelcomeGuide;e.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:c,setJustMaximized:y,slideNumber:p+1}):(0,i.createElement)(o.Z,{cardContent:e[p],cardIndex:p,justMaximized:w,key:p,lastCardIndex:e.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:p+1,action:e}),b(!1,{openedManually:!1})},onMinimize:c,setJustMaximized:y,setCurrentCardIndex:h}))}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;return(new window.Image).src=(0,s.Z)()[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)(p,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,o.isUndefined),(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)},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"},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},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){if(t[r])return t[r].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.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);n(1970),n(1568),n(7869)}();var i=window;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})}();
wpcom-block-editor-nux/src/store.js CHANGED
@@ -9,14 +9,7 @@ import { combineReducers, registerStore } from '@wordpress/data';
9
  const showWelcomeGuideReducer = ( state = undefined, action ) => {
10
  switch ( action.type ) {
11
  case 'WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS':
12
- if ( typeof action.response.show_welcome_guide !== 'undefined' ) {
13
- return action.response.show_welcome_guide;
14
- }
15
-
16
- // This legacy rest param can be removed after we know the new
17
- // PHP files have been deployed.
18
- return action.response.is_nux_enabled;
19
-
20
  case 'WPCOM_WELCOME_GUIDE_SHOW_SET':
21
  return action.show;
22
  default:
@@ -50,14 +43,7 @@ const tourRatingReducer = ( state = undefined, action ) => {
50
  const welcomeGuideVariantReducer = ( state = 'tour', action ) => {
51
  switch ( action.type ) {
52
  case 'WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS':
53
- if ( typeof action.response.variant !== 'undefined' ) {
54
- return action.response.variant;
55
- }
56
-
57
- // This legacy rest param can be removed after we know the new
58
- // PHP files have been deployed.
59
- return action.response.welcome_tour_show_variant ? 'tour' : 'modal';
60
-
61
  default:
62
  return state;
63
  }
@@ -83,13 +69,7 @@ const actions = {
83
  apiFetch( {
84
  path: '/wpcom/v2/block-editor/nux',
85
  method: 'POST',
86
- data: {
87
- show_welcome_guide: show,
88
-
89
- // This legacy rest param can be removed after we know the new
90
- // PHP files have been deployed.
91
- isNuxEnabled: show,
92
- },
93
  } );
94
 
95
  return {
9
  const showWelcomeGuideReducer = ( state = undefined, action ) => {
10
  switch ( action.type ) {
11
  case 'WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS':
12
+ return action.response.show_welcome_guide;
 
 
 
 
 
 
 
13
  case 'WPCOM_WELCOME_GUIDE_SHOW_SET':
14
  return action.show;
15
  default:
43
  const welcomeGuideVariantReducer = ( state = 'tour', action ) => {
44
  switch ( action.type ) {
45
  case 'WPCOM_WELCOME_GUIDE_FETCH_STATUS_SUCCESS':
46
+ return action.response.variant;
 
 
 
 
 
 
 
47
  default:
48
  return state;
49
  }
69
  apiFetch( {
70
  path: '/wpcom/v2/block-editor/nux',
71
  method: 'POST',
72
+ data: { show_welcome_guide: show },
 
 
 
 
 
 
73
  } );
74
 
75
  return {