Full Site Editing - Version 1.14

Version Description

  • Add missing dependencies to package declaration.
  • Remove "Latest posts" page from navigation sidebar.
Download this release

Release Info

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

Code changes from version 1.13 to 1.14

editor-domain-picker/dist/editor-domain-picker.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '94c0cbae08a13c8ebac22821622db80a');
1
+ <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'c7722cc889ad1f60de2ece264089cf92');
editor-domain-picker/dist/editor-domain-picker.js CHANGED
@@ -9,4 +9,4 @@
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,u=0;u<a.length;u++){var l=a[u],f=l.indexOf("=");if(!(f<0)){var d=l.substr(0,f).trim(),p=l.substr(++f,l.length).trim();'"'==p[0]&&(p=p.slice(1,-1)),null==n[d]&&(n[d]=s(p,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 u=r.maxAge-0;if(isNaN(u))throw new Error("maxAge should be a Number");c+="; Max-Age="+Math.floor(u)}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,n){"use strict";var r=n(11),i=n(33);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 u;u="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]=u>>>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,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+o>>>0)<o?1:0,e+n+i+a+(c+=(u=u+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,u){var l=0,f=t;return l+=(f=f+r>>>0)<t?1:0,l+=(f=f+o>>>0)<o?1:0,l+=(f=f+s>>>0)<s?1:0,e+n+i+a+c+(l+=(f=f+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,c,u){return t+r+o+s+u>>>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 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["a8c-fse-common-data-stores"]}()},function(e,t,n){var r=n(15);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(n):"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){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){var r=n(24),i=n(25),o=n(14),a=n(26);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t,n){"use strict";var r=n(10),i=n(34),o=n(35),a=n(11),s=r.sum32,c=r.sum32_4,u=r.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,p=o.s1_256,m=o.g0_256,h=o.g1_256,v=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 y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(y,v),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(h(n[r-2]),n[r-7],m(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],v=this.h[2],g=this.h[3],y=this.h[4],b=this.h[5],_=this.h[6],w=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var C=u(w,p(y),l(y,b,_),this.k[r],n[r]),x=s(d(i),f(i,o,v));w=_,_=b,b=y,y=s(g,C),g=v,v=o,o=i,i=s(C,x)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],v),this.h[3]=s(this.h[3],g),this.h[4]=s(this.h[4],y),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],_),this.h[7]=s(this.h[7],w)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},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 u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,a,s;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),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=l(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 d(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function m(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):v(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 v(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 l(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 u=c.length,l=v(c,u);for(n=0;n<u;++n)o(l[n],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){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 m(this,e,!0)},s.prototype.rawListeners=function(e){return m(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){var r=n(36),i=n(37),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.ReactDOM}()},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){var r=n(28);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 u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;u++;var r=i.formatters[n];if("function"==typeof r){var o=t[u];e=r.call(a,o),t.splice(u,1),u--}return e})),i.formatArgs.call(a,t);var l=a.log||i.log;l.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(32),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,n){var r=n(29),i=n(30),o=n(14),a=n(31);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){var r=n(15);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){var n=1e3,r=6e4,i=60*r,o=24*i;function a(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 s=typeof e;if("string"===s&&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 a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return a(e,t,o,"day");if(t>=i)return a(e,t,i,"hour");if(t>=r)return a(e,t,r,"minute");if(t>=n)return a(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){"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(10),i=n(11);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(10).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){var r,i,o=n(16),a=n(17),s=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,l=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==d){var p=o();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=i=16383&(p[6]<<8|p[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:c+1,v=m-s+(h-c)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||m>s)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=m,c=h,i=d;var g=(1e4*(268435455&(m+=122192928e5))+h)%4294967296;l[u++]=g>>>24&255,l[u++]=g>>>16&255,l[u++]=g>>>8&255,l[u++]=255&g;var y=m/4294967296*1e4&268435455;l[u++]=y>>>8&255,l[u++]=255&y,l[u++]=y>>>24&15|16,l[u++]=y>>>16&255,l[u++]=d>>>8|128,l[u++]=255&d;for(var b=0;b<6;++b)l[u+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(16),i=n(17);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),o=(n(13),n(18)),a=n.n(o),s=n(1),c=n(2),u=n(3),l=n(4);function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(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 p(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 m=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,i=d(e,["icon","size"]);return Object(s.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))},h=n(7),v=Object(s.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(h.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"})),g=n(5),y=n.n(g),b=y()("calypso:analytics");n(19);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}));var _=function(){return(_=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)};n(9);var w=n(20),C=y()("lib/load-script/callback-handler"),x=new Map;function O(){return x}function E(e){return O().has(e)}function j(e,t){var n=O();E(e)?(C('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(C('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=O(),r=n.get(e);if(r){var i='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));C(i),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function k(){var e=this.getAttribute("src");C('Handling successful request for "'.concat(e,'"')),S(e),this.onload=null}function F(){var e=this.getAttribute("src");C('Handling failed request for "'.concat(e,'"')),S(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}var A=y()("lib/load-script/dom-operations");y()("package/load-script");function L(e,t){var n;if(!E(e)&&(n=function(e){A('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=k,t.onerror=F,t}(e),A("Attaching element to head"),document.head.appendChild(n)),"function"!=typeof t)return new Promise((function(t,n){j(e,(function(e){null===e?t():n(e)}))}));j(e,t)}var N,R=["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 P(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&L("//stats.wp.com/w.js?61");var T=new w.EventEmitter;function I(e,t){if(b('Record event "%s" called with props %o',e,t=t||{}),e.startsWith("calypso_")||Object(l.includes)(R,e)){if(N){var n=N(t);t=_(_({},t),n)}t=Object(l.omitBy)(t,l.isUndefined),b('Recording event "%s" with actual props %o',e,t),P(["recordEvent",e,t]),T.emit("record-event",e,t)}else b('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}var M=n(21);var D=n(8),z=n(22),q=r.createContext(V()),U=function(){return r.useContext(q)};Object(z.createHigherOrderComponent)((function(e){return function(t){var n=U();return r.createElement(e,_({},n,t))}}),"withI18n");function V(e){var t,n,r=Object(D.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}}var B=n(6),H=n.n(B),$="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),W=new Uint8Array(16);function G(){if(!$)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $(W)}for(var J=[],K=0;K<256;++K)J[K]=(K+256).toString(16).substr(1);var X=function(e,t){var n=t||0,r=J;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 Z=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||G)();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||X(i)},Q=function(e){var t=e.suggestion,n=e.railcarId,o=e.isRecommended,a=void 0!==o&&o,s=e.onSelect,c=e.onRender,u=e.selected,l=U().__,f=t.domain_name,d=f.indexOf("."),p=f.slice(0,d),m=f.slice(d),h=Object(r.useState)(),v=h[0],g=h[1],y=Object(r.useState)(),b=y[0],_=y[1],w=Z();Object(r.useEffect)((function(){f!==v&&b!==n&&n&&(c(),g(f),_(n))}),[f,v,b,n,c]);return i.a.createElement("label",{className:H()("domain-picker__suggestion-item",{"is-free":t.is_free,"is-selected":u})},i.a.createElement("input",{"aria-labelledby":w,className:"domain-picker__suggestion-radio-button",type:"radio",name:"domain-picker-suggestion-option",onChange:function(){b&&function(e){I("calypso_traintracks_interact",{railcar:e.railcarId,action:e.action})}({action:"domain_selected",railcarId:b}),s(t)},checked:u}),i.a.createElement("div",{className:"domain-picker__suggestion-item-name"},i.a.createElement("span",{className:"domain-picker__domain-name"},p),i.a.createElement("span",{className:"domain-picker__domain-tld"},m),a&&i.a.createElement("div",{className:"domain-picker__badge is-recommended"},l("Recommended"))),i.a.createElement("div",{className:H()("domain-picker__price",{"is-paid":!t.is_free})},t.is_free?l("Free"):i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:"domain-picker__price-inclusive"}," ",l("Included in plans")," "),i.a.createElement("span",{className:"domain-picker__price-cost"},Object(D.sprintf)(l("%s/year"),t.cost)))))},Y=function(){return i.a.createElement("div",{className:"domain-picker__suggestion-item placeholder"},i.a.createElement("div",{className:"domain-picker__suggestion-item-name placeholder"}),i.a.createElement("div",{className:"domain-picker__price placeholder"}))};function ee(e,t){return e===t}function te(e,t,n){var i=n&&n.equalityFn?n.equalityFn:ee,o=Object(r.useState)(e),a=o[0],s=o[1],c=function(e,t,n){void 0===n&&(n={});var i=n.maxWait,o=Object(r.useRef)(null),a=Object(r.useRef)([]),s=n.leading,c=Object(r.useRef)(!1),u=Object(r.useRef)(null),l=Object(r.useRef)(!1),f=Object(r.useRef)(e);f.current=e;var d=Object(r.useCallback)((function(){clearTimeout(u.current),clearTimeout(o.current),o.current=null,a.current=[],u.current=null,c.current=!1}),[]);return Object(r.useEffect)((function(){return function(){l.current=!0}}),[]),[Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(a.current=e,clearTimeout(u.current),!u.current&&s&&!c.current)return f.current.apply(f,e),void(c.current=!0);u.current=setTimeout((function(){d(),l.current||f.current.apply(f,e)}),t),i&&!o.current&&(o.current=setTimeout((function(){var e=a.current;d(),l.current||f.current.apply(null,e)}),i))}),[i,t,d,s]),d,function(){u.current&&(f.current.apply(null,a.current),d())}]}(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),u=c[0],l=c[1],f=Object(r.useRef)(e);return Object(r.useEffect)((function(){i(f.current,e)||(u(e),f.current=e)}),[e,u,i]),[a,l]}var ne=Object(s.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(s.createElement)(h.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),re=(n(39),function(e){var t=e.onSelect,n=e.selected,i=U().__,o=Object(s.useState)(!1),a=o[0],l=o[1],f=function(e){l(!1),t(e)},d=Object(c.useSelect)((function(e){return e("automattic/domains/suggestions").getCategories()}));return r.createElement("div",{className:H()("domain-categories",{"is-open":a})},r.createElement(u.Button,{className:"domain-categories__dropdown-button",onClick:function(){return l(!a)}},r.createElement("span",null,n||i("All Categories")),r.createElement(m,{icon:ne,size:16})),r.createElement("ul",{className:"domain-categories__item-group"},r.createElement("li",{className:H()("domain-categories__item",{"is-selected":!n})},r.createElement(u.Button,{onClick:function(){return f()}},i("View all"))),d.map((function(e){var t=e.slug,i=e.title;return r.createElement("li",{key:t,className:H()("domain-categories__item",{"is-selected":t===n})},r.createElement(u.Button,{onClick:function(){return f(t)}},i))}))))}),ie=function(){return i.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"},i.a.createElement("rect",{x:"0",width:"310",height:"50",rx:"10",fill:"#D8D8D8"}),i.a.createElement("rect",{x:"8",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("rect",{x:"40",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("rect",{x:"72",y:"8",width:"300",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("text",{x:"80",y:"26",fill:"#999"},"https://"),i.a.createElement("text",{x:"133",y:"26",fill:"#515151"},"example.com"))},oe=(n(38),function(e){var t,n=e.header,o=e.showDomainCategories,a=e.onDomainSelect,s=e.quantity,f=void 0===s?5:s,d=e.quantityExpanded,p=void 0===d?10:d,h=e.onDomainSearchBlur,g=e.analyticsFlowId,y=e.analyticsUiAlgo,b=e.initialDomainSearch,_=void 0===b?"":b,w=e.onSetDomainSearch,C=e.currentDomain,x=U().__,O=x("Search for a domain"),E=Object(r.useState)(!1),j=E[0],S=E[1],k=Object(r.useState)(_),F=k[0],A=k[1],L=Object(r.useState)(),N=L[0],R=L[1],P=Object(c.useSelect)((function(e){return e("automattic/domains/suggestions").getDomainSuggestionVendor()})),T=function(e,t,n,r){void 0===e&&(e=""),void 0===r&&(r="en");var i=te(e,300)[0];return Object(c.useSelect)((function(e){if(i)return e("automattic/domains/suggestions").getDomainSuggestions(i,{include_wordpressdotcom:!0,include_dotblogsubdomain:!1,quantity:t+1,locale:r,category_slug:n})}),[i,n,t])}(F.trim(),p,N,U().i18nLocale),D=null==T?void 0:T.slice(0,j?p:f);Object(r.useEffect)((function(){S(!1)}),[F]);var z=Object(r.useState)(),q=z[0],V=z[1];Object(r.useEffect)((function(){var e;T&&V((void 0===(e="suggestion")&&(e="recommendation"),Object(M.v4)().replace(/-/g,"")+"-"+e))}),[T,V]);var B=function(e,t,n,r){var i="/domains/search/"+P+"/"+g+(N?"/"+N:""),o=e.domain_name;!function(e){I("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:"/"+g+"/"+y,fetchAlgo:i,query:F,railcarId:t,result:r?o+"#recommended":o,uiPosition:n})};return i.a.createElement("div",{className:"domain-picker"},n&&n,i.a.createElement("div",{className:"domain-picker__search"},i.a.createElement("div",{className:"domain-picker__search-icon"},i.a.createElement(m,{icon:v})),i.a.createElement(u.TextControl,{"data-hj-whitelist":!0,hideLabelFromVision:!0,label:O,placeholder:O,onChange:function(e){A(e),w(e)},onBlur:function(e){h&&h(e.currentTarget.value)},value:F})),F.trim()?i.a.createElement("div",{className:"domain-picker__body"},o&&i.a.createElement("div",{className:"domain-picker__aside"},i.a.createElement(re,{selected:N,onSelect:R})),i.a.createElement("div",{className:"domain-picker__suggestion-sections"},i.a.createElement("div",{className:"domain-picker__suggestion-item-group"},null!==(t=null==D?void 0:D.map((function(e,t){return i.a.createElement(Q,{key:e.domain_name,suggestion:e,railcarId:q?""+q+t:void 0,isRecommended:1===t,onRender:function(){return B(e,""+q+t,t,1===t)},selected:C===e.domain_name,onSelect:a})})))&&void 0!==t?t:Object(l.times)(f,(function(e){return i.a.createElement(Y,{key:e})}))),!j&&(null==T?void 0:T.length)&&(null==T?void 0:T.length)>f&&i.a.createElement("div",{className:"domain-picker__show-more"},i.a.createElement(u.Button,{onClick:function(){return S(!0)}},x("View more results"))))):i.a.createElement("div",{className:"domain-picker__empty-state"},i.a.createElement("p",{className:"domain-picker__empty-state--text"},x("A domain name is the site address people type in their browser to visit your site.")),i.a.createElement("div",null,i.a.createElement(ie,null))))});function ae(){return Object(c.useSelect)((function(e){return e("automattic/site").getSite(window._currentSiteId)}))}function se(){var e=ae();return(null==e?void 0:e.URL)&&new URL(null==e?void 0:e.URL).hostname||""}var ce=function(e){var t,n=e.onSelect,r=ae(),i=se(),o=Object(c.useSelect)((function(e){return e("automattic/launch").getState()})),a=o.domain,u=o.domainSearch,l=Object(c.useDispatch)("automattic/launch"),f=l.setDomain,d=l.setDomainSearch,p=null!==(t=u.trim()||(null==r?void 0:r.name))&&void 0!==t?t:"";return Object(s.createElement)(oe,{analyticsFlowId:"gutenboarding",initialDomainSearch:p,onSetDomainSearch:d,onDomainSearchBlur:function(e){I("calypso_newsite_domain_search_blur",{flow:"gutenboarding",query:e,where:"editor_domain_modal"})},currentDomain:(null==a?void 0:a.domain_name)||i,onDomainSelect:function(e){f(e),null==n||n()},analyticsUiAlgo:"editor_domain_modal"})},ue=(n(40),function(e){var t=e.onClose;return Object(s.createElement)(u.Modal,{className:"domain-picker-modal",overlayClassName:"domain-picker-modal-overlay",bodyOpenClassName:"has-domain-picker-modal",onRequestClose:t,title:""},Object(s.createElement)(ce,{onSelect:t}))});function le(){var e=r.useState(!1),t=a()(e,2),n=t[0],i=t[1],o=se(),l=Object(c.useSelect)((function(e){return e("automattic/launch").getState()})).domain;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(u.Button,{"aria-expanded":n,"aria-haspopup":"menu","aria-pressed":n,onClick:function(){return i((function(e){return!e}))}},Object(s.createElement)("span",{className:"domain-picker-button__label"},"Domain: ".concat((null==l?void 0:l.domain_name)||o)),Object(s.createElement)(m,{icon:ne,size:22})),n&&Object(s.createElement)(ue,{onClose:function(){return i(!1)}}))}var fe=n(23),de=setInterval((function(){var e=document.querySelector(".edit-post-header__settings");if(e){clearInterval(de);var t=document.createElement("div");e.prepend(t),fe.render(r.createElement(le),t)}}))}]));
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,u=0;u<a.length;u++){var l=a[u],f=l.indexOf("=");if(!(f<0)){var d=l.substr(0,f).trim(),p=l.substr(++f,l.length).trim();'"'==p[0]&&(p=p.slice(1,-1)),null==n[d]&&(n[d]=s(p,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 u=r.maxAge-0;if(isNaN(u))throw new Error("maxAge should be a Number");c+="; Max-Age="+Math.floor(u)}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,n){"use strict";var r=n(11),i=n(33);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 u;u="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]=u>>>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,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+o>>>0)<o?1:0,e+n+i+a+(c+=(u=u+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,u){var l=0,f=t;return l+=(f=f+r>>>0)<t?1:0,l+=(f=f+o>>>0)<o?1:0,l+=(f=f+s>>>0)<s?1:0,e+n+i+a+c+(l+=(f=f+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,c,u){return t+r+o+s+u>>>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 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["a8c-fse-common-data-stores"]}()},function(e,t,n){var r=n(15);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(n):"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){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){var r=n(24),i=n(25),o=n(14),a=n(26);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t,n){"use strict";var r=n(10),i=n(34),o=n(35),a=n(11),s=r.sum32,c=r.sum32_4,u=r.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,p=o.s1_256,m=o.g0_256,h=o.g1_256,v=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 y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(y,v),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(h(n[r-2]),n[r-7],m(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],v=this.h[2],g=this.h[3],y=this.h[4],b=this.h[5],_=this.h[6],w=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var C=u(w,p(y),l(y,b,_),this.k[r],n[r]),x=s(d(i),f(i,o,v));w=_,_=b,b=y,y=s(g,C),g=v,v=o,o=i,i=s(C,x)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],v),this.h[3]=s(this.h[3],g),this.h[4]=s(this.h[4],y),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],_),this.h[7]=s(this.h[7],w)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},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 u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,a,s;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),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=l(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 d(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function m(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):v(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 v(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 l(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 u=c.length,l=v(c,u);for(n=0;n<u;++n)o(l[n],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){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 m(this,e,!0)},s.prototype.rawListeners=function(e){return m(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){var r=n(36),i=n(37),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.ReactDOM}()},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){var r=n(28);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 u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;u++;var r=i.formatters[n];if("function"==typeof r){var o=t[u];e=r.call(a,o),t.splice(u,1),u--}return e})),i.formatArgs.call(a,t);var l=a.log||i.log;l.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(32),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,n){var r=n(29),i=n(30),o=n(14),a=n(31);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){var r=n(15);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){var n=1e3,r=6e4,i=60*r,o=24*i;function a(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 s=typeof e;if("string"===s&&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 a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return a(e,t,o,"day");if(t>=i)return a(e,t,i,"hour");if(t>=r)return a(e,t,r,"minute");if(t>=n)return a(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){"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(10),i=n(11);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(10).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){var r,i,o=n(16),a=n(17),s=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,l=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==d){var p=o();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=i=16383&(p[6]<<8|p[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:c+1,v=m-s+(h-c)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||m>s)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=m,c=h,i=d;var g=(1e4*(268435455&(m+=122192928e5))+h)%4294967296;l[u++]=g>>>24&255,l[u++]=g>>>16&255,l[u++]=g>>>8&255,l[u++]=255&g;var y=m/4294967296*1e4&268435455;l[u++]=y>>>8&255,l[u++]=255&y,l[u++]=y>>>24&15|16,l[u++]=y>>>16&255,l[u++]=d>>>8|128,l[u++]=255&d;for(var b=0;b<6;++b)l[u+b]=f[b];return t||a(l)}},function(e,t,n){var r=n(16),i=n(17);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),o=(n(13),n(18)),a=n.n(o),s=n(1),c=n(2),u=n(3),l=n(4);function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(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 p(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 m=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,i=d(e,["icon","size"]);return Object(s.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))},h=n(7),v=Object(s.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(h.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"})),g=n(5),y=n.n(g),b=y()("calypso:analytics");n(19);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}));var _=function(){return(_=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)};n(9);var w=n(20),C=y()("lib/load-script/callback-handler"),x=new Map;function O(){return x}function E(e){return O().has(e)}function j(e,t){var n=O();E(e)?(C('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(C('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=O(),r=n.get(e);if(r){var i='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));C(i),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function k(){var e=this.getAttribute("src");C('Handling successful request for "'.concat(e,'"')),S(e),this.onload=null}function F(){var e=this.getAttribute("src");C('Handling failed request for "'.concat(e,'"')),S(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}var A=y()("lib/load-script/dom-operations");y()("package/load-script");function L(e,t){var n;if(!E(e)&&(n=function(e){A('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=k,t.onerror=F,t}(e),A("Attaching element to head"),document.head.appendChild(n)),"function"!=typeof t)return new Promise((function(t,n){j(e,(function(e){null===e?t():n(e)}))}));j(e,t)}var N,R=["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 P(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&L("//stats.wp.com/w.js?61");var T=new w.EventEmitter;function I(e,t){if(b('Record event "%s" called with props %o',e,t=t||{}),e.startsWith("calypso_")||Object(l.includes)(R,e)){if(N){var n=N(t);t=_(_({},t),n)}t=Object(l.omitBy)(t,l.isUndefined),b('Recording event "%s" with actual props %o',e,t),P(["recordEvent",e,t]),T.emit("record-event",e,t)}else b('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}var M=n(21);var D=n(8),z=n(22),q=r.createContext(V()),U=function(){return r.useContext(q)};Object(z.createHigherOrderComponent)((function(e){return function(t){var n=U();return r.createElement(e,_({},n,t))}}),"withI18n");function V(e){var t,n,r=Object(D.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}}var B=n(6),H=n.n(B),$="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),W=new Uint8Array(16);function G(){if(!$)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $(W)}for(var J=[],K=0;K<256;++K)J[K]=(K+256).toString(16).substr(1);var X=function(e,t){var n=t||0,r=J;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 Z=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||G)();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||X(i)},Q=function(e){var t=e.suggestion,n=e.railcarId,o=e.isRecommended,a=void 0!==o&&o,s=e.onSelect,c=e.onRender,u=e.selected,l=U().__,f=t.domain_name,d=f.indexOf("."),p=f.slice(0,d),m=f.slice(d),h=Object(r.useState)(),v=h[0],g=h[1],y=Object(r.useState)(),b=y[0],_=y[1],w=Z();Object(r.useEffect)((function(){f!==v&&b!==n&&n&&(c(),g(f),_(n))}),[f,v,b,n,c]);return i.a.createElement("label",{className:H()("domain-picker__suggestion-item",{"is-free":t.is_free,"is-selected":u})},i.a.createElement("input",{"aria-labelledby":w,className:"domain-picker__suggestion-radio-button",type:"radio",name:"domain-picker-suggestion-option",onChange:function(){b&&function(e){I("calypso_traintracks_interact",{railcar:e.railcarId,action:e.action})}({action:"domain_selected",railcarId:b}),s(t)},checked:u}),i.a.createElement("div",{className:"domain-picker__suggestion-item-name"},i.a.createElement("span",{className:"domain-picker__domain-name"},p),i.a.createElement("span",{className:"domain-picker__domain-tld"},m),a&&i.a.createElement("div",{className:"domain-picker__badge is-recommended"},l("Recommended"))),i.a.createElement("div",{className:H()("domain-picker__price",{"is-paid":!t.is_free})},t.is_free?l("Free"):i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:"domain-picker__price-inclusive"}," ",l("Included in plans")," "),i.a.createElement("span",{className:"domain-picker__price-cost"},Object(D.sprintf)(l("%s/year"),t.cost)))))},Y=function(){return i.a.createElement("div",{className:"domain-picker__suggestion-item placeholder"},i.a.createElement("div",{className:"domain-picker__suggestion-item-name placeholder"}),i.a.createElement("div",{className:"domain-picker__price placeholder"}))};function ee(e,t){return e===t}function te(e,t,n){var i=n&&n.equalityFn?n.equalityFn:ee,o=Object(r.useState)(e),a=o[0],s=o[1],c=function(e,t,n){void 0===n&&(n={});var i=n.maxWait,o=Object(r.useRef)(null),a=Object(r.useRef)([]),s=n.leading,c=Object(r.useRef)(!1),u=Object(r.useRef)(null),l=Object(r.useRef)(!1),f=Object(r.useRef)(e);f.current=e;var d=Object(r.useCallback)((function(){clearTimeout(u.current),clearTimeout(o.current),o.current=null,a.current=[],u.current=null,c.current=!1}),[]);return Object(r.useEffect)((function(){return function(){l.current=!0}}),[]),[Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(a.current=e,clearTimeout(u.current),!u.current&&s&&!c.current)return f.current.apply(f,e),void(c.current=!0);u.current=setTimeout((function(){d(),l.current||f.current.apply(f,e)}),t),i&&!o.current&&(o.current=setTimeout((function(){var e=a.current;d(),l.current||f.current.apply(null,e)}),i))}),[i,t,d,s]),d,function(){u.current&&(f.current.apply(null,a.current),d())}]}(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),u=c[0],l=c[1],f=Object(r.useRef)(e);return Object(r.useEffect)((function(){i(f.current,e)||(u(e),f.current=e)}),[e,u,i]),[a,l]}var ne=Object(s.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(s.createElement)(h.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),re=(n(39),function(e){var t=e.onSelect,n=e.selected,i=U().__,o=Object(s.useState)(!1),a=o[0],l=o[1],f=function(e){l(!1),t(e)},d=Object(c.useSelect)((function(e){return e("automattic/domains/suggestions").getCategories()}));return r.createElement("div",{className:H()("domain-categories",{"is-open":a})},r.createElement(u.Button,{className:"domain-categories__dropdown-button",onClick:function(){return l(!a)}},r.createElement("span",null,n||i("All Categories")),r.createElement(m,{icon:ne,size:16})),r.createElement("ul",{className:"domain-categories__item-group"},r.createElement("li",{className:H()("domain-categories__item",{"is-selected":!n})},r.createElement(u.Button,{onClick:function(){return f()}},i("View all"))),d.map((function(e){var t=e.slug,i=e.title;return r.createElement("li",{key:t,className:H()("domain-categories__item",{"is-selected":t===n})},r.createElement(u.Button,{onClick:function(){return f(t)}},i))}))))}),ie=function(){return i.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"},i.a.createElement("rect",{x:"0",width:"310",height:"50",rx:"10",fill:"#D8D8D8"}),i.a.createElement("rect",{x:"8",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("rect",{x:"40",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("rect",{x:"72",y:"8",width:"300",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("text",{x:"80",y:"26",fill:"#999"},"https://"),i.a.createElement("text",{x:"133",y:"26",fill:"#515151"},"example.com"))},oe=(n(38),function(e){var t,n,o=e.header,a=e.showDomainCategories,s=e.onDomainSelect,f=e.quantity,d=void 0===f?5:f,p=e.quantityExpanded,h=void 0===p?10:p,g=e.onDomainSearchBlur,y=e.analyticsFlowId,b=e.analyticsUiAlgo,_=e.initialDomainSearch,w=void 0===_?"":_,C=e.onSetDomainSearch,x=e.currentDomain,O=U().__,E=O("Search for a domain"),j=Object(r.useState)(!1),S=j[0],k=j[1],F=Object(r.useState)(w),A=F[0],L=F[1],N=Object(r.useState)(),R=N[0],P=N[1],T=Object(c.useSelect)((function(e){return e("automattic/domains/suggestions").getDomainSuggestionVendor()})),D=function(e,t,n,r){void 0===e&&(e=""),void 0===r&&(r="en");var i=te(e,300)[0];return Object(c.useSelect)((function(e){if(i&&!(i.length<2))return e("automattic/domains/suggestions").getDomainSuggestions(i,{include_wordpressdotcom:!0,include_dotblogsubdomain:!1,quantity:t+1,locale:r,category_slug:n})}),[i,n,t])}(A.trim(),h,R,U().i18nLocale),z=null==D?void 0:D.slice(0,S?h:d);Object(r.useEffect)((function(){k(!1)}),[A]);var q=Object(r.useState)(),V=q[0],B=q[1];Object(r.useEffect)((function(){var e;D&&B((void 0===(e="suggestion")&&(e="recommendation"),Object(M.v4)().replace(/-/g,"")+"-"+e))}),[D,B]);var H=function(e,t,n,r){var i="/domains/search/"+T+"/"+y+(R?"/"+R:""),o=e.domain_name;!function(e){I("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:"/"+y+"/"+b,fetchAlgo:i,query:A,railcarId:t,result:r?o+"#recommended":o,uiPosition:n})};return i.a.createElement("div",{className:"domain-picker"},o&&o,i.a.createElement("div",{className:"domain-picker__search"},i.a.createElement("div",{className:"domain-picker__search-icon"},i.a.createElement(m,{icon:v})),i.a.createElement(u.TextControl,{"data-hj-whitelist":!0,hideLabelFromVision:!0,label:E,placeholder:E,onChange:function(e){L(e),C(e)},onBlur:function(e){g&&g(e.currentTarget.value)},value:A})),(null===(t=A.trim())||void 0===t?void 0:t.length)>1?i.a.createElement("div",{className:"domain-picker__body"},a&&i.a.createElement("div",{className:"domain-picker__aside"},i.a.createElement(re,{selected:R,onSelect:P})),i.a.createElement("div",{className:"domain-picker__suggestion-sections"},i.a.createElement("div",{className:"domain-picker__suggestion-item-group"},null!==(n=null==z?void 0:z.map((function(e,t){return i.a.createElement(Q,{key:e.domain_name,suggestion:e,railcarId:V?""+V+t:void 0,isRecommended:1===t,onRender:function(){return H(e,""+V+t,t,1===t)},selected:x===e.domain_name,onSelect:s})})))&&void 0!==n?n:Object(l.times)(d,(function(e){return i.a.createElement(Y,{key:e})}))),!S&&(null==D?void 0:D.length)&&(null==D?void 0:D.length)>d&&i.a.createElement("div",{className:"domain-picker__show-more"},i.a.createElement(u.Button,{onClick:function(){return k(!0)}},O("View more results"))))):i.a.createElement("div",{className:"domain-picker__empty-state"},i.a.createElement("p",{className:"domain-picker__empty-state--text"},O("A domain name is the site address people type in their browser to visit your site.")),i.a.createElement("div",null,i.a.createElement(ie,null))))});function ae(){return Object(c.useSelect)((function(e){return e("automattic/site").getSite(window._currentSiteId)}))}function se(){var e=ae();return(null==e?void 0:e.URL)&&new URL(null==e?void 0:e.URL).hostname||""}var ce=function(e){var t,n=e.onSelect,r=ae(),i=se(),o=Object(c.useSelect)((function(e){return e("automattic/launch").getState()})),a=o.domain,u=o.domainSearch,l=Object(c.useDispatch)("automattic/launch"),f=l.setDomain,d=l.setDomainSearch,p=null!==(t=u.trim()||(null==r?void 0:r.name))&&void 0!==t?t:"";return Object(s.createElement)(oe,{analyticsFlowId:"gutenboarding",initialDomainSearch:p,onSetDomainSearch:d,onDomainSearchBlur:function(e){I("calypso_newsite_domain_search_blur",{flow:"gutenboarding",query:e,where:"editor_domain_modal"})},currentDomain:(null==a?void 0:a.domain_name)||i,onDomainSelect:function(e){f(e),null==n||n()},analyticsUiAlgo:"editor_domain_modal"})},ue=(n(40),function(e){var t=e.onClose;return Object(s.createElement)(u.Modal,{className:"domain-picker-modal",overlayClassName:"domain-picker-modal-overlay",bodyOpenClassName:"has-domain-picker-modal",onRequestClose:t,title:""},Object(s.createElement)(ce,{onSelect:t}))});function le(){var e=r.useState(!1),t=a()(e,2),n=t[0],i=t[1],o=se(),l=Object(c.useSelect)((function(e){return e("automattic/launch").getState()})).domain;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(u.Button,{"aria-expanded":n,"aria-haspopup":"menu","aria-pressed":n,onClick:function(){return i((function(e){return!e}))}},Object(s.createElement)("span",{className:"domain-picker-button__label"},"Domain: ".concat((null==l?void 0:l.domain_name)||o)),Object(s.createElement)(m,{icon:ne,size:22})),n&&Object(s.createElement)(ue,{onClose:function(){return i(!1)}}))}var fe=n(23),de=setInterval((function(){var e=document.querySelector(".edit-post-header__settings");if(e){clearInterval(de);var t=document.createElement("div");e.prepend(t),fe.render(r.createElement(le),t)}}))}]));
editor-gutenboarding-launch/dist/editor-gutenboarding-launch.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '89cb77955ddf691c004154a463b8cd52');
1
+ <?php return array('dependencies' => array('lodash', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'd391e0784c32757ce5309e9702fa2c0f');
editor-gutenboarding-launch/dist/editor-gutenboarding-launch.js CHANGED
@@ -4,4 +4,4 @@
4
  * Copyright(c) 2012-2014 Roman Shtylman
5
  * Copyright(c) 2015 Douglas Christopher Wilson
6
  * MIT Licensed
7
- */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},s=e.split(i),u=o.decode||r,c=0;c<s.length;c++){var f=s[c],l=f.indexOf("=");if(!(l<0)){var h=f.substr(0,l).trim(),p=f.substr(++l,f.length).trim();'"'==p[0]&&(p=p.slice(1,-1)),null==n[h]&&(n[h]=a(p,u))}}return n},t.serialize=function(e,t,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!s.test(e))throw new TypeError("argument name is invalid");var a=i(t);if(a&&!s.test(a))throw new TypeError("argument val is invalid");var u=e+"="+a;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c))throw new Error("maxAge should be a Number");u+="; Max-Age="+Math.floor(c)}if(r.domain){if(!s.test(r.domain))throw new TypeError("option domain is invalid");u+="; Domain="+r.domain}if(r.path){if(!s.test(r.path))throw new TypeError("option path is invalid");u+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(u+="; HttpOnly");r.secure&&(u+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,s=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function a(e,t){try{return t(e)}catch(n){return e}}},function(e,t,n){"use strict";var r=n(4),o=n(23);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,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),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var s=e.charCodeAt(o);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):i(e,o)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++o)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=s(o)),n+=u(o.toString(16))}return n},t.zero2=a,t.zero8=u,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var s=new Array(i/4),a=0,u=t;a<s.length;a++,u+=4){var c;c="big"===o?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[a]=c>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}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,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,s=(i<r?1:0)+n+o;e[t]=s>>>0,e[t+1]=i},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,o,i,s,a){var u=0,c=t;return u+=(c=c+r>>>0)<t?1:0,u+=(c=c+i>>>0)<i?1:0,e+n+o+s+(u+=(c=c+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,s,a){return t+r+i+a>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,s,a,u,c){var f=0,l=t;return f+=(l=l+r>>>0)<t?1:0,f+=(l=l+i>>>0)<i?1:0,f+=(l=l+a>>>0)<a?1:0,e+n+o+s+u+(f+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,s,a,u,c){return t+r+i+a+c>>>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 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){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){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t){function n(e,t,n,r,o,i,s){try{var a=e[i](s),u=a.value}catch(c){return void n(c)}a.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var s=e.apply(t,r);function a(e){n(s,o,i,a,u,"next",e)}function u(e){n(s,o,i,a,u,"throw",e)}a(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";var r=n(3),o=n(24),i=n(25),s=n(4),a=r.sum32,u=r.sum32_4,c=r.sum32_5,f=i.ch32,l=i.maj32,h=i.s0_256,p=i.s1_256,d=i.g0_256,v=i.g1_256,g=o.BlockHash,m=[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 y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}r.inherits(y,g),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=u(v(n[r-2]),n[r-7],d(n[r-15]),n[r-16]);var o=this.h[0],i=this.h[1],g=this.h[2],m=this.h[3],y=this.h[4],w=this.h[5],C=this.h[6],b=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var _=c(b,p(y),f(y,w,C),this.k[r],n[r]),x=a(h(o),l(o,i,g));b=C,C=w,w=y,y=a(m,_),m=g,g=i,i=o,o=a(_,x)}this.h[0]=a(this.h[0],o),this.h[1]=a(this.h[1],i),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],m),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],w),this.h[6]=a(this.h[6],C),this.h[7]=a(this.h[7],b)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,i,s,a;if(c(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=f(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function h(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=h.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]: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}(o):g(o,o.length)}function v(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 g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),a.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},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(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},a.prototype.getMaxListeners=function(){return f(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var c=u.length,f=g(u,c);for(n=0;n<c;++n)i(f[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,i,s;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.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 o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);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},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},a.prototype.listenerCount=v,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(26),o=n(27),i=o;i.v1=r,i.v4=o,e.exports=i},function(e,t,n){var r=n(17);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 o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var s=r,a=Number(new Date),u=a-(n||a);s.diff=u,s.prev=n,s.curr=a,n=a,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var c=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;c++;var r=o.formatters[n];if("function"==typeof r){var i=t[c];e=r.call(s,i),t.splice(c,1),c--}return e})),o.formatArgs.call(s,t);var f=s.log||o.log;f.apply(s,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=s,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function s(e,t){var n=o(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function a(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(r(o.names.map(a)),r(o.skips.map(a).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.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]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(22),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t,n){var r=n(18),o=n(19),i=n(20),s=n(21);e.exports=function(e){return r(e)||o(e)||i(e)||s()}},function(e,t,n){var r=n(5);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,n){var r=n(5);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(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.")}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function s(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&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 s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return s(e,t,i,"day");if(t>=o)return s(e,t,o,"hour");if(t>=r)return s(e,t,r,"minute");if(t>=n)return s(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"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){"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(3),o=n(4);function i(){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=i,i.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 o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.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 o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},function(e,t,n){"use strict";var r=n(3).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?s(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){var r,o,i=n(6),s=n(7),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==h){var p=i();null==l&&(l=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=o=16383&(p[6]<<8|p[7]))}var d=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,g=d-a+(v-u)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||d>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,u=v,o=h;var m=(1e4*(268435455&(d+=122192928e5))+v)%4294967296;f[c++]=m>>>24&255,f[c++]=m>>>16&255,f[c++]=m>>>8&255,f[c++]=255&m;var y=d/4294967296*1e4&268435455;f[c++]=y>>>8&255,f[c++]=255&y,f[c++]=y>>>24&15|16,f[c++]=y>>>16&255,f[c++]=h>>>8|128,f[c++]=255&h;for(var w=0;w<6;++w)f[c+w]=l[w];return t||s(f)}},function(e,t,n){var r=n(6),o=n(7);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[i+a]=s[a];return t||o(s)}},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(8),o=n.n(r),i=n(9),s=n(10),a=n.n(s),u=n(11),c=n(12),f=n(0),l=n.n(f),h=l()("calypso:analytics");n(13);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}));var p=function(){return(p=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)};var d=n(1),v=(n(2),n(14)),g=l()("lib/load-script/callback-handler"),m=new Map;function y(){return m}function w(e){return y().has(e)}function C(e,t){var n=y();w(e)?(g('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(g('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=y(),r=n.get(e);if(r){var o='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));g(o),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function _(){var e=this.getAttribute("src");g('Handling successful request for "'.concat(e,'"')),b(e),this.onload=null}function x(){var e=this.getAttribute("src");g('Handling failed request for "'.concat(e,'"')),b(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}var F=l()("lib/load-script/dom-operations");l()("package/load-script");function S(e,t){var n;if(!w(e)&&(n=function(e){F('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=_,t.onerror=x,t}(e),F("Attaching element to head"),document.head.appendChild(n)),"function"!=typeof t)return new Promise((function(t,n){C(e,(function(e){null===e?t():n(e)}))}));C(e,t)}var A,L=["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 E(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&S("//stats.wp.com/w.js?61");var k=new v.EventEmitter;function O(e,t){if(h('Record event "%s" called with props %o',e,t=t||{}),e.startsWith("calypso_")||Object(d.includes)(L,e)){if(A){var n=A(t);t=p(p({},t),n)}t=Object(d.omitBy)(t,d.isUndefined),h('Recording event "%s" with actual props %o',e,t),E(["recordEvent",e,t]),k.emit("record-event",e,t)}else h('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}n(15);n(28),n(29);a()((function(){M(),Object(u.addAction)("setGutenboardingStatus","a8c-gutenboarding",M)}));var j=!1;function M(){var e,t,n,r;if(!j&&(null===(e=window)||void 0===e||null===(t=e.calypsoifyGutenberg)||void 0===t?void 0:t.isFseGutenboarding)&&(null===(n=window)||void 0===n||null===(r=n.calypsoifyGutenberg)||void 0===r?void 0:r.frankenflowUrl)){j=!0;var s=setInterval((function(){var e,t,n=document.querySelector(".edit-post-header__settings");if(n){clearInterval(s),document.querySelector("body").classList.add("editor-gutenberg-launch__fse-overrides");var r=n.querySelector(".editor-post-publish-button__button"),a=document.createElement("a"),u=null===(e=window)||void 0===e||null===(t=e.calypsoifyGutenberg)||void 0===t?void 0:t.frankenflowUrl;a.href=u,a.target="_top",a.className="editor-gutenberg-launch__launch-button components-button is-primary";var f=document.createTextNode(Object(i.__)("Launch","full-site-editing"));a.appendChild(f);var l=function(){var e=o()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,Object(c.dispatch)("core/editor").savePost();case 3:O("calypso_newsite_editor_launch_click"),window.top.location.href=u;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();a.addEventListener("click",l),n.prepend(a),r&&n.prepend(r)}}))}}}]));
4
  * Copyright(c) 2012-2014 Roman Shtylman
5
  * Copyright(c) 2015 Douglas Christopher Wilson
6
  * MIT Licensed
7
+ */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},s=e.split(i),u=o.decode||r,c=0;c<s.length;c++){var f=s[c],l=f.indexOf("=");if(!(l<0)){var h=f.substr(0,l).trim(),p=f.substr(++l,f.length).trim();'"'==p[0]&&(p=p.slice(1,-1)),null==n[h]&&(n[h]=a(p,u))}}return n},t.serialize=function(e,t,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!s.test(e))throw new TypeError("argument name is invalid");var a=i(t);if(a&&!s.test(a))throw new TypeError("argument val is invalid");var u=e+"="+a;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c))throw new Error("maxAge should be a Number");u+="; Max-Age="+Math.floor(c)}if(r.domain){if(!s.test(r.domain))throw new TypeError("option domain is invalid");u+="; Domain="+r.domain}if(r.path){if(!s.test(r.path))throw new TypeError("option path is invalid");u+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(u+="; HttpOnly");r.secure&&(u+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,s=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function a(e,t){try{return t(e)}catch(n){return e}}},function(e,t,n){"use strict";var r=n(4),o=n(23);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,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),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var s=e.charCodeAt(o);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):i(e,o)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++o)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=s(o)),n+=u(o.toString(16))}return n},t.zero2=a,t.zero8=u,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var s=new Array(i/4),a=0,u=t;a<s.length;a++,u+=4){var c;c="big"===o?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[a]=c>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}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,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,s=(i<r?1:0)+n+o;e[t]=s>>>0,e[t+1]=i},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,o,i,s,a){var u=0,c=t;return u+=(c=c+r>>>0)<t?1:0,u+=(c=c+i>>>0)<i?1:0,e+n+o+s+(u+=(c=c+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,s,a){return t+r+i+a>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,s,a,u,c){var f=0,l=t;return f+=(l=l+r>>>0)<t?1:0,f+=(l=l+i>>>0)<i?1:0,f+=(l=l+a>>>0)<a?1:0,e+n+o+s+u+(f+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,s,a,u,c){return t+r+i+a+c>>>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 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){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){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t){function n(e,t,n,r,o,i,s){try{var a=e[i](s),u=a.value}catch(c){return void n(c)}a.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var s=e.apply(t,r);function a(e){n(s,o,i,a,u,"next",e)}function u(e){n(s,o,i,a,u,"throw",e)}a(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";var r=n(3),o=n(24),i=n(25),s=n(4),a=r.sum32,u=r.sum32_4,c=r.sum32_5,f=i.ch32,l=i.maj32,h=i.s0_256,p=i.s1_256,d=i.g0_256,v=i.g1_256,g=o.BlockHash,m=[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 y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}r.inherits(y,g),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=u(v(n[r-2]),n[r-7],d(n[r-15]),n[r-16]);var o=this.h[0],i=this.h[1],g=this.h[2],m=this.h[3],y=this.h[4],w=this.h[5],C=this.h[6],b=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var _=c(b,p(y),f(y,w,C),this.k[r],n[r]),x=a(h(o),l(o,i,g));b=C,C=w,w=y,y=a(m,_),m=g,g=i,i=o,o=a(_,x)}this.h[0]=a(this.h[0],o),this.h[1]=a(this.h[1],i),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],m),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],w),this.h[6]=a(this.h[6],C),this.h[7]=a(this.h[7],b)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,i,s,a;if(c(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=f(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function h(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=h.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]: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}(o):g(o,o.length)}function v(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 g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),a.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},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(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},a.prototype.getMaxListeners=function(){return f(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var c=u.length,f=g(u,c);for(n=0;n<c;++n)i(f[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,i,s;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.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 o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);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},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},a.prototype.listenerCount=v,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(26),o=n(27),i=o;i.v1=r,i.v4=o,e.exports=i},function(e,t,n){var r=n(17);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 o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var s=r,a=Number(new Date),u=a-(n||a);s.diff=u,s.prev=n,s.curr=a,n=a,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var c=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;c++;var r=o.formatters[n];if("function"==typeof r){var i=t[c];e=r.call(s,i),t.splice(c,1),c--}return e})),o.formatArgs.call(s,t);var f=s.log||o.log;f.apply(s,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=s,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function s(e,t){var n=o(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function a(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return o.debug=o,o.default=o,o.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},o.disable=function(){var e=[].concat(r(o.names.map(a)),r(o.skips.map(a).map((function(e){return"-"+e})))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.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]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(22),Object.keys(e).forEach((function(t){o[t]=e[t]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t,n){var r=n(18),o=n(19),i=n(20),s=n(21);e.exports=function(e){return r(e)||o(e)||i(e)||s()}},function(e,t,n){var r=n(5);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,n){var r=n(5);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(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.")}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function s(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&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 s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=i)return s(e,t,i,"day");if(t>=o)return s(e,t,o,"hour");if(t>=r)return s(e,t,r,"minute");if(t>=n)return s(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"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){"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(3),o=n(4);function i(){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=i,i.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 o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.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 o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},function(e,t,n){"use strict";var r=n(3).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?s(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){var r,o,i=n(6),s=n(7),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==h){var p=i();null==l&&(l=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=o=16383&(p[6]<<8|p[7]))}var d=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,g=d-a+(v-u)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||d>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,u=v,o=h;var m=(1e4*(268435455&(d+=122192928e5))+v)%4294967296;f[c++]=m>>>24&255,f[c++]=m>>>16&255,f[c++]=m>>>8&255,f[c++]=255&m;var y=d/4294967296*1e4&268435455;f[c++]=y>>>8&255,f[c++]=255&y,f[c++]=y>>>24&15|16,f[c++]=y>>>16&255,f[c++]=h>>>8|128,f[c++]=255&h;for(var w=0;w<6;++w)f[c+w]=l[w];return t||s(f)}},function(e,t,n){var r=n(6),o=n(7);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[i+a]=s[a];return t||o(s)}},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(8),o=n.n(r),i=n(9),s=n(10),a=n.n(s),u=n(11),c=n(12),f=n(0),l=n.n(f),h=l()("calypso:analytics");n(13);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}));var p=function(){return(p=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)};var d=n(1),v=(n(2),n(14)),g=l()("lib/load-script/callback-handler"),m=new Map;function y(){return m}function w(e){return y().has(e)}function C(e,t){var n=y();w(e)?(g('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(g('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=y(),r=n.get(e);if(r){var o='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));g(o),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function _(){var e=this.getAttribute("src");g('Handling successful request for "'.concat(e,'"')),b(e),this.onload=null}function x(){var e=this.getAttribute("src");g('Handling failed request for "'.concat(e,'"')),b(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}var F=l()("lib/load-script/dom-operations");l()("package/load-script");function S(e,t){var n;if(!w(e)&&(n=function(e){F('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=_,t.onerror=x,t}(e),F("Attaching element to head"),document.head.appendChild(n)),"function"!=typeof t)return new Promise((function(t,n){C(e,(function(e){null===e?t():n(e)}))}));C(e,t)}var A,L=["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 E(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&S("//stats.wp.com/w.js?61");var k=new v.EventEmitter;function O(e,t){if(h('Record event "%s" called with props %o',e,t=t||{}),e.startsWith("calypso_")||Object(d.includes)(L,e)){if(A){var n=A(t);t=p(p({},t),n)}t=Object(d.omitBy)(t,d.isUndefined),h('Recording event "%s" with actual props %o',e,t),E(["recordEvent",e,t]),k.emit("record-event",e,t)}else h('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}n(15);n(28),n(29);a()((function(){M(),Object(u.addAction)("setGutenboardingStatus","a8c-gutenboarding",M)}));var j=!1;function M(){var e,t,n,r;if(!j&&(null===(e=window)||void 0===e||null===(t=e.calypsoifyGutenberg)||void 0===t?void 0:t.isGutenboarding)&&(null===(n=window)||void 0===n||null===(r=n.calypsoifyGutenberg)||void 0===r?void 0:r.frankenflowUrl)){j=!0;var s=setInterval((function(){var e,t,n=document.querySelector(".edit-post-header__settings");if(n){clearInterval(s),document.querySelector("body").classList.add("editor-gutenberg-launch__fse-overrides");var r=n.querySelector(".editor-post-publish-button__button"),a=document.createElement("a"),u=null===(e=window)||void 0===e||null===(t=e.calypsoifyGutenberg)||void 0===t?void 0:t.frankenflowUrl;a.href=u,a.target="_top",a.className="editor-gutenberg-launch__launch-button components-button is-primary";var f=document.createTextNode(Object(i.__)("Launch","full-site-editing"));a.appendChild(f);var l=function(){var e=o()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.next=3,Object(c.dispatch)("core/editor").savePost();case 3:O("calypso_newsite_editor_launch_click"),window.top.location.href=u;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();a.addEventListener("click",l),n.prepend(a),r&&n.prepend(r)}}))}}}]));
editor-gutenboarding-launch/index.ts CHANGED
@@ -18,7 +18,7 @@ import './index.scss';
18
  interface CalypsoifyWindow extends Window {
19
  calypsoifyGutenberg?: {
20
  frankenflowUrl?: string;
21
- isFseGutenboarding?: boolean;
22
  [ key: string ]: unknown;
23
  };
24
  }
@@ -34,7 +34,7 @@ let handled = false;
34
  function updateEditor() {
35
  if (
36
  handled ||
37
- ! window?.calypsoifyGutenberg?.isFseGutenboarding ||
38
  ! window?.calypsoifyGutenberg?.frankenflowUrl
39
  ) {
40
  return;
18
  interface CalypsoifyWindow extends Window {
19
  calypsoifyGutenberg?: {
20
  frankenflowUrl?: string;
21
+ isGutenboarding?: boolean;
22
  [ key: string ]: unknown;
23
  };
24
  }
34
  function updateEditor() {
35
  if (
36
  handled ||
37
+ ! window?.calypsoifyGutenberg?.isGutenboarding ||
38
  ! window?.calypsoifyGutenberg?.frankenflowUrl
39
  ) {
40
  return;
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', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '18b86630d0ee68e1769fae541cd5e3a3');
1
+ <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'react-dom', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '0907a69de372bb8ed7f7bafe53354bc3');
editor-site-launch/dist/editor-site-launch.js CHANGED
@@ -1,12 +1,12 @@
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=55)}([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.data}()},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 a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var o=i.apply(null,r);o&&e.push(o)}else if("object"===a)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}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){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){!function(){e.exports=this.lodash}()},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(34)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t,n){var r=n(29),i=n(30),a=n(19),o=n(31);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()}},,function(e,t){!function(){e.exports=this["a8c-fse-common-data-stores"]}()},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.wp.compose}()},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||{},o=e.split(a),s=i.decode||r,l=0;l<o.length;l++){var u=o[l],f=u.indexOf("=");if(!(f<0)){var m=u.substr(0,f).trim(),d=u.substr(++f,u.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),null==n[m]&&(n[m]=c(d,s))}}return n},t.serialize=function(e,t,n){var r=n||{},a=r.encode||i;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!o.test(e))throw new TypeError("argument name is invalid");var c=a(t);if(c&&!o.test(c))throw new TypeError("argument val is invalid");var s=e+"="+c;if(null!=r.maxAge){var l=r.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");s+="; Max-Age="+Math.floor(l)}if(r.domain){if(!o.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!o.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(s+="; HttpOnly");r.secure&&(s+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s};var r=decodeURIComponent,i=encodeURIComponent,a=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function c(e,t){try{return t(e)}catch(n){return e}}},function(e,t,n){"use strict";var r=n(16),i=n(39);function a(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function s(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 o=e.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):a(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=c(e[n].toString(16));return t},t.htonl=o,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=o(i)),n+=s(i.toString(16))}return n},t.zero2=c,t.zero8=s,t.join32=function(e,t,n,i){var a=n-t;r(a%4==0);for(var o=new Array(a/4),c=0,s=t;c<o.length;c++,s+=4){var l;l="big"===i?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[c]=l>>>0}return o},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var a=e[r];"big"===t?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}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],a=r+e[t+1]>>>0,o=(a<r?1:0)+n+i;e[t]=o>>>0,e[t+1]=a},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,a,o,c){var s=0,l=t;return s+=(l=l+r>>>0)<t?1:0,s+=(l=l+a>>>0)<a?1:0,e+n+i+o+(s+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,a,o,c){return t+r+a+c>>>0},t.sum64_5_hi=function(e,t,n,r,i,a,o,c,s,l){var u=0,f=t;return u+=(f=f+r>>>0)<t?1:0,u+=(f=f+a>>>0)<a?1:0,u+=(f=f+c>>>0)<c?1:0,e+n+i+o+s+(u+=(f=f+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,a,o,c,s,l){return t+r+a+c+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 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(35),i=n(36),a=n(19),o=n(37);e.exports=function(e){return r(e)||i(e)||a(e)||o()}},,function(e,t,n){var r=n(20);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(n):"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){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t,n){"use strict";var r=n(15),i=n(40),a=n(41),o=n(16),c=r.sum32,s=r.sum32_4,l=r.sum32_5,u=a.ch32,f=a.maj32,m=a.s0_256,d=a.s1_256,p=a.g0_256,h=a.g1_256,v=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 y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(y,v),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.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]=s(h(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],a=this.h[1],v=this.h[2],g=this.h[3],y=this.h[4],b=this.h[5],_=this.h[6],w=this.h[7];for(o(this.k.length===n.length),r=0;r<n.length;r++){var E=l(w,d(y),u(y,b,_),this.k[r],n[r]),O=c(m(i),f(i,a,v));w=_,_=b,b=y,y=c(g,E),g=v,v=a,a=i,i=c(E,O)}this.h[0]=c(this.h[0],i),this.h[1]=c(this.h[1],a),this.h[2]=c(this.h[2],v),this.h[3]=c(this.h[3],g),this.h[4]=c(this.h[4],y),this.h[5]=c(this.h[5],b),this.h[6]=c(this.h[6],_),this.h[7]=c(this.h[7],w)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=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 o=Number.isNaN||function(e){return e!=e};function c(){c.init.call(this)}e.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var s=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?c.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,a,o,c;if(l(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,c=s,console&&console.warn&&console.warn(c)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=m.bind(r);return i.listener=n,r.wrapFn=i,i}function p(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):v(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 v(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),c.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},c.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},c.prototype.getMaxListeners=function(){return u(this)},c.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 o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)a(s,this,t);else{var l=s.length,u=v(s,l);for(n=0;n<l;++n)a(u[n],this,t)}return!0},c.prototype.addListener=function(e,t){return f(this,e,t,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(e,t){return f(this,e,t,!0)},c.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},c.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},c.prototype.removeListener=function(e,t){var n,r,i,a,o;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,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;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,o||t)}return this},c.prototype.off=c.prototype.removeListener,c.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,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[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},c.prototype.listeners=function(e){return p(this,e,!0)},c.prototype.rawListeners=function(e){return p(this,e,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},c.prototype.listenerCount=h,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(42),i=n(43),a=i;a.v1=r,a.v4=i,e.exports=a},function(e,t,n){var r=n(12);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){function n(e,t,n,r,i,a,o){try{var c=e[a](o),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function c(e){n(o,i,a,c,s,"next",e)}function s(e){n(o,i,a,c,s,"throw",e)}c(void 0)}))}}},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,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(s){i=!0,a=s}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}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){var r=n(17);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),a=0;a<e;a++)t[a]=arguments[a];if(r.enabled){var o=r,c=Number(new Date),s=c-(n||c);o.diff=s,o.prev=n,o.curr=c,n=c,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 a=t[l];e=r.call(o,a),t.splice(l,1),l--}return e})),i.formatArgs.call(o,t);var u=o.log||i.log;u.apply(o,t)}}return r.namespace=e,r.enabled=i.enabled(e),r.useColors=i.useColors(),r.color=t(e),r.destroy=a,r.extend=o,"function"==typeof i.init&&i.init(r),i.instances.push(r),r}function a(){var e=i.instances.indexOf(this);return-1!==e&&(i.instances.splice(e,1),!0)}function o(e,t){var n=i(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function c(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(c)),r(i.skips.map(c).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 a=i.instances[t];a.enabled=i.enabled(a.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(38),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,n){var r=n(20);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){var n=1e3,r=6e4,i=60*r,a=24*i;function o(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 c=typeof e;if("string"===c&&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 o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*a;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return o(e,t,a,"day");if(t>=i)return o(e,t,i,"hour");if(t>=r)return o(e,t,r,"minute");if(t>=n)return o(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"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){"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(15),i=n(16);function a(){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=a,a.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},a.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},a.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 a=8;a<this.padLength;a++)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,a=8;a<this.padLength;a++)r[i++]=0;return r}},function(e,t,n){"use strict";var r=n(15).rotr32;function i(e,t,n){return e&t^~e&n}function a(e,t,n){return e&t^e&n^t&n}function o(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?o(t,n,r):2===e?a(t,n,r):void 0},t.ch32=i,t.maj32=a,t.p32=o,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){var r,i,a=n(21),o=n(22),c=0,s=0;e.exports=function(e,t,n){var l=t&&n||0,u=t||[],f=(e=e||{}).node||r,m=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==m){var d=a();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==m&&(m=i=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:s+1,v=p-c+(h-s)/1e4;if(v<0&&void 0===e.clockseq&&(m=m+1&16383),(v<0||p>c)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,s=h,i=m;var g=(1e4*(268435455&(p+=122192928e5))+h)%4294967296;u[l++]=g>>>24&255,u[l++]=g>>>16&255,u[l++]=g>>>8&255,u[l++]=255&g;var y=p/4294967296*1e4&268435455;u[l++]=y>>>8&255,u[l++]=255&y,u[l++]=y>>>24&15|16,u[l++]=y>>>16&255,u[l++]=m>>>8|128,u[l++]=255&m;for(var b=0;b<6;++b)u[l+b]=f[b];return t||o(u)}},function(e,t,n){var r=n(21),i=n(22);e.exports=function(e,t,n){var a=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var c=0;c<16;++c)t[a+c]=o[c];return t||i(o)}},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";n.r(t);var r=n(0),i=n.n(r),a=n(23),o=(n(11),n(9)),c=n.n(o),s=n(1),l=n(2),u=n(3),f=n(5);function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function p(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 h=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,i=d(e,["icon","size"]);return Object(s.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))},v=n(6),g=Object(s.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(s.createElement)(v.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"})),y=Object(s.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(v.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"})),b=(n(32),n(12)),_=n.n(b),w=(n(47),function(e){var t=e.children;return r.createElement("h1",{className:"onboarding-title"},t)}),E=function(e){var t=e.children;return r.createElement("h2",{className:"onboarding-subtitle"},t)},O=n(4),C=n.n(O),j=(n(33),function(e){var t=e.className,n=e.children;return Object(s.createElement)("div",{className:C()("nux-launch-step",t)},n)}),S=n(7),x=Object(s.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(v.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"})),k=n(8),N=n.n(k),F=N()("calypso:analytics");n(24);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}));var P=function(){return(P=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 A(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}n(14);var L=n(25),D=N()("lib/load-script/callback-handler"),I=new Map;function R(){return I}function M(e){return R().has(e)}function T(e,t){var n=R();M(e)?(D('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(D('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=R(),r=n.get(e);if(r){var i='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));D(i),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function B(){var e=this.getAttribute("src");D('Handling successful request for "'.concat(e,'"')),z(e),this.onload=null}function q(){var e=this.getAttribute("src");D('Handling failed request for "'.concat(e,'"')),z(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}var U=N()("lib/load-script/dom-operations");N()("package/load-script");function V(e,t){var n;if(!M(e)&&(n=function(e){U('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=B,t.onerror=q,t}(e),U("Attaching element to head"),document.head.appendChild(n)),"function"!=typeof t)return new Promise((function(t,n){T(e,(function(e){null===e?t():n(e)}))}));T(e,t)}var H,G=["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 $(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&V("//stats.wp.com/w.js?61");var W=new L.EventEmitter;function J(e,t){if(F('Record event "%s" called with props %o',e,t=t||{}),e.startsWith("calypso_")||Object(S.includes)(G,e)){if(H){var n=H(t);t=P(P({},t),n)}t=Object(S.omitBy)(t,S.isUndefined),F('Recording event "%s" with actual props %o',e,t),$(["recordEvent",e,t]),W.emit("record-event",e,t)}else F('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}var K=n(26);var X=n(13),Z=r.createContext(Y()),Q=function(){return r.useContext(Z)};Object(X.createHigherOrderComponent)((function(e){return function(t){var n=Q();return r.createElement(e,P({},n,t))}}),"withI18n");function Y(e){var t,n,r=Object(f.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}}var ee="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),te=new Uint8Array(16);function ne(){if(!ee)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ee(te)}for(var re=[],ie=0;ie<256;++ie)re[ie]=(ie+256).toString(16).substr(1);var ae=function(e,t){var n=t||0,r=re;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 oe=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||ne)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var a=0;a<16;++a)t[r+a]=i[a];return t||ae(i)},ce=function(e){var t=e.suggestion,n=e.railcarId,a=e.isRecommended,o=void 0!==a&&a,c=e.onSelect,s=e.onRender,l=e.selected,u=Q().__,m=t.domain_name,d=m.indexOf("."),p=m.slice(0,d),h=m.slice(d),v=Object(r.useState)(),g=v[0],y=v[1],b=Object(r.useState)(),_=b[0],w=b[1],E=oe();Object(r.useEffect)((function(){m!==g&&_!==n&&n&&(s(),y(m),w(n))}),[m,g,_,n,s]);return i.a.createElement("label",{className:C()("domain-picker__suggestion-item",{"is-free":t.is_free,"is-selected":l})},i.a.createElement("input",{"aria-labelledby":E,className:"domain-picker__suggestion-radio-button",type:"radio",name:"domain-picker-suggestion-option",onChange:function(){_&&function(e){J("calypso_traintracks_interact",{railcar:e.railcarId,action:e.action})}({action:"domain_selected",railcarId:_}),c(t)},checked:l}),i.a.createElement("div",{className:"domain-picker__suggestion-item-name"},i.a.createElement("span",{className:"domain-picker__domain-name"},p),i.a.createElement("span",{className:"domain-picker__domain-tld"},h),o&&i.a.createElement("div",{className:"domain-picker__badge is-recommended"},u("Recommended"))),i.a.createElement("div",{className:C()("domain-picker__price",{"is-paid":!t.is_free})},t.is_free?u("Free"):i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:"domain-picker__price-inclusive"}," ",u("Included in plans")," "),i.a.createElement("span",{className:"domain-picker__price-cost"},Object(f.sprintf)(u("%s/year"),t.cost)))))},se=function(){return i.a.createElement("div",{className:"domain-picker__suggestion-item placeholder"},i.a.createElement("div",{className:"domain-picker__suggestion-item-name placeholder"}),i.a.createElement("div",{className:"domain-picker__price placeholder"}))};function le(e,t){return e===t}function ue(e,t,n){var i=n&&n.equalityFn?n.equalityFn:le,a=Object(r.useState)(e),o=a[0],c=a[1],s=function(e,t,n){void 0===n&&(n={});var i=n.maxWait,a=Object(r.useRef)(null),o=Object(r.useRef)([]),c=n.leading,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),u=Object(r.useRef)(!1),f=Object(r.useRef)(e);f.current=e;var m=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(a.current),a.current=null,o.current=[],l.current=null,s.current=!1}),[]);return Object(r.useEffect)((function(){return function(){u.current=!0}}),[]),[Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o.current=e,clearTimeout(l.current),!l.current&&c&&!s.current)return f.current.apply(f,e),void(s.current=!0);l.current=setTimeout((function(){m(),u.current||f.current.apply(f,e)}),t),i&&!a.current&&(a.current=setTimeout((function(){var e=o.current;m(),u.current||f.current.apply(null,e)}),i))}),[i,t,m,c]),m,function(){l.current&&(f.current.apply(null,o.current),m())}]}(Object(r.useCallback)((function(e){return c(e)}),[]),t,n),l=s[0],u=s[1],f=Object(r.useRef)(e);return Object(r.useEffect)((function(){i(f.current,e)||(l(e),f.current=e)}),[e,l,i]),[o,u]}var fe=Object(s.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(s.createElement)(v.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),me=(n(45),function(e){var t=e.onSelect,n=e.selected,i=Q().__,a=Object(s.useState)(!1),o=a[0],c=a[1],f=function(e){c(!1),t(e)},m=Object(l.useSelect)((function(e){return e("automattic/domains/suggestions").getCategories()}));return r.createElement("div",{className:C()("domain-categories",{"is-open":o})},r.createElement(u.Button,{className:"domain-categories__dropdown-button",onClick:function(){return c(!o)}},r.createElement("span",null,n||i("All Categories")),r.createElement(h,{icon:fe,size:16})),r.createElement("ul",{className:"domain-categories__item-group"},r.createElement("li",{className:C()("domain-categories__item",{"is-selected":!n})},r.createElement(u.Button,{onClick:function(){return f()}},i("View all"))),m.map((function(e){var t=e.slug,i=e.title;return r.createElement("li",{key:t,className:C()("domain-categories__item",{"is-selected":t===n})},r.createElement(u.Button,{onClick:function(){return f(t)}},i))}))))}),de=function(){return i.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"},i.a.createElement("rect",{x:"0",width:"310",height:"50",rx:"10",fill:"#D8D8D8"}),i.a.createElement("rect",{x:"8",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("rect",{x:"40",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("rect",{x:"72",y:"8",width:"300",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("text",{x:"80",y:"26",fill:"#999"},"https://"),i.a.createElement("text",{x:"133",y:"26",fill:"#515151"},"example.com"))},pe=(n(44),function(e){var t,n=e.header,a=e.showDomainCategories,o=e.onDomainSelect,c=e.quantity,s=void 0===c?5:c,f=e.quantityExpanded,m=void 0===f?10:f,d=e.onDomainSearchBlur,p=e.analyticsFlowId,v=e.analyticsUiAlgo,g=e.initialDomainSearch,y=void 0===g?"":g,b=e.onSetDomainSearch,_=e.currentDomain,w=Q().__,E=w("Search for a domain"),O=Object(r.useState)(!1),C=O[0],j=O[1],k=Object(r.useState)(y),N=k[0],F=k[1],P=Object(r.useState)(),A=P[0],L=P[1],D=Object(l.useSelect)((function(e){return e("automattic/domains/suggestions").getDomainSuggestionVendor()})),I=function(e,t,n,r){void 0===e&&(e=""),void 0===r&&(r="en");var i=ue(e,300)[0];return Object(l.useSelect)((function(e){if(i)return e("automattic/domains/suggestions").getDomainSuggestions(i,{include_wordpressdotcom:!0,include_dotblogsubdomain:!1,quantity:t+1,locale:r,category_slug:n})}),[i,n,t])}(N.trim(),m,A,Q().i18nLocale),R=null==I?void 0:I.slice(0,C?m:s);Object(r.useEffect)((function(){j(!1)}),[N]);var M=Object(r.useState)(),T=M[0],z=M[1];Object(r.useEffect)((function(){var e;I&&z((void 0===(e="suggestion")&&(e="recommendation"),Object(K.v4)().replace(/-/g,"")+"-"+e))}),[I,z]);var B=function(e,t,n,r){var i="/domains/search/"+D+"/"+p+(A?"/"+A:""),a=e.domain_name;!function(e){J("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:"/"+p+"/"+v,fetchAlgo:i,query:N,railcarId:t,result:r?a+"#recommended":a,uiPosition:n})};return i.a.createElement("div",{className:"domain-picker"},n&&n,i.a.createElement("div",{className:"domain-picker__search"},i.a.createElement("div",{className:"domain-picker__search-icon"},i.a.createElement(h,{icon:x})),i.a.createElement(u.TextControl,{"data-hj-whitelist":!0,hideLabelFromVision:!0,label:E,placeholder:E,onChange:function(e){F(e),b(e)},onBlur:function(e){d&&d(e.currentTarget.value)},value:N})),N.trim()?i.a.createElement("div",{className:"domain-picker__body"},a&&i.a.createElement("div",{className:"domain-picker__aside"},i.a.createElement(me,{selected:A,onSelect:L})),i.a.createElement("div",{className:"domain-picker__suggestion-sections"},i.a.createElement("div",{className:"domain-picker__suggestion-item-group"},null!==(t=null==R?void 0:R.map((function(e,t){return i.a.createElement(ce,{key:e.domain_name,suggestion:e,railcarId:T?""+T+t:void 0,isRecommended:1===t,onRender:function(){return B(e,""+T+t,t,1===t)},selected:_===e.domain_name,onSelect:o})})))&&void 0!==t?t:Object(S.times)(s,(function(e){return i.a.createElement(se,{key:e})}))),!C&&(null==I?void 0:I.length)&&(null==I?void 0:I.length)>s&&i.a.createElement("div",{className:"domain-picker__show-more"},i.a.createElement(u.Button,{onClick:function(){return j(!0)}},w("View more results"))))):i.a.createElement("div",{className:"domain-picker__empty-state"},i.a.createElement("p",{className:"domain-picker__empty-state--text"},w("A domain name is the site address people type in their browser to visit your site.")),i.a.createElement("div",null,i.a.createElement(de,null))))});function he(){return Object(l.useSelect)((function(e){return e("automattic/site").getSite(window._currentSiteId)}))}var ve=function(e){var t,n=e.onSelect,r=he(),i=function(){var e=he();return(null==e?void 0:e.URL)&&new URL(null==e?void 0:e.URL).hostname||""}(),a=Object(l.useSelect)((function(e){return e("automattic/launch").getState()})),o=a.domain,c=a.domainSearch,u=Object(l.useDispatch)("automattic/launch"),f=u.setDomain,m=u.setDomainSearch,d=null!==(t=c.trim()||(null==r?void 0:r.name))&&void 0!==t?t:"";return Object(s.createElement)(pe,{analyticsFlowId:"gutenboarding",initialDomainSearch:d,onSetDomainSearch:m,onDomainSearchBlur:function(e){J("calypso_newsite_domain_search_blur",{flow:"gutenboarding",query:e,where:"editor_domain_modal"})},currentDomain:(null==o?void 0:o.domain_name)||i,onDomainSelect:function(e){f(e),null==n||n()},analyticsUiAlgo:"editor_domain_modal"})},ge=(n(46),function(e){var t=e.onNextStep;return Object(s.createElement)(j,{className:"nux-launch-domain-step"},Object(s.createElement)("div",{className:"nux-launch-step__header"},Object(s.createElement)("div",null,Object(s.createElement)(w,null,Object(f.__)("Choose a domain","full-site-editing")),Object(s.createElement)(E,null,Object(f.__)("Free for the first year with any paid plan","full-site-editing")))),Object(s.createElement)("div",{className:"nux-launch-step__body"},Object(s.createElement)(ve,{onSelect:t})))}),ye=(n(52),function(e){var t=e.className,n=e.children;return r.createElement("div",{className:C()("action-buttons",t)},n)}),be=function(e){var t=e.className,n=e.children,i=A(e,["className","children"]),a=Q().__;return r.createElement(u.Button,P({className:C()("action_buttons__button action-buttons__back",t),isLink:!0},i),n||a("Go back"))},_e=Object(s.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(v.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"})),we=i.a.createElement(h,{icon:_e,size:17}),Ee=i.a.createElement(h,{icon:y,size:17}),Oe=i.a.createElement("svg",{width:"8",viewBox:"0 0 8 4"},i.a.createElement("path",{d:"M0 0 L8 0 L4 4 L0 0",fill:"currentColor"}));var Ce,je=function(e){var t=e.slug,n=e.name,a=e.price,o=e.isPopular,c=void 0!==o&&o,s=e.isFree,l=void 0!==s&&s,m=e.domain,d=e.features,p=e.onSelect,h=e.onPickDomainClick,v=e.onToggleExpandAll,g=e.allPlansExpanded,y=Q().__,b=Object(r.useState)(!1),_=b[0],w=b[1],E=Object(X.useViewportMatch)("mobile",">="),O=function(e,t,n){return{NO_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plan-item__domain-summary is-cta",icon:we,domainMessage:i.a.createElement(i.a.Fragment,null,n("Pick a free domain (1 year)")," ",Oe)}},FREE_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plan-item__domain-summary is-cta",icon:we,domainMessage:i.a.createElement(i.a.Fragment,null,n("Pick a free domain (1 year)")," ",Oe)}},PAID_DOMAIN:{FREE_PLAN:{className:"plan-item__domain-summary is-free",icon:Ee,domainMessage:Object(f.sprintf)(n("%s is not included"),null==t?void 0:t.domain_name)},PAID_PLAN:{className:"plan-item__domain-summary is-picked",icon:we,domainMessage:Object(f.sprintf)(n("%s is included"),null==t?void 0:t.domain_name)}}}[t&&(t.is_free?"FREE_DOMAIN":"PAID_DOMAIN")||"NO_DOMAIN"][e?"FREE_PLAN":"PAID_PLAN"]}(l,m,y);Object(r.useEffect)((function(){w(g)}),[g]);var j=g||E||c||_;return i.a.createElement("div",{className:C()("plan-item",{"is-popular":c,"is-open":j})},c&&i.a.createElement("span",{className:"plan-item__badge"},y("Popular")),i.a.createElement("div",{className:C()("plan-item__viewport",{"is-popular":c})},i.a.createElement("div",{className:"plan-item__details"},i.a.createElement("div",{tabIndex:0,role:"button",onClick:function(){return w((function(e){return!e}))},onKeyDown:function(e){return 32===e.keyCode&&w((function(e){return!e}))},className:"plan-item__summary"},i.a.createElement("div",{className:"plan-item__heading"},i.a.createElement("div",{className:"plan-item__name"},n)),i.a.createElement("div",{className:"plan-item__price"},i.a.createElement("div",{className:C()("plan-item__price-amount",{"is-loading":!a})},a||" ")),!j&&i.a.createElement("div",{className:"plan-item__dropdown-chevron"},Oe)),i.a.createElement("div",{hidden:!j},i.a.createElement("div",{className:"plan-item__price-note"},y(l?"free forever":"per month, billed yearly")),i.a.createElement("div",{className:"plan-item__actions"},i.a.createElement(u.Button,{className:"plan-item__select-button",onClick:function(){p(t)},isPrimary:!0,isLarge:!0},i.a.createElement("span",null,y("Choose")))),i.a.createElement("div",{className:"plan-item__domain"},O&&i.a.createElement(u.Button,{className:O.className,onClick:h,isLink:!0},O.icon,O.domainMessage)),i.a.createElement("div",{className:"plan-item__features"},i.a.createElement("ul",{className:"plan-item__feature-item-group"},d.map((function(e,t){return i.a.createElement("li",{key:t,className:"plan-item__feature-item"},we," ",e)}))))))),c&&!E&&i.a.createElement(u.Button,{onClick:v,className:"plan-item__mobile-expand-all-plans",isLink:!0},y(g?"Collapse all plans":"Expand all plans")))},Se="automattic/onboard/plans",xe=(n(49),function(e){var t=e.selectedPlanSlug,n=e.onPlanSelect,a=e.onPickDomainClick,o=e.currentDomain,c=Object(l.useSelect)((function(e){return e(Se).getSupportedPlans()})),s=Object(l.useSelect)((function(e){return e(Se).getPrices()})),u=Object(r.useState)(!1),f=u[0],m=u[1];return i.a.createElement("div",{className:"plans-table"},c.map((function(e){var r;return e&&i.a.createElement(je,{allPlansExpanded:f,key:e.storeSlug,slug:e.storeSlug,domain:o,features:null!==(r=e.features)&&void 0!==r?r:[],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:a,onToggleExpandAll:function(){return m((function(e){return!e}))}})})))}),ke=(n(50),i.a.createElement(h,{icon:_e,size:25})),Ne=function(e){var t=e.onSelect,n=Object(l.useSelect)((function(e){return e(Se).getPlansDetails()})),r=Object(l.useSelect)((function(e){return e(Se).getPrices()})),a=Object(l.useSelect)((function(e){return e(Se).getSupportedPlans()})),o=Q().__;return i.a.createElement("div",{className:"plans-details"},i.a.createElement("table",{className:"plans-details__table"},i.a.createElement("thead",null,i.a.createElement("tr",{className:"plans-details__header-row"},i.a.createElement("th",null,o("Feature")),a.map((function(e){return i.a.createElement("th",{key:e.storeSlug},e.title)})))),n.map((function(e){return i.a.createElement("tbody",{key:e.id},e.name&&i.a.createElement("tr",{className:"plans-details__header-row"},i.a.createElement("th",{colSpan:6},e.name)),e.features.map((function(e,t){return i.a.createElement("tr",{className:"plans-details__feature-row",key:t},i.a.createElement("th",null,e.name),e.data.map((function(t,n){return i.a.createElement("td",{key:n},"checkbox"===e.type&&(t?i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:"hidden"},o("Available")),ke):i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:"hidden"},o("Unavailable")," "))),"text"===e.type&&t)})))})))})),i.a.createElement("tbody",null,i.a.createElement("tr",{className:"plans-details__header-row"},i.a.createElement("th",{colSpan:6},o("Sign up"))),i.a.createElement("tr",{className:"plans-details__feature-row",key:"price"},i.a.createElement("th",null,o("Monthly subscription (billed yearly)")),a.map((function(e){return i.a.createElement("td",{key:e.storeSlug},r[e.storeSlug])}))),i.a.createElement("tr",{className:"plans-details__feature-row",key:"cta"},i.a.createElement("th",null),a.map((function(e){return i.a.createElement("td",{key:e.storeSlug},i.a.createElement(u.Button,{onClick:function(){t(e.storeSlug)},isPrimary:!0,isLarge:!0},i.a.createElement("span",null,o("Choose"))))}))))))},Fe=(n(48),function(e){var t,n=e.header,i=e.currentPlan,a=e.currentDomain,o=e.onPlanSelect,c=e.onPickDomainClick,s=Q().__;return r.createElement("div",{className:"plans-grid"},n&&r.createElement("div",{className:"plans-grid__header"},n),r.createElement("div",{className:"plans-grid__table"},r.createElement("div",{className:"plans-grid__table-container"},r.createElement(xe,{selectedPlanSlug:null!==(t=null==i?void 0:i.storeSlug)&&void 0!==t?t:"",onPlanSelect:o,currentDomain:a,onPickDomainClick:c}))),r.createElement("div",{className:"plans-grid__details"},r.createElement("div",{className:"plans-grid__details-heading"},r.createElement(w,null,s("Detailed comparison"))),r.createElement("div",{className:"plans-grid__details-container"},r.createElement(Ne,{onSelect:o}))))}),Pe=function(e){var t=e.onSelect,n=Object(l.useSelect)((function(e){return e("automattic/launch").getState()})).domain,r=Object(l.useDispatch)("automattic/launch").updatePlan;return Object(s.createElement)(Fe,{currentDomain:n,onPlanSelect:function(e){r(e),null==t||t()}})},Ae=(n(51),function(e){var t=e.onPrevStep,n=e.onNextStep;return Object(s.createElement)(j,{className:"nux-launch-plan-step"},Object(s.createElement)("div",{className:"nux-launch-step__header"},Object(s.createElement)("div",null,Object(s.createElement)(w,null,Object(f.__)("Choose a plan","full-site-editing")),Object(s.createElement)(E,null,Object(f.__)("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(s.createElement)(ye,null,Object(s.createElement)(be,{onClick:function(){null==t||t()}}))),Object(s.createElement)("div",{className:"nux-launch-step__body"},Object(s.createElement)(Pe,{onSelect:n})))}),Le=(n(53),"domain"),De="plan",Ie=(Ce={},_()(Ce,Le,ge),_()(Ce,De,Ae),Ce),Re=[Le,De],Me=function(e){var t=e.step,n=void 0===t?Le:t,i=e.onSubmit,a=Re.indexOf(n),o=r.useState(a),l=c()(o,2),u=l[0],f=l[1],m=Re[u],d=Ie[m];return Object(s.createElement)("div",{className:"nux-launch"},Object(s.createElement)(d,{onPrevStep:function(){var e=u-1;e<0&&(e=0),f(e)},onNextStep:function(){var e=u+1;e>Re.length-1&&(null==i||i()),f(e)}}))},Te=function(e){var t=e.onClose,n=e.onSubmit,r=e.step,i=e.isLaunching;return Object(s.createElement)(u.Modal,{className:"nux-launch-modal",overlayClassName:"nux-launch-modal-overlay",bodyOpenClassName:"has-nux-launch-modal",onRequestClose:function(){return null==t?void 0:t()},title:""},Object(s.createElement)("div",{className:"nux-launch-modal-header"},Object(s.createElement)("div",{className:"nux-launch-modal-header__wp-logo"},Object(s.createElement)(h,{icon:g,size:36})),Object(s.createElement)(u.Button,{isLink:!0,className:"nux-launch-modal-header__close-button",onClick:t,"aria-label":Object(f.__)("Close dialog","full-site-editing"),disabled:!t},Object(s.createElement)(h,{icon:y,size:24}))),i?"launch animation":Object(s.createElement)(Me,{step:r,onSubmit:n}))};function ze(){var e=Object(l.useSelect)((function(e){return e("automattic/site").getSite(window._currentSiteId)})),t=Object(l.useSelect)((function(e){return e("automattic/site").isLaunched(window._currentSiteId)}));return{isSiteUnlaunched:"unlaunched"===(null==e?void 0:e.launch_status)&&!t,isFreePlan:null==e?void 0:e.plan.is_free,launchStatus:t}}var Be=n(17),qe=n.n(Be),Ue=n(27),Ve=n.n(Ue),He=n(28),Ge=n.n(He),$e=(n(54),function(){var e=Object(l.useDispatch)("automattic/launch").launchSite,t=ze(),n=t.isSiteUnlaunched,i=t.isFreePlan,a=r.useState(!1),o=c()(a,2),m=o[0],d=o[1],p=r.useState(!1),h=c()(p,2),v=h[0],g=h[1],y=function(){g(!0),e()};return function(){var e=ze().launchStatus,t=Object(l.useSelect)((function(e){return e("automattic/launch").getState()})),n=t.plan,i=t.domain,a=Object(l.useDispatch)("automattic/site"),o=a.getCart,c=a.setCart;r.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"}},r={meta:null==i?void 0:i.domain_name,product_id:null==i?void 0:i.product_id,extra:{privacy_available:null==i?void 0:i.supports_privacy,privacy:null==i?void 0:i.supports_privacy,source:"gutenboarding"}};return void function(){var e=Ge()(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o(window._currentSiteId);case 2:return n=e.sent,e.next=5,c(window._currentSiteId,Ve()({},n,{products:[].concat(qe()(n.products),[t,r])}));case 5:window.top.location.href="https://wordpress.com/checkout/".concat(window._currentSiteId,"?preLaunch=1");case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}window.location.href="https://wordpress.com/home/".concat(window._currentSiteId)}}),[e])}(),Object(s.createElement)(s.Fragment,null,n&&Object(s.createElement)(u.Button,{"aria-expanded":m,"aria-pressed":m,"aria-haspopup":"menu",onClick:function(){i?d(!m):y()}},Object(f.__)("Launch site","full-site-editing")),m&&Object(s.createElement)(Te,{onClose:function(){d(!1)},onSubmit:y,isLaunching:v}),v&&Object(s.createElement)(Te,{isLaunching:!0}))}),We=setInterval((function(){var e=document.querySelector(".edit-post-header__settings");if(e){clearInterval(We);var t=document.createElement("div");e.prepend(t),a.render(r.createElement($e),t)}}))}]));
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=57)}([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.data}()},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 a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var o=i.apply(null,r);o&&e.push(o)}else if("object"===a)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}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){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){!function(){e.exports=this.lodash}()},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(36)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t,n){var r=n(31),i=n(32),a=n(19),o=n(33);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()}},,function(e,t){!function(){e.exports=this["a8c-fse-common-data-stores"]}()},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.wp.compose}()},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||{},o=e.split(a),s=i.decode||r,u=0;u<o.length;u++){var l=o[u],f=l.indexOf("=");if(!(f<0)){var m=l.substr(0,f).trim(),d=l.substr(++f,l.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),null==n[m]&&(n[m]=c(d,s))}}return n},t.serialize=function(e,t,n){var r=n||{},a=r.encode||i;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!o.test(e))throw new TypeError("argument name is invalid");var c=a(t);if(c&&!o.test(c))throw new TypeError("argument val is invalid");var s=e+"="+c;if(null!=r.maxAge){var u=r.maxAge-0;if(isNaN(u))throw new Error("maxAge should be a Number");s+="; Max-Age="+Math.floor(u)}if(r.domain){if(!o.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!o.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(s+="; HttpOnly");r.secure&&(s+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s};var r=decodeURIComponent,i=encodeURIComponent,a=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function c(e,t){try{return t(e)}catch(n){return e}}},function(e,t,n){"use strict";var r=n(16),i=n(41);function a(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function s(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 o=e.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):a(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=c(e[n].toString(16));return t},t.htonl=o,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=o(i)),n+=s(i.toString(16))}return n},t.zero2=c,t.zero8=s,t.join32=function(e,t,n,i){var a=n-t;r(a%4==0);for(var o=new Array(a/4),c=0,s=t;c<o.length;c++,s+=4){var u;u="big"===i?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[c]=u>>>0}return o},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var a=e[r];"big"===t?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}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],a=r+e[t+1]>>>0,o=(a<r?1:0)+n+i;e[t]=o>>>0,e[t+1]=a},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,a,o,c){var s=0,u=t;return s+=(u=u+r>>>0)<t?1:0,s+=(u=u+a>>>0)<a?1:0,e+n+i+o+(s+=(u=u+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,a,o,c){return t+r+a+c>>>0},t.sum64_5_hi=function(e,t,n,r,i,a,o,c,s,u){var l=0,f=t;return l+=(f=f+r>>>0)<t?1:0,l+=(f=f+a>>>0)<a?1:0,l+=(f=f+c>>>0)<c?1:0,e+n+i+o+s+(l+=(f=f+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,a,o,c,s,u){return t+r+a+c+u>>>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 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(37),i=n(38),a=n(19),o=n(39);e.exports=function(e){return r(e)||i(e)||a(e)||o()}},,function(e,t,n){var r=n(20);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(n):"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){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,n){"use strict";var r=n(15),i=n(42),a=n(43),o=n(16),c=r.sum32,s=r.sum32_4,u=r.sum32_5,l=a.ch32,f=a.maj32,m=a.s0_256,d=a.s1_256,p=a.g0_256,h=a.g1_256,v=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 b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(b,v),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.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]=s(h(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],a=this.h[1],v=this.h[2],g=this.h[3],b=this.h[4],y=this.h[5],_=this.h[6],w=this.h[7];for(o(this.k.length===n.length),r=0;r<n.length;r++){var E=u(w,d(b),l(b,y,_),this.k[r],n[r]),O=c(m(i),f(i,a,v));w=_,_=y,y=b,b=c(g,E),g=v,v=a,a=i,i=c(E,O)}this.h[0]=c(this.h[0],i),this.h[1]=c(this.h[1],a),this.h[2]=c(this.h[2],v),this.h[3]=c(this.h[3],g),this.h[4]=c(this.h[4],b),this.h[5]=c(this.h[5],y),this.h[6]=c(this.h[6],_),this.h[7]=c(this.h[7],w)},b.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=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 o=Number.isNaN||function(e){return e!=e};function c(){c.init.call(this)}e.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var s=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,a,o,c;if(u(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=l(e))>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,c=s,console&&console.warn&&console.warn(c)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=m.bind(r);return i.listener=n,r.wrapFn=i,i}function p(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):v(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 v(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),c.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},c.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},c.prototype.getMaxListeners=function(){return l(this)},c.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 o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)a(s,this,t);else{var u=s.length,l=v(s,u);for(n=0;n<u;++n)a(l[n],this,t)}return!0},c.prototype.addListener=function(e,t){return f(this,e,t,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(e,t){return f(this,e,t,!0)},c.prototype.once=function(e,t){return u(t),this.on(e,d(this,e,t)),this},c.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,d(this,e,t)),this},c.prototype.removeListener=function(e,t){var n,r,i,a,o;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;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,o||t)}return this},c.prototype.off=c.prototype.removeListener,c.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,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[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},c.prototype.listeners=function(e){return p(this,e,!0)},c.prototype.rawListeners=function(e){return p(this,e,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},c.prototype.listenerCount=h,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(44),i=n(45),a=i;a.v1=r,a.v4=i,e.exports=a},function(e,t,n){var r=n(12);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){function n(e,t,n,r,i,a,o){try{var c=e[a](o),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function c(e){n(o,i,a,c,s,"next",e)}function s(e){n(o,i,a,c,s,"throw",e)}c(void 0)}))}}},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,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(s){i=!0,a=s}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}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){var r=n(17);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),a=0;a<e;a++)t[a]=arguments[a];if(r.enabled){var o=r,c=Number(new Date),s=c-(n||c);o.diff=s,o.prev=n,o.curr=c,n=c,t[0]=i.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;u++;var r=i.formatters[n];if("function"==typeof r){var a=t[u];e=r.call(o,a),t.splice(u,1),u--}return e})),i.formatArgs.call(o,t);var l=o.log||i.log;l.apply(o,t)}}return r.namespace=e,r.enabled=i.enabled(e),r.useColors=i.useColors(),r.color=t(e),r.destroy=a,r.extend=o,"function"==typeof i.init&&i.init(r),i.instances.push(r),r}function a(){var e=i.instances.indexOf(this);return-1!==e&&(i.instances.splice(e,1),!0)}function o(e,t){var n=i(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function c(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(c)),r(i.skips.map(c).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 a=i.instances[t];a.enabled=i.enabled(a.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(40),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,n){var r=n(20);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){var n=1e3,r=6e4,i=60*r,a=24*i;function o(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 c=typeof e;if("string"===c&&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 o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*a;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return o(e,t,a,"day");if(t>=i)return o(e,t,i,"hour");if(t>=r)return o(e,t,r,"minute");if(t>=n)return o(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"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){"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(15),i=n(16);function a(){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=a,a.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},a.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},a.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 a=8;a<this.padLength;a++)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,a=8;a<this.padLength;a++)r[i++]=0;return r}},function(e,t,n){"use strict";var r=n(15).rotr32;function i(e,t,n){return e&t^~e&n}function a(e,t,n){return e&t^e&n^t&n}function o(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?o(t,n,r):2===e?a(t,n,r):void 0},t.ch32=i,t.maj32=a,t.p32=o,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){var r,i,a=n(21),o=n(22),c=0,s=0;e.exports=function(e,t,n){var u=t&&n||0,l=t||[],f=(e=e||{}).node||r,m=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==m){var d=a();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==m&&(m=i=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:s+1,v=p-c+(h-s)/1e4;if(v<0&&void 0===e.clockseq&&(m=m+1&16383),(v<0||p>c)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,s=h,i=m;var g=(1e4*(268435455&(p+=122192928e5))+h)%4294967296;l[u++]=g>>>24&255,l[u++]=g>>>16&255,l[u++]=g>>>8&255,l[u++]=255&g;var b=p/4294967296*1e4&268435455;l[u++]=b>>>8&255,l[u++]=255&b,l[u++]=b>>>24&15|16,l[u++]=b>>>16&255,l[u++]=m>>>8|128,l[u++]=255&m;for(var y=0;y<6;++y)l[u+y]=f[y];return t||o(l)}},function(e,t,n){var r=n(21),i=n(22);e.exports=function(e,t,n){var a=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var c=0;c<16;++c)t[a+c]=o[c];return t||i(o)}},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";n.r(t);var r=n(0),i=n.n(r),a=n(23),o=n(24),c=n.n(o),s=n(25),u=(n(11),n(9)),l=n.n(u),f=n(1),m=n(2),d=n(3),p=n(5);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g(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 b=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,i=v(e,["icon","size"]);return Object(f.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))},y=n(6),_=Object(f.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(f.createElement)(y.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"})),w=Object(f.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(f.createElement)(y.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"})),E=(n(34),n(12)),O=n.n(E),C=(n(49),function(e){var t=e.children;return r.createElement("h1",{className:"onboarding-title"},t)}),j=function(e){var t=e.children;return r.createElement("h2",{className:"onboarding-subtitle"},t)},S=n(4),x=n.n(S),k=(n(35),function(e){var t=e.className,n=e.children;return Object(f.createElement)("div",{className:x()("nux-launch-step",t)},n)}),N=n(7),F=Object(f.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(f.createElement)(y.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"})),P=n(8),A=n.n(P),L=A()("calypso:analytics");n(26);"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}));var D=function(){return(D=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 R(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}n(14);var I=n(27),M=A()("lib/load-script/callback-handler"),T=new Map;function z(){return T}function B(e){return z().has(e)}function q(e,t){var n=z();B(e)?(M('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(M('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=z(),r=n.get(e);if(r){var i='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));M(i),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function V(){var e=this.getAttribute("src");M('Handling successful request for "'.concat(e,'"')),U(e),this.onload=null}function G(){var e=this.getAttribute("src");M('Handling failed request for "'.concat(e,'"')),U(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}var H=A()("lib/load-script/dom-operations");A()("package/load-script");function $(e,t){var n;if(!B(e)&&(n=function(e){H('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=V,t.onerror=G,t}(e),H("Attaching element to head"),document.head.appendChild(n)),"function"!=typeof t)return new Promise((function(t,n){q(e,(function(e){null===e?t():n(e)}))}));q(e,t)}var W,J=["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 K(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&$("//stats.wp.com/w.js?61");var X=new I.EventEmitter;function Z(e,t){if(L('Record event "%s" called with props %o',e,t=t||{}),e.startsWith("calypso_")||Object(N.includes)(J,e)){if(W){var n=W(t);t=D(D({},t),n)}t=Object(N.omitBy)(t,N.isUndefined),L('Recording event "%s" with actual props %o',e,t),K(["recordEvent",e,t]),X.emit("record-event",e,t)}else L('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}var Q=n(28);var Y=n(13),ee=r.createContext(ne()),te=function(){return r.useContext(ee)};Object(Y.createHigherOrderComponent)((function(e){return function(t){var n=te();return r.createElement(e,D({},n,t))}}),"withI18n");function ne(e){var t,n,r=Object(p.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}}var re="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),ie=new Uint8Array(16);function ae(){if(!re)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return re(ie)}for(var oe=[],ce=0;ce<256;++ce)oe[ce]=(ce+256).toString(16).substr(1);var se=function(e,t){var n=t||0,r=oe;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 ue=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 a=0;a<16;++a)t[r+a]=i[a];return t||se(i)},le=function(e){var t=e.suggestion,n=e.railcarId,a=e.isRecommended,o=void 0!==a&&a,c=e.onSelect,s=e.onRender,u=e.selected,l=te().__,f=t.domain_name,m=f.indexOf("."),d=f.slice(0,m),h=f.slice(m),v=Object(r.useState)(),g=v[0],b=v[1],y=Object(r.useState)(),_=y[0],w=y[1],E=ue();Object(r.useEffect)((function(){f!==g&&_!==n&&n&&(s(),b(f),w(n))}),[f,g,_,n,s]);return i.a.createElement("label",{className:x()("domain-picker__suggestion-item",{"is-free":t.is_free,"is-selected":u})},i.a.createElement("input",{"aria-labelledby":E,className:"domain-picker__suggestion-radio-button",type:"radio",name:"domain-picker-suggestion-option",onChange:function(){_&&function(e){Z("calypso_traintracks_interact",{railcar:e.railcarId,action:e.action})}({action:"domain_selected",railcarId:_}),c(t)},checked:u}),i.a.createElement("div",{className:"domain-picker__suggestion-item-name"},i.a.createElement("span",{className:"domain-picker__domain-name"},d),i.a.createElement("span",{className:"domain-picker__domain-tld"},h),o&&i.a.createElement("div",{className:"domain-picker__badge is-recommended"},l("Recommended"))),i.a.createElement("div",{className:x()("domain-picker__price",{"is-paid":!t.is_free})},t.is_free?l("Free"):i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:"domain-picker__price-inclusive"}," ",l("Included in plans")," "),i.a.createElement("span",{className:"domain-picker__price-cost"},Object(p.sprintf)(l("%s/year"),t.cost)))))},fe=function(){return i.a.createElement("div",{className:"domain-picker__suggestion-item placeholder"},i.a.createElement("div",{className:"domain-picker__suggestion-item-name placeholder"}),i.a.createElement("div",{className:"domain-picker__price placeholder"}))};function me(e,t){return e===t}function de(e,t,n){var i=n&&n.equalityFn?n.equalityFn:me,a=Object(r.useState)(e),o=a[0],c=a[1],s=function(e,t,n){void 0===n&&(n={});var i=n.maxWait,a=Object(r.useRef)(null),o=Object(r.useRef)([]),c=n.leading,s=Object(r.useRef)(!1),u=Object(r.useRef)(null),l=Object(r.useRef)(!1),f=Object(r.useRef)(e);f.current=e;var m=Object(r.useCallback)((function(){clearTimeout(u.current),clearTimeout(a.current),a.current=null,o.current=[],u.current=null,s.current=!1}),[]);return Object(r.useEffect)((function(){return function(){l.current=!0}}),[]),[Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(o.current=e,clearTimeout(u.current),!u.current&&c&&!s.current)return f.current.apply(f,e),void(s.current=!0);u.current=setTimeout((function(){m(),l.current||f.current.apply(f,e)}),t),i&&!a.current&&(a.current=setTimeout((function(){var e=o.current;m(),l.current||f.current.apply(null,e)}),i))}),[i,t,m,c]),m,function(){u.current&&(f.current.apply(null,o.current),m())}]}(Object(r.useCallback)((function(e){return c(e)}),[]),t,n),u=s[0],l=s[1],f=Object(r.useRef)(e);return Object(r.useEffect)((function(){i(f.current,e)||(u(e),f.current=e)}),[e,u,i]),[o,l]}var pe=Object(f.createElement)(y.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(f.createElement)(y.Path,{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),he=(n(47),function(e){var t=e.onSelect,n=e.selected,i=te().__,a=Object(f.useState)(!1),o=a[0],c=a[1],s=function(e){c(!1),t(e)},u=Object(m.useSelect)((function(e){return e("automattic/domains/suggestions").getCategories()}));return r.createElement("div",{className:x()("domain-categories",{"is-open":o})},r.createElement(d.Button,{className:"domain-categories__dropdown-button",onClick:function(){return c(!o)}},r.createElement("span",null,n||i("All Categories")),r.createElement(b,{icon:pe,size:16})),r.createElement("ul",{className:"domain-categories__item-group"},r.createElement("li",{className:x()("domain-categories__item",{"is-selected":!n})},r.createElement(d.Button,{onClick:function(){return s()}},i("View all"))),u.map((function(e){var t=e.slug,i=e.title;return r.createElement("li",{key:t,className:x()("domain-categories__item",{"is-selected":t===n})},r.createElement(d.Button,{onClick:function(){return s(t)}},i))}))))}),ve=function(){return i.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"},i.a.createElement("rect",{x:"0",width:"310",height:"50",rx:"10",fill:"#D8D8D8"}),i.a.createElement("rect",{x:"8",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("rect",{x:"40",y:"8",width:"25",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("rect",{x:"72",y:"8",width:"300",height:"25",rx:"5",fill:"#fff"}),i.a.createElement("text",{x:"80",y:"26",fill:"#999"},"https://"),i.a.createElement("text",{x:"133",y:"26",fill:"#515151"},"example.com"))},ge=(n(46),function(e){var t,n,a=e.header,o=e.showDomainCategories,c=e.onDomainSelect,s=e.quantity,u=void 0===s?5:s,l=e.quantityExpanded,f=void 0===l?10:l,p=e.onDomainSearchBlur,h=e.analyticsFlowId,v=e.analyticsUiAlgo,g=e.initialDomainSearch,y=void 0===g?"":g,_=e.onSetDomainSearch,w=e.currentDomain,E=te().__,O=E("Search for a domain"),C=Object(r.useState)(!1),j=C[0],S=C[1],x=Object(r.useState)(y),k=x[0],P=x[1],A=Object(r.useState)(),L=A[0],D=A[1],R=Object(m.useSelect)((function(e){return e("automattic/domains/suggestions").getDomainSuggestionVendor()})),I=function(e,t,n,r){void 0===e&&(e=""),void 0===r&&(r="en");var i=de(e,300)[0];return Object(m.useSelect)((function(e){if(i&&!(i.length<2))return e("automattic/domains/suggestions").getDomainSuggestions(i,{include_wordpressdotcom:!0,include_dotblogsubdomain:!1,quantity:t+1,locale:r,category_slug:n})}),[i,n,t])}(k.trim(),f,L,te().i18nLocale),M=null==I?void 0:I.slice(0,j?f:u);Object(r.useEffect)((function(){S(!1)}),[k]);var T=Object(r.useState)(),z=T[0],B=T[1];Object(r.useEffect)((function(){var e;I&&B((void 0===(e="suggestion")&&(e="recommendation"),Object(Q.v4)().replace(/-/g,"")+"-"+e))}),[I,B]);var q=function(e,t,n,r){var i="/domains/search/"+R+"/"+h+(L?"/"+L:""),a=e.domain_name;!function(e){Z("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+"/"+v,fetchAlgo:i,query:k,railcarId:t,result:r?a+"#recommended":a,uiPosition:n})};return i.a.createElement("div",{className:"domain-picker"},a&&a,i.a.createElement("div",{className:"domain-picker__search"},i.a.createElement("div",{className:"domain-picker__search-icon"},i.a.createElement(b,{icon:F})),i.a.createElement(d.TextControl,{"data-hj-whitelist":!0,hideLabelFromVision:!0,label:O,placeholder:O,onChange:function(e){P(e),_(e)},onBlur:function(e){p&&p(e.currentTarget.value)},value:k})),(null===(t=k.trim())||void 0===t?void 0:t.length)>1?i.a.createElement("div",{className:"domain-picker__body"},o&&i.a.createElement("div",{className:"domain-picker__aside"},i.a.createElement(he,{selected:L,onSelect:D})),i.a.createElement("div",{className:"domain-picker__suggestion-sections"},i.a.createElement("div",{className:"domain-picker__suggestion-item-group"},null!==(n=null==M?void 0:M.map((function(e,t){return i.a.createElement(le,{key:e.domain_name,suggestion:e,railcarId:z?""+z+t:void 0,isRecommended:1===t,onRender:function(){return q(e,""+z+t,t,1===t)},selected:w===e.domain_name,onSelect:c})})))&&void 0!==n?n:Object(N.times)(u,(function(e){return i.a.createElement(fe,{key:e})}))),!j&&(null==I?void 0:I.length)&&(null==I?void 0:I.length)>u&&i.a.createElement("div",{className:"domain-picker__show-more"},i.a.createElement(d.Button,{onClick:function(){return S(!0)}},E("View more results"))))):i.a.createElement("div",{className:"domain-picker__empty-state"},i.a.createElement("p",{className:"domain-picker__empty-state--text"},E("A domain name is the site address people type in their browser to visit your site.")),i.a.createElement("div",null,i.a.createElement(ve,null))))});function be(){return Object(m.useSelect)((function(e){return e("automattic/site").getSite(window._currentSiteId)}))}var ye=function(e){var t,n=e.onSelect,r=be(),i=function(){var e=be();return(null==e?void 0:e.URL)&&new URL(null==e?void 0:e.URL).hostname||""}(),a=Object(m.useSelect)((function(e){return e("automattic/launch").getState()})),o=a.domain,c=a.domainSearch,s=Object(m.useDispatch)("automattic/launch"),u=s.setDomain,l=s.setDomainSearch,d=null!==(t=c.trim()||(null==r?void 0:r.name))&&void 0!==t?t:"";return Object(f.createElement)(ge,{analyticsFlowId:"gutenboarding",initialDomainSearch:d,onSetDomainSearch:l,onDomainSearchBlur:function(e){Z("calypso_newsite_domain_search_blur",{flow:"gutenboarding",query:e,where:"editor_domain_modal"})},currentDomain:(null==o?void 0:o.domain_name)||i,onDomainSelect:function(e){u(e),null==n||n()},analyticsUiAlgo:"editor_domain_modal"})},_e=(n(48),function(e){var t=e.onNextStep;return Object(f.createElement)(k,{className:"nux-launch-domain-step"},Object(f.createElement)("div",{className:"nux-launch-step__header"},Object(f.createElement)("div",null,Object(f.createElement)(C,null,Object(p.__)("Choose a domain","full-site-editing")),Object(f.createElement)(j,null,Object(p.__)("Free for the first year with any paid plan","full-site-editing")))),Object(f.createElement)("div",{className:"nux-launch-step__body"},Object(f.createElement)(ye,{onSelect:t})))}),we=(n(54),function(e){var t=e.className,n=e.children;return r.createElement("div",{className:x()("action-buttons",t)},n)}),Ee=function(e){var t=e.className,n=e.children,i=R(e,["className","children"]),a=te().__;return r.createElement(d.Button,D({className:x()("action_buttons__button action-buttons__back",t),isLink:!0},i),n||a("Go back"))},Oe=Object(f.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(f.createElement)(y.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"})),Ce=i.a.createElement(b,{icon:Oe,size:17}),je=i.a.createElement(b,{icon:w,size:17}),Se=i.a.createElement("svg",{width:"8",viewBox:"0 0 8 4"},i.a.createElement("path",{d:"M0 0 L8 0 L4 4 L0 0",fill:"currentColor"}));var xe,ke=function(e){var t=e.slug,n=e.name,a=e.price,o=e.isPopular,c=void 0!==o&&o,s=e.isFree,u=void 0!==s&&s,l=e.domain,f=e.features,m=e.onSelect,h=e.onPickDomainClick,v=e.onToggleExpandAll,g=e.allPlansExpanded,b=te().__,y=Object(r.useState)(!1),_=y[0],w=y[1],E=Object(Y.useViewportMatch)("mobile",">="),O=function(e,t,n){return{NO_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plan-item__domain-summary is-cta",icon:Ce,domainMessage:i.a.createElement(i.a.Fragment,null,n("Pick a free domain (1 year)")," ",Se)}},FREE_DOMAIN:{FREE_PLAN:null,PAID_PLAN:{className:"plan-item__domain-summary is-cta",icon:Ce,domainMessage:i.a.createElement(i.a.Fragment,null,n("Pick a free domain (1 year)")," ",Se)}},PAID_DOMAIN:{FREE_PLAN:{className:"plan-item__domain-summary is-free",icon:je,domainMessage:Object(p.sprintf)(n("%s is not included"),null==t?void 0:t.domain_name)},PAID_PLAN:{className:"plan-item__domain-summary is-picked",icon:Ce,domainMessage:Object(p.sprintf)(n("%s is included"),null==t?void 0:t.domain_name)}}}[t&&(t.is_free?"FREE_DOMAIN":"PAID_DOMAIN")||"NO_DOMAIN"][e?"FREE_PLAN":"PAID_PLAN"]}(u,l,b);Object(r.useEffect)((function(){w(g)}),[g]);var C=g||E||c||_;return i.a.createElement("div",{className:x()("plan-item",{"is-popular":c,"is-open":C})},c&&i.a.createElement("span",{className:"plan-item__badge"},b("Popular")),i.a.createElement("div",{className:x()("plan-item__viewport",{"is-popular":c})},i.a.createElement("div",{className:"plan-item__details"},i.a.createElement("div",{tabIndex:0,role:"button",onClick:function(){return w((function(e){return!e}))},onKeyDown:function(e){return 32===e.keyCode&&w((function(e){return!e}))},className:"plan-item__summary"},i.a.createElement("div",{className:"plan-item__heading"},i.a.createElement("div",{className:"plan-item__name"},n)),i.a.createElement("div",{className:"plan-item__price"},i.a.createElement("div",{className:x()("plan-item__price-amount",{"is-loading":!a})},a||" ")),!C&&i.a.createElement("div",{className:"plan-item__dropdown-chevron"},Se)),i.a.createElement("div",{hidden:!C},i.a.createElement("div",{className:"plan-item__price-note"},b(u?"free forever":"per month, billed yearly")),i.a.createElement("div",{className:"plan-item__actions"},i.a.createElement(d.Button,{className:"plan-item__select-button",onClick:function(){m(t)},isPrimary:!0,isLarge:!0},i.a.createElement("span",null,b("Choose")))),i.a.createElement("div",{className:"plan-item__domain"},O&&i.a.createElement(d.Button,{className:O.className,onClick:h,isLink:!0},O.icon,O.domainMessage)),i.a.createElement("div",{className:"plan-item__features"},i.a.createElement("ul",{className:"plan-item__feature-item-group"},f.map((function(e,t){return i.a.createElement("li",{key:t,className:"plan-item__feature-item"},Ce," ",e)}))))))),c&&!E&&i.a.createElement(d.Button,{onClick:v,className:"plan-item__mobile-expand-all-plans",isLink:!0},b(g?"Collapse all plans":"Expand all plans")))},Ne="automattic/onboard/plans",Fe=(n(51),function(e){var t=e.selectedPlanSlug,n=e.onPlanSelect,a=e.onPickDomainClick,o=e.currentDomain,c=Object(m.useSelect)((function(e){return e(Ne).getSupportedPlans()})),s=Object(m.useSelect)((function(e){return e(Ne).getPrices()})),u=Object(r.useState)(!1),l=u[0],f=u[1];return i.a.createElement("div",{className:"plans-table"},c.map((function(e){var r;return e&&i.a.createElement(ke,{allPlansExpanded:l,key:e.storeSlug,slug:e.storeSlug,domain:o,features:null!==(r=e.features)&&void 0!==r?r:[],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:a,onToggleExpandAll:function(){return f((function(e){return!e}))}})})))}),Pe=(n(52),i.a.createElement(b,{icon:Oe,size:25})),Ae=function(e){var t=e.onSelect,n=Object(m.useSelect)((function(e){return e(Ne).getPlansDetails()})),r=Object(m.useSelect)((function(e){return e(Ne).getPrices()})),a=Object(m.useSelect)((function(e){return e(Ne).getSupportedPlans()})),o=te().__;return i.a.createElement("div",{className:"plans-details"},i.a.createElement("table",{className:"plans-details__table"},i.a.createElement("thead",null,i.a.createElement("tr",{className:"plans-details__header-row"},i.a.createElement("th",null,o("Feature")),a.map((function(e){return i.a.createElement("th",{key:e.storeSlug},e.title)})))),n.map((function(e){return i.a.createElement("tbody",{key:e.id},e.name&&i.a.createElement("tr",{className:"plans-details__header-row"},i.a.createElement("th",{colSpan:6},e.name)),e.features.map((function(e,t){return i.a.createElement("tr",{className:"plans-details__feature-row",key:t},i.a.createElement("th",null,e.name),e.data.map((function(t,n){return i.a.createElement("td",{key:n},"checkbox"===e.type&&(t?i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:"hidden"},o("Available")),Pe):i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:"hidden"},o("Unavailable")," "))),"text"===e.type&&t)})))})))})),i.a.createElement("tbody",null,i.a.createElement("tr",{className:"plans-details__header-row"},i.a.createElement("th",{colSpan:6},o("Sign up"))),i.a.createElement("tr",{className:"plans-details__feature-row",key:"price"},i.a.createElement("th",null,o("Monthly subscription (billed yearly)")),a.map((function(e){return i.a.createElement("td",{key:e.storeSlug},r[e.storeSlug])}))),i.a.createElement("tr",{className:"plans-details__feature-row",key:"cta"},i.a.createElement("th",null),a.map((function(e){return i.a.createElement("td",{key:e.storeSlug},i.a.createElement(d.Button,{onClick:function(){t(e.storeSlug)},isPrimary:!0,isLarge:!0},i.a.createElement("span",null,o("Choose"))))}))))))},Le=(n(50),function(e){var t,n=e.header,i=e.currentPlan,a=e.currentDomain,o=e.onPlanSelect,c=e.onPickDomainClick,s=te().__;return r.createElement("div",{className:"plans-grid"},n&&r.createElement("div",{className:"plans-grid__header"},n),r.createElement("div",{className:"plans-grid__table"},r.createElement("div",{className:"plans-grid__table-container"},r.createElement(Fe,{selectedPlanSlug:null!==(t=null==i?void 0:i.storeSlug)&&void 0!==t?t:"",onPlanSelect:o,currentDomain:a,onPickDomainClick:c}))),r.createElement("div",{className:"plans-grid__details"},r.createElement("div",{className:"plans-grid__details-heading"},r.createElement(C,null,s("Detailed comparison"))),r.createElement("div",{className:"plans-grid__details-container"},r.createElement(Ae,{onSelect:o}))))}),De=function(e){var t=e.onSelect,n=Object(m.useSelect)((function(e){return e("automattic/launch").getState()})).domain,r=Object(m.useDispatch)("automattic/launch").updatePlan;return Object(f.createElement)(Le,{currentDomain:n,onPlanSelect:function(e){r(e),null==t||t()}})},Re=(n(53),function(e){var t=e.onPrevStep,n=e.onNextStep;return Object(f.createElement)(k,{className:"nux-launch-plan-step"},Object(f.createElement)("div",{className:"nux-launch-step__header"},Object(f.createElement)("div",null,Object(f.createElement)(C,null,Object(p.__)("Choose a plan","full-site-editing")),Object(f.createElement)(j,null,Object(p.__)("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(f.createElement)(we,null,Object(f.createElement)(Ee,{onClick:function(){null==t||t()}}))),Object(f.createElement)("div",{className:"nux-launch-step__body"},Object(f.createElement)(De,{onSelect:n})))}),Ie=(n(55),"domain"),Me="plan",Te=(xe={},O()(xe,Ie,_e),O()(xe,Me,Re),xe),ze=[Ie,Me],Be=function(e){var t=e.step,n=void 0===t?Ie:t,i=e.onSubmit,a=ze.indexOf(n),o=r.useState(a),c=l()(o,2),s=c[0],u=c[1],m=ze[s],d=Te[m];return Object(f.createElement)("div",{className:"nux-launch"},Object(f.createElement)(d,{onPrevStep:function(){var e=s-1;e<0&&(e=0),u(e)},onNextStep:function(){var e=s+1;e>ze.length-1&&(null==i||i()),u(e)}}))},qe=function(e){var t=e.onClose,n=e.onSubmit,r=e.step,i=e.isLaunching;return Object(f.createElement)(d.Modal,{className:"nux-launch-modal",overlayClassName:"nux-launch-modal-overlay",bodyOpenClassName:"has-nux-launch-modal",onRequestClose:function(){return null==t?void 0:t()},title:""},Object(f.createElement)("div",{className:"nux-launch-modal-header"},Object(f.createElement)("div",{className:"nux-launch-modal-header__wp-logo"},Object(f.createElement)(b,{icon:_,size:36})),Object(f.createElement)(d.Button,{isLink:!0,className:"nux-launch-modal-header__close-button",onClick:t,"aria-label":Object(p.__)("Close dialog","full-site-editing"),disabled:!t},Object(f.createElement)(b,{icon:w,size:24}))),i?"launch animation":Object(f.createElement)(Be,{step:r,onSubmit:n}))};function Ue(){var e=Object(m.useSelect)((function(e){return e("automattic/site").getSite(window._currentSiteId)})),t=Object(m.useSelect)((function(e){return e("automattic/site").isLaunched(window._currentSiteId)}));return{isSiteUnlaunched:"unlaunched"===(null==e?void 0:e.launch_status)&&!t,isFreePlan:null==e?void 0:e.plan.is_free,launchStatus:t}}var Ve=n(17),Ge=n.n(Ve),He=n(29),$e=n.n(He),We=n(30),Je=n.n(We),Ke=(n(56),function(){var e=Object(m.useDispatch)("automattic/launch").launchSite,t=Ue(),n=t.isSiteUnlaunched,i=t.isFreePlan,a=r.useState(!1),o=l()(a,2),c=o[0],s=o[1],u=r.useState(!1),h=l()(u,2),v=h[0],g=h[1],b=function(){g(!0),e()};return function(){var e=Ue().launchStatus,t=Object(m.useSelect)((function(e){return e("automattic/launch").getState()})),n=t.plan,i=t.domain,a=Object(m.useDispatch)("automattic/site"),o=a.getCart,c=a.setCart;r.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"}},r={meta:null==i?void 0:i.domain_name,product_id:null==i?void 0:i.product_id,extra:{privacy_available:null==i?void 0:i.supports_privacy,privacy:null==i?void 0:i.supports_privacy,source:"gutenboarding"}};return void function(){var e=Je()(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o(window._currentSiteId);case 2:return n=e.sent,e.next=5,c(window._currentSiteId,$e()({},n,{products:[].concat(Ge()(n.products),[t,r])}));case 5:window.top.location.href="https://wordpress.com/checkout/".concat(window._currentSiteId,"?preLaunch=1");case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}window.location.href="https://wordpress.com/home/".concat(window._currentSiteId)}}),[e])}(),Object(f.createElement)(f.Fragment,null,n&&Object(f.createElement)(d.Button,{"aria-expanded":c,"aria-pressed":c,"aria-haspopup":"menu",onClick:function(){i?s(!c):b()}},Object(p.__)("Launch site","full-site-editing")),c&&Object(f.createElement)(qe,{onClose:function(){s(!1)},onSubmit:b,isLaunching:v}),v&&Object(f.createElement)(qe,{isLaunching:!0}))});c()((function(){Ze(),Object(s.addAction)("setGutenboardingStatus","a8c-gutenboarding",Ze)}));var Xe=!1;function Ze(){var e,t;if(!Xe&&(null===(e=window)||void 0===e||null===(t=e.calypsoifyGutenberg)||void 0===t?void 0:t.isGutenboarding)){Xe=!0;var n=setInterval((function(){var e=document.querySelector(".edit-post-header__settings");if(e){clearInterval(n);var t=document.createElement("div");e.prepend(t),a.render(r.createElement(Ke),t)}}))}}}]));
editor-site-launch/index.ts CHANGED
@@ -3,20 +3,46 @@
3
  */
4
  import * as React from 'react';
5
  import * as ReactDOM from 'react-dom';
6
-
 
7
  import 'a8c-fse-common-data-stores';
8
-
 
 
9
  import LaunchButton from './src/launch-button';
10
 
11
- const awaitSettingsBar = setInterval( () => {
12
- const settingsBar = document.querySelector( '.edit-post-header__settings' );
13
- if ( ! settingsBar ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  return;
15
  }
16
- clearInterval( awaitSettingsBar );
17
 
18
- const launchButtonContainer = document.createElement( 'div' );
19
- settingsBar.prepend( launchButtonContainer );
20
 
21
- ReactDOM.render( React.createElement( LaunchButton ), launchButtonContainer );
22
- } );
 
 
 
 
 
 
 
 
 
 
 
3
  */
4
  import * as React from 'react';
5
  import * as ReactDOM from 'react-dom';
6
+ import domReady from '@wordpress/dom-ready';
7
+ import { addAction } from '@wordpress/hooks';
8
  import 'a8c-fse-common-data-stores';
9
+ /**
10
+ * Internal dependencies
11
+ */
12
  import LaunchButton from './src/launch-button';
13
 
14
+ interface CalypsoifyWindow extends Window {
15
+ calypsoifyGutenberg?: {
16
+ isGutenboarding?: boolean;
17
+ [ key: string ]: unknown;
18
+ };
19
+ }
20
+ declare const window: CalypsoifyWindow;
21
+
22
+ domReady( () => {
23
+ updateEditor();
24
+ // Hook fallback incase setGutenboardingStatus runs after initial dom render.
25
+ addAction( 'setGutenboardingStatus', 'a8c-gutenboarding', updateEditor );
26
+ } );
27
+
28
+ let handled = false;
29
+ function updateEditor() {
30
+ if ( handled || ! window?.calypsoifyGutenberg?.isGutenboarding ) {
31
  return;
32
  }
 
33
 
34
+ handled = true;
 
35
 
36
+ const awaitSettingsBar = setInterval( () => {
37
+ const settingsBar = document.querySelector( '.edit-post-header__settings' );
38
+ if ( ! settingsBar ) {
39
+ return;
40
+ }
41
+ clearInterval( awaitSettingsBar );
42
+
43
+ const launchButtonContainer = document.createElement( 'div' );
44
+ settingsBar.prepend( launchButtonContainer );
45
+
46
+ ReactDOM.render( React.createElement( LaunchButton ), launchButtonContainer );
47
+ } );
48
+ }
full-site-editing-plugin.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
- * Version: 1.13
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', '1.13' );
39
 
40
  // Always include these helper files for dotcom FSE.
41
  require_once __DIR__ . '/dotcom-fse/helpers.php';
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
+ * Version: 1.14
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', '1.14' );
39
 
40
  // Always include these helper files for dotcom FSE.
41
  require_once __DIR__ . '/dotcom-fse/helpers.php';
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.4
6
- Stable tag: 1.13
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -40,12 +40,17 @@ This plugin is experimental, so we don't provide any support for it outside of w
40
 
41
  == Changelog ==
42
 
 
 
 
 
43
  = 1.13 =
44
  * Change the category of FSE blocks from legacy to the updated ones (https://github.com/Automattic/wp-calypso/issues/43198).
45
  * Add a helper function that can be used to assign categories with older fallbacks.
46
  * Add support for TypeScript tests.
47
  * Update visual style of navigation sidebar.
48
  * Fix navigation sidebar dismiss button in IE.
 
49
 
50
  = 1.12 =
51
  * Experimental navigation sidebar in block editor, can be enabled in config or with a hook.
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.4
6
+ Stable tag: 1.14
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
40
 
41
  == Changelog ==
42
 
43
+ = 1.14 =
44
+ * Add missing dependencies to package declaration.
45
+ * Remove "Latest posts" page from navigation sidebar.
46
+
47
  = 1.13 =
48
  * Change the category of FSE blocks from legacy to the updated ones (https://github.com/Automattic/wp-calypso/issues/43198).
49
  * Add a helper function that can be used to assign categories with older fallbacks.
50
  * Add support for TypeScript tests.
51
  * Update visual style of navigation sidebar.
52
  * Fix navigation sidebar dismiss button in IE.
53
+ * Fix missing block inserter on dotcom FSE sites.
54
 
55
  = 1.12 =
56
  * Experimental navigation sidebar in block editor, can be enabled in config or with a hook.
wpcom-block-editor-nav-sidebar/class-wpcom-block-editor-nav-sidebar.php CHANGED
@@ -59,11 +59,20 @@ class WPCOM_Block_Editor_Nav_Sidebar {
59
  plugins_url( 'dist/', __FILE__ )
60
  );
61
 
 
 
 
 
 
 
 
 
62
  wp_localize_script(
63
  'wpcom-block-editor-nav-sidebar-script',
64
  'wpcomBlockEditorNavSidebar',
65
  array(
66
- 'homeUrl' => home_url(),
 
67
  )
68
  );
69
 
59
  plugins_url( 'dist/', __FILE__ )
60
  );
61
 
62
+ $post_ids_to_exclude = array();
63
+
64
+ // Only exclude page_for_posts when a static page is being used as the front page, because
65
+ // page_for_posts can be a valid id even when showing a traditional blog page on front.
66
+ if ( 'page' === get_option( 'show_on_front' ) ) {
67
+ $post_ids_to_exclude[] = get_option( 'page_for_posts' );
68
+ }
69
+
70
  wp_localize_script(
71
  'wpcom-block-editor-nav-sidebar-script',
72
  'wpcomBlockEditorNavSidebar',
73
  array(
74
+ 'homeUrl' => home_url(),
75
+ 'postIdsToExclude' => $post_ids_to_exclude,
76
  )
77
  );
78
 
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'bbf5df4c618ce169b5842aaab26af233');
1
+ <?php return array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'b7824b126f585e7290503f9825298b79');
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var c=o.apply(null,n);c&&e.push(c)}else if("object"===i)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t,r){var n=r(32);e.exports=function(e,t){if(null==e)return{};var r,o,i=n(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)r=c[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,r){var n=r(26),o=r(27),i=r(13),c=r(28);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||c()}},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(14);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(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},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){!function(){e.exports=this.wp.plugins}()},function(e,t,r){var n=r(11);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,r){var n=r(29),o=r(30),i=r(13),c=r(31);e.exports=function(e){return n(e)||o(e)||i(e)||c()}},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t){!function(){e.exports=this.wp.compose}()},,,,,,,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 r=[],n=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(n=(c=a.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(l){o=!0,i=l}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}}},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,r){var n=r(14);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){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){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"enableComplementaryArea",(function(){return v})),r.d(n,"disableComplementaryArea",(function(){return O})),r.d(n,"pinItem",(function(){return y})),r.d(n,"unpinItem",(function(){return j}));var o={};r.r(o),r.d(o,"getActiveComplementaryArea",(function(){return E})),r.d(o,"isItemPinned",(function(){return h}));var i=r(10),c=r.n(i),a=r(0),l=r(1);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=r(4);function d(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}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=Object(l.combineReducers)({singleEnableItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,o=t.scope,i=t.item;return"SET_SINGLE_ENABLE_ITEM"===r&&n&&o?b({},e,s({},n,b({},e[n],s({},o,i||null)))):e},multipleEnableItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,o=t.scope,i=t.item,c=t.isEnable;if("SET_MULTIPLE_ENABLE_ITEM"!==r||!n||!o||!i||Object(u.get)(e,[n,o,i])===c)return e;var a=e[n]||{},l=a[o]||{};return b({},e,s({},n,b({},a,s({},o,b({},l,s({},i,c||!1))))))}}),p=Object(l.combineReducers)({enableItems:f});function m(e,t,r){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:r}}function v(e,t){return m("complementaryArea",e,t)}function O(e){return m("complementaryArea",e,void 0)}function g(e,t,r,n){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:r,isEnable:n}}function y(e,t){return g("pinnedItems",e,t,!0)}function j(e,t){return g("pinnedItems",e,t,!1)}function E(e,t){return function(e,t,r){return Object(u.get)(e.enableItems.singleEnableItems,[t,r])}(e,"complementaryArea",t)}function h(e,t,r){return!1!==function(e,t,r,n){return Object(u.get)(e.enableItems.multipleEnableItems,[t,r,n])}(e,"pinnedItems",t,r)}Object(l.registerStore)("core/interface",{reducer:p,actions:n,selectors:o,persist:["enableItems"]});var w=r(2),S="__experimentalMainDashboardButton",_=Object(w.createSlotFill)(S),x=_.Fill,P=_.Slot,k=x;k.Slot=function(e){var t=e.children,r=Object(w.__experimentalUseSlot)(S);return Boolean(r.fills&&r.fills.length)?Object(a.createElement)(P,{bubblesVirtually:!0}):t};var I,A=k,T=r(15),N=r(11),C=r.n(N),B=r(16),L=r.n(B),D=r(17),M=r.n(D),R=r(8),G=r.n(R),F=r(6),U=Object(a.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(a.createElement)(F.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"})),z=Object(a.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(F.Path,{d:"M9.737 18.011L3.98 12.255l5.734-6.28 1.107 1.012-4.103 4.494h13.3v1.5H6.828l3.97 3.97-1.06 1.06z"})),W=r(7),V=r(3),H=r(9),Q=r(5),K=r.n(Q),$=r(18),q=r(19),J="automattic/block-editor-nav-sidebar",X=null===(I=window.wpcomBlockEditorNavSidebar)||void 0===I?void 0:I.homeUrl,Y=Object(a.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(F.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),Z=(r(33),function(e){var t=e.children,r=G()(e,["children"]);return Object(a.createElement)(w.Button,r,t)});function ee(e){var t=e.postType,r=Object(u.get)(t,["labels","add_new_item"],Object(W.__)("Create","full-site-editing")),n=Object(V.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostLabel",r,t.slug),o=Object(H.addQueryArgs)("post-new.php",{post_type:t.slug}),i=Object(V.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostUrl",o,t.slug);return Object(a.createElement)(Z,{target:Object(V.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0),isPrimary:!0,className:"wpcom-block-editor-nav-sidebar-create-page",href:i,icon:Y},n)}r(34);var te=Object(a.forwardRef)((function(e,t){var r,n,o,i=e.item,c=e.postType,l=e.selected,s=e.statusLabel,u=K()("wpcom-block-editor-nav-item",{"is-selected":l}),d=K()("wpcom-block-editor-nav-item__title",{"is-untitled":!(null===(r=i.title)||void 0===r?void 0:r.raw)}),b=Object(H.addQueryArgs)("post.php",{post:i.id,action:"edit"}),f=Object(V.applyFilters)("a8c.WpcomBlockEditorNavSidebar.editPostUrl",b,i.id,c.slug);return Object(a.createElement)("li",{ref:t},Object(a.createElement)(w.Button,{className:u,href:f,target:Object(V.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0)},Object(a.createElement)("div",{className:d,title:null===(n=i.title)||void 0===n?void 0:n.raw},(null===(o=i.title)||void 0===o?void 0:o.raw)||Object(W._x)("Untitled","post title for posts with no title","full-site-editing")),s&&Object(a.createElement)("div",{className:"wpcom-block-editor-nav-item__label"},s)))})),re=(r(35),function(e){var t=e.children,r=G()(e,["children"]);return Object(a.createElement)(w.Button,r,t)});var ne=Object(q.compose)([w.withConstrainedTabbing])((function(){var e=Object(l.useDispatch)(J),t=e.toggleSidebar,r=e.setSidebarClosing,n=Object(l.useSelect)((function(e){var t,r=e("core"),n=r.getPostType,o=r.getSite;return[e(J).isSidebarOpened(),e(J).isSidebarClosing(),n(e("core/editor").getCurrentPostType()),e("core/editor").getCurrentPostId(),null===(t=o())||void 0===t?void 0:t.title]})),o=c()(n,5),i=o[0],s=o[1],d=o[2],b=o[3],f=o[4],p=Object(l.useSelect)((function(e){var t=e("core/editor"),r=t.isEditedPostNew,n=t.getCurrentPostId,o=t.getCurrentPostType,i=t.getEditedPostAttribute,c=e("core").getEntityRecords("root","status");if(!c)return[];var a=c.filter((function(e){return e.show_in_list})).map((function(e){return e.slug})).join(","),l=n(),s=o(),u=e("core").getEntityRecords("postType",s,{_fields:"id,status,title",exclude:[l],orderby:"modified",per_page:10,status:a})||[];return[{id:l,slug:i("slug"),status:r()?"draft":i("status"),title:{raw:i("title"),rendered:""}}].concat(M()(u))})),m=Object(l.useSelect)((function(e){return(e("core").getEntityRecords("root","status")||[]).reduce((function(e,t){var r=t.name,n=t.slug;return"publish"===n?e:L()({},e,C()({},n,r))}),{})})),v=Object(a.useRef)(i);Object(a.useLayoutEffect)((function(){!i&&v.current&&r(!0),v.current=i}),[i,v,r]);var O=Object(a.useState)(!1),g=c()(O,2),y=g[0],j=g[1],E=Object(a.useRef)(),h=Object(a.useRef)([]);if(Object(a.useEffect)((function(){if(E.current){E.current.disconnect();var e=h.current.filter(Boolean),t=e[0],r=e[e.length-1];t&&E.current.observe(t),r&&E.current.observe(r)}}),[p,h,E]),!d)return null;if(!i&&!s)return null;var S=Object(H.addQueryArgs)("edit.php",{post_type:d.slug}),_=Object(V.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeUrl",S),x=Object(u.get)(d,["labels","all_items"],Object(W.__)("Back","full-site-editing")),P=Object(V.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeLabel",x),k=Object(u.get)(d,["labels","name"]),I=Object(V.applyFilters)("a8c.WpcomBlockEditorNavSidebar.listHeading",k,d.slug),A=function(){i&&!s&&t()};return Object(a.createElement)(w.IsolatedEventContainer,{className:K()("wpcom-block-editor-nav-sidebar-nav-sidebar__click-guard",{"is-fading-out":s}),onAnimationEnd:function(e){"wpcom-block-editor-nav-sidebar-nav-sidebar__fade"===e.animationName&&s&&r(!1)},onClick:function(e){e.currentTarget===e.target&&A()},onKeyDown:function(e){e.keyCode===$.ESCAPE&&(e.stopPropagation(),A())}},Object(a.createElement)("div",{className:K()("wpcom-block-editor-nav-sidebar-nav-sidebar__container",{"is-sliding-left":s}),ref:function(e){e&&e.focus(),E.current&&E.current.disconnect(),window.IntersectionObserver&&(E.current=new window.IntersectionObserver((function(e){var t=e.some((function(e){return!e.isIntersecting}));j(t)}),{root:e,threshold:[1]}))},role:"dialog",tabIndex:-1},Object(a.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__header"},Object(a.createElement)(re,{className:K()("edit-post-fullscreen-mode-close","wpcom-block-editor-nav-sidebar-nav-sidebar__dismiss-sidebar-button"),icon:U,iconSize:36,onClick:A})),Object(a.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__site-title"},Object(a.createElement)("h2",null,f),X&&Object(a.createElement)(w.ExternalLink,{href:X},Object(W.__)("Visit site","full-site-editing"))),Object(a.createElement)(re,{href:_,className:"wpcom-block-editor-nav-sidebar-nav-sidebar__home-button",icon:z,onClick:function(e){Object(V.hasAction)("a8c.wpcom-block-editor.closeEditor")&&(e.preventDefault(),Object(V.doAction)("a8c.wpcom-block-editor.closeEditor"))}},P),Object(a.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-heading"},I),Object(a.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},p.map((function(e,t){return Object(a.createElement)(te,{key:e.id,item:e,postType:d,selected:e.id===b,statusLabel:m[e.status],ref:function(e){return function(e,t){h.current[t]=e}(e,t)}})}))),Object(a.createElement)("div",{className:K()("wpcom-block-editor-nav-sidebar-nav-sidebar__bottom-buttons",{"is-scrollbar-present":y})},Object(a.createElement)(ee,{postType:d}))))}));r(36);var oe=function(e){var t=e.children,r=G()(e,["children"]);return Object(a.createElement)(w.Button,r,t)};function ie(){var e=Object(l.useDispatch)(J).toggleSidebar,t=Object(l.useSelect)((function(e){return e(J).isSidebarOpened()})),r=Object(l.useSelect)((function(e){return e(J).isSidebarClosing()}));return Object(a.createElement)(oe,{className:K()("edit-post-fullscreen-mode-close","wpcom-block-editor-nav-sidebar-toggle-sidebar-button__button",{"is-hidden":t||r}),icon:U,iconSize:36,onClick:e})}var ce,ae;ce="a8c-full-site-editing-nav-sidebar",ae={render:function(){var e=Object(l.useDispatch)("core").addEntities;Object(a.useEffect)((function(){e([{baseURL:"/wp/v2/statuses",key:"slug",kind:"root",name:"status",plural:"statuses"}])}),[]);var t=Object(a.useState)((function(){return document.createElement("div")})),r=c()(t,1)[0];return Object(a.useEffect)((function(){return document.body.appendChild(r),function(){document.body.removeChild(r)}})),Object(a.createElement)(A,null,Object(a.createElement)(ie,null),Object(a.createPortal)(Object(a.createElement)(ne,null),r))}},Object(T.registerPlugin)(ce,ae);var le={toggleSidebar:function(){return{type:"TOGGLE_SIDEBAR"}},setSidebarClosing:function(e){return{type:"SET_SIDEBAR_CLOSING",isClosing:e}}},se=Object(l.combineReducers)({opened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SIDEBAR":return!e;default:return e}},closing:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SIDEBAR_CLOSING":return t.isClosing;default:return e}}});Object(l.registerStore)(J,{actions:le,reducer:se,selectors:{isSidebarOpened:function(e){return e.opened},isSidebarClosing:function(e){return e.closing}}})}]));
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var c=o.apply(null,n);c&&e.push(c)}else if("object"===i)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t,r){var n=r(32);e.exports=function(e,t){if(null==e)return{};var r,o,i=n(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)r=c[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,r){var n=r(26),o=r(27),i=r(14),c=r(28);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||c()}},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(29),o=r(30),i=r(14),c=r(31);e.exports=function(e){return n(e)||o(e)||i(e)||c()}},,function(e,t,r){var n=r(15);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(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},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){!function(){e.exports=this.wp.plugins}()},function(e,t,r){var n=r(11);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.keycodes}()},function(e,t){!function(){e.exports=this.wp.compose}()},,,,,,,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 r=[],n=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(n=(c=a.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(l){o=!0,i=l}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}}},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,r){var n=r(15);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){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){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"enableComplementaryArea",(function(){return v})),r.d(n,"disableComplementaryArea",(function(){return O})),r.d(n,"pinItem",(function(){return y})),r.d(n,"unpinItem",(function(){return j}));var o={};r.r(o),r.d(o,"getActiveComplementaryArea",(function(){return E})),r.d(o,"isItemPinned",(function(){return h}));var i=r(10),c=r.n(i),a=r(0),l=r(1);function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(4);function d(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}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=Object(l.combineReducers)({singleEnableItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,o=t.scope,i=t.item;return"SET_SINGLE_ENABLE_ITEM"===r&&n&&o?b({},e,u({},n,b({},e[n],u({},o,i||null)))):e},multipleEnableItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,o=t.scope,i=t.item,c=t.isEnable;if("SET_MULTIPLE_ENABLE_ITEM"!==r||!n||!o||!i||Object(s.get)(e,[n,o,i])===c)return e;var a=e[n]||{},l=a[o]||{};return b({},e,u({},n,b({},a,u({},o,b({},l,u({},i,c||!1))))))}}),p=Object(l.combineReducers)({enableItems:f});function m(e,t,r){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:r}}function v(e,t){return m("complementaryArea",e,t)}function O(e){return m("complementaryArea",e,void 0)}function g(e,t,r,n){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:r,isEnable:n}}function y(e,t){return g("pinnedItems",e,t,!0)}function j(e,t){return g("pinnedItems",e,t,!1)}function E(e,t){return function(e,t,r){return Object(s.get)(e.enableItems.singleEnableItems,[t,r])}(e,"complementaryArea",t)}function h(e,t,r){return!1!==function(e,t,r,n){return Object(s.get)(e.enableItems.multipleEnableItems,[t,r,n])}(e,"pinnedItems",t,r)}Object(l.registerStore)("core/interface",{reducer:p,actions:n,selectors:o,persist:["enableItems"]});var w=r(2),S="__experimentalMainDashboardButton",_=Object(w.createSlotFill)(S),x=_.Fill,P=_.Slot,k=x;k.Slot=function(e){var t=e.children,r=Object(w.__experimentalUseSlot)(S);return Boolean(r.fills&&r.fills.length)?Object(a.createElement)(P,{bubblesVirtually:!0}):t};var I,N,T=k,A=r(16),C=r(11),B=r.n(C),L=r(17),D=r.n(L),M=r(12),R=r.n(M),G=r(8),F=r.n(G),U=r(6),z=Object(a.createElement)(U.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(a.createElement)(U.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"})),W=Object(a.createElement)(U.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(U.Path,{d:"M9.737 18.011L3.98 12.255l5.734-6.28 1.107 1.012-4.103 4.494h13.3v1.5H6.828l3.97 3.97-1.06 1.06z"})),V=r(7),H=r(3),Q=r(9),K=r(5),$=r.n(K),q=r(18),J=r(19),X="automattic/block-editor-nav-sidebar",Y=null===(I=window.wpcomBlockEditorNavSidebar)||void 0===I?void 0:I.homeUrl,Z=((null===(N=window.wpcomBlockEditorNavSidebar)||void 0===N?void 0:N.postIdsToExclude)||[]).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)})),ee=Object(a.createElement)(U.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(U.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),te=(r(33),function(e){var t=e.children,r=F()(e,["children"]);return Object(a.createElement)(w.Button,r,t)});function re(e){var t=e.postType,r=Object(s.get)(t,["labels","add_new_item"],Object(V.__)("Create","full-site-editing")),n=Object(H.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostLabel",r,t.slug),o=Object(Q.addQueryArgs)("post-new.php",{post_type:t.slug}),i=Object(H.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostUrl",o,t.slug);return Object(a.createElement)(te,{target:Object(H.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0),isPrimary:!0,className:"wpcom-block-editor-nav-sidebar-create-page",href:i,icon:ee},n)}r(34);var ne=Object(a.forwardRef)((function(e,t){var r,n,o,i=e.item,c=e.postType,l=e.selected,u=e.statusLabel,s=$()("wpcom-block-editor-nav-item",{"is-selected":l}),d=$()("wpcom-block-editor-nav-item__title",{"is-untitled":!(null===(r=i.title)||void 0===r?void 0:r.raw)}),b=Object(Q.addQueryArgs)("post.php",{post:i.id,action:"edit"}),f=Object(H.applyFilters)("a8c.WpcomBlockEditorNavSidebar.editPostUrl",b,i.id,c.slug);return Object(a.createElement)("li",{ref:t},Object(a.createElement)(w.Button,{className:s,href:f,target:Object(H.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0)},Object(a.createElement)("div",{className:d,title:null===(n=i.title)||void 0===n?void 0:n.raw},(null===(o=i.title)||void 0===o?void 0:o.raw)||Object(V._x)("Untitled","post title for posts with no title","full-site-editing")),u&&Object(a.createElement)("div",{className:"wpcom-block-editor-nav-item__label"},u)))})),oe=(r(35),function(e){var t=e.children,r=F()(e,["children"]);return Object(a.createElement)(w.Button,r,t)});var ie=Object(J.compose)([w.withConstrainedTabbing])((function(){var e=Object(l.useDispatch)(X),t=e.toggleSidebar,r=e.setSidebarClosing,n=Object(l.useSelect)((function(e){var t,r=e("core"),n=r.getPostType,o=r.getSite;return[e(X).isSidebarOpened(),e(X).isSidebarClosing(),n(e("core/editor").getCurrentPostType()),e("core/editor").getCurrentPostId(),null===(t=o())||void 0===t?void 0:t.title]})),o=c()(n,5),i=o[0],u=o[1],d=o[2],b=o[3],f=o[4],p=Object(l.useSelect)((function(e){var t=e("core/editor"),r=t.isEditedPostNew,n=t.getCurrentPostId,o=t.getCurrentPostType,i=t.getEditedPostAttribute,c=e("core").getEntityRecords("root","status");if(!c)return[];var a=c.filter((function(e){return e.show_in_list})).map((function(e){return e.slug})).join(","),l=n(),u=o(),s=e("core").getEntityRecords("postType",u,{_fields:"id,status,title",exclude:[l].concat(R()(Z)),orderby:"modified",per_page:10,status:a})||[];return[{id:l,slug:i("slug"),status:r()?"draft":i("status"),title:{raw:i("title"),rendered:""}}].concat(R()(s))})),m=Object(l.useSelect)((function(e){return(e("core").getEntityRecords("root","status")||[]).reduce((function(e,t){var r=t.name,n=t.slug;return"publish"===n?e:D()({},e,B()({},n,r))}),{})})),v=Object(a.useRef)(i);Object(a.useLayoutEffect)((function(){!i&&v.current&&r(!0),v.current=i}),[i,v,r]);var O=Object(a.useState)(!1),g=c()(O,2),y=g[0],j=g[1],E=Object(a.useRef)(),h=Object(a.useRef)([]);if(Object(a.useEffect)((function(){if(E.current){E.current.disconnect();var e=h.current.filter(Boolean),t=e[0],r=e[e.length-1];t&&E.current.observe(t),r&&E.current.observe(r)}}),[p,h,E]),!d)return null;if(!i&&!u)return null;var S=Object(Q.addQueryArgs)("edit.php",{post_type:d.slug}),_=Object(H.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeUrl",S),x=Object(s.get)(d,["labels","all_items"],Object(V.__)("Back","full-site-editing")),P=Object(H.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeLabel",x),k=Object(s.get)(d,["labels","name"]),I=Object(H.applyFilters)("a8c.WpcomBlockEditorNavSidebar.listHeading",k,d.slug),N=function(){i&&!u&&t()};return Object(a.createElement)(w.IsolatedEventContainer,{className:$()("wpcom-block-editor-nav-sidebar-nav-sidebar__click-guard",{"is-fading-out":u}),onAnimationEnd:function(e){"wpcom-block-editor-nav-sidebar-nav-sidebar__fade"===e.animationName&&u&&r(!1)},onClick:function(e){e.currentTarget===e.target&&N()},onKeyDown:function(e){e.keyCode===q.ESCAPE&&(e.stopPropagation(),N())}},Object(a.createElement)("div",{className:$()("wpcom-block-editor-nav-sidebar-nav-sidebar__container",{"is-sliding-left":u}),ref:function(e){e&&e.focus(),E.current&&E.current.disconnect(),window.IntersectionObserver&&(E.current=new window.IntersectionObserver((function(e){var t=e.some((function(e){return!e.isIntersecting}));j(t)}),{root:e,threshold:[1]}))},role:"dialog",tabIndex:-1},Object(a.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__header"},Object(a.createElement)(oe,{className:$()("edit-post-fullscreen-mode-close","wpcom-block-editor-nav-sidebar-nav-sidebar__dismiss-sidebar-button"),icon:z,iconSize:36,onClick:N})),Object(a.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__site-title"},Object(a.createElement)("h2",null,f),Y&&Object(a.createElement)(w.ExternalLink,{href:Y},Object(V.__)("Visit site","full-site-editing"))),Object(a.createElement)(oe,{href:_,className:"wpcom-block-editor-nav-sidebar-nav-sidebar__home-button",icon:W,onClick:function(e){Object(H.hasAction)("a8c.wpcom-block-editor.closeEditor")&&(e.preventDefault(),Object(H.doAction)("a8c.wpcom-block-editor.closeEditor"))}},P),Object(a.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-heading"},I),Object(a.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},p.map((function(e,t){return Object(a.createElement)(ne,{key:e.id,item:e,postType:d,selected:e.id===b,statusLabel:m[e.status],ref:function(e){return function(e,t){h.current[t]=e}(e,t)}})}))),Object(a.createElement)("div",{className:$()("wpcom-block-editor-nav-sidebar-nav-sidebar__bottom-buttons",{"is-scrollbar-present":y})},Object(a.createElement)(re,{postType:d}))))}));r(36);var ce=function(e){var t=e.children,r=F()(e,["children"]);return Object(a.createElement)(w.Button,r,t)};function ae(){var e=Object(l.useDispatch)(X).toggleSidebar,t=Object(l.useSelect)((function(e){return e(X).isSidebarOpened()})),r=Object(l.useSelect)((function(e){return e(X).isSidebarClosing()}));return Object(a.createElement)(ce,{className:$()("edit-post-fullscreen-mode-close","wpcom-block-editor-nav-sidebar-toggle-sidebar-button__button",{"is-hidden":t||r}),icon:z,iconSize:36,onClick:e})}var le,ue;le="a8c-full-site-editing-nav-sidebar",ue={render:function(){var e=Object(l.useDispatch)("core").addEntities;Object(a.useEffect)((function(){e([{baseURL:"/wp/v2/statuses",key:"slug",kind:"root",name:"status",plural:"statuses"}])}),[]);var t=Object(a.useState)((function(){return document.createElement("div")})),r=c()(t,1)[0];return Object(a.useEffect)((function(){return document.body.appendChild(r),function(){document.body.removeChild(r)}})),Object(a.createElement)(T,null,Object(a.createElement)(ae,null),Object(a.createPortal)(Object(a.createElement)(ie,null),r))}},Object(A.registerPlugin)(le,ue);var se={toggleSidebar:function(){return{type:"TOGGLE_SIDEBAR"}},setSidebarClosing:function(e){return{type:"SET_SIDEBAR_CLOSING",isClosing:e}}},de=Object(l.combineReducers)({opened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SIDEBAR":return!e;default:return e}},closing:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SIDEBAR_CLOSING":return t.isClosing;default:return e}}});Object(l.registerStore)(X,{actions:se,reducer:de,selectors:{isSidebarOpened:function(e){return e.opened},isSidebarClosing:function(e){return e.closing}}})}]));
wpcom-block-editor-nav-sidebar/src/components/nav-sidebar/index.tsx CHANGED
@@ -21,7 +21,7 @@ import { compose } from '@wordpress/compose';
21
  /**
22
  * Internal dependencies
23
  */
