WordPress/wp-includes/js/dist/core-data.min.js
Peter Wilson abde9678b4 Build tools: Use hashed module IDs for minified files.
Further improves webpack configuration for editor files to use hashed module IDs in the compressed (`*.min.js`) production files.

Follow up to [50940].

Props gziolo, peterwilsoncc.
Fixes #53192.


Built from https://develop.svn.wordpress.org/trunk@51035


git-svn-id: http://core.svn.wordpress.org/trunk@50644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 00:17:06 +00:00

2 lines
39 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 Dt})),n.d(t,"EntityProvider",(function(){return wt})),n.d(t,"useEntityId",(function(){return Tt})),n.d(t,"useEntityProp",(function(){return kt})),n.d(t,"useEntityBlockEditor",(function(){return It})),n.d(t,"__experimentalFetchLinkSuggestions",(function(){return Ut})),n.d(t,"__experimentalFetchRemoteUrlData",(function(){return At}));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 R})),n.d(r,"__unstableProcessPendingLockRequests",(function(){return O}));var i={};n.r(i),n.d(i,"receiveUserQuery",(function(){return U})),n.d(i,"receiveCurrentUser",(function(){return A})),n.d(i,"addEntities",(function(){return C})),n.d(i,"receiveEntityRecords",(function(){return x})),n.d(i,"receiveCurrentTheme",(function(){return P})),n.d(i,"receiveThemeSupports",(function(){return L})),n.d(i,"receiveEmbedPreview",(function(){return D})),n.d(i,"deleteEntityRecord",(function(){return M})),n.d(i,"editEntityRecord",(function(){return q})),n.d(i,"undo",(function(){return N})),n.d(i,"redo",(function(){return V})),n.d(i,"__unstableCreateUndoLevel",(function(){return F})),n.d(i,"saveEntityRecord",(function(){return Q})),n.d(i,"__experimentalBatch",(function(){return G})),n.d(i,"saveEditedEntityRecord",(function(){return H})),n.d(i,"__experimentalSaveSpecifiedEntityEdits",(function(){return Y})),n.d(i,"receiveUploadPermissions",(function(){return B})),n.d(i,"receiveUserPermission",(function(){return $})),n.d(i,"receiveAutosaves",(function(){return K}));var s={};n.r(s),n.d(s,"isRequestingEmbedPreview",(function(){return ve})),n.d(s,"getAuthors",(function(){return ge})),n.d(s,"__unstableGetAuthor",(function(){return Re})),n.d(s,"getCurrentUser",(function(){return Oe})),n.d(s,"getUserQueryResults",(function(){return je})),n.d(s,"getEntitiesByKind",(function(){return we})),n.d(s,"getEntity",(function(){return Te})),n.d(s,"getEntityRecord",(function(){return ke})),n.d(s,"__experimentalGetEntityRecordNoResolver",(function(){return Ie})),n.d(s,"getRawEntityRecord",(function(){return Se})),n.d(s,"hasEntityRecords",(function(){return Ue})),n.d(s,"getEntityRecords",(function(){return Ae})),n.d(s,"__experimentalGetDirtyEntityRecords",(function(){return Ce})),n.d(s,"getEntityRecordEdits",(function(){return xe})),n.d(s,"getEntityRecordNonTransientEdits",(function(){return Pe})),n.d(s,"hasEditsForEntityRecord",(function(){return Le})),n.d(s,"getEditedEntityRecord",(function(){return De})),n.d(s,"isAutosavingEntityRecord",(function(){return Me})),n.d(s,"isSavingEntityRecord",(function(){return qe})),n.d(s,"isDeletingEntityRecord",(function(){return Ne})),n.d(s,"getLastEntitySaveError",(function(){return Ve})),n.d(s,"getLastEntityDeleteError",(function(){return Fe})),n.d(s,"getUndoEdit",(function(){return Ge})),n.d(s,"getRedoEdit",(function(){return He})),n.d(s,"hasUndo",(function(){return Ye})),n.d(s,"hasRedo",(function(){return Be})),n.d(s,"getCurrentTheme",(function(){return $e})),n.d(s,"getThemeSupports",(function(){return Ke})),n.d(s,"getEmbedPreview",(function(){return ze})),n.d(s,"isPreviewEmbedFallback",(function(){return We})),n.d(s,"canUser",(function(){return Ze})),n.d(s,"getAutosaves",(function(){return Xe})),n.d(s,"getAutosave",(function(){return Je})),n.d(s,"hasFetchedAutosaves",(function(){return et})),n.d(s,"getReferenceByDistinctEdits",(function(){return tt})),n.d(s,"__experimentalGetTemplateForLink",(function(){return nt}));var o={};n.r(o),n.d(o,"getAuthors",(function(){return it})),n.d(o,"__unstableGetAuthor",(function(){return st})),n.d(o,"getCurrentUser",(function(){return ot})),n.d(o,"getEntityRecord",(function(){return ct})),n.d(o,"getRawEntityRecord",(function(){return ut})),n.d(o,"getEditedEntityRecord",(function(){return at})),n.d(o,"getEntityRecords",(function(){return dt})),n.d(o,"getCurrentTheme",(function(){return lt})),n.d(o,"getThemeSupports",(function(){return ft})),n.d(o,"getEmbedPreview",(function(){return pt})),n.d(o,"canUser",(function(){return yt})),n.d(o,"getAutosaves",(function(){return Et})),n.d(o,"getAutosave",(function(){return bt})),n.d(o,"__experimentalGetTemplateForLink",(function(){return mt}));var c={};n.r(c),n.d(c,"__unstableGetPendingLockRequests",(function(){return ht})),n.d(c,"__unstableIsLockAvailable",(function(){return _t}));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 E=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}},b=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*O(),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*R(e){yield{type:"RELEASE_LOCK",lock:e},yield*O()}function*O(){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);async function T(e){const t=await w()({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:e.map(e=>({path:e.path,body:e.data,method:e.method,headers:e.headers}))}});return t.failed?t.responses.map(e=>({error:null==e?void 0:e.body})):t.responses.map(e=>{const t={};return e.status>=200&&e.status<300?t.output=e.body:t.error=e.body,t})}function k(e=T){let t=0,n=[];const r=new I;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 I{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 S={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 U(e,t){return{type:"RECEIVE_USER_QUERY",users:Object(d.castArray)(t),queryID:e}}function A(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function C(e){return{type:"ADD_ENTITIES",entities:e}}function x(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 P(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function L(e){return{type:"RECEIVE_THEME_SUPPORTS",themeSupports:e}}function D(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}function*M(e,t,n,r,{__unstableFetch:i=null}={}){const s=yield ee(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*R(l)}}function*q(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*V(){const e=yield u.controls.select("core","getRedoEdit");e&&(yield{type:"EDIT_ENTITY_RECORD",...e,meta:{isRedo:!0}})}function F(){return{type:"CREATE_UNDO_LEVEL"}}function*Q(e,t,n,{isAutosave:r=!1,__unstableFetch:i=null}={}){const s=yield ee(e),o=Object(d.find)(s,{kind:e,name:t});if(!o)return;const c=n[o.key||z],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 q(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 x(e,t,n,void 0,!0)}else yield K(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 x(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*R(l)}}function*G(e){const t=k(),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*H(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*Q(e,t,i,r)}function*Y(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*Q(e,t,o,i)}function B(e){return{type:"RECEIVE_USER_PERMISSION",key:"create/media",isAllowed:e}}function $(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function K(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Object(d.castArray)(t)}}const z="id",W=[{label:Object(b.__)("Base"),name:"__unstableBase",kind:"root",baseURL:""},{label:Object(b.__)("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",getTitle:e=>Object(d.get)(e,["title"],Object(b.__)("Site Title"))},{label:Object(b.__)("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(b.__)("Media")},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:Object(b.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",plural:"sidebars",transientEdits:{blocks:!0},label:Object(b.__)("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:Object(b.__)("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:Object(b.__)("Widget types")},{label:Object(b.__)("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(b.__)("Comment")},{name:"menu",kind:"root",baseURL:"/__experimental/menus",baseURLParams:{context:"edit"},plural:"menus",label:Object(b.__)("Menu")},{name:"menuItem",kind:"root",baseURL:"/__experimental/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:Object(b.__)("Menu Item")},{name:"menuLocation",kind:"root",baseURL:"/__experimental/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:Object(b.__)("Menu Location"),key:"name"}],Z=[{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:X}})}},{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}))}}],X=(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 J=(e,t,n="get",r=!1)=>{const i=Object(d.find)(W,{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*ee(e){let t=yield u.controls.select("core","getEntitiesByKind",e);if(t&&0!==t.length)return t;const n=Object(d.find)(Z,{name:e});return n?(t=yield n.loadEntities(),yield C(t),t):[]}var te=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null};var ne=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},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=te(s).map(Number);break;default:"_fields"===i&&(t.fields=te(s),s=t.fields.join()),t.stableKey+=(t.stableKey?"&":"")+Object(h.addQueryArgs)("",{[i]:s}).slice(1)}}return t}));const re=Object(d.flowRight)([p(e=>"query"in e),y(e=>e.query?{...e,...ne(e.query)}:e),E("stableKey")])((e=null,t)=>{const{type:n,page:r,perPage:i,key:s=z}=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 ie=Object(u.combineReducers)({items:function(e={},t){switch(t.type){case"RECEIVE_ITEMS":const n=t.key||z;return{...e,...t.items.reduce((t,r)=>{const i=r[n];return t[i]=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}(e[i],r),t},{})};case"REMOVE_ITEMS":return Object(d.omit)(e,t.itemIds)}return e},itemIsComplete:function(e={},t){const{type:n,query:r,key:i=z}=t;if("RECEIVE_ITEMS"!==n)return e;const s=!r||!Array.isArray(ne(r).fields);return{...e,...t.items.reduce((t,n)=>{const r=n[i];return t[r]=e[r]||s,t},{})}},queries:(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return re(e,t);case"REMOVE_ITEMS":const n={...e},r=t.itemIds.reduce((e,t)=>(e[t]=!0,e),{});return Object(d.forEach)(n,(e,t)=>{n[t]=Object(d.filter)(e,e=>!r[e])}),n;default:return e}}});function se(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 oe(e,t){let n=e;for(const e of t){const t=n.children[e];if(!t)return null;n=t}return n}function ce({exclusive:e},t){return!(!e||!t.length)||!(e||!t.filter(e=>e.exclusive).length)}const ue={requests:[],tree:{locks:[],children:{}}};var ae=function(e=ue,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=se(e.tree,o),u=oe(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=se(e.tree,r),s=oe(i,r);return s.locks=s.locks.filter(e=>e!==n),{...e,tree:i}}}return e};function de(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||z}))])(Object(u.combineReducers)({queriedData:ie,edits:(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":const n={...e};for(const e of t.items){const r=e[t.key],i=n[r];if(!i)continue;const s=Object.keys(i).reduce((n,r)=>(Object(d.isEqual)(i[r],Object(d.get)(e[r],"raw",e[r]))||t.persistedEdits&&Object(d.isEqual)(i[r],t.persistedEdits[r])||(n[r]=i[r]),n),{});Object.keys(s).length?n[r]=s:delete n[r]}return n;case"EDIT_ENTITY_RECORD":const r={...e[t.recordId],...t.edits};return Object.keys(r).forEach(e=>{void 0===r[e]&&delete r[e]}),{...e,[t.recordId]:r}}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 le=[];let fe;le.offset=0;var pe=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=W,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]:de(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=le,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=fe:r||(fe=Object.keys(t.edits).some(e=>!t.transientEdits[e])?t:{...t,edits:{...fe&&fe.edits,...t.edits}}),r){if(i=[...e],i.offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return i;n=!0,t=fe}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:ae}),ye=n("pPDe");var Ee=n("FtRg"),be=n.n(Ee);const me=new WeakMap;const he=Object(ye.a)((e,t={})=>{let n=me.get(e);if(n){const e=n.get(t);if(void 0!==e)return e}else n=new be.a,me.set(e,n);const r=function(e,t){const{stableKey:n,page:r,perPage:i,include:s,fields:o}=ne(t);let c;if(Array.isArray(s)&&!n?c=s:e.queries[n]&&(c=e.queries[n]),!c)return null;const u=-1===i?0:(r-1)*i,a=-1===i?c.length:Math.min(u+i,c.length),l=[];for(let t=u;t<a;t++){const n=c[t];if(Array.isArray(s)&&!s.includes(n))continue;if(!e.items.hasOwnProperty(n))return null;const r=e.items[n];let i;if(Array.isArray(o)){i={};for(let e=0;e<o.length;e++){const t=o[e].split("."),n=Object(d.get)(r,t);Object(d.set)(i,t,n)}}else{if(!e.itemIsComplete[n])return null;i=r}l.push(i)}return l}(e,t);return n.set(t,r),r}),_e=[],ve=Object(u.createRegistrySelector)(e=>(t,n)=>e("core/data").isResolving("core","getEmbedPreview",[n]));function ge(e,t){const n=Object(h.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",t);return je(e,n)}function Re(e,t){return Object(d.get)(e,["users","byId",t],null)}function Oe(e){return e.currentUser}const je=Object(ye.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 we(e,t){return Object(d.filter)(e.entities.config,{kind:t})}function Te(e,t,n){return Object(d.find)(e.entities.config,{kind:t,name:n})}function ke(e,t,n,r,i){const s=Object(d.get)(e.entities.data,[t,n,"queriedData"]);if(!s)return;if(void 0===i){if(!s.itemIsComplete[r])return;return s.items[r]}const o=s.items[r];if(o&&i._fields){const e={},t=te(i._fields);for(let n=0;n<t.length;n++){const r=t[n].split("."),i=Object(d.get)(o,r);Object(d.set)(e,r,i)}return e}return o}function Ie(e,t,n,r){return ke(e,t,n,r)}const Se=Object(ye.a)((e,t,n,r)=>{const i=ke(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 Ue(e,t,n,r){return Array.isArray(Ae(e,t,n,r))}function Ae(e,t,n,r){const i=Object(d.get)(e.entities.data,[t,n,"queriedData"]);return i?he(i,r):_e}const Ce=Object(ye.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=>Le(e,r,i,t));if(s.length){const t=Te(e,r,i);s.forEach(s=>{var o;const c=De(e,r,i,s);n.push({key:c[t.key||z],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 xe(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"edits",r])}const Pe=Object(ye.a)((e,t,n,r)=>{const{transientEdits:i}=Te(e,t,n)||{},s=xe(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 Le(e,t,n,r){return qe(e,t,n,r)||Object.keys(Pe(e,t,n,r)).length>0}const De=Object(ye.a)((e,t,n,r)=>({...Se(e,t,n,r),...xe(e,t,n,r)}),e=>[e.entities.data]);function Me(e,t,n,r){const{pending:i,isAutosave:s}=Object(d.get)(e.entities.data,[t,n,"saving",r],{});return Boolean(i&&s)}function qe(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"saving",r,"pending"],!1)}function Ne(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"deleting",r,"pending"],!1)}function Ve(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"saving",r,"error"])}function Fe(e,t,n,r){return Object(d.get)(e.entities.data,[t,n,"deleting",r,"error"])}function Qe(e){return e.undo.offset}function Ge(e){return e.undo[e.undo.length-2+Qe(e)]}function He(e){return e.undo[e.undo.length+Qe(e)]}function Ye(e){return Boolean(Ge(e))}function Be(e){return Boolean(He(e))}function $e(e){return e.themes[e.currentTheme]}function Ke(e){return e.themeSupports}function ze(e,t){return e.embedPreviews[t]}function We(e,t){const n=e.embedPreviews[t],r='<a href="'+t+'">'+t+"</a>";return!!n&&n.html===r}function Ze(e,t,n,r){const i=Object(d.compact)([t,n,r]).join("/");return Object(d.get)(e,["userPermissions",i])}function Xe(e,t,n){return e.autosaves[n]}function Je(e,t,n,r){if(void 0===r)return;const i=e.autosaves[n];return Object(d.find)(i,{author:r})}const et=Object(u.createRegistrySelector)(e=>(t,n,r)=>e("core").hasFinishedResolution("getAutosaves",[n,r])),tt=Object(ye.a)(()=>[],e=>[e.undo.length,e.undo.offset,e.undo.flattenedUndo]);function nt(e,t){const n=Ae(e,"postType","wp_template",{"find-template":t}),r=null!=n&&n.length?n[0]:null;return r?De(e,"postType","wp_template",r.id):r}var rt=(e,t)=>function*(...n){(yield u.controls.select("core","hasStartedResolution",t,n))||(yield*e(...n))};function*it(e){const t=Object(h.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",e),n=yield Object(a.apiFetch)({path:t});yield U(t,n)}function*st(e){const t="/wp/v2/users?who=authors&include="+e,n=yield Object(a.apiFetch)({path:t});yield U("author",n)}function*ot(){const e=yield Object(a.apiFetch)({path:"/wp/v2/users/me"});yield A(e)}function*ct(e,t,n="",r){const i=yield ee(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)([...te(r._fields)||[],s.key||z]).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 x(e,t,c,r)}catch(e){}finally{yield*R(o)}}const ut=rt(ct,"getEntityRecord"),at=rt(ut,"getRawEntityRecord");function*dt(e,t,n={}){const r=yield ee(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)([...te(n._fields)||[],i.key||z]).join()});const r=Object(h.addQueryArgs)(i.baseURL,{...n,context:"edit"});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 x(e,t,c,n),null===(o=n)||void 0===o||!o._fields){const n=i.key||z,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*R(s)}}function*lt(){const e=yield Object(a.apiFetch)({path:"/wp/v2/themes?status=active"});yield P(e[0])}function*ft(){const e=yield Object(a.apiFetch)({path:"/wp/v2/themes?status=active"});yield L(e[0].theme_supports)}function*pt(e){try{const t=yield Object(a.apiFetch)({path:Object(h.addQueryArgs)("/oembed/1.0/proxy",{url:e})});yield D(e,t)}catch(t){yield D(e,!1)}}function*yt(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 $(c,u)}function*Et(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 K(t,r))}function*bt(e,t){yield u.controls.resolveSelect("core","getAutosaves",e,t)}function*mt(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 ct("postType","wp_template",t.id);const r=yield u.controls.select("core","getEntityRecord","postType","wp_template",t.id);r&&(yield x("postType","wp_template",[r],{"find-template":e}))}function ht(e){return e.locks.requests}function _t(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(ce({exclusive:r},e.locks))return!1;const o=oe(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(ce({exclusive:r},e.locks))return!1;return!0}dt.shouldInvalidate=(e,t,n)=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&n===e.name,mt.shouldInvalidate=e=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&"postType"===e.kind&&"wp_template"===e.name;var vt=n("GRId"),gt=n("HSyU");const Rt=[],Ot={...W.reduce((e,t)=>(e[t.kind]||(e[t.kind]={}),e[t.kind][t.name]={context:Object(vt.createContext)()},e),{}),...Z.reduce((e,t)=>(e[t.name]={},e),{})},jt=(e,t)=>{if(!Ot[e])throw new Error(`Missing entity config for kind: ${e}.`);return Ot[e][t]||(Ot[e][t]={context:Object(vt.createContext)()}),Ot[e][t]};function wt({kind:e,type:t,id:n,children:r}){const i=jt(e,t).context.Provider;return Object(vt.createElement)(i,{value:n},r)}function Tt(e,t){return Object(vt.useContext)(jt(e,t).context)}function kt(e,t,n,r){const i=Tt(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(vt.useCallback)(r=>{a(e,t,s,{[n]:r})},[e,t,s,n]),c]}function It(e,t,{id:n}={}){const r=Tt(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(vt.useEffect)(()=>{if(s&&"function"!=typeof s&&!o){const n=Object(gt.parse)(s);a(e,t,i,{blocks:n},{undoIgnore:!0})}},[s]);const d=Object(vt.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(gt.__unstableSerializeAndClean)(e),a(e,t,i,u)},[e,t,i,o]),l=Object(vt.useCallback)((n,r)=>{const{selection:s}=r;a(e,t,i,{blocks:n,selection:s})},[e,t,i]);return[null!=o?o:Rt,l,d]}var St=n("rmEH");var Ut=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(St.decodeEntities)(e.title||"")||Object(b.__)("(no title)"),type:e.subtype||e.type,kind:null==e||null===(t=e.meta)||void 0===t?void 0:t.kind}}))};var At=async e=>{const t={url:Object(h.prependHTTP)(e)};return w()({path:Object(h.addQueryArgs)("/__experimental/url-details",t)})};const Ct=W.reduce((e,t)=>{const{kind:n,name:r}=t;return e[J(n,r)]=(e,t)=>ke(e,n,r,t),e[J(n,r,"get",!0)]=(e,...t)=>Ae(e,n,r,...t),e},{}),xt=W.reduce((e,t)=>{const{kind:n,name:r}=t;e[J(n,r)]=e=>ct(n,r,e);const i=J(n,r,"get",!0);return e[i]=(...e)=>dt(n,r,...e),e[i].shouldInvalidate=(e,...t)=>dt.shouldInvalidate(e,n,r,...t),e},{}),Pt=W.reduce((e,t)=>{const{kind:n,name:r}=t;return e[J(n,r,"save")]=e=>Q(n,r,e),e[J(n,r,"delete")]=(e,t)=>M(n,r,e,t),e},{}),Lt={reducer:pe,controls:{...S,...a.controls},actions:{...i,...Pt,...r},selectors:{...s,...Ct,...c},resolvers:{...o,...xt}},Dt=Object(u.createReduxStore)("core",Lt);Object(u.register)(Dt)},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}});