/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.coreData=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=451)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},11:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(38);var a=r(32),c=r(39);function o(e,t){return Object(n.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,c=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,c=e}finally{try{n||null==i.return||i.return()}finally{if(a)throw c}}return r}}(e,t)||Object(a.a)(e,t)||Object(c.a)()}},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(24);var a=r(37),c=r(32);function o(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(a.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},17:function(e,t){e.exports=window.regeneratorRuntime},196:function(e,t,r){"use strict";var n,a=new Uint8Array(16);function c(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(a)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var i=function(e){return"string"==typeof e&&o.test(e)},u=[],s=0;s<256;++s)u.push((s+256).toString(16).substr(1));var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!i(r))throw TypeError("Stringified UUID is invalid");return r};t.a=function(e,t,r){var n=(e=e||{}).random||(e.rng||c)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var a=0;a<16;++a)t[r+a]=n[a];return t}return f(n)}},2:function(e,t){e.exports=window.lodash},24:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,a=n[e];if(void 0===a)return r;var c=t(r[a],n);return c===r[a]?r:m(m({},r),{},Object(u.a)({},a,c))}}},j=r(17),w=r.n(j),_=r(1),k=r(196),x=r(31);function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t3&&void 0!==arguments[3]&&arguments[3];return{type:"REMOVE_ITEMS",itemIds:Object(p.castArray)(r),kind:e,name:t,invalidateCache:n}}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return S(S({},T(e,r)),{},{query:t})}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){i=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(i)throw c}}}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r4&&void 0!==arguments[4]&&arguments[4],c=arguments.length>5?arguments[5]:void 0;return"postType"===e&&(r=Object(p.castArray)(r).map((function(e){return"auto-draft"===e.status?$($({},e),{},{title:""}):e}))),$($({},n?I(r,n,c):T(r,c)),{},{kind:e,name:t,invalidateCache:a})}function ee(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function te(e){return{type:"RECEIVE_THEME_SUPPORTS",themeSupports:e}}function re(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}function ne(e,t,r,n){var a,c,o,i,u,s;return w.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,we(e);case 2:if(a=l.sent,c=Object(p.find)(a,{kind:e,name:t}),i=!1,c){l.next=7;break}return l.abrupt("return");case 7:return l.delegateYield(N("core",["entities","data",e,t,r],{exclusive:!0}),"t0",8);case 8:return u=l.t0,l.prev=9,l.next=12,{type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:r};case 12:return l.prev=12,s="".concat(c.baseURL,"/").concat(r),n&&(s=Object(x.addQueryArgs)(s,n)),l.next=17,Object(f.apiFetch)({path:s,method:"DELETE"});case 17:return i=l.sent,l.next=20,P(e,t,r,!0);case 20:l.next=25;break;case 22:l.prev=22,l.t1=l.catch(12),o=l.t1;case 25:return l.next=27,{type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:r,error:o};case 27:return l.abrupt("return",i);case 28:return l.prev=28,l.delegateYield(q(u),"t2",30);case 30:return l.finish(28);case 31:case"end":return l.stop()}}),Y,null,[[9,,28,31],[12,22]])}function ae(e,t,r,n){var a,c,o,i,u,f,l,d,b,v=arguments;return w.a.wrap((function(y){for(;;)switch(y.prev=y.next){case 0:return a=v.length>4&&void 0!==v[4]?v[4]:{},y.next=3,s.controls.select("core","getEntity",e,t);case 3:if(c=y.sent){y.next=6;break}throw new Error("The entity being edited (".concat(e,", ").concat(t,") does not have a loaded config."));case 6:return o=c.transientEdits,i=void 0===o?{}:o,u=c.mergedEdits,f=void 0===u?{}:u,y.next=9,s.controls.select("core","getRawEntityRecord",e,t,r);case 9:return l=y.sent,y.next=12,s.controls.select("core","getEditedEntityRecord",e,t,r);case 12:return d=y.sent,b={kind:e,name:t,recordId:r,edits:Object.keys(n).reduce((function(e,t){var r=l[t],a=d[t],c=f[t]?$($({},a),n[t]):n[t];return e[t]=Object(p.isEqual)(r,c)?void 0:c,e}),{}),transientEdits:i},y.abrupt("return",$($({type:"EDIT_ENTITY_RECORD"},b),{},{meta:{undo:!a.undoIgnore&&$($({},b),{},{edits:Object.keys(n).reduce((function(e,t){return e[t]=d[t],e}),{})})}}));case 15:case"end":return y.stop()}}),Q)}function ce(){var e;return w.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.controls.select("core","getUndoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,$($({type:"EDIT_ENTITY_RECORD"},e),{},{meta:{isUndo:!0}});case 7:case"end":return t.stop()}}),B)}function oe(){var e;return w.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.controls.select("core","getRedoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,$($({type:"EDIT_ENTITY_RECORD"},e),{},{meta:{isRedo:!0}});case 7:case"end":return t.stop()}}),G)}function ie(){return{type:"CREATE_UNDO_LEVEL"}}function ue(e,t,r){var n,a,c,o,i,d,b,v,y,O,h,g,m,E,j,_,x,R,S,T,P,I,A,D,U=arguments;return w.a.wrap((function(w){for(;;)switch(w.prev=w.next){case 0:return n=U.length>3&&void 0!==U[3]?U[3]:{isAutosave:!1},a=n.isAutosave,c=void 0!==a&&a,w.next=3,we(e);case 3:if(o=w.sent,i=Object(p.find)(o,{kind:e,name:t})){w.next=7;break}return w.abrupt("return");case 7:return d=i.key||ye,b=r[d],w.delegateYield(N("core",["entities","data",e,t,b||Object(k.a)()],{exclusive:!0}),"t0",10);case 10:v=w.t0,w.prev=11,y=0,O=Object.entries(r);case 13:if(!(y2&&void 0!==arguments[2]?arguments[2]:"get",n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=Object(p.find)(Oe,{kind:e,name:t}),c="root"===e?"":Object(p.upperFirst)(Object(p.camelCase)(e)),o=Object(p.upperFirst)(Object(p.camelCase)(t))+(n?"s":""),i=n&&a.plural?Object(p.upperFirst)(Object(p.camelCase)(a.plural)):o;return"".concat(r).concat(c).concat(i)};function we(e){var t,r;return w.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,s.controls.select("core","getEntitiesByKind",e);case 2:if(!(t=n.sent)||0===t.length){n.next=5;break}return n.abrupt("return",t);case 5:if(r=Object(p.find)(he,{name:e})){n.next=8;break}return n.abrupt("return",[]);case 8:return n.next=10,r.loadEntities();case 10:return t=n.sent,n.next=13,J(t);case 13:return n.abrupt("return",t);case 14:case"end":return n.stop()}}),ve)}var _e=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null};var ke=function(e){var t=new WeakMap;return function(r){var n;return t.has(r)?n=t.get(r):(n=e(r),Object(p.isObjectLike)(r)&&t.set(r,n)),n}}((function(e){for(var t={stableKey:"",page:1,perPage:10,fields:null,include:null},r=Object.keys(e).sort(),n=0;n=a&&i0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.page,a=t.perPage,c=t.key,o=void 0===c?ye:c;return"RECEIVE_ITEMS"!==r?e:Se(e||[],Object(p.map)(t.items,o),n,a)})),Pe=Object(s.combineReducers)({items: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_ITEMS":var r=t.key||ye;return Re(Re({},e),t.items.reduce((function(t,n){var a=n[r];return t[a]=h(e[a],n),t}),{}));case"REMOVE_ITEMS":var n=Object(p.omit)(e,t.itemIds);return n}return e},itemIsComplete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.query,a=t.key,c=void 0===a?ye:a;if("RECEIVE_ITEMS"!==r)return e;var o=!n||!Array.isArray(ke(n).fields);return Re(Re({},e),t.items.reduce((function(t,r){var n=r[c];return t[n]=e[n]||o,t}),{}))},queries: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_ITEMS":return Te(e,t);case"REMOVE_ITEMS":var r=Re({},e),n=t.itemIds.reduce((function(e,t){return e[t]=!0,e}),{});return Object(p.forEach)(r,(function(e,t){r[t]=Object(p.filter)(e,(function(e){return!n[e]}))})),r;default:return e}}}),Ie=w.a.mark(Ve),Ae=w.a.mark(qe);function De(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ue(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ue(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){i=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(i)throw c}}}}function Ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:Be,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENQUEUE_LOCK_REQUEST":var r=t.request;return Qe(Qe({},e),{},{requests:[r].concat(Object(d.a)(e.requests))});case"GRANT_LOCK_REQUEST":var n=t.lock,a=t.request,c=a.store,o=a.path,i=[c].concat(Object(d.a)(o)),u=Me(e.tree,i),s=Ne(u,i);return s.locks=[].concat(Object(d.a)(s.locks),[n]),Qe(Qe({},e),{},{requests:e.requests.filter((function(e){return e!==a})),tree:u});case"RELEASE_LOCK":var f=t.lock,l=[f.store].concat(Object(d.a)(f.path)),p=Me(e.tree,l),b=Ne(p,l);return b.locks=b.locks.filter((function(e){return e!==f})),Qe(Qe({},e),{},{tree:p})}return e};function Ke(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return He(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return He(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){i=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(i)throw c}}}}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":var r,n=$e({},e),a=Ke(t.items);try{var c=function(){var e=r.value,a=e[t.key],c=n[a];if(!c)return"continue";var o=Object.keys(c).reduce((function(r,n){return Object(p.isEqual)(c[n],Object(p.get)(e[n],"raw",e[n]))||t.persistedEdits&&Object(p.isEqual)(c[n],t.persistedEdits[n])||(r[n]=c[n]),r}),{});Object.keys(o).length?n[a]=o:delete n[a]};for(a.s();!(r=a.n()).done;)c()}catch(e){a.e(e)}finally{a.f()}return n;case"EDIT_ENTITY_RECORD":var o=$e($e({},e[t.recordId]),t.edits);return Object.keys(o).forEach((function(e){void 0===o[e]&&delete o[e]})),$e($e({},e),{},Object(u.a)({},t.recordId,o))}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"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return $e($e({},e),{},Object(u.a)({},t.recordId,{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}))}return e},deleting:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return $e($e({},e),{},Object(u.a)({},t.recordId,{pending:"DELETE_ENTITY_RECORD_START"===t.type,error:t.error}))}return e}}))}function Xe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_ENTITIES":return[].concat(Object(d.a)(e),Object(d.a)(t.entities))}return e}var Je,Ze=[];Ze.offset=0;var et=Object(s.combineReducers)({terms: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_TERMS":return $e($e({},e),{},Object(u.a)({},t.taxonomy,t.terms))}return e},users:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{byId:{},queries:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_USER_QUERY":return{byId:$e($e({},e.byId),Object(p.keyBy)(t.users,"id")),queries:$e($e({},e.queries),{},Object(u.a)({},t.queryID,Object(p.map)(t.users,(function(e){return e.id}))))}}return e},currentTheme:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e},currentUser: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_CURRENT_USER":return t.currentUser}return e},taxonomies: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_TAXONOMIES":return t.taxonomies}return e},themes: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_CURRENT_THEME":return $e($e({},e),{},Object(u.a)({},t.currentTheme.stylesheet,t.currentTheme))}return e},themeSupports: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_THEME_SUPPORTS":return $e($e({},e),t.themeSupports)}return e},entities:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=Xe(e.config,t),n=e.reducer;if(!n||r!==e.config){var a=Object(p.groupBy)(r,"kind");n=Object(s.combineReducers)(Object.entries(a).reduce((function(e,t){var r=Object(l.a)(t,2),n=r[0],a=r[1],c=Object(s.combineReducers)(a.reduce((function(e,t){return $e($e({},e),{},Object(u.a)({},t.name,ze(t)))}),{}));return e[n]=c,e}),{}))}var c=n(e.data,t);return c===e.data&&r===e.config&&n===e.reducer?e:{reducer:n,data:c,config:r}},undo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ze,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_ENTITY_RECORD":case"CREATE_UNDO_LEVEL":var r,n="CREATE_UNDO_LEVEL"===t.type,a=!n&&(t.meta.isUndo||t.meta.isRedo);if(n?t=Je:a||(Je=Object.keys(t.edits).some((function(e){return!t.transientEdits[e]}))?t:$e($e({},t),{},{edits:$e($e({},Je&&Je.edits),t.edits)})),a){if((r=Object(d.a)(e)).offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return r;n=!0,t=Je}if(!t.meta.undo)return e;if(!n&&!Object.keys(t.edits).some((function(e){return!t.transientEdits[e]})))return(r=Object(d.a)(e)).flattenedUndo=$e($e({},e.flattenedUndo),t.edits),r.offset=e.offset,r;(r=r||e.slice(0,e.offset||void 0)).offset=r.offset||0,r.pop(),n||r.push({kind:t.meta.undo.kind,name:t.meta.undo.name,recordId:t.meta.undo.recordId,edits:$e($e({},e.flattenedUndo),t.meta.undo.edits)});var c=Object.values(t.meta.undo.edits).filter((function(e){return"function"!=typeof e})),o=Object.values(t.edits).filter((function(e){return"function"!=typeof e}));return v()(c,o)||r.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:n?$e($e({},e.flattenedUndo),t.edits):t.edits}),r}return e},embedPreviews: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_EMBED_PREVIEW":var r=t.url,n=t.preview;return $e($e({},e),{},Object(u.a)({},r,n))}return e},userPermissions: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_USER_PERMISSION":return $e($e({},e),{},Object(u.a)({},t.key,t.isAllowed))}return e},autosaves: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_AUTOSAVES":var r=t.postId,n=t.autosaves;return $e($e({},e),{},Object(u.a)({},r,n))}return e},locks:Ge}),tt=r(41),rt=r(35),nt=r.n(rt),at=r(99),ct=r.n(at),ot=new WeakMap;function it(e,t){var r,n=ke(t),a=n.stableKey,c=n.page,o=n.perPage,i=n.include,u=n.fields;if(Array.isArray(i)&&!a?r=i:e.queries[a]&&(r=e.queries[a]),!r)return null;for(var s=-1===o?0:(c-1)*o,f=-1===o?r.length:Math.min(s+o,r.length),l=[],d=s;d1&&void 0!==arguments[1]?arguments[1]:{},r=ot.get(e);if(r){var n=r.get(t);if(void 0!==n)return n}else r=new ct.a,ot.set(e,r);var a=it(e,t);return r.set(t,a),a}));function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t0}var St=Object(tt.a)((function(e,t,r,n){return ft(ft({},Et(e,t,r,n)),kt(e,t,r,n))}),(function(e){return[e.entities.data]}));function Tt(e,t,r,n){var a=Object(p.get)(e.entities.data,[t,r,"saving",n],{}),c=a.pending,o=a.isAutosave;return Boolean(c&&o)}function Pt(e,t,r,n){return Object(p.get)(e.entities.data,[t,r,"saving",n,"pending"],!1)}function It(e,t,r,n){return Object(p.get)(e.entities.data,[t,r,"deleting",n,"pending"],!1)}function At(e,t,r,n){return Object(p.get)(e.entities.data,[t,r,"saving",n,"error"])}function Dt(e,t,r,n){return Object(p.get)(e.entities.data,[t,r,"deleting",n,"error"])}function Ut(e){return e.undo.offset}function Ct(e){return e.undo[e.undo.length-2+Ut(e)]}function Lt(e){return e.undo[e.undo.length+Ut(e)]}function Mt(e){return Boolean(Ct(e))}function Nt(e){return Boolean(Lt(e))}function Vt(e){return e.themes[e.currentTheme]}function qt(e){return e.themeSupports}function Ft(e,t){return e.embedPreviews[t]}function Yt(e,t){var r=e.embedPreviews[t],n=''+t+"";return!!r&&r.html===n}function Qt(e){return nt()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),Object(p.defaultTo)(Bt(e,"create","media"),!0)}function Bt(e,t,r,n){var a=Object(p.compact)([t,r,n]).join("/");return Object(p.get)(e,["userPermissions",a])}function Gt(e,t,r){return e.autosaves[r]}function Kt(e,t,r,n){if(void 0!==n){var a=e.autosaves[r];return Object(p.find)(a,{author:n})}}var Ht=Object(s.createRegistrySelector)((function(e){return function(t,r,n){return e("core").hasFinishedResolution("getAutosaves",[r,n])}})),Wt=Object(tt.a)((function(){return[]}),(function(e){return[e.undo.length,e.undo.offset,e.undo.flattenedUndo]}));function $t(e,t){var r=wt(e,"postType","wp_template",{"find-template":t});return null!=r&&r.length?r[0]:null}var zt=r(47);var Xt={REGULAR_FETCH:function(e){return Object(zt.a)(w.a.mark((function t(){var r,n,a;return w.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.url,t.next=3,window.fetch(r).then((function(e){return e.json()}));case 3:return n=t.sent,a=n.data,t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})))()}},Jt=function(e,t){return w.a.mark((function r(){var n,a,c,o=arguments;return w.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(n=o.length,a=new Array(n),c=0;c=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){i=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(i)throw c}}}}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==l[2]?l[2]:"",n=l.length>3?l[3]:void 0,b.next=4,we(e);case 4:if(a=b.sent,c=Object(p.find)(a,{kind:e,name:t})){b.next=8;break}return b.abrupt("return");case 8:return b.delegateYield(N("core",["entities","data",e,t,r],{exclusive:!1}),"t0",9);case 9:if(o=b.t0,b.prev=10,void 0!==n&&n._fields&&(n=rr(rr({},n),{},{_fields:Object(p.uniq)([].concat(Object(d.a)(_e(n._fields)||[]),[c.key||ye])).join()})),i=Object(x.addQueryArgs)(c.baseURL+"/"+r,rr(rr({},n),{},{context:"edit"})),void 0===n){b.next=20;break}return n=rr(rr({},n),{},{include:[r]}),b.next=17,s.controls.select("core","hasEntityRecords",e,t,n);case 17:if(!b.sent){b.next=20;break}return b.abrupt("return");case 20:return b.next=22,Object(f.apiFetch)({path:i});case 22:return u=b.sent,b.next=25,Z(e,t,u,n);case 25:b.next=29;break;case 27:b.prev=27,b.t1=b.catch(10);case 29:return b.prev=29,b.delegateYield(q(o),"t2",31);case 31:return b.finish(29);case 32:case"end":return b.stop()}}),or,null,[[10,27,29,32]])}var mr=Jt(gr,"getEntityRecord"),Er=Jt(mr,"getRawEntityRecord");function jr(e,t){var r,n,a,c,o,i,u,s,l,b,v,y=arguments;return w.a.wrap((function(O){for(;;)switch(O.prev=O.next){case 0:return r=y.length>2&&void 0!==y[2]?y[2]:{},O.next=3,we(e);case 3:if(n=O.sent,a=Object(p.find)(n,{kind:e,name:t})){O.next=7;break}return O.abrupt("return");case 7:return O.delegateYield(N("core",["entities","data",e,t],{exclusive:!1}),"t0",8);case 8:return c=O.t0,O.prev=9,r._fields&&(r=rr(rr({},r),{},{_fields:Object(p.uniq)([].concat(Object(d.a)(_e(r._fields)||[]),[a.key||ye])).join()})),i=Object(x.addQueryArgs)(a.baseURL,rr(rr({},r),{},{context:"edit"})),O.t1=Object,O.next=15,Object(f.apiFetch)({path:i});case 15:return O.t2=O.sent,u=O.t1.values.call(O.t1,O.t2),r._fields&&(u=u.map((function(e){return r._fields.split(",").forEach((function(t){e.hasOwnProperty(t)||(e[t]=void 0)})),e}))),O.next=20,Z(e,t,u,r);case 20:if(null!==(o=r)&&void 0!==o&&o._fields){O.next=42;break}s=a.key||ye,l=Zt(u),O.prev=23,l.s();case 25:if((b=l.n()).done){O.next=34;break}if(!(v=b.value)[s]){O.next=32;break}return O.next=30,{type:"START_RESOLUTION",selectorName:"getEntityRecord",args:[e,t,v[s]]};case 30:return O.next=32,{type:"FINISH_RESOLUTION",selectorName:"getEntityRecord",args:[e,t,v[s]]};case 32:O.next=25;break;case 34:O.next=39;break;case 36:O.prev=36,O.t3=O.catch(23),l.e(O.t3);case 39:return O.prev=39,l.f(),O.finish(39);case 42:return O.prev=42,O.delegateYield(q(c),"t4",44);case 44:return O.finish(42);case 45:case"end":return O.stop()}}),ir,null,[[9,,42,45],[23,36,39,42]])}function wr(){var e;return w.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(f.apiFetch)({path:"/wp/v2/themes?status=active"});case 2:return e=t.sent,t.next=5,ee(e[0]);case 5:case"end":return t.stop()}}),ur)}function _r(){var e;return w.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(f.apiFetch)({path:"/wp/v2/themes?status=active"});case 2:return e=t.sent,t.next=5,te(e[0].theme_supports);case 5:case"end":return t.stop()}}),sr)}function kr(e){var t;return w.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(f.apiFetch)({path:Object(x.addQueryArgs)("/oembed/1.0/proxy",{url:e})});case 3:return t=r.sent,r.next=6,re(e,t);case 6:r.next=12;break;case 8:return r.prev=8,r.t0=r.catch(0),r.next=12,re(e,!1);case 12:case"end":return r.stop()}}),fr,null,[[0,8]])}function xr(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return nt()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),e.delegateYield(Rr("create","media"),"t0",2);case 2:case"end":return e.stop()}}),lr)}function Rr(e,t,r){var n,a,c,o,i,u;return w.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(n={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e]){s.next=4;break}throw new Error("'".concat(e,"' is not a valid action."));case 4:return a=r?"/wp/v2/".concat(t,"/").concat(r):"/wp/v2/".concat(t),s.prev=5,s.next=8,Object(f.apiFetch)({path:a,method:r?"GET":"OPTIONS",parse:!1});case 8:c=s.sent,s.next=14;break;case 11:return s.prev=11,s.t0=s.catch(5),s.abrupt("return");case 14:return o=Object(p.hasIn)(c,["headers","get"])?c.headers.get("allow"):Object(p.get)(c,["headers","Allow"],""),i=Object(p.compact)([e,t,r]).join("/"),u=Object(p.includes)(o,n),s.next=19,le(i,u);case 19:case"end":return s.stop()}}),dr,null,[[5,11]])}function Sr(e,t){var r,n,a;return w.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,s.controls.resolveSelect("core","getPostType",e);case 2:return r=c.sent,n=r.rest_base,c.next=6,Object(f.apiFetch)({path:"/wp/v2/".concat(n,"/").concat(t,"/autosaves?context=edit")});case 6:if(!(a=c.sent)||!a.length){c.next=10;break}return c.next=10,de(t,a);case 10:case"end":return c.stop()}}),pr)}function Tr(e,t){return w.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,s.controls.resolveSelect("core","getAutosaves",e,t);case 2:case"end":return r.stop()}}),br)}function Pr(e){var t,r;return w.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,{type:"REGULAR_FETCH",url:Object(x.addQueryArgs)(e,{"_wp-find-template":!0})};case 2:if(null!==(t=n.sent)){n.next=5;break}return n.abrupt("return");case 5:return n.next=7,gr("postType","wp_template",t.id);case 7:return n.next=9,s.controls.select("core","getEntityRecord","postType","wp_template",t.id);case 9:if(!(r=n.sent)){n.next=13;break}return n.next=13,Z("postType","wp_template",[r],{"find-template":e});case 13:case"end":return n.stop()}}),vr)}function Ir(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ar(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ar(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){i=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(i)throw c}}}}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{},n=r.id,a=Qr(e,t),c=null!=n?n:a,o=Object(s.useSelect)((function(r){var n=(0,r("core").getEditedEntityRecord)(e,t,c);return{blocks:n.blocks,content:n.content}}),[e,t,c]),i=o.content,u=o.blocks,f=Object(s.useDispatch)("core"),l=f.__unstableCreateUndoLevel,d=f.editEntityRecord;Object(Cr.useEffect)((function(){if(i&&"function"!=typeof i&&!u){var r=Object(Lr.parse)(i);d(e,t,c,{blocks:r},{undoIgnore:!0})}}),[i]);var p=Object(Cr.useCallback)((function(r,n){var a={blocks:r,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd};if(u===a.blocks)return l(e,t,c);a.content=function(e){var t=e.blocks,r=void 0===t?[]:t;return Object(Lr.__unstableSerializeAndClean)(r)},d(e,t,c,a)}),[e,t,c,u]),b=Object(Cr.useCallback)((function(r,n){var a=n.selectionStart,o=n.selectionEnd;d(e,t,c,{blocks:r,selectionStart:a,selectionEnd:o})}),[e,t,c]);return[null!=u?u:Vr,b,p]}function Kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Hr(e){for(var t=1;t1?t-1:0),o=1;o1?a-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(a,c){null!==c&&"object"===n(c)&&(a=a[1]),e.call(r,a,c,t)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}])&&a(t.prototype,r),o&&a(t,o),e}();e.exports=o}});