2 lines
41 KiB
JavaScript
2 lines
41 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.coreData=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="dsJ0")}({"1ZqX":function(e,t){e.exports=window.wp.data},"51Zz":function(e,t){e.exports=window.wp.dataControls},"7Cbv":function(e,t,n){"use strict";var r,i=new Uint8Array(16);function s(){if(!r&&!(r="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 r(i)}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 c=function(e){return"string"==typeof e&&o.test(e)},u=[],a=0;a<256;++a)u.push((a+256).toString(16).substr(1));var d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(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(!c(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return d(r)}},FtRg: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 i(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 s(e,t){var n=e._map,r=e._arrayTreeMap,i=e._objectTreeMap;if(n.has(t))return n.get(t);for(var s=Object.keys(t).sort(),o=Array.isArray(t)?r:i,c=0;c<s.length;c++){var u=s[c];if(void 0===(o=o.get(u)))return;var a=t[u];if(void 0===(o=o.get(a)))return}var d=o.get("_ekm_value");return d?(n.delete(d[0]),d[0]=t,o.set("_ekm_value",d),n.set(t,d),d):void 0}var o=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clear(),t instanceof e){var n=[];t.forEach((function(e,t){n.push([t,e])})),t=n}if(null!=t)for(var r=0;r<t.length;r++)this.set(t[r][0],t[r][1])}var t,n,o;return t=e,(n=[{key:"set",value:function(t,n){if(null===t||"object"!==r(t))return this._map.set(t,n),this;for(var i=Object.keys(t).sort(),s=[t,n],o=Array.isArray(t)?this._arrayTreeMap:this._objectTreeMap,c=0;c<i.length;c++){var u=i[c];o.has(u)||o.set(u,new e),o=o.get(u);var a=t[u];o.has(a)||o.set(a,new e),o=o.get(a)}var d=o.get("_ekm_value");return d&&this._map.delete(d[0]),o.set("_ekm_value",s),this._map.set(t,s),this}},{key:"get",value:function(e){if(null===e||"object"!==r(e))return this._map.get(e);var t=s(this,e);return t?t[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==r(e)?this._map.has(e):void 0!==s(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(i,s){null!==s&&"object"===r(s)&&(i=i[1]),e.call(n,i,s,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}}])&&i(t.prototype,n),o&&i(t,o),e}();e.exports=o},GRId:function(e,t){e.exports=window.wp.element},HSyU:function(e,t){e.exports=window.wp.blocks},Mmq9:function(e,t){e.exports=window.wp.url},YLtl:function(e,t){e.exports=window.lodash},dsJ0:function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return Nt})),n.d(t,"EntityProvider",(function(){return St})),n.d(t,"useEntityId",(function(){return Ut})),n.d(t,"useEntityProp",(function(){return At})),n.d(t,"useEntityBlockEditor",(function(){return xt})),n.d(t,"__experimentalFetchLinkSuggestions",(function(){return Pt})),n.d(t,"__experimentalFetchRemoteUrlData",(function(){return Lt}));var r={};n.r(r),n.d(r,"__unstableAcquireStoreLock",(function(){return v})),n.d(r,"__unstableEnqueueLockRequest",(function(){return g})),n.d(r,"__unstableReleaseStoreLock",(function(){return O})),n.d(r,"__unstableProcessPendingLockRequests",(function(){return R}));var i={};n.r(i),n.d(i,"receiveUserQuery",(function(){return A})),n.d(i,"receiveCurrentUser",(function(){return x})),n.d(i,"addEntities",(function(){return C})),n.d(i,"receiveEntityRecords",(function(){return P})),n.d(i,"receiveCurrentTheme",(function(){return L})),n.d(i,"receiveThemeSupports",(function(){return D})),n.d(i,"receiveEmbedPreview",(function(){return M})),n.d(i,"deleteEntityRecord",(function(){return q})),n.d(i,"editEntityRecord",(function(){return V})),n.d(i,"undo",(function(){return N})),n.d(i,"redo",(function(){return F})),n.d(i,"__unstableCreateUndoLevel",(function(){return Q})),n.d(i,"saveEntityRecord",(function(){return G})),n.d(i,"__experimentalBatch",(function(){return H})),n.d(i,"saveEditedEntityRecord",(function(){return Y})),n.d(i,"__experimentalSaveSpecifiedEntityEdits",(function(){return B})),n.d(i,"receiveUploadPermissions",(function(){return $})),n.d(i,"receiveUserPermission",(function(){return K})),n.d(i,"receiveAutosaves",(function(){return z}));var s={};n.r(s),n.d(s,"isRequestingEmbedPreview",(function(){return Oe})),n.d(s,"getAuthors",(function(){return Re})),n.d(s,"__unstableGetAuthor",(function(){return je})),n.d(s,"getCurrentUser",(function(){return we})),n.d(s,"getUserQueryResults",(function(){return Te})),n.d(s,"getEntitiesByKind",(function(){return ke})),n.d(s,"getEntity",(function(){return Ie})),n.d(s,"getEntityRecord",(function(){return Se})),n.d(s,"__experimentalGetEntityRecordNoResolver",(function(){return Ue})),n.d(s,"getRawEntityRecord",(function(){return Ae})),n.d(s,"hasEntityRecords",(function(){return xe})),n.d(s,"getEntityRecords",(function(){return Ce})),n.d(s,"__experimentalGetDirtyEntityRecords",(function(){return Pe})),n.d(s,"getEntityRecordEdits",(function(){return Le})),n.d(s,"getEntityRecordNonTransientEdits",(function(){return De})),n.d(s,"hasEditsForEntityRecord",(function(){return Me})),n.d(s,"getEditedEntityRecord",(function(){return qe})),n.d(s,"isAutosavingEntityRecord",(function(){return Ve})),n.d(s,"isSavingEntityRecord",(function(){return Ne})),n.d(s,"isDeletingEntityRecord",(function(){return Fe})),n.d(s,"getLastEntitySaveError",(function(){return Qe})),n.d(s,"getLastEntityDeleteError",(function(){return Ge})),n.d(s,"getUndoEdit",(function(){return Ye})),n.d(s,"getRedoEdit",(function(){return Be})),n.d(s,"hasUndo",(function(){return $e})),n.d(s,"hasRedo",(function(){return Ke})),n.d(s,"getCurrentTheme",(function(){return ze})),n.d(s,"getThemeSupports",(function(){return We})),n.d(s,"getEmbedPreview",(function(){return Ze})),n.d(s,"isPreviewEmbedFallback",(function(){return Xe})),n.d(s,"canUser",(function(){return Je})),n.d(s,"canUserEditEntityRecord",(function(){return et})),n.d(s,"getAutosaves",(function(){return tt})),n.d(s,"getAutosave",(function(){return nt})),n.d(s,"hasFetchedAutosaves",(function(){return rt})),n.d(s,"getReferenceByDistinctEdits",(function(){return it})),n.d(s,"__experimentalGetTemplateForLink",(function(){return st}));var o={};n.r(o),n.d(o,"getAuthors",(function(){return ct})),n.d(o,"__unstableGetAuthor",(function(){return ut})),n.d(o,"getCurrentUser",(function(){return at})),n.d(o,"getEntityRecord",(function(){return dt})),n.d(o,"getRawEntityRecord",(function(){return lt})),n.d(o,"getEditedEntityRecord",(function(){return ft})),n.d(o,"getEntityRecords",(function(){return pt})),n.d(o,"getCurrentTheme",(function(){return yt})),n.d(o,"getThemeSupports",(function(){return bt})),n.d(o,"getEmbedPreview",(function(){return Et})),n.d(o,"canUser",(function(){return mt})),n.d(o,"canUserEditEntityRecord",(function(){return ht})),n.d(o,"getAutosaves",(function(){return _t})),n.d(o,"getAutosave",(function(){return vt})),n.d(o,"__experimentalGetTemplateForLink",(function(){return gt}));var c={};n.r(c),n.d(c,"__unstableGetPendingLockRequests",(function(){return Ot})),n.d(c,"__unstableIsLockAvailable",(function(){return Rt}));var u=n("1ZqX"),a=n("51Zz"),d=n("YLtl"),l=n("rl8x"),f=n.n(l);var p=e=>t=>(n,r)=>void 0===n||e(r)?t(n,r):n;var y=e=>t=>(n,r)=>t(n,e(r));var b=e=>t=>(n={},r)=>{const i=r[e];if(void 0===i)return n;const s=t(n[i],r);return s===n[i]?n:{...n,[i]:s}},E=n("l3Sj"),m=n("7Cbv"),h=n("Mmq9");function _(e,t){return{type:"RECEIVE_ITEMS",items:Object(d.castArray)(e),persistedEdits:t}}function*v(e,t,{exclusive:n}){const r=yield*g(e,t,{exclusive:n});return yield*R(),yield Object(a.__unstableAwaitPromise)(r)}function*g(e,t,{exclusive:n}){let r;const i=new Promise(e=>{r=e});return yield{type:"ENQUEUE_LOCK_REQUEST",request:{store:e,path:t,exclusive:n,notifyAcquired:r}},i}function*O(e){yield{type:"RELEASE_LOCK",lock:e},yield*R()}function*R(){yield{type:"PROCESS_PENDING_LOCK_REQUESTS"};const e=yield u.controls.select("core","__unstableGetPendingLockRequests");for(const t of e){const{store:e,path:n,exclusive:r,notifyAcquired:i}=t;if(yield u.controls.select("core","__unstableIsLockAvailable",e,n,{exclusive:r})){const s={store:e,path:n,exclusive:r};yield{type:"GRANT_LOCK_REQUEST",lock:s,request:t},i(s)}}}var j=n("ywyh"),w=n.n(j);let T=null;async function k(e){if(null===T){const e=await w()({path:"/batch/v1",method:"OPTIONS"});T=e.endpoints[0].args.requests.maxItems}const t=[];for(const n of Object(d.chunk)(e,T)){const e=await w()({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map(e=>({path:e.path,body:e.data,method:e.method,headers:e.headers}))}});let r;r=e.failed?e.responses.map(e=>({error:null==e?void 0:e.body})):e.responses.map(e=>{const t={};return e.status>=200&&e.status<300?t.output=e.body:t.error=e.body,t}),t.push(...r)}return t}function I(e=k){let t=0,n=[];const r=new S;return{add(e){const i=++t;r.add(i);const s=e=>new Promise((t,s)=>{n.push({input:e,resolve:t,reject:s}),r.delete(i)});return Object(d.isFunction)(e)?Promise.resolve(e(s)).finally(()=>{r.delete(i)}):s(e)},async run(){let t;r.size&&await new Promise(e=>{const t=r.subscribe(()=>{r.size||(t(),e())})});try{if(t=await e(n.map(({input:e})=>e)),t.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(e){for(const{reject:t}of n)t(e);throw e}let i=!0;for(const[e,{resolve:r,reject:o}]of Object(d.zip)(t,n)){var s;if(null!=e&&e.error)o(e.error),i=!1;else r(null!==(s=null==e?void 0:e.output)&&void 0!==s?s:e)}return n=[],i}}}class S{constructor(...e){this.set=new Set(...e),this.subscribers=new Set}get size(){return this.set.size}add(...e){return this.set.add(...e),this.subscribers.forEach(e=>e()),this}delete(...e){const t=this.set.delete(...e);return this.subscribers.forEach(e=>e()),t}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}}var U={async REGULAR_FETCH({url:e}){const{data:t}=await window.fetch(e).then(e=>e.json());return t},GET_DISPATCH:Object(u.createRegistryControl)(({dispatch:e})=>()=>e)};function A(e,t){return{type:"RECEIVE_USER_QUERY",users:Object(d.castArray)(t),queryID:e}}function x(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function C(e){return{type:"ADD_ENTITIES",entities:e}}function P(e,t,n,r,i=!1,s){let o;return"postType"===e&&(n=Object(d.castArray)(n).map(e=>"auto-draft"===e.status?{...e,title:""}:e)),o=r?function(e,t={},n){return{..._(e,n),query:t}}(n,r,s):_(n,s),{...o,kind:e,name:t,invalidateCache:i}}function L(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function D(e){return{type:"RECEIVE_THEME_SUPPORTS",themeSupports:e}}function M(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}function*q(e,t,n,r,{__unstableFetch:i=null}={}){const s=yield te(e),o=Object(d.find)(s,{kind:e,name:t});let c,u=!1;if(!o)return;const l=yield*v("core",["entities","data",e,t,n],{exclusive:!0});try{yield{type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n};try{let s=`${o.baseURL}/${n}`;r&&(s=Object(h.addQueryArgs)(s,r));const c={path:s,method:"DELETE"};u=i?yield Object(a.__unstableAwaitPromise)(i(c)):yield Object(a.apiFetch)(c),yield function(e,t,n,r=!1){return{type:"REMOVE_ITEMS",itemIds:Object(d.castArray)(n),kind:e,name:t,invalidateCache:r}}(e,t,n,!0)}catch(e){c=e}return yield{type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:c},u}finally{yield*O(l)}}function*V(e,t,n,r,i={}){const s=yield u.controls.select("core","getEntity",e,t);if(!s)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{transientEdits:o={},mergedEdits:c={}}=s,a=yield u.controls.select("core","getRawEntityRecord",e,t,n),l=yield u.controls.select("core","getEditedEntityRecord",e,t,n),f={kind:e,name:t,recordId:n,edits:Object.keys(r).reduce((e,t)=>{const n=a[t],i=l[t],s=c[t]?{...i,...r[t]}:r[t];return e[t]=Object(d.isEqual)(n,s)?void 0:s,e},{}),transientEdits:o};return{type:"EDIT_ENTITY_RECORD",...f,meta:{undo:!i.undoIgnore&&{...f,edits:Object.keys(r).reduce((e,t)=>(e[t]=l[t],e),{})}}}}function*N(){const e=yield u.controls.select("core","getUndoEdit");e&&(yield{type:"EDIT_ENTITY_RECORD",...e,meta:{isUndo:!0}})}function*F(){const e=yield u.controls.select("core","getRedoEdit");e&&(yield{type:"EDIT_ENTITY_RECORD",...e,meta:{isRedo:!0}})}function Q(){return{type:"CREATE_UNDO_LEVEL"}}function*G(e,t,n,{isAutosave:r=!1,__unstableFetch:i=null}={}){const s=yield te(e),o=Object(d.find)(s,{kind:e,name:t});if(!o)return;const c=n[o.key||W],l=yield*v("core",["entities","data",e,t,c||Object(m.a)()],{exclusive:!0});try{for(const[r,i]of Object.entries(n))if("function"==typeof i){const s=i(yield u.controls.select("core","getEditedEntityRecord",e,t,c));yield V(e,t,c,{[r]:s},{undoIgnore:!0}),n[r]=s}let s,f;yield{type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:c,isAutosave:r};try{const l=`${o.baseURL}${c?"/"+c:""}`,f=yield u.controls.select("core","getRawEntityRecord",e,t,c);if(r){const r=yield u.controls.select("core","getCurrentUser"),o=r?r.id:void 0,c=yield u.controls.select("core","getAutosave",f.type,f.id,o);let p={...f,...c,...n};p=Object.keys(p).reduce((e,t)=>(["title","excerpt","content"].includes(t)&&(e[t]=Object(d.get)(p[t],"raw",p[t])),e),{status:"auto-draft"===p.status?"draft":p.status});const y={path:l+"/autosaves",method:"POST",data:p};if(s=i?yield Object(a.__unstableAwaitPromise)(i(y)):yield Object(a.apiFetch)(y),f.id===s.id){let n={...f,...p,...s};n=Object.keys(n).reduce((e,t)=>(["title","excerpt","content"].includes(t)?e[t]=Object(d.get)(n[t],"raw",n[t]):e[t]="status"===t?"auto-draft"===f.status&&"draft"===n.status?n.status:f.status:Object(d.get)(f[t],"raw",f[t]),e),{}),yield P(e,t,n,void 0,!0)}else yield z(f.id,s)}else{let r=n;o.__unstablePrePersist&&(r={...r,...o.__unstablePrePersist(f,r)});const u={path:l,method:c?"PUT":"POST",data:r};s=i?yield Object(a.__unstableAwaitPromise)(i(u)):yield Object(a.apiFetch)(u),yield P(e,t,s,void 0,!0,r)}}catch(e){f=e}return yield{type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:c,error:f,isAutosave:r},s}finally{yield*O(l)}}function*H(e){const t=I(),n=yield{type:"GET_DISPATCH"},r={saveEntityRecord:(e,r,i,s)=>t.add(t=>n("core").saveEntityRecord(e,r,i,{...s,__unstableFetch:t})),saveEditedEntityRecord:(e,r,i,s)=>t.add(t=>n("core").saveEditedEntityRecord(e,r,i,{...s,__unstableFetch:t})),deleteEntityRecord:(e,r,i,s,o)=>t.add(t=>n("core").deleteEntityRecord(e,r,i,s,{...o,__unstableFetch:t}))},i=e.map(e=>e(r)),[,...s]=yield Object(a.__unstableAwaitPromise)(Promise.all([t.run(),...i]));return s}function*Y(e,t,n,r){if(!(yield u.controls.select("core","hasEditsForEntityRecord",e,t,n)))return;const i={id:n,...yield u.controls.select("core","getEntityRecordNonTransientEdits",e,t,n)};return yield*G(e,t,i,r)}function*B(e,t,n,r,i){if(!(yield u.controls.select("core","hasEditsForEntityRecord",e,t,n)))return;const s=yield u.controls.select("core","getEntityRecordNonTransientEdits",e,t,n),o={};for(const e in s)r.some(t=>t===e)&&(o[e]=s[e]);return yield*G(e,t,o,i)}function $(e){return{type:"RECEIVE_USER_PERMISSION",key:"create/media",isAllowed:e}}function K(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function z(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Object(d.castArray)(t)}}const W="id",Z=[{label:Object(E.__)("Base"),name:"__unstableBase",kind:"root",baseURL:""},{label:Object(E.__)("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",getTitle:e=>Object(d.get)(e,["title"],Object(E.__)("Site Title"))},{label:Object(E.__)("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"}},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:Object(E.__)("Media")},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:Object(E.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",plural:"sidebars",transientEdits:{blocks:!0},label:Object(E.__)("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:Object(E.__)("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:Object(E.__)("Widget types")},{label:Object(E.__)("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:Object(E.__)("Comment")},{name:"menu",kind:"root",baseURL:"/__experimental/menus",baseURLParams:{context:"edit"},plural:"menus",label:Object(E.__)("Menu")},{name:"menuItem",kind:"root",baseURL:"/__experimental/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:Object(E.__)("Menu Item")},{name:"menuLocation",kind:"root",baseURL:"/__experimental/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:Object(E.__)("Menu Location"),key:"name"}],X=[{name:"postType",loadEntities:function*(){const e=yield Object(a.apiFetch)({path:"/wp/v2/types?context=edit"});return Object(d.map)(e,(e,t)=>{const n=["wp_template","wp_template_part"].includes(t);return{kind:"postType",baseURL:"/wp/v2/"+e.rest_base,baseURLParams:{context:"edit"},name:t,label:e.labels.singular_name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},getTitle:e=>{var t;return(null==e||null===(t=e.title)||void 0===t?void 0:t.rendered)||(null==e?void 0:e.title)||(n?Object(d.startCase)(e.slug):String(e.id))},__unstablePrePersist:n?void 0:J,__unstable_rest_base:e.rest_base}})}},{name:"taxonomy",loadEntities:function*(){const e=yield Object(a.apiFetch)({path:"/wp/v2/taxonomies?context=edit"});return Object(d.map)(e,(e,t)=>({kind:"taxonomy",baseURL:"/wp/v2/"+e.rest_base,baseURLParams:{context:"edit"},name:t,label:e.labels.singular_name}))}}],J=(e,t)=>{const n={};return"auto-draft"===(null==e?void 0:e.status)&&(t.status||n.status||(n.status="draft"),t.title&&"Auto Draft"!==t.title||n.title||null!=e&&e.title&&"Auto Draft"!==(null==e?void 0:e.title)||(n.title="")),n};const ee=(e,t,n="get",r=!1)=>{const i=Object(d.find)(Z,{kind:e,name:t}),s="root"===e?"":Object(d.upperFirst)(Object(d.camelCase)(e)),o=Object(d.upperFirst)(Object(d.camelCase)(t))+(r?"s":"");return`${n}${s}${r&&i.plural?Object(d.upperFirst)(Object(d.camelCase)(i.plural)):o}`};function*te(e){let t=yield u.controls.select("core","getEntitiesByKind",e);if(t&&0!==t.length)return t;const n=Object(d.find)(X,{name:e});return n?(t=yield n.loadEntities(),yield C(t),t):[]}var ne=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null};var re=function(e){const t=new WeakMap;return n=>{let r;return t.has(n)?r=t.get(n):(r=e(n),Object(d.isObjectLike)(n)&&t.set(n,r)),r}}((function(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let r=0;r<n.length;r++){const i=n[r];let s=e[i];switch(i){case"page":t[i]=Number(s);break;case"per_page":t.perPage=Number(s);break;case"include":t.include=ne(s).map(Number);break;case"context":t.context=s;break;default:"_fields"===i&&(t.fields=ne(s),s=t.fields.join()),t.stableKey+=(t.stableKey?"&":"")+Object(h.addQueryArgs)("",{[i]:s}).slice(1)}}return t}));function ie(e){const{query:t}=e;if(!t)return"default";return re(t).context}const se=Object(d.flowRight)([p(e=>"query"in e),y(e=>e.query?{...e,...re(e.query)}:e),b("context"),b("stableKey")])((e=null,t)=>{const{type:n,page:r,perPage:i,key:s=W}=t;return"RECEIVE_ITEMS"!==n?e:function(e,t,n,r){if(1===n&&-1===r)return t;const i=(n-1)*r,s=Math.max(e.length,i+t.length),o=new Array(s);for(let n=0;n<s;n++){const r=n>=i&&n<i+t.length;o[n]=r?t[n-i]:e[n]}return o}(e||[],Object(d.map)(t.items,s),r,i)});var oe=Object(u.combineReducers)({items:function(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=ie(t),r=t.key||W;return{...e,[n]:{...e[n],...t.items.reduce((t,i)=>{var s;const o=i[r];return t[o]=function(e,t){if(!e)return t;let n=!1;const r={};for(const i in t)Object(d.isEqual)(e[i],t[i])?r[i]=e[i]:(n=!0,r[i]=t[i]);if(!n)return e;for(const t in e)r.hasOwnProperty(t)||(r[t]=e[t]);return r}(null==e||null===(s=e[n])||void 0===s?void 0:s[o],i),t},{})}}}case"REMOVE_ITEMS":return Object(d.mapValues)(e,e=>Object(d.omit)(e,t.itemIds))}return e},itemIsComplete:function(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=ie(t),{query:r,key:i=W}=t,s=r?re(r):{},o=!r||!Array.isArray(s.fields);return{...e,[n]:{...e[n],...t.items.reduce((t,r)=>{var s;const c=r[i];return t[c]=(null==e||null===(s=e[n])||void 0===s?void 0:s[c])||o,t},{})}}}case"REMOVE_ITEMS":return Object(d.mapValues)(e,e=>Object(d.omit)(e,t.itemIds))}return e},queries:(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return se(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce((e,t)=>(e[t]=!0,e),{});return Object(d.mapValues)(e,e=>Object(d.mapValues)(e,e=>Object(d.filter)(e,e=>!n[e])));default:return e}}});function ce(e,t){const n={...e};let r=n;for(const e of t)r.children={...r.children,[e]:{locks:[],children:{},...r.children[e]}},r=r.children[e];return n}function ue(e,t){let n=e;for(const e of t){const t=n.children[e];if(!t)return null;n=t}return n}function ae({exclusive:e},t){return!(!e||!t.length)||!(e||!t.filter(e=>e.exclusive).length)}const de={requests:[],tree:{locks:[],children:{}}};var le=function(e=de,t){switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:r}=t,{store:i,path:s}=r,o=[i,...s],c=ce(e.tree,o),u=ue(c,o);return u.locks=[...u.locks,n],{...e,requests:e.requests.filter(e=>e!==r),tree:c}}case"RELEASE_LOCK":{const{lock:n}=t,r=[n.store,...n.path],i=ce(e.tree,r),s=ue(i,r);return s.locks=s.locks.filter(e=>e!==n),{...e,tree:i}}}return e};function fe(e){return Object(d.flowRight)([p(t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind),y(t=>({...t,key:e.key||W}))])(Object(u.combineReducers)({queriedData:oe,edits:(e={},t)=>{var n,r;switch(t.type){case"RECEIVE_ITEMS":if("default"!==(null!==(n=null==t||null===(r=t.query)||void 0===r?void 0:r.context)&&void 0!==n?n:"default"))return e;const i={...e};for(const e of t.items){const n=e[t.key],r=i[n];if(!r)continue;const s=Object.keys(r).reduce((n,i)=>(Object(d.isEqual)(r[i],Object(d.get)(e[i],"raw",e[i]))||t.persistedEdits&&Object(d.isEqual)(r[i],t.persistedEdits[i])||(n[i]=r[i]),n),{});Object.keys(s).length?i[n]=s:delete i[n]}return i;case"EDIT_ENTITY_RECORD":const s={...e[t.recordId],...t.edits};return Object.keys(s).forEach(e=>{void 0===s[e]&&delete s[e]}),{...e,[t.recordId]:s}}return e},saving:(e={},t)=>{switch(t.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...e,[t.recordId]:{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}}}return e},deleting:(e={},t)=>{switch(t.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...e,[t.recordId]:{pending:"DELETE_ENTITY_RECORD_START"===t.type,error:t.error}}}return e}}))}const pe=[];let ye;pe.offset=0;var be=Object(u.combineReducers)({terms:function(e={},t){switch(t.type){case"RECEIVE_TERMS":return{...e,[t.taxonomy]:t.terms}}return e},users:function(e={byId:{},queries:{}},t){switch(t.type){case"RECEIVE_USER_QUERY":return{byId:{...e.byId,...Object(d.keyBy)(t.users,"id")},queries:{...e.queries,[t.queryID]:Object(d.map)(t.users,e=>e.id)}}}return e},currentTheme:function(e,t){switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e},currentUser:function(e={},t){switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e},taxonomies:function(e=[],t){switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e},themes:function(e={},t){switch(t.type){case"RECEIVE_CURRENT_THEME":return{...e,[t.currentTheme.stylesheet]:t.currentTheme}}return e},themeSupports:function(e={},t){switch(t.type){case"RECEIVE_THEME_SUPPORTS":return{...e,...t.themeSupports}}return e},entities:(e={},t)=>{const n=function(e=Z,t){switch(t.type){case"ADD_ENTITIES":return[...e,...t.entities]}return e}(e.config,t);let r=e.reducer;if(!r||n!==e.config){const e=Object(d.groupBy)(n,"kind");r=Object(u.combineReducers)(Object.entries(e).reduce((e,[t,n])=>{const r=Object(u.combineReducers)(n.reduce((e,t)=>({...e,[t.name]:fe(t)}),{}));return e[t]=r,e},{}))}const i=r(e.data,t);return i===e.data&&n===e.config&&r===e.reducer?e:{reducer:r,data:i,config:n}},undo:function(e=pe,t){switch(t.type){case"EDIT_ENTITY_RECORD":case"CREATE_UNDO_LEVEL":let n="CREATE_UNDO_LEVEL"===t.type;const r=!n&&(t.meta.isUndo||t.meta.isRedo);let i;if(n?t=ye:r||(ye=Object.keys(t.edits).some(e=>!t.transientEdits[e])?t:{...t,edits:{...ye&&ye.edits,...t.edits}}),r){if(i=[...e],i.offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return i;n=!0,t=ye}if(!t.meta.undo)return e;if(!n&&!Object.keys(t.edits).some(e=>!t.transientEdits[e]))return i=[...e],i.flattenedUndo={...e.flattenedUndo,...t.edits},i.offset=e.offset,i;i=i||e.slice(0,e.offset||void 0),i.offset=i.offset||0,i.pop(),n||i.push({kind:t.meta.undo.kind,name:t.meta.undo.name,recordId:t.meta.undo.recordId,edits:{...e.flattenedUndo,...t.meta.undo.edits}});const s=Object.values(t.meta.undo.edits).filter(e=>"function"!=typeof e),o=Object.values(t.edits).filter(e=>"function"!=typeof e);return f()(s,o)||i.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:n?{...e.flattenedUndo,...t.edits}:t.edits}),i}return e},embedPreviews:function(e={},t){switch(t.type){case"RECEIVE_EMBED_PREVIEW":const{url:n,preview:r}=t;return{...e,[n]:r}}return e},userPermissions:function(e={},t){switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed}}return e},autosaves:function(e={},t){switch(t.type){case"RECEIVE_AUTOSAVES":const{postId:n,autosaves:r}=t;return{...e,[n]:r}}return e},locks:le}),Ee=n("pPDe");var me=n("FtRg"),he=n.n(me);const _e=new WeakMap;const ve=Object(Ee.a)((e,t={})=>{let n=_e.get(e);if(n){const e=n.get(t);if(void 0!==e)return e}else n=new he.a,_e.set(e,n);const r=function(e,t){var n,r;const{stableKey:i,page:s,perPage:o,include:c,fields:u,context:a}=re(t);let l;if(Array.isArray(c)&&!i?l=c:null!==(n=e.queries)&&void 0!==n&&null!==(r=n[a])&&void 0!==r&&r[i]&&(l=e.queries[a][i]),!l)return null;const f=-1===o?0:(s-1)*o,p=-1===o?l.length:Math.min(f+o,l.length),y=[];for(let t=f;t<p;t++){var b;const n=l[t];if(Array.isArray(c)&&!c.includes(n))continue;if(null===(b=e.items[a])||void 0===b||!b.hasOwnProperty(n))return null;const r=e.items[a][n];let i;if(Array.isArray(u)){i={};for(let e=0;e<u.length;e++){const t=u[e].split("."),n=Object(d.get)(r,t);Object(d.set)(i,t,n)}}else{var E;if(null===(E=e.itemIsComplete[a])||void 0===E||!E[n])return null;i=r}y.push(i)}return y}(e,t);return n.set(t,r),r}),ge=[],Oe=Object(u.createRegistrySelector)(e=>(t,n)=>e("core/data").isResolving("core","getEmbedPreview",[n]));function Re(e,t){const n=Object(h.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",t);return Te(e,n)}function je(e,t){return Object(d.get)(e,["users","byId",t],null)}function we(e){return e.currentUser}const Te=Object(Ee.a)((e,t)=>{const n=e.users.queries[t];return Object(d.map)(n,t=>e.users.byId[t])},(e,t)=>[e.users.queries[t],e.users.byId]);function ke(e,t){return Object(d.filter)(e.entities.config,{kind:t})}function Ie(e,t,n){return Object(d.find)(e.entities.config,{kind:t,name:n})}function Se(e,t,n,r,i){var s,o;const c=Object(d.get)(e.entities.data,[t,n,"queriedData"]);if(!c)return;const u=null!==(s=null==i?void 0:i.context)&&void 0!==s?s:"default";if(void 0===i){var a;if(null===(a=c.itemIsComplete[u])||void 0===a||!a[r])return;return c.items[u][r]}const l=null===(o=c.items[u])||void 0===o?void 0:o[r];if(l&&i._fields){const e={},t=ne(i._fields);for(let n=0;n<t.length;n++){const r=t[n].split("."),i=Object(d.get)(l,r);Object(d.set)(e,r,i)}return e}return l}function Ue(e,t,n,r){return Se(e,t,n,r)}const Ae=Object(Ee.a)((e,t,n,r)=>{const i=Se(e,t,n,r);return i&&Object.keys(i).reduce((e,t)=>(e[t]=Object(d.get)(i[t],"raw",i[t]),e),{})},e=>[e.entities.data]);function xe(e,t,n,r){return Array.isArray(Ce(e,t,n,r))}function Ce(e,t,n,r){const i=Object(d.get)(e.entities.data,[t,n,"queriedData"]);return i?ve(i,r):ge}const Pe=Object(Ee.a)(e=>{const{entities:{data:t}}=e,n=[];return Object.keys(t).forEach(r=>{Object.keys(t[r]).forEach(i=>{const s=Object.keys(t[r][i].edits).filter(t=>Me(e,r,i,t));if(s.length){const t=Ie(e,r,i);s.forEach(s=>{var o;const c=qe(e,r,i,s);n.push({key:c[t.key||W],title:(null==t||null===(o=t.getTitle)||void 0===o?void 0:o.call(t,c))||"",name:i,kind:r})})}})}),n},e=>[e.entities.data]);function Le(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"edits",r])}const De=Object(Ee.a)((e,t,n,r)=>{const{transientEdits:i}=Ie(e,t,n)||{},s=Le(e,t,n,r)||{};return i?Object.keys(s).reduce((e,t)=>(i[t]||(e[t]=s[t]),e),{}):s},e=>[e.entities.config,e.entities.data]);function Me(e,t,n,r){return Ne(e,t,n,r)||Object.keys(De(e,t,n,r)).length>0}const qe=Object(Ee.a)((e,t,n,r)=>({...Ae(e,t,n,r),...Le(e,t,n,r)}),e=>[e.entities.data]);function Ve(e,t,n,r){const{pending:i,isAutosave:s}=Object(d.get)(e.entities.data,[t,n,"saving",r],{});return Boolean(i&&s)}function Ne(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"saving",r,"pending"],!1)}function Fe(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"deleting",r,"pending"],!1)}function Qe(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"saving",r,"error"])}function Ge(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"deleting",r,"error"])}function He(e){return e.undo.offset}function Ye(e){return e.undo[e.undo.length-2+He(e)]}function Be(e){return e.undo[e.undo.length+He(e)]}function $e(e){return Boolean(Ye(e))}function Ke(e){return Boolean(Be(e))}function ze(e){return e.themes[e.currentTheme]}function We(e){return e.themeSupports}function Ze(e,t){return e.embedPreviews[t]}function Xe(e,t){const n=e.embedPreviews[t],r='<a href="'+t+'">'+t+"</a>";return!!n&&n.html===r}function Je(e,t,n,r){const i=Object(d.compact)([t,n,r]).join("/");return Object(d.get)(e,["userPermissions",i])}function et(e,t,n,r){const i=Ie(e,t,n);if(!i)return!1;return Je(e,"update",i.__unstable_rest_base,r)}function tt(e,t,n){return e.autosaves[n]}function nt(e,t,n,r){if(void 0===r)return;const i=e.autosaves[n];return Object(d.find)(i,{author:r})}const rt=Object(u.createRegistrySelector)(e=>(t,n,r)=>e("core").hasFinishedResolution("getAutosaves",[n,r])),it=Object(Ee.a)(()=>[],e=>[e.undo.length,e.undo.offset,e.undo.flattenedUndo]);function st(e,t){const n=Ce(e,"postType","wp_template",{"find-template":t}),r=null!=n&&n.length?n[0]:null;return r?qe(e,"postType","wp_template",r.id):r}var ot=(e,t)=>function*(...n){(yield u.controls.select("core","hasStartedResolution",t,n))||(yield*e(...n))};function*ct(e){const t=Object(h.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",e),n=yield Object(a.apiFetch)({path:t});yield A(t,n)}function*ut(e){const t="/wp/v2/users?who=authors&include="+e,n=yield Object(a.apiFetch)({path:t});yield A("author",n)}function*at(){const e=yield Object(a.apiFetch)({path:"/wp/v2/users/me"});yield x(e)}function*dt(e,t,n="",r){const i=yield te(e),s=Object(d.find)(i,{kind:e,name:t});if(!s)return;const o=yield*v("core",["entities","data",e,t,n],{exclusive:!1});try{void 0!==r&&r._fields&&(r={...r,_fields:Object(d.uniq)([...ne(r._fields)||[],s.key||W]).join()});const i=Object(h.addQueryArgs)(s.baseURL+"/"+n,{...s.baseURLParams,...r});if(void 0!==r){r={...r,include:[n]};if(yield u.controls.select("core","hasEntityRecords",e,t,r))return}const c=yield Object(a.apiFetch)({path:i});yield P(e,t,c,r)}catch(e){}finally{yield*O(o)}}const lt=ot(dt,"getEntityRecord"),ft=ot(lt,"getRawEntityRecord");function*pt(e,t,n={}){const r=yield te(e),i=Object(d.find)(r,{kind:e,name:t});if(!i)return;const s=yield*v("core",["entities","data",e,t],{exclusive:!1});try{var o;n._fields&&(n={...n,_fields:Object(d.uniq)([...ne(n._fields)||[],i.key||W]).join()});const r=Object(h.addQueryArgs)(i.baseURL,{...i.baseURLParams,...n});let c=Object.values(yield Object(a.apiFetch)({path:r}));if(n._fields&&(c=c.map(e=>(n._fields.split(",").forEach(t=>{e.hasOwnProperty(t)||(e[t]=void 0)}),e))),yield P(e,t,c,n),!(null!==(o=n)&&void 0!==o&&o._fields||n.context)){const n=i.key||W,r=c.filter(e=>e[n]).map(r=>[e,t,r[n]]);yield{type:"START_RESOLUTIONS",selectorName:"getEntityRecord",args:r},yield{type:"FINISH_RESOLUTIONS",selectorName:"getEntityRecord",args:r}}}finally{yield*O(s)}}function*yt(){const e=yield Object(a.apiFetch)({path:"/wp/v2/themes?status=active"});yield L(e[0])}function*bt(){const e=yield Object(a.apiFetch)({path:"/wp/v2/themes?status=active"});yield D(e[0].theme_supports)}function*Et(e){try{const t=yield Object(a.apiFetch)({path:Object(h.addQueryArgs)("/oembed/1.0/proxy",{url:e})});yield M(e,t)}catch(t){yield M(e,!1)}}function*mt(e,t,n){const r={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e];if(!r)throw new Error(`'${e}' is not a valid action.`);const i=n?`/wp/v2/${t}/${n}`:"/wp/v2/"+t;let s,o;try{s=yield Object(a.apiFetch)({path:i,method:n?"GET":"OPTIONS",parse:!1})}catch(e){return}o=Object(d.hasIn)(s,["headers","get"])?s.headers.get("allow"):Object(d.get)(s,["headers","Allow"],"");const c=Object(d.compact)([e,t,n]).join("/"),u=Object(d.includes)(o,r);yield K(c,u)}function*ht(e,t,n){const r=yield te(e),i=Object(d.find)(r,{kind:e,name:t});if(!i)return;const s=i.__unstable_rest_base;yield mt("update",s,n)}function*_t(e,t){const{rest_base:n}=yield u.controls.resolveSelect("core","getPostType",e),r=yield Object(a.apiFetch)({path:`/wp/v2/${n}/${t}/autosaves?context=edit`});r&&r.length&&(yield z(t,r))}function*vt(e,t){yield u.controls.resolveSelect("core","getAutosaves",e,t)}function*gt(e){let t;try{t=yield(n=Object(h.addQueryArgs)(e,{"_wp-find-template":!0}),{type:"REGULAR_FETCH",url:n})}catch(e){}var n;if(!t)return;yield dt("postType","wp_template",t.id);const r=yield u.controls.select("core","getEntityRecord","postType","wp_template",t.id);r&&(yield P("postType","wp_template",[r],{"find-template":e}))}function Ot(e){return e.locks.requests}function Rt(e,t,n,{exclusive:r}){const i=[t,...n],s=e.locks.tree;for(const e of function*(e,t){let n=e;yield n;for(const e of t){const t=n.children[e];if(!t)break;yield t,n=t}}(s,i))if(ae({exclusive:r},e.locks))return!1;const o=ue(s,i);if(!o)return!0;for(const e of function*(e){const t=Object.values(e.children);for(;t.length;){const e=t.pop();yield e,t.push(...Object.values(e.children))}}(o))if(ae({exclusive:r},e.locks))return!1;return!0}pt.shouldInvalidate=(e,t,n)=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&n===e.name,gt.shouldInvalidate=e=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&"postType"===e.kind&&"wp_template"===e.name;var jt=n("GRId"),wt=n("HSyU");const Tt=[],kt={...Z.reduce((e,t)=>(e[t.kind]||(e[t.kind]={}),e[t.kind][t.name]={context:Object(jt.createContext)()},e),{}),...X.reduce((e,t)=>(e[t.name]={},e),{})},It=(e,t)=>{if(!kt[e])throw new Error(`Missing entity config for kind: ${e}.`);return kt[e][t]||(kt[e][t]={context:Object(jt.createContext)()}),kt[e][t]};function St({kind:e,type:t,id:n,children:r}){const i=It(e,t).context.Provider;return Object(jt.createElement)(i,{value:n},r)}function Ut(e,t){return Object(jt.useContext)(It(e,t).context)}function At(e,t,n,r){const i=Ut(e,t),s=null!=r?r:i,{value:o,fullValue:c}=Object(u.useSelect)(r=>{const{getEntityRecord:i,getEditedEntityRecord:o}=r("core"),c=i(e,t,s),u=o(e,t,s);return c&&u?{value:u[n],fullValue:c[n]}:{}},[e,t,s,n]),{editEntityRecord:a}=Object(u.useDispatch)("core");return[o,Object(jt.useCallback)(r=>{a(e,t,s,{[n]:r})},[e,t,s,n]),c]}function xt(e,t,{id:n}={}){const r=Ut(e,t),i=null!=n?n:r,{content:s,blocks:o}=Object(u.useSelect)(n=>{const{getEditedEntityRecord:r}=n("core"),s=r(e,t,i);return{blocks:s.blocks,content:s.content}},[e,t,i]),{__unstableCreateUndoLevel:c,editEntityRecord:a}=Object(u.useDispatch)("core");Object(jt.useEffect)(()=>{if(s&&"function"!=typeof s&&!o){const n=Object(wt.parse)(s);a(e,t,i,{blocks:n},{undoIgnore:!0})}},[s]);const d=Object(jt.useCallback)((n,r)=>{const{selection:s}=r,u={blocks:n,selection:s};if(o===u.blocks)return c(e,t,i);u.content=({blocks:e=[]})=>Object(wt.__unstableSerializeAndClean)(e),a(e,t,i,u)},[e,t,i,o]),l=Object(jt.useCallback)((n,r)=>{const{selection:s}=r;a(e,t,i,{blocks:n,selection:s})},[e,t,i]);return[null!=o?o:Tt,l,d]}var Ct=n("rmEH");var Pt=async(e,t={},n={})=>{const{isInitialSuggestions:r=!1,type:i,subtype:s,page:o,perPage:c=(r?3:20)}=t,{disablePostFormats:u=!1}=n,a=[];return i&&"post"!==i||a.push(w()({path:Object(h.addQueryArgs)("/wp/v2/search",{search:e,page:o,per_page:c,type:"post",subtype:s})}).then(e=>e.map(e=>({...e,meta:{kind:"post-type",subtype:s}}))).catch(()=>[])),i&&"term"!==i||a.push(w()({path:Object(h.addQueryArgs)("/wp/v2/search",{search:e,page:o,per_page:c,type:"term",subtype:s})}).then(e=>e.map(e=>({...e,meta:{kind:"taxonomy",subtype:s}}))).catch(()=>[])),u||i&&"post-format"!==i||a.push(w()({path:Object(h.addQueryArgs)("/wp/v2/search",{search:e,page:o,per_page:c,type:"post-format",subtype:s})}).then(e=>e.map(e=>({...e,meta:{kind:"taxonomy",subtype:s}}))).catch(()=>[])),Promise.all(a).then(e=>e.reduce((e,t)=>e.concat(t),[]).filter(e=>!!e.id).slice(0,c).map(e=>{var t;return{id:e.id,url:e.url,title:Object(Ct.decodeEntities)(e.title||"")||Object(E.__)("(no title)"),type:e.subtype||e.type,kind:null==e||null===(t=e.meta)||void 0===t?void 0:t.kind}}))};var Lt=async e=>{const t={url:Object(h.prependHTTP)(e)};return w()({path:Object(h.addQueryArgs)("/__experimental/url-details",t)})};const Dt=Z.reduce((e,t)=>{const{kind:n,name:r}=t;return e[ee(n,r)]=(e,t)=>Se(e,n,r,t),e[ee(n,r,"get",!0)]=(e,...t)=>Ce(e,n,r,...t),e},{}),Mt=Z.reduce((e,t)=>{const{kind:n,name:r}=t;e[ee(n,r)]=e=>dt(n,r,e);const i=ee(n,r,"get",!0);return e[i]=(...e)=>pt(n,r,...e),e[i].shouldInvalidate=(e,...t)=>pt.shouldInvalidate(e,n,r,...t),e},{}),qt=Z.reduce((e,t)=>{const{kind:n,name:r}=t;return e[ee(n,r,"save")]=e=>G(n,r,e),e[ee(n,r,"delete")]=(e,t)=>q(n,r,e,t),e},{}),Vt={reducer:be,controls:{...U,...a.controls},actions:{...i,...qt,...r},selectors:{...s,...Dt,...c},resolvers:{...o,...Mt}},Nt=Object(u.createReduxStore)("core",Vt);Object(u.register)(Nt)},l3Sj:function(e,t){e.exports=window.wp.i18n},pPDe:function(e,t,n){"use strict";var r,i;function s(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function c(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={},i="undefined"!=typeof WeakMap,t.a=function(e,t){var n,u;function a(){n=i?new WeakMap:o()}function d(){var n,r,i,s,o,a=arguments.length;for(s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];for(o=t.apply(null,s),(n=u(o)).isUniqueByDependants||(n.lastDependants&&!c(o,n.lastDependants,0)&&n.clear(),n.lastDependants=o),r=n.head;r;){if(c(r.args,s,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,s)},s[0]=null,r.args=s,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=s),u=i?function(e){var t,i,s,c,u,a=n,d=!0;for(t=0;t<e.length;t++){if(i=e[t],!(u=i)||"object"!=typeof u){d=!1;break}a.has(i)?a=a.get(i):(s=new WeakMap,a.set(i,s),a=s)}return a.has(r)||((c=o()).isUniqueByDependants=d,a.set(r,c)),a.get(r)}:function(){return n},d.getDependants=t,d.clear=a,a(),d}},rl8x:function(e,t){e.exports=window.wp.isShallowEqual},rmEH:function(e,t){e.exports=window.wp.htmlEntities},ywyh:function(e,t){e.exports=window.wp.apiFetch}}); |