this.wp=this.wp||{},this.wp.editor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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=220)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(15);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){Object(r.a)(e,t,n[t])})}return e}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",function(){return o})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(32),o=n(3);function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",function(){return o})},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return r})},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},function(e,t,n){var r;
/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}void 0!==e&&e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";var r=n(34);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return o})},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",function(){return r})},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",function(){return r})},,function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.hooks}()},,function(e,t){!function(){e.exports=this.React}()},function(e,t,n){"use strict";var r=n(37);var o=n(36);function i(e,t){return Object(r.a)(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,c=e[Symbol.iterator]();!(r=(s=c.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||Object(o.a)()}n.d(t,"a",function(){return i})},,function(e,t,n){e.exports=n(86)()},function(e,t,n){"use strict";var r,o;function i(e){return[e]}function s(e){return!!e&&"object"==typeof e}function c(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,u;function l(){n=o?new WeakMap:c()}function d(){var n,r,o,i,s,c=arguments.length;for(i=new Array(c),o=0;o<c;o++)i[o]=arguments[o];for(s=t.apply(null,i),(n=u(s)).isUniqueByDependants||(n.lastDependants&&!a(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),r=n.head;r;){if(a(r.args,i,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=i),u=o?function(e){var t,o,i,a,u=n,l=!0;for(t=0;t<e.length;t++){if(!s(o=e[t])){l=!1;break}u.has(o)?u=u.get(o):(i=new WeakMap,u.set(o,i),u=i)}return u.has(r)||((a=c()).isUniqueByDependants=l,u.set(r,a)),u.get(r)}:function(){return n},d.getDependants=t,d.clear=l,l(),d}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",function(){return o})},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",function(){return r})},function(e,t){!function(){e.exports=this.wp.blob}()},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return r})},,function(e,t){!function(){e.exports=this.wp.viewport}()},function(e,t,n){e.exports=function(e,t){var n,r,o,i=0;function s(){var t,s,c=r,a=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(s=0;s<a;s++)if(c.args[s]!==arguments[s]){c=c.next;continue e}return c!==r&&(c===o&&(o=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=r,c.prev=null,r.prev=c,r=c),c.val}c=c.next}for(t=new Array(a),s=0;s<a;s++)t[s]=arguments[s];return c={args:t,val:e.apply(null,t)},r?(r.prev=c,c.next=r):o=c,i===n?(o=o.prev).next=null:i++,r=c,c.val}return t&&t.maxSize&&(n=t.maxSize),s.clear=function(){r=null,o=null,i=0},s}},,,function(e,t,n){"use strict";function r(e,t,n,r,o,i,s){try{var c=e[i](s),a=c.value}catch(e){return void n(e)}c.done?t(a):Promise.resolve(a).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var s=e.apply(t,n);function c(e){r(s,o,i,c,a,"next",e)}function a(e){r(s,o,i,c,a,"throw",e)}c(void 0)})}}n.d(t,"a",function(){return o})},,,,,function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t){!function(){e.exports=this.wp.date}()},,,,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t){!function(){e.exports=this.wp.nux}()},function(e,t,n){"use strict";t.__esModule=!0;var r=n(127);t.default=r.default},function(e,t,n){e.exports=n(237)},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,,function(e,t){!function(){e.exports=this.wp.autop}()},,,,,function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(t,e),function(e){return function(n){return function(r){var o,i,s=t[r.type],c=n(r);if(s)for(o=0;o<s.length;o++)(i=s[o](r,e))&&e.dispatch(i);return c}}}}}()},,,function(e,t){!function(){e.exports=this.wp.coreData}()},,,,,,,,,,function(e,t,n){"use strict";var r=n(121),o=n(119);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=g,t.resolve=function(e,t){return g(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?g(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=g(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var s=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),d=["%","/","?",";","#"].concat(l),p=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=n(118);function g(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),c=-1!==i&&i<e.indexOf("#")?"?":"#",u=e.split(c);u[0]=u[0].replace(/\\/g,"/");var g=e=u.join(c);if(g=g.trim(),!n&&1===e.split("#").length){var j=a.exec(g);if(j)return this.path=g,this.href=g,this.pathname=j[1],j[2]?(this.search=j[2],this.query=t?O.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var y=s.exec(g);if(y){var _=(y=y[0]).toLowerCase();this.protocol=_,g=g.substr(y.length)}if(n||y||g.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===g.substr(0,2);!k||y&&m[y]||(g=g.substr(2),this.slashes=!0)}if(!m[y]&&(k||y&&!v[y])){for(var E,S,P=-1,w=0;w<p.length;w++){-1!==(T=g.indexOf(p[w]))&&(-1===P||T<P)&&(P=T)}-1!==(S=-1===P?g.lastIndexOf("@"):g.lastIndexOf("@",P))&&(E=g.slice(0,S),g=g.slice(S+1),this.auth=decodeURIComponent(E)),P=-1;for(w=0;w<d.length;w++){var T;-1!==(T=g.indexOf(d[w]))&&(-1===P||T<P)&&(P=T)}-1===P&&(P=g.length),this.host=g.slice(0,P),g=g.slice(P),this.parseHost(),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C)for(var x=this.hostname.split(/\./),B=(w=0,x.length);w<B;w++){var A=x[w];if(A&&!A.match(f)){for(var I="",L=0,R=A.length;L<R;L++)A.charCodeAt(L)>127?I+="x":I+=A[L];if(!I.match(f)){var U=x.slice(0,w),N=x.slice(w+1),D=A.match(h);D&&(U.push(D[1]),N.unshift(D[2])),N.length&&(g="/"+N.join(".")+g),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",M=this.hostname||"";this.host=M+F,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!b[_])for(w=0,B=l.length;w<B;w++){var V=l[w];if(-1!==g.indexOf(V)){var z=encodeURIComponent(V);z===V&&(z=escape(V)),g=g.split(V).join(z)}}var K=g.indexOf("#");-1!==K&&(this.hash=g.substr(K),g=g.slice(0,K));var W=g.indexOf("?");if(-1!==W?(this.search=g.substr(W),this.query=g.substr(W+1),t&&(this.query=O.parse(this.query)),g=g.slice(0,W)):t&&(this.search="",this.query={}),g&&(this.pathname=g),v[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var q=this.search||"";this.path=F+q}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,s="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(s=O.stringify(this.query));var c=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),c&&"?"!==c.charAt(0)&&(c="?"+c),t+i+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(c=c.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(g(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),s=0;s<r.length;s++){var c=r[s];n[c]=this[c]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),u=0;u<a.length;u++){var l=a[u];"protocol"!==l&&(n[l]=e[l])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var d=Object.keys(e),p=0;p<d.length;p++){var f=d[p];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||m[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var b=n.pathname||"",O=n.search||"";n.path=b+O}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),j=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=j||g||n.host&&e.pathname,_=y,k=n.pathname&&n.pathname.split("/")||[],E=(h=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===k[0]?k[0]=n.host:k.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),y=y&&(""===h[0]||""===k[0])),j)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,k=h;else if(h.length)k||(k=[]),k.pop(),k=k.concat(h),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(E)n.hostname=n.host=k.shift(),(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=k.slice(-1)[0],P=(n.host||e.host||k.length>1)&&("."===S||".."===S)||""===S,w=0,T=k.length;T>=0;T--)"."===(S=k[T])?k.splice(T,1):".."===S?(k.splice(T,1),w++):w&&(k.splice(T,1),w--);if(!y&&!_)for(;w--;w)k.unshift("..");!y||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),P&&"/"!==k.join("/").substr(-1)&&k.push("");var C,x=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(n.hostname=n.host=x?"":k.length?k.shift():"",(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift()));return(y=y||n.host&&k.length)&&!x&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},,,,,,,function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(85);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,s){if(s!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},,,,,function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},,,,,,,,,,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},,function(e,t){!function(){e.exports=this.wp.notices}()},,,,,,,,,,,,function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,c){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(s(e),function(s){var c=encodeURIComponent(r(s))+n;return o(e[s])?i(e[s],function(e){return c+encodeURIComponent(r(e))}).join(t):c+encodeURIComponent(r(e[s]))}).join(t):c?encodeURIComponent(r(c))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var c=/\+/g;e=e.split(t);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var l=0;l<u;++l){var d,p,f,h,b=e[l].replace(c,"%20"),m=b.indexOf(n);m>=0?(d=b.substr(0,m),p=b.substr(m+1)):(d=b,p=""),f=decodeURIComponent(d),h=decodeURIComponent(p),r(s,f)?o(s[f])?s[f].push(h):s[f]=[s[f],h]:s[f]=h}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";t.decode=t.parse=n(117),t.encode=t.stringify=n(116)},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){"object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var c,a=2147483647,u=36,l=1,d=26,p=38,f=700,h=72,b=128,m="-",v=/^xn--/,O=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=u-l,_=Math.floor,k=String.fromCharCode;function E(e){throw new RangeError(j[e])}function S(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function P(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+S((e=e.replace(g,".")).split("."),t).join(".")}function w(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function T(e){return S(e,function(e){var t="";return e>65535&&(t+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=k(e)}).join("")}function C(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:u}function x(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function B(e,t,n){var r=0;for(e=n?_(e/f):e>>1,e+=_(e/t);e>y*d>>1;r+=u)e=_(e/y);return _(r+(y+1)*e/(e+p))}function A(e){var t,n,r,o,i,s,c,p,f,v,O=[],g=e.length,j=0,y=b,k=h;for((n=e.lastIndexOf(m))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&E("not-basic"),O.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<g;){for(i=j,s=1,c=u;o>=g&&E("invalid-input"),((p=C(e.charCodeAt(o++)))>=u||p>_((a-j)/s))&&E("overflow"),j+=p*s,!(p<(f=c<=k?l:c>=k+d?d:c-k));c+=u)s>_(a/(v=u-f))&&E("overflow"),s*=v;k=B(j-i,t=O.length+1,0==i),_(j/t)>a-y&&E("overflow"),y+=_(j/t),j%=t,O.splice(j++,0,y)}return T(O)}function I(e){var t,n,r,o,i,s,c,p,f,v,O,g,j,y,S,P=[];for(g=(e=w(e)).length,t=b,n=0,i=h,s=0;s<g;++s)(O=e[s])<128&&P.push(k(O));for(r=o=P.length,o&&P.push(m);r<g;){for(c=a,s=0;s<g;++s)(O=e[s])>=t&&O<c&&(c=O);for(c-t>_((a-n)/(j=r+1))&&E("overflow"),n+=(c-t)*j,t=c,s=0;s<g;++s)if((O=e[s])<t&&++n>a&&E("overflow"),O==t){for(p=n,f=u;!(p<(v=f<=i?l:f>=i+d?d:f-i));f+=u)S=p-v,y=u-v,P.push(k(x(v+S%y,0))),p=_(S/y);P.push(k(x(p,0))),i=B(n,j,r==o),n=0,++r}++n,++t}return P.join("")}c={version:"1.4.1",ucs2:{decode:w,encode:T},decode:A,encode:I,toASCII:function(e){return P(e,function(e){return O.test(e)?"xn--"+I(e):e})},toUnicode:function(e){return P(e,function(e){return v.test(e)?A(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return c}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(120)(e),n(57))},,,function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]}},function(e,t,n){var r=n(124);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,s=document.createElement(i);s.innerHTML="&nbsp;","TEXTAREA"===i.toUpperCase()&&s.setAttribute("rows","1");var c=r(e,"font-size");s.style.fontSize=c,s.style.padding="0px",s.style.border="0px";var a=document.body;a.appendChild(s),n=s.offsetHeight,a.removeChild(s)}return n}},function(e,t,n){var r,o,i;
/*!
	autosize 4.0.2
	license: MIT
	http://www.jacklmoore.com/autosize
*/o=[e,t],void 0===(i="function"==typeof(r=function(e,t){"use strict";var n="function"==typeof Map?new Map:function(){var e=[],t=[];return{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,r){-1===e.indexOf(n)&&(e.push(n),t.push(r))},delete:function(n){var r=e.indexOf(n);r>-1&&(e.splice(r,1),t.splice(r,1))}}}(),r=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){r=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function o(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var t=null,o=null,i=null,s=function(){e.clientWidth!==o&&l()},c=function(t){window.removeEventListener("resize",s,!1),e.removeEventListener("input",l,!1),e.removeEventListener("keyup",l,!1),e.removeEventListener("autosize:destroy",c,!1),e.removeEventListener("autosize:update",l,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),n.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",c,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",l,!1),window.addEventListener("resize",s,!1),e.addEventListener("input",l,!1),e.addEventListener("autosize:update",l,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:c,update:l}),function(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),l()}()}function a(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var n=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",o=e.clientWidth,n.forEach(function(e){e.node.scrollTop=e.scrollTop}),r&&(document.documentElement.scrollTop=r)}}function l(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(o<t?"hidden"===n.overflowY&&(a("scroll"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(a("hidden"),u(),o="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==o){i=o;var s=r("autosize:resized");try{e.dispatchEvent(s)}catch(e){}}}}function i(e){var t=n.get(e);t&&t.destroy()}function s(e){var t=n.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return o(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=c,e.exports=t.default})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||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},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var s=n(27),c=n(30),a=n(126),u=n(125),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.dispatchEvent=function(e){var n=document.createEvent("Event");n.initEvent(e,!0,!1),t.textarea.dispatchEvent(n)},t.updateLineHeight=function(){t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t.saveDOMNodeRef=function(e){var n=t.props.innerRef;n&&n(e),t.textarea=e},t.getLocals=function(){var e=t,n=e.props,r=(n.onResize,n.maxRows),s=(n.onChange,n.style),c=(n.innerRef,i(n,["onResize","maxRows","onChange","style","innerRef"])),a=e.state.lineHeight,u=e.saveDOMNodeRef,l=r&&a?a*r:null;return o({},c,{saveDOMNodeRef:u,style:l?o({},s,{maxHeight:l}):s,onChange:t.onChange})},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout(function(){return a(e.textarea)}),n&&this.textarea.addEventListener("autosize:resized",n)},t.prototype.componentWillUnmount=function(){var e=this.props.onResize;e&&this.textarea.removeEventListener("autosize:resized",e),this.dispatchEvent("autosize:destroy")},t.prototype.render=function(){var e=this.getLocals(),t=e.children,n=e.saveDOMNodeRef,r=i(e,["children","saveDOMNodeRef"]);return s.createElement("textarea",o({},r,{ref:n}),t)},t.prototype.componentDidUpdate=function(){this.props.value!==this.currentValue&&this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:c.number,maxRows:c.number,onResize:c.func,innerRef:c.func},t}(s.Component);t.default=l},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],c=!0;return function e(d){var p={},f=!0,h={node:n?i(d):d,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(f=!1)},delete:function(e){delete h.parent.node[h.key],e&&(f=!1)},remove:function(e){a(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(f=!1)},keys:null,before:function(e){p.before=e},after:function(e){p.after=e},pre:function(e){p.pre=e},post:function(e){p.post=e},stop:function(){c=!1},block:function(){f=!1}};if(!c)return h;function b(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=s(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){h.circular=o[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}b();var m=t.call(h,h.node);return void 0!==m&&h.update&&h.update(m),p.before&&p.before.call(h,h.node),f?("object"!=typeof h.node||null===h.node||h.circular||(o.push(h),b(),u(h.keys,function(t,o){r.push(t),p.pre&&p.pre.call(h,h.node[t],t);var i=e(h.node[t]);n&&l.call(h.node,t)&&(h.node[t]=i.node),i.isLast=o==h.keys.length-1,i.isFirst=0==o,p.post&&p.post.call(h,i),r.pop()}),o.pop()),p.after&&p.after.call(h,h.node),h):h}(e).node}function i(e){if("object"==typeof e&&null!==e){var t;if(a(e))t=[];else if(function(e){return"[object Date]"===c(e)}(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===c(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===c(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===c(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===c(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===c(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return u(s(e),function(n){t[n]=e[n]}),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!l.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!l.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];l.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach(function(t){this.isRoot&&n||(r=e.call(this,r,t))}),r},r.prototype.paths=function(){var e=[];return this.forEach(function(t){e.push(this.path)}),e},r.prototype.nodes=function(){var e=[];return this.forEach(function(t){e.push(this.node)}),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var c=i(r);return e.push(r),t.push(c),u(s(r),function(e){c[e]=n(r[e])}),e.pop(),t.pop(),c}return r}(this.value)};var s=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function c(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};u(s(r.prototype),function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}});var l=Object.hasOwnProperty||function(e,t){return t in e}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r={};n.d(r,"setupEditor",function(){return se}),n.d(r,"resetPost",function(){return ce}),n.d(r,"resetAutosave",function(){return ae}),n.d(r,"__experimentalRequestPostUpdateStart",function(){return ue}),n.d(r,"__experimentalRequestPostUpdateSuccess",function(){return le}),n.d(r,"__experimentalRequestPostUpdateFailure",function(){return de}),n.d(r,"updatePost",function(){return pe}),n.d(r,"setupEditorState",function(){return fe}),n.d(r,"editPost",function(){return he}),n.d(r,"__experimentalOptimisticUpdatePost",function(){return be}),n.d(r,"savePost",function(){return me}),n.d(r,"refreshPost",function(){return ve}),n.d(r,"trashPost",function(){return Oe}),n.d(r,"autosave",function(){return ge}),n.d(r,"redo",function(){return je}),n.d(r,"undo",function(){return ye}),n.d(r,"createUndoLevel",function(){return _e}),n.d(r,"updatePostLock",function(){return ke}),n.d(r,"__experimentalFetchReusableBlocks",function(){return Ee}),n.d(r,"__experimentalReceiveReusableBlocks",function(){return Se}),n.d(r,"__experimentalSaveReusableBlock",function(){return Pe}),n.d(r,"__experimentalDeleteReusableBlock",function(){return we}),n.d(r,"__experimentalUpdateReusableBlockTitle",function(){return Te}),n.d(r,"__experimentalConvertBlockToStatic",function(){return Ce}),n.d(r,"__experimentalConvertBlockToReusable",function(){return xe}),n.d(r,"enablePublishSidebar",function(){return Be}),n.d(r,"disablePublishSidebar",function(){return Ae}),n.d(r,"lockPostSaving",function(){return Ie}),n.d(r,"unlockPostSaving",function(){return Le}),n.d(r,"resetEditorBlocks",function(){return Re}),n.d(r,"updateEditorSettings",function(){return Ue}),n.d(r,"resetBlocks",function(){return De}),n.d(r,"receiveBlocks",function(){return Fe}),n.d(r,"updateBlock",function(){return Me}),n.d(r,"updateBlockAttributes",function(){return Ve}),n.d(r,"selectBlock",function(){return ze}),n.d(r,"startMultiSelect",function(){return Ke}),n.d(r,"stopMultiSelect",function(){return We}),n.d(r,"multiSelect",function(){return qe}),n.d(r,"clearSelectedBlock",function(){return He}),n.d(r,"toggleSelection",function(){return Ge}),n.d(r,"replaceBlocks",function(){return Qe}),n.d(r,"moveBlocksDown",function(){return Ye}),n.d(r,"moveBlocksUp",function(){return $e}),n.d(r,"moveBlockToPosition",function(){return Xe}),n.d(r,"insertBlock",function(){return Ze}),n.d(r,"insertBlocks",function(){return Je}),n.d(r,"showInsertionPoint",function(){return et}),n.d(r,"hideInsertionPoint",function(){return tt}),n.d(r,"setTemplateValidity",function(){return nt}),n.d(r,"synchronizeTemplate",function(){return rt}),n.d(r,"mergeBlocks",function(){return ot}),n.d(r,"removeBlocks",function(){return it}),n.d(r,"removeBlock",function(){return st}),n.d(r,"toggleBlockMode",function(){return ct}),n.d(r,"startTyping",function(){return at}),n.d(r,"stopTyping",function(){return ut}),n.d(r,"enterFormattedText",function(){return lt}),n.d(r,"exitFormattedText",function(){return dt}),n.d(r,"insertDefaultBlock",function(){return pt}),n.d(r,"updateBlockListSettings",function(){return ft});var o={};n.d(o,"hasEditorUndo",function(){return gt}),n.d(o,"hasEditorRedo",function(){return jt}),n.d(o,"isEditedPostNew",function(){return yt}),n.d(o,"hasChangedContent",function(){return _t}),n.d(o,"isEditedPostDirty",function(){return kt}),n.d(o,"isCleanNewPost",function(){return Et}),n.d(o,"getCurrentPost",function(){return St}),n.d(o,"getCurrentPostType",function(){return Pt}),n.d(o,"getCurrentPostId",function(){return wt}),n.d(o,"getCurrentPostRevisionsCount",function(){return Tt}),n.d(o,"getCurrentPostLastRevisionId",function(){return Ct}),n.d(o,"getPostEdits",function(){return xt}),n.d(o,"getReferenceByDistinctEdits",function(){return Bt}),n.d(o,"getCurrentPostAttribute",function(){return At}),n.d(o,"getEditedPostAttribute",function(){return Lt}),n.d(o,"getAutosaveAttribute",function(){return Rt}),n.d(o,"getEditedPostVisibility",function(){return Ut}),n.d(o,"isCurrentPostPending",function(){return Nt}),n.d(o,"isCurrentPostPublished",function(){return Dt}),n.d(o,"isCurrentPostScheduled",function(){return Ft}),n.d(o,"isEditedPostPublishable",function(){return Mt}),n.d(o,"isEditedPostSaveable",function(){return Vt}),n.d(o,"isEditedPostEmpty",function(){return zt}),n.d(o,"isEditedPostAutosaveable",function(){return Kt}),n.d(o,"getAutosave",function(){return Wt}),n.d(o,"hasAutosave",function(){return qt}),n.d(o,"isEditedPostBeingScheduled",function(){return Ht}),n.d(o,"isEditedPostDateFloating",function(){return Gt}),n.d(o,"isSavingPost",function(){return Qt}),n.d(o,"didPostSaveRequestSucceed",function(){return Yt}),n.d(o,"didPostSaveRequestFail",function(){return $t}),n.d(o,"isAutosavingPost",function(){return Xt}),n.d(o,"isPreviewingPost",function(){return Zt}),n.d(o,"getEditedPostPreviewLink",function(){return Jt}),n.d(o,"getSuggestedPostFormat",function(){return en}),n.d(o,"getBlocksForSerialization",function(){return tn}),n.d(o,"getEditedPostContent",function(){return nn}),n.d(o,"__experimentalGetReusableBlock",function(){return rn}),n.d(o,"__experimentalIsSavingReusableBlock",function(){return on}),n.d(o,"__experimentalIsFetchingReusableBlock",function(){return sn}),n.d(o,"__experimentalGetReusableBlocks",function(){return cn}),n.d(o,"getStateBeforeOptimisticTransaction",function(){return an}),n.d(o,"isPublishingPost",function(){return un}),n.d(o,"isPermalinkEditable",function(){return ln}),n.d(o,"getPermalink",function(){return dn}),n.d(o,"getPermalinkParts",function(){return pn}),n.d(o,"inSomeHistory",function(){return fn}),n.d(o,"isPostLocked",function(){return hn}),n.d(o,"isPostSavingLocked",function(){return bn}),n.d(o,"isPostLockTakeover",function(){return mn}),n.d(o,"getPostLockUser",function(){return vn}),n.d(o,"getActivePostLock",function(){return On}),n.d(o,"canUserUseUnfilteredHTML",function(){return gn}),n.d(o,"isPublishSidebarEnabled",function(){return jn}),n.d(o,"getEditorBlocks",function(){return yn}),n.d(o,"__unstableIsEditorReady",function(){return _n}),n.d(o,"getEditorSettings",function(){return kn}),n.d(o,"getBlockDependantsCacheBust",function(){return Sn}),n.d(o,"getBlockName",function(){return Pn}),n.d(o,"isBlockValid",function(){return wn}),n.d(o,"getBlockAttributes",function(){return Tn}),n.d(o,"getBlock",function(){return Cn}),n.d(o,"getBlocks",function(){return xn}),n.d(o,"__unstableGetBlockWithoutInnerBlocks",function(){return Bn}),n.d(o,"getClientIdsOfDescendants",function(){return An}),n.d(o,"getClientIdsWithDescendants",function(){return In}),n.d(o,"getGlobalBlockCount",function(){return Ln}),n.d(o,"getBlocksByClientId",function(){return Rn}),n.d(o,"getBlockCount",function(){return Un}),n.d(o,"getBlockSelectionStart",function(){return Nn}),n.d(o,"getBlockSelectionEnd",function(){return Dn}),n.d(o,"getSelectedBlockCount",function(){return Fn}),n.d(o,"hasSelectedBlock",function(){return Mn}),n.d(o,"getSelectedBlockClientId",function(){return Vn}),n.d(o,"getSelectedBlock",function(){return zn}),n.d(o,"getBlockRootClientId",function(){return Kn}),n.d(o,"getBlockHierarchyRootClientId",function(){return Wn}),n.d(o,"getAdjacentBlockClientId",function(){return qn}),n.d(o,"getPreviousBlockClientId",function(){return Hn}),n.d(o,"getNextBlockClientId",function(){return Gn}),n.d(o,"getSelectedBlocksInitialCaretPosition",function(){return Qn}),n.d(o,"getMultiSelectedBlockClientIds",function(){return Yn}),n.d(o,"getMultiSelectedBlocks",function(){return $n}),n.d(o,"getFirstMultiSelectedBlockClientId",function(){return Xn}),n.d(o,"getLastMultiSelectedBlockClientId",function(){return Zn}),n.d(o,"isFirstMultiSelectedBlock",function(){return Jn}),n.d(o,"isBlockMultiSelected",function(){return er}),n.d(o,"isAncestorMultiSelected",function(){return tr}),n.d(o,"getMultiSelectedBlocksStartClientId",function(){return nr}),n.d(o,"getMultiSelectedBlocksEndClientId",function(){return rr}),n.d(o,"getBlockOrder",function(){return or}),n.d(o,"getBlockIndex",function(){return ir}),n.d(o,"isBlockSelected",function(){return sr}),n.d(o,"hasSelectedInnerBlock",function(){return cr}),n.d(o,"isBlockWithinSelection",function(){return ar}),n.d(o,"hasMultiSelection",function(){return ur}),n.d(o,"isMultiSelecting",function(){return lr}),n.d(o,"isSelectionEnabled",function(){return dr}),n.d(o,"getBlockMode",function(){return pr}),n.d(o,"isTyping",function(){return fr}),n.d(o,"isCaretWithinFormattedText",function(){return hr}),n.d(o,"getBlockInsertionPoint",function(){return br}),n.d(o,"isBlockInsertionPointVisible",function(){return mr}),n.d(o,"isValidTemplate",function(){return vr}),n.d(o,"getTemplate",function(){return Or}),n.d(o,"getTemplateLock",function(){return gr}),n.d(o,"canInsertBlockType",function(){return jr}),n.d(o,"getInserterItems",function(){return yr}),n.d(o,"hasInserterItems",function(){return _r}),n.d(o,"getBlockListSettings",function(){return kr});var i=n(8),s=n(14),c=(n(68),n(104),n(54)),a=n(20),u=n(39),l=n(5),d=n(28),p=n(15),f=n(7),h=n(32),b=n(56),m=n.n(b),v=n(2),O=n(24),g={isPublishSidebarEnabled:!0},j={},y=Object(f.a)({},i.SETTINGS_DEFAULTS,{richEditingEnabled:!0,enableCustomFields:!1}),_=new Set(["meta"]),k="core/editor",E="post-update",S="SAVE_POST_NOTICE_ID",P="TRASH_POST_NOTICE_ID",w=/%(?:postname|pagename)%/,T=6e4,C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n,r){var o=t(n,r),i=void 0===n||Object(v.includes)(e.resetTypes,r.type),s=n!==o;if(!s&&!i)return n;s&&void 0!==n||(o=Object(f.a)({},o));var c=Object(v.includes)(e.ignoreTypes,r.type);return o.isDirty=c?n.isDirty:!i&&s,o}}},x=n(17),B={resetTypes:[],ignoreTypes:[],shouldOverwriteState:function(){return!1}},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){(e=Object(f.a)({},B,e)).shouldOverwriteState=Object(v.overSome)([e.shouldOverwriteState,function(t){return Object(v.includes)(e.ignoreTypes,t.type)}]);var n={past:[],present:t(void 0,{}),future:[],lastAction:null,shouldCreateUndoLevel:!1},r=e,o=r.resetTypes,i=void 0===o?[]:o,s=r.shouldOverwriteState,c=void 0===s?function(){return!1}:s;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,r=arguments.length>1?arguments[1]:void 0,o=e.past,s=e.present,a=e.future,u=e.lastAction,l=e.shouldCreateUndoLevel,d=u;switch(r.type){case"UNDO":return o.length?{past:Object(v.dropRight)(o),present:Object(v.last)(o),future:[s].concat(Object(x.a)(a)),lastAction:null,shouldCreateUndoLevel:!1}:e;case"REDO":return a.length?{past:[].concat(Object(x.a)(o),[s]),present:Object(v.first)(a),future:Object(v.drop)(a),lastAction:null,shouldCreateUndoLevel:!1}:e;case"CREATE_UNDO_LEVEL":return Object(f.a)({},e,{lastAction:null,shouldCreateUndoLevel:!0})}var p=t(s,r);if(Object(v.includes)(i,r.type))return{past:[],present:p,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(s===p)return e;var h=o,b=d;return!l&&o.length&&c(r,d)||(h=[].concat(Object(x.a)(o),[s]),b=r),{past:h,present:p,future:[],shouldCreateUndoLevel:!1,lastAction:b}}}};function I(e){return e&&"object"===Object(h.a)(e)&&"raw"in e?e.raw:e}function L(e,t){return e===t?Object(f.a)({},e):t}function R(e,t){return"EDIT_POST"===e.type&&function(e,t){return Object(v.isEqual)(Object(v.keys)(e),Object(v.keys)(t))}(e.edits,t.edits)}var U=Object(v.flow)([l.combineReducers,A({resetTypes:["SETUP_EDITOR_STATE"],ignoreTypes:["RESET_POST","UPDATE_POST"],shouldOverwriteState:function(e,t){return"RESET_EDITOR_BLOCKS"===e.type?!e.shouldCreateUndoLevel:!(!t||e.type!==t.type)&&R(e,t)}})])({blocks:C({resetTypes:["SETUP_EDITOR_STATE","REQUEST_POST_UPDATE_START"]})(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{value:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_EDITOR_BLOCKS":return t.blocks===e.value?e:{value:t.blocks}}return e}),edits:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_POST":return Object(v.reduce)(t.edits,function(t,n,r){return n!==e[r]&&(t=L(e,t),_.has(r)?t[r]=Object(f.a)({},t[r],n):t[r]=n),t},e);case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===t.type?function(e){return t.edits[e]}:function(e){return I(t.post[e])};return Object(v.reduce)(e,function(t,r,o){return Object(v.isEqual)(r,n(o))?(delete(t=L(e,t))[o],t):t},e);case"RESET_EDITOR_BLOCKS":return"content"in e?Object(v.omit)(e,"content"):e}return e}});var N=Object(l.combineReducers)({data:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_REUSABLE_BLOCKS":return Object(v.reduce)(t.results,function(t,n){var r=n.reusableBlock,o=r.id,i=r.title,s={clientId:n.parsedBlock.clientId,title:i};return Object(v.isEqual)(t[o],s)||((t=L(e,t))[o]=s),t},e);case"UPDATE_REUSABLE_BLOCK_TITLE":var n=t.id,r=t.title;return e[n]&&e[n].title!==r?Object(f.a)({},e,Object(p.a)({},n,Object(f.a)({},e[n],{title:r}))):e;case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=t.id,i=t.updatedId;if(o===i)return e;var s=e[o];return Object(f.a)({},Object(v.omit)(e,o),Object(p.a)({},i,s));case"REMOVE_REUSABLE_BLOCK":var c=t.id;return Object(v.omit)(e,c)}return e},isFetching:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_REUSABLE_BLOCKS":var n=t.id;return n?Object(f.a)({},e,Object(p.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(v.omit)(e,r)}return e},isSaving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_REUSABLE_BLOCK":return Object(f.a)({},e,Object(p.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(v.omit)(e,n)}return e}});var D=m()(Object(l.combineReducers)({editor:U,initialEdits:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR":if(!t.edits)break;return t.edits;case"SETUP_EDITOR_STATE":return"content"in e?Object(v.omit)(e,"content"):e;case"UPDATE_POST":return Object(v.reduce)(t.edits,function(t,n,r){return t.hasOwnProperty(r)?(delete(t=L(e,t))[r],t):t},e);case"RESET_POST":return j}return e},currentPost:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":var n;if(t.post)n=t.post;else{if(!t.edits)return e;n=Object(f.a)({},e,t.edits)}return Object(v.mapValues)(n,I)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;switch((arguments.length>1?arguments[1]:void 0).type){case"ENABLE_PUBLISH_SIDEBAR":return Object(f.a)({},e,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(f.a)({},e,{isPublishSidebarEnabled:!1})}return e},saving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_START":return{requesting:!0,successful:!1,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_SUCCESS":return{requesting:!1,successful:!0,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_FAILURE":return{requesting:!1,successful:!1,error:t.error,options:t.options||{}}}return e},postLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},reusableBlocks:N,template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return Object(f.a)({},e,{isValid:t.isValid})}return e},autosave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_AUTOSAVE":var n=t.post,r=["title","excerpt","content"].map(function(e){return I(n[e])}),o=Object(d.a)(r,3);return{title:o[0],excerpt:o[1],content:o[2]}}return e},previewLink:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_SUCCESS":return t.post.preview_link?t.post.preview_link:t.post.link?Object(O.addQueryArgs)(t.post.link,{preview:!0}):e;case"REQUEST_POST_UPDATE_START":if(e&&t.options.isPreview)return null}return e},postSavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_SAVING":return Object(f.a)({},e,Object(p.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.omit)(e,t.lockName)}return e},isReady:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"SETUP_EDITOR_STATE":return!0}return e},editorSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return Object(f.a)({},e,t.settings)}return e}})),F=n(65),M=n.n(F),V=n(92),z=n.n(V),K=n(23),W=n.n(K),q=n(33),H=n.n(q);function G(e){return{type:"API_FETCH",request:e}}function Q(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return{type:"SELECT",storeKey:e,selectorName:t,args:r}}function Y(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return{type:"RESOLVE_SELECT",storeKey:e,selectorName:t,args:r}}function $(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return{type:"DISPATCH",storeKey:e,actionName:t,args:r}}var X={API_FETCH:function(e){var t=e.request;return H()(t)},SELECT:Object(l.createRegistryControl)(function(e){return function(t){var n,r=t.storeKey,o=t.selectorName,i=t.args;return(n=e.select(r))[o].apply(n,Object(x.a)(i))}}),DISPATCH:Object(l.createRegistryControl)(function(e){return function(t){var n,r=t.storeKey,o=t.actionName,i=t.args;return(n=e.dispatch(r))[o].apply(n,Object(x.a)(i))}}),RESOLVE_SELECT:Object(l.createRegistryControl)(function(e){return function(t){var n=t.storeKey,r=t.selectorName,o=t.args;return new Promise(function(t){var i=function(){return e.select("core/data").hasFinishedResolution(n,r,o)},s=function(){return e.select(n)[r].apply(null,o)},c=s();if(i())return t(c);var a=e.subscribe(function(){i()&&(a(),t(s()))})})}})},Z=n(1);function J(e){var t=e.previousPost,n=e.post,r=e.postType;if(Object(v.get)(e.options,["isAutosave"]))return[];var o,i=["publish","private","future"],s=Object(v.includes)(i,t.status),c=Object(v.includes)(i,n.status),a=Object(v.get)(r,["viewable"],!1);if(s||c?s&&!c?(o=r.labels.item_reverted_to_draft,a=!1):o=!s&&c?{publish:r.labels.item_published,private:r.labels.item_published_privately,future:r.labels.item_scheduled}[n.status]:r.labels.item_updated:o=null,o){var u=[];return a&&u.push({label:r.labels.view_item,url:n.link}),[o,{id:S,actions:u}]}return[]}function ee(e){var t=e.post,n=e.edits,r=e.error;if(r&&"rest_autosave_no_changes"===r.code)return[];var o=["publish","private","future"],i=-1!==o.indexOf(t.status),s={publish:Object(Z.__)("Publishing failed"),private:Object(Z.__)("Publishing failed"),future:Object(Z.__)("Scheduling failed")};return[i||-1===o.indexOf(n.status)?Object(Z.__)("Updating failed"):s[n.status],{id:S}]}function te(e){return[e.error.message&&"unknown_error"!==e.error.code?e.error.message:Object(Z.__)("Trashing failed"),{id:P}]}var ne=W.a.mark(me),re=W.a.mark(ve),oe=W.a.mark(Oe),ie=W.a.mark(ge);function se(e,t,n){return{type:"SETUP_EDITOR",post:e,edits:t,template:n}}function ce(e){return{type:"RESET_POST",post:e}}function ae(e){return{type:"RESET_AUTOSAVE",post:e}}function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",optimist:{type:b.BEGIN,id:E},options:e}}function le(e){var t=e.previousPost,n=e.post,r=e.isRevision,o=e.options,i=e.postType;return{type:"REQUEST_POST_UPDATE_SUCCESS",previousPost:t,post:n,optimist:{type:r?b.REVERT:b.COMMIT,id:E},options:o,postType:i}}function de(e){var t=e.post,n=e.edits,r=e.error,o=e.options;return{type:"REQUEST_POST_UPDATE_FAILURE",optimist:{type:b.REVERT,id:E},post:t,edits:n,error:r,options:o}}function pe(e){return{type:"UPDATE_POST",edits:e}}function fe(e){return{type:"SETUP_EDITOR_STATE",post:e}}function he(e){return{type:"EDIT_POST",edits:e}}function be(e){return Object(f.a)({},pe(e),{optimist:{id:E}})}function me(){var e,t,n,r,o,i,s,c,a,u,l,d,p,h,b,m=arguments;return W.a.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return e=m.length>0&&void 0!==m[0]?m[0]:{},O.next=3,Q(k,"isEditedPostSaveable");case 3:if(O.sent){O.next=6;break}return O.abrupt("return");case 6:return O.next=8,Q(k,"getPostEdits");case 8:return t=O.sent,(n=!!e.isAutosave)&&(t=Object(v.pick)(t,["title","content","excerpt"])),O.next=13,Q(k,"isEditedPostNew");case 13:return O.sent&&(t=Object(f.a)({status:"draft"},t)),O.next=17,Q(k,"getCurrentPost");case 17:return r=O.sent,O.next=20,Q(k,"getEditedPostContent");case 20:return o=O.sent,i=Object(f.a)({},t,{content:o,id:r.id}),O.next=24,Q(k,"getCurrentPostType");case 24:return s=O.sent,O.next=27,Y("core","getPostType",s);case 27:return c=O.sent,O.next=30,$(k,"__experimentalRequestPostUpdateStart",e);case 30:return O.next=32,$(k,"__experimentalOptimisticUpdatePost",i);case 32:if(a="/wp/v2/".concat(c.rest_base,"/").concat(r.id),u="PUT",!n){O.next=43;break}return O.next=37,Q(k,"getAutosave");case 37:l=O.sent,i=Object(f.a)({},Object(v.pick)(r,["title","content","excerpt"]),l,i),a+="/autosaves",u="POST",O.next=47;break;case 43:return O.next=45,$("core/notices","removeNotice",S);case 45:return O.next=47,$("core/notices","removeNotice","autosave-exists");case 47:return O.prev=47,O.next=50,G({path:a,method:u,data:i});case 50:return d=O.sent,p=n?"resetAutosave":"resetPost",O.next=54,$(k,p,d);case 54:return O.next=56,$(k,"__experimentalRequestPostUpdateSuccess",{previousPost:r,post:d,options:e,postType:c,isRevision:d.id!==r.id});case 56:if(!((h=J({previousPost:r,post:d,postType:c,options:e})).length>0)){O.next=60;break}return O.next=60,$.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(x.a)(h)));case 60:O.next=70;break;case 62:return O.prev=62,O.t0=O.catch(47),O.next=66,$(k,"__experimentalRequestPostUpdateFailure",{post:r,edits:t,error:O.t0,options:e});case 66:if(!((b=ee({post:r,edits:t,error:O.t0})).length>0)){O.next=70;break}return O.next=70,$.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(b)));case 70:case"end":return O.stop()}},ne,this,[[47,62]])}function ve(){var e,t,n,r;return W.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Q(k,"getCurrentPost");case 2:return e=o.sent,o.next=5,Q(k,"getCurrentPostType");case 5:return t=o.sent,o.next=8,Y("core","getPostType",t);case 8:return n=o.sent,o.next=11,G({path:"/wp/v2/".concat(n.rest_base,"/").concat(e.id)+"?context=edit&_timestamp=".concat(Date.now())});case 11:return r=o.sent,o.next=14,$(k,"resetPost",r);case 14:case"end":return o.stop()}},re,this)}function Oe(){var e,t,n;return W.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Q(k,"getCurrentPostType");case 2:return e=r.sent,r.next=5,Y("core","getPostType",e);case 5:return t=r.sent,r.next=8,$("core/notices","removeNotice",P);case 8:return r.prev=8,r.next=11,Q(k,"getCurrentPost");case 11:return n=r.sent,r.next=14,G({path:"/wp/v2/".concat(t.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,$(k,"resetPost",Object(f.a)({},n,{status:"trash"}));case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,$.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(te({error:r.t0}))));case 22:case"end":return r.stop()}},oe,this,[[8,18]])}function ge(e){return W.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$(k,"savePost",Object(f.a)({isAutosave:!0},e));case 2:case"end":return t.stop()}},ie,this)}function je(){return{type:"REDO"}}function ye(){return{type:"UNDO"}}function _e(){return{type:"CREATE_UNDO_LEVEL"}}function ke(e){return{type:"UPDATE_POST_LOCK",lock:e}}function Ee(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function Se(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function Pe(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function we(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function Te(e,t){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:e,title:t}}function Ce(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function xe(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(v.castArray)(e)}}function Be(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Ae(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Ie(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Le(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Re(e){return{type:"RESET_EDITOR_BLOCKS",blocks:e,shouldCreateUndoLevel:!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).__unstableShouldCreateUndoLevel}}function Ue(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var Ne=function(e){return W.a.mark(function t(){var n,r,o,i=arguments;return W.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(n=i.length,r=new Array(n),o=0;o<n;o++)r[o]=i[o];return t.next=3,$.apply(void 0,["core/block-editor",e].concat(r));case 3:case"end":return t.stop()}},t,this)})},De=Ne("resetBlocks"),Fe=Ne("receiveBlocks"),Me=Ne("updateBlock"),Ve=Ne("updateBlockAttributes"),ze=Ne("selectBlock"),Ke=Ne("startMultiSelect"),We=Ne("stopMultiSelect"),qe=Ne("multiSelect"),He=Ne("clearSelectedBlock"),Ge=Ne("toggleSelection"),Qe=Ne("replaceBlocks"),Ye=Ne("moveBlocksDown"),$e=Ne("moveBlocksUp"),Xe=Ne("moveBlockToPosition"),Ze=Ne("insertBlock"),Je=Ne("insertBlocks"),et=Ne("showInsertionPoint"),tt=Ne("hideInsertionPoint"),nt=Ne("setTemplateValidity"),rt=Ne("synchronizeTemplate"),ot=Ne("mergeBlocks"),it=Ne("removeBlocks"),st=Ne("removeBlock"),ct=Ne("toggleBlockMode"),at=Ne("startTyping"),ut=Ne("stopTyping"),lt=Ne("enterFormattedText"),dt=Ne("exitFormattedText"),pt=Ne("insertDefaultBlock"),ft=Ne("updateBlockListSettings"),ht=n(43),bt=n(31),mt=n(49),vt=n(60),Ot={};function gt(e){return e.editor.past.length>0}function jt(e){return e.editor.future.length>0}function yt(e){return"auto-draft"===St(e).status}function _t(e){return e.editor.present.blocks.isDirty||"content"in e.editor.present.edits}function kt(e){return!!_t(e)||(Object.keys(e.editor.present.edits).length>0||fn(e,kt))}function Et(e){return!kt(e)&&yt(e)}function St(e){return e.currentPost}function Pt(e){return e.currentPost.type}function wt(e){return St(e).id||null}function Tt(e){return Object(v.get)(St(e),["_links","version-history",0,"count"],0)}function Ct(e){return Object(v.get)(St(e),["_links","predecessor-version",0,"id"],null)}var xt=Object(bt.a)(function(e){return Object(f.a)({},e.initialEdits,e.editor.present.edits)},function(e){return[e.editor.present.edits,e.initialEdits]}),Bt=Object(bt.a)(function(){return[]},function(e){return[e.editor]});function At(e,t){var n=St(e);if(n.hasOwnProperty(t))return n[t]}var It=Object(bt.a)(function(e,t){var n=xt(e);return n.hasOwnProperty(t)?Object(f.a)({},At(e,t),n[t]):At(e,t)},function(e,t){return[Object(v.get)(e.editor.present.edits,[t],Ot),Object(v.get)(e.currentPost,[t],Ot)]});function Lt(e,t){switch(t){case"content":return nn(e)}var n=xt(e);return n.hasOwnProperty(t)?_.has(t)?It(e,t):n[t]:At(e,t)}function Rt(e,t){if(!qt(e))return null;var n=Wt(e);return n.hasOwnProperty(t)?n[t]:void 0}function Ut(e){return"private"===Lt(e,"status")?"private":Lt(e,"password")?"password":"public"}function Nt(e){return"pending"===St(e).status}function Dt(e){var t=St(e);return-1!==["publish","private"].indexOf(t.status)||"future"===t.status&&!Object(mt.isInTheFuture)(new Date(Number(Object(mt.getDate)(t.date))-T))}function Ft(e){return"future"===St(e).status&&!Dt(e)}function Mt(e){var t=St(e);return kt(e)||-1===["publish","private","future"].indexOf(t.status)}function Vt(e){return!Qt(e)&&(!!Lt(e,"title")||!!Lt(e,"excerpt")||!zt(e))}function zt(e){var t=e.editor.present.blocks.value;if(t.length&&!("content"in xt(e))){if(t.length>1)return!1;var n=t[0].name;if(n!==Object(s.getDefaultBlockName)()&&n!==Object(s.getFreeformContentHandlerName)())return!1}return!nn(e)}function Kt(e){if(!Vt(e))return!1;if(!qt(e))return!0;if(_t(e))return!0;var t=Wt(e);return["title","excerpt"].some(function(n){return t[n]!==Lt(e,n)})}function Wt(e){return e.autosave}function qt(e){return!!Wt(e)}function Ht(e){var t=Lt(e,"date"),n=new Date(Number(Object(mt.getDate)(t))-T);return Object(mt.isInTheFuture)(n)}function Gt(e){var t=Lt(e,"date"),n=Lt(e,"modified"),r=Lt(e,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&t===n}function Qt(e){return e.saving.requesting}function Yt(e){return e.saving.successful}function $t(e){return!!e.saving.error}function Xt(e){return Qt(e)&&!!e.saving.options.isAutosave}function Zt(e){return Qt(e)&&!!e.saving.options.isPreview}function Jt(e){var t=Lt(e,"featured_media"),n=e.previewLink;return n&&t?Object(O.addQueryArgs)(n,{_thumbnail_id:t}):n}function en(e){var t,n=e.editor.present.blocks.value;switch(1===n.length&&(t=n[0].name),2===n.length&&"core/paragraph"===n[1].name&&(t=n[0].name),t){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":case"core-embed/youtube":case"core-embed/vimeo":return"video";case"core/audio":case"core-embed/spotify":case"core-embed/soundcloud":return"audio"}return null}function tn(e){var t=e.editor.present.blocks.value;return 1===t.length&&Object(s.isUnmodifiedDefaultBlock)(t[0])?[]:t}var nn=Object(bt.a)(function(e){var t=xt(e);if("content"in t)return t.content;var n=tn(e),r=Object(s.serialize)(n);return 1===n.length&&n[0].name===Object(s.getFreeformContentHandlerName)()?Object(vt.removep)(r):r},function(e){return[e.editor.present.blocks.value,e.editor.present.edits.content,e.initialEdits.content]}),rn=Object(bt.a)(function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return Object(f.a)({},n,{id:r?t:+t,isTemporary:r})},function(e,t){return[e.reusableBlocks.data[t]]});function on(e,t){return e.reusableBlocks.isSaving[t]||!1}function sn(e,t){return!!e.reusableBlocks.isFetching[t]}var cn=Object(bt.a)(function(e){return Object(v.map)(e.reusableBlocks.data,function(t,n){return rn(e,n)})},function(e){return[e.reusableBlocks.data]});function an(e,t){var n=Object(v.find)(e.optimist,function(e){return e.beforeState&&Object(v.get)(e.action,["optimist","id"])===t});return n?n.beforeState:null}function un(e){if(!Qt(e))return!1;if(!Dt(e))return!1;var t=an(e,E);return!!t&&!Dt(t)}function ln(e){var t=Lt(e,"permalink_template");return w.test(t)}function dn(e){var t=pn(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return ln(e)?n+r+o:n}function pn(e){var t=Lt(e,"permalink_template");if(!t)return null;var n=Lt(e,"slug")||Lt(e,"generated_slug"),r=t.split(w),o=Object(d.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function fn(e,t){var n=e.optimist;return!!n&&n.some(function(e){var n=e.beforeState;return n&&t(n)})}function hn(e){return e.postLock.isLocked}function bn(e){return Object.keys(e.postSavingLock).length>0}function mn(e){return e.postLock.isTakeover}function vn(e){return e.postLock.user}function On(e){return e.postLock.activePostLock}function gn(e){return Object(v.has)(St(e),["_links","wp:action-unfiltered-html"])}function jn(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:g.isPublishSidebarEnabled}function yn(e){return e.editor.present.blocks.value}function _n(e){return e.isReady}function kn(e){return e.editorSettings}function En(e){return Object(l.createRegistrySelector)(function(t){return function(n){for(var r,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return(r=t("core/block-editor"))[e].apply(r,i)}})}var Sn=En("getBlockDependantsCacheBust"),Pn=En("getBlockName"),wn=En("isBlockValid"),Tn=En("getBlockAttributes"),Cn=En("getBlock"),xn=En("getBlocks"),Bn=En("__unstableGetBlockWithoutInnerBlocks"),An=En("getClientIdsOfDescendants"),In=En("getClientIdsWithDescendants"),Ln=En("getGlobalBlockCount"),Rn=En("getBlocksByClientId"),Un=En("getBlockCount"),Nn=En("getBlockSelectionStart"),Dn=En("getBlockSelectionEnd"),Fn=En("getSelectedBlockCount"),Mn=En("hasSelectedBlock"),Vn=En("getSelectedBlockClientId"),zn=En("getSelectedBlock"),Kn=En("getBlockRootClientId"),Wn=En("getBlockHierarchyRootClientId"),qn=En("getAdjacentBlockClientId"),Hn=En("getPreviousBlockClientId"),Gn=En("getNextBlockClientId"),Qn=En("getSelectedBlocksInitialCaretPosition"),Yn=En("getMultiSelectedBlockClientIds"),$n=En("getMultiSelectedBlocks"),Xn=En("getFirstMultiSelectedBlockClientId"),Zn=En("getLastMultiSelectedBlockClientId"),Jn=En("isFirstMultiSelectedBlock"),er=En("isBlockMultiSelected"),tr=En("isAncestorMultiSelected"),nr=En("getMultiSelectedBlocksStartClientId"),rr=En("getMultiSelectedBlocksEndClientId"),or=En("getBlockOrder"),ir=En("getBlockIndex"),sr=En("isBlockSelected"),cr=En("hasSelectedInnerBlock"),ar=En("isBlockWithinSelection"),ur=En("hasMultiSelection"),lr=En("isMultiSelecting"),dr=En("isSelectionEnabled"),pr=En("getBlockMode"),fr=En("isTyping"),hr=En("isCaretWithinFormattedText"),br=En("getBlockInsertionPoint"),mr=En("isBlockInsertionPointVisible"),vr=En("isValidTemplate"),Or=En("getTemplate"),gr=En("getTemplateLock"),jr=En("canInsertBlockType"),yr=En("getInserterItems"),_r=En("hasInserterItems"),kr=En("getBlockListSettings"),Er=function(){var e=Object(ht.a)(W.a.mark(function e(t,n){var r,o,i,c,a;return W.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,o=n.dispatch,e.next=4,H()({path:"/wp/v2/types/wp_block"});case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:if(e.prev=7,!r){e.next=15;break}return e.next=11,H()({path:"/wp/v2/".concat(i.rest_base,"/").concat(r)});case 11:e.t0=e.sent,c=[e.t0],e.next=18;break;case 15:return e.next=17,H()({path:"/wp/v2/".concat(i.rest_base,"?per_page=-1")});case 17:c=e.sent;case 18:(a=Object(v.compact)(Object(v.map)(c,function(e){if("publish"!==e.status||e.content.protected)return null;var t=Object(s.parse)(e.content.raw);return{reusableBlock:{id:e.id,title:I(e.title)},parsedBlock:1===t.length?t[0]:Object(s.createBlock)("core/template",{},t)}}))).length&&o(Se(a)),o({type:"FETCH_REUSABLE_BLOCKS_SUCCESS",id:r}),e.next=26;break;case 23:e.prev=23,e.t1=e.catch(7),o({type:"FETCH_REUSABLE_BLOCKS_FAILURE",id:r,error:e.t1});case 26:case"end":return e.stop()}},e,this,[[7,23]])}));return function(t,n){return e.apply(this,arguments)}}(),Sr=function(){var e=Object(ht.a)(W.a.mark(function e(t,n){var r,o,i,c,a,u,d,p,f,h,b,m,v,O,g;return W.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H()({path:"/wp/v2/types/wp_block"});case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:return o=t.id,i=n.dispatch,c=n.getState(),a=rn(c,o),u=a.clientId,d=a.title,p=a.isTemporary,f=Object(l.select)("core/block-editor").getBlock(u),h=Object(s.serialize)("core/template"===f.name?f.innerBlocks:f),b=p?{title:d,content:h,status:"publish"}:{id:o,title:d,content:h,status:"publish"},m=p?"/wp/v2/".concat(r.rest_base):"/wp/v2/".concat(r.rest_base,"/").concat(o),v=p?"POST":"PUT",e.prev=14,e.next=17,H()({path:m,data:b,method:v});case 17:O=e.sent,i({type:"SAVE_REUSABLE_BLOCK_SUCCESS",updatedId:O.id,id:o}),g=p?Object(Z.__)("Block created."):Object(Z.__)("Block updated."),Object(l.dispatch)("core/notices").createSuccessNotice(g,{id:"REUSABLE_BLOCK_NOTICE_ID"}),Object(l.dispatch)("core/block-editor").__unstableSaveReusableBlock(o,O.id),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(14),i({type:"SAVE_REUSABLE_BLOCK_FAILURE",id:o}),Object(l.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return e.stop()}},e,this,[[14,24]])}));return function(t,n){return e.apply(this,arguments)}}(),Pr=function(){var e=Object(ht.a)(W.a.mark(function e(t,n){var r,o,i,c,a,u,d,p,f,h;return W.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H()({path:"/wp/v2/types/wp_block"});case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:if(o=t.id,i=n.getState,c=n.dispatch,(a=rn(i(),o))&&!a.isTemporary){e.next=10;break}return e.abrupt("return");case 10:return u=Object(l.select)("core/block-editor").getBlocks(),d=u.filter(function(e){return Object(s.isReusableBlock)(e)&&e.attributes.ref===o}),p=d.map(function(e){return e.clientId}),f=Object(v.uniqueId)(),c({type:"REMOVE_REUSABLE_BLOCK",id:o,optimist:{type:b.BEGIN,id:f}}),Object(l.dispatch)("core/block-editor").removeBlocks([].concat(Object(x.a)(p),[a.clientId])),e.prev=16,e.next=19,H()({path:"/wp/v2/".concat(r.rest_base,"/").concat(o),method:"DELETE"});case 19:c({type:"DELETE_REUSABLE_BLOCK_SUCCESS",id:o,optimist:{type:b.COMMIT,id:f}}),h=Object(Z.__)("Block deleted."),Object(l.dispatch)("core/notices").createSuccessNotice(h,{id:"REUSABLE_BLOCK_NOTICE_ID"}),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(16),c({type:"DELETE_REUSABLE_BLOCK_FAILURE",id:o,optimist:{type:b.REVERT,id:f}}),Object(l.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return e.stop()}},e,this,[[16,24]])}));return function(t,n){return e.apply(this,arguments)}}(),wr={SETUP_EDITOR:function(e){var t,n=e.post,r=e.edits,o=e.template;t=Object(v.has)(r,["content"])?r.content:n.content.raw;var i=Object(s.parse)(t);return"auto-draft"===n.status&&o&&(i=Object(s.synchronizeBlocksWithTemplate)(i,o)),[Re(i),fe(n)]},FETCH_REUSABLE_BLOCKS:function(e,t){Er(e,t)},SAVE_REUSABLE_BLOCK:function(e,t){Sr(e,t)},DELETE_REUSABLE_BLOCK:function(e,t){Pr(e,t)},RECEIVE_REUSABLE_BLOCKS:function(e){Object(l.dispatch)("core/block-editor").receiveBlocks(Object(v.map)(e.results,"parsedBlock"))},CONVERT_BLOCK_TO_STATIC:function(e,t){var n,r=t.getState(),o=Object(l.select)("core/block-editor").getBlock(e.clientId),i=rn(r,o.attributes.ref),c=Object(l.select)("core/block-editor").getBlock(i.clientId);n="core/template"===c.name?c.innerBlocks.map(function(e){return Object(s.cloneBlock)(e)}):[Object(s.cloneBlock)(c)],Object(l.dispatch)("core/block-editor").replaceBlocks(o.clientId,n)},CONVERT_BLOCK_TO_REUSABLE:function(e,t){var n,r=t.dispatch;1===e.clientIds.length?n=Object(l.select)("core/block-editor").getBlock(e.clientIds[0]):(n=Object(s.createBlock)("core/template",{},Object(l.select)("core/block-editor").getBlocksByClientId(e.clientIds)),Object(l.dispatch)("core/block-editor").receiveBlocks([n]));var o={id:Object(v.uniqueId)("reusable"),clientId:n.clientId,title:Object(Z.__)("Untitled Reusable Block")};r(Se([{reusableBlock:o,parsedBlock:n}])),r(Pe(o.id)),Object(l.dispatch)("core/block-editor").replaceBlocks(e.clientIds,Object(s.createBlock)("core/block",{ref:o.id})),Object(l.dispatch)("core/block-editor").receiveBlocks([n])}};var Tr=function(e){var t,n=[M()(wr),z.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map(function(e){return e(o)}),r=v.flowRight.apply(void 0,Object(x.a)(t))(e.dispatch),e.dispatch=r,e},Cr=Object(l.registerStore)(k,{reducer:D,selectors:o,actions:r,controls:X,persist:["preferences"]});Tr(Cr);var xr=n(25),Br=n(0);function Ar(){return Object(l.select)("core/block-editor").getBlockInsertionPoint().rootClientId}function Ir(e){return Object(l.select)("core/block-editor").getInserterItems(e)}function Lr(){var e=Object(l.select)("core/block-editor"),t=e.getSelectedBlockClientId,n=e.getBlockName,r=t();return r?n(r):null}var Rr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getBlockInsertionParentClientId,n=void 0===t?Ar:t,r=e.getInserterItems,o=void 0===r?Ir:r,c=e.getSelectedBlockName,a=void 0===c?Lr:c;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){var e=a();return o(n()).filter(function(t){return e!==t.name})},getOptionKeywords:function(e){var t=e.title,n=e.keywords,r=void 0===n?[]:n;return[e.category].concat(Object(x.a)(r),[t])},getOptionLabel:function(e){var t=e.icon,n=e.title;return[Object(Br.createElement)(i.BlockIcon,{key:"icon",icon:t,showColors:!0}),n]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes;return{action:"replace",value:Object(s.createBlock)(t,n)}},isOptionDisabled:function(e){return e.isDisabled}}}(),Ur={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),H()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[Object(Br.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}),Object(Br.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(Br.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}},Nr=n(19),Dr=n(21),Fr=n(4),Mr=function(e){var t=e.urlQueryArgs,n=void 0===t?{}:t,r=Object(Dr.a)(e,["urlQueryArgs"]),o=Object(l.select)("core/editor").getCurrentPostId;return n=Object(f.a)({post_id:o()},n),Object(Br.createElement)(Fr.ServerSideRender,Object(Nr.a)({urlQueryArgs:n},r))},Vr=n(10),zr=n(9),Kr=n(11),Wr=n(13),qr=n(12),Hr=n(6),Gr=function(e){function t(){return Object(Vr.a)(this,t),Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDirty,r=t.editsReference,o=t.isAutosaveable,i=t.isAutosaving;r!==e.editsReference&&(this.didAutosaveForEditsReference=!1),!i&&e.isAutosaving&&(this.didAutosaveForEditsReference=!0),e.isDirty===n&&e.isAutosaveable===o&&e.editsReference===r||this.toggleTimer(n&&o&&!this.didAutosaveForEditsReference)}},{key:"componentWillUnmount",value:function(){this.toggleTimer(!1)}},{key:"toggleTimer",value:function(e){var t=this;clearTimeout(this.pendingSave);var n=this.props.autosaveInterval;e&&(this.pendingSave=setTimeout(function(){return t.props.autosave()},1e3*n))}},{key:"render",value:function(){return null}}]),t}(Br.Component),Qr=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostDirty,r=t.isEditedPostAutosaveable,o=t.getReferenceByDistinctEdits,i=t.isAutosavingPost,s=e("core/editor").getEditorSettings().autosaveInterval;return{isDirty:n(),isAutosaveable:r(),editsReference:o(),isAutosaving:i(),autosaveInterval:s}}),Object(l.withDispatch)(function(e){return{autosave:e("core/editor").autosave}})])(Gr),Yr=n(16),$r=n.n(Yr),Xr=function(e){var t=e.children,n=e.isValid,r=e.level,o=e.path,s=void 0===o?[]:o,c=e.href,a=e.onSelect;return Object(Br.createElement)("li",{className:$r()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(Br.createElement)("a",{href:c,className:"document-outline__button",onClick:a},Object(Br.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),s.map(function(e,t){var n=e.clientId;return Object(Br.createElement)("strong",{key:t,className:"document-outline__level"},Object(Br.createElement)(i.BlockTitle,{clientId:n}))}),Object(Br.createElement)("strong",{className:"document-outline__level"},r),Object(Br.createElement)("span",{className:"document-outline__item-content"},t)))},Zr=Object(Br.createElement)("em",null,Object(Z.__)("(Empty heading)")),Jr=[Object(Br.createElement)("br",{key:"incorrect-break"}),Object(Br.createElement)("em",{key:"incorrect-message"},Object(Z.__)("(Incorrect heading level)"))],eo=[Object(Br.createElement)("br",{key:"incorrect-break-h1"}),Object(Br.createElement)("em",{key:"incorrect-message-h1"},Object(Z.__)("(Your theme may already use a H1 for the post title)"))],to=[Object(Br.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(Br.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(Z.__)("(Multiple H1 headings are not recommended)"))],no=function(e){return!e.attributes.content||0===e.attributes.content.length},ro=Object(Hr.compose)(Object(l.withSelect)(function(e){var t=e("core/block-editor").getBlocks,n=e("core/editor").getEditedPostAttribute,r=(0,e("core").getPostType)(n("type"));return{title:n("title"),blocks:t(),isTitleSupported:Object(v.get)(r,["supports","title"],!1)}}))(function(e){var t=e.blocks,n=void 0===t?[]:t,r=e.title,o=e.onSelect,i=e.isTitleSupported,s=e.hasOutlineItemsDisabled,c=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(v.flatMap)(t,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Object(f.a)({},t,{path:n,level:t.attributes.level,isEmpty:no(t)}):e(t.innerBlocks,[].concat(Object(x.a)(n),[t]))})}(n);if(c.length<1)return null;var u=1,l=document.querySelector(".editor-post-title__input"),d=i&&r&&l,p=Object(v.countBy)(c,"level")[1]>1;return Object(Br.createElement)("div",{className:"document-outline"},Object(Br.createElement)("ul",null,d&&Object(Br.createElement)(Xr,{level:Object(Z.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(l.id),isDisabled:s},r),c.map(function(e,t){var n=e.level>u+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(p||d));return u=e.level,Object(Br.createElement)(Xr,{key:t,level:"H".concat(e.level),isValid:r,path:e.path,isDisabled:s,href:"#block-".concat(e.clientId),onSelect:o},e.isEmpty?Zr:Object(a.getTextContent)(Object(a.create)({html:e.attributes.content})),n&&Jr,1===e.level&&p&&to,d&&1===e.level&&!p&&eo)})))});var oo=Object(l.withSelect)(function(e){return{blocks:e("core/block-editor").getBlocks()}})(function(e){var t=e.blocks,n=e.children;return Object(v.filter)(t,function(e){return"core/heading"===e.name}).length<1?null:n}),io=n(3),so=n(18),co=n(48),ao=n.n(co);var uo=Object(Hr.compose)([Object(l.withSelect)(function(e){return{isDirty:(0,e("core/editor").isEditedPostDirty)()}}),Object(l.withDispatch)(function(e,t,n){var r=n.select,o=e("core/editor").savePost;return{onSave:function(){(0,r("core/editor").isEditedPostDirty)()&&o()}}})])(function(e){var t=e.onSave;return Object(Br.createElement)(Fr.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(p.a)({},so.rawShortcut.primary("s"),function(e){e.preventDefault(),t()})})}),lo=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).undoOrRedo=e.undoOrRedo.bind(Object(io.a)(Object(io.a)(e))),e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"undoOrRedo",value:function(e){var t=this.props,n=t.onRedo,r=t.onUndo;e.shiftKey?n():r(),e.preventDefault()}},{key:"render",value:function(){var e;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(Br.createElement)(Fr.KeyboardShortcuts,{shortcuts:(e={},Object(p.a)(e,so.rawShortcut.primary("z"),this.undoOrRedo),Object(p.a)(e,so.rawShortcut.primaryShift("z"),this.undoOrRedo),e)}),Object(Br.createElement)(uo,null))}}]),t}(Br.Component),po=Object(l.withDispatch)(function(e){var t=e("core/editor");return{onRedo:t.redo,onUndo:t.undo}})(lo),fo=po;function ho(){return ao()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(Br.createElement)(po,null)}function bo(){return Object(Br.createElement)(uo,null)}var mo=Object(Hr.compose)([Object(l.withSelect)(function(e){return{hasRedo:e("core/editor").hasEditorRedo()}}),Object(l.withDispatch)(function(e){return{redo:e("core/editor").redo}})])(function(e){var t=e.hasRedo,n=e.redo;return Object(Br.createElement)(Fr.IconButton,{icon:"redo",label:Object(Z.__)("Redo"),shortcut:so.displayShortcut.primaryShift("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__redo"})});var vo=Object(Hr.compose)([Object(l.withSelect)(function(e){return{hasUndo:e("core/editor").hasEditorUndo()}}),Object(l.withDispatch)(function(e){return{undo:e("core/editor").undo}})])(function(e){var t=e.hasUndo,n=e.undo;return Object(Br.createElement)(Fr.IconButton,{icon:"undo",label:Object(Z.__)("Undo"),shortcut:so.displayShortcut.primary("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__undo"})});var Oo=Object(Hr.compose)([Object(l.withSelect)(function(e){return{isValid:e("core/block-editor").isValidTemplate()}}),Object(l.withDispatch)(function(e){var t=e("core/block-editor"),n=t.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:t.synchronizeTemplate}})])(function(e){var t=e.isValid,n=Object(Dr.a)(e,["isValid"]);return t?null:Object(Br.createElement)(Fr.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(Br.createElement)("p",null,Object(Z.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(Br.createElement)("div",null,Object(Br.createElement)(Fr.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(Z.__)("Keep it as is")),Object(Br.createElement)(Fr.Button,{onClick:function(){window.confirm(Object(Z.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(Z.__)("Reset the template"))))});var go=Object(Hr.compose)([Object(l.withSelect)(function(e){return{notices:e("core/notices").getNotices()}}),Object(l.withDispatch)(function(e){return{onRemove:e("core/notices").removeNotice}})])(function(e){var t=e.dismissible,n=e.notices,r=Object(Dr.a)(e,["dismissible","notices"]);return void 0!==t&&(n=Object(v.filter)(n,{isDismissible:t})),Object(Br.createElement)(Fr.NoticeList,Object(Nr.a)({notices:n},r),!1!==t&&Object(Br.createElement)(Oo,null))}),jo=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).reboot=e.reboot.bind(Object(io.a)(Object(io.a)(e))),e.getContent=e.getContent.bind(Object(io.a)(Object(io.a)(e))),e.state={error:null},e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidCatch",value:function(e){this.setState({error:e})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(l.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(Br.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(Br.createElement)(Fr.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(Z.__)("Attempt Recovery")),Object(Br.createElement)(Fr.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(Z.__)("Copy Post Text")),Object(Br.createElement)(Fr.ClipboardButton,{key:"copy-error",text:e.stack,isLarge:!0},Object(Z.__)("Copy Error"))]},Object(Z.__)("The editor has encountered an unexpected error.")):this.props.children}}]),t}(Br.Component);var yo=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=e("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}})(function(e){var t=e.availableTemplates,n=e.postType,r=e.children;return!Object(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(t)?null:r});var _o=Object(l.withSelect)(function(e){var t=e("core/editor").getEditedPostAttribute;return{postType:(0,e("core").getPostType)(t("type"))}})(function(e){var t=e.postType,n=e.children,r=e.supportKeys,o=!0;return t&&(o=Object(v.some)(Object(v.castArray)(r),function(e){return!!t.supports[e]})),o?n:null}),ko=Object(Hr.withState)({orderInput:null})(function(e){var t=e.onUpdateOrder,n=e.order,r=void 0===n?0:n,o=e.orderInput,i=e.setState,s=null===o?r:o;return Object(Br.createElement)(Fr.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(Z.__)("Order"),value:s,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(v.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})});var Eo=Object(Hr.compose)([Object(l.withSelect)(function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}}),Object(l.withDispatch)(function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}})])(function(e){return Object(Br.createElement)(_o,{supportKeys:"page-attributes"},Object(Br.createElement)(ko,e))});function So(e){var t=e.map(function(e){return Object(f.a)({children:[],parent:null},e)}),n=Object(v.groupBy)(t,"parent");if(n.null&&n.null.length)return t;return function e(t){return t.map(function(t){var r=n[t.id];return Object(f.a)({},t,{children:r&&r.length?e(r):[]})})}(n[0]||[])}var Po=Object(l.withSelect)(function(e){var t=e("core"),n=t.getPostType,r=t.getEntityRecords,o=e("core/editor"),i=o.getCurrentPostId,s=o.getEditedPostAttribute,c=s("type"),a=n(c),u=i(),l=Object(v.get)(a,["hierarchical"],!1),d={per_page:-1,exclude:u,parent_exclude:u,orderby:"menu_order",order:"asc"};return{parent:s("parent"),items:l?r("postType",c,d):[],postType:a}}),wo=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateParent:function(e){t({parent:e||0})}}}),To=Object(Hr.compose)([Po,wo])(function(e){var t=e.parent,n=e.postType,r=e.items,o=e.onUpdateParent,i=Object(v.get)(n,["hierarchical"],!1),s=Object(v.get)(n,["labels","parent_item_colon"]),c=r||[];if(!i||!s||!c.length)return null;var a=So(c.map(function(e){return{id:e.id,parent:e.parent,name:e.title.raw?e.title.raw:"#".concat(e.id," (").concat(Object(Z.__)("no title"),")")}}));return Object(Br.createElement)(Fr.TreeSelect,{className:"editor-page-attributes__parent",label:s,noOptionLabel:"(".concat(Object(Z.__)("no parent"),")"),tree:a,selectedId:t,onChange:o})});var Co=Object(Hr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(l.withDispatch)(function(e){return{onUpdate:function(t){e("core/editor").editPost({template:t||""})}}}))(function(e){var t=e.availableTemplates,n=e.selectedTemplate,r=e.onUpdate;return Object(v.isEmpty)(t)?null:Object(Br.createElement)(Fr.SelectControl,{label:Object(Z.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(v.map)(t,function(e,t){return{value:t,label:e}})})});var xo=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(v.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}}),Hr.withInstanceId])(function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||n.length<2?null:Object(Br.createElement)(_o,{supportKeys:"author"},r)}),Bo=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).setAuthorId=e.setAuthorId.bind(Object(io.a)(Object(io.a)(e))),e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"setAuthorId",value:function(e){var t=this.props.onUpdateAuthor,n=e.target.value;t(Number(n))}},{key:"render",value:function(){var e=this.props,t=e.postAuthor,n=e.instanceId,r=e.authors,o="post-author-selector-"+n;return Object(Br.createElement)(xo,null,Object(Br.createElement)("label",{htmlFor:o},Object(Z.__)("Author")),Object(Br.createElement)("select",{id:o,value:t,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(e){return Object(Br.createElement)("option",{key:e.id,value:e.id},e.name)})))}}]),t}(Br.Component),Ao=Object(Hr.compose)([Object(l.withSelect)(function(e){return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:e("core").getAuthors()}}),Object(l.withDispatch)(function(e){return{onUpdateAuthor:function(t){e("core/editor").editPost({author:t})}}}),Hr.withInstanceId])(Bo);var Io=Object(Hr.compose)([Object(l.withSelect)(function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(Dr.a)(e,["commentStatus"]);return Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Lo=Object(Hr.compose)([Object(l.withSelect)(function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}}),Object(l.withDispatch)(function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}})])(function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(Br.createElement)("div",{className:"editor-post-excerpt"},Object(Br.createElement)(Fr.TextareaControl,{label:Object(Z.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(Br.createElement)(Fr.ExternalLink,{href:Object(Z.__)("https://codex.wordpress.org/Excerpt")},Object(Z.__)("Learn more about manual excerpts")))});var Ro=function(e){return Object(Br.createElement)(_o,Object(Nr.a)({},e,{supportKeys:"excerpt"}))};var Uo=Object(l.withSelect)(function(e){var t=e("core").getThemeSupports;return{postType:(0,e("core/editor").getEditedPostAttribute)("type"),themeSupports:t()}})(function(e){var t=e.themeSupports,n=e.children,r=e.postType,o=e.supportKeys;return Object(v.some)(Object(v.castArray)(o),function(e){var n=Object(v.get)(t,[e],!1);return"post-thumbnails"===e&&Object(v.isArray)(n)?Object(v.includes)(n,r):n})?n:null});var No=function(e){return Object(Br.createElement)(Uo,{supportKeys:"post-thumbnails"},Object(Br.createElement)(_o,Object(Nr.a)({},e,{supportKeys:"thumbnail"})))},Do=["image"],Fo=Object(Z.__)("Featured Image"),Mo=Object(Z.__)("Set featured image"),Vo=Object(Z.__)("Remove image");var zo=Object(l.withSelect)(function(e){var t=e("core"),n=t.getMedia,r=t.getPostType,o=e("core/editor"),i=o.getCurrentPostId,s=o.getEditedPostAttribute,c=s("featured_media");return{media:c?n(c):null,currentPostId:i(),postType:r(s("type")),featuredImageId:c}}),Ko=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateImage:function(e){t({featured_media:e.id})},onRemoveImage:function(){t({featured_media:0})}}}),Wo=Object(Hr.compose)(zo,Ko,Object(Fr.withFilters)("editor.PostFeaturedImage"))(function(e){var t,n,r,o=e.currentPostId,s=e.featuredImageId,c=e.onUpdateImage,a=e.onRemoveImage,u=e.media,l=e.postType,d=Object(v.get)(l,["labels"],{}),p=Object(Br.createElement)("p",null,Object(Z.__)("To edit the featured image, you need permission to upload media."));if(u){var f=Object(xr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",u.id,o);Object(v.has)(u,["media_details","sizes",f])?(t=u.media_details.sizes[f].width,n=u.media_details.sizes[f].height,r=u.media_details.sizes[f].source_url):(t=u.media_details.width,n=u.media_details.height,r=u.source_url)}return Object(Br.createElement)(No,null,Object(Br.createElement)("div",{className:"editor-post-featured-image"},Object(Br.createElement)(i.MediaUploadCheck,{fallback:p},Object(Br.createElement)(i.MediaUpload,{title:d.featured_image||Fo,onSelect:c,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(e){var o=e.open;return Object(Br.createElement)(Fr.Button,{className:s?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:o,"aria-label":s?Object(Z.__)("Edit or update the image"):null},!!s&&u&&Object(Br.createElement)(Fr.ResponsiveWrapper,{naturalWidth:t,naturalHeight:n},Object(Br.createElement)("img",{src:r,alt:""})),!!s&&!u&&Object(Br.createElement)(Fr.Spinner,null),!s&&(d.set_featured_image||Mo))},value:s})),!!s&&u&&!u.isLoading&&Object(Br.createElement)(i.MediaUploadCheck,null,Object(Br.createElement)(i.MediaUpload,{title:d.featured_image||Fo,onSelect:c,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(Br.createElement)(Fr.Button,{onClick:t,isDefault:!0,isLarge:!0},Object(Z.__)("Replace image"))}})),!!s&&Object(Br.createElement)(i.MediaUploadCheck,null,Object(Br.createElement)(Fr.Button,{onClick:a,isLink:!0,isDestructive:!0},d.remove_featured_image||Vo))))});var qo=Object(l.withSelect)(function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}})(function(e){var t=e.disablePostFormats,n=Object(Dr.a)(e,["disablePostFormats"]);return!t&&Object(Br.createElement)(_o,Object(Nr.a)({},n,{supportKeys:"post-formats"}))}),Ho=[{id:"aside",caption:Object(Z.__)("Aside")},{id:"gallery",caption:Object(Z.__)("Gallery")},{id:"link",caption:Object(Z.__)("Link")},{id:"image",caption:Object(Z.__)("Image")},{id:"quote",caption:Object(Z.__)("Quote")},{id:"standard",caption:Object(Z.__)("Standard")},{id:"status",caption:Object(Z.__)("Status")},{id:"video",caption:Object(Z.__)("Video")},{id:"audio",caption:Object(Z.__)("Audio")},{id:"chat",caption:Object(Z.__)("Chat")}];var Go=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=n("format"),i=e("core").getThemeSupports();return{postFormat:o,supportedFormats:Object(v.union)([o],Object(v.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(l.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),Hr.withInstanceId])(function(e){var t=e.onUpdatePostFormat,n=e.postFormat,r=void 0===n?"standard":n,o=e.supportedFormats,i=e.suggestedFormat,s="post-format-selector-"+e.instanceId,c=Ho.filter(function(e){return Object(v.includes)(o,e.id)}),a=Object(v.find)(c,function(e){return e.id===i});return Object(Br.createElement)(qo,null,Object(Br.createElement)("div",{className:"editor-post-format"},Object(Br.createElement)("div",{className:"editor-post-format__content"},Object(Br.createElement)("label",{htmlFor:s},Object(Z.__)("Post Format")),Object(Br.createElement)(Fr.SelectControl,{value:r,onChange:function(e){return t(e)},id:s,options:c.map(function(e){return{label:e.caption,value:e.id}})})),a&&a.id!==r&&Object(Br.createElement)("div",{className:"editor-post-format__suggestion"},Object(Z.__)("Suggestion:")," ",Object(Br.createElement)(Fr.Button,{isLink:!0,onClick:function(){return t(a.id)}},a.caption))))});var Qo=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(e){var t=e.lastRevisionId,n=e.revisionsCount,r=e.children;return!t||n<2?null:Object(Br.createElement)(_o,{supportKeys:"revisions"},r)});function Yo(e,t){return Object(O.addQueryArgs)(e,t)}function $o(e){return Object(v.toLower)(Object(v.deburr)(Object(v.trim)(e.replace(/[\s\./_]+/g,"-"),"-")))}var Xo=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}})(function(e){var t=e.lastRevisionId,n=e.revisionsCount;return Object(Br.createElement)(Qo,null,Object(Br.createElement)(Fr.IconButton,{href:Yo("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(Z.sprintf)(Object(Z._n)("%d Revision","%d Revisions",n),n)))});var Zo=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).openPreviewWindow=e.openPreviewWindow.bind(Object(io.a)(Object(io.a)(e))),e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props.previewLink;t&&!e.previewLink&&this.setPreviewWindowLink(t)}},{key:"setPreviewWindowLink",value:function(e){var t=this.previewWindow;t&&!t.closed&&(t.location=e)}},{key:"getWindowTarget",value:function(){var e=this.props.postId;return"wp-preview-".concat(e)}},{key:"openPreviewWindow",value:function(e){e.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),function(e){var t=Object(Br.renderToString)(Object(Br.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(Br.createElement)(Fr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(Br.createElement)(Fr.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),Object(Br.createElement)(Fr.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),Object(Br.createElement)("p",null,Object(Z.__)("Generating preview…"))));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=Object(xr.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=Object(Z.__)("Generating preview…"),e.close()}(this.previewWindow.document)):this.setPreviewWindowLink(e.target.href)}},{key:"render",value:function(){var e=this.props,t=e.previewLink,n=e.currentPostLink,r=e.isSaveable,o=t||n;return Object(Br.createElement)(Fr.Button,{isLarge:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(Z._x)("Preview","imperative verb"),Object(Br.createElement)("span",{className:"screen-reader-text"},Object(Z.__)("(opens in a new tab)")),Object(Br.createElement)(c.DotTip,{tipId:"core/editor.preview"},Object(Z.__)("Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.")))}}]),t}(Br.Component),Jo=Object(Hr.compose)([Object(l.withSelect)(function(e,t){var n=t.forcePreviewLink,r=t.forceIsAutosaveable,o=e("core/editor"),i=o.getCurrentPostId,s=o.getCurrentPostAttribute,c=o.getEditedPostAttribute,a=o.isEditedPostSaveable,u=o.isEditedPostAutosaveable,l=o.getEditedPostPreviewLink,d=e("core").getPostType,p=l(),f=d(c("type"));return{postId:i(),currentPostLink:s("link"),previewLink:void 0!==n?n:p,isSaveable:a(),isAutosaveable:r||u(),isViewable:Object(v.get)(f,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(c("status"))}}),Object(l.withDispatch)(function(e){return{autosave:e("core/editor").autosave,savePost:e("core/editor").savePost}}),Object(Hr.ifCondition)(function(e){return e.isViewable})])(Zo),ei=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).sendPostLock=e.sendPostLock.bind(Object(io.a)(Object(io.a)(e))),e.receivePostLock=e.receivePostLock.bind(Object(io.a)(Object(io.a)(e))),e.releasePostLock=e.releasePostLock.bind(Object(io.a)(Object(io.a)(e))),e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidMount",value:function(){var e=this.getHookName();Object(xr.addAction)("heartbeat.send",e,this.sendPostLock),Object(xr.addAction)("heartbeat.tick",e,this.receivePostLock)}},{key:"componentWillUnmount",value:function(){var e=this.getHookName();Object(xr.removeAction)("heartbeat.send",e),Object(xr.removeAction)("heartbeat.tick",e)}},{key:"getHookName",value:function(){return"core/editor/post-locked-modal-"+this.props.instanceId}},{key:"sendPostLock",value:function(e){var t=this.props,n=t.isLocked,r=t.activePostLock,o=t.postId;n||(e["wp-refresh-post-lock"]={lock:r,post_id:o})}},{key:"receivePostLock",value:function(e){if(e["wp-refresh-post-lock"]){var t=this.props,n=t.autosave,r=t.updatePostLock,o=e["wp-refresh-post-lock"];o.lock_error?(n(),r({isLocked:!0,isTakeover:!0,user:{avatar:o.lock_error.avatar_src}})):o.new_lock&&r({isLocked:!1,activePostLock:o.new_lock})}}},{key:"releasePostLock",value:function(){var e=this.props,t=e.isLocked,n=e.activePostLock,r=e.postLockUtils,o=e.postId;if(!t&&n){var i=new window.FormData;i.append("action","wp-remove-post-lock"),i.append("_wpnonce",r.unlockNonce),i.append("post_ID",o),i.append("active_post_lock",n);var s=new window.XMLHttpRequest;s.open("POST",r.ajaxUrl,!1),s.send(i)}}},{key:"render",value:function(){var e=this.props,t=e.user,n=e.postId,r=e.isLocked,o=e.isTakeover,i=e.postLockUtils,s=e.postType;if(!r)return null;var c=t.name,a=t.avatar,u=Object(O.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=Yo("edit.php",{post_type:Object(v.get)(s,["slug"])}),d=Object(Z.__)("Exit the Editor");return Object(Br.createElement)(Fr.Modal,{title:o?Object(Z.__)("Someone else has taken over this post."):Object(Z.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissable:!1,className:"editor-post-locked-modal"},!!a&&Object(Br.createElement)("img",{src:a,alt:Object(Z.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,c?Object(Z.sprintf)(Object(Z.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),c):Object(Z.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Fr.Button,{isPrimary:!0,isLarge:!0,href:l},d))),!o&&Object(Br.createElement)("div",null,Object(Br.createElement)("div",null,c?Object(Z.sprintf)(Object(Z.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),c):Object(Z.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(Br.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Br.createElement)(Fr.Button,{isDefault:!0,isLarge:!0,href:l},d),Object(Br.createElement)(Jo,null),Object(Br.createElement)(Fr.Button,{isPrimary:!0,isLarge:!0,href:u},Object(Z.__)("Take Over")))))}}]),t}(Br.Component),ti=Object(Hr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isPostLocked,r=t.isPostLockTakeover,o=t.getPostLockUser,i=t.getCurrentPostId,s=t.getActivePostLock,c=t.getEditedPostAttribute,a=t.getEditorSettings,u=e("core").getPostType;return{isLocked:n(),isTakeover:r(),user:o(),postId:i(),postLockUtils:a().postLockUtils,activePostLock:s(),postType:u(c("type"))}}),Object(l.withDispatch)(function(e){var t=e("core/editor");return{autosave:t.autosave,updatePostLock:t.updatePostLock}}),Hr.withInstanceId,Object(Hr.withGlobalEvents)({beforeunload:"releasePostLock"}))(ei);var ni=Object(Hr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(v.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}}))(function(e){var t=e.hasPublishAction,n=e.isPublished,r=e.children;return n||!t?null:r});var ri=Object(Hr.compose)(Object(l.withSelect)(function(e){return{status:e("core/editor").getEditedPostAttribute("status")}}),Object(l.withDispatch)(function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}}))(function(e){var t=e.status,n=e.onUpdateStatus;return Object(Br.createElement)(ni,null,Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Pending Review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))});var oi=Object(Hr.compose)([Object(l.withSelect)(function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(Dr.a)(e,["pingStatus"]);return Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})});var ii=Object(Hr.compose)([Object(l.withSelect)(function(e,t){var n=t.forceIsSaving,r=e("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,s=r.isSavingPost,c=r.isPublishingPost,a=r.getCurrentPost,u=r.getCurrentPostType,l=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||s(),isPublishing:c(),hasPublishAction:Object(v.get)(a(),["_links","wp:action-publish"],!1),postType:u(),isAutosaving:l()}})])(function(e){var t=e.isPublished,n=e.isBeingScheduled,r=e.isSaving,o=e.isPublishing,i=e.hasPublishAction,s=e.isAutosaving;return o?Object(Z.__)("Publishing…"):t&&r&&!s?Object(Z.__)("Updating…"):n&&r&&!s?Object(Z.__)("Scheduling…"):i?t?Object(Z.__)("Update"):n?Object(Z.__)("Schedule"):Object(Z.__)("Publish"):Object(Z.__)("Submit for Review")}),si=function(e){function t(e){var n;return Object(Vr.a)(this,t),(n=Object(Kr.a)(this,Object(Wr.a)(t).call(this,e))).buttonNode=Object(Br.createRef)(),n}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var e,t=this.props,n=t.forceIsDirty,r=t.forceIsSaving,o=t.hasPublishAction,i=t.isBeingScheduled,s=t.isOpen,a=t.isPostSavingLocked,u=t.isPublishable,l=t.isPublished,d=t.isSaveable,p=t.isSaving,f=t.isToggle,h=t.onSave,b=t.onStatusChange,m=t.onSubmit,O=void 0===m?v.noop:m,g=t.onToggle,j=t.visibility,y=p||r||!d||a||!u&&!n,_=l||p||r||!d||!u&&!n;e=o?i?"future":"private"===j?"private":"publish":"pending";var k={"aria-disabled":y,className:"editor-post-publish-button",isBusy:p&&l,isLarge:!0,isPrimary:!0,onClick:function(){y||(O(),b(e),h())}},E={"aria-disabled":_,"aria-expanded":s,className:"editor-post-publish-panel__toggle",isBusy:p&&l,isPrimary:!0,onClick:function(){_||g()}},S=i?Object(Z.__)("Schedule…"):Object(Z.__)("Publish…"),P=Object(Br.createElement)(ii,{forceIsSaving:r}),w=f?E:k,T=f?S:P;return Object(Br.createElement)(Fr.Button,Object(Nr.a)({ref:this.buttonNode},w),T,Object(Br.createElement)(c.DotTip,{tipId:"core/editor.publish"},Object(Z.__)("Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.")))}}]),t}(Br.Component),ci=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isEditedPostBeingScheduled,o=t.getEditedPostVisibility,i=t.isCurrentPostPublished,s=t.isEditedPostSaveable,c=t.isEditedPostPublishable,a=t.isPostSavingLocked,u=t.getCurrentPost,l=t.getCurrentPostType;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:s(),isPostSavingLocked:a(),isPublishable:c(),isPublished:i(),hasPublishAction:Object(v.get)(u(),["_links","wp:action-publish"],!1),postType:l()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e})},onSave:t.savePost}})])(si),ai=[{value:"public",label:Object(Z.__)("Public"),info:Object(Z.__)("Visible to everyone.")},{value:"private",label:Object(Z.__)("Private"),info:Object(Z.__)("Only visible to site admins and editors.")},{value:"password",label:Object(Z.__)("Password Protected"),info:Object(Z.__)("Protected with a password you choose. Only those with the password can view this post.")}],ui=function(e){function t(e){var n;return Object(Vr.a)(this,t),(n=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).setPublic=n.setPublic.bind(Object(io.a)(Object(io.a)(n))),n.setPrivate=n.setPrivate.bind(Object(io.a)(Object(io.a)(n))),n.setPasswordProtected=n.setPasswordProtected.bind(Object(io.a)(Object(io.a)(n))),n.updatePassword=n.updatePassword.bind(Object(io.a)(Object(io.a)(n))),n.state={hasPassword:!!e.password},n}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"setPublic",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r),this.setState({hasPassword:!1})}},{key:"setPrivate",value:function(){if(window.confirm(Object(Z.__)("Would you like to privately publish this post now?"))){var e=this.props,t=e.onUpdateVisibility,n=e.onSave;t("private"),this.setState({hasPassword:!1}),n()}}},{key:"setPasswordProtected",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status,o=e.password;n("private"===t?"draft":r,o||""),this.setState({hasPassword:!0})}},{key:"updatePassword",value:function(e){var t=this.props,n=t.status;(0,t.onUpdateVisibility)(n,e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.visibility,n=e.password,r=e.instanceId,o={public:{onSelect:this.setPublic,checked:"public"===t&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===t},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(Br.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(Br.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(Z.__)("Post Visibility")),ai.map(function(e){var t=e.value,n=e.label,i=e.info;return Object(Br.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(Br.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-".concat(r),value:t,onChange:o[t].onSelect,checked:o[t].checked,id:"editor-post-".concat(t,"-").concat(r),"aria-describedby":"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-radio"}),Object(Br.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(Br.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(Br.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(Br.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(Z.__)("Create password")),Object(Br.createElement)("input",{className:"editor-post-visibility__dialog-password-input",id:"editor-post-visibility__dialog-password-input-".concat(r),type:"text",onChange:this.updatePassword,value:n,placeholder:Object(Z.__)("Use a secure password")}))]}}]),t}(Br.Component),li=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.savePost,r=t.editPost;return{onSave:n,onUpdateVisibility:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r({status:e,password:t})}}}),Hr.withInstanceId])(ui);var di=Object(l.withSelect)(function(e){return{visibility:e("core/editor").getEditedPostVisibility()}})(function(e){var t=e.visibility;return Object(v.find)(ai,{value:t}).label});var pi=Object(Hr.compose)([Object(l.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date")}}),Object(l.withDispatch)(function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}})])(function(e){var t=e.date,n=e.onUpdateDate,r=Object(mt.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(Br.createElement)(Fr.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:n,is12Hour:o})});var fi=Object(l.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date"),isFloating:e("core/editor").isEditedPostDateFloating()}})(function(e){var t=e.date,n=e.isFloating,r=Object(mt.__experimentalGetSettings)();return t&&!n?Object(mt.dateI18n)(r.formats.datetimeAbbreviated,t):Object(Z.__)("Immediately")}),hi={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},bi=function(e,t){return e.toLowerCase()===t.toLowerCase()},mi=function(e){return Object(f.a)({},e,{name:Object(v.unescape)(e.name)})},vi=function(e){return Object(v.map)(e,mi)},Oi=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(io.a)(Object(io.a)(e))),e.searchTerms=Object(v.throttle)(e.searchTerms.bind(Object(io.a)(Object(io.a)(e))),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(io.a)(Object(io.a)(e))),e.state={loading:!Object(v.isEmpty)(e.props.terms),availableTerms:[],selectedTerms:[]},e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidMount",value:function(){var e=this;Object(v.isEmpty)(this.props.terms)||(this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then(function(){e.setState({loading:!1})},function(t){"abort"!==t.statusText&&e.setState({loading:!1})}))}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.initRequest,["abort"]),Object(v.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){e.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=Object(f.a)({},hi,t),o=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(vi).then(function(t){e.setState(function(e){return{availableTerms:e.availableTerms.concat(t.filter(function(t){return!Object(v.find)(e.availableTerms,function(e){return e.id===t.id})}))}}),e.updateSelectedTerms(e.props.terms)}),o}},{key:"updateSelectedTerms",value:function(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(t,n){var r=Object(v.find)(e.state.availableTerms,function(e){return e.id===n});return r&&t.push(r.name),t},[]);this.setState({selectedTerms:t})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy,r=Object(v.escape)(e);return H()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch(function(o){return"term_exists"===o.code?(t.addRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(f.a)({},hi,{search:r}))}).then(vi),t.addRequest.then(function(t){return Object(v.find)(t,function(t){return bi(t.name,e)})})):Promise.reject(o)}).then(mi)}},{key:"onChange",value:function(e){var t=this,n=Object(v.uniqBy)(e,function(e){return e.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(e){return!Object(v.find)(t.state.availableTerms,function(t){return bi(t.name,e)})}),o=function(e,t){return e.map(function(e){return Object(v.find)(t,function(t){return bi(t.name,e)}).id})};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then(function(e){var r=t.state.availableTerms.concat(e);return t.setState({availableTerms:r}),t.props.onUpdateTerms(o(n,r),t.props.taxonomy.rest_base)})}},{key:"searchTerms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(v.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:e})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy;if(!e.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,s=r.selectedTerms,c=i.map(function(e){return e.name}),a=Object(v.get)(n,["labels","add_new_item"],"post_tag"===t?Object(Z.__)("Add New Tag"):Object(Z.__)("Add New Term")),u=Object(v.get)(n,["labels","singular_name"],"post_tag"===t?Object(Z.__)("Tag"):Object(Z.__)("Term")),l=Object(Z.sprintf)(Object(Z._x)("%s added","term"),u),d=Object(Z.sprintf)(Object(Z._x)("%s removed","term"),u),p=Object(Z.sprintf)(Object(Z._x)("Remove %s","term"),u);return Object(Br.createElement)(Fr.FormTokenField,{value:s,suggestions:c,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:a,messages:{added:l,removed:d,remove:p}})}}]),t}(Br.Component),gi=Object(Hr.compose)(Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(p.a)({},n,t))}}}),Object(Fr.withFilters)("editor.PostTaxonomyType"))(Oi),ji=function(){var e=[Object(Z.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Z.__)("Add tags"))];return Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:e},Object(Br.createElement)("p",null,Object(Z.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(Br.createElement)(gi,{slug:"post_tag"}))},yi=function(e){function t(e){var n;return Object(Vr.a)(this,t),(n=Object(Kr.a)(this,Object(Wr.a)(t).call(this,e))).state={hadTagsWhenOpeningThePanel:e.hasTags},n}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(Br.createElement)(ji,null)}}]),t}(Br.Component),_i=Object(Hr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPostType(),n=e("core").getTaxonomy("post_tag"),r=n&&e("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(v.some)(n.types,function(e){return e===t}),hasTags:r&&r.length}}),Object(Hr.ifCondition)(function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t}))(yi),ki=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(Br.createElement)(Fr.Button,{isLink:!0,onClick:function(){return r(t)}},n)},Ei=Object(Hr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(v.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:function(e,t){var n=Ho.filter(function(t){return Object(v.includes)(e,t.id)});return Object(v.find)(n,function(e){return e.id===t})}(o,r())}}),Object(l.withDispatch)(function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}}),Object(Hr.ifCondition)(function(e){var t=e.suggestion,n=e.currentPostFormat;return t&&t.id!==n}))(function(e){var t=e.suggestion,n=e.onUpdatePostFormat,r=[Object(Z.__)("Suggestion:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Z.__)("Use a post format"))];return Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:r},Object(Br.createElement)("p",null,Object(Z.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),Object(Br.createElement)("p",null,Object(Br.createElement)(ki,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(Z.sprintf)(Object(Z.__)('Apply the "%1$s" format.'),t.caption)})))});var Si=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}})(function(e){var t,n,r=e.hasPublishAction,o=e.isBeingScheduled,i=e.children;return r?o?(t=Object(Z.__)("Are you ready to schedule?"),n=Object(Z.__)("Your work will be published at the specified date and time.")):(t=Object(Z.__)("Are you ready to publish?"),n=Object(Z.__)("Double-check your settings before publishing.")):(t=Object(Z.__)("Are you ready to submit for review?"),n=Object(Z.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(Br.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(Br.createElement)("div",null,Object(Br.createElement)("strong",null,t)),Object(Br.createElement)("p",null,n),r&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:[Object(Z.__)("Visibility:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(di,null))]},Object(Br.createElement)(li,null)),Object(Br.createElement)(Fr.PanelBody,{initialOpen:!1,title:[Object(Z.__)("Publish:"),Object(Br.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Br.createElement)(fi,null))]},Object(Br.createElement)(pi,null)),Object(Br.createElement)(Ei,null),Object(Br.createElement)(_i,null),i))}),Pi=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(io.a)(Object(io.a)(e))),e.onSelectInput=e.onSelectInput.bind(Object(io.a)(Object(io.a)(e))),e.postLink=Object(Br.createRef)(),e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var e=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout(function(){e.setState({showCopyConfirmation:!1})},4e3)}},{key:"onSelectInput",value:function(e){e.target.select()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.isScheduled,r=e.post,o=e.postType,i=Object(v.get)(o,["labels","singular_name"]),s=Object(v.get)(o,["labels","view_item"]),c=n?Object(Br.createElement)(Br.Fragment,null,Object(Z.__)("is now scheduled. It will go live on")," ",Object(Br.createElement)(fi,null),"."):Object(Z.__)("is now live.");return Object(Br.createElement)("div",{className:"post-publish-panel__postpublish"},Object(Br.createElement)(Fr.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(Br.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(Z.__)("(no title)"))," ",c),Object(Br.createElement)(Fr.PanelBody,null,Object(Br.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(Br.createElement)("strong",null,Object(Z.__)("What’s next?"))),Object(Br.createElement)(Fr.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(Z.sprintf)(Object(Z.__)("%s address"),i),value:Object(O.safeDecodeURIComponent)(r.link),onFocus:this.onSelectInput}),Object(Br.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(Br.createElement)(Fr.Button,{isDefault:!0,href:r.link},s),Object(Br.createElement)(Fr.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(Z.__)("Copied!"):Object(Z.__)("Copy Link")))),t)}}]),t}(Br.Component),wi=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getCurrentPost,o=t.isCurrentPostScheduled,i=e("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}})(Pi),Ti=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(Object(io.a)(Object(io.a)(e))),e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidUpdate",value:function(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var e=this.props,t=e.onClose,n=e.hasPublishAction,r=e.isPostTypeViewable;n&&r||t()}},{key:"render",value:function(){var e=this.props,t=e.forceIsDirty,n=e.forceIsSaving,r=e.isBeingScheduled,o=e.isPublished,i=e.isPublishSidebarEnabled,s=e.isScheduled,c=e.isSaving,a=e.onClose,u=e.onTogglePublishSidebar,l=e.PostPublishExtension,d=e.PrePublishExtension,p=Object(Dr.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),f=Object(v.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),h=o||s&&r,b=!h&&!c,m=h&&!c;return Object(Br.createElement)("div",Object(Nr.a)({className:"editor-post-publish-panel"},f),Object(Br.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-published"},s?Object(Z.__)("Scheduled"):Object(Z.__)("Published")):Object(Br.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(Br.createElement)(ci,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n}),Object(Br.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(Br.createElement)(Fr.IconButton,{"aria-expanded":!0,onClick:a,icon:"no-alt",label:Object(Z.__)("Close panel")})),Object(Br.createElement)("div",{className:"editor-post-publish-panel__content"},b&&Object(Br.createElement)(Si,null,d&&Object(Br.createElement)(d,null)),m&&Object(Br.createElement)(wi,{focusOnMount:!0},l&&Object(Br.createElement)(l,null)),c&&Object(Br.createElement)(Fr.Spinner,null)),Object(Br.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),t}(Br.Component),Ci=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core").getPostType,n=e("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,s=n.isCurrentPostScheduled,c=n.isEditedPostBeingScheduled,a=n.isEditedPostDirty,u=n.isSavingPost,l=e("core/editor").isPublishSidebarEnabled,d=t(o("type"));return{hasPublishAction:Object(v.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(v.get)(d,["viewable"],!1),isBeingScheduled:c(),isDirty:a(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:s()}}),Object(l.withDispatch)(function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}}),Fr.withFocusReturn,Fr.withConstrainedTabbing])(Ti);var xi=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isCurrentPostPublished,o=t.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost,r=t.savePost;return{onClick:function(){n({status:"draft"}),r()}}})])(function(e){var t=e.isSaving,n=e.isPublished,r=e.isScheduled,o=e.onClick;return n||r?Object(Br.createElement)(Fr.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(Z.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(Z.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},Object(Z.__)("Switch to Draft")):null}),Bi=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).state={forceSavedMessage:!1},e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this;e.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout(function(){t.setState({forceSavedMessage:!1})},1e3))}},{key:"render",value:function(){var e=this.props,t=e.post,n=e.isNew,r=e.isScheduled,o=e.isPublished,i=e.isDirty,s=e.isSaving,c=e.isSaveable,a=e.onSave,u=e.isAutosaving,l=e.isPending,d=e.isLargeViewport,p=this.state.forceSavedMessage;if(s){var f=$r()("editor-post-saved-state","is-saving",{"is-autosaving":u});return Object(Br.createElement)("span",{className:f},Object(Br.createElement)(Fr.Dashicon,{icon:"cloud"}),u?Object(Z.__)("Autosaving"):Object(Z.__)("Saving"))}if(o||r)return Object(Br.createElement)(xi,null);if(!c)return null;if(p||!n&&!i)return Object(Br.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(Br.createElement)(Fr.Dashicon,{icon:"saved"}),Object(Z.__)("Saved"));if(!Object(v.get)(t,["_links","wp:action-publish"],!1)&&l)return null;var h=l?Object(Z.__)("Save as Pending"):Object(Z.__)("Save Draft");return d?Object(Br.createElement)(Fr.Button,{className:"editor-post-save-draft",onClick:a,shortcut:so.displayShortcut.primary("s"),isTertiary:!0},h):Object(Br.createElement)(Fr.IconButton,{className:"editor-post-save-draft",label:h,onClick:a,shortcut:so.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),t}(Br.Component),Ai=Object(Hr.compose)([Object(l.withSelect)(function(e,t){var n=t.forceIsDirty,r=t.forceIsSaving,o=e("core/editor"),i=o.isEditedPostNew,s=o.isCurrentPostPublished,c=o.isCurrentPostScheduled,a=o.isEditedPostDirty,u=o.isSavingPost,l=o.isEditedPostSaveable,d=o.getCurrentPost,p=o.isAutosavingPost,f=o.getEditedPostAttribute;return{post:d(),isNew:i(),isPublished:s(),isScheduled:c(),isDirty:n||a(),isSaving:r||u(),isSaveable:l(),isAutosaving:p(),isPending:"pending"===f("status")}}),Object(l.withDispatch)(function(e){return{onSave:e("core/editor").savePost}}),Hr.withSafeTimeout,Object(u.withViewportMatch)({isLargeViewport:"medium"})])(Bi);var Ii=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction,n=e.children;return t?n:null});var Li=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(v.get)(t,["_links","wp:action-sticky"],!1),postType:e("core/editor").getCurrentPostType()}})])(function(e){var t=e.hasStickyAction,n=e.postType,r=e.children;return"post"===n&&t?r:null});var Ri=Object(Hr.compose)([Object(l.withSelect)(function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}}),Object(l.withDispatch)(function(e){return{onUpdateSticky:function(t){e("core/editor").editPost({sticky:t})}}})])(function(e){var t=e.onUpdateSticky,n=e.postSticky,r=void 0!==n&&n;return Object(Br.createElement)(Li,null,Object(Br.createElement)(Fr.CheckboxControl,{label:Object(Z.__)("Stick to the top of the blog"),checked:r,onChange:function(){return t(!r)}}))}),Ui={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},Ni=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).findTerm=e.findTerm.bind(Object(io.a)(Object(io.a)(e))),e.onChange=e.onChange.bind(Object(io.a)(Object(io.a)(e))),e.onChangeFormName=e.onChangeFormName.bind(Object(io.a)(Object(io.a)(e))),e.onChangeFormParent=e.onChangeFormParent.bind(Object(io.a)(Object(io.a)(e))),e.onAddTerm=e.onAddTerm.bind(Object(io.a)(Object(io.a)(e))),e.onToggleForm=e.onToggleForm.bind(Object(io.a)(Object(io.a)(e))),e.setFilterValue=e.setFilterValue.bind(Object(io.a)(Object(io.a)(e))),e.sortBySelected=e.sortBySelected.bind(Object(io.a)(Object(io.a)(e))),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"onChange",value:function(e){var t=this.props,n=t.onUpdateTerms,r=t.terms,o=void 0===r?[]:r,i=t.taxonomy,s=parseInt(e.target.value,10);n(-1!==o.indexOf(s)?Object(v.without)(o,s):[].concat(Object(x.a)(o),[s]),i.rest_base)}},{key:"onChangeFormName",value:function(e){var t=""===e.target.value.trim()?"":e.target.value;this.setState({formName:t})}},{key:"onChangeFormParent",value:function(e){this.setState({formParent:e})}},{key:"onToggleForm",value:function(){this.setState(function(e){return{showForm:!e.showForm}})}},{key:"findTerm",value:function(e,t,n){return Object(v.find)(e,function(e){return(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()})}},{key:"onAddTerm",value:function(e){var t=this;e.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,s=n.slug,c=this.state,a=c.formName,u=c.formParent,l=c.adding,d=c.availableTerms;if(""!==a&&!l){var p=this.findTerm(d,u,a);if(p)return Object(v.some)(i,function(e){return e===p.id})||r([].concat(Object(x.a)(i),[p.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=H()({path:"/wp/v2/".concat(o.rest_base),method:"POST",data:{name:a,parent:u||void 0}}),this.addRequest.catch(function(e){return"term_exists"===e.code?(t.addRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(f.a)({},Ui,{parent:u||0,search:a}))}),t.addRequest.then(function(e){return t.findTerm(e,u,a)})):Promise.reject(e)}).then(function(e){var n=!!Object(v.find)(t.state.availableTerms,function(t){return t.id===e.id})?t.state.availableTerms:[e].concat(Object(x.a)(t.state.availableTerms)),c=Object(Z.sprintf)(Object(Z._x)("%s added","term"),Object(v.get)(t.props.taxonomy,["labels","singular_name"],"category"===s?Object(Z.__)("Category"):Object(Z.__)("Term")));t.props.speak(c,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:t.sortBySelected(So(n))}),r([].concat(Object(x.a)(i),[e.id]),o.rest_base)},function(e){"abort"!==e.statusText&&(t.addRequest=null,t.setState({adding:!1}))})}}},{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){Object(v.invoke)(this.fetchRequest,["abort"]),Object(v.invoke)(this.addRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){this.props.taxonomy!==e.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var e=this,t=this.props.taxonomy;t&&(this.fetchRequest=H()({path:Object(O.addQueryArgs)("/wp/v2/".concat(t.rest_base),Ui)}),this.fetchRequest.then(function(t){var n=e.sortBySelected(So(t));e.fetchRequest=null,e.setState({loading:!1,availableTermsTree:n,availableTerms:t})},function(t){"abort"!==t.statusText&&(e.fetchRequest=null,e.setState({loading:!1}))}))}},{key:"sortBySelected",value:function(e){var t=this.props.terms,n=function e(n){return-1!==t.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(e).filter(function(e){return e}).length>0)};return e.sort(function(e,t){var r=n(e),o=n(t);return r===o?0:r&&!o?-1:!r&&o?1:0}),e}},{key:"setFilterValue",value:function(e){var t=this.state.availableTermsTree,n=e.target.value,r=t.map(this.getFilterMatcher(n)).filter(function(e){return e});this.setState({filterValue:n,filteredTermsTree:r});var o=function e(t){for(var n=0,r=0;r<t.length;r++)n++,void 0!==t[r].children&&(n+=e(t[r].children));return n}(r),i=Object(Z.sprintf)(Object(Z._n)("%d result found.","%d results found.",o),o);this.props.debouncedSpeak(i,"assertive")}},{key:"getFilterMatcher",value:function(e){return function t(n){if(""===e)return n;var r=Object(f.a)({},n);return r.children.length>0&&(r.children=r.children.map(t).filter(function(e){return e})),(-1!==r.name.toLowerCase().indexOf(e)||r.children.length>0)&&r}}},{key:"renderTerms",value:function(e){var t=this,n=this.props.terms,r=void 0===n?[]:n;return e.map(function(e){var n="editor-post-taxonomies-hierarchical-term-".concat(e.id);return Object(Br.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(Br.createElement)("input",{id:n,className:"editor-post-taxonomies__hierarchical-terms-input",type:"checkbox",checked:-1!==r.indexOf(e.id),value:e.id,onChange:t.onChange}),Object(Br.createElement)("label",{htmlFor:n},Object(v.unescape)(e.name)),!!e.children.length&&Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},t.renderTerms(e.children)))})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy,r=e.instanceId,o=e.hasCreateAction;if(!e.hasAssignAction)return null;var i=this.state,s=i.availableTermsTree,c=i.availableTerms,a=i.filteredTermsTree,u=i.formName,l=i.formParent,d=i.loading,p=i.showForm,f=i.filterValue,h=function(e,r,o){return Object(v.get)(n,["labels",e],"category"===t?r:o)},b=h("add_new_item",Object(Z.__)("Add new category"),Object(Z.__)("Add new term")),m=h("new_item_name",Object(Z.__)("Add new category"),Object(Z.__)("Add new term")),O=h("parent_item",Object(Z.__)("Parent Category"),Object(Z.__)("Parent Term")),g="— ".concat(O," —"),j=b,y="editor-post-taxonomies__hierarchical-terms-input-".concat(r),_="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(v.get)(this.props.taxonomy,["labels","search_items"],Object(Z.__)("Search Terms")),E=Object(v.get)(this.props.taxonomy,["name"],Object(Z.__)("Terms")),S=c.length>=8;return[S&&Object(Br.createElement)("label",{key:"filter-label",htmlFor:_},k),S&&Object(Br.createElement)("input",{type:"search",id:_,value:f,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(Br.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":E},this.renderTerms(""!==f?a:s)),!d&&o&&Object(Br.createElement)(Fr.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},b),p&&Object(Br.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(Br.createElement)("label",{htmlFor:y,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(Br.createElement)("input",{type:"text",id:y,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!c.length&&Object(Br.createElement)(Fr.TreeSelect,{label:O,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:s}),Object(Br.createElement)(Fr.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},j))]}}]),t}(Br.Component),Di=Object(Hr.compose)([Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(p.a)({},n,t))}}}),Fr.withSpokenMessages,Hr.withInstanceId,Object(Fr.withFilters)("editor.PostTaxonomyType")])(Ni);var Fi=Object(Hr.compose)([Object(l.withSelect)(function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}})])(function(e){var t=e.postType,n=e.taxonomies,r=e.taxonomyWrapper,o=void 0===r?v.identity:r,i=Object(v.filter)(n,function(e){return Object(v.includes)(e.types,t)});return Object(v.filter)(i,function(e){return e.visibility.show_ui}).map(function(e){var t=e.hierarchical?Di:gi;return Object(Br.createElement)(Br.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(Br.createElement)(t,{slug:e.slug}),e))})});var Mi=Object(Hr.compose)([Object(l.withSelect)(function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}})])(function(e){var t=e.postType,n=e.taxonomies,r=e.children;return Object(v.some)(n,function(e){return Object(v.includes)(e.types,t)})?r:null}),Vi=n(55),zi=n.n(Vi),Ki=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).edit=e.edit.bind(Object(io.a)(Object(io.a)(e))),e.stopEditing=e.stopEditing.bind(Object(io.a)(Object(io.a)(e))),e.state={},e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"edit",value:function(e){var t=e.target.value;this.props.onChange(t),this.setState({value:t,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var e=this.state.value,t=this.props.instanceId;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("label",{htmlFor:"post-content-".concat(t),className:"screen-reader-text"},Object(Z.__)("Type text or HTML")),Object(Br.createElement)(zi.a,{autoComplete:"off",dir:"auto",value:e,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(t),placeholder:Object(Z.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),t}(Br.Component),Wi=Object(Hr.compose)([Object(l.withSelect)(function(e){return{value:(0,e("core/editor").getEditedPostContent)()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost,r=t.resetEditorBlocks;return{onChange:function(e){n({content:e})},onPersist:function(e){var t=Object(s.parse)(e);r(t)}}}),Hr.withInstanceId])(Ki),qi=n(53),Hi=function(e){function t(e){var n,r=e.permalinkParts,o=e.slug;return Object(Vr.a)(this,t),(n=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(io.a)(Object(io.a)(n))),n}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"onSavePermalink",value:function(e){var t=$o(this.state.editedPostName);e.preventDefault(),this.props.onSave(),t!==this.props.postName&&(this.props.editPost({slug:t}),this.setState({editedPostName:t}))}},{key:"render",value:function(){var e=this,t=this.props.permalinkParts,n=t.prefix,r=t.suffix,o=this.state.editedPostName;return Object(Br.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(Br.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(Br.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(Br.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(Z.__)("Edit post permalink"),value:o,onChange:function(t){return e.setState({editedPostName:t.target.value})},type:"text",autoFocus:!0}),Object(Br.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),"‎"),Object(Br.createElement)(Fr.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(Z.__)("Save")))}}]),t}(Br.Component),Gi=Object(Hr.compose)([Object(l.withSelect)(function(e){return{permalinkParts:(0,e("core/editor").getPermalinkParts)()}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(Hi),Qi=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).addVisibilityCheck=e.addVisibilityCheck.bind(Object(io.a)(Object(io.a)(e))),e.onVisibilityChange=e.onVisibilityChange.bind(Object(io.a)(Object(io.a)(e))),e.state={isCopied:!1,isEditingPermalink:!1},e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"addVisibilityCheck",value:function(){window.addEventListener("visibilitychange",this.onVisibilityChange)}},{key:"onVisibilityChange",value:function(){var e=this.props,t=e.isEditable,n=e.refreshPost;t||"visible"!==document.visibilityState||n()}},{key:"componentDidUpdate",value:function(e,t){t.isEditingPermalink&&!this.state.isEditingPermalink&&this.linkElement.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("visibilitychange",this.addVisibilityCheck)}},{key:"render",value:function(){var e=this,t=this.props,n=t.isEditable,r=t.isNew,o=t.isPublished,i=t.isViewable,s=t.permalinkParts,c=t.postLink,a=t.postSlug,u=t.postID,l=t.postTitle;if(r||!i||!s||!c)return null;var d=this.state,p=d.isCopied,f=d.isEditingPermalink,h=p?Object(Z.__)("Permalink copied"):Object(Z.__)("Copy the permalink"),b=s.prefix,m=s.suffix,v=Object(O.safeDecodeURIComponent)(a)||$o(l)||u,g=n?b+v+m:b;return Object(Br.createElement)("div",{className:"editor-post-permalink"},Object(Br.createElement)(Fr.ClipboardButton,{className:$r()("editor-post-permalink__copy",{"is-copied":p}),text:g,label:h,onCopy:function(){return e.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(Br.createElement)("span",{className:"editor-post-permalink__label"},Object(Z.__)("Permalink:")),!f&&Object(Br.createElement)(Fr.ExternalLink,{className:"editor-post-permalink__link",href:o?g:c,target:"_blank",ref:function(t){return e.linkElement=t}},Object(O.safeDecodeURI)(g),"‎"),f&&Object(Br.createElement)(Gi,{slug:v,onSave:function(){return e.setState({isEditingPermalink:!1})}}),n&&!f&&Object(Br.createElement)(Fr.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return e.setState({isEditingPermalink:!0})}},Object(Z.__)("Edit")),!n&&Object(Br.createElement)(Fr.Button,{className:"editor-post-permalink__change",isLarge:!0,href:Yo("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(Z.__)("Change Permalinks")))}}]),t}(Br.Component),Yi=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.isPermalinkEditable,o=t.getCurrentPost,i=t.getPermalinkParts,s=t.getEditedPostAttribute,c=t.isCurrentPostPublished,a=e("core").getPostType,u=o(),l=u.id,d=u.link,p=a(s("type"));return{isNew:n(),postLink:d,permalinkParts:i(),postSlug:s("slug"),isEditable:r(),isPublished:c(),postTitle:s("title"),postID:l,isViewable:Object(v.get)(p,["viewable"],!1)}}),Object(l.withDispatch)(function(e){return{refreshPost:e("core/editor").refreshPost}})])(Qi),$i=/[\r\n]+/g,Xi=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(io.a)(Object(io.a)(e))),e.onSelect=e.onSelect.bind(Object(io.a)(Object(io.a)(e))),e.onUnselect=e.onUnselect.bind(Object(io.a)(Object(io.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(io.a)(Object(io.a)(e))),e.redirectHistory=e.redirectHistory.bind(Object(io.a)(Object(io.a)(e))),e.state={isSelected:!1},e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"handleFocusOutside",value:function(){this.onUnselect()}},{key:"onSelect",value:function(){this.setState({isSelected:!0}),this.props.clearSelectedBlock()}},{key:"onUnselect",value:function(){this.setState({isSelected:!1})}},{key:"onChange",value:function(e){var t=e.target.value.replace($i," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===so.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(e){e.shiftKey?this.props.onRedo():this.props.onUndo(),e.preventDefault()}},{key:"render",value:function(){var e=this.props,t=e.hasFixedToolbar,n=e.isCleanNewPost,r=e.isFocusMode,o=e.isPostTypeViewable,i=e.instanceId,s=e.placeholder,c=e.title,a=this.state.isSelected,u=$r()("wp-block editor-post-title__block",{"is-selected":a,"is-focus-mode":r,"has-fixed-toolbar":t}),l=Object(qi.decodeEntities)(s);return Object(Br.createElement)(_o,{supportKeys:"title"},Object(Br.createElement)("div",{className:"editor-post-title"},Object(Br.createElement)("div",{className:u},Object(Br.createElement)(Fr.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(Br.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},l||Object(Z.__)("Add title")),Object(Br.createElement)(zi.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:c,onChange:this.onChange,placeholder:l||Object(Z.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),a&&o&&Object(Br.createElement)(Yi,null))))}}]),t}(Br.Component),Zi=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.isCleanNewPost,o=e("core/block-editor").getSettings,i=(0,e("core").getPostType)(n("type")),s=o(),c=s.titlePlaceholder,a=s.focusMode,u=s.hasFixedToolbar;return{isCleanNewPost:r(),title:n("title"),isPostTypeViewable:Object(v.get)(i,["viewable"],!1),placeholder:c,isFocusMode:a,hasFixedToolbar:u}}),Ji=Object(l.withDispatch)(function(e){var t=e("core/block-editor"),n=t.insertDefaultBlock,r=t.clearSelectedBlock,o=e("core/editor"),i=o.editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(e){i({title:e})},onUndo:o.undo,onRedo:o.redo,clearSelectedBlock:r}}),es=Object(Hr.compose)(Zi,Ji,Hr.withInstanceId,Fr.withFocusOutside)(Xi);var ts=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}}),Object(l.withDispatch)(function(e){return{trashPost:e("core/editor").trashPost}})])(function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(Dr.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(Br.createElement)(Fr.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(Z.__)("Move to trash"))});var ns=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId;return{isNew:n(),postId:r()}})(function(e){var t=e.isNew,n=e.postId,r=e.children;return t||!n?null:r});var rs=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})}),os=n(91);var is=Object(l.withSelect)(function(e){return{content:e("core/editor").getEditedPostAttribute("content")}})(function(e){var t=e.content,n=Object(Z._x)("words","Word count type. Do not translate!");return Object(Br.createElement)("span",{className:"word-count"},Object(os.count)(t,n))});var ss=Object(l.withSelect)(function(e){var t=e("core/block-editor").getGlobalBlockCount;return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}})(function(e){var t=e.headingCount,n=e.paragraphCount,r=e.numberOfBlocks,o=e.hasOutlineItemsDisabled,i=e.onRequestClose;return Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("div",{className:"table-of-contents__counts",role:"note","aria-label":Object(Z.__)("Document Statistics"),tabIndex:"0"},Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Words"),Object(Br.createElement)(is,null)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Headings"),Object(Br.createElement)("span",{className:"table-of-contents__number"},t)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Paragraphs"),Object(Br.createElement)("span",{className:"table-of-contents__number"},n)),Object(Br.createElement)("div",{className:"table-of-contents__count"},Object(Z.__)("Blocks"),Object(Br.createElement)("span",{className:"table-of-contents__number"},r))),t>0&&Object(Br.createElement)(Br.Fragment,null,Object(Br.createElement)("hr",null),Object(Br.createElement)("span",{className:"table-of-contents__title"},Object(Z.__)("Document Outline")),Object(Br.createElement)(ro,{onSelect:i,hasOutlineItemsDisabled:o})))});var cs=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}})(function(e){var t=e.hasBlocks,n=e.hasOutlineItemsDisabled;return Object(Br.createElement)(Fr.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(Br.createElement)(Fr.IconButton,{onClick:t?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(Z.__)("Content structure"),labelPosition:"bottom","aria-disabled":!t})},renderContent:function(e){var t=e.onClose;return Object(Br.createElement)(ss,{onRequestClose:t,hasOutlineItemsDisabled:n})}})}),as=function(e){function t(){var e;return Object(Vr.a)(this,t),(e=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(io.a)(Object(io.a)(e))),e}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(e){if(this.props.isDirty)return e.returnValue=Object(Z.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),t}(Br.Component),us=Object(l.withSelect)(function(e){return{isDirty:e("core/editor").isEditedPostDirty()}})(as),ls=n(40),ds=n.n(ls),ps=n(183),fs=n.n(ps),hs=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,bs=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new s(e),f(),t}}function s(e){this.start=e,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;var c=[];function a(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;c.push(i)}function u(){return p(/^{\s*/)}function l(){return p(/^}/)}function d(){var t,n=[];for(f(),b(n);e.length&&"}"!==e.charAt(0)&&(t=S()||P());)!1!==t&&(n.push(t),b(n));return n}function p(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){p(/^\s*/)}function b(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return a("End of comment missing");var s=e.slice(2,n-2);return r+=2,o(s),e=e.slice(n),r+=2,t({type:"comment",comment:s})}}function v(){var e=p(/^([^{]+)/);if(e)return ms(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function O(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=ms(t[0]),!p(/^:\s*/))return a("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(hs,""),value:n?ms(n[0]).replace(hs,""):""});return p(/^[;\s]*/),r}}function g(){var e,t=[];if(!u())return a("missing '{'");for(b(t);e=O();)!1!==e&&(t.push(e),b(t));return l()?t:a("missing '}'")}function j(){for(var e,t=[],n=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:g()})}var y=E("import"),_=E("charset"),k=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=p(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function S(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return a("@keyframes missing name");var r,o=t[1];if(!u())return a("@keyframes missing '{'");for(var s=b();r=j();)s.push(r),s=s.concat(b());return l()?e({type:"keyframes",name:o,vendor:n,keyframes:s}):a("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var n=ms(t[1]);if(!u())return a("@media missing '{'");var r=b().concat(d());return l()?e({type:"media",media:n,rules:r}):a("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:ms(t[1]),media:ms(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var n=ms(t[1]);if(!u())return a("@supports missing '{'");var r=b().concat(d());return l()?e({type:"supports",supports:n,rules:r}):a("@supports missing '}'")}}()||y()||_()||k()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=ms(t[1]),r=ms(t[2]);if(!u())return a("@document missing '{'");var o=b().concat(d());return l()?e({type:"document",document:r,vendor:n,rules:o}):a("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!u())return a("@page missing '{'");for(var n,r=b();n=O();)r.push(n),r=r.concat(b());return l()?e({type:"page",selectors:t,declarations:r}):a("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!u())return a("@host missing '{'");var t=b().concat(d());return l()?e({type:"host",rules:t}):a("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!u())return a("@font-face missing '{'");for(var t,n=b();t=O();)n.push(t),n=n.concat(b());return l()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}}()}function P(){var e=i(),t=v();return t?(b(),e({type:"rule",selectors:t,declarations:g()})):a("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i in t){var s=t[i];Array.isArray(s)?s.forEach(function(t){e(t,o)}):s&&"object"===Object(h.a)(s)&&e(s,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}(function(){var e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:c}}}())};function ms(e){return e?e.replace(/^\s+|\s+$/g,""):""}var vs=n(102),Os=n.n(vs),gs=js;function js(e){this.options=e||{}}js.prototype.emit=function(e){return e},js.prototype.visit=function(e){return this[e.type](e)},js.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var ys=_s;function _s(e){gs.call(this,e)}Os()(_s,gs),_s.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},_s.prototype.comment=function(e){return this.emit("",e.position)},_s.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},_s.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},_s.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},_s.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},_s.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},_s.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},_s.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},_s.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},_s.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},_s.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},_s.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},_s.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},_s.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},_s.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var ks=Es;function Es(e){e=e||{},gs.call(this,e),this.indentation=e.indent}Os()(Es,gs),Es.prototype.compile=function(e){return this.stylesheet(e)},Es.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Es.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Es.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Es.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Es.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("  {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Es.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Es.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Es.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Es.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Es.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Es.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Es.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Es.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Es.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Es.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map(function(e){return t+e}).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Es.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Es.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||"  ")};var Ss=function(e,t){return((t=t||{}).compress?new ys(t):new ks(t)).compile(e)};var Ps=function(e,t){try{var n=bs(e),r=fs.a.map(n,function(e){if(!e)return e;var n=t(e);return this.update(n)});return Ss(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}},ws=n(78);function Ts(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(!function(e){return/^\/(?!\/)/.test(e)}(e.value)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value))}function Cs(e){return function(t){var n=function(e,t){var n=Object(ws.parse)(e).pathname;return Object(ws.resolve)(t,n)}(t.value,e);return Object(f.a)({},t,{newUrl:"url("+t.before+t.quote+n+t.quote+t.after+")"})}}var xs=function(e){return function(t){if("declaration"===t.type){var n=function(e){for(var t,n=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g,r=[];null!==(t=n.exec(e));){var o={source:t[0],before:t[1],quote:t[2],value:t[3],after:t[4]};Ts(o)&&r.push(o)}return r}(t.value).map(Cs(e));return Object(f.a)({},t,{value:function(e,t){return t.forEach(function(t){e=e.replace(t.source,t.newUrl)}),e}(t.value,n)})}return t}},Bs=/^(body|html|:root).*$/,As=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?Object(f.a)({},n,{selectors:n.selectors.map(function(n){return Object(v.includes)(t,n.trim())?n:n.match(Bs)?n.replace(/^(body|html|:root)/,e):e+" "+n})}):n}},Is=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(v.map)(e,function(e){var n=e.css,r=e.baseURL,o=[];return t&&o.push(As(t)),r&&o.push(xs(r)),o.length?Ps(n,Object(Hr.compose)(o)):n})},Ls=n(35);function Rs(e){return e?Object(v.flatMap)(e,function(e,t){var n=e.split("/"),r=Object(d.a)(n,1)[0],o=t.split("|");return[e].concat(Object(x.a)(Object(v.map)(o,function(e){return"".concat(r,"/").concat(e)})))}):e}function Us(){return(Us=Object(ht.a)(W.a.mark(function e(t){var n,r,o,i,s,c,a,u,l,d,p,h,b,m,O,g,j,y,_,k,E,S,P,w,T,C,B,A,I;return W.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.allowedTypes,r=t.additionalData,o=void 0===r?{}:r,i=t.filesList,s=t.maxUploadFileSize,c=t.onError,a=void 0===c?v.noop:c,u=t.onFileChange,l=t.wpAllowedMimeTypes,d=void 0===l?null:l,p=Object(x.a)(i),h=[],b=function(e,t){Object(Ls.revokeBlobURL)(Object(v.get)(h,[e,"url"])),h[e]=t,u(Object(v.compact)(h))},m=function(e){return!n||Object(v.some)(n,function(t){return Object(v.includes)(t,"/")?t===e:Object(v.startsWith)(e,"".concat(t,"/"))})},O=Rs(d),g=function(e){return Object(v.includes)(O,e)},j=function(e){e.message=[Object(Br.createElement)("strong",{key:"filename"},e.file.name),": ",e.message],a(e)},y=[],_=!0,k=!1,E=void 0,e.prev=12,S=p[Symbol.iterator]();case 14:if(_=(P=S.next()).done){e.next=34;break}if(w=P.value,!O||g(w.type)){e.next=19;break}return j({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:Object(Z.__)("Sorry, this file type is not permitted for security reasons."),file:w}),e.abrupt("continue",31);case 19:if(m(w.type)){e.next=22;break}return j({code:"MIME_TYPE_NOT_SUPPORTED",message:Object(Z.__)("Sorry, this file type is not supported here."),file:w}),e.abrupt("continue",31);case 22:if(!(s&&w.size>s)){e.next=25;break}return j({code:"SIZE_ABOVE_LIMIT",message:Object(Z.__)("This file exceeds the maximum upload size for this site."),file:w}),e.abrupt("continue",31);case 25:if(!(w.size<=0)){e.next=28;break}return j({code:"EMPTY_FILE",message:Object(Z.__)("This file is empty."),file:w}),e.abrupt("continue",31);case 28:y.push(w),h.push({url:Object(Ls.createBlobURL)(w)}),u(h);case 31:_=!0,e.next=14;break;case 34:e.next=40;break;case 36:e.prev=36,e.t0=e.catch(12),k=!0,E=e.t0;case 40:e.prev=40,e.prev=41,_||null==S.return||S.return();case 43:if(e.prev=43,!k){e.next=46;break}throw E;case 46:return e.finish(43);case 47:return e.finish(40);case 48:T=0;case 49:if(!(T<y.length)){e.next=68;break}return C=y[T],e.prev=51,e.next=54,Ns(C,o);case 54:B=e.sent,A=Object(f.a)({},Object(v.omit)(B,["alt_text","source_url"]),{alt:B.alt_text,caption:Object(v.get)(B,["caption","raw"],""),title:B.title.raw,url:B.source_url}),b(T,A),e.next=65;break;case 59:e.prev=59,e.t1=e.catch(51),b(T,null),I=void 0,I=Object(v.has)(e.t1,["message"])?Object(v.get)(e.t1,["message"]):Object(Z.sprintf)(Object(Z.__)("Error while uploading file %s to the media library."),C.name),a({code:"GENERAL",message:I,file:C});case 65:++T,e.next=49;break;case 68:case"end":return e.stop()}},e,this,[[12,36,40,48],[41,,43,47],[51,59]])}))).apply(this,arguments)}function Ns(e,t){var n=new window.FormData;return n.append("file",e,e.name||e.type.replace("/",".")),Object(v.forEach)(t,function(e,t){return n.append(t,e)}),H()({path:"/wp/v2/media",body:n,method:"POST"})}var Ds=function(e){var t=e.additionalData,n=void 0===t?{}:t,r=e.allowedTypes,o=e.filesList,i=e.maxUploadFileSize,s=e.onError,c=void 0===s?v.noop:s,a=e.onFileChange,u=Object(l.select)("core/editor"),d=u.getCurrentPostId,p=u.getEditorSettings,h=p().allowedMimeTypes;i=i||p().maxUploadFileSize,function(e){Us.apply(this,arguments)}({allowedTypes:r,filesList:o,onFileChange:a,additionalData:Object(f.a)({post:d()},n),maxUploadFileSize:i,onError:function(e){var t=e.message;return c(t)},wpAllowedMimeTypes:h})},Fs=function(e){function t(e){var n;return Object(Vr.a)(this,t),(n=Object(Kr.a)(this,Object(Wr.a)(t).apply(this,arguments))).getBlockEditorSettings=ds()(n.getBlockEditorSettings,{maxSize:1}),e.recovery?Object(Kr.a)(n):(e.updatePostLock(e.settings.postLock),e.setupEditor(e.post,e.initialEdits,e.settings.template),e.settings.autosave&&e.createWarningNotice(Object(Z.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(Z.__)("View the autosave"),url:e.settings.autosave.editLink}]}),n)}return Object(qr.a)(t,e),Object(zr.a)(t,[{key:"getBlockEditorSettings",value:function(e,t,n,r){return Object(f.a)({},Object(v.pick)(e,["alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","colors","disableCustomColors","disableCustomFontSizes","focusMode","fontSizes","hasFixedToolbar","hasPermissionsToManageWidgets","imageSizes","isRTL","maxWidth","styles","templateLock","titlePlaceholder"]),{__experimentalMetaSource:{value:t,onChange:n},__experimentalReusableBlocks:r,__experimentalMediaUpload:Ds})}},{key:"componentDidMount",value:function(){if(this.props.updateEditorSettings(this.props.settings),this.props.settings.styles){var e=Is(this.props.settings.styles,".editor-styles-wrapper");Object(v.map)(e,function(e){if(e){var t=document.createElement("style");t.innerHTML=e,document.body.appendChild(t)}})}}},{key:"componentDidUpdate",value:function(e){this.props.settings!==e.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.blocks,r=e.resetEditorBlocks,o=e.isReady,s=e.settings,c=e.meta,a=e.onMetaChange,u=e.reusableBlocks,l=e.resetEditorBlocksWithoutUndoLevel;if(!o)return null;var d=this.getBlockEditorSettings(s,c,a,u);return Object(Br.createElement)(i.BlockEditorProvider,{value:n,onInput:l,onChange:r,settings:d},t)}}]),t}(Br.Component),Ms=Object(Hr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.__unstableIsEditorReady,r=t.getEditorBlocks,o=t.getEditedPostAttribute,i=t.__experimentalGetReusableBlocks;return{isReady:n(),blocks:r(),meta:o("meta"),reusableBlocks:i()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.setupEditor,r=t.updatePostLock,o=t.resetEditorBlocks,i=t.editPost,s=t.updateEditorSettings;return{setupEditor:n,updatePostLock:r,createWarningNotice:e("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:s,resetEditorBlocksWithoutUndoLevel:function(e){o(e,{__unstableShouldCreateUndoLevel:!1})},onMetaChange:function(e){i({meta:e})}}})])(Fs),Vs=[Ur],zs=Object(v.once)(function(){return Object(l.dispatch)("core/editor").__experimentalFetchReusableBlocks()});Object(xr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(e,t){return e||(e=Vs.map(v.clone),t===Object(s.getDefaultBlockName)()&&(e.push(Object(v.clone)(Rr)),zs())),e}),n.d(t,"ServerSideRender",function(){return Mr}),n.d(t,"AutosaveMonitor",function(){return Qr}),n.d(t,"DocumentOutline",function(){return ro}),n.d(t,"DocumentOutlineCheck",function(){return oo}),n.d(t,"VisualEditorGlobalKeyboardShortcuts",function(){return fo}),n.d(t,"EditorGlobalKeyboardShortcuts",function(){return ho}),n.d(t,"TextEditorGlobalKeyboardShortcuts",function(){return bo}),n.d(t,"EditorHistoryRedo",function(){return mo}),n.d(t,"EditorHistoryUndo",function(){return vo}),n.d(t,"EditorNotices",function(){return go}),n.d(t,"ErrorBoundary",function(){return jo}),n.d(t,"PageAttributesCheck",function(){return yo}),n.d(t,"PageAttributesOrder",function(){return Eo}),n.d(t,"PageAttributesParent",function(){return To}),n.d(t,"PageTemplate",function(){return Co}),n.d(t,"PostAuthor",function(){return Ao}),n.d(t,"PostAuthorCheck",function(){return xo}),n.d(t,"PostComments",function(){return Io}),n.d(t,"PostExcerpt",function(){return Lo}),n.d(t,"PostExcerptCheck",function(){return Ro}),n.d(t,"PostFeaturedImage",function(){return Wo}),n.d(t,"PostFeaturedImageCheck",function(){return No}),n.d(t,"PostFormat",function(){return Go}),n.d(t,"PostFormatCheck",function(){return qo}),n.d(t,"PostLastRevision",function(){return Xo}),n.d(t,"PostLastRevisionCheck",function(){return Qo}),n.d(t,"PostLockedModal",function(){return ti}),n.d(t,"PostPendingStatus",function(){return ri}),n.d(t,"PostPendingStatusCheck",function(){return ni}),n.d(t,"PostPingbacks",function(){return oi}),n.d(t,"PostPreviewButton",function(){return Jo}),n.d(t,"PostPublishButton",function(){return ci}),n.d(t,"PostPublishButtonLabel",function(){return ii}),n.d(t,"PostPublishPanel",function(){return Ci}),n.d(t,"PostSavedState",function(){return Ai}),n.d(t,"PostSchedule",function(){return pi}),n.d(t,"PostScheduleCheck",function(){return Ii}),n.d(t,"PostScheduleLabel",function(){return fi}),n.d(t,"PostSticky",function(){return Ri}),n.d(t,"PostStickyCheck",function(){return Li}),n.d(t,"PostSwitchToDraftButton",function(){return xi}),n.d(t,"PostTaxonomies",function(){return Fi}),n.d(t,"PostTaxonomiesCheck",function(){return Mi}),n.d(t,"PostTextEditor",function(){return Wi}),n.d(t,"PostTitle",function(){return es}),n.d(t,"PostTrash",function(){return ts}),n.d(t,"PostTrashCheck",function(){return ns}),n.d(t,"PostTypeSupportCheck",function(){return _o}),n.d(t,"PostVisibility",function(){return li}),n.d(t,"PostVisibilityLabel",function(){return di}),n.d(t,"PostVisibilityCheck",function(){return rs}),n.d(t,"TableOfContents",function(){return cs}),n.d(t,"UnsavedChangesWarning",function(){return us}),n.d(t,"WordCount",function(){return is}),n.d(t,"EditorProvider",function(){return Ms}),n.d(t,"blockAutocompleter",function(){return Rr}),n.d(t,"userAutocompleter",function(){return Ur}),n.d(t,"Autocomplete",function(){return i.Autocomplete}),n.d(t,"AlignmentToolbar",function(){return i.AlignmentToolbar}),n.d(t,"BlockAlignmentToolbar",function(){return i.BlockAlignmentToolbar}),n.d(t,"BlockControls",function(){return i.BlockControls}),n.d(t,"BlockEdit",function(){return i.BlockEdit}),n.d(t,"BlockEditorKeyboardShortcuts",function(){return i.BlockEditorKeyboardShortcuts}),n.d(t,"BlockFormatControls",function(){return i.BlockFormatControls}),n.d(t,"BlockIcon",function(){return i.BlockIcon}),n.d(t,"BlockInspector",function(){return i.BlockInspector}),n.d(t,"BlockList",function(){return i.BlockList}),n.d(t,"BlockMover",function(){return i.BlockMover}),n.d(t,"BlockNavigationDropdown",function(){return i.BlockNavigationDropdown}),n.d(t,"BlockSelectionClearer",function(){return i.BlockSelectionClearer}),n.d(t,"BlockSettingsMenu",function(){return i.BlockSettingsMenu}),n.d(t,"BlockTitle",function(){return i.BlockTitle}),n.d(t,"BlockToolbar",function(){return i.BlockToolbar}),n.d(t,"ColorPalette",function(){return i.ColorPalette}),n.d(t,"ContrastChecker",function(){return i.ContrastChecker}),n.d(t,"CopyHandler",function(){return i.CopyHandler}),n.d(t,"createCustomColorsHOC",function(){return i.createCustomColorsHOC}),n.d(t,"DefaultBlockAppender",function(){return i.DefaultBlockAppender}),n.d(t,"FontSizePicker",function(){return i.FontSizePicker}),n.d(t,"getColorClassName",function(){return i.getColorClassName}),n.d(t,"getColorObjectByAttributeValues",function(){return i.getColorObjectByAttributeValues}),n.d(t,"getColorObjectByColorValue",function(){return i.getColorObjectByColorValue}),n.d(t,"getFontSize",function(){return i.getFontSize}),n.d(t,"getFontSizeClass",function(){return i.getFontSizeClass}),n.d(t,"Inserter",function(){return i.Inserter}),n.d(t,"InnerBlocks",function(){return i.InnerBlocks}),n.d(t,"InspectorAdvancedControls",function(){return i.InspectorAdvancedControls}),n.d(t,"InspectorControls",function(){return i.InspectorControls}),n.d(t,"PanelColorSettings",function(){return i.PanelColorSettings}),n.d(t,"PlainText",function(){return i.PlainText}),n.d(t,"RichText",function(){return i.RichText}),n.d(t,"RichTextShortcut",function(){return i.RichTextShortcut}),n.d(t,"RichTextToolbarButton",function(){return i.RichTextToolbarButton}),n.d(t,"RichTextInserterItem",function(){return i.RichTextInserterItem}),n.d(t,"UnstableRichTextInputEvent",function(){return i.UnstableRichTextInputEvent}),n.d(t,"MediaPlaceholder",function(){return i.MediaPlaceholder}),n.d(t,"MediaUpload",function(){return i.MediaUpload}),n.d(t,"MediaUploadCheck",function(){return i.MediaUploadCheck}),n.d(t,"MultiBlocksSwitcher",function(){return i.MultiBlocksSwitcher}),n.d(t,"MultiSelectScrollIntoView",function(){return i.MultiSelectScrollIntoView}),n.d(t,"NavigableToolbar",function(){return i.NavigableToolbar}),n.d(t,"ObserveTyping",function(){return i.ObserveTyping}),n.d(t,"PreserveScrollInReorder",function(){return i.PreserveScrollInReorder}),n.d(t,"SkipToSelectedBlock",function(){return i.SkipToSelectedBlock}),n.d(t,"URLInput",function(){return i.URLInput}),n.d(t,"URLInputButton",function(){return i.URLInputButton}),n.d(t,"URLPopover",function(){return i.URLPopover}),n.d(t,"Warning",function(){return i.Warning}),n.d(t,"WritingFlow",function(){return i.WritingFlow}),n.d(t,"withColorContext",function(){return i.withColorContext}),n.d(t,"withColors",function(){return i.withColors}),n.d(t,"withFontSizes",function(){return i.withFontSizes}),n.d(t,"mediaUpload",function(){return Ds}),n.d(t,"cleanForSlug",function(){return $o}),n.d(t,"transformStyles",function(){return Is})},,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var o="BEGIN",i="COMMIT",s="REVERT",c=[];function a(e,t){return e.optimist&&e.optimist.id===t}function u(e,t){if(!e||"object"!=typeof e||Array.isArray(e))throw new TypeError('Error while handling "'+t.type+'": Optimist requires that state is always a plain object.')}function l(e){if(e){var t=e.optimist;return{optimist:void 0===t?c:t,innerState:function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["optimist"])}}return{optimist:c,innerState:e}}e.exports=function(e){function t(t,n,o){return t.length&&(t=t.concat([{action:o}])),u(n=e(n,o),o),r({optimist:t},n)}return function(n,c){if(c.optimist)switch(c.optimist.type){case o:return function(t,n){var o=l(t),i=o.optimist,s=o.innerState;return i=i.concat([{beforeState:s,action:n}]),u(s=e(s,n),n),r({optimist:i},s)}(n,c);case i:return function(e,n){var r=l(e),o=r.optimist,i=r.innerState,s=[],c=!1,u=!1;o.forEach(function(e){c?e.beforeState&&a(e.action,n.optimist.id)?(u=!0,s.push({action:e.action})):s.push(e):e.beforeState&&!a(e.action,n.optimist.id)?(c=!0,s.push(e)):e.beforeState&&a(e.action,n.optimist.id)&&(u=!0)}),u||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist');return t(o=s,i,n)}(n,c);case s:return function(n,r){var o=l(n),i=o.optimist,s=o.innerState,c=[],d=!1,p=!1,f=s;i.forEach(function(t){t.beforeState&&a(t.action,r.optimist.id)&&(f=t.beforeState,p=!0),a(t.action,r.optimist.id)||(t.beforeState&&(d=!0),d&&(p&&t.beforeState?c.push({beforeState:f,action:t.action}):c.push(t)),p&&(f=e(f,t.action),u(s,r)))}),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist');return t(i=c,f,r)}(n,c)}var d=l(n),p=d.optimist,f=d.innerState;if(n&&!p.length){var h=e(f,c);return h===f?n:(u(h,c),r({optimist:p},h))}return t(p,f,c)}},e.exports.BEGIN=o,e.exports.COMMIT=i,e.exports.REVERT=s}]);