Version Description
- Editing Toolkit: Load patterns from the rest API endpoint v3 (https://github.com/Automattic/wp-calypso/pull/46463)
- Contextual-tips: remove /block-editor from URL (https://github.com/Automattic/wp-calypso/pull/46592)
- Premium Content: Fix margins on child blocks in Varia based themes (https://github.com/Automattic/wp-calypso/pull/46579)
- Premium Content Block: Remove the intermediate block UI. (https://github.com/Automattic/wp-calypso/pull/46619)
- ET/FSE: Remove the "Showcase New Blocks" module (https://github.com/Automattic/wp-calypso/pull/46663)
- Add text domain to copy in domain-picker and plans-grid packages (https://github.com/Automattic/wp-calypso/pull/46557)
- Gutenboarding: stop HotJar capturing input fields in gutenboarding (https://github.com/Automattic/wp-calypso/pull/46620)
- Launch: Move launch store to package/data-stores. (https://github.com/Automattic/wp-calypso/pull/46570)
- Launch: Hide inline help button when launch modal opens. (https://github.com/Automattic/wp-calypso/pull/46768)
- Localise the launch sidebar and final launch step (https://github.com/Automattic/wp-calypso/pull/46555)
Download this release
Release Info
Developer | yansern |
Plugin | Full Site Editing |
Version | 2.8 |
Comparing to | |
See all releases |
Code changes from version 2.7.2 to 2.8
- block-inserter-modifications/README.md +2 -3
- block-inserter-modifications/contextual-tips/tip-link.js +1 -3
- block-inserter-modifications/dist/contextual-tips.asset.php +1 -1
- block-inserter-modifications/dist/contextual-tips.js +1 -1
- block-inserter-modifications/dist/new-blocks-showcase.asset.php +0 -1
- block-inserter-modifications/dist/new-blocks-showcase.js +0 -1
- block-inserter-modifications/index.php +0 -7
- block-inserter-modifications/new-blocks-showcase.js +0 -54
- block-patterns/class-block-patterns-from-api.php +165 -0
- common/data-stores/launch.ts +6 -0
- common/data-stores/launch/actions.ts +0 -104
- common/data-stores/launch/constants.ts +0 -10
- common/data-stores/launch/data.ts +0 -13
- common/data-stores/launch/index.ts +0 -33
- common/data-stores/launch/persist.ts +0 -6
- common/data-stores/launch/reducer.ts +0 -101
- common/data-stores/launch/selectors.ts +0 -53
- common/data-stores/launch/types.ts +0 -11
- common/dist/data-stores.asset.php +1 -1
- common/dist/data-stores.js +2 -2
- dotcom-fse/dist/dotcom-fse.asset.php +1 -1
- dotcom-fse/dist/dotcom-fse.js +1 -1
- dotcom-fse/plugins/editor-template-classes/index.js +3 -3
- editor-gutenboarding-launch/index.php +2 -0
- editor-site-launch/dist/editor-site-launch.asset.php +1 -1
- editor-site-launch/dist/editor-site-launch.js +7 -7
- editor-site-launch/index.php +2 -0
- editor-site-launch/src/attach-launch-sidebar.tsx +8 -0
- editor-site-launch/src/launch-steps/name-step/index.tsx +0 -1
- full-site-editing-plugin.php +31 -4
- premium-content/blocks/container/index.js +2 -15
- premium-content/blocks/icon.js +15 -0
- premium-content/blocks/logged-out-view/edit.js +54 -34
- premium-content/blocks/logged-out-view/index.js +2 -0
- premium-content/blocks/logged-out-view/save.js +1 -1
- premium-content/blocks/subscriber-view/edit.js +43 -36
- premium-content/blocks/subscriber-view/index.js +2 -0
- premium-content/blocks/subscriber-view/save.js +1 -1
- premium-content/dist/premium-content.asset.php +1 -1
- premium-content/dist/premium-content.js +3 -3
- readme.txt +13 -1
- starter-page-templates/dist/starter-page-templates.asset.php +1 -1
- starter-page-templates/page-template-modal/components/block-iframe-preview.js +1 -1
- wpcom-block-editor-nav-sidebar/class-wpcom-block-editor-nav-sidebar.php +2 -0
block-inserter-modifications/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
# Block Inserter Modifications
|
2 |
|
3 |
-
##
|
4 |
|
5 |
-
- [
|
6 |
-
- [new-blocks-showcase](./contextual-tips.js) add Tips to the searcher box when the term matches with some of the keywords defined by the component.
|
1 |
# Block Inserter Modifications
|
2 |
|
3 |
+
## Contextual Tips
|
4 |
|
5 |
+
- [contextual-tips](./contextual-tips.js) add Tips to the searcher box when the term matches with some of the keywords defined by the component.
|
|
block-inserter-modifications/contextual-tips/tip-link.js
CHANGED
@@ -18,9 +18,7 @@ export default function ( { section, children, subsection } ) {
|
|
18 |
const returnLink =
|
19 |
isEditorIFramed && ! isSimpleSite
|
20 |
? '&' +
|
21 |
-
encodeURIComponent(
|
22 |
-
`return=https://wordpress.com/block-editor/${ postType }/${ hostname }/${ postId }`
|
23 |
-
)
|
24 |
: '';
|
25 |
const autofocus = `autofocus[section]=${ subsection }`;
|
26 |
|
18 |
const returnLink =
|
19 |
isEditorIFramed && ! isSimpleSite
|
20 |
? '&' +
|
21 |
+
encodeURIComponent( `return=https://wordpress.com/${ postType }/${ hostname }/${ postId }` )
|
|
|
|
|
22 |
: '';
|
23 |
const autofocus = `autofocus[section]=${ subsection }`;
|
24 |
|
block-inserter-modifications/dist/contextual-tips.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '1d57436d62876172f628770600cb21dd');
|
block-inserter-modifications/dist/contextual-tips.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.lodash}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.blockEditor}()},function(t,e,n){var r=n(9),i=n(10),o=n(11),c=n(13);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||c()}},function(t,e){!function(){t.exports=this.wp.plugins}()},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var c,s=t[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(t,e,n){var r=n(12);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(5),i=n.n(r),o=n(0),c=n(2),s=n(4),u=n(6),l=n(7),a=n(3),f=n(8),d=n(1),p=!(!window||!window._currentSiteType||"simple"!==window._currentSiteType),
|
1 |
+
!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.lodash}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.blockEditor}()},function(t,e,n){var r=n(9),i=n(10),o=n(11),c=n(13);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||c()}},function(t,e){!function(){t.exports=this.wp.plugins}()},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var c,s=t[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(t,e,n){var r=n(12);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(5),i=n.n(r),o=n(0),c=n(2),s=n(4),u=n(6),l=n(7),a=n(3),f=n(8),d=n(1),p=!(!window||!window._currentSiteType||"simple"!==window._currentSiteType),m=function(){try{return window.self!==window.top}catch(t){return!0}}(),b=function(t){var e=t.section,n=t.children,r=t.subsection,i=window.location.hostname,c=Object(a.select)("core/editor"),s=c.getCurrentPostId(),u=c.getCurrentPostType(),l=m&&!p?"&"+encodeURIComponent("return=https://wordpress.com/".concat(u,"/").concat(i,"/").concat(s)):"",f="autofocus[section]=".concat(r),d="#";switch(e){case"themes":d=m?"https://wordpress.com/themes/".concat(i):"./themes.php";break;case"plugins":d=m||p?"https://wordpress.com/plugins/".concat(i):"./plugin-install.php";break;case"customizer":d=m&&p?"https://wordpress.com/customize/".concat(i,"?").concat(f):"./customize.php?".concat(f).concat(l)}return Object(o.createElement)("a",{href:d,target:"_blank",rel:"noreferrer noopener"},n)};function h(t,e,n){return void 0!==o.createInterpolateElement?Object(o.createInterpolateElement)(t,e):n}var g=[{context:"theme",keywords:["theme",Object(d.__)("theme","full-site-editing")],description:h(Object(d.__)("You can visit the <a>theme directory</a> to select a different design for your site.","full-site-editing"),{a:Object(o.createElement)(b,{section:"themes"})},Object(d.__)("You can visit the theme directory to select a different design for your site.","full-site-editing")),permission:"settings"},{context:"css",keywords:["css",Object(d.__)("css","full-site-editing"),"style",Object(d.__)("style","full-site-editing")],description:h(Object(d.__)("You can visit the the <a>Customizer</a> to edit the CSS on your site.","full-site-editing"),{a:Object(o.createElement)(b,{section:"customizer",subsection:"custom_css"})},Object(d.__)("You can visit the the Customizer to edit the CSS on your site.","full-site-editing")),permission:"settings"},{context:"plugin",keywords:["plugin",Object(d.__)("plugin","full-site-editing")],description:h(Object(d.__)("You can visit the <a>plugin directory</a> to get started with installing new plugins.","full-site-editing"),{a:Object(o.createElement)(b,{section:"plugins"})},Object(d.__)("You can visit the plugin directory to get started with installing new plugins.","full-site-editing")),permission:"settings"},{context:"header",keywords:["header",Object(d.__)("header","full-site-editing")],description:h(Object(d.__)("You can visit the the <a>Customizer</a> to edit your logo and site title.","full-site-editing"),{a:Object(o.createElement)(b,{section:"customizer",subsection:"title_tagline"})},Object(d.__)("You can visit the the Customizer to edit your logo and site title.","full-site-editing")),permission:"settings"},{context:"color",keywords:["color",Object(d.__)("color","full-site-editing")],description:h(Object(d.__)("You can visit the the <a>Customizer</a> to edit the colors on your site.","full-site-editing"),{a:Object(o.createElement)(b,{section:"customizer",subsection:"colors"})},Object(d.__)("You can visit the the Customizer to edit the colors on your site.","full-site-editing")),permission:"settings"}];var y=Object(f.compose)(Object(a.withSelect)((function(t){return{canUserCreate:function(e){return t("core").canUser("create",e)}}})))((function(t){var e=t.searchTerm,n=t.random,r=void 0!==n&&n,i=t.canUserCreate;if(!e)return null;if(!g.length)return null;var s=Object(c.deburr)(Object(c.lowerCase)(e)).replace(/^\//,""),u=Object(c.filter)(g,(function(t){var e=t.keywords,n=t.permission;return i(n)&&Object(c.filter)(Object(c.uniq)(e),(function(t){return Object(c.includes)(s,t)})).length}));if(!u.length)return null;var a=r?Math.floor(Math.random()*u.length):0;return Object(o.createElement)("div",{className:"contextual-tip"},Object(o.createElement)(l.Tip,null,Object(c.get)(u,[a,"description"])))})),j=(n(14),function(){var t=Object(o.useState)(""),e=i()(t,2),n=e[0],r=e[1],u=Object(c.debounce)(r,400);return Object(o.createElement)(s.__experimentalInserterMenuExtension,null,(function(t){var e=t.filterValue;return t.hasItems||!e?null:(n!==e&&u(e),Object(o.createElement)(y,{searchTerm:e}))}))});void 0!==s.__experimentalInserterMenuExtension&&Object(u.registerPlugin)("block-inserter-contextual-tips",{render:function(){return Object(o.createElement)(j,null)}})}]));
|
block-inserter-modifications/dist/new-blocks-showcase.asset.php
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-blocks', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '3101bdf4f718facfbe57ff5f399e4c9e');
|
|
block-inserter-modifications/dist/new-blocks-showcase.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(e,t){for(var r in t)e[r]=t[r]}(window,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}([function(e,t,r){var n=r(7);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t,r){var n=r(8),o=r(9),i=r(10),c=r(11);e.exports=function(e){return n(e)||o(e)||i(e)||c()}},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),i=r(3),c=r.n(i),u=r(4),a=r(5),f=r(1),l={slug:"new",title:Object(u.__)("New","full-site-editing")},s=["jetpack/podcast-player","jetpack/calendly","jetpack/eventbrite","jetpack/opentable","jetpack/revue"];Object(f.setCategories)([l].concat(c()(Object(f.getCategories)()))),Object(a.addFilter)("blocks.registerBlockType","full-site-editing/new-blocks-showcase",(function(e,t){return s.includes(t)?o()(o()({},e),{},{category:l.slug}):e}))},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){var n=r(2);e.exports=function(e){if(Array.isArray(e))return n(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t,r){var n=r(2);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}}]));
|
|
block-inserter-modifications/index.php
CHANGED
@@ -61,13 +61,6 @@ function enqueue_style( $filename ) {
|
|
61 |
* Enqueue script for the Block Inserter modifications.
|
62 |
*/
|
63 |
function enqueue_block_inserter_modifications() {
|
64 |
-
/**
|
65 |
-
* We're enqueuing the script in the head because we need it to run before any
|
66 |
-
* blocks are registered, so they're all available for filter that sets the
|
67 |
-
* "New" category.
|
68 |
-
*/
|
69 |
-
enqueue_script( 'new-blocks-showcase', false );
|
70 |
-
|
71 |
enqueue_script( 'contextual-tips', true );
|
72 |
enqueue_style( 'contextual-tips', false );
|
73 |
}
|
61 |
* Enqueue script for the Block Inserter modifications.
|
62 |
*/
|
63 |
function enqueue_block_inserter_modifications() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
enqueue_script( 'contextual-tips', true );
|
65 |
enqueue_style( 'contextual-tips', false );
|
66 |
}
|
block-inserter-modifications/new-blocks-showcase.js
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* External dependencies
|
3 |
-
*/
|
4 |
-
import { __ } from '@wordpress/i18n';
|
5 |
-
import { addFilter } from '@wordpress/hooks';
|
6 |
-
import { getCategories, setCategories } from '@wordpress/blocks';
|
7 |
-
|
8 |
-
/**
|
9 |
-
* This script needs to run *before* any block is registered! This makes sure
|
10 |
-
* the category filter doesn't miss any blocks targeted for the "New" category.
|
11 |
-
*/
|
12 |
-
|
13 |
-
const NEW_CATEGORY = {
|
14 |
-
slug: 'new',
|
15 |
-
/* translators: Category name for recently added blocks. */
|
16 |
-
title: __( 'New', 'full-site-editing' ),
|
17 |
-
};
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Currently selected blocks to be showcased via the "New" category.
|
21 |
-
*
|
22 |
-
* @see {@link https://github.com/Automattic/wp-calypso/pull/41822#discussion_r420993908}
|
23 |
-
*/
|
24 |
-
const NEW_BLOCKS = [
|
25 |
-
'jetpack/podcast-player',
|
26 |
-
'jetpack/calendly',
|
27 |
-
'jetpack/eventbrite',
|
28 |
-
'jetpack/opentable',
|
29 |
-
'jetpack/revue',
|
30 |
-
];
|
31 |
-
|
32 |
-
// Add the "New" block category to the top (under the "Most Used").
|
33 |
-
setCategories( [ NEW_CATEGORY, ...getCategories() ] );
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Sets NEW_CATEGORY to blocks from the NEW_BLOCKS list.
|
37 |
-
*
|
38 |
-
* @param {object} settings - Block settings
|
39 |
-
* @param {string} name - Block name
|
40 |
-
* @returns {object} New Block settings
|
41 |
-
*/
|
42 |
-
function setNewCategory( settings, name ) {
|
43 |
-
if ( ! NEW_BLOCKS.includes( name ) ) {
|
44 |
-
return settings;
|
45 |
-
}
|
46 |
-
|
47 |
-
return {
|
48 |
-
...settings,
|
49 |
-
category: NEW_CATEGORY.slug,
|
50 |
-
};
|
51 |
-
}
|
52 |
-
|
53 |
-
// Register the filter for setting the "New" category to the blocks from the list:
|
54 |
-
addFilter( 'blocks.registerBlockType', 'full-site-editing/new-blocks-showcase', setNewCategory );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
block-patterns/class-block-patterns-from-api.php
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Block Patterns file.
|
4 |
+
*
|
5 |
+
* @package A8C\FSE
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace A8C\FSE;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class Block_Patterns_From_API
|
12 |
+
*/
|
13 |
+
class Block_Patterns_From_API {
|
14 |
+
|
15 |
+
const PATTERN_NAMESPACE = 'a8c/';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Class instance.
|
19 |
+
*
|
20 |
+
* @var Block_Patterns
|
21 |
+
*/
|
22 |
+
private static $instance = null;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Cache key for patterns array.
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
private $patterns_cache_key;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Block_Patterns constructor.
|
33 |
+
*/
|
34 |
+
private function __construct() {
|
35 |
+
$this->patterns_cache_key = sha1(
|
36 |
+
implode(
|
37 |
+
'_',
|
38 |
+
array(
|
39 |
+
'block_patterns',
|
40 |
+
PLUGIN_VERSION,
|
41 |
+
$this->get_iso_639_locale(),
|
42 |
+
)
|
43 |
+
)
|
44 |
+
);
|
45 |
+
|
46 |
+
$this->register_patterns();
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Creates instance.
|
51 |
+
*
|
52 |
+
* @return \A8C\FSE\Block_Patterns
|
53 |
+
*/
|
54 |
+
public static function get_instance() {
|
55 |
+
if ( null === self::$instance ) {
|
56 |
+
self::$instance = new self();
|
57 |
+
}
|
58 |
+
|
59 |
+
return self::$instance;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Register FSE block patterns and categories.
|
64 |
+
*/
|
65 |
+
private function register_patterns() {
|
66 |
+
if ( class_exists( 'WP_Block_Patterns_Registry' ) ) {
|
67 |
+
// Remove core patterns.
|
68 |
+
foreach ( \WP_Block_Patterns_Registry::get_instance()->get_all_registered() as $pattern ) {
|
69 |
+
if ( 'core/' === substr( $pattern['name'], 0, 5 ) ) {
|
70 |
+
unregister_block_pattern( $pattern['name'] );
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
$pattern_categories = array();
|
76 |
+
$block_patterns = $this->get_patterns();
|
77 |
+
|
78 |
+
foreach ( (array) $this->get_patterns() as $pattern ) {
|
79 |
+
foreach ( (array) $pattern['categories'] as $slug => $category ) {
|
80 |
+
$pattern_categories[ $slug ] = $category['title'];
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
// Order categories alphabetically and register them.
|
85 |
+
asort( $pattern_categories );
|
86 |
+
foreach ( (array) $pattern_categories as $slug => $label ) {
|
87 |
+
register_block_pattern_category( $slug, array( 'label' => $label ) );
|
88 |
+
}
|
89 |
+
|
90 |
+
foreach ( (array) $this->get_patterns() as $pattern ) {
|
91 |
+
register_block_pattern(
|
92 |
+
Block_Patterns_From_API::PATTERN_NAMESPACE . $pattern['name'],
|
93 |
+
array(
|
94 |
+
'title' => $pattern['title'],
|
95 |
+
'description' => $pattern['title'],
|
96 |
+
'content' => $pattern['html'],
|
97 |
+
'viewportWidth' => 1280,
|
98 |
+
'categories' => array_keys(
|
99 |
+
$pattern['categories']
|
100 |
+
),
|
101 |
+
)
|
102 |
+
);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Returns a list of patterns.
|
108 |
+
*
|
109 |
+
* @return array
|
110 |
+
*/
|
111 |
+
private function get_patterns() {
|
112 |
+
$block_patterns = wp_cache_get( $this->patterns_cache_key, 'ptk_patterns' );
|
113 |
+
|
114 |
+
// Load fresh data if we don't have any patterns.
|
115 |
+
if ( false === $block_patterns || ( defined( 'WP_DISABLE_PATTERN_CACHE' ) && WP_DISABLE_PATTERN_CACHE ) ) {
|
116 |
+
$request_url = esc_url_raw(
|
117 |
+
add_query_arg(
|
118 |
+
array(
|
119 |
+
'tags' => 'pattern',
|
120 |
+
),
|
121 |
+
'https://public-api.wordpress.com/rest/v1/ptk/patterns/' . $this->get_iso_639_locale()
|
122 |
+
)
|
123 |
+
);
|
124 |
+
|
125 |
+
$args = array( 'timeout' => 20 );
|
126 |
+
|
127 |
+
if ( function_exists( 'wpcom_json_api_get' ) ) {
|
128 |
+
$response = wpcom_json_api_get( $request_url, $args );
|
129 |
+
} else {
|
130 |
+
$response = wp_remote_get( $request_url, $args );
|
131 |
+
}
|
132 |
+
|
133 |
+
if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
134 |
+
return array();
|
135 |
+
}
|
136 |
+
$block_patterns = json_decode( wp_remote_retrieve_body( $response ), true );
|
137 |
+
wp_cache_add( $this->patterns_cache_key, $block_patterns, 'ptk_patterns', DAY_IN_SECONDS );
|
138 |
+
}
|
139 |
+
|
140 |
+
return $block_patterns;
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Returns ISO 639 conforming locale string.
|
145 |
+
*
|
146 |
+
* @return string ISO 639 locale string
|
147 |
+
*/
|
148 |
+
private function get_iso_639_locale() {
|
149 |
+
// Make sure to get blog locale, not user locale.
|
150 |
+
$language = function_exists( 'get_blog_lang_code' ) ? get_blog_lang_code() : get_locale();
|
151 |
+
$language = strtolower( $language );
|
152 |
+
|
153 |
+
if ( in_array( $language, array( 'pt_br', 'pt-br', 'zh_tw', 'zh-tw', 'zh_cn', 'zh-cn' ), true ) ) {
|
154 |
+
$language = str_replace( '_', '-', $language );
|
155 |
+
} else {
|
156 |
+
$language = preg_replace( '/([-_].*)$/i', '', $language );
|
157 |
+
}
|
158 |
+
|
159 |
+
if ( empty( $language ) ) {
|
160 |
+
return 'en';
|
161 |
+
}
|
162 |
+
|
163 |
+
return $language;
|
164 |
+
}
|
165 |
+
}
|
common/data-stores/launch.ts
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import { Launch } from '@automattic/data-stores';
|
5 |
+
|
6 |
+
Launch.register();
|
common/data-stores/launch/actions.ts
DELETED
@@ -1,104 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* External dependencies
|
3 |
-
*/
|
4 |
-
import type { DomainSuggestions, Plans } from '@automattic/data-stores';
|
5 |
-
import { dispatch, select } from '@wordpress/data-controls';
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Internal dependencies
|
9 |
-
*/
|
10 |
-
import { SITE_ID, SITE_STORE, PLANS_STORE } from './constants';
|
11 |
-
import type { LaunchStepType } from './types';
|
12 |
-
|
13 |
-
export const setSidebarFullscreen = () =>
|
14 |
-
( {
|
15 |
-
type: 'SET_SIDEBAR_FULLSCREEN',
|
16 |
-
} as const );
|
17 |
-
|
18 |
-
export const unsetSidebarFullscreen = () =>
|
19 |
-
( {
|
20 |
-
type: 'UNSET_SIDEBAR_FULLSCREEN',
|
21 |
-
} as const );
|
22 |
-
|
23 |
-
export const setStep = ( step: LaunchStepType ) =>
|
24 |
-
( {
|
25 |
-
type: 'SET_STEP',
|
26 |
-
step,
|
27 |
-
} as const );
|
28 |
-
|
29 |
-
export const setDomain = ( domain: DomainSuggestions.DomainSuggestion ) =>
|
30 |
-
( {
|
31 |
-
type: 'SET_DOMAIN',
|
32 |
-
domain,
|
33 |
-
} as const );
|
34 |
-
|
35 |
-
export const unsetDomain = () =>
|
36 |
-
( {
|
37 |
-
type: 'UNSET_DOMAIN',
|
38 |
-
} as const );
|
39 |
-
|
40 |
-
export const confirmDomainSelection = () =>
|
41 |
-
( {
|
42 |
-
type: 'CONFIRM_DOMAIN_SELECTION',
|
43 |
-
} as const );
|
44 |
-
|
45 |
-
export const setDomainSearch = ( domainSearch: string ) =>
|
46 |
-
( {
|
47 |
-
type: 'SET_DOMAIN_SEARCH',
|
48 |
-
domainSearch,
|
49 |
-
} as const );
|
50 |
-
|
51 |
-
export const setPlan = ( plan: Plans.Plan ) =>
|
52 |
-
( {
|
53 |
-
type: 'SET_PLAN',
|
54 |
-
plan,
|
55 |
-
} as const );
|
56 |
-
|
57 |
-
export const unsetPlan = () =>
|
58 |
-
( {
|
59 |
-
type: 'UNSET_PLAN',
|
60 |
-
} as const );
|
61 |
-
|
62 |
-
/* eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types */
|
63 |
-
export function* updatePlan( planSlug: Plans.PlanSlug ) {
|
64 |
-
const plan: Plans.Plan = yield select( PLANS_STORE, 'getPlanBySlug', planSlug );
|
65 |
-
yield setPlan( plan );
|
66 |
-
}
|
67 |
-
|
68 |
-
/* eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types */
|
69 |
-
export function* launchSite() {
|
70 |
-
try {
|
71 |
-
const success = yield dispatch( SITE_STORE, 'launchSite', SITE_ID );
|
72 |
-
return success;
|
73 |
-
} catch ( error ) {
|
74 |
-
// console.log( 'launch error', error );
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
export const openSidebar = () =>
|
79 |
-
( {
|
80 |
-
type: 'OPEN_SIDEBAR',
|
81 |
-
} as const );
|
82 |
-
|
83 |
-
export const closeSidebar = () =>
|
84 |
-
( {
|
85 |
-
type: 'CLOSE_SIDEBAR',
|
86 |
-
} as const );
|
87 |
-
|
88 |
-
export const enableExperimental = () =>
|
89 |
-
( {
|
90 |
-
type: 'ENABLE_EXPERIMENTAL',
|
91 |
-
} as const );
|
92 |
-
|
93 |
-
export type LaunchAction = ReturnType<
|
94 |
-
| typeof unsetDomain
|
95 |
-
| typeof setStep
|
96 |
-
| typeof setDomain
|
97 |
-
| typeof confirmDomainSelection
|
98 |
-
| typeof setDomainSearch
|
99 |
-
| typeof setPlan
|
100 |
-
| typeof unsetPlan
|
101 |
-
| typeof openSidebar
|
102 |
-
| typeof closeSidebar
|
103 |
-
| typeof enableExperimental
|
104 |
-
>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common/data-stores/launch/constants.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
export const STORE_KEY = 'automattic/launch';
|
2 |
-
export const SITE_STORE = 'automattic/site';
|
3 |
-
export const PLANS_STORE = 'automattic/onboard/plans';
|
4 |
-
|
5 |
-
declare global {
|
6 |
-
interface Window {
|
7 |
-
_currentSiteId: number;
|
8 |
-
}
|
9 |
-
}
|
10 |
-
export const SITE_ID = window._currentSiteId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common/data-stores/launch/data.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
export const LaunchStep: Record< string, string > = {
|
2 |
-
Name: 'name',
|
3 |
-
Domain: 'domain',
|
4 |
-
Plan: 'plan',
|
5 |
-
Final: 'final',
|
6 |
-
};
|
7 |
-
|
8 |
-
export const LaunchSequence: Array< string > = [
|
9 |
-
LaunchStep.Name,
|
10 |
-
LaunchStep.Domain,
|
11 |
-
LaunchStep.Plan,
|
12 |
-
LaunchStep.Final,
|
13 |
-
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common/data-stores/launch/index.ts
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* External dependencies
|
3 |
-
*/
|
4 |
-
import { controls } from '@wordpress/data-controls';
|
5 |
-
import { plugins, registerStore, use } from '@wordpress/data';
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Internal dependencies
|
9 |
-
*/
|
10 |
-
import { STORE_KEY } from './constants';
|
11 |
-
import reducer, { State } from './reducer';
|
12 |
-
import * as actions from './actions';
|
13 |
-
import * as selectors from './selectors';
|
14 |
-
import persistOptions from './persist';
|
15 |
-
import type { SelectFromMap, DispatchFromMap } from '@automattic/data-stores';
|
16 |
-
|
17 |
-
export type { State };
|
18 |
-
export { STORE_KEY };
|
19 |
-
|
20 |
-
use( plugins.persistence, persistOptions );
|
21 |
-
|
22 |
-
registerStore< State >( STORE_KEY, {
|
23 |
-
actions,
|
24 |
-
controls,
|
25 |
-
reducer: reducer as any,
|
26 |
-
selectors,
|
27 |
-
persist: [ 'domain', 'domainSearch', 'plan', 'confirmedDomainSelection', 'isExperimental' ],
|
28 |
-
} );
|
29 |
-
|
30 |
-
declare module '@wordpress/data' {
|
31 |
-
function dispatch( key: typeof STORE_KEY ): DispatchFromMap< typeof actions >;
|
32 |
-
function select( key: typeof STORE_KEY ): SelectFromMap< typeof selectors >;
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common/data-stores/launch/persist.ts
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* External dependencies
|
3 |
-
*/
|
4 |
-
import { persistenceConfigFactory } from '@automattic/data-stores';
|
5 |
-
|
6 |
-
export default persistenceConfigFactory( 'WP_LAUNCH' );
|
|
|
|
|
|
|
|
|
|
|
|
common/data-stores/launch/reducer.ts
DELETED
@@ -1,101 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* External dependencies
|
3 |
-
*/
|
4 |
-
import type { Reducer } from 'redux';
|
5 |
-
import { combineReducers } from '@wordpress/data';
|
6 |
-
import type { DomainSuggestions, Plans } from '@automattic/data-stores';
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Internal dependencies
|
10 |
-
*/
|
11 |
-
import { LaunchStep } from './data';
|
12 |
-
import type { LaunchStepType } from './types';
|
13 |
-
import type { LaunchAction } from './actions';
|
14 |
-
|
15 |
-
const step: Reducer< LaunchStepType, LaunchAction > = ( state = LaunchStep.Name, action ) => {
|
16 |
-
if ( action.type === 'SET_STEP' ) {
|
17 |
-
return action.step;
|
18 |
-
}
|
19 |
-
return state;
|
20 |
-
};
|
21 |
-
|
22 |
-
const domain: Reducer< DomainSuggestions.DomainSuggestion | undefined, LaunchAction > = (
|
23 |
-
state,
|
24 |
-
action
|
25 |
-
) => {
|
26 |
-
if ( action.type === 'SET_DOMAIN' ) {
|
27 |
-
return action.domain;
|
28 |
-
}
|
29 |
-
if ( action.type === 'UNSET_DOMAIN' ) {
|
30 |
-
return undefined;
|
31 |
-
}
|
32 |
-
return state;
|
33 |
-
};
|
34 |
-
|
35 |
-
const domainSearch: Reducer< string, LaunchAction > = ( state = '', action ) => {
|
36 |
-
if ( action.type === 'SET_DOMAIN_SEARCH' ) {
|
37 |
-
return action.domainSearch;
|
38 |
-
}
|
39 |
-
return state;
|
40 |
-
};
|
41 |
-
|
42 |
-
const confirmedDomainSelection: Reducer< boolean, LaunchAction > = ( state = false, action ) => {
|
43 |
-
if ( action.type === 'CONFIRM_DOMAIN_SELECTION' ) {
|
44 |
-
return true;
|
45 |
-
}
|
46 |
-
return state;
|
47 |
-
};
|
48 |
-
|
49 |
-
const plan: Reducer< Plans.Plan | undefined, LaunchAction > = ( state, action ) => {
|
50 |
-
if ( action.type === 'SET_PLAN' ) {
|
51 |
-
return action.plan;
|
52 |
-
}
|
53 |
-
if ( action.type === 'UNSET_PLAN' ) {
|
54 |
-
return undefined;
|
55 |
-
}
|
56 |
-
return state;
|
57 |
-
};
|
58 |
-
|
59 |
-
const isSidebarOpen: Reducer< boolean, LaunchAction > = ( state = false, action ) => {
|
60 |
-
if ( action.type === 'OPEN_SIDEBAR' ) {
|
61 |
-
return true;
|
62 |
-
}
|
63 |
-
|
64 |
-
if ( action.type === 'CLOSE_SIDEBAR' ) {
|
65 |
-
return false;
|
66 |
-
}
|
67 |
-
return state;
|
68 |
-
};
|
69 |
-
|
70 |
-
const isSidebarFullscreen: Reducer< boolean, LaunchAction > = ( state = false, action ) => {
|
71 |
-
if ( action.type === 'SET_SIDEBAR_FULLSCREEN' ) {
|
72 |
-
return true;
|
73 |
-
}
|
74 |
-
if ( action.type === 'UNSET_SIDEBAR_FULLSCREEN' ) {
|
75 |
-
return false;
|
76 |
-
}
|
77 |
-
return state;
|
78 |
-
};
|
79 |
-
|
80 |
-
const isExperimental: Reducer< boolean, LaunchAction > = ( state = false, action ) => {
|
81 |
-
if ( action.type === 'ENABLE_EXPERIMENTAL' ) {
|
82 |
-
return true;
|
83 |
-
}
|
84 |
-
|
85 |
-
return state;
|
86 |
-
};
|
87 |
-
|
88 |
-
const reducer = combineReducers( {
|
89 |
-
step,
|
90 |
-
domain,
|
91 |
-
confirmedDomainSelection,
|
92 |
-
domainSearch,
|
93 |
-
plan,
|
94 |
-
isSidebarOpen,
|
95 |
-
isSidebarFullscreen,
|
96 |
-
isExperimental,
|
97 |
-
} );
|
98 |
-
|
99 |
-
export type State = ReturnType< typeof reducer >;
|
100 |
-
|
101 |
-
export default reducer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common/data-stores/launch/selectors.ts
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* External dependencies
|
3 |
-
*/
|
4 |
-
import { select } from '@wordpress/data';
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Internal dependencies
|
8 |
-
*/
|
9 |
-
import { LaunchSequence, LaunchStep } from './data';
|
10 |
-
import type { State } from './reducer';
|
11 |
-
import { LaunchStepType } from './types';
|
12 |
-
|
13 |
-
export const getLaunchSequence = () => LaunchSequence;
|
14 |
-
export const getLaunchStep = () => LaunchStep;
|
15 |
-
|
16 |
-
export const getState = ( state: State ) => state;
|
17 |
-
export const hasPaidDomain = ( state: State ): boolean => {
|
18 |
-
if ( ! state.domain ) {
|
19 |
-
return false;
|
20 |
-
}
|
21 |
-
return ! state.domain.is_free;
|
22 |
-
};
|
23 |
-
export const getSelectedDomain = ( state: State ) => state.domain;
|
24 |
-
export const getSelectedPlan = ( state: State ) => state.plan;
|
25 |
-
|
26 |
-
// Completion status of steps is derived from the state of the launch flow
|
27 |
-
export const isStepCompleted = ( state: State, step: LaunchStepType ) => {
|
28 |
-
if ( step === LaunchStep.Plan ) {
|
29 |
-
return !! getSelectedPlan( state );
|
30 |
-
}
|
31 |
-
if ( step === LaunchStep.Name ) {
|
32 |
-
const site = select( 'core' ).getEntityRecord( 'root', 'site', undefined );
|
33 |
-
return !! site?.title;
|
34 |
-
}
|
35 |
-
if ( step === LaunchStep.Domain ) {
|
36 |
-
return !! getSelectedDomain( state ) || state.confirmedDomainSelection;
|
37 |
-
}
|
38 |
-
return false;
|
39 |
-
};
|
40 |
-
|
41 |
-
// Check if all steps are completed except the last one
|
42 |
-
export const isFlowCompleted = ( state: State ) =>
|
43 |
-
LaunchSequence.slice( 0, LaunchSequence.length - 1 ).every( ( step ) =>
|
44 |
-
isStepCompleted( state, step )
|
45 |
-
);
|
46 |
-
|
47 |
-
// Check if at least one step is completed
|
48 |
-
export const isFlowStarted = ( state: State ) =>
|
49 |
-
LaunchSequence.some( ( step ) => isStepCompleted( state, step ) );
|
50 |
-
|
51 |
-
// Get first incomplete step
|
52 |
-
export const getFirstIncompleteStep = ( state: State ): LaunchStepType | undefined =>
|
53 |
-
LaunchSequence.find( ( step ) => ! isStepCompleted( state, step ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common/data-stores/launch/types.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* External dependencies
|
3 |
-
*/
|
4 |
-
import type { ValuesType } from 'utility-types';
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Internal dependencies
|
8 |
-
*/
|
9 |
-
import { LaunchStep } from './data';
|
10 |
-
|
11 |
-
export type LaunchStepType = ValuesType< typeof LaunchStep >;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common/dist/data-stores.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('react', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-polyfill'), 'version' => '5fe1c04ed251f6d56aba3bcd4c8a53ff');
|
common/dist/data-stores.js
CHANGED
@@ -11,11 +11,11 @@
|
|
11 |
object-assign
|
12 |
(c) Sindre Sorhus
|
13 |
@license MIT
|
14 |
-
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"receiveCategories",(function(){return F})),n.d(r,"fetchDomainSuggestions",(function(){return R})),n.d(r,"receiveDomainAvailability",(function(){return L})),n.d(r,"receiveDomainSuggestionsSuccess",(function(){return k})),n.d(r,"receiveDomainSuggestionsError",(function(){return M}));var o={};n.r(o),n.d(o,"isAvailable",(function(){return Et})),n.d(o,"getCategories",(function(){return _t})),n.d(o,"__internalGetDomainSuggestions",(function(){return wt}));var i={};n.r(i),n.d(i,"register",(function(){return xt}));var a={};n.r(a),n.d(a,"setPrices",(function(){return qt})),n.d(a,"resetPlan",(function(){return Yt}));var s={};n.r(s),n.d(s,"getPlanBySlug",(function(){return Kt})),n.d(s,"getDefaultPaidPlan",(function(){return Jt})),n.d(s,"getSupportedPlans",(function(){return Qt})),n.d(s,"getPlanByPath",(function(){return Xt})),n.d(s,"getPlansDetails",(function(){return Zt})),n.d(s,"getPlansPaths",(function(){return en})),n.d(s,"getPrices",(function(){return tn})),n.d(s,"isPlanEcommerce",(function(){return nn})),n.d(s,"isPlanFree",(function(){return rn}));var u={};n.r(u),n.d(u,"getPrices",(function(){return on}));var c={};n.r(c),n.d(c,"plansPaths",(function(){return Ht})),n.d(c,"PLAN_FREE",(function(){return Pt})),n.d(c,"PLAN_PERSONAL",(function(){return jt})),n.d(c,"PLAN_PREMIUM",(function(){return It})),n.d(c,"PLAN_BUSINESS",(function(){return Ft})),n.d(c,"PLAN_ECOMMERCE",(function(){return Rt})),n.d(c,"register",(function(){return sn}));var l={};n.r(l),n.d(l,"getSite",(function(){return pn}));var f={};n.r(f),n.d(f,"getState",(function(){return hn})),n.d(f,"getNewSite",(function(){return mn})),n.d(f,"getNewSiteError",(function(){return yn})),n.d(f,"isFetchingSite",(function(){return gn})),n.d(f,"isNewSite",(function(){return vn})),n.d(f,"getSite",(function(){return bn})),n.d(f,"isLaunched",(function(){return Sn}));var p={};n.r(p),n.d(p,"Visibility",(function(){return dn})),n.d(p,"register",(function(){return _n}));var d={};n.r(d),n.d(d,"getAllFeatures",(function(){return xn})),n.d(d,"getRecommendedPlanSlug",(function(){return Nn}));var h={};n.r(h),n.d(h,"featuresList",(function(){return On})),n.d(h,"register",(function(){return Tn}));var m={};n.r(m),n.d(m,"setSidebarFullscreen",(function(){return kn})),n.d(m,"unsetSidebarFullscreen",(function(){return Mn})),n.d(m,"setStep",(function(){return Dn})),n.d(m,"setDomain",(function(){return Un})),n.d(m,"unsetDomain",(function(){return Bn})),n.d(m,"confirmDomainSelection",(function(){return Hn})),n.d(m,"setDomainSearch",(function(){return Vn})),n.d(m,"setPlan",(function(){return Gn})),n.d(m,"unsetPlan",(function(){return Wn})),n.d(m,"updatePlan",(function(){return zn})),n.d(m,"launchSite",(function(){return qn})),n.d(m,"openSidebar",(function(){return Yn})),n.d(m,"closeSidebar",(function(){return $n})),n.d(m,"enableExperimental",(function(){return Kn}));var y={};n.r(y),n.d(y,"getLaunchSequence",(function(){return Jn})),n.d(y,"getLaunchStep",(function(){return Qn})),n.d(y,"getState",(function(){return Xn})),n.d(y,"hasPaidDomain",(function(){return Zn})),n.d(y,"getSelectedDomain",(function(){return er})),n.d(y,"getSelectedPlan",(function(){return tr})),n.d(y,"isStepCompleted",(function(){return nr})),n.d(y,"isFlowCompleted",(function(){return rr})),n.d(y,"isFlowStarted",(function(){return or})),n.d(y,"getFirstIncompleteStep",(function(){return ir}));var g,v=n(0),b="automattic/domains/suggestions";!function(e){e.Failure="failure",e.Pending="pending",e.Success="success",e.Uninitialized="uninitialized"}(g||(g={}));var S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function E(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function _(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function w(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function O(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(w(arguments[t]));return e}var C,x,N,A,T=n(19),P=n.n(T).a,j={state:g.Uninitialized,data:{},errorMessage:null,lastUpdated:-1/0,pendingSince:void 0},I=Object(v.combineReducers)({categories:function(e,t){return void 0===e&&(e=[]),"RECEIVE_CATEGORIES"===t.type?t.categories:e},domainSuggestions:function(e,t){var n;return void 0===e&&(e=j),"FETCH_DOMAIN_SUGGESTIONS"===t.type?S(S({},e),{state:g.Pending,errorMessage:null,pendingSince:t.timeStamp}):"RECEIVE_DOMAIN_SUGGESTIONS_SUCCESS"===t.type?S(S({},e),{state:g.Success,data:S(S({},e.data),(n={},n[P(t.queryObject)]=t.suggestions,n)),errorMessage:null,lastUpdated:t.timeStamp,pendingSince:void 0}):"RECEIVE_DOMAIN_SUGGESTIONS_ERROR"===t.type?S(S({},e),{state:g.Failure,errorMessage:t.errorMessage,lastUpdated:t.timeStamp,pendingSince:void 0}):e},availability:function(e,t){var n;return void 0===e&&(e={}),"RECEIVE_DOMAIN_AVAILABILITY"===t.type?S(S({},e),((n={})[t.domainName]=t.availability,n)):e}}),F=function(e){return{type:"RECEIVE_CATEGORIES",categories:e}},R=function(){return{type:"FETCH_DOMAIN_SUGGESTIONS",timeStamp:Date.now()}},L=function(e,t){return{type:"RECEIVE_DOMAIN_AVAILABILITY",domainName:e,availability:t}},k=function(e,t){return{type:"RECEIVE_DOMAIN_SUGGESTIONS_SUCCESS",queryObject:e,suggestions:t,timeStamp:Date.now()}},M=function(e){return{type:"RECEIVE_DOMAIN_SUGGESTIONS_ERROR",errorMessage:e,timeStamp:Date.now()}},D=n(20),U=n(9),B=n.n(U),H=n(3),V=n.n(H),G=n(4),W=n.n(G),z=n(21),q=n.n(z);C={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},x=["(","?"],N={")":["("],":":["?","?:"]},A=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var Y={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function $(e){var t=function(e){for(var t,n,r,o,i=[],a=[];t=e.match(A);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=a.pop();){if(N[n]){if(N[n][0]===o){n=N[n][1]||n;break}}else if(x.indexOf(o)>=0||C[o]<C[n]){a.push(o);break}i.push(o)}N[n]||a.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(a.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,a,s,u=[];for(n=0;n<e.length;n++){if(a=e[n],i=Y[a]){for(r=i.length,o=Array(r);r--;)o[r]=u.pop();try{s=i.apply(null,o)}catch(c){return c}}else s=t.hasOwnProperty(a)?t[a]:+a;u.push(s)}return u[0]}(t,e)}}var K={contextDelimiter:"",onMissingKey:null};function J(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},K)this.options[n]=void 0!==t&&n in t?t[n]:K[n]}J.prototype.getPluralForm=function(e,t){var n,r,o,i,a=this.pluralForms[e];return a||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=$(r),o=function(e){return+i({n:e})}),a=this.pluralForms[e]=o),a(t)},J.prototype.dcnpgettext=function(e,t,n,r,o){var i,a,s;return i=void 0===o?0:this.getPluralForm(e,o),a=n,t&&(a=t+this.options.contextDelimiter+n),(s=this.data[e][a])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var Q=n(22),X=n.n(Q),Z=n(23),ee=n.n(Z),te=n(10),ne=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function re(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(ne,(function(){var e,r,o,i,a;return e=arguments[3],r=arguments[5],"%"===(i=arguments[9])?"%":("*"===(o=arguments[7])&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(a=t[0][r]):(void 0===e&&(e=n),n++,a=t[e-1]),"f"===i?a=parseFloat(a)||0:"d"===i&&(a=parseInt(a)||0),void 0!==o&&("f"===i?a=a.toFixed(o):"s"===i&&(a=a.substr(0,o))),null!=a?a:"")}))}
|
15 |
/*
|
16 |
* Exposes number format capability
|
17 |
*
|
18 |
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
|
19 |
* @license See CREDITS.md
|
20 |
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
|
21 |
-
*/function oe(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,a=void 0===r?",":r,s=void 0===n?".":n,u="";return(u=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(u[1]||"").length<i&&(u[1]=u[1]||"",u[1]+=new Array(i-u[1].length+1).join("0")),u.join(s)}var ie=W()("i18n-calypso"),ae="number_format_decimals",se="number_format_thousands_sep",ue="messages",ce=[function(e){return e}],le={};function fe(){ye.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function pe(e){return Array.prototype.slice.call(e)}function de(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&fe("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",pe(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&fe("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",pe(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function he(e,t){return e.dcnpgettext(ue,t.context,t.original,t.plural,t.count)}function me(e,t){for(var n=ce.length-1;n>=0;n--){var r=ce[n](Object.assign({},t)),o=r.context?r.context+""+r.original:r.original;if(e.state.locale[o])return he(e.state.tannin,r)}return null}function ye(){if(!(this instanceof ye))return new ye;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:X()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new te.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}ye.throwErrors=!1,ye.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},ye.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},ye.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},ye.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return oe(e,n,r,o)},ye.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},ye.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==le[n+e])return le[n+e];var r=ee()().update(e).digest("hex");return le[n+e]=t?r.substr(0,t):r},a=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)ce.push(a(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var u=Number(o.substr(5));ce.push(a(u))}else for(var c=Number(o.substr(5,s)),l=Number(o.substr(6+s)),f=c;f<=l;f++)ce.push(a(f))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new J(V()({},ue,this.state.locale)),this.state.numberFormatSettings.decimal_point=he(this.state.tannin,de([ae])),this.state.numberFormatSettings.thousands_sep=he(this.state.tannin,de([se])),this.state.numberFormatSettings.decimal_point===ae&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===se&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},ye.prototype.getLocale=function(){return this.state.locale},ye.prototype.getLocaleSlug=function(){return this.state.localeSlug},ye.prototype.isRtl=function(){return"rtl"===this.state.textDirection},ye.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},ye.prototype.hasTranslation=function(){return!!me(this,de(arguments))},ye.prototype.translate=function(){var e=de(arguments),t=me(this,e);if(t||(t=he(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=re.apply(void 0,B()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=q()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},ye.prototype.reRenderTranslations=function(){ie("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},ye.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},ye.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var ge=ye,ve=n(11),be=n.n(ve),Se=n(24),Ee=n.n(Se),_e=n(25),we=n.n(_e),Oe=n(5),Ce=n.n(Oe),xe=n(26),Ne=n.n(xe),Ae=n(27),Te=n.n(Ae),Pe=n(1),je=n.n(Pe),Ie=n(28),Fe=n.n(Ie),Re=n(29),Le=n.n(Re),ke=n(30),Me=n(31);var De,Ue,Be=new ge,He=(Be.numberFormat.bind(Be),Be.translate.bind(Be)),Ve=(Be.configure.bind(Be),Be.setLocale.bind(Be),Be.getLocale.bind(Be),Be.getLocaleSlug.bind(Be),Be.addTranslations.bind(Be),Be.reRenderTranslations.bind(Be),Be.registerComponentUpdateHook.bind(Be),Be.registerTranslateHook.bind(Be),Be.state,Be.stateObserver,Be.on.bind(Be),Be.off.bind(Be),Be.emit.bind(Be),Ue={numberFormat:(De=Be).numberFormat.bind(De),translate:De.translate.bind(De)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(Be),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(ke.useSubscription)(t)}var r=Object(Me.createHigherOrderComponent)((function(e){return Object(Pe.forwardRef)((function(t,r){var o=n();return je.a.createElement(e,Le()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(Be)),Ge=(Ve.useRtl,Ve.withRtl,"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)),We=new Uint8Array(16);function ze(){if(!Ge)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ge(We)}for(var qe=[],Ye=0;Ye<256;++Ye)qe[Ye]=(Ye+256).toString(16).substr(1);var $e=function(e,t){var n=t||0,r=qe;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var Ke,Je=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||ze)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[r+i]=o[i];return t||$e(o)},Qe=n(18),Xe=n.n(Qe),Ze=n(6),et=n.n(Ze),tt=W()("wpcom-proxy-request"),nt="https://public-api.wordpress.com",rt=window.location.protocol+"//"+window.location.host,ot=function(){var e=!1;try{window.postMessage({toString:function(){e=!0}},"*")}catch(t){}return e}(),it=function(){try{return new window.File(["a"],"test.jpg",{type:"image/jpeg"}),!0}catch(e){return!1}}(),at=null,st=!1,ut={},ct=!!window.ProgressEvent&&!!window.FormData;tt('using "origin": %o',rt);var lt=function(e,t){var n=Object.assign({},e);tt("request(%o)",n),at||mt();var r=Je();n.callback=r,n.supports_args=!0,n.supports_error_obj=!0,n.supports_progress=ct,n.method=String(n.method||"GET").toUpperCase(),tt("params object: %o",n);var o=new window.XMLHttpRequest;if(o.params=n,ut[r]=o,"function"==typeof t){var i=!1,a=function(e){if(!i){i=!0;var n=e.error||e.err||e;tt("error: ",n),tt("headers: ",e.headers),t(n,null,e.headers)}};o.addEventListener("load",(function(e){if(!i){i=!0;var n=e.response||o.response;tt("body: ",n),tt("headers: ",e.headers),t(null,n,e.headers)}})),o.addEventListener("abort",a),o.addEventListener("error",a)}return st?pt(n):(tt("buffering API request since proxying <iframe> is not yet loaded"),Ke.push(n)),o},ft=function(e,t){return"function"==typeof t?lt(e,t):new Promise((function(t,n){lt(e,(function(e,r){e?n(e):t(r)}))}))};function pt(e){tt("sending API request to proxy <iframe> %o",e),e.formData&&function(e){if(!window.chrome||!it)return;for(var t=0;t<e.length;t++){var n=ht(e[t][1]);n&&(e[t][1]=new window.File([n],n.name,{type:n.type}))}}(e.formData),at.contentWindow.postMessage(ot?JSON.stringify(e):e,nt)}function dt(e){return e&&"[object File]"===Object.prototype.toString.call(e)}function ht(e){return dt(e)?e:"object"==typeof e&&dt(e.fileContents)?e.fileContents:null}function mt(){tt("install()"),at&&(tt("uninstall()"),window.removeEventListener("message",yt),document.body.removeChild(at),st=!1,at=null),Ke=[],window.addEventListener("message",yt),(at=document.createElement("iframe")).src=nt+"/wp-admin/rest-proxy/?v=2.0#"+rt,at.style.display="none",document.body.appendChild(at)}function yt(e){if(tt("onmessage"),e.origin===nt){var t=e.data;if(!t)return tt("no `data`, bailing");if("ready"!==t){if(ot&&"string"==typeof t&&(t=JSON.parse(t)),t.upload||t.download)return function(e){tt('got "progress" event: %o',e);var t=ut[e.callbackId];if(t){var n=new et.a("progress",e);(e.upload?t.upload:t).dispatchEvent(n)}}(t);if(!t.length)return tt("`e.data` doesn't appear to be an Array, bailing...");var n=t[t.length-1];if(!(n in ut))return tt("bailing, no matching request with callback: %o",n);var r=ut[n],o=r.params,i=t[0],a=t[1],s=t[2];if(207===a||delete ut[n],o.metaAPI?a="metaAPIupdated"===i?200:500:tt("got %o status code for URL: %o",a,o.path),"object"==typeof s&&(s.status=a),a&&2===Math.floor(a/100))!function(e,t,n){var r=new et.a("load");r.data=r.body=r.response=t,r.headers=n,e.dispatchEvent(r)}(r,i,s);else!function(e,t,n){var r=new et.a("error");r.error=r.err=t,r.headers=n,e.dispatchEvent(r)}(r,Xe()(o,a,i),s)}else!function(){if(tt('proxy <iframe> "load" event'),st=!0,Ke){for(var e=0;e<Ke.length;e++)pt(Ke[e]);Ke=null}}()}else tt("ignoring message... %o !== %o",e.origin,nt)}var gt=ft,vt=function(e){return{type:"WPCOM_REQUEST",request:e}},bt=function(e,t){return{type:"FETCH_AND_PARSE",resource:e,options:t}},St={WPCOM_REQUEST:function(e){var t=e.request;return gt(t)},FETCH_AND_PARSE:function(e){var t,n,r,o,i=e.resource,a=e.options;return t=void 0,n=void 0,o=function(){var e,t;return _(this,(function(n){switch(n.label){case 0:return[4,window.fetch(i,a)];case 1:return e=n.sent(),t={ok:e.ok},[4,e.json()];case 2:return[2,(t.body=n.sent(),t)]}}))},new((r=void 0)||(r=Promise))((function(e,i){function a(e){try{u(o.next(e))}catch(t){i(t)}}function s(e){try{u(o.throw(e))}catch(t){i(t)}}function u(t){t.done?e(t.value):new r((function(e){e(t.value)})).then(a,s)}u((o=o.apply(t,n||[])).next())}))},RELOAD_PROXY:function(){mt()},REQUEST_ALL_BLOGS_ACCESS:function(){return ft({metaAPI:{accessAllUsersBlogs:!0}})},WAIT:function(e){var t=e.ms;return new Promise((function(e){return setTimeout(e,t)}))}},Et=function(e){var t,n;return _(this,(function(r){switch(r.label){case 0:t="https://public-api.wordpress.com/rest/v1.3/domains/"+encodeURIComponent(e)+"/is-available?is_cart_pre_check=true",r.label=1;case 1:return r.trys.push([1,3,,4]),[4,bt(t)];case 2:return n=r.sent().body,[2,L(e,n)];case 3:return r.sent(),[2,L(e,{domain_name:e,mappable:"unknown",status:"unknown",supports_privacy:!1})];case 4:return[2]}}))};function _t(){var e;return _(this,(function(t){switch(t.label){case 0:return[4,bt("https://public-api.wordpress.com/wpcom/v2/onboarding/domains/categories")];case 1:return e=t.sent(),[2,F(e.body)]}}))}function wt(e){var t,n;return _(this,(function(r){switch(r.label){case 0:return e.query?[4,R()]:[2,M("Empty query")];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,vt({apiVersion:"1.1",path:"/domains/suggestions",query:Object(D.stringify)(e)})];case 3:return t=r.sent(),[3,5];case 4:return n=r.sent(),[2,M(n.message||He("Error while fetching server response"))];case 5:return t&&""!==t?[2,k(e,t)]:[2,M(He("Invalid response from the server"))]}}))}var Ot=function(e){function t(t,n){return S(S({include_wordpressdotcom:n.only_wordpressdotcom||!1,include_dotblogsubdomain:!1,only_wordpressdotcom:!1,quantity:5,vendor:e},n),{query:t.trim().toLocaleLowerCase()})}return{getCategories:function(e){return O(e.categories.filter((function(e){return null!==e.tier})).sort((function(e,t){return e>t?1:-1})),e.categories.filter((function(e){return null===e.tier})).sort((function(e,t){return e.title.localeCompare(t.title)})))},getDomainSuggestions:function(e,n,r){void 0===r&&(r={});var o=t(n,r);return Object(v.select)(b).__internalGetDomainSuggestions(o)},getDomainState:function(e){return e.domainSuggestions.state},getDomainErrorMessage:function(e){return e.domainSuggestions.errorMessage},getDomainSuggestionVendor:function(){return e},isLoadingDomainSuggestions:function(e,n,r){void 0===r&&(r={});var o=t(n,r);return Object(v.select)("core/data").isResolving(b,"__internalGetDomainSuggestions",[o])},__internalGetDomainSuggestions:function(e,t){return e.domainSuggestions.data[P(t)]},isAvailable:function(e,t){return e.availability[t]},getDomainAvailabilities:function(e){return e.availability}}},Ct=!1;function xt(e){var t=e.vendor;return Ct||(Ct=!0,Object(v.registerStore)(b,{actions:r,controls:St,reducer:I,resolvers:o,selectors:Ot(t)})),b}var Nt,At,Tt=n(2),Pt="free_plan",jt="personal-bundle",It="value_bundle",Ft="business-bundle",Rt="ecommerce-bundle",Lt="automattic/onboard/plans",kt=It,Mt=[jt,It,Ft,Rt],Dt={USD:{format:"SYMBOL_THEN_AMOUNT",symbol:"$",decimal:2},GBP:{format:"SYMBOL_THEN_AMOUNT",symbol:"£",decimal:2},JPY:{format:"SYMBOL_THEN_AMOUNT",symbol:"¥",decimal:0},BRL:{format:"SYMBOL_THEN_AMOUNT",symbol:"R$",decimal:2},EUR:{format:"SYMBOL_THEN_AMOUNT",symbol:"€",decimal:2},NZD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NZ$",decimal:2},AUD:{format:"SYMBOL_THEN_AMOUNT",symbol:"A$",decimal:2},CAD:{format:"SYMBOL_THEN_AMOUNT",symbol:"C$",decimal:2},IDR:{format:"AMOUNT_THEN_SYMBOL",symbol:"Rp",decimal:0},INR:{format:"AMOUNT_THEN_SYMBOL",symbol:"₹",decimal:0},ILS:{format:"AMOUNT_THEN_SYMBOL",symbol:"₪",decimal:2},RUB:{format:"AMOUNT_THEN_SYMBOL",symbol:"₽",decimal:2},MXN:{format:"SYMBOL_THEN_AMOUNT",symbol:"MX$",decimal:2},SEK:{format:"AMOUNT_THEN_SYMBOL",symbol:"SEK",decimal:2},HUF:{format:"AMOUNT_THEN_SYMBOL",symbol:"Ft",decimal:0},CHF:{format:"AMOUNT_THEN_SYMBOL",symbol:"CHF",decimal:2},CZK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kč",decimal:2},DKK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Dkr",decimal:2},HKD:{format:"AMOUNT_THEN_SYMBOL",symbol:"HK$",decimal:2},NOK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kr",decimal:2},PHP:{format:"AMOUNT_THEN_SYMBOL",symbol:"₱",decimal:2},PLN:{format:"AMOUNT_THEN_SYMBOL",symbol:"PLN",decimal:2},SGD:{format:"SYMBOL_THEN_AMOUNT",symbol:"S$",decimal:2},TWD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NT$",decimal:0},THB:{format:"SYMBOL_THEN_AMOUNT",symbol:"฿",decimal:2},TRY:{format:"AMOUNT_THEN_SYMBOL",symbol:"TL",decimal:2}},Ut=["Remove WordPress.com ads","Email & basic live chat support","Collect recurring payments","Collect one-time payments","Earn ad revenue","Premium themes","Upload videos","Google Analytics support","Business features (incl. SEO)","Upload themes","Install plugins","Accept payments in 60+ countries"],Bt=((Nt={})[Pt]={title:He("Free"),description:He("Create a beautiful, simple website in minutes"),productId:1,storeSlug:Pt,pathSlug:"beginner",features:["3 GB storage space"],isFree:!0},Nt[jt]={title:He("Personal"),description:He("Best for personal use"),productId:1009,storeSlug:jt,pathSlug:"personal",features:O(["6 GB storage space"],Ut.slice(0,3))},Nt[It]={title:He("Premium"),description:He("Best for freelancers"),productId:1003,storeSlug:It,pathSlug:"premium",features:O(["13 GB storage space"],Ut.slice(0,8)),isPopular:!0},Nt[Ft]={title:He("Business"),description:He("Best for small businesses"),productId:1008,storeSlug:Ft,pathSlug:"business",features:O(["200 GB storage space"],Ut.slice(0,11))},Nt[Rt]={title:He("eCommerce"),description:He("Best for online stores"),productId:1011,storeSlug:Rt,pathSlug:"ecommerce",features:O(["200 GB storage space"],Ut)},Nt),Ht=Object.keys(Bt).map((function(e){return Bt[e].pathSlug})),Vt=[{id:"general",name:null,features:[{name:"Free domain for One Year",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Email & basic live chat support",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"24/7 Priority live chat support",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Preinstalled SSL security",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Jetpack essential features",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Storage",type:"text",data:["3 GB","6 GB","13 GB","200 GB","200 GB"]},{name:"Dozens of free designs",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Remove WordPress.com ads",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Unlimited premium themes",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced design customization",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Get personalized help",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Install plugins",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Upload themes",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Remove WordPress.com branding",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Automated backup & one-click rewind",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"SFTP and database access",type:"checkbox",data:[!1,!1,!1,!0,!0]}]},{id:"commerce",name:"Commerce",features:[{name:"Sell subscriptions (recurring payments)",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Sell single items (simple payments)",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Accept payments in 60+ countries",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Integrations with top shipping carriers",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Sell anything (products and/or services)",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Premium customizable starter themes",type:"checkbox",data:[!1,!1,!1,!1,!0]}]},{id:"marketing",name:"Marketing",features:[{name:"WordAds",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced social media tools",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"VideoPress support",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"SEO tools",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Commerce marketing tools",type:"checkbox",data:[!1,!1,!1,!1,!0]}]}],Gt=Object.keys(Bt),Wt={supportedPlanSlugs:Gt,prices:(At={},At[Pt]="",At[jt]="",At[It]="",At[Ft]="",At[Rt]="",At)},zt=function(e,t){switch(void 0===e&&(e=Wt),t.type){case"SET_PRICES":return S(S({},e),{prices:t.prices});default:return e}},qt=function(e){return{type:"SET_PRICES",prices:e}},Yt=function(){return{type:"RESET_PLAN"}};function $t(e){return Bt[e]}var Kt=function(e,t){return $t(t)},Jt=function(){return $t(kt)},Qt=function(e){return e.supportedPlanSlugs.map($t)},Xt=function(e,t){return t&&Qt(e).find((function(e){return(null==e?void 0:e.pathSlug)===t}))},Zt=function(){return Vt},en=function(e){return Qt(e).map((function(e){return null==e?void 0:e.pathSlug}))},tn=function(e){return e.prices},nn=function(e,t){return t===Rt},rn=function(e,t){return t===Pt};function on(){var e,t,n;return _(this,(function(r){switch(r.label){case 0:return[4,Object(Tt.apiFetch)({global:!0,url:"https://public-api.wordpress.com/rest/v1.5/plans",mode:"cors",credentials:"omit"})];case 1:return e=r.sent(),t=e.filter((function(e){return-1!==Gt.indexOf(e.product_slug)})),n=t.reduce((function(e,t){return e[t.product_slug]=function(e){var t=Dt[e.currency_code],n=e.raw_price/12;return Number.isInteger(n)||(n=n.toFixed(t.decimal)),"AMOUNT_THEN_SYMBOL"===t.format?""+n+t.symbol:""+t.symbol+n}(t),e}),{}),[4,qt(n)];case 2:return r.sent(),[2]}}))}var an=!1;function sn(){return an||(an=!0,Object(v.registerStore)(Lt,{resolvers:u,actions:a,controls:Tt.controls,reducer:zt,selectors:s})),Lt}var un="automattic/site",cn=Object(v.combineReducers)({data:function(e,t){return"RECEIVE_NEW_SITE"===t.type?t.response.blog_details:"RECEIVE_NEW_SITE_FAILED"!==t.type&&"RESET_SITE_STORE"!==t.type?e:void 0},error:function(e,t){switch(t.type){case"FETCH_NEW_SITE":case"RECEIVE_NEW_SITE":case"RESET_SITE_STORE":case"RESET_RECEIVE_NEW_SITE_FAILED":return;case"RECEIVE_NEW_SITE_FAILED":return{error:t.error.error,status:t.error.status,statusCode:t.error.statusCode,name:t.error.name,message:t.error.message}}return e},isFetching:function(e,t){switch(void 0===e&&(e=!1),t.type){case"FETCH_NEW_SITE":return!0;case"RECEIVE_NEW_SITE":case"RECEIVE_NEW_SITE_FAILED":case"RESET_SITE_STORE":case"RESET_RECEIVE_NEW_SITE_FAILED":return!1}return e}}),ln=Object(v.combineReducers)({newSite:cn,sites:function(e,t){var n;if(void 0===e&&(e={}),"RECEIVE_SITE"===t.type)return S(S({},e),((n={})[t.siteId]=t.response,n));if("RECEIVE_SITE_FAILED"===t.type){var r=e,o=t.siteId,i=(r[o],E(r,["symbol"==typeof o?o:o+""]));return S({},i)}return"RESET_SITE_STORE"===t.type?{}:e},launchStatus:function(e,t){var n;return void 0===e&&(e={}),"LAUNCHED_SITE"===t.type?S(S({},e),((n={})[t.siteId]=!0,n)):e}});function fn(e){var t=function(){return{type:"FETCH_NEW_SITE"}},n=function(e){return{type:"RECEIVE_NEW_SITE",response:e}},r=function(e){return{type:"RECEIVE_NEW_SITE_FAILED",error:e}};var o=function(e){return{type:"LAUNCHED_SITE",siteId:e}};return{fetchNewSite:t,receiveNewSite:n,receiveNewSiteFailed:r,resetNewSiteFailed:function(){return{type:"RESET_RECEIVE_NEW_SITE_FAILED"}},createSite:function(t){var o,i,a,s,u,c;return _(this,(function(l){switch(l.label){case 0:return[4,{type:"FETCH_NEW_SITE"}];case 1:l.sent(),l.label=2;case 2:return l.trys.push([2,5,,7]),o=t.authToken,i=E(t,["authToken"]),a={client_id:e.client_id,client_secret:e.client_secret,find_available_url:!0,public:-1},s=S(S(S({},a),i),{validate:!1}),[4,vt({path:"/sites/new",apiVersion:"1.1",method:"post",body:s,token:o})];case 3:return u=l.sent(),[4,n(u)];case 4:return l.sent(),[2,!0];case 5:return c=l.sent(),[4,r(c)];case 6:return l.sent(),[2,!1];case 7:return[2]}}))},receiveSite:function(e,t){return{type:"RECEIVE_SITE",siteId:e,response:t}},receiveSiteFailed:function(e,t){return{type:"RECEIVE_SITE_FAILED",siteId:e,response:t}},reset:function(){return{type:"RESET_SITE_STORE"}},launchSite:function(e){return _(this,(function(t){switch(t.label){case 0:return[4,vt({path:"/sites/"+e+"/launch",apiVersion:"1.1",method:"post"})];case 1:return t.sent(),[4,o(e)];case 2:return t.sent(),[2,!0]}}))},launchedSite:o,getCart:function(e){return _(this,(function(t){switch(t.label){case 0:return[4,vt({path:"/me/shopping-cart/"+e,apiVersion:"1.1",method:"GET"})];case 1:return[2,t.sent()]}}))},setCart:function(e,t){return _(this,(function(n){switch(n.label){case 0:return[4,vt({path:"/me/shopping-cart/"+e,apiVersion:"1.1",method:"POST",body:t})];case 1:return[2,n.sent()]}}))}}}function pn(e){var t;return _(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,5]),[4,vt({path:"/sites/"+encodeURIComponent(e),apiVersion:"1.1"})];case 1:return t=n.sent(),[4,Object(v.dispatch)(un).receiveSite(e,t)];case 2:return n.sent(),[3,5];case 3:return n.sent(),[4,Object(v.dispatch)(un).receiveSiteFailed(e,void 0)];case 4:return n.sent(),[3,5];case 5:return[2]}}))}var dn,hn=function(e){return e},mn=function(e){return e.newSite.data},yn=function(e){return e.newSite.error},gn=function(e){return e.newSite.isFetching},vn=function(e){return!!e.newSite.data},bn=function(e,t){return e.sites[t]},Sn=function(e,t){return e.launchStatus[t]};!function(e){e[e.PublicIndexed=1]="PublicIndexed",e[e.PublicNotIndexed=0]="PublicNotIndexed",e[e.Private=-1]="Private"}(dn||(dn={}));var En=!1;function _n(e){return En||(En=!0,Object(v.registerStore)(un,{actions:fn(e),controls:St,reducer:ln,resolvers:l,selectors:f})),un}var wn="automattic/wpcom-features",On={domain:{id:"domain",minSupportedPlan:jt},store:{id:"store",minSupportedPlan:Rt},seo:{id:"seo",minSupportedPlan:Ft},plugins:{id:"plugins",minSupportedPlan:Ft},"ad-free":{id:"ad-free",minSupportedPlan:jt},"image-storage":{id:"image-storage",minSupportedPlan:It},"video-storage":{id:"video-storage",minSupportedPlan:It},support:{id:"support",minSupportedPlan:Ft}},Cn=function(e){return void 0===e&&(e=On),e},xn=function(e){return e},Nn=function(e,t){var n=xn(e);return t.length?t.reduce((function(e,t){var r=n[t].minSupportedPlan;return Mt.indexOf(r)>Mt.indexOf(e)?r:e}),n[t[0]].minSupportedPlan):""},An=!1;function Tn(){return An||(An=!0,Object(v.registerStore)(wn,{controls:Tt.controls,reducer:Cn,selectors:d})),wn}i.register({vendor:"variation2_front"}),c.register(),p.register({client_id:"",client_secret:""});var Pn=window._currentSiteId,jn={Name:"name",Domain:"domain",Plan:"plan",Final:"final"},In=[jn.Name,jn.Domain,jn.Plan,jn.Final],Fn=Object(v.combineReducers)({step:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jn.Name,t=arguments.length>1?arguments[1]:void 0;return"SET_STEP"===t.type?t.step:e},domain:function(e,t){return"SET_DOMAIN"===t.type?t.domain:"UNSET_DOMAIN"!==t.type?e:void 0},confirmedDomainSelection:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"CONFIRM_DOMAIN_SELECTION"===t.type||e},domainSearch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_DOMAIN_SEARCH"===t.type?t.domainSearch:e},plan:function(e,t){return"SET_PLAN"===t.type?t.plan:"UNSET_PLAN"!==t.type?e:void 0},isSidebarOpen:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"OPEN_SIDEBAR"===t.type||"CLOSE_SIDEBAR"!==t.type&&e},isSidebarFullscreen:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"SET_SIDEBAR_FULLSCREEN"===t.type||"UNSET_SIDEBAR_FULLSCREEN"!==t.type&&e},isExperimental:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"ENABLE_EXPERIMENTAL"===t.type||e}}),Rn=regeneratorRuntime.mark(zn),Ln=regeneratorRuntime.mark(qn),kn=function(){return{type:"SET_SIDEBAR_FULLSCREEN"}},Mn=function(){return{type:"UNSET_SIDEBAR_FULLSCREEN"}},Dn=function(e){return{type:"SET_STEP",step:e}},Un=function(e){return{type:"SET_DOMAIN",domain:e}},Bn=function(){return{type:"UNSET_DOMAIN"}},Hn=function(){return{type:"CONFIRM_DOMAIN_SELECTION"}},Vn=function(e){return{type:"SET_DOMAIN_SEARCH",domainSearch:e}},Gn=function(e){return{type:"SET_PLAN",plan:e}},Wn=function(){return{type:"UNSET_PLAN"}};function zn(e){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(Tt.select)("automattic/onboard/plans","getPlanBySlug",e);case 2:return t=n.sent,n.next=5,Gn(t);case 5:case"end":return n.stop()}}),Rn)}function qn(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(Tt.dispatch)("automattic/site","launchSite",Pn);case 3:return e=t.sent,t.abrupt("return",e);case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),Ln,null,[[0,7]])}var Yn=function(){return{type:"OPEN_SIDEBAR"}},$n=function(){return{type:"CLOSE_SIDEBAR"}},Kn=function(){return{type:"ENABLE_EXPERIMENTAL"}},Jn=function(){return In},Qn=function(){return jn},Xn=function(e){return e},Zn=function(e){return!!e.domain&&!e.domain.is_free},er=function(e){return e.domain},tr=function(e){return e.plan},nr=function(e,t){if(t===jn.Plan)return!!tr(e);if(t===jn.Name){var n=Object(v.select)("core").getEntityRecord("root","site",void 0);return!!(null==n?void 0:n.title)}return t===jn.Domain&&(!!er(e)||e.confirmedDomainSelection)},rr=function(e){return In.slice(0,In.length-1).every((function(t){return nr(e,t)}))},or=function(e){return In.some((function(t){return nr(e,t)}))},ir=function(e){return In.find((function(t){return!nr(e,t)}))};var ar,sr,ur,cr,lr,fr,pr=(sr=ar="WP_LAUNCH",ur=ar+"_TS",cr={},lr={getItem:function(e){return cr.hasOwnProperty(e)?cr[e]:null},setItem:function(e,t){cr[e]=String(t)},removeItem:function(e){delete cr[e]}},fr=function(){try{return window.localStorage.setItem("WP_ONBOARD_TEST","1"),window.localStorage.removeItem("WP_ONBOARD_TEST"),!0}catch(e){return!1}}()?window.localStorage:lr,{storageKey:sr,storage:{getItem:function(e){var t=fr.getItem(ur);return t&&function(e){var t=Number(e);return Boolean(t)&&t+6048e5>Date.now()}(t)&&!new URLSearchParams(window.location.search).has("fresh")?fr.getItem(e):(fr.removeItem(sr),fr.removeItem(ur),null)},setItem:function(e,t){fr.setItem(ur,JSON.stringify(Date.now())),fr.setItem(e,t)}}});Object(v.use)(v.plugins.persistence,pr),Object(v.registerStore)("automattic/launch",{actions:m,controls:Tt.controls,reducer:Fn,selectors:y,persist:["domain","domainSearch","plan","confirmedDomainSelection","isExperimental"]}),h.register()}]));
|
11 |
object-assign
|
12 |
(c) Sindre Sorhus
|
13 |
@license MIT
|
14 |
+
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"receiveCategories",(function(){return L})),n.d(r,"fetchDomainSuggestions",(function(){return R})),n.d(r,"receiveDomainAvailability",(function(){return k})),n.d(r,"receiveDomainSuggestionsSuccess",(function(){return M})),n.d(r,"receiveDomainSuggestionsError",(function(){return D}));var o={};n.r(o),n.d(o,"isAvailable",(function(){return _t})),n.d(o,"getCategories",(function(){return wt})),n.d(o,"__internalGetDomainSuggestions",(function(){return Ot}));var i={};n.r(i),n.d(i,"register",(function(){return Nt}));var a={};n.r(a),n.d(a,"setPrices",(function(){return qt})),n.d(a,"resetPlan",(function(){return $t}));var s={};n.r(s),n.d(s,"getPlanBySlug",(function(){return Jt})),n.d(s,"getDefaultPaidPlan",(function(){return Qt})),n.d(s,"getSupportedPlans",(function(){return Xt})),n.d(s,"getPlanByPath",(function(){return Zt})),n.d(s,"getPlansDetails",(function(){return en})),n.d(s,"getPlansPaths",(function(){return tn})),n.d(s,"getPrices",(function(){return nn})),n.d(s,"isPlanEcommerce",(function(){return rn})),n.d(s,"isPlanFree",(function(){return on}));var u={};n.r(u),n.d(u,"getPrices",(function(){return an}));var c={};n.r(c),n.d(c,"plansPaths",(function(){return Vt})),n.d(c,"PLAN_FREE",(function(){return jt})),n.d(c,"PLAN_PERSONAL",(function(){return It})),n.d(c,"PLAN_PREMIUM",(function(){return Ft})),n.d(c,"PLAN_BUSINESS",(function(){return Lt})),n.d(c,"PLAN_ECOMMERCE",(function(){return Rt})),n.d(c,"register",(function(){return un}));var l={};n.r(l),n.d(l,"getSite",(function(){return dn}));var f={};n.r(f),n.d(f,"getState",(function(){return mn})),n.d(f,"getNewSite",(function(){return yn})),n.d(f,"getNewSiteError",(function(){return gn})),n.d(f,"isFetchingSite",(function(){return vn})),n.d(f,"isNewSite",(function(){return bn})),n.d(f,"getSite",(function(){return Sn})),n.d(f,"isLaunched",(function(){return En}));var p={};n.r(p),n.d(p,"Visibility",(function(){return hn})),n.d(p,"register",(function(){return wn}));var d={};n.r(d),n.d(d,"setSidebarFullscreen",(function(){return Tn})),n.d(d,"unsetSidebarFullscreen",(function(){return Pn})),n.d(d,"setStep",(function(){return jn})),n.d(d,"setDomain",(function(){return In})),n.d(d,"unsetDomain",(function(){return Fn})),n.d(d,"confirmDomainSelection",(function(){return Ln})),n.d(d,"setDomainSearch",(function(){return Rn})),n.d(d,"setPlan",(function(){return kn})),n.d(d,"unsetPlan",(function(){return Mn})),n.d(d,"updatePlan",(function(){return Dn})),n.d(d,"launchSite",(function(){return Un})),n.d(d,"openSidebar",(function(){return Bn})),n.d(d,"closeSidebar",(function(){return Hn})),n.d(d,"enableExperimental",(function(){return Vn}));var h={};n.r(h),n.d(h,"getLaunchSequence",(function(){return Gn})),n.d(h,"getLaunchStep",(function(){return Wn})),n.d(h,"getState",(function(){return zn})),n.d(h,"hasPaidDomain",(function(){return Yn})),n.d(h,"getSelectedDomain",(function(){return qn})),n.d(h,"getSelectedPlan",(function(){return $n})),n.d(h,"isStepCompleted",(function(){return Kn})),n.d(h,"isFlowCompleted",(function(){return Jn})),n.d(h,"isFlowStarted",(function(){return Qn})),n.d(h,"getFirstIncompleteStep",(function(){return Xn}));var m={};n.r(m),n.d(m,"STORE_KEY",(function(){return On})),n.d(m,"register",(function(){return sr}));var y={};n.r(y),n.d(y,"getAllFeatures",(function(){return fr})),n.d(y,"getRecommendedPlanSlug",(function(){return pr}));var g={};n.r(g),n.d(g,"featuresList",(function(){return cr})),n.d(g,"register",(function(){return hr}));var v,b=n(0),S="automattic/domains/suggestions";!function(e){e.Failure="failure",e.Pending="pending",e.Success="success",e.Uninitialized="uninitialized"}(v||(v={}));var E=function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function _(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function w(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function O(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(O(arguments[t]));return e}var x,N,A,T,P=n(19),j=n.n(P).a,I={state:v.Uninitialized,data:{},errorMessage:null,lastUpdated:-1/0,pendingSince:void 0},F=Object(b.combineReducers)({categories:function(e,t){return void 0===e&&(e=[]),"RECEIVE_CATEGORIES"===t.type?t.categories:e},domainSuggestions:function(e,t){var n;return void 0===e&&(e=I),"FETCH_DOMAIN_SUGGESTIONS"===t.type?E(E({},e),{state:v.Pending,errorMessage:null,pendingSince:t.timeStamp}):"RECEIVE_DOMAIN_SUGGESTIONS_SUCCESS"===t.type?E(E({},e),{state:v.Success,data:E(E({},e.data),(n={},n[j(t.queryObject)]=t.suggestions,n)),errorMessage:null,lastUpdated:t.timeStamp,pendingSince:void 0}):"RECEIVE_DOMAIN_SUGGESTIONS_ERROR"===t.type?E(E({},e),{state:v.Failure,errorMessage:t.errorMessage,lastUpdated:t.timeStamp,pendingSince:void 0}):e},availability:function(e,t){var n;return void 0===e&&(e={}),"RECEIVE_DOMAIN_AVAILABILITY"===t.type?E(E({},e),((n={})[t.domainName]=t.availability,n)):e}}),L=function(e){return{type:"RECEIVE_CATEGORIES",categories:e}},R=function(){return{type:"FETCH_DOMAIN_SUGGESTIONS",timeStamp:Date.now()}},k=function(e,t){return{type:"RECEIVE_DOMAIN_AVAILABILITY",domainName:e,availability:t}},M=function(e,t){return{type:"RECEIVE_DOMAIN_SUGGESTIONS_SUCCESS",queryObject:e,suggestions:t,timeStamp:Date.now()}},D=function(e){return{type:"RECEIVE_DOMAIN_SUGGESTIONS_ERROR",errorMessage:e,timeStamp:Date.now()}},U=n(20),B=n(9),H=n.n(B),V=n(3),G=n.n(V),W=n(4),z=n.n(W),Y=n(21),q=n.n(Y);x={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},N=["(","?"],A={")":["("],":":["?","?:"]},T=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var $={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function K(e){var t=function(e){for(var t,n,r,o,i=[],a=[];t=e.match(T);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=a.pop();){if(A[n]){if(A[n][0]===o){n=A[n][1]||n;break}}else if(N.indexOf(o)>=0||x[o]<x[n]){a.push(o);break}i.push(o)}A[n]||a.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(a.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,a,s,u=[];for(n=0;n<e.length;n++){if(a=e[n],i=$[a]){for(r=i.length,o=Array(r);r--;)o[r]=u.pop();try{s=i.apply(null,o)}catch(c){return c}}else s=t.hasOwnProperty(a)?t[a]:+a;u.push(s)}return u[0]}(t,e)}}var J={contextDelimiter:"",onMissingKey:null};function Q(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},J)this.options[n]=void 0!==t&&n in t?t[n]:J[n]}Q.prototype.getPluralForm=function(e,t){var n,r,o,i,a=this.pluralForms[e];return a||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=K(r),o=function(e){return+i({n:e})}),a=this.pluralForms[e]=o),a(t)},Q.prototype.dcnpgettext=function(e,t,n,r,o){var i,a,s;return i=void 0===o?0:this.getPluralForm(e,o),a=n,t&&(a=t+this.options.contextDelimiter+n),(s=this.data[e][a])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var X=n(22),Z=n.n(X),ee=n(23),te=n.n(ee),ne=n(10),re=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function oe(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(re,(function(){var e,r,o,i,a;return e=arguments[3],r=arguments[5],"%"===(i=arguments[9])?"%":("*"===(o=arguments[7])&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(a=t[0][r]):(void 0===e&&(e=n),n++,a=t[e-1]),"f"===i?a=parseFloat(a)||0:"d"===i&&(a=parseInt(a)||0),void 0!==o&&("f"===i?a=a.toFixed(o):"s"===i&&(a=a.substr(0,o))),null!=a?a:"")}))}
|
15 |
/*
|
16 |
* Exposes number format capability
|
17 |
*
|
18 |
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
|
19 |
* @license See CREDITS.md
|
20 |
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
|
21 |
+
*/function ie(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,a=void 0===r?",":r,s=void 0===n?".":n,u="";return(u=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(u[1]||"").length<i&&(u[1]=u[1]||"",u[1]+=new Array(i-u[1].length+1).join("0")),u.join(s)}var ae=z()("i18n-calypso"),se="number_format_decimals",ue="number_format_thousands_sep",ce="messages",le=[function(e){return e}],fe={};function pe(){ge.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function de(e){return Array.prototype.slice.call(e)}function he(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&pe("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",de(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&pe("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",de(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function me(e,t){return e.dcnpgettext(ce,t.context,t.original,t.plural,t.count)}function ye(e,t){for(var n=le.length-1;n>=0;n--){var r=le[n](Object.assign({},t)),o=r.context?r.context+""+r.original:r.original;if(e.state.locale[o])return me(e.state.tannin,r)}return null}function ge(){if(!(this instanceof ge))return new ge;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:Z()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new ne.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}ge.throwErrors=!1,ge.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},ge.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},ge.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},ge.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return ie(e,n,r,o)},ge.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},ge.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==fe[n+e])return fe[n+e];var r=te()().update(e).digest("hex");return fe[n+e]=t?r.substr(0,t):r},a=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)le.push(a(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var u=Number(o.substr(5));le.push(a(u))}else for(var c=Number(o.substr(5,s)),l=Number(o.substr(6+s)),f=c;f<=l;f++)le.push(a(f))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new Q(G()({},ce,this.state.locale)),this.state.numberFormatSettings.decimal_point=me(this.state.tannin,he([se])),this.state.numberFormatSettings.thousands_sep=me(this.state.tannin,he([ue])),this.state.numberFormatSettings.decimal_point===se&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===ue&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},ge.prototype.getLocale=function(){return this.state.locale},ge.prototype.getLocaleSlug=function(){return this.state.localeSlug},ge.prototype.isRtl=function(){return"rtl"===this.state.textDirection},ge.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},ge.prototype.hasTranslation=function(){return!!ye(this,he(arguments))},ge.prototype.translate=function(){var e=he(arguments),t=ye(this,e);if(t||(t=me(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=oe.apply(void 0,H()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=q()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},ge.prototype.reRenderTranslations=function(){ae("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},ge.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},ge.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var ve=ge,be=n(11),Se=n.n(be),Ee=n(24),_e=n.n(Ee),we=n(25),Oe=n.n(we),Ce=n(5),xe=n.n(Ce),Ne=n(26),Ae=n.n(Ne),Te=n(27),Pe=n.n(Te),je=n(1),Ie=n.n(je),Fe=n(28),Le=n.n(Fe),Re=n(29),ke=n.n(Re),Me=n(30),De=n(31);var Ue,Be,He=new ve,Ve=(He.numberFormat.bind(He),He.translate.bind(He)),Ge=(He.configure.bind(He),He.setLocale.bind(He),He.getLocale.bind(He),He.getLocaleSlug.bind(He),He.addTranslations.bind(He),He.reRenderTranslations.bind(He),He.registerComponentUpdateHook.bind(He),He.registerTranslateHook.bind(He),He.state,He.stateObserver,He.on.bind(He),He.off.bind(He),He.emit.bind(He),Be={numberFormat:(Ue=He).numberFormat.bind(Ue),translate:Ue.translate.bind(Ue)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(He),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(Me.useSubscription)(t)}var r=Object(De.createHigherOrderComponent)((function(e){return Object(je.forwardRef)((function(t,r){var o=n();return Ie.a.createElement(e,ke()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(He)),We=(Ge.useRtl,Ge.withRtl,"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)),ze=new Uint8Array(16);function Ye(){if(!We)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return We(ze)}for(var qe=[],$e=0;$e<256;++$e)qe[$e]=($e+256).toString(16).substr(1);var Ke=function(e,t){var n=t||0,r=qe;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var Je,Qe=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||Ye)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[r+i]=o[i];return t||Ke(o)},Xe=n(18),Ze=n.n(Xe),et=n(6),tt=n.n(et),nt=z()("wpcom-proxy-request"),rt="https://public-api.wordpress.com",ot=window.location.protocol+"//"+window.location.host,it=function(){var e=!1;try{window.postMessage({toString:function(){e=!0}},"*")}catch(t){}return e}(),at=function(){try{return new window.File(["a"],"test.jpg",{type:"image/jpeg"}),!0}catch(e){return!1}}(),st=null,ut=!1,ct={},lt=!!window.ProgressEvent&&!!window.FormData;nt('using "origin": %o',ot);var ft=function(e,t){var n=Object.assign({},e);nt("request(%o)",n),st||yt();var r=Qe();n.callback=r,n.supports_args=!0,n.supports_error_obj=!0,n.supports_progress=lt,n.method=String(n.method||"GET").toUpperCase(),nt("params object: %o",n);var o=new window.XMLHttpRequest;if(o.params=n,ct[r]=o,"function"==typeof t){var i=!1,a=function(e){if(!i){i=!0;var n=e.error||e.err||e;nt("error: ",n),nt("headers: ",e.headers),t(n,null,e.headers)}};o.addEventListener("load",(function(e){if(!i){i=!0;var n=e.response||o.response;nt("body: ",n),nt("headers: ",e.headers),t(null,n,e.headers)}})),o.addEventListener("abort",a),o.addEventListener("error",a)}return ut?dt(n):(nt("buffering API request since proxying <iframe> is not yet loaded"),Je.push(n)),o},pt=function(e,t){return"function"==typeof t?ft(e,t):new Promise((function(t,n){ft(e,(function(e,r){e?n(e):t(r)}))}))};function dt(e){nt("sending API request to proxy <iframe> %o",e),e.formData&&function(e){if(!window.chrome||!at)return;for(var t=0;t<e.length;t++){var n=mt(e[t][1]);n&&(e[t][1]=new window.File([n],n.name,{type:n.type}))}}(e.formData),st.contentWindow.postMessage(it?JSON.stringify(e):e,rt)}function ht(e){return e&&"[object File]"===Object.prototype.toString.call(e)}function mt(e){return ht(e)?e:"object"==typeof e&&ht(e.fileContents)?e.fileContents:null}function yt(){nt("install()"),st&&(nt("uninstall()"),window.removeEventListener("message",gt),document.body.removeChild(st),ut=!1,st=null),Je=[],window.addEventListener("message",gt),(st=document.createElement("iframe")).src=rt+"/wp-admin/rest-proxy/?v=2.0#"+ot,st.style.display="none",document.body.appendChild(st)}function gt(e){if(nt("onmessage"),e.origin===rt)if(e.source===st.contentWindow){var t=e.data;if(!t)return nt("no `data`, bailing");if("ready"!==t){if(it&&"string"==typeof t&&(t=JSON.parse(t)),t.upload||t.download)return function(e){nt('got "progress" event: %o',e);var t=ct[e.callbackId];if(t){var n=new tt.a("progress",e);(e.upload?t.upload:t).dispatchEvent(n)}}(t);if(!t.length)return nt("`e.data` doesn't appear to be an Array, bailing...");var n=t[t.length-1];if(!(n in ct))return nt("bailing, no matching request with callback: %o",n);var r=ct[n],o=r.params,i=t[0],a=t[1],s=t[2];if(207===a||delete ct[n],o.metaAPI?a="metaAPIupdated"===i?200:500:nt("got %o status code for URL: %o",a,o.path),"object"==typeof s&&(s.status=a),a&&2===Math.floor(a/100))!function(e,t,n){var r=new tt.a("load");r.data=r.body=r.response=t,r.headers=n,e.dispatchEvent(r)}(r,i,s);else!function(e,t,n){var r=new tt.a("error");r.error=r.err=t,r.headers=n,e.dispatchEvent(r)}(r,Ze()(o,a,i),s)}else!function(){if(nt('proxy <iframe> "load" event'),ut=!0,Je){for(var e=0;e<Je.length;e++)dt(Je[e]);Je=null}}()}else nt("ignoring message... iframe elements do not match");else nt("ignoring message... %o !== %o",e.origin,rt)}var vt=pt,bt=function(e){return{type:"WPCOM_REQUEST",request:e}},St=function(e,t){return{type:"FETCH_AND_PARSE",resource:e,options:t}},Et={WPCOM_REQUEST:function(e){var t=e.request;return vt(t)},FETCH_AND_PARSE:function(e){var t,n,r,o,i=e.resource,a=e.options;return t=void 0,n=void 0,o=function(){var e,t;return w(this,(function(n){switch(n.label){case 0:return[4,window.fetch(i,a)];case 1:return e=n.sent(),t={ok:e.ok},[4,e.json()];case 2:return[2,(t.body=n.sent(),t)]}}))},new((r=void 0)||(r=Promise))((function(e,i){function a(e){try{u(o.next(e))}catch(t){i(t)}}function s(e){try{u(o.throw(e))}catch(t){i(t)}}function u(t){t.done?e(t.value):new r((function(e){e(t.value)})).then(a,s)}u((o=o.apply(t,n||[])).next())}))},RELOAD_PROXY:function(){yt()},REQUEST_ALL_BLOGS_ACCESS:function(){return pt({metaAPI:{accessAllUsersBlogs:!0}})},WAIT:function(e){var t=e.ms;return new Promise((function(e){return setTimeout(e,t)}))}},_t=function(e){var t,n;return w(this,(function(r){switch(r.label){case 0:t="https://public-api.wordpress.com/rest/v1.3/domains/"+encodeURIComponent(e)+"/is-available?is_cart_pre_check=true",r.label=1;case 1:return r.trys.push([1,3,,4]),[4,St(t)];case 2:return n=r.sent().body,[2,k(e,n)];case 3:return r.sent(),[2,k(e,{domain_name:e,mappable:"unknown",status:"unknown",supports_privacy:!1})];case 4:return[2]}}))};function wt(){var e;return w(this,(function(t){switch(t.label){case 0:return[4,St("https://public-api.wordpress.com/wpcom/v2/onboarding/domains/categories")];case 1:return e=t.sent(),[2,L(e.body)]}}))}function Ot(e){var t,n;return w(this,(function(r){switch(r.label){case 0:return e.query?[4,R()]:[2,D("Empty query")];case 1:r.sent(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,bt({apiVersion:"1.1",path:"/domains/suggestions",query:Object(U.stringify)(e)})];case 3:return t=r.sent(),[3,5];case 4:return n=r.sent(),[2,D(n.message||Ve("Error while fetching server response"))];case 5:return t&&""!==t?[2,M(e,t)]:[2,D(Ve("Invalid response from the server"))]}}))}var Ct=function(e){function t(t,n){return E(E({include_wordpressdotcom:n.only_wordpressdotcom||!1,include_dotblogsubdomain:!1,only_wordpressdotcom:!1,quantity:5,vendor:e},n),{query:t.trim().toLocaleLowerCase()})}return{getCategories:function(e){return C(e.categories.filter((function(e){return null!==e.tier})).sort((function(e,t){return e>t?1:-1})),e.categories.filter((function(e){return null===e.tier})).sort((function(e,t){return e.title.localeCompare(t.title)})))},getDomainSuggestions:function(e,n,r){void 0===r&&(r={});var o=t(n,r);return Object(b.select)(S).__internalGetDomainSuggestions(o)},getDomainState:function(e){return e.domainSuggestions.state},getDomainErrorMessage:function(e){return e.domainSuggestions.errorMessage},getDomainSuggestionVendor:function(){return e},isLoadingDomainSuggestions:function(e,n,r){void 0===r&&(r={});var o=t(n,r);return Object(b.select)("core/data").isResolving(S,"__internalGetDomainSuggestions",[o])},__internalGetDomainSuggestions:function(e,t){return e.domainSuggestions.data[j(t)]},isAvailable:function(e,t){return e.availability[t]},getDomainAvailabilities:function(e){return e.availability}}},xt=!1;function Nt(e){var t=e.vendor;return xt||(xt=!0,Object(b.registerStore)(S,{actions:r,controls:Et,reducer:F,resolvers:o,selectors:Ct(t)})),S}var At,Tt,Pt=n(2),jt="free_plan",It="personal-bundle",Ft="value_bundle",Lt="business-bundle",Rt="ecommerce-bundle",kt="automattic/onboard/plans",Mt=Ft,Dt=[It,Ft,Lt,Rt],Ut={USD:{format:"SYMBOL_THEN_AMOUNT",symbol:"$",decimal:2},GBP:{format:"SYMBOL_THEN_AMOUNT",symbol:"£",decimal:2},JPY:{format:"SYMBOL_THEN_AMOUNT",symbol:"¥",decimal:0},BRL:{format:"SYMBOL_THEN_AMOUNT",symbol:"R$",decimal:2},EUR:{format:"SYMBOL_THEN_AMOUNT",symbol:"€",decimal:2},NZD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NZ$",decimal:2},AUD:{format:"SYMBOL_THEN_AMOUNT",symbol:"A$",decimal:2},CAD:{format:"SYMBOL_THEN_AMOUNT",symbol:"C$",decimal:2},IDR:{format:"AMOUNT_THEN_SYMBOL",symbol:"Rp",decimal:0},INR:{format:"AMOUNT_THEN_SYMBOL",symbol:"₹",decimal:0},ILS:{format:"AMOUNT_THEN_SYMBOL",symbol:"₪",decimal:2},RUB:{format:"AMOUNT_THEN_SYMBOL",symbol:"₽",decimal:2},MXN:{format:"SYMBOL_THEN_AMOUNT",symbol:"MX$",decimal:2},SEK:{format:"AMOUNT_THEN_SYMBOL",symbol:"SEK",decimal:2},HUF:{format:"AMOUNT_THEN_SYMBOL",symbol:"Ft",decimal:0},CHF:{format:"AMOUNT_THEN_SYMBOL",symbol:"CHF",decimal:2},CZK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kč",decimal:2},DKK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Dkr",decimal:2},HKD:{format:"AMOUNT_THEN_SYMBOL",symbol:"HK$",decimal:2},NOK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kr",decimal:2},PHP:{format:"AMOUNT_THEN_SYMBOL",symbol:"₱",decimal:2},PLN:{format:"AMOUNT_THEN_SYMBOL",symbol:"PLN",decimal:2},SGD:{format:"SYMBOL_THEN_AMOUNT",symbol:"S$",decimal:2},TWD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NT$",decimal:0},THB:{format:"SYMBOL_THEN_AMOUNT",symbol:"฿",decimal:2},TRY:{format:"AMOUNT_THEN_SYMBOL",symbol:"TL",decimal:2}},Bt=["Remove WordPress.com ads","Email & basic live chat support","Collect recurring payments","Collect one-time payments","Earn ad revenue","Premium themes","Upload videos","Google Analytics support","Business features (incl. SEO)","Upload themes","Install plugins","Accept payments in 60+ countries"],Ht=((At={})[jt]={title:Ve("Free"),description:Ve("Create a beautiful, simple website in minutes"),productId:1,storeSlug:jt,pathSlug:"beginner",features:["3 GB storage space"],isFree:!0},At[It]={title:Ve("Personal"),description:Ve("Best for personal use"),productId:1009,storeSlug:It,pathSlug:"personal",features:C(["6 GB storage space"],Bt.slice(0,3))},At[Ft]={title:Ve("Premium"),description:Ve("Best for freelancers"),productId:1003,storeSlug:Ft,pathSlug:"premium",features:C(["13 GB storage space"],Bt.slice(0,8)),isPopular:!0},At[Lt]={title:Ve("Business"),description:Ve("Best for small businesses"),productId:1008,storeSlug:Lt,pathSlug:"business",features:C(["200 GB storage space"],Bt.slice(0,11))},At[Rt]={title:Ve("eCommerce"),description:Ve("Best for online stores"),productId:1011,storeSlug:Rt,pathSlug:"ecommerce",features:C(["200 GB storage space"],Bt)},At),Vt=Object.keys(Ht).map((function(e){return Ht[e].pathSlug})),Gt=[{id:"general",name:null,features:[{name:"Free domain for One Year",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Email & basic live chat support",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"24/7 Priority live chat support",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Preinstalled SSL security",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Jetpack essential features",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Storage",type:"text",data:["3 GB","6 GB","13 GB","200 GB","200 GB"]},{name:"Dozens of free designs",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Remove WordPress.com ads",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Unlimited premium themes",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced design customization",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Get personalized help",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Install plugins",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Upload themes",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Remove WordPress.com branding",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Automated backup & one-click rewind",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"SFTP and database access",type:"checkbox",data:[!1,!1,!1,!0,!0]}]},{id:"commerce",name:"Commerce",features:[{name:"Sell subscriptions (recurring payments)",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Sell single items (simple payments)",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Accept payments in 60+ countries",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Integrations with top shipping carriers",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Sell anything (products and/or services)",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Premium customizable starter themes",type:"checkbox",data:[!1,!1,!1,!1,!0]}]},{id:"marketing",name:"Marketing",features:[{name:"WordAds",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced social media tools",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"VideoPress support",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"SEO tools",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Commerce marketing tools",type:"checkbox",data:[!1,!1,!1,!1,!0]}]}],Wt=Object.keys(Ht),zt={supportedPlanSlugs:Wt,prices:(Tt={},Tt[jt]="",Tt[It]="",Tt[Ft]="",Tt[Lt]="",Tt[Rt]="",Tt)},Yt=function(e,t){switch(void 0===e&&(e=zt),t.type){case"SET_PRICES":return E(E({},e),{prices:t.prices});default:return e}},qt=function(e){return{type:"SET_PRICES",prices:e}},$t=function(){return{type:"RESET_PLAN"}};function Kt(e){return Ht[e]}var Jt=function(e,t){return Kt(t)},Qt=function(){return Kt(Mt)},Xt=function(e){return e.supportedPlanSlugs.map(Kt)},Zt=function(e,t){return t&&Xt(e).find((function(e){return(null==e?void 0:e.pathSlug)===t}))},en=function(){return Gt},tn=function(e){return Xt(e).map((function(e){return null==e?void 0:e.pathSlug}))},nn=function(e){return e.prices},rn=function(e,t){return t===Rt},on=function(e,t){return t===jt};function an(){var e,t,n;return w(this,(function(r){switch(r.label){case 0:return[4,Object(Pt.apiFetch)({global:!0,url:"https://public-api.wordpress.com/rest/v1.5/plans",mode:"cors",credentials:"omit"})];case 1:return e=r.sent(),t=e.filter((function(e){return-1!==Wt.indexOf(e.product_slug)})),n=t.reduce((function(e,t){return e[t.product_slug]=function(e){var t=Ut[e.currency_code],n=e.raw_price/12;return Number.isInteger(n)||(n=n.toFixed(t.decimal)),"AMOUNT_THEN_SYMBOL"===t.format?""+n+t.symbol:""+t.symbol+n}(t),e}),{}),[4,qt(n)];case 2:return r.sent(),[2]}}))}var sn=!1;function un(){return sn||(sn=!0,Object(b.registerStore)(kt,{resolvers:u,actions:a,controls:Pt.controls,reducer:Yt,selectors:s})),kt}var cn="automattic/site",ln=Object(b.combineReducers)({data:function(e,t){return"RECEIVE_NEW_SITE"===t.type?t.response.blog_details:"RECEIVE_NEW_SITE_FAILED"!==t.type&&"RESET_SITE_STORE"!==t.type?e:void 0},error:function(e,t){switch(t.type){case"FETCH_NEW_SITE":case"RECEIVE_NEW_SITE":case"RESET_SITE_STORE":case"RESET_RECEIVE_NEW_SITE_FAILED":return;case"RECEIVE_NEW_SITE_FAILED":return{error:t.error.error,status:t.error.status,statusCode:t.error.statusCode,name:t.error.name,message:t.error.message}}return e},isFetching:function(e,t){switch(void 0===e&&(e=!1),t.type){case"FETCH_NEW_SITE":return!0;case"RECEIVE_NEW_SITE":case"RECEIVE_NEW_SITE_FAILED":case"RESET_SITE_STORE":case"RESET_RECEIVE_NEW_SITE_FAILED":return!1}return e}}),fn=Object(b.combineReducers)({newSite:ln,sites:function(e,t){var n;if(void 0===e&&(e={}),"RECEIVE_SITE"===t.type)return E(E({},e),((n={})[t.siteId]=t.response,n));if("RECEIVE_SITE_FAILED"===t.type){var r=e,o=t.siteId,i=(r[o],_(r,["symbol"==typeof o?o:o+""]));return E({},i)}return"RESET_SITE_STORE"===t.type?{}:e},launchStatus:function(e,t){var n;return void 0===e&&(e={}),"LAUNCHED_SITE"===t.type?E(E({},e),((n={})[t.siteId]=!0,n)):e}});function pn(e){var t=function(){return{type:"FETCH_NEW_SITE"}},n=function(e){return{type:"RECEIVE_NEW_SITE",response:e}},r=function(e){return{type:"RECEIVE_NEW_SITE_FAILED",error:e}};var o=function(e){return{type:"LAUNCHED_SITE",siteId:e}};return{fetchNewSite:t,receiveNewSite:n,receiveNewSiteFailed:r,resetNewSiteFailed:function(){return{type:"RESET_RECEIVE_NEW_SITE_FAILED"}},createSite:function(t){var o,i,a,s,u,c;return w(this,(function(l){switch(l.label){case 0:return[4,{type:"FETCH_NEW_SITE"}];case 1:l.sent(),l.label=2;case 2:return l.trys.push([2,5,,7]),o=t.authToken,i=_(t,["authToken"]),a={client_id:e.client_id,client_secret:e.client_secret,find_available_url:!0,public:-1},s=E(E(E({},a),i),{validate:!1}),[4,bt({path:"/sites/new",apiVersion:"1.1",method:"post",body:s,token:o})];case 3:return u=l.sent(),[4,n(u)];case 4:return l.sent(),[2,!0];case 5:return c=l.sent(),[4,r(c)];case 6:return l.sent(),[2,!1];case 7:return[2]}}))},receiveSite:function(e,t){return{type:"RECEIVE_SITE",siteId:e,response:t}},receiveSiteFailed:function(e,t){return{type:"RECEIVE_SITE_FAILED",siteId:e,response:t}},reset:function(){return{type:"RESET_SITE_STORE"}},launchSite:function(e){return w(this,(function(t){switch(t.label){case 0:return[4,bt({path:"/sites/"+e+"/launch",apiVersion:"1.1",method:"post"})];case 1:return t.sent(),[4,o(e)];case 2:return t.sent(),[2,!0]}}))},launchedSite:o,getCart:function(e){return w(this,(function(t){switch(t.label){case 0:return[4,bt({path:"/me/shopping-cart/"+e,apiVersion:"1.1",method:"GET"})];case 1:return[2,t.sent()]}}))},setCart:function(e,t){return w(this,(function(n){switch(n.label){case 0:return[4,bt({path:"/me/shopping-cart/"+e,apiVersion:"1.1",method:"POST",body:t})];case 1:return[2,n.sent()]}}))}}}function dn(e){var t;return w(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,5]),[4,bt({path:"/sites/"+encodeURIComponent(e),apiVersion:"1.1"})];case 1:return t=n.sent(),[4,Object(b.dispatch)(cn).receiveSite(e,t)];case 2:return n.sent(),[3,5];case 3:return n.sent(),[4,Object(b.dispatch)(cn).receiveSiteFailed(e,void 0)];case 4:return n.sent(),[3,5];case 5:return[2]}}))}var hn,mn=function(e){return e},yn=function(e){return e.newSite.data},gn=function(e){return e.newSite.error},vn=function(e){return e.newSite.isFetching},bn=function(e){return!!e.newSite.data},Sn=function(e,t){return e.sites[t]},En=function(e,t){return e.launchStatus[t]};!function(e){e[e.PublicIndexed=1]="PublicIndexed",e[e.PublicNotIndexed=0]="PublicNotIndexed",e[e.Private=-1]="Private"}(hn||(hn={}));var _n=!1;function wn(e){return _n||(_n=!0,Object(b.registerStore)(cn,{actions:pn(e),controls:Et,reducer:fn,resolvers:l,selectors:f})),cn}var On="automattic/launch",Cn=window._currentSiteId,xn={Name:"name",Domain:"domain",Plan:"plan",Final:"final"},Nn=[xn.Name,xn.Domain,xn.Plan,xn.Final],An=Object(b.combineReducers)({step:function(e,t){return void 0===e&&(e=xn.Name),"SET_STEP"===t.type?t.step:e},domain:function(e,t){return"SET_DOMAIN"===t.type?t.domain:"UNSET_DOMAIN"!==t.type?e:void 0},confirmedDomainSelection:function(e,t){return void 0===e&&(e=!1),"CONFIRM_DOMAIN_SELECTION"===t.type||e},domainSearch:function(e,t){return void 0===e&&(e=""),"SET_DOMAIN_SEARCH"===t.type?t.domainSearch:e},plan:function(e,t){return"SET_PLAN"===t.type?t.plan:"UNSET_PLAN"!==t.type?e:void 0},isSidebarOpen:function(e,t){return void 0===e&&(e=!1),"OPEN_SIDEBAR"===t.type||"CLOSE_SIDEBAR"!==t.type&&e},isSidebarFullscreen:function(e,t){return void 0===e&&(e=!1),"SET_SIDEBAR_FULLSCREEN"===t.type||"UNSET_SIDEBAR_FULLSCREEN"!==t.type&&e},isExperimental:function(e,t){return void 0===e&&(e=!1),"ENABLE_EXPERIMENTAL"===t.type||e}}),Tn=function(){return{type:"SET_SIDEBAR_FULLSCREEN"}},Pn=function(){return{type:"UNSET_SIDEBAR_FULLSCREEN"}},jn=function(e){return{type:"SET_STEP",step:e}},In=function(e){return{type:"SET_DOMAIN",domain:e}},Fn=function(){return{type:"UNSET_DOMAIN"}},Ln=function(){return{type:"CONFIRM_DOMAIN_SELECTION"}},Rn=function(e){return{type:"SET_DOMAIN_SEARCH",domainSearch:e}},kn=function(e){return{type:"SET_PLAN",plan:e}},Mn=function(){return{type:"UNSET_PLAN"}};function Dn(e){var t;return w(this,(function(n){switch(n.label){case 0:return[4,Object(Pt.select)("automattic/onboard/plans","getPlanBySlug",e)];case 1:return t=n.sent(),[4,kn(t)];case 2:return n.sent(),[2]}}))}function Un(){return w(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,Object(Pt.dispatch)("automattic/site","launchSite",Cn)];case 1:return[2,e.sent()];case 2:return e.sent(),[3,3];case 3:return[2]}}))}var Bn=function(){return{type:"OPEN_SIDEBAR"}},Hn=function(){return{type:"CLOSE_SIDEBAR"}},Vn=function(){return{type:"ENABLE_EXPERIMENTAL"}},Gn=function(){return Nn},Wn=function(){return xn},zn=function(e){return e},Yn=function(e){return!!e.domain&&!e.domain.is_free},qn=function(e){return e.domain},$n=function(e){return e.plan},Kn=function(e,t){if(t===xn.Plan)return!!$n(e);if(t===xn.Name){var n=Object(b.select)("core").getEntityRecord("root","site",void 0);return!!(null==n?void 0:n.title)}return t===xn.Domain&&(!!qn(e)||e.confirmedDomainSelection)},Jn=function(e){return Nn.slice(0,Nn.length-1).every((function(t){return Kn(e,t)}))},Qn=function(e){return Nn.some((function(t){return Kn(e,t)}))},Xn=function(e){return Nn.find((function(t){return!Kn(e,t)}))};var Zn,er,tr,nr,rr,or,ir=(er=Zn="WP_LAUNCH",tr=Zn+"_TS",nr={},rr={getItem:function(e){return nr.hasOwnProperty(e)?nr[e]:null},setItem:function(e,t){nr[e]=String(t)},removeItem:function(e){delete nr[e]}},or=function(){try{return window.localStorage.setItem("WP_ONBOARD_TEST","1"),window.localStorage.removeItem("WP_ONBOARD_TEST"),!0}catch(e){return!1}}()?window.localStorage:rr,{storageKey:er,storage:{getItem:function(e){var t=or.getItem(tr);return t&&function(e){var t=Number(e);return Boolean(t)&&t+6048e5>Date.now()}(t)&&!new URLSearchParams(window.location.search).has("fresh")?or.getItem(e):(or.removeItem(er),or.removeItem(tr),null)},setItem:function(e,t){or.setItem(tr,JSON.stringify(Date.now())),or.setItem(e,t)}}});Object(b.use)(b.plugins.persistence,ir);var ar=!1;function sr(){return ar||(ar=!0,Object(b.registerStore)(On,{actions:d,controls:Pt.controls,reducer:An,selectors:h,persist:["domain","domainSearch","plan","confirmedDomainSelection","isExperimental"]})),On}var ur="automattic/wpcom-features",cr={domain:{id:"domain",minSupportedPlan:It},store:{id:"store",minSupportedPlan:Rt},seo:{id:"seo",minSupportedPlan:Lt},plugins:{id:"plugins",minSupportedPlan:Lt},"ad-free":{id:"ad-free",minSupportedPlan:It},"image-storage":{id:"image-storage",minSupportedPlan:Ft},"video-storage":{id:"video-storage",minSupportedPlan:Ft},support:{id:"support",minSupportedPlan:Lt}},lr=function(e){return void 0===e&&(e=cr),e},fr=function(e){return e},pr=function(e,t){var n=fr(e);return t.length?t.reduce((function(e,t){var r=n[t].minSupportedPlan;return Dt.indexOf(r)>Dt.indexOf(e)?r:e}),n[t[0]].minSupportedPlan):""},dr=!1;function hr(){return dr||(dr=!0,Object(b.registerStore)(ur,{controls:Pt.controls,reducer:lr,selectors:y})),ur}i.register({vendor:"variation2_front"}),c.register(),p.register({client_id:"",client_secret:""}),m.register(),g.register()}]));
|
dotcom-fse/dist/dotcom-fse.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-server-side-render', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-server-side-render', 'wp-url'), 'version' => '570132d0f58367df945a541fbd8b70da');
|
dotcom-fse/dist/dotcom-fse.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 n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var l=r.apply(null,o);l&&e.push(l)}else if("object"===i)for(var c in o)n.call(o,c)&&o[c]&&e.push(c)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){var o=n(38),r=n(39),i=n(17),l=n(40);e.exports=function(e,t){return o(e)||r(e,t)||i(e,t)||l()}},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){var o=n(18);e.exports=function(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t,n){},function(e,t){!function(){e.exports=this.wp.serverSideRender}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t,n){var o=n(31);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t,n){var o=n(32),r=n(33),i=n(34);e.exports=function(e){var t=r();return function(){var n,r=o(e);if(t){var l=o(this).constructor;n=Reflect.construct(r,arguments,l)}else n=r.apply(this,arguments);return i(this,n)}}},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,n){var o=n(45),r=n(46),i=n(17),l=n(47);e.exports=function(e){return o(e)||r(e)||i(e)||l()}},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,o)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var o=n(35),r=n(36);e.exports=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?r(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var l,c=e[Symbol.iterator]();!(o=(l=c.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(a){r=!0,i=a}finally{try{o||null==c.return||c.return()}finally{if(r)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var o=n(18);e.exports=function(e){if(Array.isArray(e))return o(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(8),i=n(1),l=n(10),c=n.n(l),a=n(20),s=n.n(a),u=n(4),d=n(2),p=n(5),f=n(3),b=Object(u.compose)([Object(d.withColors)("backgroundColor",{textColor:"color"}),Object(d.withFontSizes)("fontSize"),Object(f.withSelect)((function(e){return{isPublished:e("core/editor").isCurrentPostPublished()}}))])((function(e){var t=e.attributes,n=e.backgroundColor,r=e.fontSize,l=e.setAttributes,a=e.setBackgroundColor,u=e.setFontSize,f=e.setTextColor,b=e.textColor,m=e.isPublished,g=t.customFontSize,O=t.textAlign,j=g||r.size;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.BlockControls,null,Object(o.createElement)(d.AlignmentToolbar,{value:O,onChange:function(e){l({textAlign:e})}})),Object(o.createElement)(d.InspectorControls,null,Object(o.createElement)(p.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings","full-site-editing")},Object(o.createElement)(d.FontSizePicker,{onChange:u,value:j})),Object(o.createElement)(d.PanelColorSettings,{title:Object(i.__)("Color Settings","full-site-editing"),initialOpen:!1,colorSettings:[{value:n.color,onChange:a,label:Object(i.__)("Background Color","full-site-editing")},{value:b.color,onChange:f,label:Object(i.__)("Text Color","full-site-editing")}]},Object(o.createElement)(d.ContrastChecker,c()({textColor:b.color,backgroundColor:n.color},{fontSize:j})))),Object(o.createElement)(s.a,{isPublished:m,block:"a8c/navigation-menu",attributes:t}))}));function m(){for(var e=Object(r.getCategories)(),t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];for(var i=function(){var t=c[l];if(e.some((function(e){return e.slug===t})))return{v:t}},l=0,c=n;l<c.length;l++){var a=i();if("object"==typeof a)return a.v}throw new Error("Could not find a category from the provided list: ".concat(n.join(",")))}n(30);var g=Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M12 7.27l4.28 10.43-3.47-1.53-.81-.36-.81.36-3.47 1.53L12 7.27M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71L12 2z"}));Object(r.registerBlockType)("a8c/navigation-menu",{title:Object(i.__)("Navigation Menu","full-site-editing"),description:Object(i.__)("Visual placeholder for site-wide navigation and menus.","full-site-editing"),icon:g,category:m("design","layout"),supports:{align:["wide","full","right","left"],html:!1,reusable:!1},edit:b,save:function(){return null}});var O=n(12),j=n(6),v=n.n(j),h=n(21),y=n.n(h),_=n(22),S=n.n(_),E=n(23),w=n.n(E),k=n(24),C=n.n(k),x=n(11),P=n.n(x),T=n(25),B=function(e){w()(n,e);var t=C()(n);function n(){return y()(this,n),t.apply(this,arguments)}return S()(n,[{key:"toggleEditing",value:function(){var e=this.props,t=e.isEditing;(0,e.setState)({isEditing:!t})}},{key:"onSelectPost",value:function(e){var t=e.id,n=e.type;this.props.setState({isEditing:!1,selectedPostId:t,selectedPostType:n})}},{key:"render",value:function(){var e=this.props.attributes.align;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:P()("post-content-block",v()({},"align".concat(e),e))},Object(o.createElement)(T.PostTitle,null),Object(o.createElement)(d.InnerBlocks,{templateLock:!1})))}}]),n}(o.Component),I=Object(u.compose)([Object(u.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(f.withSelect)((function(e,t){var n=t.selectedPostId,o=t.selectedPostType;return{selectedPost:(0,e("core").getEntityRecord)("postType",o,n)}}))])(B);n(37);Object(r.registerBlockType)("a8c/post-content",{title:Object(i.__)("Content","full-site-editing"),description:Object(i.__)("The page content.","full-site-editing"),icon:"layout",category:m("design","layout"),supports:{align:["full"],anchor:!1,customClassName:!1,html:!1,inserter:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"full"}},edit:I,save:function(){return Object(o.createElement)(d.InnerBlocks.Content,null)}});var N=Object(u.createHigherOrderComponent)((function(e){return function(t){return"a8c/post-content"!==t.name?Object(o.createElement)(e,t):Object(o.createElement)(e,c()({},t,{className:"post-content__block"}))}}),"addContentSlotClassname");Object(O.addFilter)("editor.BlockListBlock","full-site-editing/blocks/post-content",N,9);var A=n(7),z=n.n(A),D=n(13),F=n.n(D),L=n(15),R=n.n(L),M=n(16);function V(e){var t=Object(o.useRef)();return Object(o.useEffect)((function(){t.current=e}),[e]),t.current}function U(e,t,n,r,l,c){var a=Object(o.useState)({option:t,previousOption:"",loaded:!1,error:!1}),s=F()(a,2),u=s[0],d=s[1],p=V(r),f=V(l);function b(){d(z()(z()({},u),{},{option:u.previousOption,isSaving:!1}))}return Object(o.useEffect)((function(){u.loaded||u.error?function(){var t=u.option,o=u.previousOption,c=!o&&!t||t&&o&&t.trim()===o.trim(),a=!t||0===t.trim().length;!r&&p&&a&&b();if(!l||c)return;!f&&l&&function(t){d(z()(z()({},u),{},{isSaving:!0})),R()({path:"/wp/v2/settings",method:"POST",data:v()({},e,t)}).then((function(){return function(e){d(z()(z()({},u),{},{previousOption:e,isDirty:!1,isSaving:!1}))}(t)})).catch((function(){n(Object(i.sprintf)(Object(i.__)("Unable to save site %s","full-site-editing"),e)),b()}))}(t)}():R()({path:"/wp/v2/settings"}).then((function(t){return d(z()(z()({},u),{},{option:Object(M.decodeEntities)(t[e]),previousOption:Object(M.decodeEntities)(t[e]),loaded:!0,error:!1}))})).catch((function(){n(Object(i.sprintf)(Object(i.__)("Unable to load site %s","full-site-editing"),e)),d(z()(z()({},u),{},{option:Object(i.sprintf)(Object(i.__)("Error loading site %s","full-site-editing"),e),error:!0}))}))})),{siteOptions:u,handleChange:function(e){c({updated:Date.now()}),d(z()(z()({},u),{},{option:e}))}}}var H=function(e){return Object(u.createHigherOrderComponent)((function(t){return Object(u.pure)((function(n){var r=Object(f.useSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,o=t.isPublishingPost,r=t.isAutosavingPost,i=t.isCurrentPostPublished;return(n()&&i()||o())&&!r()})),i=Object(f.useDispatch)((function(e){return e("core/notices").createErrorNotice})),l=n.isSelected,a=n.setAttributes,s=Object.keys(e).reduce((function(t,n){var o=e[n],c=U(o.optionName,o.defaultValue,i,l,r,a),s=c.siteOptions,u=c.handleChange;return t[n]={value:s.option,updateValue:u,loaded:s.loaded},t}),{});return Object(o.createElement)(t,c()({},n,s))}))}),"withSiteOptions")},q=fullSiteEditing.footerCreditOptions,W=function(e){var t=e.choice,n=q.find((function(e){return e.value===t}));if(!n)return null;var r=n.renderType,i=n.renderProps,l=n.label,c=z()({label:l},i);return"icon"===r?Object(o.createElement)(p.Icon,c):Object(o.createElement)("span",null," ",c.label," ")},G=fullSiteEditing,Q=G.footerCreditOptions,Y=G.defaultCreditOption;var $=Object(u.compose)([H({siteTitleOption:{optionName:"title",defaultValue:Object(i.__)("Site title loading…","full-site-editing")},footerCreditOption:{optionName:"footer_credit",defaultValue:Object(i.__)("Footer credit loading…","full-site-editing")}})])((function(e){var t=e.attributes.textAlign,n=void 0===t?"center":t,r=e.isSelected,i=e.setAttributes,l=e.footerCreditOption,c=l.value,a=l.updateValue,s=e.siteTitleOption.value,u=c||Y;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.BlockControls,null,Object(o.createElement)(d.AlignmentToolbar,{value:n,onChange:function(e){i({textAlign:e})}})),Object(o.createElement)("div",{className:P()("site-info","site-credit__block",v()({},"has-text-align-".concat(n),n))},Object(o.createElement)("span",{className:"site-name"},s),Object(o.createElement)("span",{className:"comma"},","),Object(o.createElement)("span",{className:"site-credit__selection"},r?Object(o.createElement)(p.SelectControl,{onChange:a,value:u,options:Q}):Object(o.createElement)(W,{choice:u}))))}));n(41);Object(r.registerBlockType)("a8c/site-credit",{title:Object(i.__)("WordPress.com Credit","full-site-editing"),description:Object(i.__)("This block tells the world that you're using WordPress.com.","full-site-editing"),icon:"wordpress-alt",category:m("design","layout"),supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1,removal:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"}},edit:$,save:function(){return null}});var J=n(9);var K=Object(u.compose)([Object(d.withColors)("backgroundColor",{textColor:"color"}),Object(d.withFontSizes)("fontSize"),Object(f.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=o.getBlockRootClientId,l=o.getTemplateLock,c=i(n);return{blockIndex:r(n,c),isLocked:!!l(c),rootClientId:c}})),Object(f.withDispatch)((function(e,t){var n=t.blockIndex,o=t.rootClientId;return{insertDefaultBlock:function(){return e("core/block-editor").insertDefaultBlock({},o,n+1)}}})),H({siteDescription:{optionName:"description",defaultValue:Object(i.__)("Site description loading…","full-site-editing")}})])((function(e){var t,n=e.attributes,r=e.backgroundColor,l=e.className,a=e.fontSize,s=e.insertDefaultBlock,u=e.setAttributes,f=e.setBackgroundColor,b=e.setFontSize,m=e.setTextColor,g=e.siteDescription,O=e.textColor,j=n.customFontSize,h=n.textAlign,y=j||a.size,_=g.value,S=g.updateValue;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.BlockControls,null,Object(o.createElement)(d.AlignmentToolbar,{value:h,onChange:function(e){u({textAlign:e})}})),Object(o.createElement)(d.InspectorControls,null,Object(o.createElement)(p.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings","full-site-editing")},Object(o.createElement)(d.FontSizePicker,{onChange:b,value:y})),Object(o.createElement)(d.PanelColorSettings,{title:Object(i.__)("Color Settings","full-site-editing"),initialOpen:!1,colorSettings:[{value:r.color,onChange:f,label:Object(i.__)("Background Color","full-site-editing")},{value:O.color,onChange:m,label:Object(i.__)("Text Color","full-site-editing")}]},Object(o.createElement)(d.ContrastChecker,c()({textColor:O.color,backgroundColor:r.color},{fontSize:y})))),Object(o.createElement)(d.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Description","full-site-editing"),className:P()("site-description",l,(t={"has-text-color":O.color,"has-background":r.color},v()(t,"has-text-align-".concat(h),h),v()(t,r.class,r.class),v()(t,O.class,O.class),v()(t,a.class,!j&&a.class),t)),identifier:"content",onChange:S,onReplace:s,onSplit:J.noop,placeholder:Object(i.__)("Add a Site Description","full-site-editing"),style:{backgroundColor:r.color,color:O.color,fontSize:y?y+"px":void 0},tagName:"p",value:_}))}));n(42);Object(r.registerBlockType)("a8c/site-description",{title:Object(i.__)("Site Description","full-site-editing"),description:Object(i.__)("Site description, also known as the tagline.","full-site-editing"),icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),category:m("design","layout"),supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},fontSize:{type:"string",default:"small"},customFontSize:{type:"number"}},edit:K,save:function(){return null}});var X=Object(u.compose)([Object(d.withColors)({textColor:"color"}),Object(d.withFontSizes)("fontSize"),Object(f.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=o.getBlockRootClientId,l=o.getTemplateLock,c=i(n);return{blockIndex:r(n,c),isLocked:!!l(c),rootClientId:c}})),Object(f.withDispatch)((function(e,t){var n=t.blockIndex,o=t.rootClientId;return{insertDefaultBlock:function(){return e("core/block-editor").insertDefaultBlock({},o,n+1)}}})),H({siteTitle:{optionName:"title",defaultValue:Object(i.__)("Site title loading…","full-site-editing")}})])((function(e){var t,n=e.attributes,r=e.className,l=e.fontSize,c=e.insertDefaultBlock,a=e.setAttributes,s=e.setFontSize,u=e.setTextColor,f=e.siteTitle,b=e.textColor,m=n.customFontSize,g=n.textAlign,O=m||l.size,j=f.value,h=f.updateValue;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.BlockControls,null,Object(o.createElement)(d.AlignmentToolbar,{value:g,onChange:function(e){a({textAlign:e})}})),Object(o.createElement)(d.InspectorControls,null,Object(o.createElement)(p.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings","full-site-editing")},Object(o.createElement)(d.FontSizePicker,{onChange:s,value:O})),Object(o.createElement)(d.PanelColorSettings,{title:Object(i.__)("Color Settings","full-site-editing"),initialOpen:!1,colorSettings:[{value:b.color,onChange:u,label:Object(i.__)("Text Color","full-site-editing")}]})),Object(o.createElement)(d.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Title","full-site-editing"),className:P()("site-title",r,(t={"has-text-color":b.color},v()(t,"has-text-align-".concat(g),g),v()(t,b.class,b.class),v()(t,l.class,!m&&l.class),t)),identifier:"content",onChange:h,onReplace:c,onSplit:J.noop,placeholder:Object(i.__)("Add a Site Title","full-site-editing"),style:{color:b.color,fontSize:O?O+"px":void 0},tagName:"h1",value:j}))}));n(43);Object(r.registerBlockType)("a8c/site-title",{title:Object(i.__)("Site Title","full-site-editing"),description:Object(i.__)("Your site title.","full-site-editing"),icon:"layout",category:m("design","layout"),supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string",default:"normal"},customFontSize:{type:"number"}},edit:X,save:function(){return null}});var Z=n(26),ee=(n(19),Object(u.compose)(Object(u.withState)({templateClientId:null}),Object(f.withSelect)((function(e,t){var n=t.attributes,o=t.templateClientId,r=e("core").getEntityRecord,i=e("core/editor"),l=i.getCurrentPostId,c=i.isEditedPostDirty,a=e("core/block-editor"),s=a.getBlock,u=a.getSelectedBlock,d=e("core/edit-post").isEditorSidebarOpened,p=n.templateId,f=l(),b=p&&r("postType","wp_template_part",p),m=Object(Z.addQueryArgs)(fullSiteEditing.editTemplateBaseUrl,{post:p,fse_parent_post:f}),g=u();return{currentPostId:f,editTemplateUrl:m,template:b,templateBlock:s(o),templateTitle:Object(J.get)(b,["title","rendered"],""),isDirty:c(),isEditorSidebarOpened:!!d(),isAnyTemplateBlockSelected:g&&"a8c/template"===g.name}})),Object(f.withDispatch)((function(e,t){var n=e("core/block-editor").receiveBlocks,o=e("core/edit-post").openGeneralSidebar,i=t.template,l=t.templateClientId,c=t.setState;return{savePost:e("core/editor").savePost,receiveTemplateBlocks:function(){if(i&&!l){var e=Object(r.parse)(Object(J.get)(i,["content","raw"],"")),t=Object(r.createBlock)("core/group",{},e);n([t]),c({templateClientId:t.clientId})}},openGeneralSidebar:o}})))((function(e){var t,n=e.attributes,r=e.editTemplateUrl,l=e.receiveTemplateBlocks,c=e.template,a=e.templateBlock,s=e.templateTitle,u=e.isDirty,f=e.savePost,b=e.isEditorSidebarOpened,m=e.openGeneralSidebar,g=e.isAnyTemplateBlockSelected;if(!c)return Object(o.createElement)(p.Placeholder,{className:"template-block__placeholder"},Object(o.createElement)(p.Spinner,null));var O=Object(o.createRef)(),j=Object(o.useState)(!1),h=F()(j,2),y=h[0],_=h[1];Object(o.useEffect)((function(){y&&!u&&O.current.click(),l()})),Object(o.useEffect)((function(){var e=document.querySelector(".edit-post-sidebar__panel-tabs ul li:last-child");if(b&&e){if(g)return m("edit-post/document"),void e.classList.add("hidden");e.classList.remove("hidden")}}),[g,b,m]);var S=n.align,E=n.className,w=function(e){e.stopPropagation(),_(!0),u&&(e.preventDefault(),f())};return Object(o.createElement)("div",{className:P()("template-block",(t={},v()(t,"align".concat(S),S),v()(t,"is-navigating-to-template",y),t))},a&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.Disabled,null,Object(o.createElement)("div",{className:E},Object(o.createElement)(d.BlockEdit,{attributes:a.attributes,block:a,clientId:a.clientId,isSelected:!1,name:a.name,setAttributes:J.noop}))),Object(o.createElement)(p.Placeholder,{className:"template-block__overlay",onClick:w},y&&Object(o.createElement)("div",{className:"template-block__loading"},Object(o.createElement)(p.Spinner,null)," ",Object(i.sprintf)(Object(i.__)("Loading editor for: %s","full-site-editing"),s)),Object(o.createElement)(p.Button,{className:y?"hidden":null,href:r,onClick:w,isDefault:!0,isLarge:!0,ref:O},Object(i.sprintf)(Object(i.__)("Edit %s","full-site-editing"),s)))))}))),te=Object(u.createHigherOrderComponent)((function(e){return function(t){return"fse-site-logo"!==t.attributes.className?Object(o.createElement)(e,t):Object(o.createElement)(e,c()({},t,{className:"template__site-logo"}))}}),"addFSESiteLogoClassname");Object(O.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",te),"wp_template_part"!==fullSiteEditing.editorPostType&&Object(r.registerBlockType)("a8c/template",{title:Object(i.__)("Template Part","full-site-editing"),__experimentalDisplayName:"label",description:Object(i.__)("Display a Template Part.","full-site-editing"),icon:"layout",category:m("design","layout"),attributes:{templateId:{type:"number"},className:{type:"string"},label:{type:"string"}},supports:{anchor:!1,customClassName:!1,html:!1,inserter:!1,reusable:!1},edit:ee,save:function(){return null},getEditWrapperProps:function(){return{"data-align":"full"}}});var ne=Object(u.createHigherOrderComponent)((function(e){return function(t){return"a8c/template"!==t.name?Object(o.createElement)(e,t):Object(o.createElement)(e,c()({},t,{className:"template__block-container"}))}}),"addFSETemplateClassname");Object(O.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",ne,9);var oe=n(14),re=n.n(oe),ie=n(27),le=n.n(ie);n(44);function ce(e){var t=e.defaultLabel,n=e.defaultUrl,r=Object(o.useState)(t),i=F()(r,2),l=i[0],c=i[1],a=Object(o.useState)(n),s=F()(a,2),u=s[0],d=s[1];return window.wp.hooks.addAction("updateCloseButtonOverrides","a8c-fse",(function(e){c(e.label),d(e.closeUrl)})),Object(o.createElement)("a",{href:u,"aria-label":l},Object(o.createElement)(p.Button,{className:"components-button components-icon-button"},Object(o.createElement)(p.Dashicon,{icon:"arrow-left-alt2"}),Object(o.createElement)("div",{className:"close-button-override__label"},l)))}re()((function(){var e=fullSiteEditing.editorPostType;if("wp_template_part"===e||"page"===e||"post"===e)var t=setInterval((function(){var n=document.querySelector(".edit-post-header__toolbar");if(n){clearInterval(t);var r=document.createElement("div");r.className="components-toolbar edit-post-fullscreen-mode-close__toolbar edit-post-fullscreen-mode-close__toolbar__override",n.prepend(r);var l=fullSiteEditing,c=l.closeButtonLabel,a=l.closeButtonUrl,s=window.calypsoifyGutenberg;s&&s.closeUrl&&(a=s.closeUrl),s&&s.closeButtonLabel&&(c=s.closeButtonLabel);var u=a||"edit.php?post_type=".concat(e),d=c||"Back";"page"!==e||c?"post"!==e||c?"wp_template_part"!==e||c||(d=Object(i.__)("Template Parts","full-site-editing")):d=Object(i.__)("Posts","full-site-editing"):d=Object(i.__)("Pages","full-site-editing"),le.a.render(Object(o.createElement)(ce,{defaultLabel:d,defaultUrl:u}),r)}}))}));var ae=n(28),se=n.n(ae),ue=n(29),de=Object(f.withSelect)((function(e){var t=e("core").getEntityRecord,n=e("core/editor").getEditedPostAttribute;return{templateClasses:Object(J.map)(n("template_part_types"),(function(e){var n=Object(J.get)(t("taxonomy","wp_template_part_type",e),"name","");return Object(J.endsWith)(n,"-header")?"fse-header":Object(J.endsWith)(n,"-footer")?"fse-footer":void 0}))}}))((function(e){var t=e.templateClasses,n=setInterval((function(){var e=document.querySelector(".block-editor__typewriter > div");e&&(clearInterval(n),e.className=P.a.apply(void 0,["a8c-template-editor fse-template-part"].concat(se()(t))))}));return null}));"wp_template_part"===fullSiteEditing.editorPostType&&Object(ue.registerPlugin)("fse-editor-template-classes",{render:de}),re()((function(){"wp_template_part"===fullSiteEditing.editorPostType&&Object(f.dispatch)("core/notices").createNotice("info",Object(i.__)("Updates to this template will affect all pages on your site.","full-site-editing"),{isDismissible:!1})}));var pe=Object(u.compose)(Object(f.withSelect)((function(e){var t=e("core/editor").getEditorSettings,n=e("core/block-editor").getBlocks,o=e("core/edit-post").getEditorMode,r=n().find((function(e){return"a8c/post-content"===e.name}));return{rootClientId:r?r.clientId:"",showInserter:"visual"===o()&&t().richEditingEnabled}})))((function(e){var t=e.rootClientId,n=e.showInserter;return Object(o.createElement)(d.Inserter,{rootClientId:t,disabled:!n,position:"bottom right",toggleProps:{isPrimary:!0}})})),fe="fse-post-content-block-inserter";function be(){if(!document.getElementById(fe)){var e=document.querySelector(".edit-post-header-toolbar");if(e){var t=document.createElement("div");t.className="fse-post-content-block-inserter",t.id=fe,e.insertBefore(t,e.firstChild),Object(o.render)(Object(o.createElement)(pe,null),t)}}}re()((function(){if("page"===fullSiteEditing.editorPostType)var e=setInterval((function(){document.querySelector(".edit-post-header-toolbar")&&(clearInterval(e),be(),document.getElementById("wpbody")&&void 0!==window.MutationObserver&&new window.MutationObserver(be).observe(document.getElementById("wpbody"),{subtree:!0,childList:!0}))}))}));var me=Object(f.subscribe)((function(){if("page"!==fullSiteEditing.editorPostType)return me();!1===Object(f.select)("core/block-editor").isValidTemplate()&&Object(f.dispatch)("core/block-editor").setTemplateValidity(!0)})),ge=["logo","brand","emblem","hallmark"];Object(O.addFilter)("blocks.registerBlockType","full-site-editing/editor/image-block-keywords",(function(e,t){return"core/image"!==t?e:e=Object(J.assign)({},e,{keywords:e.keywords.concat(ge)})}));n(48);Object(f.use)((function(e){return{dispatch:function(t){var n=z()({},e.dispatch(t)),o=fullSiteEditing.editorPostType;return"core/editor"===t&&n.trashPost&&"wp_template_part"===o&&(n.trashPost=function(){}),n}}})),Object(f.use)((function(e){return{dispatch:function(t){var n=z()({},e.dispatch(t)),o=fullSiteEditing.editorPostType;if("core/editor"===t&&n.editPost&&"wp_template_part"===o){var r=n.editPost;n.editPost=function(e){"draft"!==e.status&&r(e)}}return n}}}));var Oe=Object(f.subscribe)((function(){var e=Object(f.dispatch)("core/edit-post").removeEditorPanel;return"page"===fullSiteEditing.editorPostType&&e("featured-image"),"wp_template_part"===fullSiteEditing.editorPostType&&e("post-status"),Oe()}))}]));
|
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 n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var l=r.apply(null,o);l&&e.push(l)}else if("object"===i)for(var c in o)n.call(o,c)&&o[c]&&e.push(c)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){var o=n(38),r=n(39),i=n(17),l=n(40);e.exports=function(e,t){return o(e)||r(e,t)||i(e,t)||l()}},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){var o=n(18);e.exports=function(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t,n){},function(e,t){!function(){e.exports=this.wp.serverSideRender}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t,n){var o=n(31);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t,n){var o=n(32),r=n(33),i=n(34);e.exports=function(e){var t=r();return function(){var n,r=o(e);if(t){var l=o(this).constructor;n=Reflect.construct(r,arguments,l)}else n=r.apply(this,arguments);return i(this,n)}}},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,n){var o=n(45),r=n(46),i=n(17),l=n(47);e.exports=function(e){return o(e)||r(e)||i(e)||l()}},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,o)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var o=n(35),r=n(36);e.exports=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?r(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var l,c=e[Symbol.iterator]();!(o=(l=c.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(a){r=!0,i=a}finally{try{o||null==c.return||c.return()}finally{if(r)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var o=n(18);e.exports=function(e){if(Array.isArray(e))return o(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(8),i=n(1),l=n(10),c=n.n(l),a=n(20),s=n.n(a),u=n(4),d=n(2),p=n(5),f=n(3),b=Object(u.compose)([Object(d.withColors)("backgroundColor",{textColor:"color"}),Object(d.withFontSizes)("fontSize"),Object(f.withSelect)((function(e){return{isPublished:e("core/editor").isCurrentPostPublished()}}))])((function(e){var t=e.attributes,n=e.backgroundColor,r=e.fontSize,l=e.setAttributes,a=e.setBackgroundColor,u=e.setFontSize,f=e.setTextColor,b=e.textColor,m=e.isPublished,g=t.customFontSize,O=t.textAlign,j=g||r.size;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.BlockControls,null,Object(o.createElement)(d.AlignmentToolbar,{value:O,onChange:function(e){l({textAlign:e})}})),Object(o.createElement)(d.InspectorControls,null,Object(o.createElement)(p.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings","full-site-editing")},Object(o.createElement)(d.FontSizePicker,{onChange:u,value:j})),Object(o.createElement)(d.PanelColorSettings,{title:Object(i.__)("Color Settings","full-site-editing"),initialOpen:!1,colorSettings:[{value:n.color,onChange:a,label:Object(i.__)("Background Color","full-site-editing")},{value:b.color,onChange:f,label:Object(i.__)("Text Color","full-site-editing")}]},Object(o.createElement)(d.ContrastChecker,c()({textColor:b.color,backgroundColor:n.color},{fontSize:j})))),Object(o.createElement)(s.a,{isPublished:m,block:"a8c/navigation-menu",attributes:t}))}));function m(){for(var e=Object(r.getCategories)(),t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];for(var i=function(){var t=c[l];if(e.some((function(e){return e.slug===t})))return{v:t}},l=0,c=n;l<c.length;l++){var a=i();if("object"==typeof a)return a.v}throw new Error("Could not find a category from the provided list: ".concat(n.join(",")))}n(30);var g=Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M12 7.27l4.28 10.43-3.47-1.53-.81-.36-.81.36-3.47 1.53L12 7.27M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71L12 2z"}));Object(r.registerBlockType)("a8c/navigation-menu",{title:Object(i.__)("Navigation Menu","full-site-editing"),description:Object(i.__)("Visual placeholder for site-wide navigation and menus.","full-site-editing"),icon:g,category:m("design","layout"),supports:{align:["wide","full","right","left"],html:!1,reusable:!1},edit:b,save:function(){return null}});var O=n(12),j=n(6),v=n.n(j),h=n(21),y=n.n(h),_=n(22),S=n.n(_),E=n(23),w=n.n(E),k=n(24),C=n.n(k),x=n(11),P=n.n(x),T=n(25),B=function(e){w()(n,e);var t=C()(n);function n(){return y()(this,n),t.apply(this,arguments)}return S()(n,[{key:"toggleEditing",value:function(){var e=this.props,t=e.isEditing;(0,e.setState)({isEditing:!t})}},{key:"onSelectPost",value:function(e){var t=e.id,n=e.type;this.props.setState({isEditing:!1,selectedPostId:t,selectedPostType:n})}},{key:"render",value:function(){var e=this.props.attributes.align;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:P()("post-content-block",v()({},"align".concat(e),e))},Object(o.createElement)(T.PostTitle,null),Object(o.createElement)(d.InnerBlocks,{templateLock:!1})))}}]),n}(o.Component),I=Object(u.compose)([Object(u.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(f.withSelect)((function(e,t){var n=t.selectedPostId,o=t.selectedPostType;return{selectedPost:(0,e("core").getEntityRecord)("postType",o,n)}}))])(B);n(37);Object(r.registerBlockType)("a8c/post-content",{title:Object(i.__)("Content","full-site-editing"),description:Object(i.__)("The page content.","full-site-editing"),icon:"layout",category:m("design","layout"),supports:{align:["full"],anchor:!1,customClassName:!1,html:!1,inserter:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"full"}},edit:I,save:function(){return Object(o.createElement)(d.InnerBlocks.Content,null)}});var N=Object(u.createHigherOrderComponent)((function(e){return function(t){return"a8c/post-content"!==t.name?Object(o.createElement)(e,t):Object(o.createElement)(e,c()({},t,{className:"post-content__block"}))}}),"addContentSlotClassname");Object(O.addFilter)("editor.BlockListBlock","full-site-editing/blocks/post-content",N,9);var A=n(7),z=n.n(A),D=n(13),F=n.n(D),L=n(15),R=n.n(L),M=n(16);function V(e){var t=Object(o.useRef)();return Object(o.useEffect)((function(){t.current=e}),[e]),t.current}function U(e,t,n,r,l,c){var a=Object(o.useState)({option:t,previousOption:"",loaded:!1,error:!1}),s=F()(a,2),u=s[0],d=s[1],p=V(r),f=V(l);function b(){d(z()(z()({},u),{},{option:u.previousOption,isSaving:!1}))}return Object(o.useEffect)((function(){u.loaded||u.error?function(){var t=u.option,o=u.previousOption,c=!o&&!t||t&&o&&t.trim()===o.trim(),a=!t||0===t.trim().length;!r&&p&&a&&b();if(!l||c)return;!f&&l&&function(t){d(z()(z()({},u),{},{isSaving:!0})),R()({path:"/wp/v2/settings",method:"POST",data:v()({},e,t)}).then((function(){return function(e){d(z()(z()({},u),{},{previousOption:e,isDirty:!1,isSaving:!1}))}(t)})).catch((function(){n(Object(i.sprintf)(Object(i.__)("Unable to save site %s","full-site-editing"),e)),b()}))}(t)}():R()({path:"/wp/v2/settings"}).then((function(t){return d(z()(z()({},u),{},{option:Object(M.decodeEntities)(t[e]),previousOption:Object(M.decodeEntities)(t[e]),loaded:!0,error:!1}))})).catch((function(){n(Object(i.sprintf)(Object(i.__)("Unable to load site %s","full-site-editing"),e)),d(z()(z()({},u),{},{option:Object(i.sprintf)(Object(i.__)("Error loading site %s","full-site-editing"),e),error:!0}))}))})),{siteOptions:u,handleChange:function(e){c({updated:Date.now()}),d(z()(z()({},u),{},{option:e}))}}}var H=function(e){return Object(u.createHigherOrderComponent)((function(t){return Object(u.pure)((function(n){var r=Object(f.useSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,o=t.isPublishingPost,r=t.isAutosavingPost,i=t.isCurrentPostPublished;return(n()&&i()||o())&&!r()})),i=Object(f.useDispatch)((function(e){return e("core/notices").createErrorNotice})),l=n.isSelected,a=n.setAttributes,s=Object.keys(e).reduce((function(t,n){var o=e[n],c=U(o.optionName,o.defaultValue,i,l,r,a),s=c.siteOptions,u=c.handleChange;return t[n]={value:s.option,updateValue:u,loaded:s.loaded},t}),{});return Object(o.createElement)(t,c()({},n,s))}))}),"withSiteOptions")},q=fullSiteEditing.footerCreditOptions,W=function(e){var t=e.choice,n=q.find((function(e){return e.value===t}));if(!n)return null;var r=n.renderType,i=n.renderProps,l=n.label,c=z()({label:l},i);return"icon"===r?Object(o.createElement)(p.Icon,c):Object(o.createElement)("span",null," ",c.label," ")},G=fullSiteEditing,Q=G.footerCreditOptions,Y=G.defaultCreditOption;var $=Object(u.compose)([H({siteTitleOption:{optionName:"title",defaultValue:Object(i.__)("Site title loading…","full-site-editing")},footerCreditOption:{optionName:"footer_credit",defaultValue:Object(i.__)("Footer credit loading…","full-site-editing")}})])((function(e){var t=e.attributes.textAlign,n=void 0===t?"center":t,r=e.isSelected,i=e.setAttributes,l=e.footerCreditOption,c=l.value,a=l.updateValue,s=e.siteTitleOption.value,u=c||Y;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.BlockControls,null,Object(o.createElement)(d.AlignmentToolbar,{value:n,onChange:function(e){i({textAlign:e})}})),Object(o.createElement)("div",{className:P()("site-info","site-credit__block",v()({},"has-text-align-".concat(n),n))},Object(o.createElement)("span",{className:"site-name"},s),Object(o.createElement)("span",{className:"comma"},","),Object(o.createElement)("span",{className:"site-credit__selection"},r?Object(o.createElement)(p.SelectControl,{onChange:a,value:u,options:Q}):Object(o.createElement)(W,{choice:u}))))}));n(41);Object(r.registerBlockType)("a8c/site-credit",{title:Object(i.__)("WordPress.com Credit","full-site-editing"),description:Object(i.__)("This block tells the world that you're using WordPress.com.","full-site-editing"),icon:"wordpress-alt",category:m("design","layout"),supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1,removal:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"}},edit:$,save:function(){return null}});var J=n(9);var K=Object(u.compose)([Object(d.withColors)("backgroundColor",{textColor:"color"}),Object(d.withFontSizes)("fontSize"),Object(f.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=o.getBlockRootClientId,l=o.getTemplateLock,c=i(n);return{blockIndex:r(n,c),isLocked:!!l(c),rootClientId:c}})),Object(f.withDispatch)((function(e,t){var n=t.blockIndex,o=t.rootClientId;return{insertDefaultBlock:function(){return e("core/block-editor").insertDefaultBlock({},o,n+1)}}})),H({siteDescription:{optionName:"description",defaultValue:Object(i.__)("Site description loading…","full-site-editing")}})])((function(e){var t,n=e.attributes,r=e.backgroundColor,l=e.className,a=e.fontSize,s=e.insertDefaultBlock,u=e.setAttributes,f=e.setBackgroundColor,b=e.setFontSize,m=e.setTextColor,g=e.siteDescription,O=e.textColor,j=n.customFontSize,h=n.textAlign,y=j||a.size,_=g.value,S=g.updateValue;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.BlockControls,null,Object(o.createElement)(d.AlignmentToolbar,{value:h,onChange:function(e){u({textAlign:e})}})),Object(o.createElement)(d.InspectorControls,null,Object(o.createElement)(p.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings","full-site-editing")},Object(o.createElement)(d.FontSizePicker,{onChange:b,value:y})),Object(o.createElement)(d.PanelColorSettings,{title:Object(i.__)("Color Settings","full-site-editing"),initialOpen:!1,colorSettings:[{value:r.color,onChange:f,label:Object(i.__)("Background Color","full-site-editing")},{value:O.color,onChange:m,label:Object(i.__)("Text Color","full-site-editing")}]},Object(o.createElement)(d.ContrastChecker,c()({textColor:O.color,backgroundColor:r.color},{fontSize:y})))),Object(o.createElement)(d.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Description","full-site-editing"),className:P()("site-description",l,(t={"has-text-color":O.color,"has-background":r.color},v()(t,"has-text-align-".concat(h),h),v()(t,r.class,r.class),v()(t,O.class,O.class),v()(t,a.class,!j&&a.class),t)),identifier:"content",onChange:S,onReplace:s,onSplit:J.noop,placeholder:Object(i.__)("Add a Site Description","full-site-editing"),style:{backgroundColor:r.color,color:O.color,fontSize:y?y+"px":void 0},tagName:"p",value:_}))}));n(42);Object(r.registerBlockType)("a8c/site-description",{title:Object(i.__)("Site Description","full-site-editing"),description:Object(i.__)("Site description, also known as the tagline.","full-site-editing"),icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),category:m("design","layout"),supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},fontSize:{type:"string",default:"small"},customFontSize:{type:"number"}},edit:K,save:function(){return null}});var X=Object(u.compose)([Object(d.withColors)({textColor:"color"}),Object(d.withFontSizes)("fontSize"),Object(f.withSelect)((function(e,t){var n=t.clientId,o=e("core/block-editor"),r=o.getBlockIndex,i=o.getBlockRootClientId,l=o.getTemplateLock,c=i(n);return{blockIndex:r(n,c),isLocked:!!l(c),rootClientId:c}})),Object(f.withDispatch)((function(e,t){var n=t.blockIndex,o=t.rootClientId;return{insertDefaultBlock:function(){return e("core/block-editor").insertDefaultBlock({},o,n+1)}}})),H({siteTitle:{optionName:"title",defaultValue:Object(i.__)("Site title loading…","full-site-editing")}})])((function(e){var t,n=e.attributes,r=e.className,l=e.fontSize,c=e.insertDefaultBlock,a=e.setAttributes,s=e.setFontSize,u=e.setTextColor,f=e.siteTitle,b=e.textColor,m=n.customFontSize,g=n.textAlign,O=m||l.size,j=f.value,h=f.updateValue;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.BlockControls,null,Object(o.createElement)(d.AlignmentToolbar,{value:g,onChange:function(e){a({textAlign:e})}})),Object(o.createElement)(d.InspectorControls,null,Object(o.createElement)(p.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings","full-site-editing")},Object(o.createElement)(d.FontSizePicker,{onChange:s,value:O})),Object(o.createElement)(d.PanelColorSettings,{title:Object(i.__)("Color Settings","full-site-editing"),initialOpen:!1,colorSettings:[{value:b.color,onChange:u,label:Object(i.__)("Text Color","full-site-editing")}]})),Object(o.createElement)(d.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Title","full-site-editing"),className:P()("site-title",r,(t={"has-text-color":b.color},v()(t,"has-text-align-".concat(g),g),v()(t,b.class,b.class),v()(t,l.class,!m&&l.class),t)),identifier:"content",onChange:h,onReplace:c,onSplit:J.noop,placeholder:Object(i.__)("Add a Site Title","full-site-editing"),style:{color:b.color,fontSize:O?O+"px":void 0},tagName:"h1",value:j}))}));n(43);Object(r.registerBlockType)("a8c/site-title",{title:Object(i.__)("Site Title","full-site-editing"),description:Object(i.__)("Your site title.","full-site-editing"),icon:"layout",category:m("design","layout"),supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string",default:"normal"},customFontSize:{type:"number"}},edit:X,save:function(){return null}});var Z=n(26),ee=(n(19),Object(u.compose)(Object(u.withState)({templateClientId:null}),Object(f.withSelect)((function(e,t){var n=t.attributes,o=t.templateClientId,r=e("core").getEntityRecord,i=e("core/editor"),l=i.getCurrentPostId,c=i.isEditedPostDirty,a=e("core/block-editor"),s=a.getBlock,u=a.getSelectedBlock,d=e("core/edit-post").isEditorSidebarOpened,p=n.templateId,f=l(),b=p&&r("postType","wp_template_part",p),m=Object(Z.addQueryArgs)(fullSiteEditing.editTemplateBaseUrl,{post:p,fse_parent_post:f}),g=u();return{currentPostId:f,editTemplateUrl:m,template:b,templateBlock:s(o),templateTitle:Object(J.get)(b,["title","rendered"],""),isDirty:c(),isEditorSidebarOpened:!!d(),isAnyTemplateBlockSelected:g&&"a8c/template"===g.name}})),Object(f.withDispatch)((function(e,t){var n=e("core/block-editor").receiveBlocks,o=e("core/edit-post").openGeneralSidebar,i=t.template,l=t.templateClientId,c=t.setState;return{savePost:e("core/editor").savePost,receiveTemplateBlocks:function(){if(i&&!l){var e=Object(r.parse)(Object(J.get)(i,["content","raw"],"")),t=Object(r.createBlock)("core/group",{},e);n([t]),c({templateClientId:t.clientId})}},openGeneralSidebar:o}})))((function(e){var t,n=e.attributes,r=e.editTemplateUrl,l=e.receiveTemplateBlocks,c=e.template,a=e.templateBlock,s=e.templateTitle,u=e.isDirty,f=e.savePost,b=e.isEditorSidebarOpened,m=e.openGeneralSidebar,g=e.isAnyTemplateBlockSelected;if(!c)return Object(o.createElement)(p.Placeholder,{className:"template-block__placeholder"},Object(o.createElement)(p.Spinner,null));var O=Object(o.createRef)(),j=Object(o.useState)(!1),h=F()(j,2),y=h[0],_=h[1];Object(o.useEffect)((function(){y&&!u&&O.current.click(),l()})),Object(o.useEffect)((function(){var e=document.querySelector(".edit-post-sidebar__panel-tabs ul li:last-child");if(b&&e){if(g)return m("edit-post/document"),void e.classList.add("hidden");e.classList.remove("hidden")}}),[g,b,m]);var S=n.align,E=n.className,w=function(e){e.stopPropagation(),_(!0),u&&(e.preventDefault(),f())};return Object(o.createElement)("div",{className:P()("template-block",(t={},v()(t,"align".concat(S),S),v()(t,"is-navigating-to-template",y),t))},a&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.Disabled,null,Object(o.createElement)("div",{className:E},Object(o.createElement)(d.BlockEdit,{attributes:a.attributes,block:a,clientId:a.clientId,isSelected:!1,name:a.name,setAttributes:J.noop}))),Object(o.createElement)(p.Placeholder,{className:"template-block__overlay",onClick:w},y&&Object(o.createElement)("div",{className:"template-block__loading"},Object(o.createElement)(p.Spinner,null)," ",Object(i.sprintf)(Object(i.__)("Loading editor for: %s","full-site-editing"),s)),Object(o.createElement)(p.Button,{className:y?"hidden":null,href:r,onClick:w,isDefault:!0,isLarge:!0,ref:O},Object(i.sprintf)(Object(i.__)("Edit %s","full-site-editing"),s)))))}))),te=Object(u.createHigherOrderComponent)((function(e){return function(t){return"fse-site-logo"!==t.attributes.className?Object(o.createElement)(e,t):Object(o.createElement)(e,c()({},t,{className:"template__site-logo"}))}}),"addFSESiteLogoClassname");Object(O.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",te),"wp_template_part"!==fullSiteEditing.editorPostType&&Object(r.registerBlockType)("a8c/template",{title:Object(i.__)("Template Part","full-site-editing"),__experimentalDisplayName:"label",description:Object(i.__)("Display a Template Part.","full-site-editing"),icon:"layout",category:m("design","layout"),attributes:{templateId:{type:"number"},className:{type:"string"},label:{type:"string"}},supports:{anchor:!1,customClassName:!1,html:!1,inserter:!1,reusable:!1},edit:ee,save:function(){return null},getEditWrapperProps:function(){return{"data-align":"full"}}});var ne=Object(u.createHigherOrderComponent)((function(e){return function(t){return"a8c/template"!==t.name?Object(o.createElement)(e,t):Object(o.createElement)(e,c()({},t,{className:"template__block-container"}))}}),"addFSETemplateClassname");Object(O.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",ne,9);var oe=n(14),re=n.n(oe),ie=n(27),le=n.n(ie);n(44);function ce(e){var t=e.defaultLabel,n=e.defaultUrl,r=Object(o.useState)(t),i=F()(r,2),l=i[0],c=i[1],a=Object(o.useState)(n),s=F()(a,2),u=s[0],d=s[1];return window.wp.hooks.addAction("updateCloseButtonOverrides","a8c-fse",(function(e){c(e.label),d(e.closeUrl)})),Object(o.createElement)("a",{href:u,"aria-label":l},Object(o.createElement)(p.Button,{className:"components-button components-icon-button"},Object(o.createElement)(p.Dashicon,{icon:"arrow-left-alt2"}),Object(o.createElement)("div",{className:"close-button-override__label"},l)))}re()((function(){var e=fullSiteEditing.editorPostType;if("wp_template_part"===e||"page"===e||"post"===e)var t=setInterval((function(){var n=document.querySelector(".edit-post-header__toolbar");if(n){clearInterval(t);var r=document.createElement("div");r.className="components-toolbar edit-post-fullscreen-mode-close__toolbar edit-post-fullscreen-mode-close__toolbar__override",n.prepend(r);var l=fullSiteEditing,c=l.closeButtonLabel,a=l.closeButtonUrl,s=window.calypsoifyGutenberg;s&&s.closeUrl&&(a=s.closeUrl),s&&s.closeButtonLabel&&(c=s.closeButtonLabel);var u=a||"edit.php?post_type=".concat(e),d=c||"Back";"page"!==e||c?"post"!==e||c?"wp_template_part"!==e||c||(d=Object(i.__)("Template Parts","full-site-editing")):d=Object(i.__)("Posts","full-site-editing"):d=Object(i.__)("Pages","full-site-editing"),le.a.render(Object(o.createElement)(ce,{defaultLabel:d,defaultUrl:u}),r)}}))}));var ae=n(28),se=n.n(ae),ue=n(29),de=Object(f.withSelect)((function(e){var t=e("core").getEntityRecord,n=e("core/editor").getEditedPostAttribute;return{templateClasses:Object(J.map)(n("template_part_types"),(function(e){var n=Object(J.get)(t("taxonomy","wp_template_part_type",e),"name","");return n.endsWith("-header")?"fse-header":n.endsWith("-footer")?"fse-footer":void 0}))}}))((function(e){var t=e.templateClasses,n=setInterval((function(){var e=document.querySelector(".block-editor__typewriter > div");e&&(clearInterval(n),e.className=P.a.apply(void 0,["a8c-template-editor fse-template-part"].concat(se()(t))))}));return null}));"wp_template_part"===fullSiteEditing.editorPostType&&Object(ue.registerPlugin)("fse-editor-template-classes",{render:de}),re()((function(){"wp_template_part"===fullSiteEditing.editorPostType&&Object(f.dispatch)("core/notices").createNotice("info",Object(i.__)("Updates to this template will affect all pages on your site.","full-site-editing"),{isDismissible:!1})}));var pe=Object(u.compose)(Object(f.withSelect)((function(e){var t=e("core/editor").getEditorSettings,n=e("core/block-editor").getBlocks,o=e("core/edit-post").getEditorMode,r=n().find((function(e){return"a8c/post-content"===e.name}));return{rootClientId:r?r.clientId:"",showInserter:"visual"===o()&&t().richEditingEnabled}})))((function(e){var t=e.rootClientId,n=e.showInserter;return Object(o.createElement)(d.Inserter,{rootClientId:t,disabled:!n,position:"bottom right",toggleProps:{isPrimary:!0}})})),fe="fse-post-content-block-inserter";function be(){if(!document.getElementById(fe)){var e=document.querySelector(".edit-post-header-toolbar");if(e){var t=document.createElement("div");t.className="fse-post-content-block-inserter",t.id=fe,e.insertBefore(t,e.firstChild),Object(o.render)(Object(o.createElement)(pe,null),t)}}}re()((function(){if("page"===fullSiteEditing.editorPostType)var e=setInterval((function(){document.querySelector(".edit-post-header-toolbar")&&(clearInterval(e),be(),document.getElementById("wpbody")&&void 0!==window.MutationObserver&&new window.MutationObserver(be).observe(document.getElementById("wpbody"),{subtree:!0,childList:!0}))}))}));var me=Object(f.subscribe)((function(){if("page"!==fullSiteEditing.editorPostType)return me();!1===Object(f.select)("core/block-editor").isValidTemplate()&&Object(f.dispatch)("core/block-editor").setTemplateValidity(!0)})),ge=["logo","brand","emblem","hallmark"];Object(O.addFilter)("blocks.registerBlockType","full-site-editing/editor/image-block-keywords",(function(e,t){return"core/image"!==t?e:e=Object(J.assign)({},e,{keywords:e.keywords.concat(ge)})}));n(48);Object(f.use)((function(e){return{dispatch:function(t){var n=z()({},e.dispatch(t)),o=fullSiteEditing.editorPostType;return"core/editor"===t&&n.trashPost&&"wp_template_part"===o&&(n.trashPost=function(){}),n}}})),Object(f.use)((function(e){return{dispatch:function(t){var n=z()({},e.dispatch(t)),o=fullSiteEditing.editorPostType;if("core/editor"===t&&n.editPost&&"wp_template_part"===o){var r=n.editPost;n.editPost=function(e){"draft"!==e.status&&r(e)}}return n}}}));var Oe=Object(f.subscribe)((function(){var e=Object(f.dispatch)("core/edit-post").removeEditorPanel;return"page"===fullSiteEditing.editorPostType&&e("featured-image"),"wp_template_part"===fullSiteEditing.editorPostType&&e("post-status"),Oe()}))}]));
|
dotcom-fse/plugins/editor-template-classes/index.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* External dependencies
|
4 |
*/
|
5 |
import classNames from 'classnames';
|
6 |
-
import {
|
7 |
|
8 |
/**
|
9 |
* WordPress dependencies
|
@@ -20,10 +20,10 @@ const EditorTemplateClasses = withSelect( ( select ) => {
|
|
20 |
'name',
|
21 |
''
|
22 |
);
|
23 |
-
if ( endsWith(
|
24 |
return 'fse-header';
|
25 |
}
|
26 |
-
if ( endsWith(
|
27 |
return 'fse-footer';
|
28 |
}
|
29 |
} );
|
3 |
* External dependencies
|
4 |
*/
|
5 |
import classNames from 'classnames';
|
6 |
+
import { get, map } from 'lodash';
|
7 |
|
8 |
/**
|
9 |
* WordPress dependencies
|
20 |
'name',
|
21 |
''
|
22 |
);
|
23 |
+
if ( typeName.endsWith( '-header' ) ) {
|
24 |
return 'fse-header';
|
25 |
}
|
26 |
+
if ( typeName.endsWith( '-footer' ) ) {
|
27 |
return 'fse-footer';
|
28 |
}
|
29 |
} );
|
editor-gutenboarding-launch/index.php
CHANGED
@@ -33,6 +33,8 @@ function enqueue_script_and_style() {
|
|
33 |
true
|
34 |
);
|
35 |
|
|
|
|
|
36 |
wp_enqueue_style(
|
37 |
'a8c-fse-editor-gutenboarding-launch-style',
|
38 |
plugins_url( 'dist/editor-gutenboarding-launch.css', __FILE__ ),
|
33 |
true
|
34 |
);
|
35 |
|
36 |
+
wp_set_script_translations( 'a8c-fse-editor-gutenboarding-launch-script', 'full-site-editing' );
|
37 |
+
|
38 |
wp_enqueue_style(
|
39 |
'a8c-fse-editor-gutenboarding-launch-style',
|
40 |
plugins_url( 'dist/editor-gutenboarding-launch.css', __FILE__ ),
|
editor-site-launch/dist/editor-site-launch.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'b417e763e45cb4f5869b647633dd5b25');
|
editor-site-launch/dist/editor-site-launch.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},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.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"],e.exports=n(69)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var r=n(59),i=n(60),o=n(27),a=n(61);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.coreData}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){var r=n(9);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},,,,function(e,t,n){var r=n(63),i=n(64),o=n(27),a=n(65);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,a,s;if(l(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),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function p(){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 m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.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):b(i,i.length)}function h(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 b(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),s.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},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(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},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var l=c.length,u=b(c,l);for(n=0;n<l;++n)o(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,m(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,m(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if(l(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){a=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,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.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},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r=n(25),i=n(29);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(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 a=e.charCodeAt(i);a<128?n[r++]=a:a<2048?(n[r++]=a>>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|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+=s(e[n].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=a(i)),n+=c(i.toString(16))}return n},t.zero2=s,t.zero8=c,t.join32=function(e,t,n,i){var o=n-t;r(o%4==0);for(var a=new Array(o/4),s=0,c=t;s<a.length;s++,c+=4){var l;l="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],a[s]=l>>>0}return a},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,a=(o<r?1:0)+n+i;e[t]=a>>>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,a,s){var c=0,l=t;return c+=(l=l+r>>>0)<t?1:0,c+=(l=l+o>>>0)<o?1:0,e+n+i+a+(c+=(l=l+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,c,l){var u=0,d=t;return u+=(d=d+r>>>0)<t?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+s>>>0)<s?1:0,e+n+i+a+c+(u+=(d=d+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,c,l){return t+r+o+s+l>>>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}},function(e,t){!function(){e.exports=this.wp.dataControls}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";
|
7 |
/*!
|
8 |
* cookie
|
9 |
* Copyright(c) 2012-2014 Roman Shtylman
|
10 |
* Copyright(c) 2015 Douglas Christopher Wilson
|
11 |
* MIT Licensed
|
12 |
-
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},i=t||{},a=e.split(o),c=i.decode||r,l=0;l<a.length;l++){var u=a[l],d=u.indexOf("=");if(!(d<0)){var p=u.substr(0,d).trim(),m=u.substr(++d,u.length).trim();'"'==m[0]&&(m=m.slice(1,-1)),null==n[p]&&(n[p]=s(m,c))}}return n},t.serialize=function(e,t,n){var r=n||{},o=r.encode||i;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var s=o(t);if(s&&!a.test(s))throw new TypeError("argument val is invalid");var c=e+"="+s;if(null!=r.maxAge){var l=r.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");c+="; Max-Age="+Math.floor(l)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");c+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");c+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");c+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(c+="; HttpOnly");r.secure&&(c+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return c};var r=decodeURIComponent,i=encodeURIComponent,o=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},,function(e,t,n){var r=n(28);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){"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}}},function(e,t,n){"use strict";var r=n(20),i=n(25);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}},function(e,t,n){"use strict";var r=n(20).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function a(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?a(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=a,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}},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";var r=n(20),i=n(30),o=n(31),a=n(25),s=r.sum32,c=r.sum32_4,l=r.sum32_5,u=o.ch32,d=o.maj32,p=o.s0_256,m=o.s1_256,f=o.g0_256,h=o.g1_256,b=i.BlockHash,g=[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 v(){if(!(this instanceof v))return new v;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(v,b),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.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],f(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],b=this.h[2],g=this.h[3],v=this.h[4],y=this.h[5],x=this.h[6],_=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var w=l(_,m(v),u(v,y,x),this.k[r],n[r]),O=s(p(i),d(i,o,b));_=x,x=y,y=v,v=s(g,w),g=b,b=o,o=i,i=s(w,O)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],b),this.h[3]=s(this.h[3],g),this.h[4]=s(this.h[4],v),this.h[5]=s(this.h[5],y),this.h[6]=s(this.h[6],x),this.h[7]=s(this.h[7],_)},v.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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},i=s(n(0)),o=s(n(82)),a=s(n(85));function s(e){return e&&e.__esModule?e:{default:e}}var c=void 0;function l(e,t){var n,a,s,u,d,p,m,f,h=[],b={};for(p=0;p<e.length;p++)if("string"!==(d=e[p]).type){if(!t.hasOwnProperty(d.value)||void 0===t[d.value])throw new Error("Invalid interpolation, missing component node: `"+d.value+"`");if("object"!==r(t[d.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+d.value+"`","\n> "+c);if("componentClose"===d.type)throw new Error("Missing opening component token: `"+d.value+"`");if("componentOpen"===d.type){n=t[d.value],s=p;break}h.push(t[d.value])}else h.push(d.value);return n&&(u=function(e,t){var n,r,i=t[e],o=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===i.value){if("componentOpen"===n.type){o++;continue}if("componentClose"===n.type){if(0===o)return r;o--}}throw new Error("Missing closing component token `"+i.value+"`")}(s,e),m=l(e.slice(s+1,u),t),a=i.default.cloneElement(n,{},m),h.push(a),u<e.length-1&&(f=l(e.slice(u+1),t),h=h.concat(f))),1===h.length?h[0]:(h.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,o.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,i=e.throwErrors;if(c=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var o=(0,a.default)(t);try{return l(o,n)}catch(s){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+s.message+"`");return t}}},function(e,t,n){var r=n(19),i=n(29);function o(e){if(!(this instanceof o))return new o(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=o,i(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},o.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},o.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},o.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},o.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},o.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},o.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},function(e,t,n){"use strict";var r=n(20),i=n(30),o=n(31),a=r.rotl32,s=r.sum32,c=r.sum32_5,l=o.ft_1,u=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(p,u),e.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.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]=a(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],p=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var f=~~(r/20),h=c(a(i,5),l(f,o,u,p),m,n[r],d[f]);m=p,p=u,u=a(o,30),o=i,i=h}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],p),this.h[4]=s(this.h[4],m)},p.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(86);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(87),i=n(88),o=n(89);e.exports=function(e){var t=i();return function(){var n,i=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}}},function(e,t,n){"use strict";e.exports=n(91)},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var r=n(93),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=m(n);i&&i!==f&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),h=c(n),b=0;b<a.length;++b){var g=a[b];if(!(o[g]||r&&r[g]||h&&h[g]||s&&s[g])){var v=p(n,g);try{l(t,g,v)}catch(y){}}}}return t}},,,,,,,,,,,,function(e,t){!function(){e.exports=this["a8c-fse-common-data-stores"]}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){var r=n(28);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(18);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return i.colors[Math.abs(t)%i.colors.length]}function i(e){var n;function r(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];if(r.enabled){var a=r,s=Number(new Date),c=s-(n||s);a.diff=c,a.prev=n,a.curr=s,n=s,t[0]=i.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;l++;var r=i.formatters[n];if("function"==typeof r){var o=t[l];e=r.call(a,o),t.splice(l,1),l--}return e})),i.formatArgs.call(a,t);var u=a.log||i.log;u.apply(a,t)}}return r.namespace=e,r.enabled=i.enabled(e),r.useColors=i.useColors(),r.color=t(e),r.destroy=o,r.extend=a,"function"==typeof i.init&&i.init(r),i.instances.push(r),r}function o(){var e=i.instances.indexOf(this);return-1!==e&&(i.instances.splice(e,1),!0)}function a(e,t){var n=i(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return i.debug=i,i.default=i,i.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},i.disable=function(){var e=[].concat(r(i.names.map(s)),r(i.skips.map(s).map((function(e){return"-"+e})))).join(",");return i.enable(""),e},i.enable=function(e){var t;i.save(e),i.names=[],i.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?i.skips.push(new RegExp("^"+e.substr(1)+"$")):i.names.push(new RegExp("^"+e+"$")));for(t=0;t<i.instances.length;t++){var o=i.instances[t];o.enabled=i.enabled(o.namespace)}},i.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=i.skips.length;t<n;t++)if(i.skips[t].test(e))return!1;for(t=0,n=i.names.length;t<n;t++)if(i.names[t].test(e))return!0;return!1},i.humanize=n(70),Object.keys(e).forEach((function(t){i[t]=e[t]})),i.instances=[],i.names=[],i.skips=[],i.formatters={},i.selectColor=t,i.enable(i.load()),i}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,a=7*o,s=365.25*o;function c(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\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(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=i)return c(e,t,i,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(0),i="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=n(32),a=n(83),s=n(84),c="function"==typeof Symbol&&Symbol.iterator;function l(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var o,s=typeof e;if("undefined"!==s&&"boolean"!==s||(e=null),null===e||"string"===s||"number"===s||"object"===s&&e.$$typeof===i)return n(r,e,""===t?"."+l(e,0):t),1;var d=0,p=""===t?".":t+":";if(Array.isArray(e))for(var m=0;m<e.length;m++)d+=u(o=e[m],p+l(o,m),n,r);else{var f=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(f){0;for(var h,b=f.call(e),g=0;!(h=b.next()).done;)d+=u(o=h.value,p+l(o,g++),n,r)}else if("object"===s){0;var v=""+e;a(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===v?"object with keys {"+Object.keys(e).join(", ")+"}":v,"")}}return d}var d=/\/+/g;function p(e){return(""+e).replace(d,"$&/")}var m,f,h=b,b=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},g=function(e){var t=this;a(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)};function v(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function y(e,t,n){var i,a,s=e.result,c=e.keyPrefix,l=e.func,u=e.context,d=l.call(u,t,e.count++);Array.isArray(d)?x(d,s,n,o.thatReturnsArgument):null!=d&&(r.isValidElement(d)&&(i=d,a=c+(!d.key||t&&t.key===d.key?"":p(d.key)+"/")+n,d=r.cloneElement(i,{key:a},void 0!==i.props?i.props.children:void 0)),s.push(d))}function x(e,t,n,r,i){var o="";null!=n&&(o=p(n)+"/");var a=v.getPooled(t,o,r,i);!function(e,t,n){null==e||u(e,"",t,n)}(e,y,a),v.release(a)}v.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},m=function(e,t,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,e,t,n,r),o}return new i(e,t,n,r)},(f=v).instancePool=[],f.getPooled=m||h,f.poolSize||(f.poolSize=10),f.release=g;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return s(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return s(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;a(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)x(e[n],t,n,o.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";var r=n(32);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(90),i=n(22);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";
|
13 |
/** @license React v1.3.0
|
14 |
* use-subscription.production.min.js
|
15 |
*
|
@@ -17,12 +17,12 @@
|
|
17 |
*
|
18 |
* This source code is licensed under the MIT license found in the
|
19 |
* LICENSE file in the root directory of this source tree.
|
20 |
-
*/Object.defineProperty(t,"__esModule",{value:!0});var r=n(
|
21 |
/*
|
22 |
object-assign
|
23 |
(c) Sindre Sorhus
|
24 |
@license MIT
|
25 |
-
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),l=1;l<arguments.length;l++){for(var u in n=Object(arguments[l]))i.call(n,u)&&(c[u]=n[u]);if(r){s=r(n);for(var d=0;d<s.length;d++)o.call(n,s[d])&&(c[s[d]]=n[s[d]])}}return c}},function(e,t,n){"use strict";e.exports=n(
|
26 |
/** @license React v16.13.1
|
27 |
* react-is.production.min.js
|
28 |
*
|
@@ -30,11 +30,11 @@ object-assign
|
|
30 |
*
|
31 |
* This source code is licensed under the MIT license found in the
|
32 |
* LICENSE file in the root directory of this source tree.
|
33 |
-
*/var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,b=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,x=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case p:case a:case c:case s:case f:return e;default:switch(e=e&&e.$$typeof){case u:case m:case g:case b:case l:return e;default:return t}}case o:return t}}}function O(e){return w(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=l,t.Element=i,t.ForwardRef=m,t.Fragment=a,t.Lazy=g,t.Memo=b,t.Portal=o,t.Profiler=c,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return O(e)||w(e)===d},t.isConcurrentMode=O,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return w(e)===m},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===b},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===c},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===c||e===s||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===b||e.$$typeof===l||e.$$typeof===u||e.$$typeof===m||e.$$typeof===y||e.$$typeof===x||e.$$typeof===_||e.$$typeof===v)},t.typeOf=w},function(e,t,n){},function(e,t,n){"use strict";var r=n(97);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setPrices",(function(){return un})),n.d(r,"resetPlan",(function(){return dn}));var i={};n.r(i),n.d(i,"getPlanBySlug",(function(){return mn})),n.d(i,"getDefaultPaidPlan",(function(){return fn})),n.d(i,"getSupportedPlans",(function(){return hn})),n.d(i,"getPlanByPath",(function(){return bn})),n.d(i,"getPlansDetails",(function(){return gn})),n.d(i,"getPlansPaths",(function(){return vn})),n.d(i,"getPrices",(function(){return yn})),n.d(i,"isPlanEcommerce",(function(){return xn})),n.d(i,"isPlanFree",(function(){return _n}));var o={};n.r(o),n.d(o,"getPrices",(function(){return wn}));var a={};n.r(a),n.d(a,"plansPaths",(function(){return on})),n.d(a,"PLAN_FREE",(function(){return nt})),n.d(a,"PLAN_PERSONAL",(function(){return rt})),n.d(a,"PLAN_PREMIUM",(function(){return it})),n.d(a,"PLAN_BUSINESS",(function(){return ot})),n.d(a,"PLAN_ECOMMERCE",(function(){return at})),n.d(a,"register",(function(){return En}));n(58);var s="automattic/site",c="automattic/launch",l="automattic/onboard/plans",u=n(1),d=n(0),p=n.n(d),m=n(2),f=n(33),h=n(10),b=n.n(h),g=n(12),v=n(4),y=n(5);function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function w(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}var O=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,i=_(e,["icon","size"]);return Object(u.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))},E=n(8),k=Object(u.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(u.createElement)(E.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),S=Object(u.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(E.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),C=n(6),j=n.n(C),N=n(9),P=n.n(N),A=(n(67),function(e){var t=e.children;return d.createElement("h1",{className:"onboarding-title"},t)}),L=function(e){var t=e.children;return d.createElement("h2",{className:"onboarding-subtitle"},t)},T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var F=function(){return(F=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function M(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function D(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function R(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function B(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(R(arguments[t]));return e}function I(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function z(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var U=n(13),H=d.createContext(q()),$=function(){return d.useContext(H)};Object(U.createHigherOrderComponent)((function(e){return function(t){var n=$();return d.createElement(e,F({},n,t))}}),"withI18n");function q(e){var t,n,r=Object(v.createI18n)(e),i=null!==(n=null===(t=null==e?void 0:e[""])||void 0===t?void 0:t.localeSlug)&&void 0!==n?n:"en";return{__:r.__.bind(r),_n:r._n.bind(r),_nx:r._nx.bind(r),_x:r._x.bind(r),isRTL:r.isRTL.bind(r),i18nLocale:i}}n(68);var V=function(e){var t=e.className,n=e.children,r=e.sticky,i=void 0===r?null:r,o="";return!0===i&&(o="is-sticky"),!1===i&&(o="no-sticky"),d.createElement("div",{className:j()("action-buttons",t,o)},n)},G=function(e){var t=e.className,n=e.children,r=M(e,["className","children"]),i=$().__;return d.createElement(y.Button,F({className:j()("action_buttons__button action-buttons__back",t),isLink:!0},r),n||i("Go back"))},Y=function(e){var t=e.className,n=e.children,r=M(e,["className","children"]),i=$().__;return d.createElement(y.Button,F({className:j()("action_buttons__button action-buttons__next",t),isPrimary:!0},r),n||i("Continue"))},W=(n(62),function(e){var t=e.children;return Object(u.createElement)(u.Fragment,null,t)});function K(){var e,t,n=Object(m.useSelect)((function(e){return e(s).getSite(window._currentSiteId)})),r=Object(m.useSelect)((function(e){return e(s).isLaunched(window._currentSiteId)}));return{isPaidPlan:n&&!(null===(e=n.plan)||void 0===e?void 0:e.is_free),launchStatus:r,currentDomainName:(null==n?void 0:n.URL)&&new URL(null==n?void 0:n.URL).hostname,selectedFeatures:null==n||null===(t=n.options)||void 0===t?void 0:t.selected_features}}var X=n(18),Z=n.n(X),J=n(14),Q=n.n(J),ee=n(34),te=n.n(ee),ne=n(35);function re(){var e,t=Object(m.useSelect)((function(e){return e(c).getState()})).domainSearch,n=Object(g.useEntityProp)("root","site","title"),r=b()(n,1)[0],i=K().currentDomainName,o=t.trim()||r;o&&o!==Object(v.__)("Site Title","full-site-editing")||(o=null!==(e=null==i?void 0:i.split(".")[0])&&void 0!==e?e:"");return o}n(66);var ie=function(e){var t=e.onPrevStep,n=e.onNextStep,r=function(){var e=Object(m.useSelect)((function(e){return e(c).getSelectedDomain()})),t=Object(m.useDispatch)(c).setDomainSearch,n=Object(g.useEntityProp)("root","site","title"),r=b()(n,2),i=r[0],o=r[1],a=Object(m.useDispatch)("core").saveEditedEntityRecord;return{title:i,updateTitle:o,saveTitle:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;o(n.trim()),a("root","site"),!e&&t(n)}}}(),i=r.title,o=r.updateTitle,a=r.saveTitle,s=function(){a(),null==n||n()};return Object(u.createElement)(W,null,Object(u.createElement)("div",{className:"nux-launch-step__header"},Object(u.createElement)("div",null,Object(u.createElement)(A,null,Object(v.__)("Name your site","full-site-editing")),Object(u.createElement)(L,null,Object(v.__)("Pick a name for your site.","full-site-editing"))),Object(u.createElement)(V,{sticky:!1},Object(u.createElement)(Y,{onClick:s,disabled:!(null==i?void 0:i.trim())}))),Object(u.createElement)("div",{className:"nux-launch-step__body"},Object(u.createElement)("form",{onSubmit:s},Object(u.createElement)(y.TextControl,{id:"nux-launch-step__input",className:"nux-launch-step__input",onChange:o,onBlur:function(){return a()},value:i,spellCheck:!1,autoComplete:"off",placeholder:Object(v.__)("Enter site name","full-site-editing"),autoCorrect:"off","data-hj-whitelist":!0}),Object(u.createElement)("div",{className:"nux-launch-step__input-hint"},Object(u.createElement)(y.Tip,{size:18}),Object(u.createElement)("span",null,Object(v.__)("Don't worry, you can change it later.","full-site-editing"))))),Object(u.createElement)("div",{className:"nux-launch-step__footer"},Object(u.createElement)(V,{sticky:!0},Object(u.createElement)(G,{onClick:function(){null==t||t()}}),Object(u.createElement)(Y,{onClick:s,disabled:!(null==i?void 0:i.trim())}))))},oe=n(11);function ae(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}var se=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,i=_(e,["icon","size"]);return Object(u.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))},ce=Object(u.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(E.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),le=n(7),ue=n.n(le),de=ue()("calypso:analytics");n(36);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}));n(24);var pe=n(19),me=ue()("lib/load-script/callback-handler"),fe=new Map;function he(){return fe}function be(e){return he().has(e)}function ge(e,t){var n=he();be(e)?(me('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(me('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=he(),r=n.get(e);if(r){var i='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));me(i),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function ye(){var e=this.getAttribute("src");me('Handling successful request for "'.concat(e,'"')),ve(e),this.onload=null}function xe(){var e=this.getAttribute("src");me('Handling failed request for "'.concat(e,'"')),ve(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}var _e=ue()("lib/load-script/dom-operations");ue()("package/load-script");function we(e,t){var n;if(!be(e)&&(n=function(e){_e('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=ye,t.onerror=xe,t}(e),_e("Attaching element to head"),document.head.appendChild(n)),"function"!=typeof t)return new Promise((function(t,n){ge(e,(function(e){null===e?t():n(e)}))}));ge(e,t)}var Oe,Ee=["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"];Promise.resolve();function ke(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&we("//stats.wp.com/w.js?61");var Se=new pe.EventEmitter;function Ce(e,t){if(de('Record event "%s" called with props %o',e,t=t||{}),e.startsWith("calypso_")||Object(oe.includes)(Ee,e)){if(Oe){var n=Oe(t);t=F(F({},t),n)}t=Object(oe.omitBy)(t,oe.isUndefined),de('Recording event "%s" with actual props %o',e,t),ke(["recordEvent",e,t]),Se.emit("record-event",e,t)}else de('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}var je="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),Ne=new Uint8Array(16);function Pe(){if(!je)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return je(Ne)}for(var Ae=[],Le=0;Le<256;++Le)Ae[Le]=(Le+256).toString(16).substr(1);var Te=function(e,t){var n=t||0,r=Ae;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var Fe=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||Pe)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||Te(i)};var Me;!function(e){e.Failure="failure",e.Pending="pending",e.Success="success",e.Uninitialized="uninitialized"}(Me||(Me={}));var De=Object(u.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(E.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Re=(n(74),function(e){var t=e.children,n=e.className,r=e.id,i=e.position,o=void 0===i?"bottom center":i,a=e.noArrow,s=void 0===a||a,c=Object(d.useState)(!1),l=c[0],u=c[1];return p.a.createElement(y.Button,{icon:De,onClick:function(){u(!l)},className:"info-tooltip","data-testid":"info-tooltip"},l&&p.a.createElement(y.Popover,{id:r,className:j()("info-tooltip__content",n),onClose:function(){u(!1)},position:o,noArrow:s},t))}),Be=function(e){var t=e.isUnavailable,n=e.domain,r=e.isLoading,i=e.cost,o=e.railcarId,a=e.hstsRequired,s=void 0!==a&&a,c=e.isFree,l=void 0!==c&&c,m=e.isExistingSubdomain,f=void 0!==m&&m,h=e.isRecommended,b=void 0!==h&&h,g=e.onSelect,x=e.onRender,_=e.selected,w=$().__,O=Object(U.useViewportMatch)("small","<"),E=n.indexOf("."),k=n.slice(0,E),S=n.slice(E),C=Object(d.useState)(),N=C[0],P=C[1],A=Object(d.useState)(),L=A[0],T=A[1],F=Fe();Object(d.useEffect)((function(){n!==N&&L!==o&&o&&(x(),P(n),T(o))}),[n,N,L,o,x]);return p.a.createElement("label",{className:j()("domain-picker__suggestion-item",{"is-free":l,"is-selected":_,"is-unavailable":t})},r?p.a.createElement(y.Spinner,null):p.a.createElement("input",{"aria-labelledby":F,className:"domain-picker__suggestion-radio-button",type:"radio",disabled:t,name:"domain-picker-suggestion-option",onChange:function(){L&&function(e){Ce("calypso_traintracks_interact",{railcar:e.railcarId,action:e.action})}({action:"domain_selected",railcarId:L}),g(n)},checked:_&&!t}),p.a.createElement("div",{className:"domain-picker__suggestion-item-name"},p.a.createElement("div",{className:"domain-picker__suggestion-item-name-inner"},p.a.createElement("span",{className:"domain-picker__domain-name"},k),p.a.createElement("span",{className:j()("domain-picker__domain-tld",{"with-margin":!s})},S),s&&p.a.createElement(Re,{position:O?"bottom center":"middle right",noArrow:!1,className:"domain-picker__info-tooltip"},Object(u.createInterpolateElement)(w("All domains ending with <tld /> require an SSL certificate to host a website. When you host this domain at WordPress.com an SSL certificate is included. <learn_more_link>Learn more</learn_more_link>"),{tld:p.a.createElement("b",null,S),learn_more_link:p.a.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://wordpress.com/support/https-ssl"})})),b&&!t&&p.a.createElement("div",{className:"domain-picker__badge is-recommended"},w("Recommended"))),f&&p.a.createElement("div",{className:"domain-picker__change-subdomain-tip"},w("You can change your free subdomain later under Domain Settings."))),p.a.createElement("div",{className:j()("domain-picker__price",{"is-paid":!l})},t&&w("Unavailable"),l&&!t&&w("Free"),!l&&!t&&p.a.createElement(p.a.Fragment,null,p.a.createElement("span",{className:"domain-picker__price-inclusive"}," ",w("Included in plans")," "),p.a.createElement("span",{className:"domain-picker__price-cost"},Object(v.sprintf)(w("%s/year"),i)))))},Ie=function(){return p.a.createElement("div",{className:"domain-picker__suggestion-item placeholder"},p.a.createElement("div",{className:"domain-picker__suggestion-item-name placeholder"}),p.a.createElement("div",{className:"domain-picker__price placeholder"}))};function ze(e,t){return e===t}function Ue(e,t,n){var r=n&&n.equalityFn?n.equalityFn:ze,i=Object(d.useState)(e),o=i[0],a=i[1],s=function(e,t,n){void 0===n&&(n={});var r=n.maxWait,i=Object(d.useRef)(null),o=Object(d.useRef)([]),a=n.leading,s=Object(d.useRef)(!1),c=Object(d.useRef)(null),l=Object(d.useRef)(!1),u=Object(d.useRef)(e);u.current=e;var p=Object(d.useCallback)((function(){clearTimeout(c.current),clearTimeout(i.current),i.current=null,o.current=[],c.current=null,s.current=!1}),[]);return Object(d.useEffect)((function(){return function(){l.current=!0}}),[]),[Object(d.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o.current=e,clearTimeout(c.current),!c.current&&a&&!s.current)return u.current.apply(u,e),void(s.current=!0);c.current=setTimeout((function(){p(),l.current||u.current.apply(u,e)}),t),r&&!i.current&&(i.current=setTimeout((function(){var e=o.current;p(),l.current||u.current.apply(null,e)}),r))}),[r,t,p,a]),p,function(){c.current&&(u.current.apply(null,o.current),p())}]}(Object(d.useCallback)((function(e){return a(e)}),[]),t,n),c=s[0],l=s[1],u=Object(d.useRef)(e);return Object(d.useEffect)((function(){r(u.current,e)||(c(e),u.current=e)}),[e,c,r]),[o,l]}var He="automattic/domains/suggestions",$e=["available","available_premium"];var qe,Ve,Ge,Ye,We=Object(u.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(E.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),Ke=(n(73),function(e){var t=e.onSelect,n=e.selected,r=$().__,i=Object(u.useState)(!1),o=i[0],a=i[1],s=function(e){a(!1),t(e)},c=Object(m.useSelect)((function(e){return e(He).getCategories()}));return d.createElement("div",{className:j()("domain-categories",{"is-open":o})},d.createElement(y.Button,{className:"domain-categories__dropdown-button",onClick:function(){return a(!o)}},d.createElement("span",null,n||r("All Categories")),d.createElement(se,{icon:We,size:16})),d.createElement("ul",{className:"domain-categories__item-group"},d.createElement("li",{className:j()("domain-categories__item",{"is-selected":!n})},d.createElement(y.Button,{onClick:function(){return s()}},r("View all"))),c.map((function(e){var t=e.slug,r=e.title;return d.createElement("li",{key:t,className:j()("domain-categories__item",{"is-selected":t===n})},d.createElement(y.Button,{onClick:function(){return s(t)}},r))}))))}),Xe=function(){return p.a.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 300 40",xmlSpace:"preserve",width:"300"},p.a.createElement("rect",{x:"0",width:"310",height:"50",rx:"10",fill:"#D8D8D8"}),p.a.createElement("rect",{x:"8",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),p.a.createElement("rect",{x:"40",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),p.a.createElement("rect",{x:"72",y:"8",width:"300",height:"25",rx:"5",fill:"#fff"}),p.a.createElement("text",{x:"80",y:"26",fill:"#999"},"https://"),p.a.createElement("text",{x:"133",y:"26",fill:"#515151"},"example.com"))},Ze=(n(72),function(e){var t=e.groupItems,n=e.children;return t?p.a.createElement("div",{className:"domain-picker__suggestion-item-group"},n):p.a.createElement(p.a.Fragment,null,n)}),Je=function(e){var t,n,r=e.header,i=e.showDomainCategories,o=e.onDomainSelect,a=e.onExistingSubdomainSelect,s=e.quantity,c=void 0===s?5:s,l=e.quantityExpanded,u=void 0===l?10:l,f=e.onDomainSearchBlur,h=e.analyticsFlowId,b=e.analyticsUiAlgo,g=e.initialDomainSearch,v=void 0===g?"":g,x=e.onSetDomainSearch,_=e.currentDomain,w=e.isCheckingDomainAvailability,O=e.existingSubdomain,E=e.segregateFreeAndPaid,k=void 0!==E&&E,S=$().__,C=S("Search for a domain"),j=Object(d.useState)(!1),N=j[0],P=j[1],A=Object(d.useState)(v),L=A[0],T=A[1],F=Object(d.useState)(),M=F[0],D=F[1],R=Object(m.useSelect)((function(e){return e(He).getDomainSuggestionVendor()})),B=function(e,t,n,r){void 0===e&&(e=""),void 0===r&&(r="en");var i=Ue(e,300)[0],o=Object(m.useDispatch)(He).invalidateResolutionForStoreSelector;return Object(m.useSelect)((function(e){if(i&&!(i.length<2)){var a=e(He),s=a.getDomainSuggestions,c=a.getDomainState,l=a.getDomainErrorMessage;return{allDomainSuggestions:s(i,{include_wordpressdotcom:!0,include_dotblogsubdomain:!1,quantity:t+1,locale:r,category_slug:n}),state:c(),errorMessage:l(),retryRequest:function(){o("__internalGetDomainSuggestions")}}}}),[i,n,t])}(L.trim(),u,M,$().i18nLocale)||{},I=B.allDomainSuggestions,z=B.errorMessage,U=B.state,H=B.retryRequest,q=null==I?void 0:I.slice(O?1:0,N?u:c),V=Object(m.useSelect)((function(e){return e(He).getDomainAvailabilities()}),[]);Object(d.useEffect)((function(){P(!1)}),[L]);var G=Object(d.useState)(),Y=G[0],W=G[1];Object(d.useEffect)((function(){var e;I&&W((void 0===(e="suggestion")&&(e="recommendation"),Fe().replace(/-/g,"")+"-"+e))}),[I,W]);var K=function(e,t,n,r){!function(e){Ce("calypso_traintracks_render",{railcar:e.railcarId,ui_algo:e.uiAlgo,ui_position:e.uiPosition,fetch_algo:e.fetchAlgo,rec_result:e.result,fetch_query:e.query})}({uiAlgo:"/"+h+"/"+b,fetchAlgo:"/domains/search/"+R+"/"+h+(M?"/"+M:""),query:L,railcarId:t,result:r?e+"#recommended":e,uiPosition:n})},X=U===Me.Failure,Z=(null===(t=L.trim)||void 0===t?void 0:t.call(L).length)<=1,J=!X&&!Z,Q=!X&&Z;return p.a.createElement("div",{className:"domain-picker"},r&&r,p.a.createElement("div",{className:"domain-picker__search"},p.a.createElement("div",{className:"domain-picker__search-icon"},p.a.createElement(se,{icon:ce})),p.a.createElement(y.TextControl,{"data-hj-whitelist":!0,hideLabelFromVision:!0,label:C,placeholder:C,onChange:function(e){T(e),x(e)},onBlur:function(e){f&&f(e.currentTarget.value)},value:L})),X&&p.a.createElement("div",{className:"domain-picker__error"},p.a.createElement("p",{className:"domain-picker__error-message"},S("An error has occurred, please check your connection and retry."),z&&" "+z),p.a.createElement(y.Button,{isPrimary:!0,className:"domain-picker__error-retry-btn",onClick:H},"Retry")),J&&p.a.createElement("div",{className:"domain-picker__body"},i&&p.a.createElement("div",{className:"domain-picker__aside"},p.a.createElement(Ke,{selected:M,onSelect:D})),p.a.createElement("div",{className:"domain-picker__suggestion-sections"},p.a.createElement(p.a.Fragment,null,k&&p.a.createElement("p",{className:"domain-picker__suggestion-group-label"},S("Keep sub-domain")),p.a.createElement(Ze,{groupItems:k},O&&p.a.createElement(Be,{key:O,domain:O,cost:"Free",isFree:!0,isExistingSubdomain:!0,railcarId:Y?""+Y+0:void 0,onRender:function(){return K(O,""+Y+0,0,!1)},selected:_===O,onSelect:function(){null==a||a(O)}})),k&&p.a.createElement("p",{className:"domain-picker__suggestion-group-label"},S("Professional domains")),p.a.createElement(Ze,{groupItems:k},null!==(n=null==q?void 0:q.map((function(e,t){var n,r=O?t+1:t,i=1===r,a=null===(n=V[null==e?void 0:e.domain_name])||void 0===n?void 0:n.status,s=!a||(null==$e?void 0:$e.includes(a));return p.a.createElement(Be,{key:e.domain_name,isUnavailable:!s,domain:e.domain_name,cost:e.cost,isLoading:_===e.domain_name&&w,hstsRequired:e.hsts_required,isFree:e.is_free,isRecommended:i,railcarId:Y?""+Y+r:void 0,onRender:function(){return K(e.domain_name,""+Y+r,r,i)},onSelect:function(){o(e)},selected:_===e.domain_name})})))&&void 0!==n?n:Object(oe.times)(c,(function(e){return p.a.createElement(Ie,{key:e})})))),!N&&(null==I?void 0:I.length)&&(null==I?void 0:I.length)>c&&p.a.createElement("div",{className:"domain-picker__show-more"},p.a.createElement(y.Button,{onClick:function(){return P(!0)},isLink:!0},S("View more results"))))),Q&&p.a.createElement("div",{className:"domain-picker__empty-state"},p.a.createElement("p",{className:"domain-picker__empty-state--text"},S("A domain name is the site address people type in their browser to visit your site.")),p.a.createElement("div",null,p.a.createElement(Xe,null))))},Qe="gutenboarding",et=(n(71),function(e){var t=e.onPrevStep,n=e.onNextStep,r=Object(m.useSelect)((function(e){return e(c).getState()})),i=r.plan,o=r.domain,a=K().currentDomainName,s=re(),l=Object(m.useDispatch)(c),d=l.setDomain,p=l.unsetDomain,f=l.setDomainSearch,h=l.unsetPlan,b=l.confirmDomainSelection,g=function(){b(),null==n||n()};return Object(u.createElement)(W,null,Object(u.createElement)("div",{className:"nux-launch-step__header"},Object(u.createElement)("div",null,Object(u.createElement)(A,null,Object(v.__)("Choose a domain","full-site-editing")),Object(u.createElement)(L,null,Object(v.__)("Free for the first year with any paid plan.","full-site-editing"))),Object(u.createElement)(V,{sticky:!1},Object(u.createElement)(Y,{onClick:g,disabled:!s}))),Object(u.createElement)("div",{className:"nux-launch-step__body"},Object(u.createElement)(Je,{analyticsFlowId:Qe,initialDomainSearch:s,onSetDomainSearch:f,onDomainSearchBlur:function(e){Ce("calypso_newsite_domain_search_blur",{flow:Qe,query:e,where:"editor_domain_modal"})},currentDomain:(null==o?void 0:o.domain_name)||a,existingSubdomain:a,onDomainSelect:function(e){b(),d(e),(null==i?void 0:i.isFree)&&h()},onExistingSubdomainSelect:function(){p()},analyticsUiAlgo:"editor_domain_modal",segregateFreeAndPaid:!0})),Object(u.createElement)("div",{className:"nux-launch-step__footer"},Object(u.createElement)(V,{sticky:!0},Object(u.createElement)(G,{onClick:function(){null==t||t()}}),Object(u.createElement)(Y,{onClick:g,disabled:!s}))))}),tt=n(21),nt="free_plan",rt="personal-bundle",it="value_bundle",ot="business-bundle",at="ecommerce-bundle",st="automattic/onboard/plans",ct=it,lt={USD:{format:"SYMBOL_THEN_AMOUNT",symbol:"$",decimal:2},GBP:{format:"SYMBOL_THEN_AMOUNT",symbol:"£",decimal:2},JPY:{format:"SYMBOL_THEN_AMOUNT",symbol:"¥",decimal:0},BRL:{format:"SYMBOL_THEN_AMOUNT",symbol:"R$",decimal:2},EUR:{format:"SYMBOL_THEN_AMOUNT",symbol:"€",decimal:2},NZD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NZ$",decimal:2},AUD:{format:"SYMBOL_THEN_AMOUNT",symbol:"A$",decimal:2},CAD:{format:"SYMBOL_THEN_AMOUNT",symbol:"C$",decimal:2},IDR:{format:"AMOUNT_THEN_SYMBOL",symbol:"Rp",decimal:0},INR:{format:"AMOUNT_THEN_SYMBOL",symbol:"₹",decimal:0},ILS:{format:"AMOUNT_THEN_SYMBOL",symbol:"₪",decimal:2},RUB:{format:"AMOUNT_THEN_SYMBOL",symbol:"₽",decimal:2},MXN:{format:"SYMBOL_THEN_AMOUNT",symbol:"MX$",decimal:2},SEK:{format:"AMOUNT_THEN_SYMBOL",symbol:"SEK",decimal:2},HUF:{format:"AMOUNT_THEN_SYMBOL",symbol:"Ft",decimal:0},CHF:{format:"AMOUNT_THEN_SYMBOL",symbol:"CHF",decimal:2},CZK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kč",decimal:2},DKK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Dkr",decimal:2},HKD:{format:"AMOUNT_THEN_SYMBOL",symbol:"HK$",decimal:2},NOK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kr",decimal:2},PHP:{format:"AMOUNT_THEN_SYMBOL",symbol:"₱",decimal:2},PLN:{format:"AMOUNT_THEN_SYMBOL",symbol:"PLN",decimal:2},SGD:{format:"SYMBOL_THEN_AMOUNT",symbol:"S$",decimal:2},TWD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NT$",decimal:0},THB:{format:"SYMBOL_THEN_AMOUNT",symbol:"฿",decimal:2},TRY:{format:"AMOUNT_THEN_SYMBOL",symbol:"TL",decimal:2}},ut=n(37),dt=n.n(ut);qe={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},Ve=["(","?"],Ge={")":["("],":":["?","?:"]},Ye=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var pt={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function mt(e){var t=function(e){for(var t,n,r,i,o=[],a=[];t=e.match(Ye);){for(n=t[0],(r=e.substr(0,t.index).trim())&&o.push(r);i=a.pop();){if(Ge[n]){if(Ge[n][0]===i){n=Ge[n][1]||n;break}}else if(Ve.indexOf(i)>=0||qe[i]<qe[n]){a.push(i);break}o.push(i)}Ge[n]||a.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&o.push(e),o.concat(a.reverse())}(e);return function(e){return function(e,t){var n,r,i,o,a,s,c=[];for(n=0;n<e.length;n++){if(a=e[n],o=pt[a]){for(r=o.length,i=Array(r);r--;)i[r]=c.pop();try{s=o.apply(null,i)}catch(l){return l}}else s=t.hasOwnProperty(a)?t[a]:+a;c.push(s)}return c[0]}(t,e)}}var ft={contextDelimiter:"",onMissingKey:null};function ht(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},ft)this.options[n]=void 0!==t&&n in t?t[n]:ft[n]}ht.prototype.getPluralForm=function(e,t){var n,r,i,o,a=this.pluralForms[e];return a||("function"!=typeof(i=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=mt(r),i=function(e){return+o({n:e})}),a=this.pluralForms[e]=i),a(t)},ht.prototype.dcnpgettext=function(e,t,n,r,i){var o,a,s;return o=void 0===i?0:this.getPluralForm(e,i),a=n,t&&(a=t+this.options.contextDelimiter+n),(s=this.data[e][a])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)};var bt=n(38),gt=n.n(bt),vt=n(39),yt=n.n(vt),xt=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function _t(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(xt,(function(){var e,r,i,o,a;return e=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(i=arguments[7])&&(i=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(a=t[0][r]):(void 0===e&&(e=n),n++,a=t[e-1]),"f"===o?a=parseFloat(a)||0:"d"===o&&(a=parseInt(a)||0),void 0!==i&&("f"===o?a=a.toFixed(i):"s"===o&&(a=a.substr(0,i))),null!=a?a:"")}))}
|
34 |
/*
|
35 |
* Exposes number format capability
|
36 |
*
|
37 |
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
|
38 |
* @license See CREDITS.md
|
39 |
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
|
40 |
-
*/function wt(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,a=void 0===r?",":r,s=void 0===n?".":n,c="";return(c=(o?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(i,o):""+Math.round(i)).split("."))[0].length>3&&(c[0]=c[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(c[1]||"").length<o&&(c[1]=c[1]||"",c[1]+=new Array(o-c[1].length+1).join("0")),c.join(s)}var Ot=ue()("i18n-calypso"),Et="number_format_decimals",kt="number_format_thousands_sep",St="messages",Ct=[function(e){return e}],jt={};function Nt(){Ft.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function Pt(e){return Array.prototype.slice.call(e)}function At(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&Nt("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",Pt(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&Nt("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",Pt(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function Lt(e,t){return e.dcnpgettext(St,t.context,t.original,t.plural,t.count)}function Tt(e,t){for(var n=Ct.length-1;n>=0;n--){var r=Ct[n](Object.assign({},t)),i=r.context?r.context+""+r.original:r.original;if(e.state.locale[i])return Lt(e.state.tannin,r)}return null}function Ft(){if(!(this instanceof Ft))return new Ft;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:gt()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new pe.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}Ft.throwErrors=!1,Ft.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},Ft.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},Ft.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},Ft.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",i=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return wt(e,n,r,i)},Ft.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},Ft.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var i=e[""]["key-hash"],o=function(e,t){var n=!1===t?"":String(t);if(void 0!==jt[n+e])return jt[n+e];var r=yt()().update(e).digest("hex");return jt[n+e]=t?r.substr(0,t):r},a=function(e){return function(t){return t.context?(t.original=o(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=o(t.original,e),t}};if("sha1"===i.substr(0,4))if(4===i.length)Ct.push(a(!1));else{var s=i.substr(5).indexOf("-");if(s<0){var c=Number(i.substr(5));Ct.push(a(c))}else for(var l=Number(i.substr(5,s)),u=Number(i.substr(6+s)),d=l;d<=u;d++)Ct.push(a(d))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new ht(P()({},St,this.state.locale)),this.state.numberFormatSettings.decimal_point=Lt(this.state.tannin,At([Et])),this.state.numberFormatSettings.thousands_sep=Lt(this.state.tannin,At([kt])),this.state.numberFormatSettings.decimal_point===Et&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===kt&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},Ft.prototype.getLocale=function(){return this.state.locale},Ft.prototype.getLocaleSlug=function(){return this.state.localeSlug},Ft.prototype.isRtl=function(){return"rtl"===this.state.textDirection},Ft.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},Ft.prototype.hasTranslation=function(){return!!Tt(this,At(arguments))},Ft.prototype.translate=function(){var e=At(arguments),t=Tt(this,e);if(t||(t=Lt(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=_t.apply(void 0,Z()(n))}catch(i){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof i?window.console[r](i):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=dt()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},Ft.prototype.reRenderTranslations=function(){Ot("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},Ft.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},Ft.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var Mt=Ft,Dt=n(40),Rt=n.n(Dt),Bt=n(41),It=n.n(Bt),zt=n(22),Ut=n.n(zt),Ht=n(42),$t=n.n(Ht),qt=n(43),Vt=n.n(qt),Gt=n(23),Yt=n.n(Gt),Wt=n(44);var Kt,Xt,Zt,Jt,Qt=new Mt,en=(Qt.numberFormat.bind(Qt),Qt.translate.bind(Qt)),tn=(Qt.configure.bind(Qt),Qt.setLocale.bind(Qt),Qt.getLocale.bind(Qt),Qt.getLocaleSlug.bind(Qt),Qt.addTranslations.bind(Qt),Qt.reRenderTranslations.bind(Qt),Qt.registerComponentUpdateHook.bind(Qt),Qt.registerTranslateHook.bind(Qt),Qt.state,Qt.stateObserver,Qt.on.bind(Qt),Qt.off.bind(Qt),Qt.emit.bind(Qt),Xt={numberFormat:(Kt=Qt).numberFormat.bind(Kt),translate:Kt.translate.bind(Kt)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(Qt),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(Wt.useSubscription)(t)}var r=Object(U.createHigherOrderComponent)((function(e){return Object(d.forwardRef)((function(t,r){var i=n();return p.a.createElement(e,Yt()({},t,{isRtl:i,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(Qt)),nn=(tn.useRtl,tn.withRtl,["Remove WordPress.com ads","Email & basic live chat support","Collect recurring payments","Collect one-time payments","Earn ad revenue","Premium themes","Upload videos","Google Analytics support","Business features (incl. SEO)","Upload themes","Install plugins","Accept payments in 60+ countries"]),rn=((Zt={})[nt]={title:en("Free"),description:en("Create a beautiful, simple website in minutes"),productId:1,storeSlug:nt,pathSlug:"beginner",features:["3 GB storage space"],isFree:!0},Zt[rt]={title:en("Personal"),description:en("Best for personal use"),productId:1009,storeSlug:rt,pathSlug:"personal",features:B(["6 GB storage space"],nn.slice(0,3))},Zt[it]={title:en("Premium"),description:en("Best for freelancers"),productId:1003,storeSlug:it,pathSlug:"premium",features:B(["13 GB storage space"],nn.slice(0,8)),isPopular:!0},Zt[ot]={title:en("Business"),description:en("Best for small businesses"),productId:1008,storeSlug:ot,pathSlug:"business",features:B(["200 GB storage space"],nn.slice(0,11))},Zt[at]={title:en("eCommerce"),description:en("Best for online stores"),productId:1011,storeSlug:at,pathSlug:"ecommerce",features:B(["200 GB storage space"],nn)},Zt),on=Object.keys(rn).map((function(e){return rn[e].pathSlug})),an=[{id:"general",name:null,features:[{name:"Free domain for One Year",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Email & basic live chat support",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"24/7 Priority live chat support",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Preinstalled SSL security",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Jetpack essential features",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Storage",type:"text",data:["3 GB","6 GB","13 GB","200 GB","200 GB"]},{name:"Dozens of free designs",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Remove WordPress.com ads",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Unlimited premium themes",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced design customization",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Get personalized help",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Install plugins",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Upload themes",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Remove WordPress.com branding",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Automated backup & one-click rewind",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"SFTP and database access",type:"checkbox",data:[!1,!1,!1,!0,!0]}]},{id:"commerce",name:"Commerce",features:[{name:"Sell subscriptions (recurring payments)",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Sell single items (simple payments)",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Accept payments in 60+ countries",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Integrations with top shipping carriers",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Sell anything (products and/or services)",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Premium customizable starter themes",type:"checkbox",data:[!1,!1,!1,!1,!0]}]},{id:"marketing",name:"Marketing",features:[{name:"WordAds",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced social media tools",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"VideoPress support",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"SEO tools",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Commerce marketing tools",type:"checkbox",data:[!1,!1,!1,!1,!0]}]}],sn=Object.keys(rn),cn={supportedPlanSlugs:sn,prices:(Jt={},Jt[nt]="",Jt[rt]="",Jt[it]="",Jt[ot]="",Jt[at]="",Jt)},ln=function(e,t){switch(void 0===e&&(e=cn),t.type){case"SET_PRICES":return F(F({},e),{prices:t.prices});default:return e}},un=function(e){return{type:"SET_PRICES",prices:e}},dn=function(){return{type:"RESET_PLAN"}};function pn(e){return rn[e]}var mn=function(e,t){return pn(t)},fn=function(){return pn(ct)},hn=function(e){return e.supportedPlanSlugs.map(pn)},bn=function(e,t){return t&&hn(e).find((function(e){return(null==e?void 0:e.pathSlug)===t}))},gn=function(){return an},vn=function(e){return hn(e).map((function(e){return null==e?void 0:e.pathSlug}))},yn=function(e){return e.prices},xn=function(e,t){return t===at},_n=function(e,t){return t===nt};function wn(){var e,t,n;return D(this,(function(r){switch(r.label){case 0:return[4,Object(tt.apiFetch)({global:!0,url:"https://public-api.wordpress.com/rest/v1.5/plans",mode:"cors",credentials:"omit"})];case 1:return e=r.sent(),t=e.filter((function(e){return-1!==sn.indexOf(e.product_slug)})),n=t.reduce((function(e,t){return e[t.product_slug]=function(e){var t=lt[e.currency_code],n=e.raw_price/12;return Number.isInteger(n)||(n=n.toFixed(t.decimal)),"AMOUNT_THEN_SYMBOL"===t.format?""+n+t.symbol:""+t.symbol+n}(t),e}),{}),[4,un(n)];case 2:return r.sent(),[2]}}))}var On=!1;function En(){return On||(On=!0,Object(m.registerStore)(st,{resolvers:o,actions:r,controls:tt.controls,reducer:ln,selectors:i})),st}var kn=Object(u.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(E.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"})),Sn=Object(u.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(E.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),Cn=(n(79),p.a.createElement(se,{icon:kn,size:17})),jn=p.a.createElement(se,{icon:Sn,size:17}),Nn=p.a.createElement("svg",{width:"8",viewBox:"0 0 8 4"},p.a.createElement("path",{d:"M0 0 L8 0 L4 4 L0 0",fill:"currentColor"}));var Pn=function(e){var t=e.features,n=e.domain,r=e.isFree,i=void 0!==r&&r,o=e.isOpen,a=void 0!==o&&o,s=e.onPickDomain,c=e.disabledLabel,l=e.multiColumn,d=void 0!==l&&l,m=function(e,t,n){return{NO_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plans-feature-list__domain-summary is-cta",icon:Cn,domainMessage:p.a.createElement(p.a.Fragment,null,n("Pick a free domain (1 year)")," ",Nn)}},FREE_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plans-feature-list__domain-summary is-cta",icon:Cn,domainMessage:p.a.createElement(p.a.Fragment,null,n("Pick a free domain (1 year)")," ",Nn)}},PAID_DOMAIN:{FREE_PLAN:{className:"plans-feature-list__domain-summary is-free",icon:jn,domainMessage:p.a.createElement("span",null,Object(u.createInterpolateElement)(n("<url /> is not included"),{url:p.a.createElement("span",{className:"plans-feature-list__item-url"},null==t?void 0:t.domain_name)}))},PAID_PLAN:{className:"plans-feature-list__domain-summary is-picked",icon:Cn,domainMessage:p.a.createElement("span",null,Object(u.createInterpolateElement)(n("<url /> is included"),{url:p.a.createElement("span",{className:"plans-feature-list__item-url"},null==t?void 0:t.domain_name)}))}}}[t&&(t.is_free?"FREE_DOMAIN":"PAID_DOMAIN")||"NO_DOMAIN"][e?"FREE_PLAN":"PAID_PLAN"]}(i,n,$().__);return p.a.createElement("div",{className:"plans-feature-list",hidden:!a},p.a.createElement("ul",{className:j()("plans-feature-list__item-group",{"plans-feature-list__item-group--columns":d})},c?p.a.createElement("li",{className:"plans-feature-list__item plans-feature-list__item--disabled-message"},jn," ",p.a.createElement("span",null,c)):m&&p.a.createElement("li",{className:"plans-feature-list__item"},p.a.createElement(y.Button,{className:m.className,onClick:s,isLink:!0},m.icon,m.domainMessage)),t.map((function(e,t){return p.a.createElement("li",{key:t,className:"plans-feature-list__item"},Cn," ",p.a.createElement("span",null,e))}))))},An=d.createElement("svg",{width:"8",viewBox:"0 0 8 4"},d.createElement("path",{d:"M0 0 L8 0 L4 4 L0 0",fill:"currentColor"})),Ln=function(e){var t=e.slug,n=e.name,r=e.price,i=e.isPopular,o=void 0!==i&&i,a=e.isFree,s=void 0!==a&&a,c=e.domain,l=e.features,u=e.onSelect,p=e.onPickDomainClick,m=e.onToggleExpandAll,f=e.allPlansExpanded,h=e.disabledLabel,b=$().__,g=d.useState(!1),v=g[0],x=g[1],_=Object(U.useViewportMatch)("mobile",">=");d.useEffect((function(){x(f)}),[f]);var w=f||_||o||v;return d.createElement("div",{className:j()("plan-item",{"is-popular":o,"is-open":w})},o&&d.createElement("span",{className:"plan-item__badge"},b("Popular")),d.createElement("div",{className:j()("plan-item__viewport",{"is-popular":o})},d.createElement("div",{className:"plan-item__details"},d.createElement("div",{tabIndex:0,role:"button",onClick:function(){return x((function(e){return!e}))},onKeyDown:function(e){return 32===e.keyCode&&x((function(e){return!e}))},className:"plan-item__summary"},d.createElement("div",{className:"plan-item__heading"},d.createElement("div",{className:"plan-item__name"},n)),d.createElement("div",{className:"plan-item__price"},d.createElement("div",{className:j()("plan-item__price-amount",{"is-loading":!r})},r||" ")),!w&&d.createElement("div",{className:"plan-item__dropdown-chevron"},An)),d.createElement("div",{hidden:!w},d.createElement("div",{className:"plan-item__price-note"},b(s?"free forever":"per month, billed yearly")),d.createElement("div",{className:"plan-item__actions"},d.createElement(y.Button,{className:"plan-item__select-button",onClick:function(){u(t)},isPrimary:!0,disabled:!!h},d.createElement("span",null,b("Choose")))),d.createElement(Pn,{features:l,domain:c,isFree:s,isOpen:w,onPickDomain:p,disabledLabel:h})))),o&&!_&&d.createElement(y.Button,{onClick:m,className:"plan-item__mobile-expand-all-plans",isLink:!0},b(f?"Collapse all plans":"Expand all plans")))},Tn="automattic/onboard/plans",Fn=(n(80),function(e){var t=e.selectedPlanSlug,n=e.onPlanSelect,r=e.onPickDomainClick,i=e.currentDomain,o=e.disabledPlans,a=Object(m.useSelect)((function(e){return e(Tn).getSupportedPlans()})),s=Object(m.useSelect)((function(e){return e(Tn).getPrices()})),c=Object(d.useState)(!1),l=c[0],u=c[1];return p.a.createElement("div",{className:"plans-table"},a.map((function(e){var a;return e&&p.a.createElement(Ln,{allPlansExpanded:l,key:e.storeSlug,slug:e.storeSlug,domain:i,features:null!==(a=e.features)&&void 0!==a?a:[],isPopular:e.isPopular,isFree:e.isFree,price:s[e.storeSlug],name:null==e?void 0:e.title.toString(),isSelected:e.storeSlug===t,onSelect:n,onPickDomainClick:r,onToggleExpandAll:function(){return u((function(e){return!e}))},disabledLabel:null==o?void 0:o[e.storeSlug]})})))}),Mn=(n(78),p.a.createElement("svg",{width:"8",viewBox:"0 0 8 4"},p.a.createElement("path",{d:"M0 0 L8 0 L4 4 L0 0",fill:"currentColor"}))),Dn=function(e){var t=e.slug,n=e.name,r=e.description,i=e.price,o=e.features,a=e.domain,s=e.badge,c=e.isFree,l=void 0!==c&&c,u=e.isOpen,d=void 0!==u&&u,m=e.isPrimary,f=void 0!==m&&m,h=e.onSelect,b=e.onPickDomainClick,g=e.onToggle,v=e.disabledLabel,y=$().__,x=function(){!v&&(null==g||g(t,!d))};return p.a.createElement("div",{className:j()("plans-accordion-item",{"is-open":d,"is-primary":f,"has-badge":!!s,"is-disabled":!!v})},s&&p.a.createElement("div",{className:"plans-accordion-item__badge"},p.a.createElement("span",null,s)),p.a.createElement("div",{className:"plans-accordion-item__viewport"},p.a.createElement("div",{className:"plans-accordion-item__details"},p.a.createElement("div",{tabIndex:0,role:"button",onClick:x,onKeyDown:function(e){return 32===e.keyCode&&x()},className:"plans-accordion-item__header"},p.a.createElement("div",{className:"plans-accordion-item__heading"},p.a.createElement("div",{className:"plans-accordion-item__name"},n),p.a.createElement("div",{className:"plans-accordion-item__description"},r)),p.a.createElement("div",{className:"plans-accordion-item__price"},p.a.createElement("div",{className:j()("plans-accordion-item__price-amount",{"is-loading":!i})},i||" ",i&&p.a.createElement("span",null,y("/mo"))),p.a.createElement("div",{className:"plans-accordion-item__price-note"},y(l?"free forever":"billed annually"))),p.a.createElement("div",{className:"plans-accordion-item__disabled-label"},v),!d&&p.a.createElement("div",{className:"plans-accordion-item__dropdown-chevron"},Mn)),p.a.createElement("div",{className:"plans-accordion-item__actions",hidden:!d},p.a.createElement(Y,{onClick:function(){h(t)}},y("Select"))),p.a.createElement(Pn,{features:o,domain:a,isFree:l,isOpen:d,onPickDomain:b,multiColumn:!0}))))},Rn=(n(77),p.a.createElement(y.SVG,{viewBox:"0 0 24 24"},p.a.createElement(y.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"}))),Bn=function(e){var t,n=e.selectedFeatures,r=void 0===n?[]:n,i=e.selectedPlanSlug,o=e.onPlanSelect,a=e.onPickDomainClick,s=e.currentDomain,c=e.disabledPlans,l=$().__,u=Object(m.useSelect)((function(e){return e(Tn).getSupportedPlans()})),f=Object(m.useSelect)((function(e){return e(Tn).getPrices()})),h=Object(m.useSelect)((function(e){return e(Tn).getDefaultPaidPlan()})),b=Object(m.useSelect)((function(e){return e("automattic/wpcom-features").getRecommendedPlanSlug(r)})),g=Object(m.useSelect)((function(e){return e(Tn).getPlanBySlug(b)})),v=g||h,x=l(g?"Recommended for you":"Popular"),_=u.filter((function(e){return e.storeSlug!==v.storeSlug})),w=[v.storeSlug],O=Object(d.useState)(w),E=O[0],k=O[1],S=E.length>=u.length,C=function(e,t){k(t?I(E,[e]):E.filter((function(t){return t!==e})))};return p.a.createElement("div",{className:"plans-accordion"},p.a.createElement("div",{className:"plans-accordion__plan-item-group"},v&&p.a.createElement(p.a.Fragment,null,g&&p.a.createElement("div",{className:"plans-accordion__recommend-hint"},p.a.createElement(se,{icon:Rn,size:16}),p.a.createElement("span",null,l("Based on the features you selected."))),p.a.createElement(Dn,{key:v.storeSlug,slug:v.storeSlug,name:null==v?void 0:v.title.toString(),description:null==v?void 0:v.description.toString(),features:null!==(t=v.features)&&void 0!==t?t:[],price:f[v.storeSlug],domain:s,badge:x,isFree:v.isFree,isOpen:!0,isPrimary:!0,isSelected:v.storeSlug===i,onSelect:o,onPickDomainClick:a}))),p.a.createElement("div",{className:"plans-accordion__actions"},p.a.createElement(y.Button,{className:"plans-accordion__toggle-all-button",onClick:function(){k(S?w:u.map((function(e){return e.storeSlug})))},isLink:!0},l(S?"Collapse all plans":"Show all plans"))),p.a.createElement("div",{className:"plans-accordion__plan-item-group"},_.map((function(e){var t;return p.a.createElement(Dn,{key:e.storeSlug,slug:e.storeSlug,name:null==e?void 0:e.title.toString(),description:null==e?void 0:e.description.toString(),features:null!==(t=e.features)&&void 0!==t?t:[],price:f[e.storeSlug],domain:s,isFree:e.isFree,isOpen:E.indexOf(e.storeSlug)>-1&&!(null==c?void 0:c[e.storeSlug]),isSelected:e.storeSlug===i,onSelect:o,onPickDomainClick:a,onToggle:C,disabledLabel:null==c?void 0:c[e.storeSlug]})}))))},In=(n(81),p.a.createElement(se,{icon:kn,size:25})),zn=function(e){var t=e.onSelect,n=Object(m.useSelect)((function(e){return e(Tn).getPlansDetails()})),r=Object(m.useSelect)((function(e){return e(Tn).getPrices()})),i=Object(m.useSelect)((function(e){return e(Tn).getSupportedPlans()})),o=$().__;return p.a.createElement("div",{className:"plans-details"},p.a.createElement("table",{className:"plans-details__table"},p.a.createElement("thead",null,p.a.createElement("tr",{className:"plans-details__header-row"},p.a.createElement("th",null,o("Feature")),i.map((function(e){return p.a.createElement("th",{key:e.storeSlug},e.title)})))),n.map((function(e){return p.a.createElement("tbody",{key:e.id},e.name&&p.a.createElement("tr",{className:"plans-details__header-row"},p.a.createElement("th",{colSpan:6},e.name)),e.features.map((function(e,t){return p.a.createElement("tr",{className:"plans-details__feature-row",key:t},p.a.createElement("th",null,e.name),e.data.map((function(t,n){return p.a.createElement("td",{key:n},"checkbox"===e.type&&(t?p.a.createElement(p.a.Fragment,null,p.a.createElement("span",{className:"hidden"},o("Available")),In):p.a.createElement(p.a.Fragment,null,p.a.createElement("span",{className:"hidden"},o("Unavailable")," "))),"text"===e.type&&t)})))})))})),p.a.createElement("tbody",null,p.a.createElement("tr",{className:"plans-details__header-row"},p.a.createElement("th",{colSpan:6},o("Sign up"))),p.a.createElement("tr",{className:"plans-details__feature-row",key:"price"},p.a.createElement("th",null,o("Monthly subscription (billed yearly)")),i.map((function(e){return p.a.createElement("td",{key:e.storeSlug},r[e.storeSlug])}))),p.a.createElement("tr",{className:"plans-details__feature-row",key:"cta"},p.a.createElement("th",null),i.map((function(e){return p.a.createElement("td",{key:e.storeSlug},p.a.createElement(y.Button,{className:"plans-details__select-button",onClick:function(){t(e.storeSlug)},isPrimary:!0},p.a.createElement("span",null,o("Select"))))}))))))},Un=(n(76),ue()("plans-grid")),Hn=function(e){var t,n,r=e.header,i=e.selectedFeatures,o=e.currentPlan,a=e.currentDomain,s=e.onPlanSelect,c=e.onPickDomainClick,l=e.disabledPlans,u=e.isExperimental,p=$().__;return u&&Un("PlansGrid experimental version is active"),d.createElement("div",{className:"plans-grid"},r&&d.createElement("div",{className:"plans-grid__header"},r),d.createElement("div",{className:"plans-grid__table"},d.createElement("div",{className:"plans-grid__table-container"},u?d.createElement(Bn,{selectedFeatures:i,selectedPlanSlug:null!==(t=null==o?void 0:o.storeSlug)&&void 0!==t?t:"",onPlanSelect:s,currentDomain:a,onPickDomainClick:c,disabledPlans:l}):d.createElement(Fn,{selectedPlanSlug:null!==(n=null==o?void 0:o.storeSlug)&&void 0!==n?n:"",onPlanSelect:s,currentDomain:a,onPickDomainClick:c,disabledPlans:l}))),d.createElement("div",{className:"plans-grid__details"},d.createElement("div",{className:"plans-grid__details-heading"},d.createElement(A,null,p("Detailed comparison"))),d.createElement("div",{className:"plans-grid__details-container"},d.createElement(zn,{onSelect:s}))))},$n=(n(75),function(e){var t=e.onPrevStep,n=e.onNextStep,r=Object(m.useSelect)((function(e){return e(c).getSelectedDomain()})),i=Object(m.useSelect)((function(e){return e(c).getLaunchStep()})),o=Object(m.useSelect)((function(e){return e(c).getState()})).isExperimental,s=Object(m.useDispatch)(c),l=s.updatePlan,d=s.setStep,p=K().selectedFeatures,f=r&&!r.is_free;return Object(u.createElement)(W,null,Object(u.createElement)("div",{className:"nux-launch-step__header"},Object(u.createElement)("div",null,Object(u.createElement)(A,null,Object(v.__)("Select a plan","full-site-editing")),Object(u.createElement)(L,null,Object(v.__)("Pick a plan that’s right for you. Switch plans as your needs change. There’s no risk, you can cancel for a full refund within 30 days.","full-site-editing")))),Object(u.createElement)("div",{className:"nux-launch-step__body"},Object(u.createElement)(Hn,{currentDomain:r,onPlanSelect:function(e){l(e),null==n||n()},onPickDomainClick:function(){d(i.Domain)},disabledPlans:f?P()({},a.PLAN_FREE,Object(v.__)("Not available with custom domain","full-site-editing")):void 0,isExperimental:o,selectedFeatures:p})),Object(u.createElement)("div",{className:"nux-launch-step__footer"},Object(u.createElement)(V,{sticky:!0},Object(u.createElement)(G,{onClick:function(){null==t||t()}}))))}),qn=n(45),Vn=n.n(qn);var Gn=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);i.insertRule(e,o?0:i.cssRules.length)}catch(a){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();var Yn=function(e){function t(e,r,c,l,p){for(var m,f,h,b,x,w=0,O=0,E=0,k=0,S=0,L=0,F=h=m=0,D=0,R=0,B=0,I=0,z=c.length,U=z-1,H="",$="",q="",V="";D<z;){if(f=c.charCodeAt(D),D===U&&0!==O+k+E+w&&(0!==O&&(f=47===O?10:47),k=E=w=0,z++,U++),0===O+k+E+w){if(D===U&&(0<R&&(H=H.replace(d,"")),0<H.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:H+=c.charAt(D)}f=59}switch(f){case 123:for(m=(H=H.trim()).charCodeAt(0),h=1,I=++D;D<z;){switch(f=c.charCodeAt(D)){case 123:h++;break;case 125:h--;break;case 47:switch(f=c.charCodeAt(D+1)){case 42:case 47:e:{for(F=D+1;F<U;++F)switch(c.charCodeAt(F)){case 47:if(42===f&&42===c.charCodeAt(F-1)&&D+2!==F){D=F+1;break e}break;case 10:if(47===f){D=F+1;break e}}D=F}}break;case 91:f++;case 40:f++;case 34:case 39:for(;D++<U&&c.charCodeAt(D)!==f;);}if(0===h)break;D++}switch(h=c.substring(I,D),0===m&&(m=(H=H.replace(u,"").trim()).charCodeAt(0)),m){case 64:switch(0<R&&(H=H.replace(d,"")),f=H.charCodeAt(1)){case 100:case 109:case 115:case 45:R=r;break;default:R=A}if(I=(h=t(r,R,h,f,p+1)).length,0<T&&(x=s(3,h,R=n(A,H,B),r,j,C,I,f,p,l),H=R.join(""),void 0!==x&&0===(I=(h=x.trim()).length)&&(f=0,h="")),0<I)switch(f){case 115:H=H.replace(_,a);case 100:case 109:case 45:h=H+"{"+h+"}";break;case 107:h=(H=H.replace(g,"$1 $2"))+"{"+h+"}",h=1===P||2===P&&o("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=H+h,112===l&&($+=h,h="")}else h="";break;default:h=t(r,n(r,H,B),h,l,p+1)}q+=h,h=B=R=F=m=0,H="",f=c.charCodeAt(++D);break;case 125:case 59:if(1<(I=(H=(0<R?H.replace(d,""):H).trim()).length))switch(0===F&&(m=H.charCodeAt(0),45===m||96<m&&123>m)&&(I=(H=H.replace(" ",":")).length),0<T&&void 0!==(x=s(1,H,r,e,j,C,$.length,l,p,l))&&0===(I=(H=x.trim()).length)&&(H="\0\0"),m=H.charCodeAt(0),f=H.charCodeAt(1),m){case 0:break;case 64:if(105===f||99===f){V+=H+c.charAt(D);break}default:58!==H.charCodeAt(I-1)&&($+=i(H,m,f,H.charCodeAt(2)))}B=R=F=m=0,H="",f=c.charCodeAt(++D)}}switch(f){case 13:case 10:47===O?O=0:0===1+m&&107!==l&&0<H.length&&(R=1,H+="\0"),0<T*M&&s(0,H,r,e,j,C,$.length,l,p,l),C=1,j++;break;case 59:case 125:if(0===O+k+E+w){C++;break}default:switch(C++,b=c.charAt(D),f){case 9:case 32:if(0===k+w+O)switch(S){case 44:case 58:case 9:case 32:b="";break;default:32!==f&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===k+O+w&&(R=B=1,b="\f"+b);break;case 108:if(0===k+O+w+N&&0<F)switch(D-F){case 2:112===S&&58===c.charCodeAt(D-3)&&(N=S);case 8:111===L&&(N=L)}break;case 58:0===k+O+w&&(F=D);break;case 44:0===O+E+k+w&&(R=1,b+="\r");break;case 34:case 39:0===O&&(k=k===f?0:0===k?f:k);break;case 91:0===k+O+E&&w++;break;case 93:0===k+O+E&&w--;break;case 41:0===k+O+w&&E--;break;case 40:if(0===k+O+w){if(0===m)switch(2*S+3*L){case 533:break;default:m=1}E++}break;case 64:0===O+E+k+w+F+h&&(h=1);break;case 42:case 47:if(!(0<k+w+E))switch(O){case 0:switch(2*f+3*c.charCodeAt(D+1)){case 235:O=47;break;case 220:I=D,O=42}break;case 42:47===f&&42===S&&I+2!==D&&(33===c.charCodeAt(I+2)&&($+=c.substring(I,D+1)),b="",O=0)}}0===O&&(H+=b)}L=S,S=f,D++}if(0<(I=$.length)){if(R=r,0<T&&(void 0!==(x=s(2,$,R,e,j,C,I,l,p,l))&&0===($=x).length))return V+$+q;if($=R.join(",")+"{"+$+"}",0!=P*N){switch(2!==P||o($,2)||(N=0),N){case 111:$=$.replace(y,":-moz-$1")+$;break;case 112:$=$.replace(v,"::-webkit-input-$1")+$.replace(v,"::-moz-$1")+$.replace(v,":-ms-input-$1")+$}N=0}}return V+$+q}function n(e,t,n){var i=t.trim().split(h);t=i;var o=i.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=r(e,t[s],n).trim();break;default:var c=s=0;for(t=[];s<o;++s)for(var l=0;l<a;++l)t[c++]=r(e[l]+" ",i[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(b,"$1"+e.trim());case 58:return e.trim()+t.replace(b,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(b,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function i(e,t,n,r){var a=e+";",s=2*t+3*n+4*r;if(944===s){e=a.indexOf(":",9)+1;var c=a.substring(e,a.length-1).trim();return c=a.substring(0,e).trim()+c+";",1===P||2===P&&o(c,1)?"-webkit-"+c+c:c}if(0===P||2===P&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(S,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(c=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+c+a;case 1005:return m.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(c=a.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=a.replace(x,"tb");break;case 232:c=a.replace(x,"tb-rl");break;case 220:c=a.replace(x,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+c+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(c=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(c,"-webkit-"+c)+";"+a.replace(c,"-ms-"+c+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return c=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+c+"-ms-flex-"+c+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(O,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(O,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?i(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(c,"-webkit-"+c)+a.replace(c,"-moz-"+c.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),F(2!==t?r:r.replace(E,"$1"),n,t)}function a(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,i,o,a,s,c,u){for(var d,p=0,m=t;p<T;++p)switch(d=L[p].call(l,e,m,n,r,i,o,a,s,c,u)){case void 0:case!1:case!0:case null:break;default:m=d}if(m!==t)return m}function c(e){return void 0!==(e=e.prefix)&&(F=null,e?"function"!=typeof e?P=1:(P=2,F=e):P=0),c}function l(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<T){var i=s(-1,n,r,r,j,C,0,0,0,0);void 0!==i&&"string"==typeof i&&(n=i)}var o=t(A,r,n,0,0);return 0<T&&(void 0!==(i=s(-2,o,r,r,j,C,o.length,0,0,0))&&(o=i)),"",N=0,C=j=1,o}var u=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,m=/zoo|gra/,f=/([,: ])(transform)/g,h=/,\r+?/g,b=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,_=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,O=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,C=1,j=1,N=0,P=1,A=[],L=[],T=0,F=null,M=0;return l.use=function e(t){switch(t){case void 0:case null:T=L.length=0;break;default:if("function"==typeof t)L[T++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else M=0|!!t}return e},l.set=c,void 0!==e&&c(e),l},Wn=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}},Kn="/*|*/";function Xn(e){e&&Zn.current.insert(e+"}")}var Zn={current:null},Jn=function(e,t,n,r,i,o,a,s,c,l){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return Zn.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+Kn;break;case 3:switch(s){case 102:case 112:return Zn.current.insert(n[0]+t),"";default:return t+(0===l?Kn:"")}case-2:t.split("/*|*/}").forEach(Xn)}},Qn=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new Yn(t);var i,o={};i=e.container||document.head;var a,s=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(s,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){o[e]=!0})),e.parentNode!==i&&i.appendChild(e)})),r.use(e.stylisPlugins)(Jn),a=function(e,t,n,i){var o=t.name;Zn.current=n,r(e,t.styles),i&&(c.inserted[o]=!0)};var c={key:n,sheet:new Gn({key:n,container:i,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:o,registered:{},insert:a};return c};function er(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var tr=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var i=t;do{e.insert("."+r,i,e.sheet,!0);i=i.next}while(void 0!==i)}};var nr=function(e){for(var t,n=e.length,r=n^n,i=0;n>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:r^=(255&e.charCodeAt(i+2))<<16;case 2:r^=(255&e.charCodeAt(i+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(i)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)},rr={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ir=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},or=/[A-Z]|^ms/g,ar=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sr=function(e){return 45===e.charCodeAt(1)},cr=function(e){return null!=e&&"boolean"!=typeof e},lr=ir((function(e){return sr(e)?e:e.replace(or,"-$&").toLowerCase()})),ur=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ar,(function(e,t,n){return pr={name:t,styles:n,next:pr},t}))}return 1===rr[e]||sr(e)||"number"!=typeof t||0===t?t:t+"px"};function dr(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return pr={name:n.name,styles:n.styles,next:pr},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)pr={name:i.name,styles:i.styles,next:pr},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=dr(e,t,n[i],!1);else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":cr(a)&&(r+=lr(o)+":"+ur(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=dr(e,t,a,!1);switch(o){case"animation":case"animationName":r+=lr(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var c=0;c<a.length;c++)cr(a[c])&&(r+=lr(o)+":"+ur(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=pr,a=n(e);return pr=o,dr(e,t,a,r)}break;case"string":}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var pr,mr=/label:\s*([^\s;\n{]+)\s*;/g;var fr=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";pr=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=dr(n,t,o,!1)):i+=o[0];for(var a=1;a<e.length;a++)i+=dr(n,t,e[a],46===i.charCodeAt(i.length-1)),r&&(i+=o[a]);mr.lastIndex=0;for(var s,c="";null!==(s=mr.exec(i));)c+="-"+s[1];return{name:nr(i)+c,styles:i,next:pr}};var hr=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return fr(t)},br=Object(d.createContext)("undefined"!=typeof HTMLElement?Qn():null),gr=Object(d.createContext)({}),vr=(br.Provider,function(e){return Object(d.forwardRef)((function(t,n){return Object(d.createElement)(br.Consumer,null,(function(r){return e(t,r,n)}))}))});Object.prototype.hasOwnProperty;d.Component;var yr=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var o=t[r];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=e(o);else for(var s in a="",o)o[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=o}a&&(i&&(i+=" "),i+=a)}}return i};function xr(e,t,n){var r=[],i=er(e,r,n);return r.length<2?n:i+t(r)}vr((function(e,t){return Object(d.createElement)(gr.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=fr(n,t.registered);return tr(t,i,!1),t.key+"-"+i.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return xr(t.registered,r,yr(n))},theme:n},o=e.children(i);return!0,o}))})),n(46);function _r(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}var wr=function(e,t){return"function"==typeof t?t(e):function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_r(n,!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_r(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{},t)},Or=Wn((function(e){return Wn((function(t){return wr(e,t)}))})),Er=function(e){return Object(d.createElement)(gr.Consumer,null,(function(t){return e.theme!==t&&(t=Or(t)(e.theme)),Object(d.createElement)(gr.Provider,{value:t},e.children)}))};var kr=Object(u.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(E.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"})),Sr="#F6F7F7",Cr="#DCDCDE",jr="#A7AAAD",Nr="#8E9196",Pr="#646970",Ar="#2C3338",Lr="#008A20",Tr="#FFF",Fr="#000",Mr={colors:{background:Sr,surface:Tr,primary:"#C9356E",primaryBorder:"#700F3B",primaryOver:"#AB235A",highlight:"#006088",highlightBorder:"#002C40",highlightOver:"#004E6E",success:Lr,discount:Lr,disabledPaymentButtons:Sr,disabledPaymentButtonsAccent:Cr,disabledButtons:jr,borderColor:jr,borderColorLight:Cr,borderColorDark:Pr,upcomingStepBackground:Cr,textColor:Ar,textColorLight:Pr,textColorDark:Fr,error:"#D63638",warningBackground:"#F7EBEC",outline:"#5198D9",applePayButtonColor:Fr,applePayButtonRollOverColor:Ar,noticeBackground:Ar,defaultNoticeIconBackground:Nr,textColorOnDarkBackground:Tr,paypalGold:"#F0C443",paypalGoldHover:"#FFB900",modalBackground:"rgba( 255,255,255,0.9 )",disabledField:Sr,placeHolderTextColor:Nr},breakpoints:{desktopUp:"min-width: 960px",tabletUp:"min-width: 700px",bigPhoneUp:"min-width: 480px",smallPhoneUp:"min-width: 400px"},weights:{bold:"600",normal:"400"},fonts:{body:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif'},fontSize:{small:"14px"}},Dr=n(3),Rr=n.n(Dr);function Br(e){return e.filter((function(e){return e})).join(" ")}var Ir=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,zr=ir((function(e){return Ir.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Ur=function(e){return"theme"!==e&&"innerRef"!==e},Hr=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?zr:Ur};function $r(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 qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$r(n,!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$r(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vr=function e(t,n){var r,i,o;void 0!==n&&(r=n.label,o=n.target,i=t.__emotion_forwardProp&&n.shouldForwardProp?function(e){return t.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var a=t.__emotion_real===t,s=a&&t.__emotion_base||t;"function"!=typeof i&&a&&(i=t.__emotion_forwardProp);var c=i||Hr(s),l=!c("as");return function(){var u=arguments,p=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&p.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)p.push.apply(p,u);else{0,p.push(u[0][0]);for(var m=u.length,f=1;f<m;f++)p.push(u[f],u[0][f])}var h=vr((function(e,t,n){return Object(d.createElement)(gr.Consumer,null,(function(r){var a=l&&e.as||s,u="",m=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=r}"string"==typeof e.className?u=er(t.registered,m,e.className):null!=e.className&&(u=e.className+" ");var b=fr(p.concat(m),t.registered,f);tr(t,b,"string"==typeof a);u+=t.key+"-"+b.name,void 0!==o&&(u+=" "+o);var g=l&&void 0===i?Hr(a):c,v={};for(var y in e)l&&"as"===y||g(y)&&(v[y]=e[y]);return v.className=u,v.ref=n||e.innerRef,Object(d.createElement)(a,v)}))}));return h.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=s,h.__emotion_styles=p,h.__emotion_forwardProp=i,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,r){return e(t,void 0!==r?qr({},n||{},{},r):n).apply(void 0,p)},h}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Vr[e]=Vr(e)}));var Gr=Vr,Yr=ue()("composite-checkout:checkout-error-boundary"),Wr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={hasError:!1,currentError:null},n}return function(e,t){function n(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.getDerivedStateFromError=function(e){return{currentError:e,hasError:!0}},t.prototype.componentDidCatch=function(e,t){if(this.props.onError){var n=e.message+"; Stack: "+e.stack+"; Component Stack: "+t.componentStack;Yr("reporting the error",n),this.props.onError(n)}},t.prototype.render=function(){return this.state.hasError?p.a.createElement(Kr,{errorMessage:this.props.errorMessage}):this.props.children},t}(p.a.Component);function Kr(e){var t=e.errorMessage;return p.a.createElement(ei,null,t)}var Xr,Zr,Jr,Qr,ei=Gr.div(Xr||(Xr=z(["\n\tmargin: 2em;\n\ttext-align: center;\n"],["\n\tmargin: 2em;\n\ttext-align: center;\n"])));!function(e){e.LOADING="loading",e.READY="ready",e.SUBMITTING="submitting",e.VALIDATING="validating",e.COMPLETE="complete"}(Zr||(Zr={})),function(e){e.SUCCESS="SUCCESS",e.REDIRECT="REDIRECT",e.MANUAL="MANUAL"}(Jr||(Jr={})),function(e){e.NOT_STARTED="not-started",e.PENDING="pending",e.COMPLETE="complete",e.REDIRECTING="redirecting",e.ERROR="error"}(Qr||(Qr={}));var ti={transactionStatus:Qr.NOT_STARTED,previousTransactionStatus:Qr.NOT_STARTED,transactionError:null,transactionLastResponse:null,transactionRedirectUrl:null,resetTransaction:ri,setTransactionError:ri,setTransactionComplete:ri,setTransactionPending:ri,setTransactionRedirecting:ri},ni={allPaymentMethods:[],paymentMethodId:null,setPaymentMethodId:ri,showErrorMessage:ri,showInfoMessage:ri,showSuccessMessage:ri,onEvent:ri,formStatus:Zr.LOADING,setFormStatus:ri,transactionStatusManager:ti,paymentProcessors:{}};function ri(){}var ii=Object(d.createContext)(ni);ue()("composite-checkout:form-status");function oi(){var e=Object(d.useContext)(ii),t=e.formStatus,n=e.setFormStatus,r=Object(d.useMemo)((function(){return{setFormLoading:function(){return n(Zr.LOADING)},setFormReady:function(){return n(Zr.READY)},setFormSubmitting:function(){return n(Zr.SUBMITTING)},setFormValidating:function(){return n(Zr.VALIDATING)},setFormComplete:function(){return n(Zr.COMPLETE)}}}),[n]);return Object(d.useMemo)((function(){return F(F({},r),{formStatus:t})}),[t,r])}Gr.div(ai||(ai=z(["\n\tdisplay: flex;\n\n\t@media ( "," ) {\n\t\talign-items: flex-start;\n\t\tflex-direction: row;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t}\n"],["\n\tdisplay: flex;\n\n\t@media ( "," ) {\n\t\talign-items: flex-start;\n\t\tflex-direction: row;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t}\n"])),(function(e){return e.theme.breakpoints.tabletUp})),Gr.div(si||(si=z(["\n\tbackground: ",";\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t\tmax-width: 556px;\n\t}\n"],["\n\tbackground: ",";\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t\tmax-width: 556px;\n\t}\n"])),(function(e){return e.theme.colors.surface}),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.colors.borderColorLight})),Gr.div(ci||(ci=z(["\n\tdisplay: none;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tdisplay: block;\n\t\tpadding: 24px;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid ",";\n\t\tmax-width: 328px;\n\t\tbackground: ",";\n\t\tmargin-left: 24px;\n\t}\n"],["\n\tdisplay: none;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tdisplay: block;\n\t\tpadding: 24px;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid ",";\n\t\tmax-width: 328px;\n\t\tbackground: ",";\n\t\tmargin-left: 24px;\n\t}\n"])),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.surface})),Gr.div(li||(li=z(["\n\tpadding: 24px;\n\tborder-top: 1px solid ",";\n\n\t:first-of-type {\n\t\tborder-top: 0;\n\t}\n"],["\n\tpadding: 24px;\n\tborder-top: 1px solid ",";\n\n\t:first-of-type {\n\t\tborder-top: 0;\n\t}\n"])),(function(e){return e.theme.colors.borderColorLight}));var ai,si,ci,li,ui,di,pi,mi,fi,hi=function(){var e=hr.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(ui||(ui=z(["\n 0% {\n opacity: 1;\n }\n\n 70% {\n \topacity: 0.5;\n }\n\n 100% {\n opacity: 1;\n }\n"],["\n 0% {\n opacity: 1;\n }\n\n 70% {\n \topacity: 0.5;\n }\n\n 100% {\n opacity: 1;\n }\n"])));Gr.h1(di||(di=z(["\n\tfont-size: 14px;\n\tcontent: '';\n\tfont-weight: ",";\n\tbackground: ",";\n\tcolor: ",";\n\twidth: 40%;\n\tmargin: 3px 0 0 35px;\n\tpadding: 0;\n\tposition: relative;\n\tanimation: "," 2s ease-in-out infinite;\n\theight: 20px;\n\n\t.rtl & {\n\t\tmargin: 3px 35px 0 0;\n\t}\n\n\t::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tleft: -35px;\n\t\ttop: -3px;\n\t\twidth: 27px;\n\t\theight: 27px;\n\t\tbackground: ",";\n\t\tborder-radius: 100%;\n\n\t\t.rtl & {\n\t\t\tright: -35px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n"],["\n\tfont-size: 14px;\n\tcontent: '';\n\tfont-weight: ",";\n\tbackground: ",";\n\tcolor: ",";\n\twidth: 40%;\n\tmargin: 3px 0 0 35px;\n\tpadding: 0;\n\tposition: relative;\n\tanimation: "," 2s ease-in-out infinite;\n\theight: 20px;\n\n\t.rtl & {\n\t\tmargin: 3px 35px 0 0;\n\t}\n\n\t::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tleft: -35px;\n\t\ttop: -3px;\n\t\twidth: 27px;\n\t\theight: 27px;\n\t\tbackground: ",";\n\t\tborder-radius: 100%;\n\n\t\t.rtl & {\n\t\t\tright: -35px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n"])),(function(e){return e.theme.weights.normal}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.borderColorLight}),hi,(function(e){return e.theme.colors.borderColorLight})),Gr.p(pi||(pi=z(["\n\tfont-size: 14px;\n\theight: 16px;\n\tcontent: '';\n\tbackground: ",";\n\tcolor: ",";\n\tmargin: 8px 0 0 35px;\n\tpadding: 0;\n\tanimation: "," 2s ease-in-out infinite;\n\n\t.rtl & {\n\t\tmargin: 8px 35px 0 0;\n\t}\n"],["\n\tfont-size: 14px;\n\theight: 16px;\n\tcontent: '';\n\tbackground: ",";\n\tcolor: ",";\n\tmargin: 8px 0 0 35px;\n\tpadding: 0;\n\tanimation: "," 2s ease-in-out infinite;\n\n\t.rtl & {\n\t\tmargin: 8px 35px 0 0;\n\t}\n"])),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.borderColorLight}),hi),Gr.p(mi||(mi=z(["\n\tfont-size: 14px;\n\theight: 16px;\n\tcontent: '';\n\tbackground: ",";\n\tcolor: ",";\n\tmargin: 8px 0 0 0;\n\tpadding: 0;\n\tanimation: "," 2s ease-in-out infinite;\n"],["\n\tfont-size: 14px;\n\theight: 16px;\n\tcontent: '';\n\tbackground: ",";\n\tcolor: ",";\n\tmargin: 8px 0 0 0;\n\tpadding: 0;\n\tanimation: "," 2s ease-in-out infinite;\n"])),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.borderColorLight}),hi),Gr.div(fi||(fi=z(["\n\tbackground: ",";\n\tcontent: '';\n\tborder-top: 1px solid ",";\n\tpadding: 24px;\n\n\t::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tborder: 1px solid ",";\n\t\tborder-radius: 3px;\n\t\tfont-size: 14px;\n\t\twidth: 100%;\n\t\theight: 40px;\n\t}\n"],["\n\tbackground: ",";\n\tcontent: '';\n\tborder-top: 1px solid ",";\n\tpadding: 24px;\n\n\t::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tborder: 1px solid ",";\n\t\tborder-radius: 3px;\n\t\tfont-size: 14px;\n\t\twidth: 100%;\n\t\theight: 40px;\n\t}\n"])),(function(e){return e.theme.colors.background}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.borderColorLight}));Qr.NOT_STARTED,Qr.NOT_STARTED;var bi=ue()("composite-checkout:payment-methods");function gi(){var e=Object(d.useContext)(ii),t=e.paymentMethodId,n=e.setPaymentMethodId,r=vi();if(!n)throw new Error("usePaymentMethod can only be used inside a CheckoutProvider");if(!t)return null;var i=r.find((function(e){return e.id===t}));return i||(bi("No payment method found matching id '"+t+"' in",r),null)}function vi(){var e=Object(d.useContext)(ii).allPaymentMethods;if(!e)throw new Error("useAllPaymentMethods cannot be used outside of CheckoutProvider");return e}ue()("composite-checkout:checkout-submit-button");var yi,xi=Gr("button")(yi||(yi=z(["\n\tdisplay: block;\n\twidth: ",";\n\tfont-size: 16px;\n\tborder-radius: ",";\n\tpadding: ",";\n\tborder: ",";\n\tbackground: ",";\n\tcolor: ",";\n\tfont-weight: ",";\n\ttext-decoration: ",";\n\n\t:hover {\n\t\tbackground: ",";\n\t\tborder-color: ",";\n\t\ttext-decoration: none;\n\t\tcolor: ",";\n\t\tcursor: ",";\n\t}\n\n\t:active {\n\t\tbackground: ",";\n\t\ttext-decoration: ",";\n\t\tcolor: ",";\n\t}\n\n\tsvg {\n\t\tmargin-bottom: -1px;\n\t\ttransform: translateY( 2px );\n\t\tfilter: ",";\n\t\topacity: ",";\n\t}\n\n\t&.is-busy {\n\t\tanimation: components-button__busy-animation 2500ms infinite linear;\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t"," 28%,\n\t\t\t"," 28%,\n\t\t\t"," 72%,\n\t\t\t"," 72%\n\t\t);\n\t\tbackground-size: 200px 100%;\n\t\topacity: 1;\n\t}\n\n\t@keyframes components-button__busy-animation {\n\t\t0% {\n\t\t\tbackground-position: 200px 0;\n\t\t}\n\t}\n"],["\n\tdisplay: block;\n\twidth: ",";\n\tfont-size: 16px;\n\tborder-radius: ",";\n\tpadding: ",";\n\tborder: ",";\n\tbackground: ",";\n\tcolor: ",";\n\tfont-weight: ",";\n\ttext-decoration: ",";\n\n\t:hover {\n\t\tbackground: ",";\n\t\tborder-color: ",";\n\t\ttext-decoration: none;\n\t\tcolor: ",";\n\t\tcursor: ",";\n\t}\n\n\t:active {\n\t\tbackground: ",";\n\t\ttext-decoration: ",";\n\t\tcolor: ",";\n\t}\n\n\tsvg {\n\t\tmargin-bottom: -1px;\n\t\ttransform: translateY( 2px );\n\t\tfilter: ",";\n\t\topacity: ",";\n\t}\n\n\t&.is-busy {\n\t\tanimation: components-button__busy-animation 2500ms infinite linear;\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t"," 28%,\n\t\t\t"," 28%,\n\t\t\t"," 72%,\n\t\t\t"," 72%\n\t\t);\n\t\tbackground-size: 200px 100%;\n\t\topacity: 1;\n\t}\n\n\t@keyframes components-button__busy-animation {\n\t\t0% {\n\t\t\tbackground-position: 200px 0;\n\t\t}\n\t}\n"])),(function(e){return e.fullWidth?"100%":"auto"}),(function(e){return"paypal"===e.buttonType?"50px":"2px"}),(function(e){return"text-button"===e.buttonType?"0":"10px 15px"}),(function(e){return!e.buttonType||e.disabled?"1px solid "+e.theme.colors.borderColor:"0"}),Ei,Oi,(function(e){var t=e.disabled,n=e.buttonType,r=e.theme;if(t||"text-button"===n)return r.weights.normal;return r.weights.bold}),Si,wi,(function(e){return e.buttonType?"inherit":e.theme.colors.borderColorDark}),Oi,(function(e){return e.disabled?"not-allowed":"pointer"}),wi,Si,Oi,(function(e){var t=e.buttonType;return"grayscale( "+("primary"===t||"paypal"===t?"0":"100")+" ) invert( 0 );"}),(function(e){var t=e.buttonType;return"primary"===t||"paypal"===t?"1":"0.5"}),Ei,ki,ki,Ei),_i=function(e){var t=e.className,n=e.buttonType,r=e.isBusy,i=e.children,o=e.fullWidth,a=M(e,["className","buttonType","isBusy","children","fullWidth"]),s=Br(I(["checkout-button"],n?["is-status-"+n]:[],r?["is-busy"]:[],t?[t]:[]));return p.a.createElement(xi,F({fullWidth:o,buttonType:n,className:s},a),i)};function wi(e){var t=e.disabled,n=e.buttonType,r=e.theme.colors;if(t)return r.disabledPaymentButtons;switch(n){case"paypal":return r.paypalGoldHover;case"primary":return r.primaryOver;case"secondary":return r.highlightOver;case"text-button":case"borderless":default:return"none"}}function Oi(e){var t=e.disabled,n=e.buttonType,r=e.theme.colors;if(t)return r.disabledButtons;switch(n){case"primary":case"secondary":return r.surface;case"text-button":return r.highlight;default:return r.textColor}}function Ei(e){var t=e.disabled,n=e.buttonType,r=e.theme.colors;if(t)return r.disabledPaymentButtons;switch(n){case"paypal":return r.paypalGold;case"primary":return r.primary;case"secondary":return r.highlight;default:return"none"}}function ki(e){var t=e.disabled,n=e.buttonType,r=e.theme.colors;if(t)return r.disabledPaymentButtonsAccent;switch(n){case"paypal":return r.paypalGoldHover;case"primary":return r.primaryOver;case"secondary":return r.highlightOver;case"text-button":case"borderless":default:return"none"}}function Si(e){return"text-button"===e.buttonType?"underline":"none"}function Ci(e){var t=e.className,n=e.id;return p.a.createElement(Ni,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:t},p.a.createElement("mask",{id:n+"-check-icon-mask","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"4",width:"16",height:"12"},p.a.createElement("path",{d:"M7.32916 13.2292L3.85416 9.75417L2.67083 10.9292L7.32916 15.5875L17.3292 5.58751L16.1542 4.41251L7.32916 13.2292Z"})),p.a.createElement("g",{mask:"url(#"+n+"-check-icon-mask)"},p.a.createElement("rect",{width:"20",height:"20"})))}Ci.propTypes={className:Rr.a.string,id:Rr.a.string};var ji,Ni=Gr.svg(ji||(ji=z(["\n\tfill: #fff;\n"],["\n\tfill: #fff;\n"])));var Pi=function(e){var t=e.value,n=e.onClick,r=e.ariaLabel,i=M(e,["value","onClick","ariaLabel"]);return p.a.createElement(_i,F({onClick:n,buttonType:"primary","aria-label":r},i),t)},Ai=Object(d.createContext)({items:[],total:{id:"title",type:"total",label:"Total",amount:{currency:"USD",value:0,displayValue:"0"}}});function Li(){var e=Object(d.useContext)(Ai),t=e.items,n=e.total;if(!t||!n)throw new Error("useLineItems can only be used inside a CheckoutProvider");return[t,n]}Gr.ul(Ti||(Ti=z(["\n\tmargin: 0;\n\tpadding: 0;\n"],["\n\tmargin: 0;\n\tpadding: 0;\n"]))),Gr.li(Fi||(Fi=z(["\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style-type: none;\n"],["\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style-type: none;\n"])));Gr.span(Mi||(Mi=z(["\n\tdisplay: flex;\n\tjustify-content: space-between;\n"],["\n\tdisplay: flex;\n\tjustify-content: space-between;\n"]))),Gr.span(Di||(Di=z(["\n\tfont-weight: ",";\n"],["\n\tfont-weight: ",";\n"])),(function(e){return e.theme.weights.bold}));Gr.div(Ri||(Ri=z(["\n\tcolor: ",";\n\tfont-weight: ",";\n\tpadding: 24px 20px;\n"],["\n\tcolor: ",";\n\tfont-weight: ",";\n\tpadding: 24px 20px;\n"])),(function(e){return e.theme.colors.textColor}),(function(e){return e.theme.weights.bold})),Gr.div(Bi||(Bi=z(["\n\tborder-top: 1px solid ",";\n\tpadding: 24px 20px;\n"],["\n\tborder-top: 1px solid ",";\n\tpadding: 24px 20px;\n"])),(function(e){return e.theme.colors.borderColorLight}));var Ti,Fi,Mi,Di,Ri,Bi,Ii,zi,Ui=Gr.div(Ii||(Ii=z(["\n\tdisplay: flex;\n\tjustify-content: space-between;\n"],["\n\tdisplay: flex;\n\tjustify-content: space-between;\n"])));Gr(Ui)(zi||(zi=z(["\n\tfont-weight: ",";\n"],["\n\tfont-weight: ",";\n"])),(function(e){return e.theme.weights.bold}));function Hi(e){var t=e.children,n=e.className;return p.a.createElement($i,{className:Br([n,"order-review-section"])},t)}Hi.propTypes={className:Rr.a.string};var $i=Gr.div(Vi||(Vi=z(["\n\tmargin-bottom: 16px;\n"],["\n\tmargin-bottom: 16px;\n"])));function qi(e){var t=e.item,n=e.className,r="checkout-line-item-"+t.id;return p.a.createElement("div",{className:Br([n,"checkout-line-item"])},p.a.createElement("span",{id:r},t.label),p.a.createElement("span",{"aria-labelledby":r},t.amount.displayValue))}qi.propTypes={className:Rr.a.string,total:Rr.a.bool,isSummaryVisible:Rr.a.bool,item:Rr.a.shape({label:Rr.a.string,amount:Rr.a.shape({displayValue:Rr.a.string})})};var Vi,Gi,Yi=Gr(qi)(Gi||(Gi=z(["\n\tdisplay: flex;\n\twidth: 100%;\n\tjustify-content: space-between;\n\tfont-weight: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tpadding: ",";\n\tborder-bottom: ",";\n\n\t:first-of-type {\n\t\tpadding-top: 0;\n\t}\n"],["\n\tdisplay: flex;\n\twidth: 100%;\n\tjustify-content: space-between;\n\tfont-weight: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tpadding: ",";\n\tborder-bottom: ",";\n\n\t:first-of-type {\n\t\tpadding-top: 0;\n\t}\n"])),(function(e){var t=e.theme;return e.total?t.weights.bold:t.weights.normal}),(function(e){var t=e.theme;return e.total?t.colors.textColorDark:"inherit"}),(function(e){return e.total?"1.2em":"1em"}),(function(e){var t=e.total;return e.isSummaryVisible||t?0:"24px 0"}),(function(e){var t=e.theme,n=e.total;return e.isSummaryVisible||n?0:"1px solid "+t.colors.borderColorLight}));function Wi(e){var t=e.total,n=e.className;return p.a.createElement("div",{className:Br([n,"order-review-total"])},p.a.createElement(Yi,{total:!0,item:t}))}function Ki(e){var t=e.items,n=e.className,r=e.isSummaryVisible;return p.a.createElement("div",{className:Br([n,"order-review-line-items"])},t.map((function(e){return p.a.createElement(Yi,{isSummaryVisible:r,key:e.id,item:e})})))}function Xi(e){var t=e.className,n=Li(),r=n[0],i=n[1];return p.a.createElement("div",{className:Br([t,"checkout-review-order"])},p.a.createElement(Hi,null,p.a.createElement(Ki,{items:r})),p.a.createElement(Hi,null,p.a.createElement(Wi,{total:i})))}function Zi(e){var t=e.checked,n=e.name,r=e.value,i=e.onChange,o=e.children,a=e.label,s=e.disabled,c=e.id,l=e.ariaLabel,u=Object(d.useState)(!1),m=u[0],f=u[1];return p.a.createElement(Ji,{disabled:s,isFocused:m,checked:t},p.a.createElement(Qi,{type:"radio",name:n,id:c,disabled:s,value:r,checked:t,onChange:i,onFocus:function(){f(!0)},onBlur:function(){f(!1)},readOnly:!i,"aria-label":l}),p.a.createElement(eo,{checked:t,htmlFor:c,disabled:s},a),o&&p.a.createElement(oo,{checked:t},o))}Ki.propTypes={className:Rr.a.string,isSummaryVisible:Rr.a.bool,items:Rr.a.arrayOf(Rr.a.shape({label:Rr.a.string,amount:Rr.a.shape({displayValue:Rr.a.string})}))},Xi.propTypes={className:Rr.a.string},Zi.propTypes={name:Rr.a.string.isRequired,id:Rr.a.string.isRequired,label:Rr.a.node.isRequired,disabled:Rr.a.bool,checked:Rr.a.bool,value:Rr.a.string.isRequired,onChange:Rr.a.func,ariaLabel:Rr.a.string.isRequired};var Ji=Gr.div(to||(to=z(["\n\tposition: relative;\n\tmargin-top: 8px;\n\tborder-radius: 3px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\toutline: ",";\n\n\t:first-of-type {\n\t\tmargin: 0;\n\t}\n\n\t::before {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tcontent: '';\n\t\tborder: "," solid ",";\n\t\tborder-radius: 3px;\n\t\tbox-sizing: border-box;\n\n\t\t.rtl & {\n\t\t\tright: 0;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t:hover::before {\n\t\tborder: 3px solid ",";\n\t}\n\n\t.payment-logos {\n\t\tdisplay: none;\n\n\t\t@media ( "," ) {\n\t\t\tdisplay: block;\n\t\t\tfilter: grayscale( "," );\n\t\t}\n\t}\n\n\t:hover .payment-logos {\n\t\t@media ( "," ) {\n\t\t\tfilter: grayscale( 0 );\n\t\t}\n\t}\n\n\tsvg {\n\t\tfilter: grayscale( "," );\n\t}\n\n\t:hover svg {\n\t\tfilter: grayscale( 0 );\n\t}\n\n\t",";\n"],["\n\tposition: relative;\n\tmargin-top: 8px;\n\tborder-radius: 3px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\toutline: ",";\n\n\t:first-of-type {\n\t\tmargin: 0;\n\t}\n\n\t::before {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tcontent: '';\n\t\tborder: "," solid ",";\n\t\tborder-radius: 3px;\n\t\tbox-sizing: border-box;\n\n\t\t.rtl & {\n\t\t\tright: 0;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t:hover::before {\n\t\tborder: 3px solid ",";\n\t}\n\n\t.payment-logos {\n\t\tdisplay: none;\n\n\t\t@media ( "," ) {\n\t\t\tdisplay: block;\n\t\t\tfilter: grayscale( "," );\n\t\t}\n\t}\n\n\t:hover .payment-logos {\n\t\t@media ( "," ) {\n\t\t\tfilter: grayscale( 0 );\n\t\t}\n\t}\n\n\tsvg {\n\t\tfilter: grayscale( "," );\n\t}\n\n\t:hover svg {\n\t\tfilter: grayscale( 0 );\n\t}\n\n\t",";\n"])),(function(e){var t=e.isFocused,n=e.theme;if(t)return n.colors.outline+" solid 2px";return"0"}),(function(e){return e.checked?"3px":"1px"}),(function(e){var t=e.checked,n=e.theme;return t?n.colors.highlight:n.colors.borderColor}),(function(e){return e.theme.colors.highlight}),(function(e){return e.theme.breakpoints.smallPhoneUp}),ao,(function(e){return e.theme.breakpoints.smallPhoneUp}),ao,(function(e){if(!e.disabled)return null;return"\n\t\t::before,\n\t\t:hover::before {\n\t\t\tborder: 1px solid lightgray;\n\t\t}\n\n\t\tsvg,\n\t\t:hover svg {\n\t\t\tfilter: grayscale( 100% );\n\t\t\topacity: 50%;\n\t\t}\n\t"}));var Qi=Gr.input(no||(no=z(["\n\tposition: absolute;\n\topacity: 0 !important;\n\n\tclear: none;\n\tcursor: pointer;\n\tdisplay: inline-block;\n\tline-height: 0;\n\theight: 16px;\n\tmargin: 2px 0 0;\n\tfloat: left;\n\toutline: 0;\n\tpadding: 0;\n\ttext-align: center;\n\tvertical-align: middle;\n\twidth: 16px;\n\tmin-width: 16px;\n\tappearance: none;\n"],["\n\tposition: absolute;\n\topacity: 0 !important;\n\n\tclear: none;\n\tcursor: pointer;\n\tdisplay: inline-block;\n\tline-height: 0;\n\theight: 16px;\n\tmargin: 2px 0 0;\n\tfloat: left;\n\toutline: 0;\n\tpadding: 0;\n\ttext-align: center;\n\tvertical-align: middle;\n\twidth: 16px;\n\tmin-width: 16px;\n\tappearance: none;\n"]))),eo=Gr.label(ro||(ro=z(["\n\tposition: relative;\n\tpadding: 16px 14px 16px 40px;\n\tborder-radius: 3px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: space-between;\n\talign-items: flex-start;\n\tfont-size: 14px;\n\n\t.rtl & {\n\t\tpadding: 16px 40px 16px 14px;\n\t}\n\n\t:hover {\n\t\tcursor: pointer;\n\t}\n\n\t::before {\n\t\tdisplay: block;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tcontent: '';\n\t\tborder: 1px solid ",";\n\t\tborder-radius: 100%;\n\t\ttop: 19px;\n\t\tleft: 16px;\n\t\tposition: absolute;\n\t\tbackground: ",";\n\t\tbox-sizing: border-box;\n\t\tz-index: 2;\n\n\t\t.rtl & {\n\t\t\tright: 16px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t::after {\n\t\tdisplay: block;\n\t\twidth: 8px;\n\t\theight: 8px;\n\t\tcontent: '';\n\t\tborder-radius: 100%;\n\t\ttop: 23px;\n\t\tleft: 20px;\n\t\tposition: absolute;\n\t\tbackground: ",";\n\t\tbox-sizing: border-box;\n\t\tz-index: 3;\n\n\t\t.rtl & {\n\t\t\tright: 20px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t",";\n"],["\n\tposition: relative;\n\tpadding: 16px 14px 16px 40px;\n\tborder-radius: 3px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: space-between;\n\talign-items: flex-start;\n\tfont-size: 14px;\n\n\t.rtl & {\n\t\tpadding: 16px 40px 16px 14px;\n\t}\n\n\t:hover {\n\t\tcursor: pointer;\n\t}\n\n\t::before {\n\t\tdisplay: block;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tcontent: '';\n\t\tborder: 1px solid ",";\n\t\tborder-radius: 100%;\n\t\ttop: 19px;\n\t\tleft: 16px;\n\t\tposition: absolute;\n\t\tbackground: ",";\n\t\tbox-sizing: border-box;\n\t\tz-index: 2;\n\n\t\t.rtl & {\n\t\t\tright: 16px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t::after {\n\t\tdisplay: block;\n\t\twidth: 8px;\n\t\theight: 8px;\n\t\tcontent: '';\n\t\tborder-radius: 100%;\n\t\ttop: 23px;\n\t\tleft: 20px;\n\t\tposition: absolute;\n\t\tbackground: ",";\n\t\tbox-sizing: border-box;\n\t\tz-index: 3;\n\n\t\t.rtl & {\n\t\t\tright: 20px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t",";\n"])),(function(e){return e.theme.colors.borderColor}),(function(e){return e.theme.colors.surface}),(function(e){var t=e.checked,n=e.theme;return t?n.colors.highlight:n.colors.surface}),(function(e){if(!e.disabled)return null;return"\n\t\tcolor: lightgray;\n\t\tfont-style: italic;\n\n\t\t:hover {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t::before {\n\t\t\tborder: 1px solid lightgray;\n\t\t\tbackground: lightgray;\n\t\t}\n\n\t\t::after {\n\t\t\tbackground: white;\n\t\t}\n\n\t\tspan {\n\t\t\tcolor: lightgray;\n\t\t}\n\t"}));var to,no,ro,io,oo=Gr.div(io||(io=z(["\n\tdisplay: ",";\n"],["\n\tdisplay: ",";\n"])),(function(e){return e.checked?"block":"none"}));function ao(e){return e.checked?0:"100%"}function so(){var e=Object(d.useContext)(ii).onEvent;if(!e)throw new Error("useEvents can only be used inside a CheckoutProvider");return e}var co=ue()("composite-checkout:checkout-payment-methods");function lo(e){var t=e.summary,n=e.isComplete,r=e.className,i=$().__,o=so(),a=Object(d.useCallback)((function(e){return o({type:"PAYMENT_METHOD_LOAD_ERROR",payload:e})}),[o]),s=gi(),c=function(){var e=Object(d.useContext)(ii),t=e.paymentMethodId,n=e.setPaymentMethodId;if(!n)throw new Error("usePaymentMethodId can only be used inside a CheckoutProvider");return[t,n]}()[1],l=function(e){co("setting payment method to",e),o({type:"PAYMENT_METHOD_SELECT",payload:e}),c(e)},u=vi();return t&&n&&s?(co("rendering selected paymentMethod",s),p.a.createElement("div",{className:Br([r,"checkout-payment-methods"])},p.a.createElement(Wr,{errorMessage:i("There was a problem with this payment method."),onError:a},p.a.createElement(uo,{id:s.id,label:s.label,activeContent:s.activeContent,inactiveContent:s.inactiveContent,checked:!0,summary:!0,ariaLabel:s.getAriaLabel(i)})))):t?(co("summary requested, but no complete paymentMethod is selected; isComplete:",n,"paymentMethod:",s),null):(co("rendering paymentMethods",u),p.a.createElement("div",{className:Br([r,"checkout-payment-methods"])},p.a.createElement(mo,null,u.map((function(e){return p.a.createElement(Wr,{key:e.id,errorMessage:Object(v.sprintf)(i("There was a problem with the payment method: %s"),e.id),onError:a},p.a.createElement(uo,{id:e.id,label:e.label,activeContent:e.activeContent,inactiveContent:e.inactiveContent,checked:(null==s?void 0:s.id)===e.id,onClick:l,ariaLabel:e.getAriaLabel(i)}))})))))}function uo(e){var t=e.id,n=e.label,r=e.activeContent,i=e.inactiveContent,o=e.checked,a=e.onClick,s=e.ariaLabel,c=e.summary,l=oi().formStatus;return c?p.a.createElement(p.a.Fragment,null,i&&i):p.a.createElement(Zi,{name:"paymentMethod",value:t,id:t,checked:o,disabled:l!==Zr.READY,onChange:a?function(){return a(t)}:void 0,ariaLabel:s,label:n},r&&r)}lo.propTypes={summary:Rr.a.bool,isComplete:Rr.a.bool.isRequired,className:Rr.a.string},uo.propTypes={id:Rr.a.string.isRequired,onClick:Rr.a.func,checked:Rr.a.bool.isRequired,ariaLabel:Rr.a.string.isRequired,activeContent:Rr.a.node,label:Rr.a.node,inactiveContent:Rr.a.node,summary:Rr.a.bool};var po,mo=Gr.div(po||(po=z(["\n\tmargin-bottom: 16px;\n"],["\n\tmargin-bottom: 16px;\n"])));ue()("composite-checkout:checkout");var fo=function(e){var t=e.children,n=e.className;return p.a.createElement(vo,{className:Br([n,"checkout__summary-area"])},t)},ho=Gr.div(Ao||(Ao=z(["\n\tbackground: ",";\n\tborder-bottom: 1px solid ",";\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t\tborder-bottom: none 0;\n\t}\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t}\n"],["\n\tbackground: ",";\n\tborder-bottom: 1px solid ",";\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t\tborder-bottom: none 0;\n\t}\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t}\n"])),(function(e){return e.theme.colors.surface}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.breakpoints.smallPhoneUp}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.breakpoints.desktopUp}),(function(e){return e.theme.colors.borderColorLight}));function bo(e){var t=e.errorMessage,n=e.editButtonText,r=e.editButtonAriaLabel,i=e.nextStepButtonText,o=e.validatingButtonText,a=e.nextStepButtonAriaLabel,s=e.validatingButtonAriaLabel,c=e.isStepActive,l=e.isStepComplete,u=e.className,d=e.stepNumber,m=e.stepId,f=e.titleContent,h=e.goToThisStep,b=e.goToNextStep,g=e.activeStepContent,v=e.formStatus,y=e.completeStepContent,x=e.onError,_=$().__;return p.a.createElement(Wr,{errorMessage:t||_("There was an error with this step."),onError:x},p.a.createElement(_o,{className:u},p.a.createElement(wo,{id:m,stepNumber:d,title:f,isActive:c,isComplete:l,onEdit:v===Zr.READY&&l&&h&&!c?h:void 0,editButtonText:n||_("Edit"),editButtonAriaLabel:r||_("Edit this step")}),p.a.createElement(Yo,{isVisible:c,className:"checkout-steps__step-content"},g,b&&c&&p.a.createElement(Pi,{onClick:b,value:v===Zr.VALIDATING?o||_("Please wait…"):i||_("Continue"),ariaLabel:v===Zr.VALIDATING?s||_("Please wait…"):a||_("Continue to next step"),buttonType:"primary",disabled:v!==Zr.READY,isBusy:v===Zr.VALIDATING})),l&&y?p.a.createElement(Wo,{isVisible:!c,className:"checkout-steps__step-complete-content"},y):null))}bo.propTypes={errorMessage:Rr.a.string,onError:Rr.a.func,editButtonAriaLabel:Rr.a.string,editButtonText:Rr.a.string,nextStepButtonText:Rr.a.string,nextStepButtonAriaLabel:Rr.a.string,isStepActive:Rr.a.bool.isRequired,isStepComplete:Rr.a.bool.isRequired,className:Rr.a.string,stepNumber:Rr.a.number,stepId:Rr.a.string.isRequired,titleContent:Rr.a.node.isRequired,goToThisStep:Rr.a.func,goToNextStep:Rr.a.func,activeStepContent:Rr.a.node,formStatus:Rr.a.string,completeStepContent:Rr.a.node,validatingButtonText:Rr.a.string,validatingButtonAriaLabel:Rr.a.string};Gr.div(Lo||(Lo=z(["\n\t*:focus {\n\t\toutline: "," solid 2px;\n\t}\n"],["\n\t*:focus {\n\t\toutline: "," solid 2px;\n\t}\n"])),(function(e){return e.theme.colors.outline}));var go=Gr.div(To||(To=z(["\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tmargin: 0 auto 32px;\n\t}\n\n\t@media ( "," ) {\n\t\talign-items: flex-start;\n\t\tflex-direction: row;\n\t\tjustify-content: center;\n\t\tmax-width: none;\n\t}\n"],["\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tmargin: 0 auto 32px;\n\t}\n\n\t@media ( "," ) {\n\t\talign-items: flex-start;\n\t\tflex-direction: row;\n\t\tjustify-content: center;\n\t\tmax-width: none;\n\t}\n"])),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.breakpoints.desktopUp})),vo=Gr.div(Fo||(Fo=z(["\n\tbox-sizing: border-box;\n\tmargin: 0 auto;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tmax-width: 556px;\n\t}\n\n\t@media ( "," ) {\n\t\tmargin-right: 0;\n\t\tmargin-left: 24px;\n\t\torder: 2;\n\t\twidth: 328px;\n\n\t\t.rtl & {\n\t\t\tmargin-right: 24px;\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n"],["\n\tbox-sizing: border-box;\n\tmargin: 0 auto;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tmax-width: 556px;\n\t}\n\n\t@media ( "," ) {\n\t\tmargin-right: 0;\n\t\tmargin-left: 24px;\n\t\torder: 2;\n\t\twidth: 328px;\n\n\t\t.rtl & {\n\t\t\tmargin-right: 24px;\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n"])),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.breakpoints.desktopUp})),yo=Gr.div(Mo||(Mo=z(["\n\tbackground: ",";\n\tbox-sizing: border-box;\n\tmargin: 0 auto;\n\twidth: 100%;\n\n\t&.checkout__step-wrapper--last-step {\n\t\tmargin-bottom: 100px;\n\t}\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t}\n\n\t@media ( "," ) {\n\t\tmax-width: 556px;\n\t}\n\n\t@media ( "," ) {\n\t\tmargin: 0;\n\t\torder: 1;\n\t\twidth: 556px;\n\t}\n"],["\n\tbackground: ",";\n\tbox-sizing: border-box;\n\tmargin: 0 auto;\n\twidth: 100%;\n\n\t&.checkout__step-wrapper--last-step {\n\t\tmargin-bottom: 100px;\n\t}\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t}\n\n\t@media ( "," ) {\n\t\tmax-width: 556px;\n\t}\n\n\t@media ( "," ) {\n\t\tmargin: 0;\n\t\torder: 1;\n\t\twidth: 556px;\n\t}\n"])),(function(e){return e.theme.colors.surface}),(function(e){return e.theme.breakpoints.smallPhoneUp}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.breakpoints.desktopUp})),xo=Gr.div(Do||(Do=z(["\n\tbackground: ",";\n\tpadding: 24px;\n\tbottom: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tz-index: 10;\n\tborder-top-width: 0;\n\tborder-top-style: solid;\n\tborder-top-color: ",";\n\n\t.checkout__step-wrapper--last-step & {\n\t\tborder-top-width: 1px;\n\t\tposition: fixed;\n\t}\n\n\t.rtl & {\n\t\tright: 0;\n\t\tleft: auto;\n\t}\n\n\t.checkout-button {\n\t\twidth: 100%;\n\n\t\t.checkout__step-wrapper--last-step & {\n\t\t\twidth: calc( 100% - 60px );\n\t\t}\n\t}\n\n\t@media ( "," ) {\n\t\t.checkout__step-wrapper--last-step & {\n\t\t\tposition: relative;\n\t\t\tborder: 0;\n\n\t\t\t.checkout-button {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n"],["\n\tbackground: ",";\n\tpadding: 24px;\n\tbottom: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tz-index: 10;\n\tborder-top-width: 0;\n\tborder-top-style: solid;\n\tborder-top-color: ",";\n\n\t.checkout__step-wrapper--last-step & {\n\t\tborder-top-width: 1px;\n\t\tposition: fixed;\n\t}\n\n\t.rtl & {\n\t\tright: 0;\n\t\tleft: auto;\n\t}\n\n\t.checkout-button {\n\t\twidth: 100%;\n\n\t\t.checkout__step-wrapper--last-step & {\n\t\t\twidth: calc( 100% - 60px );\n\t\t}\n\t}\n\n\t@media ( "," ) {\n\t\t.checkout__step-wrapper--last-step & {\n\t\t\tposition: relative;\n\t\t\tborder: 0;\n\n\t\t\t.checkout-button {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n"])),(function(e){return e.theme.colors.background}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.breakpoints.tabletUp}));var _o=Gr.div(Ro||(Ro=z(["\n\tposition: relative;\n\tborder-bottom: 1px solid ",";\n\tpadding: 16px;\n\n\t&.checkout-step {\n\t\tbackground: ",";\n\t}\n\n\t&.checkout-step.is-active,\n\t&.checkout-step.is-complete {\n\t\tbackground: ",";\n\t}\n\n\t@media ( "," ) {\n\t\tpadding: 24px;\n\t}\n"],["\n\tposition: relative;\n\tborder-bottom: 1px solid ",";\n\tpadding: 16px;\n\n\t&.checkout-step {\n\t\tbackground: ",";\n\t}\n\n\t&.checkout-step.is-active,\n\t&.checkout-step.is-complete {\n\t\tbackground: ",";\n\t}\n\n\t@media ( "," ) {\n\t\tpadding: 24px;\n\t}\n"])),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.background}),(function(e){return e.theme.colors.surface}),(function(e){return e.theme.breakpoints.tabletUp}));function wo(e){var t=e.id,n=e.className,r=e.stepNumber,i=e.title,o=e.isActive,a=e.isComplete,s=e.onEdit,c=e.editButtonText,l=e.editButtonAriaLabel,u=$().__,d=!!s;return p.a.createElement(ko,{isComplete:a,isActive:o,className:Br([n,"checkout-step__header"])},p.a.createElement(Oo,{isComplete:a,isActive:o,id:t},r||null),p.a.createElement(Eo,{fullWidth:!d,isActive:o},i),d&&p.a.createElement(Po,{className:"checkout-step__edit-button",buttonType:"text-button",onClick:s,"aria-label":l||u("Edit this step")},c||u("Edit")))}function Oo(e){var t=e.isComplete,n=e.isActive,r=e.className,i=e.children,o=e.id,a=!n&&t;return p.a.createElement(So,{className:Br([r,"checkout-step__stepper"])},p.a.createElement(Co,{isComplete:a},p.a.createElement(jo,{isComplete:a,isActive:n},i),p.a.createElement(No,null,p.a.createElement(Ci,{id:o}))))}wo.propTypes={id:Rr.a.string,className:Rr.a.string,stepNumber:Rr.a.number,title:Rr.a.node.isRequired,isActive:Rr.a.bool,isComplete:Rr.a.bool,editButtonText:Rr.a.string,editButtonAriaLabel:Rr.a.string,onEdit:Rr.a.func},Oo.propTypes={id:Rr.a.string,className:Rr.a.string,isComplete:Rr.a.bool,isActive:Rr.a.bool};var Eo=Gr.span(Bo||(Bo=z(["\n\tcolor: ",";\n\tfont-weight: ",";\n\tmargin-right: ",";\n\tflex: ",";\n\n\t.rtl & {\n\t\tmargin-right: 0;\n\t\tmargin-left: ",";\n\t}\n"],["\n\tcolor: ",";\n\tfont-weight: ",";\n\tmargin-right: ",";\n\tflex: ",";\n\n\t.rtl & {\n\t\tmargin-right: 0;\n\t\tmargin-left: ",";\n\t}\n"])),(function(e){return e.isActive?e.theme.colors.textColorDark:e.theme.colors.textColor}),(function(e){return e.isActive?e.theme.weights.bold:e.theme.weights.normal}),(function(e){return e.fullWidth?"0":"8px"}),(function(e){return e.fullWidth?"1":"inherit"}),(function(e){return e.fullWidth?"0":"8px"})),ko=Gr.h2(Io||(Io=z(["\n\tfont-size: 16px;\n\tdisplay: flex;\n\twidth: 100%;\n\talign-items: center;\n\tmargin: 0 0 ",";\n"],["\n\tfont-size: 16px;\n\tdisplay: flex;\n\twidth: 100%;\n\talign-items: center;\n\tmargin: 0 0 ",";\n"])),(function(e){return e.isComplete||e.isActive?"8px":"0"})),So=Gr.div(zo||(zo=z(["\n\tposition: relative;\n\twidth: 27px;\n\theight: 27px;\n\tmargin-right: 8px;\n\n\t.rtl & {\n\t\tmargin-right: 0;\n\t\tmargin-left: 8px;\n\t}\n"],["\n\tposition: relative;\n\twidth: 27px;\n\theight: 27px;\n\tmargin-right: 8px;\n\n\t.rtl & {\n\t\tmargin-right: 0;\n\t\tmargin-left: 8px;\n\t}\n"]))),Co=Gr.div(Uo||(Uo=z(["\n\tposition: relative;\n\ttransform-origin: center center;\n\ttransition: transform 0.3s 0.1s ease-out;\n\ttransform-style: preserve-3d;\n\ttransform: ",";\n"],["\n\tposition: relative;\n\ttransform-origin: center center;\n\ttransition: transform 0.3s 0.1s ease-out;\n\ttransform-style: preserve-3d;\n\ttransform: ",";\n"])),(function(e){return e.isComplete?"rotateY(180deg)":"rotateY(0)"})),jo=Gr.div(Ho||(Ho=z(["\n\tbackground: ",";\n\tfont-weight: normal;\n\twidth: 27px;\n\theight: 27px;\n\tline-height: 27px;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tborder-radius: 50%;\n\tcolor: ",";\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbackface-visibility: hidden;\n\n\t.rtl & {\n\t\tright: 0;\n\t\tleft: auto;\n\t}\n\n\t// Reason: The IE media query needs to not have spaces within brackets otherwise ie11 doesn't read them\n\t// prettier-ignore\n\t@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) {\n\t\tz-index: ",";\n\t}\n"],["\n\tbackground: ",";\n\tfont-weight: normal;\n\twidth: 27px;\n\theight: 27px;\n\tline-height: 27px;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tborder-radius: 50%;\n\tcolor: ",";\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbackface-visibility: hidden;\n\n\t.rtl & {\n\t\tright: 0;\n\t\tleft: auto;\n\t}\n\n\t// Reason: The IE media query needs to not have spaces within brackets otherwise ie11 doesn't read them\n\t// prettier-ignore\n\t@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) {\n\t\tz-index: ",";\n\t}\n"])),(function(e){var t=e.isComplete,n=e.isActive,r=e.theme;if(n)return r.colors.highlight;if(t)return r.colors.success;return r.colors.upcomingStepBackground}),(function(e){var t=e.isComplete,n=e.isActive,r=e.theme;if(t||n)return r.colors.surface;return r.colors.textColor}),(function(e){return e.isComplete?"0":"1"})),No=Gr(jo)($o||($o=z(["\n\tbackground: ",";\n\ttransform: rotateY( 180deg );\n\t// Reason: media query needs to not have spaces within brackets otherwise ie11 doesn't read them\n\t// prettier-ignore\n\t@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) {\n\t\tbackface-visibility: visible;\n\t\tz-index: ",";\n\t}\n\n\tsvg {\n\t\tmargin-top: 4px;\n\t}\n"],["\n\tbackground: ",";\n\ttransform: rotateY( 180deg );\n\t// Reason: media query needs to not have spaces within brackets otherwise ie11 doesn't read them\n\t// prettier-ignore\n\t@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) {\n\t\tbackface-visibility: visible;\n\t\tz-index: ",";\n\t}\n\n\tsvg {\n\t\tmargin-top: 4px;\n\t}\n"])),(function(e){return e.theme.colors.success}),(function(e){return e.isComplete?"1":"0"})),Po=Gr(_i)(qo||(qo=z(["\n\tfont-size: 14px;\n\tpadding-top: 1px;\n"],["\n\tfont-size: 14px;\n\tpadding-top: 1px;\n"])));var Ao,Lo,To,Fo,Mo,Do,Ro,Bo,Io,zo,Uo,Ho,$o,qo,Vo,Go,Yo=Gr.div(Vo||(Vo=z(["\n\tcolor: ",";\n\tdisplay: ",";\n\tpadding-left: 35px;\n\n\t.rtl & {\n\t\tpadding-right: 35px;\n\t\tpadding-left: 0;\n\t}\n"],["\n\tcolor: ",";\n\tdisplay: ",";\n\tpadding-left: 35px;\n\n\t.rtl & {\n\t\tpadding-right: 35px;\n\t\tpadding-left: 0;\n\t}\n"])),(function(e){return e.theme.colors.textColor}),(function(e){return e.isVisible?"block":"none"})),Wo=Gr.div(Go||(Go=z(["\n\tcolor: ",";\n\tfont-size: 14px;\n\tdisplay: ",";\n\tpadding-left: 35px;\n\n\t.rtl & {\n\t\tpadding-right: 35px;\n\t\tpadding-left: 0;\n\t}\n"],["\n\tcolor: ",";\n\tfont-size: 14px;\n\tdisplay: ",";\n\tpadding-left: 35px;\n\n\t.rtl & {\n\t\tpadding-right: 35px;\n\t\tpadding-left: 0;\n\t}\n"])),(function(e){return e.theme.colors.textColorLight}),(function(e){return e.isVisible?"block":"none"}));n(95);var Ko,Xo,Zo=Object(u.createElement)(O,{icon:kr,size:17}),Jo=function(e){var t=e.onNextStep,n=e.onPrevStep,r=Object(m.useSelect)((function(e){return e(c).getSelectedDomain()})),i=Object(m.useSelect)((function(e){return e(c).getSelectedPlan()})),o=Object(m.useSelect)((function(e){return e(l).getPrices()})),a=Object(m.useSelect)((function(e){return e(c).getLaunchStep()})),s=Object(m.useSelect)((function(e){return e(c).isStepCompleted})),d=Object(m.useSelect)((function(e){return e(c).isFlowCompleted()})),p=Object(g.useEntityProp)("root","site","title"),f=b()(p,1)[0],h=K().currentDomainName,x=function(){var e,t=re();return null===(e=Object(m.useSelect)((function(e){if(t&&!(t.length<2))return e("automattic/domains/suggestions").getDomainSuggestions(t,{include_wordpressdotcom:!1,include_dotblogsubdomain:!1,quantity:1,locale:"en"})}),[t]))||void 0===e?void 0:e[0]}(),_=re(),w=Object(m.useDispatch)(c).setStep,O=Object(u.createElement)("div",{className:"nux-launch__summary-item"},Object(u.createElement)("p",null,Object(v.__)("Site","full-site-editing"),": ",f)),E=Object(u.createElement)("div",{className:"nux-launch__summary-item"},(null==r?void 0:r.domain_name)?Object(u.createElement)("p",null,Object(v.__)("Custom domain","full-site-editing"),": ",r.domain_name):Object(u.createElement)(u.Fragment,null,Object(u.createElement)("p",null,Object(v.__)("Free site address","full-site-editing"),": ",h),Object(u.createElement)(y.Tip,null,_?Object(u.createInterpolateElement)(Object(v.__)("A custom site address like <DomainName /> (<Link>now available!</Link>) is more unique and can help with your SEO ranking.","full-site-editing"),{DomainName:Object(u.createElement)("span",{className:j()("nux-launch__summary-item__domain-name",{"is-loading":!x})},(null==x?void 0:x.domain_name)||"loading-example.com"),Link:Object(u.createElement)(y.Button,{isLink:!0,onClick:function(){return w(a.Domain)}})}):Object(v.__)("A custom site address is more unique and can help with your SEO ranking.","full-site-editing")))),k=Object(u.createElement)("div",{className:"nux-launch__summary-item"},i&&!(null==i?void 0:i.isFree)?Object(u.createElement)(u.Fragment,null,Object(u.createElement)("p",{className:"nux-launch__summary-item__plan-name"},"WordPress.com ",i.title),Object(v.__)("Plan subscription","full-site-editing"),": ",o[i.storeSlug]," ",Object(v.__)("per month, billed yearly","full-site-editing")):Object(u.createElement)(u.Fragment,null,Object(u.createElement)("p",{className:"nux-launch__summary-item__plan-name"},"WordPress.com Free"),Object(u.createElement)("p",null,Object(v.__)("Plan subscription: Free forever","full-site-editing")),Object(u.createElement)(y.Tip,null,Object(u.createInterpolateElement)(Object(v.__)("<Link>Upgrade to Premium</Link> to get access to 13GB storage space, payment collection options, 24/7 Live Chat support, and more. Not sure? Give it a spin—we offer 30-day full-refunds, guaranteed.","full-site-editing"),{Link:Object(u.createElement)(y.Button,{isLink:!0,onClick:function(){return w(a.Plan)}})}))));return Object(u.createElement)(W,null,Object(u.createElement)("div",{className:"nux-launch-step__header"},Object(u.createElement)("div",null,Object(u.createElement)(A,null,Object(v.__)("Launch your site","full-site-editing")),Object(u.createElement)(L,null,Object(v.__)("Your site will be made public and ready to share with others.","full-site-editing")))),Object(u.createElement)("div",{className:"nux-launch-step__body"},Object(u.createElement)(Er,{theme:Mr},Object(u.createElement)(go,null,s(a.Plan)&&Object(u.createElement)(fo,null,Object(u.createElement)(ho,{className:"nux-launch__feature-list"},Object(u.createElement)("h3",{className:"nux-launch__feature-list-title"},Object(v.__)("Included in your plan","full-site-editing")),Object(u.createElement)("ul",{className:"nux-launch__feature-item-group"},null==i?void 0:i.features.map((function(e,t){return Object(u.createElement)("li",{key:t,className:"nux-launch__feature-item"},Zo," ",e)}))),Object(u.createElement)("p",null,Object(v.__)("Questions?","full-site-editing")," ",Object(u.createElement)(y.Button,{isLink:!0,href:"https://wordpress.com/help/contact",target:"_blank"},Object(v.__)("Ask a Happiness Engineer","full-site-editing"))))),Object(u.createElement)(yo,null,Object(u.createElement)(bo,{isStepActive:!1,titleContent:Object(v.__)("Your site name","full-site-editing"),isStepComplete:s(a.Name),goToThisStep:function(){return w(a.Name)},completeStepContent:O,stepId:"name",formStatus:Zr.READY}),Object(u.createElement)(bo,{isStepActive:!1,titleContent:Object(v.__)("Your domain","full-site-editing"),isStepComplete:s(a.Domain),goToThisStep:function(){return w(a.Domain)},completeStepContent:E,stepId:"domain",formStatus:Zr.READY}),Object(u.createElement)(bo,{isStepActive:!1,titleContent:Object(v.__)("Your plan","full-site-editing"),isStepComplete:s(a.Plan),goToThisStep:function(){return w(a.Plan)},completeStepContent:k,stepId:"plan",formStatus:Zr.READY}),Object(u.createElement)(xo,null,Object(u.createElement)(y.Button,{isPrimary:!0,disabled:!d,onClick:t,className:"nux-launch__submit-button"},Object(v.__)("Launch your site","full-site-editing"))))))),Object(u.createElement)("div",{className:"nux-launch-step__footer"},Object(u.createElement)(V,{sticky:!0},Object(u.createElement)(G,{onClick:function(){null==n||n()}}))))},Qo=(n(98),function(e){var t,n=e.onSubmit,r=Object(m.useSelect)((function(e){return e(c).getState()})).step,i=Object(m.useSelect)((function(e){return e(c).getLaunchStep()})),o=Object(m.useSelect)((function(e){return e(c).getLaunchSequence()})),a=Object(m.useSelect)((function(e){return e(c).getFirstIncompleteStep()})),s=Object(m.useDispatch)(c),l=s.setStep,p=s.setSidebarFullscreen,f=s.unsetSidebarFullscreen,h=(t={},P()(t,i.Name,ie),P()(t,i.Domain,et),P()(t,i.Plan,$n),P()(t,i.Final,Jo),t),b=o.indexOf(r),g=h[r];return d.useEffect((function(){a&&a!==i.Name&&l(a)}),[]),Object(u.createElement)(g,{onPrevStep:function(){var e=b-1;e<0&&(e=0,p()),l(o[e])},onNextStep:function(){var e=b+1;e>o.length-1&&(null==n||n()),f(),l(o[e])}})}),ea=Object(u.createElement)(y.SVG,{viewBox:"0 0 24 24"},Object(u.createElement)(y.Circle,{cx:"12",cy:"12",r:"5"})),ta=function(e){var t=e.title,n=e.isCompleted,r=e.isCurrent,i=e.isDisabled,o=e.onClick;return Object(u.createElement)(y.Button,{className:j()("nux-launch-menu__item",{"is-current":r,"is-completed":n}),onClick:o,disabled:i,isLink:!0},Object(u.createElement)(O,{icon:n?kr:ea,size:16}),Object(u.createElement)("span",null,t))},na=(n(99),function(e){var t,n=e.onMenuItemClick,r=Object(m.useSelect)((function(e){return e(c).getState()})).step,i=Object(m.useSelect)((function(e){return e(c).getLaunchStep()})),o=Object(m.useSelect)((function(e){return e(c).getLaunchSequence()})),a=Object(m.useSelect)((function(e){return e(c).isStepCompleted})),s=Object(m.useSelect)((function(e){return e(c).isFlowStarted()})),l=(t={},P()(t,i.Name,Object(v.__)("Name your site","full-site-editing")),P()(t,i.Domain,Object(v.__)("Select a domain","full-site-editing")),P()(t,i.Plan,Object(v.__)("Select a plan","full-site-editing")),P()(t,i.Final,Object(v.__)("Launch your site","full-site-editing")),t),d=Object(m.useDispatch)(c).setStep;return Object(u.createElement)("div",{className:"nux-launch-menu"},Object(u.createElement)("h4",null,Object(v.__)("Site Launch Steps","full-site-editing")),Object(u.createElement)("div",{className:"nux-launch-menu__item-group"},o.map((function(e){return Object(u.createElement)(ta,{key:e,title:l[e],isCompleted:a(e),isCurrent:e===r,onClick:function(){return function(e){d(e),n(e)}(e)},isDisabled:e===i.Final&&!s})}))))}),ra=(n(100),function(){var e=Object(m.useDispatch)(c),t=e.setStep,n=e.unsetSidebarFullscreen,r=Object(m.useSelect)((function(e){return e(c).getLaunchSequence()}));return Object(u.createElement)("div",{className:"nux-launch-sidebar"},Object(u.createElement)("div",{className:"nux-launch-sidebar__header"},Object(u.createElement)(A,null,Object(v.__)("You're almost there!","full-site-editing")),Object(u.createElement)(L,null,Object(v.__)("Complete the following steps to launch your site. Your site will remain private until you Launch.","full-site-editing"))),Object(u.createElement)("div",{className:"nux-launch-sidebar__body"},Object(u.createElement)(na,{onMenuItemClick:function(){n()}})),Object(u.createElement)("div",{className:"nux-launch-sidebar__footer"},Object(u.createElement)(V,{sticky:!0},Object(u.createElement)(Y,{onClick:function(){t(r[0]),n()}},Object(v.__)("Get Started","full-site-editing")))))}),ia=(n(101),function(){var e=$().__,t=Object(m.useSelect)((function(e){return e(c).getState()})).step,n=Object(m.useSelect)((function(e){return e(c).getLaunchSequence()})),r=n.indexOf(t)+1,i=n.length,o=Object(v.sprintf)(e("%1$d of %2$d","full-site-editing"),r,i);return Object(u.createElement)("div",{className:"nux-launch-progress"},o)}),oa=(n(102),function(e){var t=e.onClose,n=Object(m.useSelect)((function(e){return e(c).getState()})),r=n.step,i=n.isSidebarFullscreen,o=Object(m.useDispatch)(c).launchSite,a=d.useState(!1),s=b()(a,2),l=s[0],p=s[1],f=function(){p(!0),o()};return K().isPaidPlan&&!l&&f(),Object(u.createElement)(y.Modal,{open:!0,className:j()("nux-launch-modal","step-".concat(r),i?"is-sidebar-fullscreen":""),overlayClassName:"nux-launch-modal-overlay",bodyOpenClassName:"has-nux-launch-modal",onRequestClose:t,title:""},l?Object(u.createElement)("div",{className:"nux-launch-modal-body__launching"},Object(v.__)("Hooray! Your site will be ready shortly.","full-site-editing")):Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"nux-launch-modal-body"},Object(u.createElement)("div",{className:"nux-launch-modal-header"},Object(u.createElement)("div",{className:"nux-launch-modal-header__wp-logo"},Object(u.createElement)(O,{icon:k,size:36})),Object(u.createElement)(ia,null)),Object(u.createElement)(g.EntityProvider,{kind:"root",type:"site"},Object(u.createElement)(Qo,{onSubmit:f}))),Object(u.createElement)("div",{className:"nux-launch-modal-aside"},Object(u.createElement)(ra,null)),Object(u.createElement)(y.Button,{isLink:!0,className:"nux-launch-modal__close-button",onClick:t,"aria-label":Object(v.__)("Close dialog","full-site-editing"),disabled:!t},Object(u.createElement)("span",null,Object(u.createElement)(O,{icon:S,size:24})))))});Ko="a8c-editor-site-launch",Xo={render:function(){var e=Object(m.useSelect)((function(e){return e(c).getState()})).isSidebarOpen,t=Object(m.useDispatch)(c),n=t.closeSidebar,r=t.setSidebarFullscreen,i=t.unsetSidebarFullscreen;return function(){var e=K().launchStatus,t=Object(m.useSelect)((function(e){return e(c).getState()})),n=t.plan,r=t.domain,i=Object(m.useSelect)((function(e){return e(l).isPlanEcommerce(null==n?void 0:n.storeSlug)})),o=Object(m.useDispatch)(s),a=o.getCart,u=o.setCart;d.useEffect((function(){if(e){if(n&&!(null==n?void 0:n.isFree)){var t={product_id:n.productId,product_slug:n.storeSlug,extra:{source:"gutenboarding"}},o={meta:null==r?void 0:r.domain_name,product_id:null==r?void 0:r.product_id,extra:{privacy_available:null==r?void 0:r.supports_privacy,privacy:null==r?void 0:r.supports_privacy,source:"gutenboarding"}};return void function(){var e=te()(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a(window._currentSiteId);case 2:return n=e.sent,e.next=5,u(window._currentSiteId,Q()(Q()({},n),{},{products:[].concat(Z()(n.products),[t,o])}));case 5:r=Object(ne.addQueryArgs)("https://wordpress.com/checkout/".concat(window._currentSiteId),Q()({preLaunch:1},!i&&{redirect_to:"/home/".concat(window._currentSiteId)})),window.top.location.href=r;case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}window.top.location.href="https://wordpress.com/home/".concat(window._currentSiteId)}}),[e])}(),d.useEffect((function(){window.innerWidth<782?r():i()}),[e,r,i]),e?Object(u.createElement)(oa,{onClose:n}):null}},Object(f.registerPlugin)(Ko,Xo)}]));
|
1 |
+
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=105)}([function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){e.exports=n(98)()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r;
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){t.log=function(){var e;return"object"==typeof console&&console.log&&(e=console).log.apply(e,arguments)},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.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"],e.exports=n(71)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var r=n(61),i=n(62),o=n(28),a=n(63);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.coreData}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){var r=n(9);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},,,,function(e,t,n){var r=n(65),i=n(66),o=n(28),a=n(67);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,a,s;if(l(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),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function p(){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 m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.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):b(i,i.length)}function h(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 b(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),s.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},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(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},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var l=c.length,u=b(c,l);for(n=0;n<l;++n)o(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,m(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,m(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if(l(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){a=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,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.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},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r=n(25),i=n(30);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(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 a=e.charCodeAt(i);a<128?n[r++]=a:a<2048?(n[r++]=a>>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|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+=s(e[n].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=a(i)),n+=c(i.toString(16))}return n},t.zero2=s,t.zero8=c,t.join32=function(e,t,n,i){var o=n-t;r(o%4==0);for(var a=new Array(o/4),s=0,c=t;s<a.length;s++,c+=4){var l;l="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],a[s]=l>>>0}return a},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,a=(o<r?1:0)+n+i;e[t]=a>>>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,a,s){var c=0,l=t;return c+=(l=l+r>>>0)<t?1:0,c+=(l=l+o>>>0)<o?1:0,e+n+i+a+(c+=(l=l+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,c,l){var u=0,d=t;return u+=(d=d+r>>>0)<t?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+s>>>0)<s?1:0,e+n+i+a+c+(u+=(d=d+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,c,l){return t+r+o+s+l>>>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}},function(e,t){!function(){e.exports=this.wp.dataControls}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";
|
7 |
/*!
|
8 |
* cookie
|
9 |
* Copyright(c) 2012-2014 Roman Shtylman
|
10 |
* Copyright(c) 2015 Douglas Christopher Wilson
|
11 |
* MIT Licensed
|
12 |
+
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},i=t||{},a=e.split(o),c=i.decode||r,l=0;l<a.length;l++){var u=a[l],d=u.indexOf("=");if(!(d<0)){var p=u.substr(0,d).trim(),m=u.substr(++d,u.length).trim();'"'==m[0]&&(m=m.slice(1,-1)),null==n[p]&&(n[p]=s(m,c))}}return n},t.serialize=function(e,t,n){var r=n||{},o=r.encode||i;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var s=o(t);if(s&&!a.test(s))throw new TypeError("argument val is invalid");var c=e+"="+s;if(null!=r.maxAge){var l=r.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");c+="; Max-Age="+Math.floor(l)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");c+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");c+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");c+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(c+="; HttpOnly");r.secure&&(c+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return c};var r=decodeURIComponent,i=encodeURIComponent,o=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t){!function(){e.exports=this.wp.hooks}()},,function(e,t,n){var r=n(29);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){"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}}},function(e,t,n){"use strict";var r=n(20),i=n(25);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}},function(e,t,n){"use strict";var r=n(20).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function a(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?a(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=a,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}},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";var r=n(20),i=n(31),o=n(32),a=n(25),s=r.sum32,c=r.sum32_4,l=r.sum32_5,u=o.ch32,d=o.maj32,p=o.s0_256,m=o.s1_256,f=o.g0_256,h=o.g1_256,b=i.BlockHash,g=[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 v(){if(!(this instanceof v))return new v;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(v,b),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.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],f(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],b=this.h[2],g=this.h[3],v=this.h[4],y=this.h[5],_=this.h[6],x=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var w=l(x,m(v),u(v,y,_),this.k[r],n[r]),O=s(p(i),d(i,o,b));x=_,_=y,y=v,v=s(g,w),g=b,b=o,o=i,i=s(w,O)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],b),this.h[3]=s(this.h[3],g),this.h[4]=s(this.h[4],v),this.h[5]=s(this.h[5],y),this.h[6]=s(this.h[6],_),this.h[7]=s(this.h[7],x)},v.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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},i=s(n(0)),o=s(n(84)),a=s(n(87));function s(e){return e&&e.__esModule?e:{default:e}}var c=void 0;function l(e,t){var n,a,s,u,d,p,m,f,h=[],b={};for(p=0;p<e.length;p++)if("string"!==(d=e[p]).type){if(!t.hasOwnProperty(d.value)||void 0===t[d.value])throw new Error("Invalid interpolation, missing component node: `"+d.value+"`");if("object"!==r(t[d.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+d.value+"`","\n> "+c);if("componentClose"===d.type)throw new Error("Missing opening component token: `"+d.value+"`");if("componentOpen"===d.type){n=t[d.value],s=p;break}h.push(t[d.value])}else h.push(d.value);return n&&(u=function(e,t){var n,r,i=t[e],o=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===i.value){if("componentOpen"===n.type){o++;continue}if("componentClose"===n.type){if(0===o)return r;o--}}throw new Error("Missing closing component token `"+i.value+"`")}(s,e),m=l(e.slice(s+1,u),t),a=i.default.cloneElement(n,{},m),h.push(a),u<e.length-1&&(f=l(e.slice(u+1),t),h=h.concat(f))),1===h.length?h[0]:(h.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,o.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,i=e.throwErrors;if(c=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var o=(0,a.default)(t);try{return l(o,n)}catch(s){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+s.message+"`");return t}}},function(e,t,n){var r=n(19),i=n(30);function o(e){if(!(this instanceof o))return new o(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=o,i(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},o.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},o.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},o.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},o.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},o.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},o.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},function(e,t,n){"use strict";var r=n(20),i=n(31),o=n(32),a=r.rotl32,s=r.sum32,c=r.sum32_5,l=o.ft_1,u=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(p,u),e.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.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]=a(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],p=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var f=~~(r/20),h=c(a(i,5),l(f,o,u,p),m,n[r],d[f]);m=p,p=u,u=a(o,30),o=i,i=h}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],p),this.h[4]=s(this.h[4],m)},p.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(88);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(89),i=n(90),o=n(91);e.exports=function(e){var t=i();return function(){var n,i=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}}},function(e,t,n){"use strict";e.exports=n(93)},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var r=n(95),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=m(n);i&&i!==f&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),h=c(n),b=0;b<a.length;++b){var g=a[b];if(!(o[g]||r&&r[g]||h&&h[g]||s&&s[g])){var v=p(n,g);try{l(t,g,v)}catch(y){}}}}return t}},,,,,,,,,,,,,function(e,t){!function(){e.exports=this["a8c-fse-common-data-stores"]}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){var r=n(29);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(18);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return i.colors[Math.abs(t)%i.colors.length]}function i(e){var n;function r(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];if(r.enabled){var a=r,s=Number(new Date),c=s-(n||s);a.diff=c,a.prev=n,a.curr=s,n=s,t[0]=i.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;l++;var r=i.formatters[n];if("function"==typeof r){var o=t[l];e=r.call(a,o),t.splice(l,1),l--}return e})),i.formatArgs.call(a,t);var u=a.log||i.log;u.apply(a,t)}}return r.namespace=e,r.enabled=i.enabled(e),r.useColors=i.useColors(),r.color=t(e),r.destroy=o,r.extend=a,"function"==typeof i.init&&i.init(r),i.instances.push(r),r}function o(){var e=i.instances.indexOf(this);return-1!==e&&(i.instances.splice(e,1),!0)}function a(e,t){var n=i(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return i.debug=i,i.default=i,i.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},i.disable=function(){var e=[].concat(r(i.names.map(s)),r(i.skips.map(s).map((function(e){return"-"+e})))).join(",");return i.enable(""),e},i.enable=function(e){var t;i.save(e),i.names=[],i.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?i.skips.push(new RegExp("^"+e.substr(1)+"$")):i.names.push(new RegExp("^"+e+"$")));for(t=0;t<i.instances.length;t++){var o=i.instances[t];o.enabled=i.enabled(o.namespace)}},i.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=i.skips.length;t<n;t++)if(i.skips[t].test(e))return!1;for(t=0,n=i.names.length;t<n;t++)if(i.names[t].test(e))return!0;return!1},i.humanize=n(72),Object.keys(e).forEach((function(t){i[t]=e[t]})),i.instances=[],i.names=[],i.skips=[],i.formatters={},i.selectColor=t,i.enable(i.load()),i}},function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,a=7*o,s=365.25*o;function c(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\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(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=i)return c(e,t,i,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(0),i="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=n(33),a=n(85),s=n(86),c="function"==typeof Symbol&&Symbol.iterator;function l(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var o,s=typeof e;if("undefined"!==s&&"boolean"!==s||(e=null),null===e||"string"===s||"number"===s||"object"===s&&e.$$typeof===i)return n(r,e,""===t?"."+l(e,0):t),1;var d=0,p=""===t?".":t+":";if(Array.isArray(e))for(var m=0;m<e.length;m++)d+=u(o=e[m],p+l(o,m),n,r);else{var f=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(f){0;for(var h,b=f.call(e),g=0;!(h=b.next()).done;)d+=u(o=h.value,p+l(o,g++),n,r)}else if("object"===s){0;var v=""+e;a(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===v?"object with keys {"+Object.keys(e).join(", ")+"}":v,"")}}return d}var d=/\/+/g;function p(e){return(""+e).replace(d,"$&/")}var m,f,h=b,b=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},g=function(e){var t=this;a(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)};function v(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function y(e,t,n){var i,a,s=e.result,c=e.keyPrefix,l=e.func,u=e.context,d=l.call(u,t,e.count++);Array.isArray(d)?_(d,s,n,o.thatReturnsArgument):null!=d&&(r.isValidElement(d)&&(i=d,a=c+(!d.key||t&&t.key===d.key?"":p(d.key)+"/")+n,d=r.cloneElement(i,{key:a},void 0!==i.props?i.props.children:void 0)),s.push(d))}function _(e,t,n,r,i){var o="";null!=n&&(o=p(n)+"/");var a=v.getPooled(t,o,r,i);!function(e,t,n){null==e||u(e,"",t,n)}(e,y,a),v.release(a)}v.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},m=function(e,t,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,e,t,n,r),o}return new i(e,t,n,r)},(f=v).instancePool=[],f.getPooled=m||h,f.poolSize||(f.poolSize=10),f.release=g;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return s(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return s(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;a(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)_(e[n],t,n,o.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";var r=n(33);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(92),i=n(22);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";
|
13 |
/** @license React v1.3.0
|
14 |
* use-subscription.production.min.js
|
15 |
*
|
17 |
*
|
18 |
* This source code is licensed under the MIT license found in the
|
19 |
* LICENSE file in the root directory of this source tree.
|
20 |
+
*/Object.defineProperty(t,"__esModule",{value:!0});var r=n(94),i=n(0);t.useSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe,o=i.useState((function(){return{getCurrentValue:t,subscribe:n,value:t()}}));e=o[0];var a=o[1];return o=e.value,e.getCurrentValue===t&&e.subscribe===n||(o=t(),a({getCurrentValue:t,subscribe:n,value:o})),i.useDebugValue(o),i.useEffect((function(){function e(){if(!i){var e=t();a((function(i){return i.getCurrentValue!==t||i.subscribe!==n||i.value===e?i:r({},i,{value:e})}))}}var i=!1,o=n(e);return e(),function(){i=!0,o()}}),[t,n]),o}},function(e,t,n){"use strict";
|
21 |
/*
|
22 |
object-assign
|
23 |
(c) Sindre Sorhus
|
24 |
@license MIT
|
25 |
+
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),l=1;l<arguments.length;l++){for(var u in n=Object(arguments[l]))i.call(n,u)&&(c[u]=n[u]);if(r){s=r(n);for(var d=0;d<s.length;d++)o.call(n,s[d])&&(c[s[d]]=n[s[d]])}}return c}},function(e,t,n){"use strict";e.exports=n(96)},function(e,t,n){"use strict";
|
26 |
/** @license React v16.13.1
|
27 |
* react-is.production.min.js
|
28 |
*
|
30 |
*
|
31 |
* This source code is licensed under the MIT license found in the
|
32 |
* LICENSE file in the root directory of this source tree.
|
33 |
+
*/var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,b=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case p:case a:case c:case s:case f:return e;default:switch(e=e&&e.$$typeof){case u:case m:case g:case b:case l:return e;default:return t}}case o:return t}}}function O(e){return w(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=l,t.Element=i,t.ForwardRef=m,t.Fragment=a,t.Lazy=g,t.Memo=b,t.Portal=o,t.Profiler=c,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return O(e)||w(e)===d},t.isConcurrentMode=O,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return w(e)===m},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===b},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===c},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===c||e===s||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===b||e.$$typeof===l||e.$$typeof===u||e.$$typeof===m||e.$$typeof===y||e.$$typeof===_||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},function(e,t,n){},function(e,t,n){"use strict";var r=n(99);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setPrices",(function(){return dn})),n.d(r,"resetPlan",(function(){return pn}));var i={};n.r(i),n.d(i,"getPlanBySlug",(function(){return fn})),n.d(i,"getDefaultPaidPlan",(function(){return hn})),n.d(i,"getSupportedPlans",(function(){return bn})),n.d(i,"getPlanByPath",(function(){return gn})),n.d(i,"getPlansDetails",(function(){return vn})),n.d(i,"getPlansPaths",(function(){return yn})),n.d(i,"getPrices",(function(){return _n})),n.d(i,"isPlanEcommerce",(function(){return xn})),n.d(i,"isPlanFree",(function(){return wn}));var o={};n.r(o),n.d(o,"getPrices",(function(){return On}));var a={};n.r(a),n.d(a,"plansPaths",(function(){return an})),n.d(a,"PLAN_FREE",(function(){return rt})),n.d(a,"PLAN_PERSONAL",(function(){return it})),n.d(a,"PLAN_PREMIUM",(function(){return ot})),n.d(a,"PLAN_BUSINESS",(function(){return at})),n.d(a,"PLAN_ECOMMERCE",(function(){return st})),n.d(a,"register",(function(){return kn}));n(60);var s="automattic/site",c="automattic/launch",l="automattic/onboard/plans",u=n(1),d=n(0),p=n.n(d),m=n(3),f=n(34),h=n(26),b=n(10),g=n.n(b),v=n(12),y=n(2),_=n(5);function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function 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}var E=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,i=w(e,["icon","size"]);return Object(u.cloneElement)(t,function(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){x(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}({width:r,height:r},i))},k=n(8),S=Object(u.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(u.createElement)(k.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),j=Object(u.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(k.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),C=n(6),N=n.n(C),P=n(9),A=n.n(P),L=(n(69),function(e){var t=e.children;return d.createElement("h1",{className:"onboarding-title"},t)}),T=function(e){var t=e.children;return d.createElement("h2",{className:"onboarding-subtitle"},t)},F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var M=function(){return(M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function D(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function R(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function B(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function I(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(B(arguments[t]));return e}function z(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function U(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var H=n(13),$=d.createContext(V()),q=function(){return d.useContext($)};Object(H.createHigherOrderComponent)((function(e){return function(t){var n=q();return d.createElement(e,M({},n,t))}}),"withI18n");function V(e){var t,n,r=Object(y.createI18n)(e),i=null!==(n=null===(t=null==e?void 0:e[""])||void 0===t?void 0:t.localeSlug)&&void 0!==n?n:"en";return{__:r.__.bind(r),_n:r._n.bind(r),_nx:r._nx.bind(r),_x:r._x.bind(r),isRTL:r.isRTL.bind(r),i18nLocale:i}}n(70);var G=function(e){var t=e.className,n=e.children,r=e.sticky,i=void 0===r?null:r,o="";return!0===i&&(o="is-sticky"),!1===i&&(o="no-sticky"),d.createElement("div",{className:N()("action-buttons",t,o)},n)},Y=function(e){var t=e.className,n=e.children,r=D(e,["className","children"]),i=q().__;return d.createElement(_.Button,M({className:N()("action_buttons__button action-buttons__back",t),isLink:!0},r),n||i("Go back"))},W=function(e){var t=e.className,n=e.children,r=D(e,["className","children"]),i=q().__;return d.createElement(_.Button,M({className:N()("action_buttons__button action-buttons__next",t),isPrimary:!0},r),n||i("Continue"))},K=(n(64),function(e){var t=e.children;return Object(u.createElement)(u.Fragment,null,t)});function X(){var e,t,n=Object(m.useSelect)((function(e){return e(s).getSite(window._currentSiteId)})),r=Object(m.useSelect)((function(e){return e(s).isLaunched(window._currentSiteId)}));return{isPaidPlan:n&&!(null===(e=n.plan)||void 0===e?void 0:e.is_free),launchStatus:r,currentDomainName:(null==n?void 0:n.URL)&&new URL(null==n?void 0:n.URL).hostname,selectedFeatures:null==n||null===(t=n.options)||void 0===t?void 0:t.selected_features}}var Z=n(18),J=n.n(Z),Q=n(14),ee=n.n(Q),te=n(35),ne=n.n(te),re=n(36);function ie(){var e,t=Object(m.useSelect)((function(e){return e(c).getState()})).domainSearch,n=Object(v.useEntityProp)("root","site","title"),r=g()(n,1)[0],i=X().currentDomainName,o=t.trim()||r;o&&o!==Object(y.__)("Site Title","full-site-editing")||(o=null!==(e=null==i?void 0:i.split(".")[0])&&void 0!==e?e:"");return o}n(68);var oe=function(e){var t=e.onPrevStep,n=e.onNextStep,r=function(){var e=Object(m.useSelect)((function(e){return e(c).getSelectedDomain()})),t=Object(m.useDispatch)(c).setDomainSearch,n=Object(v.useEntityProp)("root","site","title"),r=g()(n,2),i=r[0],o=r[1],a=Object(m.useDispatch)("core").saveEditedEntityRecord;return{title:i,updateTitle:o,saveTitle:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;o(n.trim()),a("root","site"),!e&&t(n)}}}(),i=r.title,o=r.updateTitle,a=r.saveTitle,s=function(){a(),null==n||n()};return Object(u.createElement)(K,null,Object(u.createElement)("div",{className:"nux-launch-step__header"},Object(u.createElement)("div",null,Object(u.createElement)(L,null,Object(y.__)("Name your site","full-site-editing")),Object(u.createElement)(T,null,Object(y.__)("Pick a name for your site.","full-site-editing"))),Object(u.createElement)(G,{sticky:!1},Object(u.createElement)(W,{onClick:s,disabled:!(null==i?void 0:i.trim())}))),Object(u.createElement)("div",{className:"nux-launch-step__body"},Object(u.createElement)("form",{onSubmit:s},Object(u.createElement)(_.TextControl,{id:"nux-launch-step__input",className:"nux-launch-step__input",onChange:o,onBlur:function(){return a()},value:i,spellCheck:!1,autoComplete:"off",placeholder:Object(y.__)("Enter site name","full-site-editing"),autoCorrect:"off"}),Object(u.createElement)("div",{className:"nux-launch-step__input-hint"},Object(u.createElement)(_.Tip,{size:18}),Object(u.createElement)("span",null,Object(y.__)("Don't worry, you can change it later.","full-site-editing"))))),Object(u.createElement)("div",{className:"nux-launch-step__footer"},Object(u.createElement)(G,{sticky:!0},Object(u.createElement)(Y,{onClick:function(){null==t||t()}}),Object(u.createElement)(W,{onClick:s,disabled:!(null==i?void 0:i.trim())}))))},ae=n(11);function se(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}var ce=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,i=w(e,["icon","size"]);return Object(u.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))},le=Object(u.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(k.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),ue=n(7),de=n.n(ue),pe=de()("calypso:analytics");n(37);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}));n(24);var me=n(19),fe=de()("lib/load-script/callback-handler"),he=new Map;function be(){return he}function ge(e){return be().has(e)}function ve(e,t){var n=be();ge(e)?(fe('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(fe('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=be(),r=n.get(e);if(r){var i='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));fe(i),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function _e(){var e=this.getAttribute("src");fe('Handling successful request for "'.concat(e,'"')),ye(e),this.onload=null}function xe(){var e=this.getAttribute("src");fe('Handling failed request for "'.concat(e,'"')),ye(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}var we=de()("lib/load-script/dom-operations");de()("package/load-script");function Oe(e,t){var n;if(!ge(e)&&(n=function(e){we('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=_e,t.onerror=xe,t}(e),we("Attaching element to head"),document.head.appendChild(n)),"function"!=typeof t)return new Promise((function(t,n){ve(e,(function(e){null===e?t():n(e)}))}));ve(e,t)}var Ee,ke=["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"];Promise.resolve();function Se(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&Oe("//stats.wp.com/w.js?61");var je=new me.EventEmitter;function Ce(e,t){if(pe('Record event "%s" called with props %o',e,t=t||{}),e.startsWith("calypso_")||Object(ae.includes)(ke,e)){if(Ee){var n=Ee(t);t=M(M({},t),n)}t=Object(ae.omitBy)(t,ae.isUndefined),pe('Recording event "%s" with actual props %o',e,t),Se(["recordEvent",e,t]),je.emit("record-event",e,t)}else pe('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}var Ne="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),Pe=new Uint8Array(16);function Ae(){if(!Ne)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ne(Pe)}for(var Le=[],Te=0;Te<256;++Te)Le[Te]=(Te+256).toString(16).substr(1);var Fe=function(e,t){var n=t||0,r=Le;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var Me=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||Ae)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||Fe(i)};var De;!function(e){e.Failure="failure",e.Pending="pending",e.Success="success",e.Uninitialized="uninitialized"}(De||(De={}));var Re=Object(u.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(k.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Be=(n(76),function(e){var t=e.children,n=e.className,r=e.id,i=e.position,o=void 0===i?"bottom center":i,a=e.noArrow,s=void 0===a||a,c=Object(d.useState)(!1),l=c[0],u=c[1];return p.a.createElement(_.Button,{icon:Re,onClick:function(){u(!l)},className:"info-tooltip","data-testid":"info-tooltip"},l&&p.a.createElement(_.Popover,{id:r,className:N()("info-tooltip__content",n),onClose:function(){u(!1)},position:o,noArrow:s},t))}),Ie=function(e){var t=e.isUnavailable,n=e.domain,r=e.isLoading,i=e.cost,o=e.railcarId,a=e.hstsRequired,s=void 0!==a&&a,c=e.isFree,l=void 0!==c&&c,m=e.isExistingSubdomain,f=void 0!==m&&m,h=e.isRecommended,b=void 0!==h&&h,g=e.onSelect,v=e.onRender,x=e.selected,w=Object(H.useViewportMatch)("small","<"),O=n.indexOf("."),E=n.slice(0,O),k=n.slice(O),S=Object(d.useState)(),j=S[0],C=S[1],P=Object(d.useState)(),A=P[0],L=P[1],T=Me();Object(d.useEffect)((function(){n!==j&&A!==o&&o&&(v(),C(n),L(o))}),[n,j,A,o,v]);return p.a.createElement("label",{className:N()("domain-picker__suggestion-item",{"is-free":l,"is-selected":x,"is-unavailable":t})},r?p.a.createElement(_.Spinner,null):p.a.createElement("input",{"aria-labelledby":T,className:"domain-picker__suggestion-radio-button",type:"radio",disabled:t,name:"domain-picker-suggestion-option",onChange:function(){A&&function(e){Ce("calypso_traintracks_interact",{railcar:e.railcarId,action:e.action})}({action:"domain_selected",railcarId:A}),g(n)},checked:x&&!t}),p.a.createElement("div",{className:"domain-picker__suggestion-item-name"},p.a.createElement("div",{className:"domain-picker__suggestion-item-name-inner"},p.a.createElement("span",{className:"domain-picker__domain-name"},E),p.a.createElement("span",{className:N()("domain-picker__domain-tld",{"with-margin":!s})},k),s&&p.a.createElement(Be,{position:w?"bottom center":"middle right",noArrow:!1,className:"domain-picker__info-tooltip"},Object(u.createInterpolateElement)(Object(y.__)("All domains ending with <tld /> require an SSL certificate to host a website. When you host this domain at WordPress.com an SSL certificate is included. <learn_more_link>Learn more</learn_more_link>","full-site-editing"),{tld:p.a.createElement("b",null,k),learn_more_link:p.a.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://wordpress.com/support/https-ssl"})})),b&&!t&&p.a.createElement("div",{className:"domain-picker__badge is-recommended"},Object(y.__)("Recommended","full-site-editing"))),f&&p.a.createElement("div",{className:"domain-picker__change-subdomain-tip"},Object(y.__)("You can change your free subdomain later under Domain Settings.","full-site-editing"))),p.a.createElement("div",{className:N()("domain-picker__price",{"is-paid":!l})},t&&Object(y.__)("Unavailable","full-site-editing"),l&&!t&&Object(y.__)("Free","full-site-editing"),!l&&!t&&p.a.createElement(p.a.Fragment,null,p.a.createElement("span",{className:"domain-picker__price-inclusive"}," ",Object(y.__)("Included in plans","full-site-editing")," "),p.a.createElement("span",{className:"domain-picker__price-cost"},Object(y.sprintf)(Object(y.__)("%s/year","full-site-editing"),i)))))},ze=function(){return p.a.createElement("div",{className:"domain-picker__suggestion-item placeholder"},p.a.createElement("div",{className:"domain-picker__suggestion-item-name placeholder"}),p.a.createElement("div",{className:"domain-picker__price placeholder"}))};function Ue(e,t){return e===t}function He(e,t,n){var r=n&&n.equalityFn?n.equalityFn:Ue,i=Object(d.useState)(e),o=i[0],a=i[1],s=function(e,t,n){void 0===n&&(n={});var r=n.maxWait,i=Object(d.useRef)(null),o=Object(d.useRef)([]),a=n.leading,s=Object(d.useRef)(!1),c=Object(d.useRef)(null),l=Object(d.useRef)(!1),u=Object(d.useRef)(e);u.current=e;var p=Object(d.useCallback)((function(){clearTimeout(c.current),clearTimeout(i.current),i.current=null,o.current=[],c.current=null,s.current=!1}),[]);return Object(d.useEffect)((function(){return function(){l.current=!0}}),[]),[Object(d.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o.current=e,clearTimeout(c.current),!c.current&&a&&!s.current)return u.current.apply(u,e),void(s.current=!0);c.current=setTimeout((function(){p(),l.current||u.current.apply(u,e)}),t),r&&!i.current&&(i.current=setTimeout((function(){var e=o.current;p(),l.current||u.current.apply(null,e)}),r))}),[r,t,p,a]),p,function(){c.current&&(u.current.apply(null,o.current),p())}]}(Object(d.useCallback)((function(e){return a(e)}),[]),t,n),c=s[0],l=s[1],u=Object(d.useRef)(e);return Object(d.useEffect)((function(){r(u.current,e)||(c(e),u.current=e)}),[e,c,r]),[o,l]}var $e="automattic/domains/suggestions",qe=["available","available_premium"];var Ve,Ge,Ye,We,Ke=Object(u.createElement)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(k.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),Xe=(n(75),function(e){var t=e.onSelect,n=e.selected,r=Object(u.useState)(!1),i=r[0],o=r[1],a=function(e){o(!1),t(e)},s=Object(m.useSelect)((function(e){return e($e).getCategories()}));return d.createElement("div",{className:N()("domain-categories",{"is-open":i})},d.createElement(_.Button,{className:"domain-categories__dropdown-button",onClick:function(){return o(!i)}},d.createElement("span",null,n||Object(y.__)("All Categories","full-site-editing")),d.createElement(ce,{icon:Ke,size:16})),d.createElement("ul",{className:"domain-categories__item-group"},d.createElement("li",{className:N()("domain-categories__item",{"is-selected":!n})},d.createElement(_.Button,{onClick:function(){return a()}},Object(y.__)("View all","full-site-editing"))),s.map((function(e){var t=e.slug,r=e.title;return d.createElement("li",{key:t,className:N()("domain-categories__item",{"is-selected":t===n})},d.createElement(_.Button,{onClick:function(){return a(t)}},r))}))))}),Ze=function(){return p.a.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 300 40",xmlSpace:"preserve",width:"300"},p.a.createElement("rect",{x:"0",width:"310",height:"50",rx:"10",fill:"#D8D8D8"}),p.a.createElement("rect",{x:"8",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),p.a.createElement("rect",{x:"40",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),p.a.createElement("rect",{x:"72",y:"8",width:"300",height:"25",rx:"5",fill:"#fff"}),p.a.createElement("text",{x:"80",y:"26",fill:"#999"},"https://"),p.a.createElement("text",{x:"133",y:"26",fill:"#515151"},Object(y.__)("example.com","full-site-editing")))},Je=(n(74),function(e){var t=e.groupItems,n=e.children;return t?p.a.createElement("div",{className:"domain-picker__suggestion-item-group"},n):p.a.createElement(p.a.Fragment,null,n)}),Qe=function(e){var t,n,r=e.header,i=e.showDomainCategories,o=e.onDomainSelect,a=e.onExistingSubdomainSelect,s=e.quantity,c=void 0===s?5:s,l=e.quantityExpanded,u=void 0===l?10:l,f=e.onDomainSearchBlur,h=e.analyticsFlowId,b=e.analyticsUiAlgo,g=e.initialDomainSearch,v=void 0===g?"":g,x=e.onSetDomainSearch,w=e.currentDomain,O=e.isCheckingDomainAvailability,E=e.existingSubdomain,k=e.segregateFreeAndPaid,S=void 0!==k&&k,j=Object(y.__)("Search for a domain","full-site-editing"),C=Object(d.useState)(!1),N=C[0],P=C[1],A=Object(d.useState)(v),L=A[0],T=A[1],F=Object(d.useState)(),M=F[0],D=F[1],R=Object(m.useSelect)((function(e){return e($e).getDomainSuggestionVendor()})),B=function(e,t,n,r){void 0===e&&(e=""),void 0===r&&(r="en");var i=He(e,300)[0],o=Object(m.useDispatch)($e).invalidateResolutionForStoreSelector;return Object(m.useSelect)((function(e){if(i&&!(i.length<2)){var a=e($e),s=a.getDomainSuggestions,c=a.getDomainState,l=a.getDomainErrorMessage;return{allDomainSuggestions:s(i,{include_wordpressdotcom:!0,include_dotblogsubdomain:!1,quantity:t+1,locale:r,category_slug:n}),state:c(),errorMessage:l(),retryRequest:function(){o("__internalGetDomainSuggestions")}}}}),[i,n,t])}(L.trim(),u,M,q().i18nLocale)||{},I=B.allDomainSuggestions,z=B.errorMessage,U=B.state,H=B.retryRequest,$=null==I?void 0:I.slice(E?1:0,N?u:c),V=Object(m.useSelect)((function(e){return e($e).getDomainAvailabilities()}),[]);Object(d.useEffect)((function(){P(!1)}),[L]);var G=Object(d.useState)(),Y=G[0],W=G[1];Object(d.useEffect)((function(){var e;I&&W((void 0===(e="suggestion")&&(e="recommendation"),Me().replace(/-/g,"")+"-"+e))}),[I,W]);var K=function(e,t,n,r){!function(e){Ce("calypso_traintracks_render",{railcar:e.railcarId,ui_algo:e.uiAlgo,ui_position:e.uiPosition,fetch_algo:e.fetchAlgo,rec_result:e.result,fetch_query:e.query})}({uiAlgo:"/"+h+"/"+b,fetchAlgo:"/domains/search/"+R+"/"+h+(M?"/"+M:""),query:L,railcarId:t,result:r?e+"#recommended":e,uiPosition:n})},X=U===De.Failure,Z=(null===(t=L.trim)||void 0===t?void 0:t.call(L).length)<=1,J=!X&&!Z,Q=!X&&Z;return p.a.createElement("div",{className:"domain-picker"},r&&r,p.a.createElement("div",{className:"domain-picker__search"},p.a.createElement("div",{className:"domain-picker__search-icon"},p.a.createElement(ce,{icon:le})),p.a.createElement(_.TextControl,{hideLabelFromVision:!0,label:j,placeholder:j,onChange:function(e){T(e),x(e)},onBlur:function(e){f&&f(e.currentTarget.value)},value:L})),X&&p.a.createElement("div",{className:"domain-picker__error"},p.a.createElement("p",{className:"domain-picker__error-message"},Object(y.__)("An error has occurred, please check your connection and retry.","full-site-editing"),z&&" "+z),p.a.createElement(_.Button,{isPrimary:!0,className:"domain-picker__error-retry-btn",onClick:H},"Retry")),J&&p.a.createElement("div",{className:"domain-picker__body"},i&&p.a.createElement("div",{className:"domain-picker__aside"},p.a.createElement(Xe,{selected:M,onSelect:D})),p.a.createElement("div",{className:"domain-picker__suggestion-sections"},p.a.createElement(p.a.Fragment,null,S&&p.a.createElement("p",{className:"domain-picker__suggestion-group-label"},Object(y.__)("Keep sub-domain","full-site-editing")),p.a.createElement(Je,{groupItems:S},E&&p.a.createElement(Ie,{key:E,domain:E,cost:"Free",isFree:!0,isExistingSubdomain:!0,railcarId:Y?""+Y+0:void 0,onRender:function(){return K(E,""+Y+0,0,!1)},selected:w===E,onSelect:function(){null==a||a(E)}})),S&&p.a.createElement("p",{className:"domain-picker__suggestion-group-label"},Object(y.__)("Professional domains","full-site-editing")),p.a.createElement(Je,{groupItems:S},null!==(n=null==$?void 0:$.map((function(e,t){var n,r=E?t+1:t,i=1===r,a=null===(n=V[null==e?void 0:e.domain_name])||void 0===n?void 0:n.status,s=!a||(null==qe?void 0:qe.includes(a));return p.a.createElement(Ie,{key:e.domain_name,isUnavailable:!s,domain:e.domain_name,cost:e.cost,isLoading:w===e.domain_name&&O,hstsRequired:e.hsts_required,isFree:e.is_free,isRecommended:i,railcarId:Y?""+Y+r:void 0,onRender:function(){return K(e.domain_name,""+Y+r,r,i)},onSelect:function(){o(e)},selected:w===e.domain_name})})))&&void 0!==n?n:Object(ae.times)(c,(function(e){return p.a.createElement(ze,{key:e})})))),!N&&(null==I?void 0:I.length)&&(null==I?void 0:I.length)>c&&p.a.createElement("div",{className:"domain-picker__show-more"},p.a.createElement(_.Button,{onClick:function(){return P(!0)},isLink:!0},Object(y.__)("View more results","full-site-editing"))))),Q&&p.a.createElement("div",{className:"domain-picker__empty-state"},p.a.createElement("p",{className:"domain-picker__empty-state--text"},Object(y.__)("A domain name is the site address people type in their browser to visit your site.","full-site-editing")),p.a.createElement("div",null,p.a.createElement(Ze,null))))},et="gutenboarding",tt=(n(73),function(e){var t=e.onPrevStep,n=e.onNextStep,r=Object(m.useSelect)((function(e){return e(c).getState()})),i=r.plan,o=r.domain,a=X().currentDomainName,s=ie(),l=Object(m.useDispatch)(c),d=l.setDomain,p=l.unsetDomain,f=l.setDomainSearch,h=l.unsetPlan,b=l.confirmDomainSelection,g=function(){b(),null==n||n()};return Object(u.createElement)(K,null,Object(u.createElement)("div",{className:"nux-launch-step__header"},Object(u.createElement)("div",null,Object(u.createElement)(L,null,Object(y.__)("Choose a domain","full-site-editing")),Object(u.createElement)(T,null,Object(y.__)("Free for the first year with any paid plan.","full-site-editing"))),Object(u.createElement)(G,{sticky:!1},Object(u.createElement)(W,{onClick:g,disabled:!s}))),Object(u.createElement)("div",{className:"nux-launch-step__body"},Object(u.createElement)(Qe,{analyticsFlowId:et,initialDomainSearch:s,onSetDomainSearch:f,onDomainSearchBlur:function(e){Ce("calypso_newsite_domain_search_blur",{flow:et,query:e,where:"editor_domain_modal"})},currentDomain:(null==o?void 0:o.domain_name)||a,existingSubdomain:a,onDomainSelect:function(e){b(),d(e),(null==i?void 0:i.isFree)&&h()},onExistingSubdomainSelect:function(){p()},analyticsUiAlgo:"editor_domain_modal",segregateFreeAndPaid:!0})),Object(u.createElement)("div",{className:"nux-launch-step__footer"},Object(u.createElement)(G,{sticky:!0},Object(u.createElement)(Y,{onClick:function(){null==t||t()}}),Object(u.createElement)(W,{onClick:g,disabled:!s}))))}),nt=n(21),rt="free_plan",it="personal-bundle",ot="value_bundle",at="business-bundle",st="ecommerce-bundle",ct="automattic/onboard/plans",lt=ot,ut={USD:{format:"SYMBOL_THEN_AMOUNT",symbol:"$",decimal:2},GBP:{format:"SYMBOL_THEN_AMOUNT",symbol:"£",decimal:2},JPY:{format:"SYMBOL_THEN_AMOUNT",symbol:"¥",decimal:0},BRL:{format:"SYMBOL_THEN_AMOUNT",symbol:"R$",decimal:2},EUR:{format:"SYMBOL_THEN_AMOUNT",symbol:"€",decimal:2},NZD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NZ$",decimal:2},AUD:{format:"SYMBOL_THEN_AMOUNT",symbol:"A$",decimal:2},CAD:{format:"SYMBOL_THEN_AMOUNT",symbol:"C$",decimal:2},IDR:{format:"AMOUNT_THEN_SYMBOL",symbol:"Rp",decimal:0},INR:{format:"AMOUNT_THEN_SYMBOL",symbol:"₹",decimal:0},ILS:{format:"AMOUNT_THEN_SYMBOL",symbol:"₪",decimal:2},RUB:{format:"AMOUNT_THEN_SYMBOL",symbol:"₽",decimal:2},MXN:{format:"SYMBOL_THEN_AMOUNT",symbol:"MX$",decimal:2},SEK:{format:"AMOUNT_THEN_SYMBOL",symbol:"SEK",decimal:2},HUF:{format:"AMOUNT_THEN_SYMBOL",symbol:"Ft",decimal:0},CHF:{format:"AMOUNT_THEN_SYMBOL",symbol:"CHF",decimal:2},CZK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kč",decimal:2},DKK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Dkr",decimal:2},HKD:{format:"AMOUNT_THEN_SYMBOL",symbol:"HK$",decimal:2},NOK:{format:"AMOUNT_THEN_SYMBOL",symbol:"Kr",decimal:2},PHP:{format:"AMOUNT_THEN_SYMBOL",symbol:"₱",decimal:2},PLN:{format:"AMOUNT_THEN_SYMBOL",symbol:"PLN",decimal:2},SGD:{format:"SYMBOL_THEN_AMOUNT",symbol:"S$",decimal:2},TWD:{format:"SYMBOL_THEN_AMOUNT",symbol:"NT$",decimal:0},THB:{format:"SYMBOL_THEN_AMOUNT",symbol:"฿",decimal:2},TRY:{format:"AMOUNT_THEN_SYMBOL",symbol:"TL",decimal:2}},dt=n(38),pt=n.n(dt);Ve={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},Ge=["(","?"],Ye={")":["("],":":["?","?:"]},We=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var mt={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function ft(e){var t=function(e){for(var t,n,r,i,o=[],a=[];t=e.match(We);){for(n=t[0],(r=e.substr(0,t.index).trim())&&o.push(r);i=a.pop();){if(Ye[n]){if(Ye[n][0]===i){n=Ye[n][1]||n;break}}else if(Ge.indexOf(i)>=0||Ve[i]<Ve[n]){a.push(i);break}o.push(i)}Ye[n]||a.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&o.push(e),o.concat(a.reverse())}(e);return function(e){return function(e,t){var n,r,i,o,a,s,c=[];for(n=0;n<e.length;n++){if(a=e[n],o=mt[a]){for(r=o.length,i=Array(r);r--;)i[r]=c.pop();try{s=o.apply(null,i)}catch(l){return l}}else s=t.hasOwnProperty(a)?t[a]:+a;c.push(s)}return c[0]}(t,e)}}var ht={contextDelimiter:"",onMissingKey:null};function bt(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},ht)this.options[n]=void 0!==t&&n in t?t[n]:ht[n]}bt.prototype.getPluralForm=function(e,t){var n,r,i,o,a=this.pluralForms[e];return a||("function"!=typeof(i=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=ft(r),i=function(e){return+o({n:e})}),a=this.pluralForms[e]=i),a(t)},bt.prototype.dcnpgettext=function(e,t,n,r,i){var o,a,s;return o=void 0===i?0:this.getPluralForm(e,i),a=n,t&&(a=t+this.options.contextDelimiter+n),(s=this.data[e][a])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)};var gt=n(39),vt=n.n(gt),yt=n(40),_t=n.n(yt),xt=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function wt(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(xt,(function(){var e,r,i,o,a;return e=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(i=arguments[7])&&(i=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(a=t[0][r]):(void 0===e&&(e=n),n++,a=t[e-1]),"f"===o?a=parseFloat(a)||0:"d"===o&&(a=parseInt(a)||0),void 0!==i&&("f"===o?a=a.toFixed(i):"s"===o&&(a=a.substr(0,i))),null!=a?a:"")}))}
|
34 |
/*
|
35 |
* Exposes number format capability
|
36 |
*
|
37 |
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
|
38 |
* @license See CREDITS.md
|
39 |
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
|
40 |
+
*/function Ot(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,a=void 0===r?",":r,s=void 0===n?".":n,c="";return(c=(o?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(i,o):""+Math.round(i)).split("."))[0].length>3&&(c[0]=c[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(c[1]||"").length<o&&(c[1]=c[1]||"",c[1]+=new Array(o-c[1].length+1).join("0")),c.join(s)}var Et=de()("i18n-calypso"),kt="number_format_decimals",St="number_format_thousands_sep",jt="messages",Ct=[function(e){return e}],Nt={};function Pt(){Mt.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function At(e){return Array.prototype.slice.call(e)}function Lt(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&Pt("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",At(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&Pt("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",At(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function Tt(e,t){return e.dcnpgettext(jt,t.context,t.original,t.plural,t.count)}function Ft(e,t){for(var n=Ct.length-1;n>=0;n--){var r=Ct[n](Object.assign({},t)),i=r.context?r.context+""+r.original:r.original;if(e.state.locale[i])return Tt(e.state.tannin,r)}return null}function Mt(){if(!(this instanceof Mt))return new Mt;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:vt()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new me.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}Mt.throwErrors=!1,Mt.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},Mt.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},Mt.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},Mt.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",i=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return Ot(e,n,r,i)},Mt.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},Mt.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var i=e[""]["key-hash"],o=function(e,t){var n=!1===t?"":String(t);if(void 0!==Nt[n+e])return Nt[n+e];var r=_t()().update(e).digest("hex");return Nt[n+e]=t?r.substr(0,t):r},a=function(e){return function(t){return t.context?(t.original=o(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=o(t.original,e),t}};if("sha1"===i.substr(0,4))if(4===i.length)Ct.push(a(!1));else{var s=i.substr(5).indexOf("-");if(s<0){var c=Number(i.substr(5));Ct.push(a(c))}else for(var l=Number(i.substr(5,s)),u=Number(i.substr(6+s)),d=l;d<=u;d++)Ct.push(a(d))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new bt(A()({},jt,this.state.locale)),this.state.numberFormatSettings.decimal_point=Tt(this.state.tannin,Lt([kt])),this.state.numberFormatSettings.thousands_sep=Tt(this.state.tannin,Lt([St])),this.state.numberFormatSettings.decimal_point===kt&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===St&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},Mt.prototype.getLocale=function(){return this.state.locale},Mt.prototype.getLocaleSlug=function(){return this.state.localeSlug},Mt.prototype.isRtl=function(){return"rtl"===this.state.textDirection},Mt.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},Mt.prototype.hasTranslation=function(){return!!Ft(this,Lt(arguments))},Mt.prototype.translate=function(){var e=Lt(arguments),t=Ft(this,e);if(t||(t=Tt(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=wt.apply(void 0,J()(n))}catch(i){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof i?window.console[r](i):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=pt()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},Mt.prototype.reRenderTranslations=function(){Et("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},Mt.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},Mt.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var Dt=Mt,Rt=n(41),Bt=n.n(Rt),It=n(42),zt=n.n(It),Ut=n(22),Ht=n.n(Ut),$t=n(43),qt=n.n($t),Vt=n(44),Gt=n.n(Vt),Yt=n(23),Wt=n.n(Yt),Kt=n(45);var Xt,Zt,Jt,Qt,en=new Dt,tn=(en.numberFormat.bind(en),en.translate.bind(en)),nn=(en.configure.bind(en),en.setLocale.bind(en),en.getLocale.bind(en),en.getLocaleSlug.bind(en),en.addTranslations.bind(en),en.reRenderTranslations.bind(en),en.registerComponentUpdateHook.bind(en),en.registerTranslateHook.bind(en),en.state,en.stateObserver,en.on.bind(en),en.off.bind(en),en.emit.bind(en),Zt={numberFormat:(Xt=en).numberFormat.bind(Xt),translate:Xt.translate.bind(Xt)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(en),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(Kt.useSubscription)(t)}var r=Object(H.createHigherOrderComponent)((function(e){return Object(d.forwardRef)((function(t,r){var i=n();return p.a.createElement(e,Wt()({},t,{isRtl:i,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(en)),rn=(nn.useRtl,nn.withRtl,["Remove WordPress.com ads","Email & basic live chat support","Collect recurring payments","Collect one-time payments","Earn ad revenue","Premium themes","Upload videos","Google Analytics support","Business features (incl. SEO)","Upload themes","Install plugins","Accept payments in 60+ countries"]),on=((Jt={})[rt]={title:tn("Free"),description:tn("Create a beautiful, simple website in minutes"),productId:1,storeSlug:rt,pathSlug:"beginner",features:["3 GB storage space"],isFree:!0},Jt[it]={title:tn("Personal"),description:tn("Best for personal use"),productId:1009,storeSlug:it,pathSlug:"personal",features:I(["6 GB storage space"],rn.slice(0,3))},Jt[ot]={title:tn("Premium"),description:tn("Best for freelancers"),productId:1003,storeSlug:ot,pathSlug:"premium",features:I(["13 GB storage space"],rn.slice(0,8)),isPopular:!0},Jt[at]={title:tn("Business"),description:tn("Best for small businesses"),productId:1008,storeSlug:at,pathSlug:"business",features:I(["200 GB storage space"],rn.slice(0,11))},Jt[st]={title:tn("eCommerce"),description:tn("Best for online stores"),productId:1011,storeSlug:st,pathSlug:"ecommerce",features:I(["200 GB storage space"],rn)},Jt),an=Object.keys(on).map((function(e){return on[e].pathSlug})),sn=[{id:"general",name:null,features:[{name:"Free domain for One Year",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Email & basic live chat support",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"24/7 Priority live chat support",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Preinstalled SSL security",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Jetpack essential features",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Storage",type:"text",data:["3 GB","6 GB","13 GB","200 GB","200 GB"]},{name:"Dozens of free designs",type:"checkbox",data:[!0,!0,!0,!0,!0]},{name:"Remove WordPress.com ads",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Unlimited premium themes",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced design customization",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Get personalized help",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Install plugins",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Upload themes",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Remove WordPress.com branding",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Automated backup & one-click rewind",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"SFTP and database access",type:"checkbox",data:[!1,!1,!1,!0,!0]}]},{id:"commerce",name:"Commerce",features:[{name:"Sell subscriptions (recurring payments)",type:"checkbox",data:[!1,!0,!0,!0,!0]},{name:"Sell single items (simple payments)",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Accept payments in 60+ countries",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Integrations with top shipping carriers",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Sell anything (products and/or services)",type:"checkbox",data:[!1,!1,!1,!1,!0]},{name:"Premium customizable starter themes",type:"checkbox",data:[!1,!1,!1,!1,!0]}]},{id:"marketing",name:"Marketing",features:[{name:"WordAds",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"Advanced social media tools",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"VideoPress support",type:"checkbox",data:[!1,!1,!0,!0,!0]},{name:"SEO tools",type:"checkbox",data:[!1,!1,!1,!0,!0]},{name:"Commerce marketing tools",type:"checkbox",data:[!1,!1,!1,!1,!0]}]}],cn=Object.keys(on),ln={supportedPlanSlugs:cn,prices:(Qt={},Qt[rt]="",Qt[it]="",Qt[ot]="",Qt[at]="",Qt[st]="",Qt)},un=function(e,t){switch(void 0===e&&(e=ln),t.type){case"SET_PRICES":return M(M({},e),{prices:t.prices});default:return e}},dn=function(e){return{type:"SET_PRICES",prices:e}},pn=function(){return{type:"RESET_PLAN"}};function mn(e){return on[e]}var fn=function(e,t){return mn(t)},hn=function(){return mn(lt)},bn=function(e){return e.supportedPlanSlugs.map(mn)},gn=function(e,t){return t&&bn(e).find((function(e){return(null==e?void 0:e.pathSlug)===t}))},vn=function(){return sn},yn=function(e){return bn(e).map((function(e){return null==e?void 0:e.pathSlug}))},_n=function(e){return e.prices},xn=function(e,t){return t===st},wn=function(e,t){return t===rt};function On(){var e,t,n;return R(this,(function(r){switch(r.label){case 0:return[4,Object(nt.apiFetch)({global:!0,url:"https://public-api.wordpress.com/rest/v1.5/plans",mode:"cors",credentials:"omit"})];case 1:return e=r.sent(),t=e.filter((function(e){return-1!==cn.indexOf(e.product_slug)})),n=t.reduce((function(e,t){return e[t.product_slug]=function(e){var t=ut[e.currency_code],n=e.raw_price/12;return Number.isInteger(n)||(n=n.toFixed(t.decimal)),"AMOUNT_THEN_SYMBOL"===t.format?""+n+t.symbol:""+t.symbol+n}(t),e}),{}),[4,dn(n)];case 2:return r.sent(),[2]}}))}var En=!1;function kn(){return En||(En=!0,Object(m.registerStore)(ct,{resolvers:o,actions:r,controls:nt.controls,reducer:un,selectors:i})),ct}var Sn=Object(u.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(k.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"})),jn=Object(u.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(k.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),Cn=(n(81),p.a.createElement(ce,{icon:Sn,size:17})),Nn=p.a.createElement(ce,{icon:jn,size:17}),Pn=p.a.createElement("svg",{width:"8",viewBox:"0 0 8 4"},p.a.createElement("path",{d:"M0 0 L8 0 L4 4 L0 0",fill:"currentColor"}));var An=function(e){var t=e.features,n=e.domain,r=e.isFree,i=void 0!==r&&r,o=e.isOpen,a=void 0!==o&&o,s=e.onPickDomain,c=e.disabledLabel,l=e.multiColumn,d=void 0!==l&&l,m=function(e,t,n){return{NO_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plans-feature-list__domain-summary is-cta",icon:Cn,domainMessage:p.a.createElement(p.a.Fragment,null,n("Pick a free domain (1 year)","full-site-editing")," ",Pn)}},FREE_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plans-feature-list__domain-summary is-cta",icon:Cn,domainMessage:p.a.createElement(p.a.Fragment,null,n("Pick a free domain (1 year)","full-site-editing")," ",Pn)}},PAID_DOMAIN:{FREE_PLAN:{className:"plans-feature-list__domain-summary is-free",icon:Nn,domainMessage:p.a.createElement("span",null,Object(u.createInterpolateElement)(n("<url /> is not included","full-site-editing"),{url:p.a.createElement("span",{className:"plans-feature-list__item-url"},null==t?void 0:t.domain_name)}))},PAID_PLAN:{className:"plans-feature-list__domain-summary is-picked",icon:Cn,domainMessage:p.a.createElement("span",null,Object(u.createInterpolateElement)(n("<url /> is included","full-site-editing"),{url:p.a.createElement("span",{className:"plans-feature-list__item-url"},null==t?void 0:t.domain_name)}))}}}[t&&(t.is_free?"FREE_DOMAIN":"PAID_DOMAIN")||"NO_DOMAIN"][e?"FREE_PLAN":"PAID_PLAN"]}(i,n,y.__);return p.a.createElement("div",{className:"plans-feature-list",hidden:!a},p.a.createElement("ul",{className:N()("plans-feature-list__item-group",{"plans-feature-list__item-group--columns":d})},c?p.a.createElement("li",{className:"plans-feature-list__item plans-feature-list__item--disabled-message"},Nn," ",p.a.createElement("span",null,c)):m&&p.a.createElement("li",{className:"plans-feature-list__item"},p.a.createElement(_.Button,{className:m.className,onClick:s,isLink:!0},m.icon,m.domainMessage)),t.map((function(e,t){return p.a.createElement("li",{key:t,className:"plans-feature-list__item"},Cn," ",p.a.createElement("span",null,e))}))))},Ln=d.createElement("svg",{width:"8",viewBox:"0 0 8 4"},d.createElement("path",{d:"M0 0 L8 0 L4 4 L0 0",fill:"currentColor"})),Tn=function(e){var t=e.slug,n=e.name,r=e.price,i=e.isPopular,o=void 0!==i&&i,a=e.isFree,s=void 0!==a&&a,c=e.domain,l=e.features,u=e.onSelect,p=e.onPickDomainClick,m=e.onToggleExpandAll,f=e.allPlansExpanded,h=e.disabledLabel,b=d.useState(!1),g=b[0],v=b[1],x=Object(H.useViewportMatch)("mobile",">=");d.useEffect((function(){v(f)}),[f]);var w=f||x||o||g;return d.createElement("div",{className:N()("plan-item",{"is-popular":o,"is-open":w})},o&&d.createElement("span",{className:"plan-item__badge"},Object(y.__)("Popular","full-site-editing")),d.createElement("div",{className:N()("plan-item__viewport",{"is-popular":o})},d.createElement("div",{className:"plan-item__details"},d.createElement("div",{tabIndex:0,role:"button",onClick:function(){return v((function(e){return!e}))},onKeyDown:function(e){return 32===e.keyCode&&v((function(e){return!e}))},className:"plan-item__summary"},d.createElement("div",{className:"plan-item__heading"},d.createElement("div",{className:"plan-item__name"},n)),d.createElement("div",{className:"plan-item__price"},d.createElement("div",{className:N()("plan-item__price-amount",{"is-loading":!r})},r||" ")),!w&&d.createElement("div",{className:"plan-item__dropdown-chevron"},Ln)),d.createElement("div",{hidden:!w},d.createElement("div",{className:"plan-item__price-note"},s?Object(y.__)("free forever","full-site-editing"):Object(y.__)("per month, billed yearly","full-site-editing")),d.createElement("div",{className:"plan-item__actions"},d.createElement(_.Button,{className:"plan-item__select-button",onClick:function(){u(t)},isPrimary:!0,disabled:!!h},d.createElement("span",null,Object(y.__)("Choose","full-site-editing")))),d.createElement(An,{features:l,domain:c,isFree:s,isOpen:w,onPickDomain:p,disabledLabel:h})))),o&&!x&&d.createElement(_.Button,{onClick:m,className:"plan-item__mobile-expand-all-plans",isLink:!0},f?Object(y.__)("Collapse all plans","full-site-editing"):Object(y.__)("Expand all plans","full-site-editing")))},Fn="automattic/onboard/plans",Mn=(n(82),function(e){var t=e.selectedPlanSlug,n=e.onPlanSelect,r=e.onPickDomainClick,i=e.currentDomain,o=e.disabledPlans,a=Object(m.useSelect)((function(e){return e(Fn).getSupportedPlans()})),s=Object(m.useSelect)((function(e){return e(Fn).getPrices()})),c=Object(d.useState)(!1),l=c[0],u=c[1];return p.a.createElement("div",{className:"plans-table"},a.map((function(e){var a;return e&&p.a.createElement(Tn,{allPlansExpanded:l,key:e.storeSlug,slug:e.storeSlug,domain:i,features:null!==(a=e.features)&&void 0!==a?a:[],isPopular:e.isPopular,isFree:e.isFree,price:s[e.storeSlug],name:null==e?void 0:e.title.toString(),isSelected:e.storeSlug===t,onSelect:n,onPickDomainClick:r,onToggleExpandAll:function(){return u((function(e){return!e}))},disabledLabel:null==o?void 0:o[e.storeSlug]})})))}),Dn=(n(80),p.a.createElement("svg",{width:"8",viewBox:"0 0 8 4"},p.a.createElement("path",{d:"M0 0 L8 0 L4 4 L0 0",fill:"currentColor"}))),Rn=function(e){var t=e.slug,n=e.name,r=e.description,i=e.price,o=e.features,a=e.domain,s=e.badge,c=e.isFree,l=void 0!==c&&c,u=e.isOpen,d=void 0!==u&&u,m=e.isPrimary,f=void 0!==m&&m,h=e.onSelect,b=e.onPickDomainClick,g=e.onToggle,v=e.disabledLabel,_=function(){!v&&(null==g||g(t,!d))};return p.a.createElement("div",{className:N()("plans-accordion-item",{"is-open":d,"is-primary":f,"has-badge":!!s,"is-disabled":!!v})},s&&p.a.createElement("div",{className:"plans-accordion-item__badge"},p.a.createElement("span",null,s)),p.a.createElement("div",{className:"plans-accordion-item__viewport"},p.a.createElement("div",{className:"plans-accordion-item__details"},p.a.createElement("div",{tabIndex:0,role:"button",onClick:_,onKeyDown:function(e){return 32===e.keyCode&&_()},className:"plans-accordion-item__header"},p.a.createElement("div",{className:"plans-accordion-item__heading"},p.a.createElement("div",{className:"plans-accordion-item__name"},n),p.a.createElement("div",{className:"plans-accordion-item__description"},r)),p.a.createElement("div",{className:"plans-accordion-item__price"},p.a.createElement("div",{className:N()("plans-accordion-item__price-amount",{"is-loading":!i})},i||" ",i&&p.a.createElement("span",null,Object(y.__)("/mo","full-site-editing"))),p.a.createElement("div",{className:"plans-accordion-item__price-note"},l?Object(y.__)("free forever","full-site-editing"):Object(y.__)("billed annually","full-site-editing"))),p.a.createElement("div",{className:"plans-accordion-item__disabled-label"},v),!d&&p.a.createElement("div",{className:"plans-accordion-item__dropdown-chevron"},Dn)),p.a.createElement("div",{className:"plans-accordion-item__actions",hidden:!d},p.a.createElement(W,{onClick:function(){h(t)}},Object(y.__)("Select","full-site-editing"))),p.a.createElement(An,{features:o,domain:a,isFree:l,isOpen:d,onPickDomain:b,multiColumn:!0}))))},Bn=(n(79),p.a.createElement(_.SVG,{viewBox:"0 0 24 24"},p.a.createElement(_.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"}))),In=function(e){var t,n=e.selectedFeatures,r=void 0===n?[]:n,i=e.selectedPlanSlug,o=e.onPlanSelect,a=e.onPickDomainClick,s=e.currentDomain,c=e.disabledPlans,l=Object(m.useSelect)((function(e){return e(Fn).getSupportedPlans()})),u=Object(m.useSelect)((function(e){return e(Fn).getPrices()})),f=Object(m.useSelect)((function(e){return e(Fn).getDefaultPaidPlan()})),h=Object(m.useSelect)((function(e){return e("automattic/wpcom-features").getRecommendedPlanSlug(r)})),b=Object(m.useSelect)((function(e){return e(Fn).getPlanBySlug(h)})),g=b||f,v=b?Object(y.__)("Recommended for you","full-site-editing"):Object(y.__)("Popular","full-site-editing"),x=l.filter((function(e){return e.storeSlug!==g.storeSlug})),w=[g.storeSlug],O=Object(d.useState)(w),E=O[0],k=O[1],S=E.length>=l.length,j=function(e,t){k(t?z(E,[e]):E.filter((function(t){return t!==e})))};return p.a.createElement("div",{className:"plans-accordion"},p.a.createElement("div",{className:"plans-accordion__plan-item-group"},g&&p.a.createElement(p.a.Fragment,null,b&&p.a.createElement("div",{className:"plans-accordion__recommend-hint"},p.a.createElement(ce,{icon:Bn,size:16}),p.a.createElement("span",null,Object(y.__)("Based on the features you selected.","full-site-editing"))),p.a.createElement(Rn,{key:g.storeSlug,slug:g.storeSlug,name:null==g?void 0:g.title.toString(),description:null==g?void 0:g.description.toString(),features:null!==(t=g.features)&&void 0!==t?t:[],price:u[g.storeSlug],domain:s,badge:v,isFree:g.isFree,isOpen:!0,isPrimary:!0,isSelected:g.storeSlug===i,onSelect:o,onPickDomainClick:a}))),p.a.createElement("div",{className:"plans-accordion__actions"},p.a.createElement(_.Button,{className:"plans-accordion__toggle-all-button",onClick:function(){k(S?w:l.map((function(e){return e.storeSlug})))},isLink:!0},S?Object(y.__)("Collapse all plans","full-site-editing"):Object(y.__)("Show all plans","full-site-editing"))),p.a.createElement("div",{className:"plans-accordion__plan-item-group"},x.map((function(e){var t;return p.a.createElement(Rn,{key:e.storeSlug,slug:e.storeSlug,name:null==e?void 0:e.title.toString(),description:null==e?void 0:e.description.toString(),features:null!==(t=e.features)&&void 0!==t?t:[],price:u[e.storeSlug],domain:s,isFree:e.isFree,isOpen:E.indexOf(e.storeSlug)>-1&&!(null==c?void 0:c[e.storeSlug]),isSelected:e.storeSlug===i,onSelect:o,onPickDomainClick:a,onToggle:j,disabledLabel:null==c?void 0:c[e.storeSlug]})}))))},zn=(n(83),p.a.createElement(ce,{icon:Sn,size:25})),Un=function(e){var t=e.onSelect,n=Object(m.useSelect)((function(e){return e(Fn).getPlansDetails()})),r=Object(m.useSelect)((function(e){return e(Fn).getPrices()})),i=Object(m.useSelect)((function(e){return e(Fn).getSupportedPlans()}));return p.a.createElement("div",{className:"plans-details"},p.a.createElement("table",{className:"plans-details__table"},p.a.createElement("thead",null,p.a.createElement("tr",{className:"plans-details__header-row"},p.a.createElement("th",null,Object(y.__)("Feature","full-site-editing")),i.map((function(e){return p.a.createElement("th",{key:e.storeSlug},e.title)})))),n.map((function(e){return p.a.createElement("tbody",{key:e.id},e.name&&p.a.createElement("tr",{className:"plans-details__header-row"},p.a.createElement("th",{colSpan:6},e.name)),e.features.map((function(e,t){return p.a.createElement("tr",{className:"plans-details__feature-row",key:t},p.a.createElement("th",null,e.name),e.data.map((function(t,n){return p.a.createElement("td",{key:n},"checkbox"===e.type&&(t?p.a.createElement(p.a.Fragment,null,p.a.createElement("span",{className:"hidden"},Object(y.__)("Available","full-site-editing")),zn):p.a.createElement(p.a.Fragment,null,p.a.createElement("span",{className:"hidden"},Object(y.__)("Unavailable","full-site-editing")," "))),"text"===e.type&&t)})))})))})),p.a.createElement("tbody",null,p.a.createElement("tr",{className:"plans-details__header-row"},p.a.createElement("th",{colSpan:6},Object(y.__)("Sign up","full-site-editing"))),p.a.createElement("tr",{className:"plans-details__feature-row",key:"price"},p.a.createElement("th",null,Object(y.__)("Monthly subscription (billed yearly)","full-site-editing")),i.map((function(e){return p.a.createElement("td",{key:e.storeSlug},r[e.storeSlug])}))),p.a.createElement("tr",{className:"plans-details__feature-row",key:"cta"},p.a.createElement("th",null),i.map((function(e){return p.a.createElement("td",{key:e.storeSlug},p.a.createElement(_.Button,{className:"plans-details__select-button",onClick:function(){t(e.storeSlug)},isPrimary:!0},p.a.createElement("span",null,Object(y.__)("Select","full-site-editing"))))}))))))},Hn=(n(78),de()("plans-grid")),$n=function(e){var t,n,r=e.header,i=e.selectedFeatures,o=e.currentPlan,a=e.currentDomain,s=e.onPlanSelect,c=e.onPickDomainClick,l=e.disabledPlans,u=e.isExperimental;return u&&Hn("PlansGrid experimental version is active"),d.createElement("div",{className:"plans-grid"},r&&d.createElement("div",{className:"plans-grid__header"},r),d.createElement("div",{className:"plans-grid__table"},d.createElement("div",{className:"plans-grid__table-container"},u?d.createElement(In,{selectedFeatures:i,selectedPlanSlug:null!==(t=null==o?void 0:o.storeSlug)&&void 0!==t?t:"",onPlanSelect:s,currentDomain:a,onPickDomainClick:c,disabledPlans:l}):d.createElement(Mn,{selectedPlanSlug:null!==(n=null==o?void 0:o.storeSlug)&&void 0!==n?n:"",onPlanSelect:s,currentDomain:a,onPickDomainClick:c,disabledPlans:l}))),d.createElement("div",{className:"plans-grid__details"},d.createElement("div",{className:"plans-grid__details-heading"},d.createElement(L,null,Object(y.__)("Detailed comparison","full-site-editing"))),d.createElement("div",{className:"plans-grid__details-container"},d.createElement(Un,{onSelect:s}))))},qn=(n(77),function(e){var t=e.onPrevStep,n=e.onNextStep,r=Object(m.useSelect)((function(e){return e(c).getSelectedDomain()})),i=Object(m.useSelect)((function(e){return e(c).getLaunchStep()})),o=Object(m.useSelect)((function(e){return e(c).getState()})).isExperimental,s=Object(m.useDispatch)(c),l=s.updatePlan,d=s.setStep,p=X().selectedFeatures,f=r&&!r.is_free;return Object(u.createElement)(K,null,Object(u.createElement)("div",{className:"nux-launch-step__header"},Object(u.createElement)("div",null,Object(u.createElement)(L,null,Object(y.__)("Select a plan","full-site-editing")),Object(u.createElement)(T,null,Object(y.__)("Pick a plan that’s right for you. Switch plans as your needs change. There’s no risk, you can cancel for a full refund within 30 days.","full-site-editing")))),Object(u.createElement)("div",{className:"nux-launch-step__body"},Object(u.createElement)($n,{currentDomain:r,onPlanSelect:function(e){l(e),null==n||n()},onPickDomainClick:function(){d(i.Domain)},disabledPlans:f?A()({},a.PLAN_FREE,Object(y.__)("Not available with custom domain","full-site-editing")):void 0,isExperimental:o,selectedFeatures:p})),Object(u.createElement)("div",{className:"nux-launch-step__footer"},Object(u.createElement)(G,{sticky:!0},Object(u.createElement)(Y,{onClick:function(){null==t||t()}}))))}),Vn=n(46),Gn=n.n(Vn);var Yn=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var o=105===e.charCodeAt(1)&&64===e.charCodeAt(0);i.insertRule(e,o?0:i.cssRules.length)}catch(a){0}}else r.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();var Wn=function(e){function t(e,r,c,l,p){for(var m,f,h,b,_,w=0,O=0,E=0,k=0,S=0,L=0,F=h=m=0,D=0,R=0,B=0,I=0,z=c.length,U=z-1,H="",$="",q="",V="";D<z;){if(f=c.charCodeAt(D),D===U&&0!==O+k+E+w&&(0!==O&&(f=47===O?10:47),k=E=w=0,z++,U++),0===O+k+E+w){if(D===U&&(0<R&&(H=H.replace(d,"")),0<H.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:H+=c.charAt(D)}f=59}switch(f){case 123:for(m=(H=H.trim()).charCodeAt(0),h=1,I=++D;D<z;){switch(f=c.charCodeAt(D)){case 123:h++;break;case 125:h--;break;case 47:switch(f=c.charCodeAt(D+1)){case 42:case 47:e:{for(F=D+1;F<U;++F)switch(c.charCodeAt(F)){case 47:if(42===f&&42===c.charCodeAt(F-1)&&D+2!==F){D=F+1;break e}break;case 10:if(47===f){D=F+1;break e}}D=F}}break;case 91:f++;case 40:f++;case 34:case 39:for(;D++<U&&c.charCodeAt(D)!==f;);}if(0===h)break;D++}switch(h=c.substring(I,D),0===m&&(m=(H=H.replace(u,"").trim()).charCodeAt(0)),m){case 64:switch(0<R&&(H=H.replace(d,"")),f=H.charCodeAt(1)){case 100:case 109:case 115:case 45:R=r;break;default:R=A}if(I=(h=t(r,R,h,f,p+1)).length,0<T&&(_=s(3,h,R=n(A,H,B),r,C,j,I,f,p,l),H=R.join(""),void 0!==_&&0===(I=(h=_.trim()).length)&&(f=0,h="")),0<I)switch(f){case 115:H=H.replace(x,a);case 100:case 109:case 45:h=H+"{"+h+"}";break;case 107:h=(H=H.replace(g,"$1 $2"))+"{"+h+"}",h=1===P||2===P&&o("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=H+h,112===l&&($+=h,h="")}else h="";break;default:h=t(r,n(r,H,B),h,l,p+1)}q+=h,h=B=R=F=m=0,H="",f=c.charCodeAt(++D);break;case 125:case 59:if(1<(I=(H=(0<R?H.replace(d,""):H).trim()).length))switch(0===F&&(m=H.charCodeAt(0),45===m||96<m&&123>m)&&(I=(H=H.replace(" ",":")).length),0<T&&void 0!==(_=s(1,H,r,e,C,j,$.length,l,p,l))&&0===(I=(H=_.trim()).length)&&(H="\0\0"),m=H.charCodeAt(0),f=H.charCodeAt(1),m){case 0:break;case 64:if(105===f||99===f){V+=H+c.charAt(D);break}default:58!==H.charCodeAt(I-1)&&($+=i(H,m,f,H.charCodeAt(2)))}B=R=F=m=0,H="",f=c.charCodeAt(++D)}}switch(f){case 13:case 10:47===O?O=0:0===1+m&&107!==l&&0<H.length&&(R=1,H+="\0"),0<T*M&&s(0,H,r,e,C,j,$.length,l,p,l),j=1,C++;break;case 59:case 125:if(0===O+k+E+w){j++;break}default:switch(j++,b=c.charAt(D),f){case 9:case 32:if(0===k+w+O)switch(S){case 44:case 58:case 9:case 32:b="";break;default:32!==f&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===k+O+w&&(R=B=1,b="\f"+b);break;case 108:if(0===k+O+w+N&&0<F)switch(D-F){case 2:112===S&&58===c.charCodeAt(D-3)&&(N=S);case 8:111===L&&(N=L)}break;case 58:0===k+O+w&&(F=D);break;case 44:0===O+E+k+w&&(R=1,b+="\r");break;case 34:case 39:0===O&&(k=k===f?0:0===k?f:k);break;case 91:0===k+O+E&&w++;break;case 93:0===k+O+E&&w--;break;case 41:0===k+O+w&&E--;break;case 40:if(0===k+O+w){if(0===m)switch(2*S+3*L){case 533:break;default:m=1}E++}break;case 64:0===O+E+k+w+F+h&&(h=1);break;case 42:case 47:if(!(0<k+w+E))switch(O){case 0:switch(2*f+3*c.charCodeAt(D+1)){case 235:O=47;break;case 220:I=D,O=42}break;case 42:47===f&&42===S&&I+2!==D&&(33===c.charCodeAt(I+2)&&($+=c.substring(I,D+1)),b="",O=0)}}0===O&&(H+=b)}L=S,S=f,D++}if(0<(I=$.length)){if(R=r,0<T&&(void 0!==(_=s(2,$,R,e,C,j,I,l,p,l))&&0===($=_).length))return V+$+q;if($=R.join(",")+"{"+$+"}",0!=P*N){switch(2!==P||o($,2)||(N=0),N){case 111:$=$.replace(y,":-moz-$1")+$;break;case 112:$=$.replace(v,"::-webkit-input-$1")+$.replace(v,"::-moz-$1")+$.replace(v,":-ms-input-$1")+$}N=0}}return V+$+q}function n(e,t,n){var i=t.trim().split(h);t=i;var o=i.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=r(e,t[s],n).trim();break;default:var c=s=0;for(t=[];s<o;++s)for(var l=0;l<a;++l)t[c++]=r(e[l]+" ",i[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(b,"$1"+e.trim());case 58:return e.trim()+t.replace(b,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(b,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function i(e,t,n,r){var a=e+";",s=2*t+3*n+4*r;if(944===s){e=a.indexOf(":",9)+1;var c=a.substring(e,a.length-1).trim();return c=a.substring(0,e).trim()+c+";",1===P||2===P&&o(c,1)?"-webkit-"+c+c:c}if(0===P||2===P&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(S,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(c=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+c+a;case 1005:return m.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(c=a.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=a.replace(_,"tb");break;case 232:c=a.replace(_,"tb-rl");break;case 220:c=a.replace(_,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+c+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(c=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(c,"-webkit-"+c)+";"+a.replace(c,"-ms-"+c+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return c=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+c+"-ms-flex-"+c+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(O,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(O,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?i(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(c,"-webkit-"+c)+a.replace(c,"-moz-"+c.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),F(2!==t?r:r.replace(E,"$1"),n,t)}function a(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,i,o,a,s,c,u){for(var d,p=0,m=t;p<T;++p)switch(d=L[p].call(l,e,m,n,r,i,o,a,s,c,u)){case void 0:case!1:case!0:case null:break;default:m=d}if(m!==t)return m}function c(e){return void 0!==(e=e.prefix)&&(F=null,e?"function"!=typeof e?P=1:(P=2,F=e):P=0),c}function l(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<T){var i=s(-1,n,r,r,C,j,0,0,0,0);void 0!==i&&"string"==typeof i&&(n=i)}var o=t(A,r,n,0,0);return 0<T&&(void 0!==(i=s(-2,o,r,r,C,j,o.length,0,0,0))&&(o=i)),"",N=0,j=C=1,o}var u=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,m=/zoo|gra/,f=/([,: ])(transform)/g,h=/,\r+?/g,b=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,_=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,O=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,j=1,C=1,N=0,P=1,A=[],L=[],T=0,F=null,M=0;return l.use=function e(t){switch(t){case void 0:case null:T=L.length=0;break;default:if("function"==typeof t)L[T++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else M=0|!!t}return e},l.set=c,void 0!==e&&c(e),l},Kn=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}},Xn="/*|*/";function Zn(e){e&&Jn.current.insert(e+"}")}var Jn={current:null},Qn=function(e,t,n,r,i,o,a,s,c,l){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return Jn.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+Xn;break;case 3:switch(s){case 102:case 112:return Jn.current.insert(n[0]+t),"";default:return t+(0===l?Xn:"")}case-2:t.split("/*|*/}").forEach(Zn)}},er=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new Wn(t);var i,o={};i=e.container||document.head;var a,s=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(s,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){o[e]=!0})),e.parentNode!==i&&i.appendChild(e)})),r.use(e.stylisPlugins)(Qn),a=function(e,t,n,i){var o=t.name;Jn.current=n,r(e,t.styles),i&&(c.inserted[o]=!0)};var c={key:n,sheet:new Yn({key:n,container:i,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:o,registered:{},insert:a};return c};function tr(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var nr=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var i=t;do{e.insert("."+r,i,e.sheet,!0);i=i.next}while(void 0!==i)}};var rr=function(e){for(var t,n=e.length,r=n^n,i=0;n>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:r^=(255&e.charCodeAt(i+2))<<16;case 2:r^=(255&e.charCodeAt(i+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(i)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)},ir={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var or=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},ar=/[A-Z]|^ms/g,sr=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cr=function(e){return 45===e.charCodeAt(1)},lr=function(e){return null!=e&&"boolean"!=typeof e},ur=or((function(e){return cr(e)?e:e.replace(ar,"-$&").toLowerCase()})),dr=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(sr,(function(e,t,n){return mr={name:t,styles:n,next:mr},t}))}return 1===ir[e]||cr(e)||"number"!=typeof t||0===t?t:t+"px"};function pr(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return mr={name:n.name,styles:n.styles,next:mr},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)mr={name:i.name,styles:i.styles,next:mr},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=pr(e,t,n[i],!1);else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":lr(a)&&(r+=ur(o)+":"+dr(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=pr(e,t,a,!1);switch(o){case"animation":case"animationName":r+=ur(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var c=0;c<a.length;c++)lr(a[c])&&(r+=ur(o)+":"+dr(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=mr,a=n(e);return mr=o,pr(e,t,a,r)}break;case"string":}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var mr,fr=/label:\s*([^\s;\n{]+)\s*;/g;var hr=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";mr=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=pr(n,t,o,!1)):i+=o[0];for(var a=1;a<e.length;a++)i+=pr(n,t,e[a],46===i.charCodeAt(i.length-1)),r&&(i+=o[a]);fr.lastIndex=0;for(var s,c="";null!==(s=fr.exec(i));)c+="-"+s[1];return{name:rr(i)+c,styles:i,next:mr}};var br=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return hr(t)},gr=Object(d.createContext)("undefined"!=typeof HTMLElement?er():null),vr=Object(d.createContext)({}),yr=(gr.Provider,function(e){return Object(d.forwardRef)((function(t,n){return Object(d.createElement)(gr.Consumer,null,(function(r){return e(t,r,n)}))}))});Object.prototype.hasOwnProperty;d.Component;var _r=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var o=t[r];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=e(o);else for(var s in a="",o)o[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=o}a&&(i&&(i+=" "),i+=a)}}return i};function xr(e,t,n){var r=[],i=tr(e,r,n);return r.length<2?n:i+t(r)}yr((function(e,t){return Object(d.createElement)(vr.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=hr(n,t.registered);return nr(t,i,!1),t.key+"-"+i.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return xr(t.registered,r,_r(n))},theme:n},o=e.children(i);return!0,o}))})),n(47);function wr(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}var Or=function(e,t){return"function"==typeof t?t(e):function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wr(n,!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wr(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{},t)},Er=Kn((function(e){return Kn((function(t){return Or(e,t)}))})),kr=function(e){return Object(d.createElement)(vr.Consumer,null,(function(t){return e.theme!==t&&(t=Er(t)(e.theme)),Object(d.createElement)(vr.Provider,{value:t},e.children)}))};var Sr=Object(u.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(k.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"})),jr="#F6F7F7",Cr="#DCDCDE",Nr="#A7AAAD",Pr="#8E9196",Ar="#646970",Lr="#2C3338",Tr="#008A20",Fr="#FFF",Mr="#000",Dr={colors:{background:jr,surface:Fr,primary:"#C9356E",primaryBorder:"#700F3B",primaryOver:"#AB235A",highlight:"#006088",highlightBorder:"#002C40",highlightOver:"#004E6E",success:Tr,discount:Tr,disabledPaymentButtons:jr,disabledPaymentButtonsAccent:Cr,disabledButtons:Nr,borderColor:Nr,borderColorLight:Cr,borderColorDark:Ar,upcomingStepBackground:Cr,textColor:Lr,textColorLight:Ar,textColorDark:Mr,error:"#D63638",warningBackground:"#F7EBEC",outline:"#5198D9",applePayButtonColor:Mr,applePayButtonRollOverColor:Lr,noticeBackground:Lr,defaultNoticeIconBackground:Pr,textColorOnDarkBackground:Fr,paypalGold:"#F0C443",paypalGoldHover:"#FFB900",modalBackground:"rgba( 255,255,255,0.9 )",disabledField:jr,placeHolderTextColor:Pr},breakpoints:{desktopUp:"min-width: 960px",tabletUp:"min-width: 700px",bigPhoneUp:"min-width: 480px",smallPhoneUp:"min-width: 400px"},weights:{bold:"600",normal:"400"},fonts:{body:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif'},fontSize:{small:"14px"}},Rr=n(4),Br=n.n(Rr);function Ir(e){return e.filter((function(e){return e})).join(" ")}var zr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ur=or((function(e){return zr.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Hr=function(e){return"theme"!==e&&"innerRef"!==e},$r=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Ur:Hr};function qr(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 Vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qr(n,!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qr(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gr=function e(t,n){var r,i,o;void 0!==n&&(r=n.label,o=n.target,i=t.__emotion_forwardProp&&n.shouldForwardProp?function(e){return t.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var a=t.__emotion_real===t,s=a&&t.__emotion_base||t;"function"!=typeof i&&a&&(i=t.__emotion_forwardProp);var c=i||$r(s),l=!c("as");return function(){var u=arguments,p=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&p.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)p.push.apply(p,u);else{0,p.push(u[0][0]);for(var m=u.length,f=1;f<m;f++)p.push(u[f],u[0][f])}var h=yr((function(e,t,n){return Object(d.createElement)(vr.Consumer,null,(function(r){var a=l&&e.as||s,u="",m=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=r}"string"==typeof e.className?u=tr(t.registered,m,e.className):null!=e.className&&(u=e.className+" ");var b=hr(p.concat(m),t.registered,f);nr(t,b,"string"==typeof a);u+=t.key+"-"+b.name,void 0!==o&&(u+=" "+o);var g=l&&void 0===i?$r(a):c,v={};for(var y in e)l&&"as"===y||g(y)&&(v[y]=e[y]);return v.className=u,v.ref=n||e.innerRef,Object(d.createElement)(a,v)}))}));return h.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=s,h.__emotion_styles=p,h.__emotion_forwardProp=i,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,r){return e(t,void 0!==r?Vr({},n||{},{},r):n).apply(void 0,p)},h}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Gr[e]=Gr(e)}));var Yr=Gr,Wr=de()("composite-checkout:checkout-error-boundary"),Kr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={hasError:!1,currentError:null},n}return function(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.getDerivedStateFromError=function(e){return{currentError:e,hasError:!0}},t.prototype.componentDidCatch=function(e,t){if(this.props.onError){var n=e.message+"; Stack: "+e.stack+"; Component Stack: "+t.componentStack;Wr("reporting the error",n),this.props.onError(n)}},t.prototype.render=function(){return this.state.hasError?p.a.createElement(Xr,{errorMessage:this.props.errorMessage}):this.props.children},t}(p.a.Component);function Xr(e){var t=e.errorMessage;return p.a.createElement(ti,null,t)}var Zr,Jr,Qr,ei,ti=Yr.div(Zr||(Zr=U(["\n\tmargin: 2em;\n\ttext-align: center;\n"],["\n\tmargin: 2em;\n\ttext-align: center;\n"])));!function(e){e.LOADING="loading",e.READY="ready",e.SUBMITTING="submitting",e.VALIDATING="validating",e.COMPLETE="complete"}(Jr||(Jr={})),function(e){e.SUCCESS="SUCCESS",e.REDIRECT="REDIRECT",e.MANUAL="MANUAL"}(Qr||(Qr={})),function(e){e.NOT_STARTED="not-started",e.PENDING="pending",e.COMPLETE="complete",e.REDIRECTING="redirecting",e.ERROR="error"}(ei||(ei={}));var ni={transactionStatus:ei.NOT_STARTED,previousTransactionStatus:ei.NOT_STARTED,transactionError:null,transactionLastResponse:null,transactionRedirectUrl:null,resetTransaction:ii,setTransactionError:ii,setTransactionComplete:ii,setTransactionPending:ii,setTransactionRedirecting:ii},ri={allPaymentMethods:[],paymentMethodId:null,setPaymentMethodId:ii,showErrorMessage:ii,showInfoMessage:ii,showSuccessMessage:ii,onEvent:ii,formStatus:Jr.LOADING,setFormStatus:ii,transactionStatusManager:ni,paymentProcessors:{}};function ii(){}var oi=Object(d.createContext)(ri);de()("composite-checkout:form-status");function ai(){var e=Object(d.useContext)(oi),t=e.formStatus,n=e.setFormStatus,r=Object(d.useMemo)((function(){return{setFormLoading:function(){return n(Jr.LOADING)},setFormReady:function(){return n(Jr.READY)},setFormSubmitting:function(){return n(Jr.SUBMITTING)},setFormValidating:function(){return n(Jr.VALIDATING)},setFormComplete:function(){return n(Jr.COMPLETE)}}}),[n]);return Object(d.useMemo)((function(){return M(M({},r),{formStatus:t})}),[t,r])}Yr.div(si||(si=U(["\n\tdisplay: flex;\n\n\t@media ( "," ) {\n\t\talign-items: flex-start;\n\t\tflex-direction: row;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t}\n"],["\n\tdisplay: flex;\n\n\t@media ( "," ) {\n\t\talign-items: flex-start;\n\t\tflex-direction: row;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t}\n"])),(function(e){return e.theme.breakpoints.tabletUp})),Yr.div(ci||(ci=U(["\n\tbackground: ",";\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t\tmax-width: 556px;\n\t}\n"],["\n\tbackground: ",";\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t\tmax-width: 556px;\n\t}\n"])),(function(e){return e.theme.colors.surface}),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.colors.borderColorLight})),Yr.div(li||(li=U(["\n\tdisplay: none;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tdisplay: block;\n\t\tpadding: 24px;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid ",";\n\t\tmax-width: 328px;\n\t\tbackground: ",";\n\t\tmargin-left: 24px;\n\t}\n"],["\n\tdisplay: none;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tdisplay: block;\n\t\tpadding: 24px;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid ",";\n\t\tmax-width: 328px;\n\t\tbackground: ",";\n\t\tmargin-left: 24px;\n\t}\n"])),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.surface})),Yr.div(ui||(ui=U(["\n\tpadding: 24px;\n\tborder-top: 1px solid ",";\n\n\t:first-of-type {\n\t\tborder-top: 0;\n\t}\n"],["\n\tpadding: 24px;\n\tborder-top: 1px solid ",";\n\n\t:first-of-type {\n\t\tborder-top: 0;\n\t}\n"])),(function(e){return e.theme.colors.borderColorLight}));var si,ci,li,ui,di,pi,mi,fi,hi,bi=function(){var e=br.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(di||(di=U(["\n 0% {\n opacity: 1;\n }\n\n 70% {\n \topacity: 0.5;\n }\n\n 100% {\n opacity: 1;\n }\n"],["\n 0% {\n opacity: 1;\n }\n\n 70% {\n \topacity: 0.5;\n }\n\n 100% {\n opacity: 1;\n }\n"])));Yr.h1(pi||(pi=U(["\n\tfont-size: 14px;\n\tcontent: '';\n\tfont-weight: ",";\n\tbackground: ",";\n\tcolor: ",";\n\twidth: 40%;\n\tmargin: 3px 0 0 35px;\n\tpadding: 0;\n\tposition: relative;\n\tanimation: "," 2s ease-in-out infinite;\n\theight: 20px;\n\n\t.rtl & {\n\t\tmargin: 3px 35px 0 0;\n\t}\n\n\t::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tleft: -35px;\n\t\ttop: -3px;\n\t\twidth: 27px;\n\t\theight: 27px;\n\t\tbackground: ",";\n\t\tborder-radius: 100%;\n\n\t\t.rtl & {\n\t\t\tright: -35px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n"],["\n\tfont-size: 14px;\n\tcontent: '';\n\tfont-weight: ",";\n\tbackground: ",";\n\tcolor: ",";\n\twidth: 40%;\n\tmargin: 3px 0 0 35px;\n\tpadding: 0;\n\tposition: relative;\n\tanimation: "," 2s ease-in-out infinite;\n\theight: 20px;\n\n\t.rtl & {\n\t\tmargin: 3px 35px 0 0;\n\t}\n\n\t::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tleft: -35px;\n\t\ttop: -3px;\n\t\twidth: 27px;\n\t\theight: 27px;\n\t\tbackground: ",";\n\t\tborder-radius: 100%;\n\n\t\t.rtl & {\n\t\t\tright: -35px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n"])),(function(e){return e.theme.weights.normal}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.borderColorLight}),bi,(function(e){return e.theme.colors.borderColorLight})),Yr.p(mi||(mi=U(["\n\tfont-size: 14px;\n\theight: 16px;\n\tcontent: '';\n\tbackground: ",";\n\tcolor: ",";\n\tmargin: 8px 0 0 35px;\n\tpadding: 0;\n\tanimation: "," 2s ease-in-out infinite;\n\n\t.rtl & {\n\t\tmargin: 8px 35px 0 0;\n\t}\n"],["\n\tfont-size: 14px;\n\theight: 16px;\n\tcontent: '';\n\tbackground: ",";\n\tcolor: ",";\n\tmargin: 8px 0 0 35px;\n\tpadding: 0;\n\tanimation: "," 2s ease-in-out infinite;\n\n\t.rtl & {\n\t\tmargin: 8px 35px 0 0;\n\t}\n"])),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.borderColorLight}),bi),Yr.p(fi||(fi=U(["\n\tfont-size: 14px;\n\theight: 16px;\n\tcontent: '';\n\tbackground: ",";\n\tcolor: ",";\n\tmargin: 8px 0 0 0;\n\tpadding: 0;\n\tanimation: "," 2s ease-in-out infinite;\n"],["\n\tfont-size: 14px;\n\theight: 16px;\n\tcontent: '';\n\tbackground: ",";\n\tcolor: ",";\n\tmargin: 8px 0 0 0;\n\tpadding: 0;\n\tanimation: "," 2s ease-in-out infinite;\n"])),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.borderColorLight}),bi),Yr.div(hi||(hi=U(["\n\tbackground: ",";\n\tcontent: '';\n\tborder-top: 1px solid ",";\n\tpadding: 24px;\n\n\t::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tborder: 1px solid ",";\n\t\tborder-radius: 3px;\n\t\tfont-size: 14px;\n\t\twidth: 100%;\n\t\theight: 40px;\n\t}\n"],["\n\tbackground: ",";\n\tcontent: '';\n\tborder-top: 1px solid ",";\n\tpadding: 24px;\n\n\t::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tborder: 1px solid ",";\n\t\tborder-radius: 3px;\n\t\tfont-size: 14px;\n\t\twidth: 100%;\n\t\theight: 40px;\n\t}\n"])),(function(e){return e.theme.colors.background}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.borderColorLight}));ei.NOT_STARTED,ei.NOT_STARTED;var gi=de()("composite-checkout:payment-methods");function vi(){var e=Object(d.useContext)(oi),t=e.paymentMethodId,n=e.setPaymentMethodId,r=yi();if(!n)throw new Error("usePaymentMethod can only be used inside a CheckoutProvider");if(!t)return null;var i=r.find((function(e){return e.id===t}));return i||(gi("No payment method found matching id '"+t+"' in",r),null)}function yi(){var e=Object(d.useContext)(oi).allPaymentMethods;if(!e)throw new Error("useAllPaymentMethods cannot be used outside of CheckoutProvider");return e}de()("composite-checkout:checkout-submit-button");var _i,xi=Yr("button")(_i||(_i=U(["\n\tdisplay: block;\n\twidth: ",";\n\tfont-size: 16px;\n\tborder-radius: ",";\n\tpadding: ",";\n\tborder: ",";\n\tbackground: ",";\n\tcolor: ",";\n\tfont-weight: ",";\n\ttext-decoration: ",";\n\n\t:hover {\n\t\tbackground: ",";\n\t\tborder-color: ",";\n\t\ttext-decoration: none;\n\t\tcolor: ",";\n\t\tcursor: ",";\n\t}\n\n\t:active {\n\t\tbackground: ",";\n\t\ttext-decoration: ",";\n\t\tcolor: ",";\n\t}\n\n\tsvg {\n\t\tmargin-bottom: -1px;\n\t\ttransform: translateY( 2px );\n\t\tfilter: ",";\n\t\topacity: ",";\n\t}\n\n\t&.is-busy {\n\t\tanimation: components-button__busy-animation 2500ms infinite linear;\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t"," 28%,\n\t\t\t"," 28%,\n\t\t\t"," 72%,\n\t\t\t"," 72%\n\t\t);\n\t\tbackground-size: 200px 100%;\n\t\topacity: 1;\n\t}\n\n\t@keyframes components-button__busy-animation {\n\t\t0% {\n\t\t\tbackground-position: 200px 0;\n\t\t}\n\t}\n"],["\n\tdisplay: block;\n\twidth: ",";\n\tfont-size: 16px;\n\tborder-radius: ",";\n\tpadding: ",";\n\tborder: ",";\n\tbackground: ",";\n\tcolor: ",";\n\tfont-weight: ",";\n\ttext-decoration: ",";\n\n\t:hover {\n\t\tbackground: ",";\n\t\tborder-color: ",";\n\t\ttext-decoration: none;\n\t\tcolor: ",";\n\t\tcursor: ",";\n\t}\n\n\t:active {\n\t\tbackground: ",";\n\t\ttext-decoration: ",";\n\t\tcolor: ",";\n\t}\n\n\tsvg {\n\t\tmargin-bottom: -1px;\n\t\ttransform: translateY( 2px );\n\t\tfilter: ",";\n\t\topacity: ",";\n\t}\n\n\t&.is-busy {\n\t\tanimation: components-button__busy-animation 2500ms infinite linear;\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t"," 28%,\n\t\t\t"," 28%,\n\t\t\t"," 72%,\n\t\t\t"," 72%\n\t\t);\n\t\tbackground-size: 200px 100%;\n\t\topacity: 1;\n\t}\n\n\t@keyframes components-button__busy-animation {\n\t\t0% {\n\t\t\tbackground-position: 200px 0;\n\t\t}\n\t}\n"])),(function(e){return e.fullWidth?"100%":"auto"}),(function(e){return"paypal"===e.buttonType?"50px":"2px"}),(function(e){return"text-button"===e.buttonType?"0":"10px 15px"}),(function(e){return!e.buttonType||e.disabled?"1px solid "+e.theme.colors.borderColor:"0"}),ki,Ei,(function(e){var t=e.disabled,n=e.buttonType,r=e.theme;if(t||"text-button"===n)return r.weights.normal;return r.weights.bold}),ji,Oi,(function(e){return e.buttonType?"inherit":e.theme.colors.borderColorDark}),Ei,(function(e){return e.disabled?"not-allowed":"pointer"}),Oi,ji,Ei,(function(e){var t=e.buttonType;return"grayscale( "+("primary"===t||"paypal"===t?"0":"100")+" ) invert( 0 );"}),(function(e){var t=e.buttonType;return"primary"===t||"paypal"===t?"1":"0.5"}),ki,Si,Si,ki),wi=function(e){var t=e.className,n=e.buttonType,r=e.isBusy,i=e.children,o=e.fullWidth,a=D(e,["className","buttonType","isBusy","children","fullWidth"]),s=Ir(z(["checkout-button"],n?["is-status-"+n]:[],r?["is-busy"]:[],t?[t]:[]));return p.a.createElement(xi,M({fullWidth:o,buttonType:n,className:s},a),i)};function Oi(e){var t=e.disabled,n=e.buttonType,r=e.theme.colors;if(t)return r.disabledPaymentButtons;switch(n){case"paypal":return r.paypalGoldHover;case"primary":return r.primaryOver;case"secondary":return r.highlightOver;case"text-button":case"borderless":default:return"none"}}function Ei(e){var t=e.disabled,n=e.buttonType,r=e.theme.colors;if(t)return r.disabledButtons;switch(n){case"primary":case"secondary":return r.surface;case"text-button":return r.highlight;default:return r.textColor}}function ki(e){var t=e.disabled,n=e.buttonType,r=e.theme.colors;if(t)return r.disabledPaymentButtons;switch(n){case"paypal":return r.paypalGold;case"primary":return r.primary;case"secondary":return r.highlight;default:return"none"}}function Si(e){var t=e.disabled,n=e.buttonType,r=e.theme.colors;if(t)return r.disabledPaymentButtonsAccent;switch(n){case"paypal":return r.paypalGoldHover;case"primary":return r.primaryOver;case"secondary":return r.highlightOver;case"text-button":case"borderless":default:return"none"}}function ji(e){return"text-button"===e.buttonType?"underline":"none"}function Ci(e){var t=e.className,n=e.id;return p.a.createElement(Pi,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:t},p.a.createElement("mask",{id:n+"-check-icon-mask","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"4",width:"16",height:"12"},p.a.createElement("path",{d:"M7.32916 13.2292L3.85416 9.75417L2.67083 10.9292L7.32916 15.5875L17.3292 5.58751L16.1542 4.41251L7.32916 13.2292Z"})),p.a.createElement("g",{mask:"url(#"+n+"-check-icon-mask)"},p.a.createElement("rect",{width:"20",height:"20"})))}Ci.propTypes={className:Br.a.string,id:Br.a.string};var Ni,Pi=Yr.svg(Ni||(Ni=U(["\n\tfill: #fff;\n"],["\n\tfill: #fff;\n"])));var Ai=function(e){var t=e.value,n=e.onClick,r=e.ariaLabel,i=D(e,["value","onClick","ariaLabel"]);return p.a.createElement(wi,M({onClick:n,buttonType:"primary","aria-label":r},i),t)},Li=Object(d.createContext)({items:[],total:{id:"title",type:"total",label:"Total",amount:{currency:"USD",value:0,displayValue:"0"}}});function Ti(){var e=Object(d.useContext)(Li),t=e.items,n=e.total;if(!t||!n)throw new Error("useLineItems can only be used inside a CheckoutProvider");return[t,n]}Yr.ul(Fi||(Fi=U(["\n\tmargin: 0;\n\tpadding: 0;\n"],["\n\tmargin: 0;\n\tpadding: 0;\n"]))),Yr.li(Mi||(Mi=U(["\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style-type: none;\n"],["\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style-type: none;\n"])));Yr.span(Di||(Di=U(["\n\tdisplay: flex;\n\tjustify-content: space-between;\n"],["\n\tdisplay: flex;\n\tjustify-content: space-between;\n"]))),Yr.span(Ri||(Ri=U(["\n\tfont-weight: ",";\n"],["\n\tfont-weight: ",";\n"])),(function(e){return e.theme.weights.bold}));Yr.div(Bi||(Bi=U(["\n\tcolor: ",";\n\tfont-weight: ",";\n\tpadding: 24px 20px;\n"],["\n\tcolor: ",";\n\tfont-weight: ",";\n\tpadding: 24px 20px;\n"])),(function(e){return e.theme.colors.textColor}),(function(e){return e.theme.weights.bold})),Yr.div(Ii||(Ii=U(["\n\tborder-top: 1px solid ",";\n\tpadding: 24px 20px;\n"],["\n\tborder-top: 1px solid ",";\n\tpadding: 24px 20px;\n"])),(function(e){return e.theme.colors.borderColorLight}));var Fi,Mi,Di,Ri,Bi,Ii,zi,Ui,Hi=Yr.div(zi||(zi=U(["\n\tdisplay: flex;\n\tjustify-content: space-between;\n"],["\n\tdisplay: flex;\n\tjustify-content: space-between;\n"])));Yr(Hi)(Ui||(Ui=U(["\n\tfont-weight: ",";\n"],["\n\tfont-weight: ",";\n"])),(function(e){return e.theme.weights.bold}));function $i(e){var t=e.children,n=e.className;return p.a.createElement(qi,{className:Ir([n,"order-review-section"])},t)}$i.propTypes={className:Br.a.string};var qi=Yr.div(Gi||(Gi=U(["\n\tmargin-bottom: 16px;\n"],["\n\tmargin-bottom: 16px;\n"])));function Vi(e){var t=e.item,n=e.className,r="checkout-line-item-"+t.id;return p.a.createElement("div",{className:Ir([n,"checkout-line-item"])},p.a.createElement("span",{id:r},t.label),p.a.createElement("span",{"aria-labelledby":r},t.amount.displayValue))}Vi.propTypes={className:Br.a.string,total:Br.a.bool,isSummaryVisible:Br.a.bool,item:Br.a.shape({label:Br.a.string,amount:Br.a.shape({displayValue:Br.a.string})})};var Gi,Yi,Wi=Yr(Vi)(Yi||(Yi=U(["\n\tdisplay: flex;\n\twidth: 100%;\n\tjustify-content: space-between;\n\tfont-weight: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tpadding: ",";\n\tborder-bottom: ",";\n\n\t:first-of-type {\n\t\tpadding-top: 0;\n\t}\n"],["\n\tdisplay: flex;\n\twidth: 100%;\n\tjustify-content: space-between;\n\tfont-weight: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tpadding: ",";\n\tborder-bottom: ",";\n\n\t:first-of-type {\n\t\tpadding-top: 0;\n\t}\n"])),(function(e){var t=e.theme;return e.total?t.weights.bold:t.weights.normal}),(function(e){var t=e.theme;return e.total?t.colors.textColorDark:"inherit"}),(function(e){return e.total?"1.2em":"1em"}),(function(e){var t=e.total;return e.isSummaryVisible||t?0:"24px 0"}),(function(e){var t=e.theme,n=e.total;return e.isSummaryVisible||n?0:"1px solid "+t.colors.borderColorLight}));function Ki(e){var t=e.total,n=e.className;return p.a.createElement("div",{className:Ir([n,"order-review-total"])},p.a.createElement(Wi,{total:!0,item:t}))}function Xi(e){var t=e.items,n=e.className,r=e.isSummaryVisible;return p.a.createElement("div",{className:Ir([n,"order-review-line-items"])},t.map((function(e){return p.a.createElement(Wi,{isSummaryVisible:r,key:e.id,item:e})})))}function Zi(e){var t=e.className,n=Ti(),r=n[0],i=n[1];return p.a.createElement("div",{className:Ir([t,"checkout-review-order"])},p.a.createElement($i,null,p.a.createElement(Xi,{items:r})),p.a.createElement($i,null,p.a.createElement(Ki,{total:i})))}function Ji(e){var t=e.checked,n=e.name,r=e.value,i=e.onChange,o=e.children,a=e.label,s=e.disabled,c=e.id,l=e.ariaLabel,u=Object(d.useState)(!1),m=u[0],f=u[1];return p.a.createElement(Qi,{disabled:s,isFocused:m,checked:t},p.a.createElement(eo,{type:"radio",name:n,id:c,disabled:s,value:r,checked:t,onChange:i,onFocus:function(){f(!0)},onBlur:function(){f(!1)},readOnly:!i,"aria-label":l}),p.a.createElement(to,{checked:t,htmlFor:c,disabled:s},a),o&&p.a.createElement(ao,{checked:t},o))}Xi.propTypes={className:Br.a.string,isSummaryVisible:Br.a.bool,items:Br.a.arrayOf(Br.a.shape({label:Br.a.string,amount:Br.a.shape({displayValue:Br.a.string})}))},Zi.propTypes={className:Br.a.string},Ji.propTypes={name:Br.a.string.isRequired,id:Br.a.string.isRequired,label:Br.a.node.isRequired,disabled:Br.a.bool,checked:Br.a.bool,value:Br.a.string.isRequired,onChange:Br.a.func,ariaLabel:Br.a.string.isRequired};var Qi=Yr.div(no||(no=U(["\n\tposition: relative;\n\tmargin-top: 8px;\n\tborder-radius: 3px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\toutline: ",";\n\n\t:first-of-type {\n\t\tmargin: 0;\n\t}\n\n\t::before {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tcontent: '';\n\t\tborder: "," solid ",";\n\t\tborder-radius: 3px;\n\t\tbox-sizing: border-box;\n\n\t\t.rtl & {\n\t\t\tright: 0;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t:hover::before {\n\t\tborder: 3px solid ",";\n\t}\n\n\t.payment-logos {\n\t\tdisplay: none;\n\n\t\t@media ( "," ) {\n\t\t\tdisplay: block;\n\t\t\tfilter: grayscale( "," );\n\t\t}\n\t}\n\n\t:hover .payment-logos {\n\t\t@media ( "," ) {\n\t\t\tfilter: grayscale( 0 );\n\t\t}\n\t}\n\n\tsvg {\n\t\tfilter: grayscale( "," );\n\t}\n\n\t:hover svg {\n\t\tfilter: grayscale( 0 );\n\t}\n\n\t",";\n"],["\n\tposition: relative;\n\tmargin-top: 8px;\n\tborder-radius: 3px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\toutline: ",";\n\n\t:first-of-type {\n\t\tmargin: 0;\n\t}\n\n\t::before {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tcontent: '';\n\t\tborder: "," solid ",";\n\t\tborder-radius: 3px;\n\t\tbox-sizing: border-box;\n\n\t\t.rtl & {\n\t\t\tright: 0;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t:hover::before {\n\t\tborder: 3px solid ",";\n\t}\n\n\t.payment-logos {\n\t\tdisplay: none;\n\n\t\t@media ( "," ) {\n\t\t\tdisplay: block;\n\t\t\tfilter: grayscale( "," );\n\t\t}\n\t}\n\n\t:hover .payment-logos {\n\t\t@media ( "," ) {\n\t\t\tfilter: grayscale( 0 );\n\t\t}\n\t}\n\n\tsvg {\n\t\tfilter: grayscale( "," );\n\t}\n\n\t:hover svg {\n\t\tfilter: grayscale( 0 );\n\t}\n\n\t",";\n"])),(function(e){var t=e.isFocused,n=e.theme;if(t)return n.colors.outline+" solid 2px";return"0"}),(function(e){return e.checked?"3px":"1px"}),(function(e){var t=e.checked,n=e.theme;return t?n.colors.highlight:n.colors.borderColor}),(function(e){return e.theme.colors.highlight}),(function(e){return e.theme.breakpoints.smallPhoneUp}),so,(function(e){return e.theme.breakpoints.smallPhoneUp}),so,(function(e){if(!e.disabled)return null;return"\n\t\t::before,\n\t\t:hover::before {\n\t\t\tborder: 1px solid lightgray;\n\t\t}\n\n\t\tsvg,\n\t\t:hover svg {\n\t\t\tfilter: grayscale( 100% );\n\t\t\topacity: 50%;\n\t\t}\n\t"}));var eo=Yr.input(ro||(ro=U(["\n\tposition: absolute;\n\topacity: 0 !important;\n\n\tclear: none;\n\tcursor: pointer;\n\tdisplay: inline-block;\n\tline-height: 0;\n\theight: 16px;\n\tmargin: 2px 0 0;\n\tfloat: left;\n\toutline: 0;\n\tpadding: 0;\n\ttext-align: center;\n\tvertical-align: middle;\n\twidth: 16px;\n\tmin-width: 16px;\n\tappearance: none;\n"],["\n\tposition: absolute;\n\topacity: 0 !important;\n\n\tclear: none;\n\tcursor: pointer;\n\tdisplay: inline-block;\n\tline-height: 0;\n\theight: 16px;\n\tmargin: 2px 0 0;\n\tfloat: left;\n\toutline: 0;\n\tpadding: 0;\n\ttext-align: center;\n\tvertical-align: middle;\n\twidth: 16px;\n\tmin-width: 16px;\n\tappearance: none;\n"]))),to=Yr.label(io||(io=U(["\n\tposition: relative;\n\tpadding: 16px 14px 16px 40px;\n\tborder-radius: 3px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: space-between;\n\talign-items: flex-start;\n\tfont-size: 14px;\n\n\t.rtl & {\n\t\tpadding: 16px 40px 16px 14px;\n\t}\n\n\t:hover {\n\t\tcursor: pointer;\n\t}\n\n\t::before {\n\t\tdisplay: block;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tcontent: '';\n\t\tborder: 1px solid ",";\n\t\tborder-radius: 100%;\n\t\ttop: 19px;\n\t\tleft: 16px;\n\t\tposition: absolute;\n\t\tbackground: ",";\n\t\tbox-sizing: border-box;\n\t\tz-index: 2;\n\n\t\t.rtl & {\n\t\t\tright: 16px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t::after {\n\t\tdisplay: block;\n\t\twidth: 8px;\n\t\theight: 8px;\n\t\tcontent: '';\n\t\tborder-radius: 100%;\n\t\ttop: 23px;\n\t\tleft: 20px;\n\t\tposition: absolute;\n\t\tbackground: ",";\n\t\tbox-sizing: border-box;\n\t\tz-index: 3;\n\n\t\t.rtl & {\n\t\t\tright: 20px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t",";\n"],["\n\tposition: relative;\n\tpadding: 16px 14px 16px 40px;\n\tborder-radius: 3px;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: space-between;\n\talign-items: flex-start;\n\tfont-size: 14px;\n\n\t.rtl & {\n\t\tpadding: 16px 40px 16px 14px;\n\t}\n\n\t:hover {\n\t\tcursor: pointer;\n\t}\n\n\t::before {\n\t\tdisplay: block;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tcontent: '';\n\t\tborder: 1px solid ",";\n\t\tborder-radius: 100%;\n\t\ttop: 19px;\n\t\tleft: 16px;\n\t\tposition: absolute;\n\t\tbackground: ",";\n\t\tbox-sizing: border-box;\n\t\tz-index: 2;\n\n\t\t.rtl & {\n\t\t\tright: 16px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t::after {\n\t\tdisplay: block;\n\t\twidth: 8px;\n\t\theight: 8px;\n\t\tcontent: '';\n\t\tborder-radius: 100%;\n\t\ttop: 23px;\n\t\tleft: 20px;\n\t\tposition: absolute;\n\t\tbackground: ",";\n\t\tbox-sizing: border-box;\n\t\tz-index: 3;\n\n\t\t.rtl & {\n\t\t\tright: 20px;\n\t\t\tleft: auto;\n\t\t}\n\t}\n\n\t",";\n"])),(function(e){return e.theme.colors.borderColor}),(function(e){return e.theme.colors.surface}),(function(e){var t=e.checked,n=e.theme;return t?n.colors.highlight:n.colors.surface}),(function(e){if(!e.disabled)return null;return"\n\t\tcolor: lightgray;\n\t\tfont-style: italic;\n\n\t\t:hover {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t::before {\n\t\t\tborder: 1px solid lightgray;\n\t\t\tbackground: lightgray;\n\t\t}\n\n\t\t::after {\n\t\t\tbackground: white;\n\t\t}\n\n\t\tspan {\n\t\t\tcolor: lightgray;\n\t\t}\n\t"}));var no,ro,io,oo,ao=Yr.div(oo||(oo=U(["\n\tdisplay: ",";\n"],["\n\tdisplay: ",";\n"])),(function(e){return e.checked?"block":"none"}));function so(e){return e.checked?0:"100%"}function co(){var e=Object(d.useContext)(oi).onEvent;if(!e)throw new Error("useEvents can only be used inside a CheckoutProvider");return e}var lo=de()("composite-checkout:checkout-payment-methods");function uo(e){var t=e.summary,n=e.isComplete,r=e.className,i=q().__,o=co(),a=Object(d.useCallback)((function(e){return o({type:"PAYMENT_METHOD_LOAD_ERROR",payload:e})}),[o]),s=vi(),c=function(){var e=Object(d.useContext)(oi),t=e.paymentMethodId,n=e.setPaymentMethodId;if(!n)throw new Error("usePaymentMethodId can only be used inside a CheckoutProvider");return[t,n]}()[1],l=function(e){lo("setting payment method to",e),o({type:"PAYMENT_METHOD_SELECT",payload:e}),c(e)},u=yi();return t&&n&&s?(lo("rendering selected paymentMethod",s),p.a.createElement("div",{className:Ir([r,"checkout-payment-methods"])},p.a.createElement(Kr,{errorMessage:i("There was a problem with this payment method."),onError:a},p.a.createElement(po,{id:s.id,label:s.label,activeContent:s.activeContent,inactiveContent:s.inactiveContent,checked:!0,summary:!0,ariaLabel:s.getAriaLabel(i)})))):t?(lo("summary requested, but no complete paymentMethod is selected; isComplete:",n,"paymentMethod:",s),null):(lo("rendering paymentMethods",u),p.a.createElement("div",{className:Ir([r,"checkout-payment-methods"])},p.a.createElement(fo,null,u.map((function(e){return p.a.createElement(Kr,{key:e.id,errorMessage:Object(y.sprintf)(i("There was a problem with the payment method: %s"),e.id),onError:a},p.a.createElement(po,{id:e.id,label:e.label,activeContent:e.activeContent,inactiveContent:e.inactiveContent,checked:(null==s?void 0:s.id)===e.id,onClick:l,ariaLabel:e.getAriaLabel(i)}))})))))}function po(e){var t=e.id,n=e.label,r=e.activeContent,i=e.inactiveContent,o=e.checked,a=e.onClick,s=e.ariaLabel,c=e.summary,l=ai().formStatus;return c?p.a.createElement(p.a.Fragment,null,i&&i):p.a.createElement(Ji,{name:"paymentMethod",value:t,id:t,checked:o,disabled:l!==Jr.READY,onChange:a?function(){return a(t)}:void 0,ariaLabel:s,label:n},r&&r)}uo.propTypes={summary:Br.a.bool,isComplete:Br.a.bool.isRequired,className:Br.a.string},po.propTypes={id:Br.a.string.isRequired,onClick:Br.a.func,checked:Br.a.bool.isRequired,ariaLabel:Br.a.string.isRequired,activeContent:Br.a.node,label:Br.a.node,inactiveContent:Br.a.node,summary:Br.a.bool};var mo,fo=Yr.div(mo||(mo=U(["\n\tmargin-bottom: 16px;\n"],["\n\tmargin-bottom: 16px;\n"])));de()("composite-checkout:checkout");var ho=function(e){var t=e.children,n=e.className;return p.a.createElement(yo,{className:Ir([n,"checkout__summary-area"])},t)},bo=Yr.div(Lo||(Lo=U(["\n\tbackground: ",";\n\tborder-bottom: 1px solid ",";\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t\tborder-bottom: none 0;\n\t}\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t}\n"],["\n\tbackground: ",";\n\tborder-bottom: 1px solid ",";\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t\tborder-bottom: none 0;\n\t}\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t}\n"])),(function(e){return e.theme.colors.surface}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.breakpoints.smallPhoneUp}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.breakpoints.desktopUp}),(function(e){return e.theme.colors.borderColorLight}));function go(e){var t=e.errorMessage,n=e.editButtonText,r=e.editButtonAriaLabel,i=e.nextStepButtonText,o=e.validatingButtonText,a=e.nextStepButtonAriaLabel,s=e.validatingButtonAriaLabel,c=e.isStepActive,l=e.isStepComplete,u=e.className,d=e.stepNumber,m=e.stepId,f=e.titleContent,h=e.goToThisStep,b=e.goToNextStep,g=e.activeStepContent,v=e.formStatus,y=e.completeStepContent,_=e.onError,x=q().__;return p.a.createElement(Kr,{errorMessage:t||x("There was an error with this step."),onError:_},p.a.createElement(wo,{className:u},p.a.createElement(Oo,{id:m,stepNumber:d,title:f,isActive:c,isComplete:l,onEdit:v===Jr.READY&&l&&h&&!c?h:void 0,editButtonText:n||x("Edit"),editButtonAriaLabel:r||x("Edit this step")}),p.a.createElement(Wo,{isVisible:c,className:"checkout-steps__step-content"},g,b&&c&&p.a.createElement(Ai,{onClick:b,value:v===Jr.VALIDATING?o||x("Please wait…"):i||x("Continue"),ariaLabel:v===Jr.VALIDATING?s||x("Please wait…"):a||x("Continue to next step"),buttonType:"primary",disabled:v!==Jr.READY,isBusy:v===Jr.VALIDATING})),l&&y?p.a.createElement(Ko,{isVisible:!c,className:"checkout-steps__step-complete-content"},y):null))}go.propTypes={errorMessage:Br.a.string,onError:Br.a.func,editButtonAriaLabel:Br.a.string,editButtonText:Br.a.string,nextStepButtonText:Br.a.string,nextStepButtonAriaLabel:Br.a.string,isStepActive:Br.a.bool.isRequired,isStepComplete:Br.a.bool.isRequired,className:Br.a.string,stepNumber:Br.a.number,stepId:Br.a.string.isRequired,titleContent:Br.a.node.isRequired,goToThisStep:Br.a.func,goToNextStep:Br.a.func,activeStepContent:Br.a.node,formStatus:Br.a.string,completeStepContent:Br.a.node,validatingButtonText:Br.a.string,validatingButtonAriaLabel:Br.a.string};Yr.div(To||(To=U(["\n\t*:focus {\n\t\toutline: "," solid 2px;\n\t}\n"],["\n\t*:focus {\n\t\toutline: "," solid 2px;\n\t}\n"])),(function(e){return e.theme.colors.outline}));var vo=Yr.div(Fo||(Fo=U(["\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tmargin: 0 auto 32px;\n\t}\n\n\t@media ( "," ) {\n\t\talign-items: flex-start;\n\t\tflex-direction: row;\n\t\tjustify-content: center;\n\t\tmax-width: none;\n\t}\n"],["\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tmargin: 0 auto 32px;\n\t}\n\n\t@media ( "," ) {\n\t\talign-items: flex-start;\n\t\tflex-direction: row;\n\t\tjustify-content: center;\n\t\tmax-width: none;\n\t}\n"])),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.breakpoints.desktopUp})),yo=Yr.div(Mo||(Mo=U(["\n\tbox-sizing: border-box;\n\tmargin: 0 auto;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tmax-width: 556px;\n\t}\n\n\t@media ( "," ) {\n\t\tmargin-right: 0;\n\t\tmargin-left: 24px;\n\t\torder: 2;\n\t\twidth: 328px;\n\n\t\t.rtl & {\n\t\t\tmargin-right: 24px;\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n"],["\n\tbox-sizing: border-box;\n\tmargin: 0 auto;\n\twidth: 100%;\n\n\t@media ( "," ) {\n\t\tmax-width: 556px;\n\t}\n\n\t@media ( "," ) {\n\t\tmargin-right: 0;\n\t\tmargin-left: 24px;\n\t\torder: 2;\n\t\twidth: 328px;\n\n\t\t.rtl & {\n\t\t\tmargin-right: 24px;\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n"])),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.breakpoints.desktopUp})),_o=Yr.div(Do||(Do=U(["\n\tbackground: ",";\n\tbox-sizing: border-box;\n\tmargin: 0 auto;\n\twidth: 100%;\n\n\t&.checkout__step-wrapper--last-step {\n\t\tmargin-bottom: 100px;\n\t}\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t}\n\n\t@media ( "," ) {\n\t\tmax-width: 556px;\n\t}\n\n\t@media ( "," ) {\n\t\tmargin: 0;\n\t\torder: 1;\n\t\twidth: 556px;\n\t}\n"],["\n\tbackground: ",";\n\tbox-sizing: border-box;\n\tmargin: 0 auto;\n\twidth: 100%;\n\n\t&.checkout__step-wrapper--last-step {\n\t\tmargin-bottom: 100px;\n\t}\n\n\t@media ( "," ) {\n\t\tborder: 1px solid ",";\n\t}\n\n\t@media ( "," ) {\n\t\tmax-width: 556px;\n\t}\n\n\t@media ( "," ) {\n\t\tmargin: 0;\n\t\torder: 1;\n\t\twidth: 556px;\n\t}\n"])),(function(e){return e.theme.colors.surface}),(function(e){return e.theme.breakpoints.smallPhoneUp}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.breakpoints.tabletUp}),(function(e){return e.theme.breakpoints.desktopUp})),xo=Yr.div(Ro||(Ro=U(["\n\tbackground: ",";\n\tpadding: 24px;\n\tbottom: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tz-index: 10;\n\tborder-top-width: 0;\n\tborder-top-style: solid;\n\tborder-top-color: ",";\n\n\t.checkout__step-wrapper--last-step & {\n\t\tborder-top-width: 1px;\n\t\tposition: fixed;\n\t}\n\n\t.rtl & {\n\t\tright: 0;\n\t\tleft: auto;\n\t}\n\n\t.checkout-button {\n\t\twidth: 100%;\n\n\t\t.checkout__step-wrapper--last-step & {\n\t\t\twidth: calc( 100% - 60px );\n\t\t}\n\t}\n\n\t@media ( "," ) {\n\t\t.checkout__step-wrapper--last-step & {\n\t\t\tposition: relative;\n\t\t\tborder: 0;\n\n\t\t\t.checkout-button {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n"],["\n\tbackground: ",";\n\tpadding: 24px;\n\tbottom: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tz-index: 10;\n\tborder-top-width: 0;\n\tborder-top-style: solid;\n\tborder-top-color: ",";\n\n\t.checkout__step-wrapper--last-step & {\n\t\tborder-top-width: 1px;\n\t\tposition: fixed;\n\t}\n\n\t.rtl & {\n\t\tright: 0;\n\t\tleft: auto;\n\t}\n\n\t.checkout-button {\n\t\twidth: 100%;\n\n\t\t.checkout__step-wrapper--last-step & {\n\t\t\twidth: calc( 100% - 60px );\n\t\t}\n\t}\n\n\t@media ( "," ) {\n\t\t.checkout__step-wrapper--last-step & {\n\t\t\tposition: relative;\n\t\t\tborder: 0;\n\n\t\t\t.checkout-button {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n"])),(function(e){return e.theme.colors.background}),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.breakpoints.tabletUp}));var wo=Yr.div(Bo||(Bo=U(["\n\tposition: relative;\n\tborder-bottom: 1px solid ",";\n\tpadding: 16px;\n\n\t&.checkout-step {\n\t\tbackground: ",";\n\t}\n\n\t&.checkout-step.is-active,\n\t&.checkout-step.is-complete {\n\t\tbackground: ",";\n\t}\n\n\t@media ( "," ) {\n\t\tpadding: 24px;\n\t}\n"],["\n\tposition: relative;\n\tborder-bottom: 1px solid ",";\n\tpadding: 16px;\n\n\t&.checkout-step {\n\t\tbackground: ",";\n\t}\n\n\t&.checkout-step.is-active,\n\t&.checkout-step.is-complete {\n\t\tbackground: ",";\n\t}\n\n\t@media ( "," ) {\n\t\tpadding: 24px;\n\t}\n"])),(function(e){return e.theme.colors.borderColorLight}),(function(e){return e.theme.colors.background}),(function(e){return e.theme.colors.surface}),(function(e){return e.theme.breakpoints.tabletUp}));function Oo(e){var t=e.id,n=e.className,r=e.stepNumber,i=e.title,o=e.isActive,a=e.isComplete,s=e.onEdit,c=e.editButtonText,l=e.editButtonAriaLabel,u=q().__,d=!!s;return p.a.createElement(So,{isComplete:a,isActive:o,className:Ir([n,"checkout-step__header"])},p.a.createElement(Eo,{isComplete:a,isActive:o,id:t},r||null),p.a.createElement(ko,{fullWidth:!d,isActive:o},i),d&&p.a.createElement(Ao,{className:"checkout-step__edit-button",buttonType:"text-button",onClick:s,"aria-label":l||u("Edit this step")},c||u("Edit")))}function Eo(e){var t=e.isComplete,n=e.isActive,r=e.className,i=e.children,o=e.id,a=!n&&t;return p.a.createElement(jo,{className:Ir([r,"checkout-step__stepper"])},p.a.createElement(Co,{isComplete:a},p.a.createElement(No,{isComplete:a,isActive:n},i),p.a.createElement(Po,null,p.a.createElement(Ci,{id:o}))))}Oo.propTypes={id:Br.a.string,className:Br.a.string,stepNumber:Br.a.number,title:Br.a.node.isRequired,isActive:Br.a.bool,isComplete:Br.a.bool,editButtonText:Br.a.string,editButtonAriaLabel:Br.a.string,onEdit:Br.a.func},Eo.propTypes={id:Br.a.string,className:Br.a.string,isComplete:Br.a.bool,isActive:Br.a.bool};var ko=Yr.span(Io||(Io=U(["\n\tcolor: ",";\n\tfont-weight: ",";\n\tmargin-right: ",";\n\tflex: ",";\n\n\t.rtl & {\n\t\tmargin-right: 0;\n\t\tmargin-left: ",";\n\t}\n"],["\n\tcolor: ",";\n\tfont-weight: ",";\n\tmargin-right: ",";\n\tflex: ",";\n\n\t.rtl & {\n\t\tmargin-right: 0;\n\t\tmargin-left: ",";\n\t}\n"])),(function(e){return e.isActive?e.theme.colors.textColorDark:e.theme.colors.textColor}),(function(e){return e.isActive?e.theme.weights.bold:e.theme.weights.normal}),(function(e){return e.fullWidth?"0":"8px"}),(function(e){return e.fullWidth?"1":"inherit"}),(function(e){return e.fullWidth?"0":"8px"})),So=Yr.h2(zo||(zo=U(["\n\tfont-size: 16px;\n\tdisplay: flex;\n\twidth: 100%;\n\talign-items: center;\n\tmargin: 0 0 ",";\n"],["\n\tfont-size: 16px;\n\tdisplay: flex;\n\twidth: 100%;\n\talign-items: center;\n\tmargin: 0 0 ",";\n"])),(function(e){return e.isComplete||e.isActive?"8px":"0"})),jo=Yr.div(Uo||(Uo=U(["\n\tposition: relative;\n\twidth: 27px;\n\theight: 27px;\n\tmargin-right: 8px;\n\n\t.rtl & {\n\t\tmargin-right: 0;\n\t\tmargin-left: 8px;\n\t}\n"],["\n\tposition: relative;\n\twidth: 27px;\n\theight: 27px;\n\tmargin-right: 8px;\n\n\t.rtl & {\n\t\tmargin-right: 0;\n\t\tmargin-left: 8px;\n\t}\n"]))),Co=Yr.div(Ho||(Ho=U(["\n\tposition: relative;\n\ttransform-origin: center center;\n\ttransition: transform 0.3s 0.1s ease-out;\n\ttransform-style: preserve-3d;\n\ttransform: ",";\n"],["\n\tposition: relative;\n\ttransform-origin: center center;\n\ttransition: transform 0.3s 0.1s ease-out;\n\ttransform-style: preserve-3d;\n\ttransform: ",";\n"])),(function(e){return e.isComplete?"rotateY(180deg)":"rotateY(0)"})),No=Yr.div($o||($o=U(["\n\tbackground: ",";\n\tfont-weight: normal;\n\twidth: 27px;\n\theight: 27px;\n\tline-height: 27px;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tborder-radius: 50%;\n\tcolor: ",";\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbackface-visibility: hidden;\n\n\t.rtl & {\n\t\tright: 0;\n\t\tleft: auto;\n\t}\n\n\t// Reason: The IE media query needs to not have spaces within brackets otherwise ie11 doesn't read them\n\t// prettier-ignore\n\t@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) {\n\t\tz-index: ",";\n\t}\n"],["\n\tbackground: ",";\n\tfont-weight: normal;\n\twidth: 27px;\n\theight: 27px;\n\tline-height: 27px;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tborder-radius: 50%;\n\tcolor: ",";\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbackface-visibility: hidden;\n\n\t.rtl & {\n\t\tright: 0;\n\t\tleft: auto;\n\t}\n\n\t// Reason: The IE media query needs to not have spaces within brackets otherwise ie11 doesn't read them\n\t// prettier-ignore\n\t@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) {\n\t\tz-index: ",";\n\t}\n"])),(function(e){var t=e.isComplete,n=e.isActive,r=e.theme;if(n)return r.colors.highlight;if(t)return r.colors.success;return r.colors.upcomingStepBackground}),(function(e){var t=e.isComplete,n=e.isActive,r=e.theme;if(t||n)return r.colors.surface;return r.colors.textColor}),(function(e){return e.isComplete?"0":"1"})),Po=Yr(No)(qo||(qo=U(["\n\tbackground: ",";\n\ttransform: rotateY( 180deg );\n\t// Reason: media query needs to not have spaces within brackets otherwise ie11 doesn't read them\n\t// prettier-ignore\n\t@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) {\n\t\tbackface-visibility: visible;\n\t\tz-index: ",";\n\t}\n\n\tsvg {\n\t\tmargin-top: 4px;\n\t}\n"],["\n\tbackground: ",";\n\ttransform: rotateY( 180deg );\n\t// Reason: media query needs to not have spaces within brackets otherwise ie11 doesn't read them\n\t// prettier-ignore\n\t@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) {\n\t\tbackface-visibility: visible;\n\t\tz-index: ",";\n\t}\n\n\tsvg {\n\t\tmargin-top: 4px;\n\t}\n"])),(function(e){return e.theme.colors.success}),(function(e){return e.isComplete?"1":"0"})),Ao=Yr(wi)(Vo||(Vo=U(["\n\tfont-size: 14px;\n\tpadding-top: 1px;\n"],["\n\tfont-size: 14px;\n\tpadding-top: 1px;\n"])));var Lo,To,Fo,Mo,Do,Ro,Bo,Io,zo,Uo,Ho,$o,qo,Vo,Go,Yo,Wo=Yr.div(Go||(Go=U(["\n\tcolor: ",";\n\tdisplay: ",";\n\tpadding-left: 35px;\n\n\t.rtl & {\n\t\tpadding-right: 35px;\n\t\tpadding-left: 0;\n\t}\n"],["\n\tcolor: ",";\n\tdisplay: ",";\n\tpadding-left: 35px;\n\n\t.rtl & {\n\t\tpadding-right: 35px;\n\t\tpadding-left: 0;\n\t}\n"])),(function(e){return e.theme.colors.textColor}),(function(e){return e.isVisible?"block":"none"})),Ko=Yr.div(Yo||(Yo=U(["\n\tcolor: ",";\n\tfont-size: 14px;\n\tdisplay: ",";\n\tpadding-left: 35px;\n\n\t.rtl & {\n\t\tpadding-right: 35px;\n\t\tpadding-left: 0;\n\t}\n"],["\n\tcolor: ",";\n\tfont-size: 14px;\n\tdisplay: ",";\n\tpadding-left: 35px;\n\n\t.rtl & {\n\t\tpadding-right: 35px;\n\t\tpadding-left: 0;\n\t}\n"])),(function(e){return e.theme.colors.textColorLight}),(function(e){return e.isVisible?"block":"none"}));n(97);var Xo,Zo,Jo=Object(u.createElement)(E,{icon:Sr,size:17}),Qo=function(e){var t=e.onNextStep,n=e.onPrevStep,r=Object(m.useSelect)((function(e){return e(c).getSelectedDomain()})),i=Object(m.useSelect)((function(e){return e(c).getSelectedPlan()})),o=Object(m.useSelect)((function(e){return e(l).getPrices()})),a=Object(m.useSelect)((function(e){return e(c).getLaunchStep()})),s=Object(m.useSelect)((function(e){return e(c).isStepCompleted})),d=Object(m.useSelect)((function(e){return e(c).isFlowCompleted()})),p=Object(v.useEntityProp)("root","site","title"),f=g()(p,1)[0],h=X().currentDomainName,b=function(){var e,t=ie();return null===(e=Object(m.useSelect)((function(e){if(t&&!(t.length<2))return e("automattic/domains/suggestions").getDomainSuggestions(t,{include_wordpressdotcom:!1,include_dotblogsubdomain:!1,quantity:1,locale:"en"})}),[t]))||void 0===e?void 0:e[0]}(),x=ie(),w=Object(m.useDispatch)(c).setStep,O=Object(u.createElement)("div",{className:"nux-launch__summary-item"},Object(u.createElement)("p",null,Object(y.__)("Site","full-site-editing"),": ",f)),E=Object(u.createElement)("div",{className:"nux-launch__summary-item"},(null==r?void 0:r.domain_name)?Object(u.createElement)("p",null,Object(y.__)("Custom domain","full-site-editing"),": ",r.domain_name):Object(u.createElement)(u.Fragment,null,Object(u.createElement)("p",null,Object(y.__)("Free site address","full-site-editing"),": ",h),Object(u.createElement)(_.Tip,null,x?Object(u.createInterpolateElement)(Object(y.__)("A custom site address like <DomainName /> (<Link>now available!</Link>) is more unique and can help with your SEO ranking.","full-site-editing"),{DomainName:Object(u.createElement)("span",{className:N()("nux-launch__summary-item__domain-name",{"is-loading":!b})},(null==b?void 0:b.domain_name)||"loading-example.com"),Link:Object(u.createElement)(_.Button,{isLink:!0,onClick:function(){return w(a.Domain)}})}):Object(y.__)("A custom site address is more unique and can help with your SEO ranking.","full-site-editing")))),k=Object(u.createElement)("div",{className:"nux-launch__summary-item"},i&&!(null==i?void 0:i.isFree)?Object(u.createElement)(u.Fragment,null,Object(u.createElement)("p",{className:"nux-launch__summary-item__plan-name"},"WordPress.com ",i.title),Object(y.__)("Plan subscription","full-site-editing"),": ",o[i.storeSlug]," ",Object(y.__)("per month, billed yearly","full-site-editing")):Object(u.createElement)(u.Fragment,null,Object(u.createElement)("p",{className:"nux-launch__summary-item__plan-name"},"WordPress.com Free"),Object(u.createElement)("p",null,Object(y.__)("Plan subscription: Free forever","full-site-editing")),Object(u.createElement)(_.Tip,null,Object(u.createInterpolateElement)(Object(y.__)("<Link>Upgrade to Premium</Link> to get access to 13GB storage space, payment collection options, 24/7 Live Chat support, and more. Not sure? Give it a spin—we offer 30-day full-refunds, guaranteed.","full-site-editing"),{Link:Object(u.createElement)(_.Button,{isLink:!0,onClick:function(){return w(a.Plan)}})}))));return Object(u.createElement)(K,null,Object(u.createElement)("div",{className:"nux-launch-step__header"},Object(u.createElement)("div",null,Object(u.createElement)(L,null,Object(y.__)("Launch your site","full-site-editing")),Object(u.createElement)(T,null,Object(y.__)("Your site will be made public and ready to share with others.","full-site-editing")))),Object(u.createElement)("div",{className:"nux-launch-step__body"},Object(u.createElement)(kr,{theme:Dr},Object(u.createElement)(vo,null,s(a.Plan)&&Object(u.createElement)(ho,null,Object(u.createElement)(bo,{className:"nux-launch__feature-list"},Object(u.createElement)("h3",{className:"nux-launch__feature-list-title"},Object(y.__)("Included in your plan","full-site-editing")),Object(u.createElement)("ul",{className:"nux-launch__feature-item-group"},null==i?void 0:i.features.map((function(e,t){return Object(u.createElement)("li",{key:t,className:"nux-launch__feature-item"},Jo," ",e)}))),Object(u.createElement)("p",null,Object(y.__)("Questions?","full-site-editing")," ",Object(u.createElement)(_.Button,{isLink:!0,href:"https://wordpress.com/help/contact",target:"_blank"},Object(y.__)("Ask a Happiness Engineer","full-site-editing"))))),Object(u.createElement)(_o,null,Object(u.createElement)(go,{isStepActive:!1,titleContent:Object(y.__)("Your site name","full-site-editing"),isStepComplete:s(a.Name),goToThisStep:function(){return w(a.Name)},completeStepContent:O,stepId:"name",formStatus:Jr.READY}),Object(u.createElement)(go,{isStepActive:!1,titleContent:Object(y.__)("Your domain","full-site-editing"),isStepComplete:s(a.Domain),goToThisStep:function(){return w(a.Domain)},completeStepContent:E,stepId:"domain",formStatus:Jr.READY}),Object(u.createElement)(go,{isStepActive:!1,titleContent:Object(y.__)("Your plan","full-site-editing"),isStepComplete:s(a.Plan),goToThisStep:function(){return w(a.Plan)},completeStepContent:k,stepId:"plan",formStatus:Jr.READY}),Object(u.createElement)(xo,null,Object(u.createElement)(_.Button,{isPrimary:!0,disabled:!d,onClick:t,className:"nux-launch__submit-button"},Object(y.__)("Launch your site","full-site-editing"))))))),Object(u.createElement)("div",{className:"nux-launch-step__footer"},Object(u.createElement)(G,{sticky:!0},Object(u.createElement)(Y,{onClick:function(){null==n||n()}}))))},ea=(n(100),function(e){var t,n=e.onSubmit,r=Object(m.useSelect)((function(e){return e(c).getState()})).step,i=Object(m.useSelect)((function(e){return e(c).getLaunchStep()})),o=Object(m.useSelect)((function(e){return e(c).getLaunchSequence()})),a=Object(m.useSelect)((function(e){return e(c).getFirstIncompleteStep()})),s=Object(m.useDispatch)(c),l=s.setStep,p=s.setSidebarFullscreen,f=s.unsetSidebarFullscreen,h=(t={},A()(t,i.Name,oe),A()(t,i.Domain,tt),A()(t,i.Plan,qn),A()(t,i.Final,Qo),t),b=o.indexOf(r),g=h[r];return d.useEffect((function(){a&&a!==i.Name&&l(a)}),[]),Object(u.createElement)(g,{onPrevStep:function(){var e=b-1;e<0&&(e=0,p()),l(o[e])},onNextStep:function(){var e=b+1;e>o.length-1&&(null==n||n()),f(),l(o[e])}})}),ta=Object(u.createElement)(_.SVG,{viewBox:"0 0 24 24"},Object(u.createElement)(_.Circle,{cx:"12",cy:"12",r:"5"})),na=function(e){var t=e.title,n=e.isCompleted,r=e.isCurrent,i=e.isDisabled,o=e.onClick;return Object(u.createElement)(_.Button,{className:N()("nux-launch-menu__item",{"is-current":r,"is-completed":n}),onClick:o,disabled:i,isLink:!0},Object(u.createElement)(E,{icon:n?Sr:ta,size:16}),Object(u.createElement)("span",null,t))},ra=(n(101),function(e){var t,n=e.onMenuItemClick,r=Object(m.useSelect)((function(e){return e(c).getState()})).step,i=Object(m.useSelect)((function(e){return e(c).getLaunchStep()})),o=Object(m.useSelect)((function(e){return e(c).getLaunchSequence()})),a=Object(m.useSelect)((function(e){return e(c).isStepCompleted})),s=Object(m.useSelect)((function(e){return e(c).isFlowStarted()})),l=(t={},A()(t,i.Name,Object(y.__)("Name your site","full-site-editing")),A()(t,i.Domain,Object(y.__)("Select a domain","full-site-editing")),A()(t,i.Plan,Object(y.__)("Select a plan","full-site-editing")),A()(t,i.Final,Object(y.__)("Launch your site","full-site-editing")),t),d=Object(m.useDispatch)(c).setStep;return Object(u.createElement)("div",{className:"nux-launch-menu"},Object(u.createElement)("h4",null,Object(y.__)("Site Launch Steps","full-site-editing")),Object(u.createElement)("div",{className:"nux-launch-menu__item-group"},o.map((function(e){return Object(u.createElement)(na,{key:e,title:l[e],isCompleted:a(e),isCurrent:e===r,onClick:function(){return function(e){d(e),n(e)}(e)},isDisabled:e===i.Final&&!s})}))))}),ia=(n(102),function(){var e=Object(m.useDispatch)(c),t=e.setStep,n=e.unsetSidebarFullscreen,r=Object(m.useSelect)((function(e){return e(c).getLaunchSequence()}));return Object(u.createElement)("div",{className:"nux-launch-sidebar"},Object(u.createElement)("div",{className:"nux-launch-sidebar__header"},Object(u.createElement)(L,null,Object(y.__)("You're almost there!","full-site-editing")),Object(u.createElement)(T,null,Object(y.__)("Complete the following steps to launch your site. Your site will remain private until you Launch.","full-site-editing"))),Object(u.createElement)("div",{className:"nux-launch-sidebar__body"},Object(u.createElement)(ra,{onMenuItemClick:function(){n()}})),Object(u.createElement)("div",{className:"nux-launch-sidebar__footer"},Object(u.createElement)(G,{sticky:!0},Object(u.createElement)(W,{onClick:function(){t(r[0]),n()}},Object(y.__)("Get Started","full-site-editing")))))}),oa=(n(103),function(){var e=q().__,t=Object(m.useSelect)((function(e){return e(c).getState()})).step,n=Object(m.useSelect)((function(e){return e(c).getLaunchSequence()})),r=n.indexOf(t)+1,i=n.length,o=Object(y.sprintf)(e("%1$d of %2$d","full-site-editing"),r,i);return Object(u.createElement)("div",{className:"nux-launch-progress"},o)}),aa=(n(104),function(e){var t=e.onClose,n=Object(m.useSelect)((function(e){return e(c).getState()})),r=n.step,i=n.isSidebarFullscreen,o=Object(m.useDispatch)(c).launchSite,a=d.useState(!1),s=g()(a,2),l=s[0],p=s[1],f=function(){p(!0),o()};return X().isPaidPlan&&!l&&f(),Object(u.createElement)(_.Modal,{open:!0,className:N()("nux-launch-modal","step-".concat(r),i?"is-sidebar-fullscreen":""),overlayClassName:"nux-launch-modal-overlay",bodyOpenClassName:"has-nux-launch-modal",onRequestClose:t,title:""},l?Object(u.createElement)("div",{className:"nux-launch-modal-body__launching"},Object(y.__)("Hooray! Your site will be ready shortly.","full-site-editing")):Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"nux-launch-modal-body"},Object(u.createElement)("div",{className:"nux-launch-modal-header"},Object(u.createElement)("div",{className:"nux-launch-modal-header__wp-logo"},Object(u.createElement)(E,{icon:S,size:36})),Object(u.createElement)(oa,null)),Object(u.createElement)(v.EntityProvider,{kind:"root",type:"site"},Object(u.createElement)(ea,{onSubmit:f}))),Object(u.createElement)("div",{className:"nux-launch-modal-aside"},Object(u.createElement)(ia,null)),Object(u.createElement)(_.Button,{isLink:!0,className:"nux-launch-modal__close-button",onClick:t,"aria-label":Object(y.__)("Close dialog","full-site-editing"),disabled:!t},Object(u.createElement)("span",null,Object(u.createElement)(E,{icon:j,size:24})))))});Xo="a8c-editor-site-launch",Zo={render:function(){var e=Object(m.useSelect)((function(e){return e(c).getState()})).isSidebarOpen,t=Object(m.useDispatch)(c),n=t.closeSidebar,r=t.setSidebarFullscreen,i=t.unsetSidebarFullscreen;return function(){var e=X().launchStatus,t=Object(m.useSelect)((function(e){return e(c).getState()})),n=t.plan,r=t.domain,i=Object(m.useSelect)((function(e){return e(l).isPlanEcommerce(null==n?void 0:n.storeSlug)})),o=Object(m.useDispatch)(s),a=o.getCart,u=o.setCart;d.useEffect((function(){if(e){if(n&&!(null==n?void 0:n.isFree)){var t={product_id:n.productId,product_slug:n.storeSlug,extra:{source:"gutenboarding"}},o={meta:null==r?void 0:r.domain_name,product_id:null==r?void 0:r.product_id,extra:{privacy_available:null==r?void 0:r.supports_privacy,privacy:null==r?void 0:r.supports_privacy,source:"gutenboarding"}};return void function(){var e=ne()(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a(window._currentSiteId);case 2:return n=e.sent,e.next=5,u(window._currentSiteId,ee()(ee()({},n),{},{products:[].concat(J()(n.products),[t,o])}));case 5:r=Object(re.addQueryArgs)("https://wordpress.com/checkout/".concat(window._currentSiteId),ee()({preLaunch:1},!i&&{redirect_to:"/home/".concat(window._currentSiteId)})),window.top.location.href=r;case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}window.top.location.href="https://wordpress.com/home/".concat(window._currentSiteId)}}),[e])}(),d.useEffect((function(){window.innerWidth<782?r():i()}),[e,r,i]),d.useEffect((function(){var t="a8c.wpcom-block-editor.toggleInlineHelpButton";Object(h.hasAction)(t)&&Object(h.doAction)(t,{hidden:e})}),[e]),e?Object(u.createElement)(aa,{onClose:n}):null}},Object(f.registerPlugin)(Xo,Zo)}]));
|
editor-site-launch/index.php
CHANGED
@@ -33,6 +33,8 @@ function enqueue_script_and_style() {
|
|
33 |
true
|
34 |
);
|
35 |
|
|
|
|
|
36 |
wp_enqueue_style(
|
37 |
'a8c-fse-editor-site-launch-style',
|
38 |
plugins_url( 'dist/editor-site-launch.css', __FILE__ ),
|
33 |
true
|
34 |
);
|
35 |
|
36 |
+
wp_set_script_translations( 'a8c-fse-editor-site-launch-script', 'full-site-editing' );
|
37 |
+
|
38 |
wp_enqueue_style(
|
39 |
'a8c-fse-editor-site-launch-style',
|
40 |
plugins_url( 'dist/editor-site-launch.css', __FILE__ ),
|
editor-site-launch/src/attach-launch-sidebar.tsx
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
import * as React from 'react';
|
5 |
import { useDispatch, useSelect } from '@wordpress/data';
|
6 |
import { registerPlugin as originalRegisterPlugin, PluginSettings } from '@wordpress/plugins';
|
|
|
7 |
|
8 |
/**
|
9 |
* Internal dependencies
|
@@ -31,6 +32,13 @@ registerPlugin( 'a8c-editor-site-launch', {
|
|
31 |
window.innerWidth < 782 ? setSidebarFullscreen() : unsetSidebarFullscreen();
|
32 |
}, [ isSidebarOpen, setSidebarFullscreen, unsetSidebarFullscreen ] );
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
if ( ! isSidebarOpen ) {
|
35 |
return null;
|
36 |
}
|
4 |
import * as React from 'react';
|
5 |
import { useDispatch, useSelect } from '@wordpress/data';
|
6 |
import { registerPlugin as originalRegisterPlugin, PluginSettings } from '@wordpress/plugins';
|
7 |
+
import { doAction, hasAction } from '@wordpress/hooks';
|
8 |
|
9 |
/**
|
10 |
* Internal dependencies
|
32 |
window.innerWidth < 782 ? setSidebarFullscreen() : unsetSidebarFullscreen();
|
33 |
}, [ isSidebarOpen, setSidebarFullscreen, unsetSidebarFullscreen ] );
|
34 |
|
35 |
+
React.useEffect( () => {
|
36 |
+
const TOGGLE_INLINE_HELP_BUTTON_ACTION = 'a8c.wpcom-block-editor.toggleInlineHelpButton';
|
37 |
+
if ( hasAction( TOGGLE_INLINE_HELP_BUTTON_ACTION ) ) {
|
38 |
+
doAction( TOGGLE_INLINE_HELP_BUTTON_ACTION, { hidden: isSidebarOpen } );
|
39 |
+
}
|
40 |
+
}, [ isSidebarOpen ] );
|
41 |
+
|
42 |
if ( ! isSidebarOpen ) {
|
43 |
return null;
|
44 |
}
|
editor-site-launch/src/launch-steps/name-step/index.tsx
CHANGED
@@ -50,7 +50,6 @@ const NameStep: React.FunctionComponent< LaunchStepProps > = ( { onPrevStep, onN
|
|
50 |
autoComplete="off"
|
51 |
placeholder={ __( 'Enter site name', 'full-site-editing' ) }
|
52 |
autoCorrect="off"
|
53 |
-
data-hj-whitelist
|
54 |
/>
|
55 |
<div className="nux-launch-step__input-hint">
|
56 |
<Tip size={ 18 } />
|
50 |
autoComplete="off"
|
51 |
placeholder={ __( 'Enter site name', 'full-site-editing' ) }
|
52 |
autoCorrect="off"
|
|
|
53 |
/>
|
54 |
<div className="nux-launch-step__input-hint">
|
55 |
<Tip size={ 18 } />
|
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: 2.
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
@@ -35,7 +35,7 @@ namespace A8C\FSE;
|
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
-
define( 'PLUGIN_VERSION', '2.
|
39 |
|
40 |
// Always include these helper files for dotcom FSE.
|
41 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
@@ -262,7 +262,11 @@ add_action( 'plugins_loaded', __NAMESPACE__ . '\load_wpcom_block_editor_nux' );
|
|
262 |
/**
|
263 |
* Load editing toolkit block patterns
|
264 |
*/
|
265 |
-
function
|
|
|
|
|
|
|
|
|
266 |
if ( ! function_exists( '\gutenberg_load_block_pattern' ) ) {
|
267 |
return;
|
268 |
}
|
@@ -271,7 +275,30 @@ function load_block_patterns() {
|
|
271 |
|
272 |
Block_Patterns::get_instance();
|
273 |
}
|
274 |
-
add_action( 'init', __NAMESPACE__ . '\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
|
276 |
/**
|
277 |
* Load Premium Content Block
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
+
* Version: 2.8
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
+
define( 'PLUGIN_VERSION', '2.8' );
|
39 |
|
40 |
// Always include these helper files for dotcom FSE.
|
41 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
262 |
/**
|
263 |
* Load editing toolkit block patterns
|
264 |
*/
|
265 |
+
function load_local_block_patterns() {
|
266 |
+
if ( apply_filters( 'a8c_enable_block_patterns_api', false ) ) {
|
267 |
+
return;
|
268 |
+
}
|
269 |
+
|
270 |
if ( ! function_exists( '\gutenberg_load_block_pattern' ) ) {
|
271 |
return;
|
272 |
}
|
275 |
|
276 |
Block_Patterns::get_instance();
|
277 |
}
|
278 |
+
add_action( 'init', __NAMESPACE__ . '\load_local_block_patterns', 20 );
|
279 |
+
|
280 |
+
/**
|
281 |
+
* Load editing toolkit block patterns from the API
|
282 |
+
*
|
283 |
+
* @param obj $current_screen The current screen object.
|
284 |
+
*/
|
285 |
+
function load_block_patterns_from_api( $current_screen ) {
|
286 |
+
if ( ! apply_filters( 'a8c_enable_block_patterns_api', false ) ) {
|
287 |
+
return;
|
288 |
+
}
|
289 |
+
|
290 |
+
if ( ! function_exists( '\gutenberg_load_block_pattern' ) ) {
|
291 |
+
return;
|
292 |
+
}
|
293 |
+
|
294 |
+
if ( ! $current_screen->is_block_editor ) {
|
295 |
+
return;
|
296 |
+
}
|
297 |
+
|
298 |
+
require_once __DIR__ . '/block-patterns/class-block-patterns-from-api.php';
|
299 |
+
Block_Patterns_From_API::get_instance();
|
300 |
+
}
|
301 |
+
add_action( 'current_screen', __NAMESPACE__ . '\load_block_patterns_from_api' );
|
302 |
|
303 |
/**
|
304 |
* Load Premium Content Block
|
premium-content/blocks/container/index.js
CHANGED
@@ -13,6 +13,7 @@ import { select } from '@wordpress/data';
|
|
13 |
import edit from './edit';
|
14 |
import save from './save';
|
15 |
import { getCategoryWithFallbacks } from '../../../block-helpers';
|
|
|
16 |
|
17 |
const name = 'premium-content/container';
|
18 |
const category = getCategoryWithFallbacks( 'earn', 'common' );
|
@@ -88,21 +89,7 @@ const settings = {
|
|
88 |
* An icon property should be specified to make it easier to identify a block.
|
89 |
* These can be any of WordPress’ Dashicons, or a custom svg element.
|
90 |
*/
|
91 |
-
icon
|
92 |
-
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
93 |
-
<path
|
94 |
-
d="M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z"
|
95 |
-
fill="black"
|
96 |
-
/>
|
97 |
-
<circle cx="12.7439" cy="8.69796" r="5.94466" stroke="black" strokeWidth="1.5" fill="none" />
|
98 |
-
<path
|
99 |
-
d="M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533"
|
100 |
-
stroke="black"
|
101 |
-
strokeWidth="1.5"
|
102 |
-
fill="none"
|
103 |
-
/>
|
104 |
-
</svg>
|
105 |
-
),
|
106 |
|
107 |
/**
|
108 |
* Optional block extended support features.
|
13 |
import edit from './edit';
|
14 |
import save from './save';
|
15 |
import { getCategoryWithFallbacks } from '../../../block-helpers';
|
16 |
+
import icon from '../icon.js';
|
17 |
|
18 |
const name = 'premium-content/container';
|
19 |
const category = getCategoryWithFallbacks( 'earn', 'common' );
|
89 |
* An icon property should be specified to make it easier to identify a block.
|
90 |
* These can be any of WordPress’ Dashicons, or a custom svg element.
|
91 |
*/
|
92 |
+
icon,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
/**
|
95 |
* Optional block extended support features.
|
premium-content/blocks/icon.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export default (
|
2 |
+
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
3 |
+
<path
|
4 |
+
d="M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z"
|
5 |
+
fill="black"
|
6 |
+
/>
|
7 |
+
<circle cx="12.7439" cy="8.69796" r="5.94466" stroke="black" strokeWidth="1.5" fill="none" />
|
8 |
+
<path
|
9 |
+
d="M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533"
|
10 |
+
stroke="black"
|
11 |
+
strokeWidth="1.5"
|
12 |
+
fill="none"
|
13 |
+
/>
|
14 |
+
</svg>
|
15 |
+
);
|
premium-content/blocks/logged-out-view/edit.js
CHANGED
@@ -3,44 +3,64 @@
|
|
3 |
*/
|
4 |
import { InnerBlocks } from '@wordpress/block-editor';
|
5 |
import { __ } from '@wordpress/i18n';
|
|
|
|
|
|
|
6 |
|
7 |
/**
|
8 |
* Internal dependencies
|
9 |
*/
|
10 |
import Context from '../container/context';
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
export default
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
*/
|
4 |
import { InnerBlocks } from '@wordpress/block-editor';
|
5 |
import { __ } from '@wordpress/i18n';
|
6 |
+
import { useDispatch, withSelect } from '@wordpress/data';
|
7 |
+
import { compose } from '@wordpress/compose';
|
8 |
+
import { useEffect } from '@wordpress/element';
|
9 |
|
10 |
/**
|
11 |
* Internal dependencies
|
12 |
*/
|
13 |
import Context from '../container/context';
|
14 |
|
15 |
+
function Edit( { parentClientId, isSelected } ) {
|
16 |
+
const { selectBlock } = useDispatch( 'core/block-editor' );
|
17 |
+
|
18 |
+
useEffect( () => {
|
19 |
+
if ( isSelected ) {
|
20 |
+
selectBlock( parentClientId );
|
21 |
+
}
|
22 |
+
}, [ selectBlock, isSelected, parentClientId ] );
|
23 |
+
|
24 |
+
return (
|
25 |
+
<Context.Consumer>
|
26 |
+
{ ( { selectedTab, stripeNudge } ) => (
|
27 |
+
/** @see https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-static-element-interactions.md#case-the-event-handler-is-only-being-used-to-capture-bubbled-events */
|
28 |
+
// eslint-disable-next-line
|
29 |
+
<div hidden={ selectedTab.id === 'premium' } className={ selectedTab.className }>
|
30 |
+
{ stripeNudge }
|
31 |
+
<InnerBlocks
|
32 |
+
templateLock={ false }
|
33 |
+
template={ [
|
34 |
+
[
|
35 |
+
'core/heading',
|
36 |
+
{ content: __( 'Subscribe to get access', 'full-site-editing' ), level: 3 },
|
37 |
+
],
|
38 |
+
[
|
39 |
+
'core/paragraph',
|
40 |
+
{
|
41 |
+
content: __(
|
42 |
+
'Read more of this content when you subscribe today.',
|
43 |
+
'full-site-editing'
|
44 |
+
),
|
45 |
+
},
|
46 |
+
],
|
47 |
+
[ 'premium-content/buttons' ],
|
48 |
+
] }
|
49 |
+
/>
|
50 |
+
</div>
|
51 |
+
) }
|
52 |
+
</Context.Consumer>
|
53 |
+
);
|
54 |
+
}
|
55 |
|
56 |
+
export default compose(
|
57 |
+
withSelect( ( select ) => {
|
58 |
+
const { getSelectedBlockClientId, getBlockHierarchyRootClientId } = select(
|
59 |
+
'core/block-editor'
|
60 |
+
);
|
61 |
+
const selectedBlockClientId = getSelectedBlockClientId();
|
62 |
+
return {
|
63 |
+
parentClientId: getBlockHierarchyRootClientId( selectedBlockClientId ),
|
64 |
+
};
|
65 |
+
} )
|
66 |
+
)( Edit );
|
premium-content/blocks/logged-out-view/index.js
CHANGED
@@ -5,6 +5,7 @@ import edit from './edit';
|
|
5 |
import save from './save';
|
6 |
import deprecated from './deprecated';
|
7 |
import { getCategoryWithFallbacks } from '../../../block-helpers';
|
|
|
8 |
|
9 |
/**
|
10 |
* WordPress dependencies
|
@@ -38,6 +39,7 @@ const settings = {
|
|
38 |
},
|
39 |
edit,
|
40 |
save,
|
|
|
41 |
deprecated,
|
42 |
};
|
43 |
|
5 |
import save from './save';
|
6 |
import deprecated from './deprecated';
|
7 |
import { getCategoryWithFallbacks } from '../../../block-helpers';
|
8 |
+
import icon from '../icon.js';
|
9 |
|
10 |
/**
|
11 |
* WordPress dependencies
|
39 |
},
|
40 |
edit,
|
41 |
save,
|
42 |
+
icon,
|
43 |
deprecated,
|
44 |
};
|
45 |
|
premium-content/blocks/logged-out-view/save.js
CHANGED
@@ -8,7 +8,7 @@ import { InnerBlocks } from '@wordpress/block-editor';
|
|
8 |
*/
|
9 |
export default function Save() {
|
10 |
return (
|
11 |
-
<div className="wp-block-premium-content-logged-out-view">
|
12 |
<InnerBlocks.Content />
|
13 |
</div>
|
14 |
);
|
8 |
*/
|
9 |
export default function Save() {
|
10 |
return (
|
11 |
+
<div className="wp-block-premium-content-logged-out-view entry-content">
|
12 |
<InnerBlocks.Content />
|
13 |
</div>
|
14 |
);
|
premium-content/blocks/subscriber-view/edit.js
CHANGED
@@ -3,53 +3,60 @@
|
|
3 |
*/
|
4 |
import { InnerBlocks } from '@wordpress/block-editor';
|
5 |
import { __ } from '@wordpress/i18n';
|
|
|
6 |
import { compose } from '@wordpress/compose';
|
7 |
-
import {
|
8 |
|
9 |
/**
|
10 |
* Internal dependencies
|
11 |
*/
|
12 |
import Context from '../container/context';
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
);
|
|
|
49 |
|
50 |
export default compose( [
|
51 |
withSelect( ( select, props ) => {
|
|
|
|
|
|
|
|
|
52 |
return {
|
|
|
53 |
// @ts-ignore difficult to type with JSDoc
|
54 |
hasInnerBlocks: !! select( 'core/block-editor' ).getBlocksByClientId( props.clientId )[ 0 ]
|
55 |
.innerBlocks.length,
|
3 |
*/
|
4 |
import { InnerBlocks } from '@wordpress/block-editor';
|
5 |
import { __ } from '@wordpress/i18n';
|
6 |
+
import { useDispatch, withSelect } from '@wordpress/data';
|
7 |
import { compose } from '@wordpress/compose';
|
8 |
+
import { useEffect } from '@wordpress/element';
|
9 |
|
10 |
/**
|
11 |
* Internal dependencies
|
12 |
*/
|
13 |
import Context from '../container/context';
|
14 |
|
15 |
+
function Edit( { hasInnerBlocks, parentClientId, isSelected } ) {
|
16 |
+
const { selectBlock } = useDispatch( 'core/block-editor' );
|
17 |
+
|
18 |
+
useEffect( () => {
|
19 |
+
if ( isSelected ) {
|
20 |
+
selectBlock( parentClientId );
|
21 |
+
}
|
22 |
+
}, [ selectBlock, isSelected, parentClientId ] );
|
23 |
+
|
24 |
+
return (
|
25 |
+
<Context.Consumer>
|
26 |
+
{ ( { selectedTab, stripeNudge } ) => (
|
27 |
+
/** @see https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-static-element-interactions.md#case-the-event-handler-is-only-being-used-to-capture-bubbled-events */
|
28 |
+
// eslint-disable-next-line
|
29 |
+
<div hidden={ selectedTab.id === 'wall' } className={ selectedTab.className }>
|
30 |
+
{ stripeNudge }
|
31 |
+
<InnerBlocks
|
32 |
+
renderAppender={ ! hasInnerBlocks && InnerBlocks.ButtonBlockAppender }
|
33 |
+
templateLock={ false }
|
34 |
+
template={ [
|
35 |
+
[
|
36 |
+
'core/paragraph',
|
37 |
+
{
|
38 |
+
placeholder: __(
|
39 |
+
'Insert the piece of content you want your visitors to see after they subscribe.',
|
40 |
+
'full-site-editing'
|
41 |
+
),
|
42 |
+
},
|
43 |
+
],
|
44 |
+
] }
|
45 |
+
/>
|
46 |
+
</div>
|
47 |
+
) }
|
48 |
+
</Context.Consumer>
|
49 |
+
);
|
50 |
+
}
|
51 |
|
52 |
export default compose( [
|
53 |
withSelect( ( select, props ) => {
|
54 |
+
const { getSelectedBlockClientId, getBlockHierarchyRootClientId } = select(
|
55 |
+
'core/block-editor'
|
56 |
+
);
|
57 |
+
const selectedBlockClientId = getSelectedBlockClientId();
|
58 |
return {
|
59 |
+
parentClientId: getBlockHierarchyRootClientId( selectedBlockClientId ),
|
60 |
// @ts-ignore difficult to type with JSDoc
|
61 |
hasInnerBlocks: !! select( 'core/block-editor' ).getBlocksByClientId( props.clientId )[ 0 ]
|
62 |
.innerBlocks.length,
|
premium-content/blocks/subscriber-view/index.js
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
import edit from './edit';
|
5 |
import save from './save';
|
6 |
import { getCategoryWithFallbacks } from '../../../block-helpers';
|
|
|
7 |
|
8 |
/**
|
9 |
* WordPress dependencies
|
@@ -28,6 +29,7 @@ const settings = {
|
|
28 |
html: false,
|
29 |
},
|
30 |
edit,
|
|
|
31 |
save,
|
32 |
};
|
33 |
|
4 |
import edit from './edit';
|
5 |
import save from './save';
|
6 |
import { getCategoryWithFallbacks } from '../../../block-helpers';
|
7 |
+
import icon from '../icon.js';
|
8 |
|
9 |
/**
|
10 |
* WordPress dependencies
|
29 |
html: false,
|
30 |
},
|
31 |
edit,
|
32 |
+
icon,
|
33 |
save,
|
34 |
};
|
35 |
|
premium-content/blocks/subscriber-view/save.js
CHANGED
@@ -8,7 +8,7 @@ import { InnerBlocks } from '@wordpress/block-editor';
|
|
8 |
*/
|
9 |
export default function Save() {
|
10 |
return (
|
11 |
-
<div className="wp-block-premium-content-subscriber-view">
|
12 |
<InnerBlocks.Content />
|
13 |
</div>
|
14 |
);
|
8 |
*/
|
9 |
export default function Save() {
|
10 |
return (
|
11 |
+
<div className="wp-block-premium-content-subscriber-view entry-content">
|
12 |
<InnerBlocks.Content />
|
13 |
</div>
|
14 |
);
|
premium-content/dist/premium-content.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '367a864cd0d959b6ddb105918318b18f');
|
premium-content/dist/premium-content.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=60)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r=n(10);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}e.exports=function(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){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){var r=n(39),o=n(40),i=n(23),c=n(41);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t){
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
@@ -16,11 +16,11 @@
|
|
16 |
object-assign
|
17 |
(c) Sindre Sorhus
|
18 |
@license MIT
|
19 |
-
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,l=c(e),a=1;a<arguments.length;a++){for(var u in n=Object(arguments[a]))o.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var p=0;p<s.length;p++)i.call(n,s[p])&&(l[s[p]]=n[s[p]])}}return l}},function(e,t,n){"use strict";n.r(t),n.d(t,"registerPremiumContentBlocks",(function(){return $t}));var r={};n.r(r),n.d(r,"name",(function(){return Ze})),n.d(r,"category",(function(){return Ye})),n.d(r,"settings",(function(){return qe})),n.d(r,"SUPPORTED_CURRENCIES",(function(){return Xe})),n.d(r,"CURRENCY_OPTIONS",(function(){return Qe})),n.d(r,"minimumTransactionAmountForCurrency",(function(){return et})),n.d(r,"isPriceValid",(function(){return tt}));var o={};n.r(o),n.d(o,"name",(function(){return rt})),n.d(o,"category",(function(){return ot})),n.d(o,"settings",(function(){return it}));var i={};n.r(i),n.d(i,"name",(function(){return at})),n.d(i,"category",(function(){return ut})),n.d(i,"settings",(function(){return pt}));var c={};n.r(c),n.d(c,"name",(function(){return yt})),n.d(c,"category",(function(){return Ot})),n.d(c,"settings",(function(){return jt}));var s={};n.r(s),n.d(s,"name",(function(){return Bt})),n.d(s,"category",(function(){return Nt})),n.d(s,"settings",(function(){return At}));var l=n(16),a=n.n(l),u=n(4),p=n.n(u),d=n(12),m=n(17),f=n.n(m),g=n(6),b=n(2),h=n(0),v=n(1),y={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function O(e){return y[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}var j,w,C,_,k=n(5),x=n(8),E=n.n(x),S=n(7),P=n.n(S),F=n(3),B=n(9),N=n(14),A=n(15),R=n.n(A),L=n(10),T=n.n(L),D=n(28),I=n.n(D),M=n(29),$=n.n(M);j={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},w=["(","?"],C={")":["("],":":["?","?:"]},_=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var U={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function K(e){var t=function(e){for(var t,n,r,o,i=[],c=[];t=e.match(_);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=c.pop();){if(C[n]){if(C[n][0]===o){n=C[n][1]||n;break}}else if(w.indexOf(o)>=0||j[o]<j[n]){c.push(o);break}i.push(o)}C[n]||c.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(c.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,c,s,l=[];for(n=0;n<e.length;n++){if(c=e[n],i=U[c]){for(r=i.length,o=Array(r);r--;)o[r]=l.pop();try{s=i.apply(null,o)}catch(a){return a}}else s=t.hasOwnProperty(c)?t[c]:+c;l.push(s)}return l[0]}(t,e)}}var G={contextDelimiter:"",onMissingKey:null};function V(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},G)this.options[n]=void 0!==t&&n in t?t[n]:G[n]}V.prototype.getPluralForm=function(e,t){var n,r,o,i,c=this.pluralForms[e];return c||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=K(r),o=function(e){return+i({n:e})}),c=this.pluralForms[e]=o),c(t)},V.prototype.dcnpgettext=function(e,t,n,r,o){var i,c,s;return i=void 0===o?0:this.getPluralForm(e,o),c=n,t&&(c=t+this.options.contextDelimiter+n),(s=this.data[e][c])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var H=n(30),W=n.n(H),z=n(31),Z=n.n(z),Y=n(20),J=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function q(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(J,(function(){var e,r,o,i,c;return e=arguments[3],r=arguments[5],"%"===(i=arguments[9])?"%":("*"===(o=arguments[7])&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(c=t[0][r]):(void 0===e&&(e=n),n++,c=t[e-1]),"f"===i?c=parseFloat(c)||0:"d"===i&&(c=parseInt(c)||0),void 0!==o&&("f"===i?c=c.toFixed(o):"s"===i&&(c=c.substr(0,o))),null!=c?c:"")}))}
|
20 |
/*
|
21 |
* Exposes number format capability
|
22 |
*
|
23 |
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
|
24 |
* @license See CREDITS.md
|
25 |
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
|
26 |
-
*/function X(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,c=void 0===r?",":r,s=void 0===n?".":n,l="";return(l=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(l[1]||"").length<i&&(l[1]=l[1]||"",l[1]+=new Array(i-l[1].length+1).join("0")),l.join(s)}var Q=I()("i18n-calypso"),ee="number_format_decimals",te="number_format_thousands_sep",ne="messages",re=[function(e){return e}],oe={};function ie(){ue.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function ce(e){return Array.prototype.slice.call(e)}function se(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&ie("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",ce(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&ie("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",ce(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function le(e,t){return e.dcnpgettext(ne,t.context,t.original,t.plural,t.count)}function ae(e,t){for(var n=re.length-1;n>=0;n--){var r=re[n](Object.assign({},t)),o=r.context?r.context+""+r.original:r.original;if(e.state.locale[o])return le(e.state.tannin,r)}return null}function ue(){if(!(this instanceof ue))return new ue;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:W()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new Y.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}ue.throwErrors=!1,ue.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},ue.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},ue.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},ue.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return X(e,n,r,o)},ue.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},ue.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==oe[n+e])return oe[n+e];var r=Z()().update(e).digest("hex");return oe[n+e]=t?r.substr(0,t):r},c=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)re.push(c(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var l=Number(o.substr(5));re.push(c(l))}else for(var a=Number(o.substr(5,s)),u=Number(o.substr(6+s)),p=a;p<=u;p++)re.push(c(p))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new V(T()({},ne,this.state.locale)),this.state.numberFormatSettings.decimal_point=le(this.state.tannin,se([ee])),this.state.numberFormatSettings.thousands_sep=le(this.state.tannin,se([te])),this.state.numberFormatSettings.decimal_point===ee&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===te&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},ue.prototype.getLocale=function(){return this.state.locale},ue.prototype.getLocaleSlug=function(){return this.state.localeSlug},ue.prototype.isRtl=function(){return"rtl"===this.state.textDirection},ue.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},ue.prototype.hasTranslation=function(){return!!ae(this,se(arguments))},ue.prototype.translate=function(){var e=se(arguments),t=ae(this,e);if(t||(t=le(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=q.apply(void 0,R()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=$()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},ue.prototype.reRenderTranslations=function(){Q("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},ue.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},ue.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var pe=ue,de=n(32),me=n.n(de),fe=n(33),ge=n.n(fe),be=n(18),he=n.n(be),ve=n(34),ye=n.n(ve),Oe=n(35),je=n.n(Oe),we=n(11),Ce=n.n(we),_e=n(36);var ke,xe,Ee=new pe,Se=Ee.numberFormat.bind(Ee),Pe=(Ee.translate.bind(Ee),Ee.configure.bind(Ee),Ee.setLocale.bind(Ee),Ee.getLocale.bind(Ee),Ee.getLocaleSlug.bind(Ee),Ee.addTranslations.bind(Ee),Ee.reRenderTranslations.bind(Ee),Ee.registerComponentUpdateHook.bind(Ee),Ee.registerTranslateHook.bind(Ee),Ee.state,Ee.stateObserver,Ee.on.bind(Ee),Ee.off.bind(Ee),Ee.emit.bind(Ee),xe={numberFormat:(ke=Ee).numberFormat.bind(ke),translate:ke.translate.bind(ke)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(Ee),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(_e.useSubscription)(t)}var r=Object(B.createHigherOrderComponent)((function(e){return Object(we.forwardRef)((function(t,r){var o=n();return Ce.a.createElement(e,E()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(Ee));Pe.useRtl,Pe.withRtl;function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=O(t);if(!r||isNaN(e))return null;var o=p()(p()({},r),n),i=o.decimal,c=o.grouping,s=o.precision,l=o.symbol,a=e<0?"-":"",u=Se(Math.abs(e),{decimals:s,thousandsSep:c,decPoint:i});return n.stripZeros&&(u=Be(u,i)),"".concat(a).concat(l).concat(u)}function Be(e,t){var n=new RegExp("\\".concat(t,"0+$"));return e.replace(n,"")}function Ne(e){var t=e.className,n=e.tab,r=e.label,o=e.selectedTab,i=e.onSelected,c=(n.id===o.id?["is-pressed","is-active"]:[]).concat([t,"components-button","components-tab-button"]);return Object(h.createElement)("button",{type:"button",onClick:function(){return i(n)},className:c.join(" ")},r)}function Ae(e){var t=e.className,n=e.tabs,r=e.selectedTab,o=e.onSelected,i=e.selectBlock;return Object(h.createElement)("div",{className:"premium-content-tabs block-editor-block-toolbar"},n.map((function(n){return Object(h.createElement)(Ne,E()({key:n.id},e,{tab:n,selectedTab:r,className:"".concat(t,"--tab"),label:n.label,onSelected:o}))})),Object(h.createElement)("button",{onClick:function(){Object(k.select)("core/edit-post").isEditorSidebarOpened()||Object(k.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block"),i()},className:"edit components-button is-button is-secondary"},Object(v.__)("Edit","full-site-editing")))}function Re(){return Object(h.createElement)("div",{className:"premium-content-wrapper"},Object(h.createElement)(b.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]]}))}function Le(e){var t=e.className,n=e.plan,r=e.selectedPlan,o=e.onSelected,i=e.onClose,c=e.getPlanDescription,s=r&&n.id===r.id,l=(s?["is-selected"]:[]).concat([t]).join(" "),a=s?"yes":void 0,u=null;return n&&(u=" "+c(n)),Object(h.createElement)(F.MenuItem,{onClick:function(e){e.preventDefault(),o(n),i()},className:l,key:n.id,value:n.id,selected:s,icon:a},n.title," : ",u)}function Te(e){var t=e.plans,n=e.selectedPlan,r=e.onSelected;return Object(h.createElement)(F.MenuGroup,null,t.map((function(t){return Object(h.createElement)(Le,E()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t}))})))}function De(e){return Object(h.createElement)(F.MenuGroup,null,Object(h.createElement)(F.MenuItem,{onClick:function(t){t.preventDefault(),Object(k.select)("core/edit-post").isEditorSidebarOpened()||Object(k.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");var n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},Object(v.__)("Add a new subscription","full-site-editing")))}function Ie(e){var t=e.selectedPlanId,n=e.onSelected,r=e.plans,o=e.getPlanDescription,i=r.find((function(e){return e.id===t})),c=null;return i&&(c=" "+o(i)),Object(h.createElement)(b.BlockControls,null,Object(h.createElement)(F.Toolbar,null,Object(h.createElement)(F.DropdownMenu,{icon:Object(h.createElement)(h.Fragment,null,Object(h.createElement)(F.Dashicon,{icon:"update"})," ",c&&Object(h.createElement)(h.Fragment,null,c)),label:Object(v.__)("Select a plan","full-site-editing"),className:"premium-content-toolbar-button"},(function(t){var r=t.onClose;return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(Te,E()({},e,{onSelected:n,onClose:r,selectedPlan:i})),Object(h.createElement)(De,E()({},e,{onClose:r})))}))))}function Me(e){var t=Object(h.useState)(0),n=P()(t,2),r=n[0],o=n[1],i=e.attributes,c=e.setAttributes,s=e.className,l=e.savePlan,a=(e.currencies,e.siteSlug);return Object(h.createElement)(b.InspectorControls,null,a&&Object(h.createElement)(F.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(a),className:"wp-block-premium-content-container---link-to-earn"},Object(v.__)("Manage your subscriptions.","full-site-editing")),Object(h.createElement)(F.PanelBody,{title:"Add a new subscription",initialOpen:!0,className:"".concat(s,"---settings-add_plan")},1===r&&Object(h.createElement)(F.Placeholder,{icon:"lock",label:Object(v.__)("Premium Content","full-site-editing"),instructions:Object(v.__)("Saving plan…","full-site-editing")},Object(h.createElement)(F.Spinner,null)),0===r&&Object(h.createElement)("div",null,Object(h.createElement)(F.PanelRow,{className:"plan-name"},Object(h.createElement)(F.TextControl,{id:"new-plan-name",label:"Name",value:i.newPlanName,onChange:function(e){return c({newPlanName:e})}})),Object(h.createElement)(F.PanelRow,{className:"plan-price"},Object(h.createElement)(F.SelectControl,{label:"Currency",onChange:function(e){return c({newPlanCurrency:e})},value:i.newPlanCurrency,options:Qe}),Object(h.createElement)(F.TextControl,{label:"Price",value:i.newPlanPrice,onChange:function(e){return c({newPlanPrice:parseFloat(e)})},type:"number"})),Object(h.createElement)(F.PanelRow,{className:"plan-interval"},Object(h.createElement)(F.SelectControl,{label:"Interval",onChange:function(e){return c({newPlanInterval:e})},value:i.newPlanInterval,options:[{label:"Month",value:"1 month"},{label:"Year",value:"1 year"}]})),Object(h.createElement)(F.PanelRow,null,Object(h.createElement)(F.Button,{isSecondary:!0,isLarge:!0,onClick:function(t){t.preventDefault(),o(1),l(e.attributes,(function(e){o(0),e&&(c({newPlanPrice:5}),c({newPlanName:""}))}))}},Object(v.__)("Add subscription","full-site-editing"))))))}var $e=Object(B.compose)([Object(k.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=a()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(h.createElement)(b.Warning,{actions:n&&[Object(h.createElement)(F.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button stripe-nudge__button"},Object(v.__)("Connect","full-site-editing"))],className:"premium-content-block-nudge"},Object(h.createElement)("span",{className:"premium-content-block-nudge__info"},Object(h.createElement)(F.Dashicon,{icon:"star-filled"}),Object(h.createElement)("span",{className:"premium-content-block-nudge__text-container"},Object(h.createElement)("span",{className:"premium-content-block-nudge__title"},Object(v.__)("Connect to Stripe to use this block on your site","full-site-editing")),Object(h.createElement)("span",{className:"premium-content-block-nudge__message"},Object(v.__)("This block will be hidden from your visitors until you connect to Stripe.","full-site-editing")))))})),Ue={selectedTab:{id:"",className:"",label:Object(h.createElement)(h.Fragment,null)},stripeNudge:null},Ke=Object(h.createContext)(Ue),Ge=[{id:"premium",label:Object(h.createElement)("span",null,Object(v.__)("Subscriber View","full-site-editing")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:Object(h.createElement)("span",null,Object(v.__)("Non-subscriber View","full-site-editing")),className:"wp-premium-content-logged-out-view"}],Ve=[];function He(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)}var We=Object(B.compose)([Object(k.withSelect)((function(e){return{postId:(0,e("core/editor").getCurrentPostId)()}})),F.withNotices,Object(k.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.clientId)}}}))])((function(e){var t=Object(h.useState)(Ge[1]),n=P()(t,2),r=n[0],o=n[1],i=Object(h.useState)(!1),c=P()(i,2),s=c[0],l=c[1],a=Object(h.useState)(Ve),u=P()(a,2),p=u[0],d=u[1],m=Object(h.useState)(null),g=P()(m,2),b=g[0],y=g[1],O=Object(h.useState)(0),j=P()(O,2),w=j[0],C=j[1],_=Object(h.useState)(!1),k=P()(_,2),x=k[0],S=k[1],B=Object(h.useState)(""),A=P()(B,2),R=A[0],L=A[1],T=Object(h.useState)(""),D=P()(T,2),I=D[0],M=D[1];function $(t,n){if(!t.newPlanName||0===t.newPlanName.length)return He(e,Object(v.__)("Plan requires a name","full-site-editing")),void n(!1);var r=parseFloat(t.newPlanPrice),o=et(t.newPlanCurrency),i=Object(v.sprintf)(Object(v.__)("Minimum allowed price is %s.","full-site-editing"),Fe(o,t.newPlanCurrency));if(r<o)return He(e,i),void n(!1);if(!tt(t.newPlanCurrency,r))return He(e,Object(v.__)("Plan requires a valid price","full-site-editing")),void n(!1);var c={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};f()(c).then((function(t){var r={id:t.id,title:t.title,interval:t.interval,price:t.price,currency:t.currency};d(p.concat([r])),U(r),function(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createNotice({status:"info",content:t})}(e,Object(v.__)("Successfully created plan","full-site-editing")),n&&n(!0)}),(function(){He(e,Object(v.__)("There was an error when adding the plan.","full-site-editing")),n&&n(!1)}))}function U(t){e.setAttributes({selectedPlanId:t.id})}var K=Object(h.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}Object(h.useEffect)((function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}(K,l);var G=e.isSelected,V=e.className;if(Object(h.useEffect)((function(){var t=Object(N.getQueryArg)(window.location.href,"origin"),n={path:Object(N.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t?"gutenberg-wpcom":"gutenberg"}),method:"GET"};f()(n).then((function(t){if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return C(2),void He(e,Object.values(t.errors)[0][0]);y(t.connect_url),S(t.should_upgrade_to_access_memberships),L(t.upgrade_url),M(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?$({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:Object(v.__)("Monthly Subscription","full-site-editing"),newPlanInterval:"1 month"},(function(){C(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(d(t.products),e.attributes.selectedPlanId||U(t.products[0])),C(t.connected_account_id?1:2))}}),(function(t){y(null),C(2),He(e,t.message)})),setTimeout((function(){return e.selectBlock()}),1e3)}),[]),0===w)return Object(h.createElement)("div",{className:V,ref:K},e.noticeUI,Object(h.createElement)(F.Placeholder,{icon:"lock",label:Object(v.__)("Premium Content","full-site-editing"),instructions:Object(v.__)("Loading data…","full-site-editing")},Object(h.createElement)(F.Spinner,null)));if(x)return Object(h.createElement)("div",{className:V,ref:K},e.noticeUI,Object(h.createElement)(F.Placeholder,{icon:"lock",label:Object(v.__)("Premium Content","full-site-editing"),instructions:Object(v.__)("You'll need to upgrade your plan to use the Premium Content block.","full-site-editing")},Object(h.createElement)(F.Button,{isSecondary:!0,isLarge:!0,href:R,target:"_blank",className:"premium-content-block-nudge__button plan-nudge__button"},Object(v.__)("Upgrade Your Plan","full-site-editing")),Object(h.createElement)("div",{className:"membership-button__disclaimer"},Object(h.createElement)(F.ExternalLink,{href:"https://wordpress.com/support/premium-content-block/"},Object(v.__)("Read more about Premium Content and related fees.","full-site-editing")))));var H=null;if(!x&&1!==w&&b){var W=function(e,t){var n,r=e.postId;if(!Object(N.isURL)(t))return null;if(!r)return t;try{var o=Object(N.getQueryArg)(t,"state");"string"==typeof o&&(n=JSON.parse(window.atob(o)))}catch(i){return t}return n.from_editor_post_id=r,Object(N.addQueryArgs)(t,{state:window.btoa(JSON.stringify(n))})}(e,b);H=Object(h.createElement)($e,E()({},e,{stripeConnectUrl:W}))}return Object(h.createElement)("div",{className:V,ref:K},e.noticeUI,(G||s)&&1===w&&Object(h.createElement)(Ie,E()({},e,{plans:p,selectedPlanId:e.attributes.selectedPlanId,onSelected:U,getPlanDescription:function(e){var t=Fe(parseFloat(e.price),e.currency);return"1 month"===e.interval?Object(v.sprintf)(Object(v.__)("%s / month","full-site-editing"),t):"1 year"===e.interval?Object(v.sprintf)(Object(v.__)("%s / year","full-site-editing"),t):"one-time"===e.interval?t:Object(v.sprintf)(Object(v.__)("%1$s / %2$s","full-site-editing"),t,e.interval)}})),(G||s)&&1===w&&Object(h.createElement)(Me,E()({},e,{savePlan:$,siteSlug:I})),(G||s)&&Object(h.createElement)(Ae,E()({},e,{tabs:Ge,selectedTab:r,onSelected:o})),Object(h.createElement)(Ke.Provider,{value:{selectedTab:r,stripeNudge:H}},Object(h.createElement)(Re,null)))}));function ze(){for(var e=Object(g.getCategories)(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var o=function(){var t=c[i];if(e.some((function(e){return e.slug===t})))return{v:t}},i=0,c=n;i<c.length;i++){var s=o();if("object"==typeof s)return s.v}throw new Error("Could not find a category from the provided list: ".concat(n.join(",")))}var Ze="premium-content/container",Ye=ze("earn","common"),Je=function e(t){return 0===t.name.indexOf("premium-content/")||t.innerBlocks.some(e)},qe={name:Ze,attributes:{newPlanName:{type:"string",default:"Monthly Subscription"},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0}},title:Object(v.__)("Premium Content","full-site-editing"),description:Object(v.__)("Restrict access to your content for paying subscribers.","full-site-editing"),category:Ye,icon:Object(h.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(h.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(h.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(h.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),supports:{html:!1},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:function(e){if(!e.some(Je)&&(t=e[0],!(0,(n=Object(k.select)("core/block-editor")).getBlocksByClientId)((0,n.getBlockParents)(t.clientId)).find((function(e){return 0===e.name.indexOf("premium-content/")})))){var t,n,r=e.map((function(e){return Object(g.createBlock)(e.name,e.attributes,e.innerBlocks)}));return Object(g.createBlock)("premium-content/container",{},[Object(g.createBlock)("premium-content/subscriber-view",{},r),Object(g.createBlock)("premium-content/logged-out-view")])}}}]},keywords:["premium-content",Object(v.__)("premium","full-site-editing"),Object(v.__)("paywall","full-site-editing")],edit:We,save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-container"},Object(h.createElement)(b.InnerBlocks.Content,null))},providesContext:{"premium-content/planId":"selectedPlanId"}},Xe={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},Qe=Object.keys(Xe).map((function(e){var t=O(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(d.trimEnd)(t,"."))}}));function et(e){return Xe[e]}function tt(e,t){return!isNaN(t)&&t>=et(e)}var nt=Object(B.compose)([Object(k.withSelect)((function(e,t){return{hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length}}))])((function(e){return Object(h.createElement)(Ke.Consumer,null,(function(t){var n=t.selectedTab,r=t.stripeNudge;return Object(h.createElement)("div",{hidden:"wall"===n.id,className:n.className},r,Object(h.createElement)(b.InnerBlocks,{renderAppender:!e.hasInnerBlocks&&b.InnerBlocks.ButtonBlockAppender,templateLock:!1,template:[["core/paragraph",{placeholder:Object(v.__)("Insert the piece of content you want your visitors to see after they subscribe.","full-site-editing")}]]}))}))}));var rt="premium-content/subscriber-view",ot=ze("design","common"),it={name:rt,category:ot,attributes:{},title:Object(v.__)("Subscriber View","full-site-editing"),description:Object(v.__)("Subscriber View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:nt,save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-subscriber-view"},Object(h.createElement)(b.InnerBlocks.Content,null))}},ct=function(){return Object(h.createElement)(Ke.Consumer,null,(function(e){var t=e.selectedTab,n=e.stripeNudge;return Object(h.createElement)("div",{hidden:"premium"===t.id,className:t.className},n,Object(h.createElement)(b.InnerBlocks,{templateLock:!1,template:[["core/heading",{content:Object(v.__)("Subscribe to get access","full-site-editing"),level:3}],["core/paragraph",{content:Object(v.__)("Read more of this content when you subscribe today.","full-site-editing")}],["premium-content/buttons"]]}))}))};var st=[{attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},isEligible:function(e){return!!e.buttonClasses},migrate:function(e,t){var n=Object(g.createBlock)("premium-content/buttons",{},[Object(g.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),Object(g.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[].concat(R()(t),[n])]},save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(h.createElement)(b.InnerBlocks.Content,null))}}],lt=n(21),at="premium-content/logged-out-view",ut=ze("design","common"),pt={name:at,category:ut,attributes:{},title:Object(v.__)("Logged Out View","full-site-editing"),description:Object(v.__)("Logged Out View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:ct,save:function(){return Object(h.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(h.createElement)(b.InnerBlocks.Content,null))},deprecated:st},dt=Object(k.subscribe)((function(){var e=Object(k.select)("core/rich-text").getFormatType("core/link");if(e){dt(),Object(lt.unregisterFormatType)("core/link");var t=Object(B.compose)(Object(k.withSelect)((function(e){return{selectedBlock:e("core/block-editor").getSelectedBlock()}})),Object(B.ifCondition)((function(e){return e.selectedBlock&&e.selectedBlock.name!==at})))(e.edit);Object(lt.registerFormatType)("core/link",p()(p()({},e),{},{edit:t}))}})),mt=n(22),ft=Object(h.createElement)(mt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(h.createElement)(mt.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"})),gt=n(37),bt=["core/button","jetpack/recurring-payments","premium-content/login-button"],ht={isEmbedButton:!0};var vt=Object(B.compose)([Object(k.withSelect)((function(e,t){var n=e("core/block-editor").getBlock(t.clientId).innerBlocks.find((function(e){return"jetpack/recurring-payments"===e.name}));return{subscribeButton:n,jetpackButton:e("core/block-editor").getBlock(n.clientId).innerBlocks.find((function(e){return"jetpack/button"===e.name}))}})),Object(k.withDispatch)((function(e,t){return{setSubscribeButtonPlan:function(n){e("core/block-editor").updateBlockAttributes(t.subscribeButton.clientId,{planId:n})},setSubscribeButtonText:function(n){e("core/block-editor").updateBlockAttributes(t.jetpackButton.clientId,{text:n})}}}))])((function(e){var t=e.context,n=e.jetpackButton,r=e.subscribeButton,o=e.setSubscribeButtonText,i=e.setSubscribeButtonPlan,c=t?t["premium-content/planId"]:null,s=[["jetpack/recurring-payments",{planId:c,submitButtonText:Object(v.__)("Subscribe","full-site-editing")}],["premium-content/login-button"]];return Object(h.useEffect)((function(){c&&r&&r.attributes.planId!==c&&i(c)}),[c,r]),Object(h.useEffect)((function(){r&&Object(gt.addFilter)("jetpack.RecurringPayments.showControls","full-site-editing/premium-content-hide-recurring-payments-controls",(function(e,t){return t!==r.clientId&&e}))}),[r]),Object(h.useEffect)((function(){n&&o(Object(v.__)("Subscribe","full-site-editing"))}),[n,o]),Object(h.createElement)(b.__experimentalBlock.div,{className:"wp-block-buttons"},Object(h.createElement)(b.__experimentalAlignmentHookSettingsProvider,{value:ht},Object(h.createElement)(b.InnerBlocks,{allowedBlocks:bt,template:s,__experimentalMoverDirection:"horizontal"})))}));var yt="premium-content/buttons",Ot=ze("design","common"),jt={name:yt,category:Ot,title:Object(v.__)("Premium Content buttons","full-site-editing"),description:Object(v.__)("Prompt Premium Content visitors to take action with a group of button-style links.","full-site-editing"),icon:ft,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0},keywords:[Object(v.__)("link","full-site-editing")],edit:vt,save:function(){return Object(h.createElement)("div",{className:"wp-block-buttons"},Object(h.createElement)(b.InnerBlocks.Content,null))},usesContext:["premium-content/planId"]},wt=n(13),Ct=n.n(wt),_t="web"===h.Platform.OS;var kt=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n};function xt(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,i=window,c=i.getComputedStyle,s=i.Node,l=Object(h.useState)(),a=P()(l,2),u=a[0],p=a[1],d=Object(h.useState)(),m=P()(d,2),f=m[0],g=m[1],y=_t?Object(v.__)("Color settings","full-site-editing"):Object(v.__)("Color Settings","full-site-editing");return Object(h.useEffect)((function(){if(!_t||o){var e=function(e){return document.getElementById("block-"+e)}(n);if(e){g(c(e).color);for(var t=e,r=c(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===s.ELEMENT_NODE;)t=t.parentNode,r=c(t).backgroundColor;p(r)}}})),Object(h.createElement)(b.InspectorControls,null,Object(h.createElement)(b.__experimentalPanelColorGradientSettings,{title:y,initialOpen:!1,settings:t},_t&&o&&Object(h.createElement)(b.ContrastChecker,{backgroundColor:u,textColor:f})))}var Et=function(e){var t,n,r,o=e.attributes,i=Object(k.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),c=i.colors,s=i.gradients,l=Object(h.useRef)(o);Object(h.useEffect)((function(){l.current=o}),[o]);var a,u,d=o.style,m=o.textColor,f=o.backgroundColor,g=o.gradient;a=g?Object(b.getGradientValueBySlug)(s,g):null==d||null===(u=d.color)||void 0===u?void 0:u.gradient;var y=function(t){return function(n){var r,o,i=Object(b.getColorObjectByColorValue)(c,n),s=t+"Color",a=p()(p()({},l.current.style),{},{color:p()(p()({},null===(r=l.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},T()({},t,(null==i?void 0:i.slug)?void 0:n))}),u=(null==i?void 0:i.slug)?i.slug:void 0,d=T()({style:kt(a)},s,u);e.setAttributes(d),l.current=p()(p()({},l.current),d)}};return Object(h.createElement)(xt,{enableContrastChecking:!g&&!(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[{label:Object(v.__)("Text Color","full-site-editing"),onColorChange:y("text"),colorValue:Object(b.getColorObjectByAttributeValues)(c,m,null==d||null===(n=d.color)||void 0===n?void 0:n.text).color},{label:Object(v.__)("Background Color","full-site-editing"),onColorChange:y("background"),colorValue:Object(b.getColorObjectByAttributeValues)(c,f,null==d||null===(r=d.color)||void 0===r?void 0:r.background).color,gradientValue:a,onGradientChange:function(t){var n,r=Object(b.getGradientSlugByValue)(s,t);if(r){var o,i,c,a=p()(p()({},null===(o=l.current)||void 0===o?void 0:o.style),{},{color:p()(p()({},null===(i=l.current)||void 0===i||null===(c=i.style)||void 0===c?void 0:c.color),{},{gradient:void 0})});n={style:kt(a),gradient:r}}else{var u,d,m,f=p()(p()({},null===(u=l.current)||void 0===u?void 0:u.style),{},{color:p()(p()({},null===(d=l.current)||void 0===d||null===(m=d.style)||void 0===m?void 0:m.color),{},{gradient:t})});n={style:kt(f),gradient:void 0}}e.setAttributes(n),l.current=p()(p()({},l.current),n)}}]})};function St(e){var t,n,r,o,i,c,s,l,a,u,p,d=e.backgroundColor,m=e.textColor,f=e.gradient,g=e.style,h=Object(b.getColorClassName)("background-color",d),v=Object(b.__experimentalGetGradientClass)(f),y=Object(b.getColorClassName)("color",m),O=Ct()(y,v,(i={},T()(i,h,!(null==g||null===(t=g.color)||void 0===t?void 0:t.gradient)&&!!h),T()(i,"has-text-color",m||(null==g||null===(n=g.color)||void 0===n?void 0:n.text)),T()(i,"has-background",d||(null==g||null===(r=g.color)||void 0===r?void 0:r.background)||f||(null==g||null===(o=g.color)||void 0===o?void 0:o.gradient)),i));return{className:O||void 0,style:(null==g||null===(c=g.color)||void 0===c?void 0:c.background)||(null==g||null===(s=g.color)||void 0===s?void 0:s.text)||(null==g||null===(l=g.color)||void 0===l?void 0:l.gradient)?{background:(null==g||null===(a=g.color)||void 0===a?void 0:a.gradient)?g.color.gradient:void 0,backgroundColor:(null==g||null===(u=g.color)||void 0===u?void 0:u.background)?g.color.background:void 0,color:(null==g||null===(p=g.color)||void 0===p?void 0:p.text)?g.color.text:void 0}:{}}}function Pt(e){var t=e.borderRadius,n=void 0===t?"":t,r=e.setAttributes,o=Object(h.useCallback)((function(e){r({borderRadius:e})}),[r]);return Object(h.createElement)(F.PanelBody,{title:Object(v.__)("Border settings","full-site-editing")},Object(h.createElement)(F.RangeControl,{value:n,label:Object(v.__)("Border radius","full-site-editing"),min:0,max:50,initialPosition:5,allowReset:!0,onChange:o}))}var Ft=function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.borderRadius,i=t.text,c=St(t);return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(b.__experimentalBlock.div,{className:"wp-block-button"},Object(h.createElement)(b.RichText,{placeholder:Object(v.__)("Add text…","full-site-editing"),value:i,onChange:function(e){return n({text:e})},withoutInteractiveFormatting:!0,className:Ct()(r,"wp-block-button__link",c.className,{"no-border-radius":0===o}),style:p()({borderRadius:o?o+"px":void 0},c.style)})),Object(h.createElement)(b.InspectorControls,null,Object(h.createElement)(Et,e),Object(h.createElement)(Pt,{borderRadius:o,setAttributes:n})))};var Bt="premium-content/login-button",Nt=ze("design","common"),At={name:Bt,title:Object(v.__)("Premium Content login button","full-site-editing"),description:Object(v.__)("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","full-site-editing"),attributes:{text:{type:"string",source:"html",selector:"a",default:Object(v.__)("Log in","full-site-editing")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},icon:ft,keywords:[Object(v.__)("link","full-site-editing")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0},styles:[{name:"fill",label:Object(v.__)("Fill","full-site-editing"),isDefault:!0},{name:"outline",label:Object(v.__)("Outline","full-site-editing")}],edit:Ft,save:function(e){var t=e.attributes,n=t.borderRadius,r=t.text,o=St(t),i=Ct()("wp-block-button__link",o.className,{"no-border-radius":0===n}),c=p()({borderRadius:n?n+"px":void 0},o.style);return Object(h.createElement)("div",{className:"wp-block-button"},Object(h.createElement)(b.RichText.Content,{tagName:"a",className:i,style:c,value:r}))}},Rt=!(!b.__experimentalAlignmentHookSettingsProvider||!b.__experimentalBlock),Lt=function(e){if(e){var t=e.name,n=e.category,r=e.settings;Object(g.registerBlockType)(t,p()({category:n},r))}},Tt=function(e,t){var n=Object(g.getBlockType)(e);if(n){Object(g.unregisterBlockType)(e);var r=Object(d.mergeWith)({},n,t,(function(e,t){if(Array.isArray(e))return e.concat(t)}));Object(g.registerBlockType)(e,r)}},Dt=function(){var e=a()(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",f()({path:"/wpcom/v2/memberships/status"}));case 4:return e.prev=4,e.t0=e.catch(0),e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,null,[[0,4]])})));return function(){return e.apply(this,arguments)}}(),It=function(e){!e.should_upgrade_to_access_memberships&&e.connected_account_id||(Tt(yt,{supports:{inserter:!1}}),Tt(Bt,{supports:{inserter:!1}}))},Mt=function(){var e=a()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Dt();case 2:t=e.sent,It(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$t=function(){[r,i,o,c,s].forEach(Lt)};Rt&&($t(),Mt())}]));
|
1 |
+
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=60)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r=n(10);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}e.exports=function(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){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){var r=n(39),o=n(40),i=n(23),c=n(41);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){var r;
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
16 |
object-assign
|
17 |
(c) Sindre Sorhus
|
18 |
@license MIT
|
19 |
+
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function c(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,l=c(e),a=1;a<arguments.length;a++){for(var u in n=Object(arguments[a]))o.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var p=0;p<s.length;p++)i.call(n,s[p])&&(l[s[p]]=n[s[p]])}}return l}},function(e,t,n){"use strict";n.r(t),n.d(t,"registerPremiumContentBlocks",(function(){return Ut}));var r={};n.r(r),n.d(r,"name",(function(){return Ye})),n.d(r,"category",(function(){return Je})),n.d(r,"settings",(function(){return Xe})),n.d(r,"SUPPORTED_CURRENCIES",(function(){return Qe})),n.d(r,"CURRENCY_OPTIONS",(function(){return et})),n.d(r,"minimumTransactionAmountForCurrency",(function(){return tt})),n.d(r,"isPriceValid",(function(){return nt}));var o={};n.r(o),n.d(o,"name",(function(){return ot})),n.d(o,"category",(function(){return it})),n.d(o,"settings",(function(){return ct}));var i={};n.r(i),n.d(i,"name",(function(){return ut})),n.d(i,"category",(function(){return pt})),n.d(i,"settings",(function(){return dt}));var c={};n.r(c),n.d(c,"name",(function(){return Ot})),n.d(c,"category",(function(){return jt})),n.d(c,"settings",(function(){return wt}));var s={};n.r(s),n.d(s,"name",(function(){return Nt})),n.d(s,"category",(function(){return At})),n.d(s,"settings",(function(){return Rt}));var l=n(16),a=n.n(l),u=n(4),p=n.n(u),d=n(12),m=n(17),f=n.n(m),g=n(6),b=n(2),h=n(1),v={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function y(e){return v[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}var O,j,w,C,_=n(5),k=n(9),x=n.n(k),E=n(7),S=n.n(E),P=n(0),B=n(3),F=n(8),N=n(14),A=n(15),R=n.n(A),L=n(10),T=n.n(L),I=n(28),D=n.n(I),M=n(29),$=n.n(M);O={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},j=["(","?"],w={")":["("],":":["?","?:"]},C=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var U={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function K(e){var t=function(e){for(var t,n,r,o,i=[],c=[];t=e.match(C);){for(n=t[0],(r=e.substr(0,t.index).trim())&&i.push(r);o=c.pop();){if(w[n]){if(w[n][0]===o){n=w[n][1]||n;break}}else if(j.indexOf(o)>=0||O[o]<O[n]){c.push(o);break}i.push(o)}w[n]||c.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&i.push(e),i.concat(c.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,c,s,l=[];for(n=0;n<e.length;n++){if(c=e[n],i=U[c]){for(r=i.length,o=Array(r);r--;)o[r]=l.pop();try{s=i.apply(null,o)}catch(a){return a}}else s=t.hasOwnProperty(c)?t[c]:+c;l.push(s)}return l[0]}(t,e)}}var G={contextDelimiter:"",onMissingKey:null};function H(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},G)this.options[n]=void 0!==t&&n in t?t[n]:G[n]}H.prototype.getPluralForm=function(e,t){var n,r,o,i,c=this.pluralForms[e];return c||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=K(r),o=function(e){return+i({n:e})}),c=this.pluralForms[e]=o),c(t)},H.prototype.dcnpgettext=function(e,t,n,r,o){var i,c,s;return i=void 0===o?0:this.getPluralForm(e,o),c=n,t&&(c=t+this.options.contextDelimiter+n),(s=this.data[e][c])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var V=n(30),W=n.n(V),z=n(31),Z=n.n(z),Y=n(20),J=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function q(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(J,(function(){var e,r,o,i,c;return e=arguments[3],r=arguments[5],"%"===(i=arguments[9])?"%":("*"===(o=arguments[7])&&(o=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(c=t[0][r]):(void 0===e&&(e=n),n++,c=t[e-1]),"f"===i?c=parseFloat(c)||0:"d"===i&&(c=parseInt(c)||0),void 0!==o&&("f"===i?c=c.toFixed(o):"s"===i&&(c=c.substr(0,o))),null!=c?c:"")}))}
|
20 |
/*
|
21 |
* Exposes number format capability
|
22 |
*
|
23 |
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
|
24 |
* @license See CREDITS.md
|
25 |
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
|
26 |
+
*/function X(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,c=void 0===r?",":r,s=void 0===n?".":n,l="";return(l=(i?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split("."))[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(l[1]||"").length<i&&(l[1]=l[1]||"",l[1]+=new Array(i-l[1].length+1).join("0")),l.join(s)}var Q=D()("i18n-calypso"),ee="number_format_decimals",te="number_format_thousands_sep",ne="messages",re=[function(e){return e}],oe={};function ie(){ue.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function ce(e){return Array.prototype.slice.call(e)}function se(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&ie("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",ce(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&ie("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",ce(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function le(e,t){return e.dcnpgettext(ne,t.context,t.original,t.plural,t.count)}function ae(e,t){for(var n=re.length-1;n>=0;n--){var r=re[n](Object.assign({},t)),o=r.context?r.context+""+r.original:r.original;if(e.state.locale[o])return le(e.state.tannin,r)}return null}function ue(){if(!(this instanceof ue))return new ue;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:W()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new Y.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}ue.throwErrors=!1,ue.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},ue.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},ue.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},ue.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",o=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return X(e,n,r,o)},ue.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},ue.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==oe[n+e])return oe[n+e];var r=Z()().update(e).digest("hex");return oe[n+e]=t?r.substr(0,t):r},c=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)re.push(c(!1));else{var s=o.substr(5).indexOf("-");if(s<0){var l=Number(o.substr(5));re.push(c(l))}else for(var a=Number(o.substr(5,s)),u=Number(o.substr(6+s)),p=a;p<=u;p++)re.push(c(p))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new H(T()({},ne,this.state.locale)),this.state.numberFormatSettings.decimal_point=le(this.state.tannin,se([ee])),this.state.numberFormatSettings.thousands_sep=le(this.state.tannin,se([te])),this.state.numberFormatSettings.decimal_point===ee&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===te&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},ue.prototype.getLocale=function(){return this.state.locale},ue.prototype.getLocaleSlug=function(){return this.state.localeSlug},ue.prototype.isRtl=function(){return"rtl"===this.state.textDirection},ue.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},ue.prototype.hasTranslation=function(){return!!ae(this,se(arguments))},ue.prototype.translate=function(){var e=se(arguments),t=ae(this,e);if(t||(t=le(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=q.apply(void 0,R()(n))}catch(o){if(!window||!window.console)return;var r=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[r](o):window.console[r]("i18n sprintf error:",n)}}return e.components&&(t=$()({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},ue.prototype.reRenderTranslations=function(){Q("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},ue.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},ue.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var pe=ue,de=n(32),me=n.n(de),fe=n(33),ge=n.n(fe),be=n(18),he=n.n(be),ve=n(34),ye=n.n(ve),Oe=n(35),je=n.n(Oe),we=n(11),Ce=n.n(we),_e=n(36);var ke,xe,Ee=new pe,Se=Ee.numberFormat.bind(Ee),Pe=(Ee.translate.bind(Ee),Ee.configure.bind(Ee),Ee.setLocale.bind(Ee),Ee.getLocale.bind(Ee),Ee.getLocaleSlug.bind(Ee),Ee.addTranslations.bind(Ee),Ee.reRenderTranslations.bind(Ee),Ee.registerComponentUpdateHook.bind(Ee),Ee.registerTranslateHook.bind(Ee),Ee.state,Ee.stateObserver,Ee.on.bind(Ee),Ee.off.bind(Ee),Ee.emit.bind(Ee),xe={numberFormat:(ke=Ee).numberFormat.bind(ke),translate:ke.translate.bind(ke)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(Ee),function(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return Object(_e.useSubscription)(t)}var r=Object(F.createHigherOrderComponent)((function(e){return Object(we.forwardRef)((function(t,r){var o=n();return Ce.a.createElement(e,x()({},t,{isRtl:o,ref:r}))}))}),"WithRTL");return{useRtl:n,withRtl:r}}(Ee));Pe.useRtl,Pe.withRtl;function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=y(t);if(!r||isNaN(e))return null;var o=p()(p()({},r),n),i=o.decimal,c=o.grouping,s=o.precision,l=o.symbol,a=e<0?"-":"",u=Se(Math.abs(e),{decimals:s,thousandsSep:c,decPoint:i});return n.stripZeros&&(u=Fe(u,i)),"".concat(a).concat(l).concat(u)}function Fe(e,t){var n=new RegExp("\\".concat(t,"0+$"));return e.replace(n,"")}function Ne(e){var t=e.className,n=e.tab,r=e.label,o=e.selectedTab,i=e.onSelected,c=(n.id===o.id?["is-pressed","is-active"]:[]).concat([t,"components-button","components-tab-button"]);return Object(P.createElement)("button",{type:"button",onClick:function(){return i(n)},className:c.join(" ")},r)}function Ae(e){var t=e.className,n=e.tabs,r=e.selectedTab,o=e.onSelected,i=e.selectBlock;return Object(P.createElement)("div",{className:"premium-content-tabs block-editor-block-toolbar"},n.map((function(n){return Object(P.createElement)(Ne,x()({key:n.id},e,{tab:n,selectedTab:r,className:"".concat(t,"--tab"),label:n.label,onSelected:o}))})),Object(P.createElement)("button",{onClick:function(){Object(_.select)("core/edit-post").isEditorSidebarOpened()||Object(_.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block"),i()},className:"edit components-button is-button is-secondary"},Object(h.__)("Edit","full-site-editing")))}function Re(){return Object(P.createElement)("div",{className:"premium-content-wrapper"},Object(P.createElement)(b.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]]}))}function Le(e){var t=e.className,n=e.plan,r=e.selectedPlan,o=e.onSelected,i=e.onClose,c=e.getPlanDescription,s=r&&n.id===r.id,l=(s?["is-selected"]:[]).concat([t]).join(" "),a=s?"yes":void 0,u=null;return n&&(u=" "+c(n)),Object(P.createElement)(B.MenuItem,{onClick:function(e){e.preventDefault(),o(n),i()},className:l,key:n.id,value:n.id,selected:s,icon:a},n.title," : ",u)}function Te(e){var t=e.plans,n=e.selectedPlan,r=e.onSelected;return Object(P.createElement)(B.MenuGroup,null,t.map((function(t){return Object(P.createElement)(Le,x()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t}))})))}function Ie(e){return Object(P.createElement)(B.MenuGroup,null,Object(P.createElement)(B.MenuItem,{onClick:function(t){t.preventDefault(),Object(_.select)("core/edit-post").isEditorSidebarOpened()||Object(_.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");var n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},Object(h.__)("Add a new subscription","full-site-editing")))}function De(e){var t=e.selectedPlanId,n=e.onSelected,r=e.plans,o=e.getPlanDescription,i=r.find((function(e){return e.id===t})),c=null;return i&&(c=" "+o(i)),Object(P.createElement)(b.BlockControls,null,Object(P.createElement)(B.Toolbar,null,Object(P.createElement)(B.DropdownMenu,{icon:Object(P.createElement)(P.Fragment,null,Object(P.createElement)(B.Dashicon,{icon:"update"})," ",c&&Object(P.createElement)(P.Fragment,null,c)),label:Object(h.__)("Select a plan","full-site-editing"),className:"premium-content-toolbar-button"},(function(t){var r=t.onClose;return Object(P.createElement)(P.Fragment,null,Object(P.createElement)(Te,x()({},e,{onSelected:n,onClose:r,selectedPlan:i})),Object(P.createElement)(Ie,x()({},e,{onClose:r})))}))))}function Me(e){var t=Object(P.useState)(0),n=S()(t,2),r=n[0],o=n[1],i=e.attributes,c=e.setAttributes,s=e.className,l=e.savePlan,a=(e.currencies,e.siteSlug);return Object(P.createElement)(b.InspectorControls,null,a&&Object(P.createElement)(B.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(a),className:"wp-block-premium-content-container---link-to-earn"},Object(h.__)("Manage your subscriptions.","full-site-editing")),Object(P.createElement)(B.PanelBody,{title:"Add a new subscription",initialOpen:!0,className:"".concat(s,"---settings-add_plan")},1===r&&Object(P.createElement)(B.Placeholder,{icon:"lock",label:Object(h.__)("Premium Content","full-site-editing"),instructions:Object(h.__)("Saving plan…","full-site-editing")},Object(P.createElement)(B.Spinner,null)),0===r&&Object(P.createElement)("div",null,Object(P.createElement)(B.PanelRow,{className:"plan-name"},Object(P.createElement)(B.TextControl,{id:"new-plan-name",label:"Name",value:i.newPlanName,onChange:function(e){return c({newPlanName:e})}})),Object(P.createElement)(B.PanelRow,{className:"plan-price"},Object(P.createElement)(B.SelectControl,{label:"Currency",onChange:function(e){return c({newPlanCurrency:e})},value:i.newPlanCurrency,options:et}),Object(P.createElement)(B.TextControl,{label:"Price",value:i.newPlanPrice,onChange:function(e){return c({newPlanPrice:parseFloat(e)})},type:"number"})),Object(P.createElement)(B.PanelRow,{className:"plan-interval"},Object(P.createElement)(B.SelectControl,{label:"Interval",onChange:function(e){return c({newPlanInterval:e})},value:i.newPlanInterval,options:[{label:"Month",value:"1 month"},{label:"Year",value:"1 year"}]})),Object(P.createElement)(B.PanelRow,null,Object(P.createElement)(B.Button,{isSecondary:!0,isLarge:!0,onClick:function(t){t.preventDefault(),o(1),l(e.attributes,(function(e){o(0),e&&(c({newPlanPrice:5}),c({newPlanName:""}))}))}},Object(h.__)("Add subscription","full-site-editing"))))))}var $e=Object(F.compose)([Object(_.withDispatch)((function(e,t){var n,r=t.stripeConnectUrl;return{autosaveAndRedirect:(n=a()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.stripeConnectUrl;return Object(P.createElement)(b.Warning,{actions:n&&[Object(P.createElement)(B.Button,{key:"connect",href:n,onClick:t,target:"_top",isDefault:!0,className:"premium-content-block-nudge__button stripe-nudge__button"},Object(h.__)("Connect","full-site-editing"))],className:"premium-content-block-nudge"},Object(P.createElement)("span",{className:"premium-content-block-nudge__info"},Object(P.createElement)(B.Dashicon,{icon:"star-filled"}),Object(P.createElement)("span",{className:"premium-content-block-nudge__text-container"},Object(P.createElement)("span",{className:"premium-content-block-nudge__title"},Object(h.__)("Connect to Stripe to use this block on your site","full-site-editing")),Object(P.createElement)("span",{className:"premium-content-block-nudge__message"},Object(h.__)("This block will be hidden from your visitors until you connect to Stripe.","full-site-editing")))))})),Ue={selectedTab:{id:"",className:"",label:Object(P.createElement)(P.Fragment,null)},stripeNudge:null},Ke=Object(P.createContext)(Ue),Ge=[{id:"premium",label:Object(P.createElement)("span",null,Object(h.__)("Subscriber View","full-site-editing")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:Object(P.createElement)("span",null,Object(h.__)("Non-subscriber View","full-site-editing")),className:"wp-premium-content-logged-out-view"}],He=[];function Ve(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)}var We=Object(F.compose)([Object(_.withSelect)((function(e){return{postId:(0,e("core/editor").getCurrentPostId)()}})),B.withNotices,Object(_.withDispatch)((function(e,t){var n=e("core/block-editor");return{selectBlock:function(){n.selectBlock(t.clientId)}}}))])((function(e){var t=Object(P.useState)(Ge[1]),n=S()(t,2),r=n[0],o=n[1],i=Object(P.useState)(!1),c=S()(i,2),s=c[0],l=c[1],a=Object(P.useState)(He),u=S()(a,2),p=u[0],d=u[1],m=Object(P.useState)(null),g=S()(m,2),b=g[0],v=g[1],y=Object(P.useState)(0),O=S()(y,2),j=O[0],w=O[1],C=Object(P.useState)(!1),_=S()(C,2),k=_[0],E=_[1],F=Object(P.useState)(""),A=S()(F,2),R=A[0],L=A[1],T=Object(P.useState)(""),I=S()(T,2),D=I[0],M=I[1];function $(t,n){if(!t.newPlanName||0===t.newPlanName.length)return Ve(e,Object(h.__)("Plan requires a name","full-site-editing")),void n(!1);var r=parseFloat(t.newPlanPrice),o=tt(t.newPlanCurrency),i=Object(h.sprintf)(Object(h.__)("Minimum allowed price is %s.","full-site-editing"),Be(o,t.newPlanCurrency));if(r<o)return Ve(e,i),void n(!1);if(!nt(t.newPlanCurrency,r))return Ve(e,Object(h.__)("Plan requires a valid price","full-site-editing")),void n(!1);var c={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};f()(c).then((function(t){var r={id:t.id,title:t.title,interval:t.interval,price:t.price,currency:t.currency};d(p.concat([r])),U(r),function(e,t){var n=e.noticeOperations;n.removeAllNotices(),n.createNotice({status:"info",content:t})}(e,Object(h.__)("Successfully created plan","full-site-editing")),n&&n(!0)}),(function(){Ve(e,Object(h.__)("There was an error when adding the plan.","full-site-editing")),n&&n(!1)}))}function U(t){e.setAttributes({selectedPlanId:t.id})}var K=Object(P.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}Object(P.useEffect)((function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}(K,l);var G=e.isSelected,H=e.className;if(Object(P.useEffect)((function(){var t=Object(N.getQueryArg)(window.location.href,"origin"),n={path:Object(N.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t?"gutenberg-wpcom":"gutenberg"}),method:"GET"};f()(n).then((function(t){if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return w(2),void Ve(e,Object.values(t.errors)[0][0]);v(t.connect_url),E(t.should_upgrade_to_access_memberships),L(t.upgrade_url),M(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?$({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:Object(h.__)("Monthly Subscription","full-site-editing"),newPlanInterval:"1 month"},(function(){w(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(d(t.products),e.attributes.selectedPlanId||U(t.products[0])),w(t.connected_account_id?1:2))}}),(function(t){v(null),w(2),Ve(e,t.message)})),setTimeout((function(){return e.selectBlock()}),1e3)}),[]),0===j)return Object(P.createElement)("div",{className:H,ref:K},e.noticeUI,Object(P.createElement)(B.Placeholder,{icon:"lock",label:Object(h.__)("Premium Content","full-site-editing"),instructions:Object(h.__)("Loading data…","full-site-editing")},Object(P.createElement)(B.Spinner,null)));if(k)return Object(P.createElement)("div",{className:H,ref:K},e.noticeUI,Object(P.createElement)(B.Placeholder,{icon:"lock",label:Object(h.__)("Premium Content","full-site-editing"),instructions:Object(h.__)("You'll need to upgrade your plan to use the Premium Content block.","full-site-editing")},Object(P.createElement)(B.Button,{isSecondary:!0,isLarge:!0,href:R,target:"_blank",className:"premium-content-block-nudge__button plan-nudge__button"},Object(h.__)("Upgrade Your Plan","full-site-editing")),Object(P.createElement)("div",{className:"membership-button__disclaimer"},Object(P.createElement)(B.ExternalLink,{href:"https://wordpress.com/support/premium-content-block/"},Object(h.__)("Read more about Premium Content and related fees.","full-site-editing")))));var V=null;if(!k&&1!==j&&b){var W=function(e,t){var n,r=e.postId;if(!Object(N.isURL)(t))return null;if(!r)return t;try{var o=Object(N.getQueryArg)(t,"state");"string"==typeof o&&(n=JSON.parse(window.atob(o)))}catch(i){return t}return n.from_editor_post_id=r,Object(N.addQueryArgs)(t,{state:window.btoa(JSON.stringify(n))})}(e,b);V=Object(P.createElement)($e,x()({},e,{stripeConnectUrl:W}))}return Object(P.createElement)("div",{className:H,ref:K},e.noticeUI,(G||s)&&1===j&&Object(P.createElement)(De,x()({},e,{plans:p,selectedPlanId:e.attributes.selectedPlanId,onSelected:U,getPlanDescription:function(e){var t=Be(parseFloat(e.price),e.currency);return"1 month"===e.interval?Object(h.sprintf)(Object(h.__)("%s / month","full-site-editing"),t):"1 year"===e.interval?Object(h.sprintf)(Object(h.__)("%s / year","full-site-editing"),t):"one-time"===e.interval?t:Object(h.sprintf)(Object(h.__)("%1$s / %2$s","full-site-editing"),t,e.interval)}})),(G||s)&&1===j&&Object(P.createElement)(Me,x()({},e,{savePlan:$,siteSlug:D})),(G||s)&&Object(P.createElement)(Ae,x()({},e,{tabs:Ge,selectedTab:r,onSelected:o})),Object(P.createElement)(Ke.Provider,{value:{selectedTab:r,stripeNudge:V}},Object(P.createElement)(Re,null)))}));function ze(){for(var e=Object(g.getCategories)(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var o=function(){var t=c[i];if(e.some((function(e){return e.slug===t})))return{v:t}},i=0,c=n;i<c.length;i++){var s=o();if("object"==typeof s)return s.v}throw new Error("Could not find a category from the provided list: ".concat(n.join(",")))}var Ze=Object(P.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(P.createElement)("path",{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z",fill:"black"}),Object(P.createElement)("circle",{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(P.createElement)("path",{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"black",strokeWidth:"1.5",fill:"none"})),Ye="premium-content/container",Je=ze("earn","common"),qe=function e(t){return 0===t.name.indexOf("premium-content/")||t.innerBlocks.some(e)},Xe={name:Ye,attributes:{newPlanName:{type:"string",default:"Monthly Subscription"},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0}},title:Object(h.__)("Premium Content","full-site-editing"),description:Object(h.__)("Restrict access to your content for paying subscribers.","full-site-editing"),category:Je,icon:Ze,supports:{html:!1},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:function(e){if(!e.some(qe)&&(t=e[0],!(0,(n=Object(_.select)("core/block-editor")).getBlocksByClientId)((0,n.getBlockParents)(t.clientId)).find((function(e){return 0===e.name.indexOf("premium-content/")})))){var t,n,r=e.map((function(e){return Object(g.createBlock)(e.name,e.attributes,e.innerBlocks)}));return Object(g.createBlock)("premium-content/container",{},[Object(g.createBlock)("premium-content/subscriber-view",{},r),Object(g.createBlock)("premium-content/logged-out-view")])}}}]},keywords:["premium-content",Object(h.__)("premium","full-site-editing"),Object(h.__)("paywall","full-site-editing")],edit:We,save:function(){return Object(P.createElement)("div",{className:"wp-block-premium-content-container"},Object(P.createElement)(b.InnerBlocks.Content,null))},providesContext:{"premium-content/planId":"selectedPlanId"}},Qe={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},et=Object.keys(Qe).map((function(e){var t=y(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(d.trimEnd)(t,"."))}}));function tt(e){return Qe[e]}function nt(e,t){return!isNaN(t)&&t>=tt(e)}var rt=Object(F.compose)([Object(_.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getSelectedBlockClientId;return{parentClientId:(0,n.getBlockHierarchyRootClientId)(r()),hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length}}))])((function(e){var t=e.hasInnerBlocks,n=e.parentClientId,r=e.isSelected,o=Object(_.useDispatch)("core/block-editor").selectBlock;return Object(P.useEffect)((function(){r&&o(n)}),[o,r,n]),Object(P.createElement)(Ke.Consumer,null,(function(e){var n=e.selectedTab,r=e.stripeNudge;return Object(P.createElement)("div",{hidden:"wall"===n.id,className:n.className},r,Object(P.createElement)(b.InnerBlocks,{renderAppender:!t&&b.InnerBlocks.ButtonBlockAppender,templateLock:!1,template:[["core/paragraph",{placeholder:Object(h.__)("Insert the piece of content you want your visitors to see after they subscribe.","full-site-editing")}]]}))}))}));var ot="premium-content/subscriber-view",it=ze("design","common"),ct={name:ot,category:it,attributes:{},title:Object(h.__)("Subscriber View","full-site-editing"),description:Object(h.__)("Subscriber View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:rt,icon:Ze,save:function(){return Object(P.createElement)("div",{className:"wp-block-premium-content-subscriber-view entry-content"},Object(P.createElement)(b.InnerBlocks.Content,null))}};var st=Object(F.compose)(Object(_.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId;return{parentClientId:(0,t.getBlockHierarchyRootClientId)(n())}})))((function(e){var t=e.parentClientId,n=e.isSelected,r=Object(_.useDispatch)("core/block-editor").selectBlock;return Object(P.useEffect)((function(){n&&r(t)}),[r,n,t]),Object(P.createElement)(Ke.Consumer,null,(function(e){var t=e.selectedTab,n=e.stripeNudge;return Object(P.createElement)("div",{hidden:"premium"===t.id,className:t.className},n,Object(P.createElement)(b.InnerBlocks,{templateLock:!1,template:[["core/heading",{content:Object(h.__)("Subscribe to get access","full-site-editing"),level:3}],["core/paragraph",{content:Object(h.__)("Read more of this content when you subscribe today.","full-site-editing")}],["premium-content/buttons"]]}))}))}));var lt=[{attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},isEligible:function(e){return!!e.buttonClasses},migrate:function(e,t){var n=Object(g.createBlock)("premium-content/buttons",{},[Object(g.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),Object(g.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[].concat(R()(t),[n])]},save:function(){return Object(P.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},Object(P.createElement)(b.InnerBlocks.Content,null))}}],at=n(21),ut="premium-content/logged-out-view",pt=ze("design","common"),dt={name:ut,category:pt,attributes:{},title:Object(h.__)("Logged Out View","full-site-editing"),description:Object(h.__)("Logged Out View.","full-site-editing"),parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:st,save:function(){return Object(P.createElement)("div",{className:"wp-block-premium-content-logged-out-view entry-content"},Object(P.createElement)(b.InnerBlocks.Content,null))},icon:Ze,deprecated:lt},mt=Object(_.subscribe)((function(){var e=Object(_.select)("core/rich-text").getFormatType("core/link");if(e){mt(),Object(at.unregisterFormatType)("core/link");var t=Object(F.compose)(Object(_.withSelect)((function(e){return{selectedBlock:e("core/block-editor").getSelectedBlock()}})),Object(F.ifCondition)((function(e){return e.selectedBlock&&e.selectedBlock.name!==ut})))(e.edit);Object(at.registerFormatType)("core/link",p()(p()({},e),{},{edit:t}))}})),ft=n(22),gt=Object(P.createElement)(ft.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(P.createElement)(ft.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"})),bt=n(37),ht=["core/button","jetpack/recurring-payments","premium-content/login-button"],vt={isEmbedButton:!0};var yt=Object(F.compose)([Object(_.withSelect)((function(e,t){var n=e("core/block-editor").getBlock(t.clientId).innerBlocks.find((function(e){return"jetpack/recurring-payments"===e.name}));return{subscribeButton:n,jetpackButton:e("core/block-editor").getBlock(n.clientId).innerBlocks.find((function(e){return"jetpack/button"===e.name}))}})),Object(_.withDispatch)((function(e,t){return{setSubscribeButtonPlan:function(n){e("core/block-editor").updateBlockAttributes(t.subscribeButton.clientId,{planId:n})},setSubscribeButtonText:function(n){e("core/block-editor").updateBlockAttributes(t.jetpackButton.clientId,{text:n})}}}))])((function(e){var t=e.context,n=e.jetpackButton,r=e.subscribeButton,o=e.setSubscribeButtonText,i=e.setSubscribeButtonPlan,c=t?t["premium-content/planId"]:null,s=[["jetpack/recurring-payments",{planId:c,submitButtonText:Object(h.__)("Subscribe","full-site-editing")}],["premium-content/login-button"]];return Object(P.useEffect)((function(){c&&r&&r.attributes.planId!==c&&i(c)}),[c,r]),Object(P.useEffect)((function(){r&&Object(bt.addFilter)("jetpack.RecurringPayments.showControls","full-site-editing/premium-content-hide-recurring-payments-controls",(function(e,t){return t!==r.clientId&&e}))}),[r]),Object(P.useEffect)((function(){n&&o(Object(h.__)("Subscribe","full-site-editing"))}),[n,o]),Object(P.createElement)(b.__experimentalBlock.div,{className:"wp-block-buttons"},Object(P.createElement)(b.__experimentalAlignmentHookSettingsProvider,{value:vt},Object(P.createElement)(b.InnerBlocks,{allowedBlocks:ht,template:s,__experimentalMoverDirection:"horizontal"})))}));var Ot="premium-content/buttons",jt=ze("design","common"),wt={name:Ot,category:jt,title:Object(h.__)("Premium Content buttons","full-site-editing"),description:Object(h.__)("Prompt Premium Content visitors to take action with a group of button-style links.","full-site-editing"),icon:gt,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0},keywords:[Object(h.__)("link","full-site-editing")],edit:yt,save:function(){return Object(P.createElement)("div",{className:"wp-block-buttons"},Object(P.createElement)(b.InnerBlocks.Content,null))},usesContext:["premium-content/planId"]},Ct=n(13),_t=n.n(Ct),kt="web"===P.Platform.OS;var xt=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n};function Et(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,i=window,c=i.getComputedStyle,s=i.Node,l=Object(P.useState)(),a=S()(l,2),u=a[0],p=a[1],d=Object(P.useState)(),m=S()(d,2),f=m[0],g=m[1],v=kt?Object(h.__)("Color settings","full-site-editing"):Object(h.__)("Color Settings","full-site-editing");return Object(P.useEffect)((function(){if(!kt||o){var e=function(e){return document.getElementById("block-"+e)}(n);if(e){g(c(e).color);for(var t=e,r=c(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===s.ELEMENT_NODE;)t=t.parentNode,r=c(t).backgroundColor;p(r)}}})),Object(P.createElement)(b.InspectorControls,null,Object(P.createElement)(b.__experimentalPanelColorGradientSettings,{title:v,initialOpen:!1,settings:t},kt&&o&&Object(P.createElement)(b.ContrastChecker,{backgroundColor:u,textColor:f})))}var St=function(e){var t,n,r,o=e.attributes,i=Object(_.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),c=i.colors,s=i.gradients,l=Object(P.useRef)(o);Object(P.useEffect)((function(){l.current=o}),[o]);var a,u,d=o.style,m=o.textColor,f=o.backgroundColor,g=o.gradient;a=g?Object(b.getGradientValueBySlug)(s,g):null==d||null===(u=d.color)||void 0===u?void 0:u.gradient;var v=function(t){return function(n){var r,o,i=Object(b.getColorObjectByColorValue)(c,n),s=t+"Color",a=p()(p()({},l.current.style),{},{color:p()(p()({},null===(r=l.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},T()({},t,(null==i?void 0:i.slug)?void 0:n))}),u=(null==i?void 0:i.slug)?i.slug:void 0,d=T()({style:xt(a)},s,u);e.setAttributes(d),l.current=p()(p()({},l.current),d)}};return Object(P.createElement)(Et,{enableContrastChecking:!g&&!(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[{label:Object(h.__)("Text Color","full-site-editing"),onColorChange:v("text"),colorValue:Object(b.getColorObjectByAttributeValues)(c,m,null==d||null===(n=d.color)||void 0===n?void 0:n.text).color},{label:Object(h.__)("Background Color","full-site-editing"),onColorChange:v("background"),colorValue:Object(b.getColorObjectByAttributeValues)(c,f,null==d||null===(r=d.color)||void 0===r?void 0:r.background).color,gradientValue:a,onGradientChange:function(t){var n,r=Object(b.getGradientSlugByValue)(s,t);if(r){var o,i,c,a=p()(p()({},null===(o=l.current)||void 0===o?void 0:o.style),{},{color:p()(p()({},null===(i=l.current)||void 0===i||null===(c=i.style)||void 0===c?void 0:c.color),{},{gradient:void 0})});n={style:xt(a),gradient:r}}else{var u,d,m,f=p()(p()({},null===(u=l.current)||void 0===u?void 0:u.style),{},{color:p()(p()({},null===(d=l.current)||void 0===d||null===(m=d.style)||void 0===m?void 0:m.color),{},{gradient:t})});n={style:xt(f),gradient:void 0}}e.setAttributes(n),l.current=p()(p()({},l.current),n)}}]})};function Pt(e){var t,n,r,o,i,c,s,l,a,u,p,d=e.backgroundColor,m=e.textColor,f=e.gradient,g=e.style,h=Object(b.getColorClassName)("background-color",d),v=Object(b.__experimentalGetGradientClass)(f),y=Object(b.getColorClassName)("color",m),O=_t()(y,v,(i={},T()(i,h,!(null==g||null===(t=g.color)||void 0===t?void 0:t.gradient)&&!!h),T()(i,"has-text-color",m||(null==g||null===(n=g.color)||void 0===n?void 0:n.text)),T()(i,"has-background",d||(null==g||null===(r=g.color)||void 0===r?void 0:r.background)||f||(null==g||null===(o=g.color)||void 0===o?void 0:o.gradient)),i));return{className:O||void 0,style:(null==g||null===(c=g.color)||void 0===c?void 0:c.background)||(null==g||null===(s=g.color)||void 0===s?void 0:s.text)||(null==g||null===(l=g.color)||void 0===l?void 0:l.gradient)?{background:(null==g||null===(a=g.color)||void 0===a?void 0:a.gradient)?g.color.gradient:void 0,backgroundColor:(null==g||null===(u=g.color)||void 0===u?void 0:u.background)?g.color.background:void 0,color:(null==g||null===(p=g.color)||void 0===p?void 0:p.text)?g.color.text:void 0}:{}}}function Bt(e){var t=e.borderRadius,n=void 0===t?"":t,r=e.setAttributes,o=Object(P.useCallback)((function(e){r({borderRadius:e})}),[r]);return Object(P.createElement)(B.PanelBody,{title:Object(h.__)("Border settings","full-site-editing")},Object(P.createElement)(B.RangeControl,{value:n,label:Object(h.__)("Border radius","full-site-editing"),min:0,max:50,initialPosition:5,allowReset:!0,onChange:o}))}var Ft=function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.borderRadius,i=t.text,c=Pt(t);return Object(P.createElement)(P.Fragment,null,Object(P.createElement)(b.__experimentalBlock.div,{className:"wp-block-button"},Object(P.createElement)(b.RichText,{placeholder:Object(h.__)("Add text…","full-site-editing"),value:i,onChange:function(e){return n({text:e})},withoutInteractiveFormatting:!0,className:_t()(r,"wp-block-button__link",c.className,{"no-border-radius":0===o}),style:p()({borderRadius:o?o+"px":void 0},c.style)})),Object(P.createElement)(b.InspectorControls,null,Object(P.createElement)(St,e),Object(P.createElement)(Bt,{borderRadius:o,setAttributes:n})))};var Nt="premium-content/login-button",At=ze("design","common"),Rt={name:Nt,title:Object(h.__)("Premium Content login button","full-site-editing"),description:Object(h.__)("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","full-site-editing"),attributes:{text:{type:"string",source:"html",selector:"a",default:Object(h.__)("Log in","full-site-editing")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},icon:gt,keywords:[Object(h.__)("link","full-site-editing")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0},styles:[{name:"fill",label:Object(h.__)("Fill","full-site-editing"),isDefault:!0},{name:"outline",label:Object(h.__)("Outline","full-site-editing")}],edit:Ft,save:function(e){var t=e.attributes,n=t.borderRadius,r=t.text,o=Pt(t),i=_t()("wp-block-button__link",o.className,{"no-border-radius":0===n}),c=p()({borderRadius:n?n+"px":void 0},o.style);return Object(P.createElement)("div",{className:"wp-block-button"},Object(P.createElement)(b.RichText.Content,{tagName:"a",className:i,style:c,value:r}))}},Lt=!(!b.__experimentalAlignmentHookSettingsProvider||!b.__experimentalBlock),Tt=function(e){if(e){var t=e.name,n=e.category,r=e.settings;Object(g.registerBlockType)(t,p()({category:n},r))}},It=function(e,t){var n=Object(g.getBlockType)(e);if(n){Object(g.unregisterBlockType)(e);var r=Object(d.mergeWith)({},n,t,(function(e,t){if(Array.isArray(e))return e.concat(t)}));Object(g.registerBlockType)(e,r)}},Dt=function(){var e=a()(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",f()({path:"/wpcom/v2/memberships/status"}));case 4:return e.prev=4,e.t0=e.catch(0),e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,null,[[0,4]])})));return function(){return e.apply(this,arguments)}}(),Mt=function(e){!e.should_upgrade_to_access_memberships&&e.connected_account_id||(It(Ot,{supports:{inserter:!1}}),It(Nt,{supports:{inserter:!1}}))},$t=function(){var e=a()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Dt();case 2:t=e.sent,Mt(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ut=function(){[r,i,o,c,s].forEach(Tt)};Lt&&(Ut(),$t())}]));
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: alexislloyd, allancole, automattic, bartkalisz, codebykat, copons,
|
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.5
|
6 |
-
Stable tag: 2.
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -39,6 +39,18 @@ This plugin is experimental, so we don't provide any support for it outside of w
|
|
39 |
|
40 |
|
41 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
= 2.7.2 =
|
43 |
* Enable Coming Soon v2 for a12s
|
44 |
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.5
|
6 |
+
Stable tag: 2.8
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
39 |
|
40 |
|
41 |
== Changelog ==
|
42 |
+
= 2.8 =
|
43 |
+
* Editing Toolkit: Load patterns from the rest API endpoint v3 (https://github.com/Automattic/wp-calypso/pull/46463)
|
44 |
+
* Contextual-tips: remove /block-editor from URL (https://github.com/Automattic/wp-calypso/pull/46592)
|
45 |
+
* Premium Content: Fix margins on child blocks in Varia based themes (https://github.com/Automattic/wp-calypso/pull/46579)
|
46 |
+
* Premium Content Block: Remove the intermediate block UI. (https://github.com/Automattic/wp-calypso/pull/46619)
|
47 |
+
* ET/FSE: Remove the "Showcase New Blocks" module (https://github.com/Automattic/wp-calypso/pull/46663)
|
48 |
+
* Add text domain to copy in domain-picker and plans-grid packages (https://github.com/Automattic/wp-calypso/pull/46557)
|
49 |
+
* Gutenboarding: stop HotJar capturing input fields in gutenboarding (https://github.com/Automattic/wp-calypso/pull/46620)
|
50 |
+
* Launch: Move launch store to package/data-stores. (https://github.com/Automattic/wp-calypso/pull/46570)
|
51 |
+
* Launch: Hide inline help button when launch modal opens. (https://github.com/Automattic/wp-calypso/pull/46768)
|
52 |
+
* Localise the launch sidebar and final launch step (https://github.com/Automattic/wp-calypso/pull/46555)
|
53 |
+
|
54 |
= 2.7.2 =
|
55 |
* Enable Coming Soon v2 for a12s
|
56 |
|
starter-page-templates/dist/starter-page-templates.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => '4a396dbb0834c20140a803c8eb1e0904');
|
starter-page-templates/page-template-modal/components/block-iframe-preview.js
CHANGED
@@ -75,7 +75,7 @@ const copyStylesToIframe = ( srcDocument, targetiFrameDocument ) => {
|
|
75 |
* @param {Array} props.blocks array of Gutenberg Block objects
|
76 |
* @param {object} props.settings block Editor settings object
|
77 |
* @param {Function} props.setTimeout safe version of window.setTimeout via `withSafeTimeout`
|
78 |
-
* @param props.title
|
79 |
*/
|
80 |
const BlockFramePreview = ( {
|
81 |
className = 'block-iframe-preview',
|
75 |
* @param {Array} props.blocks array of Gutenberg Block objects
|
76 |
* @param {object} props.settings block Editor settings object
|
77 |
* @param {Function} props.setTimeout safe version of window.setTimeout via `withSafeTimeout`
|
78 |
+
* @param {string} props.title Template Title - see #39831 for details.
|
79 |
*/
|
80 |
const BlockFramePreview = ( {
|
81 |
className = 'block-iframe-preview',
|
wpcom-block-editor-nav-sidebar/class-wpcom-block-editor-nav-sidebar.php
CHANGED
@@ -53,6 +53,8 @@ class WPCOM_Block_Editor_Nav_Sidebar {
|
|
53 |
true
|
54 |
);
|
55 |
|
|
|
|
|
56 |
wp_localize_script(
|
57 |
'wpcom-block-editor-nav-sidebar-script',
|
58 |
'wpcomBlockEditorNavSidebarAssetsUrl',
|
53 |
true
|
54 |
);
|
55 |
|
56 |
+
wp_set_script_translations( 'wpcom-block-editor-nav-sidebar-script', 'full-site-editing' );
|
57 |
+
|
58 |
wp_localize_script(
|
59 |
'wpcom-block-editor-nav-sidebar-script',
|
60 |
'wpcomBlockEditorNavSidebarAssetsUrl',
|