24
- import { STORE_KEY, SITE_HOME_URL } from '../../constants';
25
  import CreatePage from '../create-page';
26
  import NavItem from '../nav-item';
27
  import { Post } from '../../types';
@@ -273,7 +273,7 @@ function useNavItems(): Post[] {
273
  const items =
274
  select( 'core' ).getEntityRecords( 'postType', currentPostType, {
275
  _fields: 'id,status,title',
276
- exclude: [ currentPostId ],
277
  orderby: 'modified',
278
  per_page: 10,
279
  status: statusFilter,
21
  /**
22
  * Internal dependencies
23
  */
24
+ import { STORE_KEY, SITE_HOME_URL, POST_IDS_TO_EXCLUDE } from '../../constants';
25
  import CreatePage from '../create-page';
26
  import NavItem from '../nav-item';
27
  import { Post } from '../../types';
273
  const items =
274
  select( 'core' ).getEntityRecords( 'postType', currentPostType, {
275
  _fields: 'id,status,title',
276
+ exclude: [ currentPostId, ...POST_IDS_TO_EXCLUDE ],
277
  orderby: 'modified',
278
  per_page: 10,
279
  status: statusFilter,
wpcom-block-editor-nav-sidebar/src/constants.ts CHANGED
@@ -4,8 +4,12 @@ declare global {
4
  interface Window {
5
  wpcomBlockEditorNavSidebar?: {
6
  homeUrl: string;
 
7
  };
8
  }
9
  }
10
 
11
  export const SITE_HOME_URL = window.wpcomBlockEditorNavSidebar?.homeUrl;
 
 
 
4
  interface Window {
5
  wpcomBlockEditorNavSidebar?: {
6
  homeUrl: string;
7
+ postIdsToExclude: string[];
8
  };
9
  }
10
  }
11
 
12
  export const SITE_HOME_URL = window.wpcomBlockEditorNavSidebar?.homeUrl;
13
+ export const POST_IDS_TO_EXCLUDE = ( window.wpcomBlockEditorNavSidebar?.postIdsToExclude || [] )
14
+ .map( ( id ) => parseInt( id, 10 ) )
15
+ .filter( ( id ) => ! isNaN( id ) );