@wordpress/core-data 5.3.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.5.0 (2022-11-16)
6
+
7
+ ## 5.4.0 (2022-11-02)
8
+
5
9
  ## 5.3.0 (2022-10-19)
6
10
 
7
11
  ## 5.2.0 (2022-10-05)
package/build/actions.js CHANGED
@@ -68,7 +68,7 @@ var _name = require("./name");
68
68
  function receiveUserQuery(queryID, users) {
69
69
  return {
70
70
  type: 'RECEIVE_USER_QUERY',
71
- users: (0, _lodash.castArray)(users),
71
+ users: Array.isArray(users) ? users : [users],
72
72
  queryID
73
73
  };
74
74
  }
@@ -125,7 +125,7 @@ function receiveEntityRecords(kind, name, records, query) {
125
125
  // Auto drafts should not have titles, but some plugins rely on them so we can't filter this
126
126
  // on the server.
127
127
  if (kind === 'postType') {
128
- records = (0, _lodash.castArray)(records).map(record => record.status === 'auto-draft' ? { ...record,
128
+ records = (Array.isArray(records) ? records : [records]).map(record => record.status === 'auto-draft' ? { ...record,
129
129
  title: ''
130
130
  } : record);
131
131
  }
@@ -839,7 +839,7 @@ function receiveAutosaves(postId, autosaves) {
839
839
  return {
840
840
  type: 'RECEIVE_AUTOSAVES',
841
841
  postId,
842
- autosaves: (0, _lodash.castArray)(autosaves)
842
+ autosaves: Array.isArray(autosaves) ? autosaves : [autosaves]
843
843
  };
844
844
  }
845
845
  //# sourceMappingURL=actions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/actions.js"],"names":["receiveUserQuery","queryID","users","type","receiveCurrentUser","currentUser","addEntities","entities","receiveEntityRecords","kind","name","records","query","invalidateCache","edits","map","record","status","title","action","receiveCurrentTheme","currentTheme","__experimentalReceiveCurrentGlobalStylesId","currentGlobalStylesId","id","__experimentalReceiveThemeBaseGlobalStyles","stylesheet","globalStyles","__experimentalReceiveThemeGlobalStyleVariations","variations","receiveThemeSupports","since","receiveEmbedPreview","url","preview","deleteEntityRecord","recordId","__unstableFetch","apiFetch","throwOnError","dispatch","configs","entityConfig","error","deletedRecord","__experimentalNoFetch","lock","__unstableAcquireStoreLock","STORE_NAME","exclusive","hasError","path","baseURL","method","_error","__unstableReleaseStoreLock","editEntityRecord","options","select","getEntityConfig","Error","transientEdits","mergedEdits","getRawEntityRecord","editedRecord","getEditedEntityRecord","edit","Object","keys","reduce","acc","key","recordValue","editedRecordValue","value","undefined","meta","undo","undoIgnore","undoEdit","getUndoEdit","isUndo","redo","redoEdit","getRedoEdit","isRedo","__unstableCreateUndoLevel","saveEntityRecord","isAutosave","resolveSelect","entityIdKey","DEFAULT_ENTITY_KEY","entries","evaluatedValue","updatedRecord","persistedRecord","getCurrentUser","currentUserId","autosavePost","getAutosave","data","includes","newRecord","receiveAutosaves","__unstablePrePersist","__experimentalBatch","requests","batch","api","add","saveEditedEntityRecord","resultPromises","request","results","Promise","all","run","hasEditsForEntityRecord","getEntityRecordNonTransientEdits","__experimentalSaveSpecifiedEntityEdits","itemsToSave","editsToSave","some","item","receiveUploadPermissions","hasUploadPermissions","alternative","receiveUserPermission","isAllowed","postId","autosaves"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,gBAAT,CAA2BC,OAA3B,EAAoCC,KAApC,EAA4C;AAClD,SAAO;AACNC,IAAAA,IAAI,EAAE,oBADA;AAEND,IAAAA,KAAK,EAAE,uBAAWA,KAAX,CAFD;AAGND,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASG,kBAAT,CAA6BC,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qF,WAAW,GAAG,EAApB;;AACA,OAAM,MAAMvD,IAAZ,IAAoBpD,KAApB,EAA4B;AAC3B,QAAK0G,WAAW,CAACE,IAAZ,CAAoBC,IAAF,IAAYA,IAAI,KAAKzD,IAAvC,CAAL,EAAqD;AACpDuD,MAAAA,WAAW,CAAEvD,IAAF,CAAX,GAAsBpD,KAAK,CAAEoD,IAAF,CAA3B;AACA;AACD;;AACD,SAAO,MAAM1B,QAAQ,CAAC+C,gBAAT,CACZ9E,IADY,EAEZC,IAFY,EAGZ+G,WAHY,EAIZhE,OAJY,CAAb;AAMA,CAvBK;AAyBP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,SAASmE,wBAAT,CAAmCC,oBAAnC,EAA0D;AAChE,2BAAY,qDAAZ,EAAmE;AAClE9F,IAAAA,KAAK,EAAE,KAD2D;AAElE+F,IAAAA,WAAW,EAAE;AAFqD,GAAnE;AAKA,SAAOC,qBAAqB,CAAE,cAAF,EAAkBF,oBAAlB,CAA5B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASE,qBAAT,CAAgCxD,GAAhC,EAAqCyD,SAArC,EAAiD;AACvD,SAAO;AACN7H,IAAAA,IAAI,EAAE,yBADA;AAENoE,IAAAA,GAFM;AAGNyD,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASzB,gBAAT,CAA2B0B,MAA3B,EAAmCC,SAAnC,EAA+C;AACrD,SAAO;AACN/H,IAAAA,IAAI,EAAE,mBADA;AAEN8H,IAAAA,MAFM;AAGNC,IAAAA,SAAS,EAAE,uBAAWA,SAAX;AAHL,GAAP;AAKA","sourcesContent":["/**\n * External dependencies\n */\nimport { castArray, isEqual, find } from 'lodash';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { receiveItems, removeItems, receiveQueriedItems } from './queried-data';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { createBatch } from './batch';\nimport { STORE_NAME } from './name';\n\n/**\n * Returns an action object used in signalling that authors have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} queryID Query ID.\n * @param {Array|Object} users Users received.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserQuery( queryID, users ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_QUERY',\n\t\tusers: castArray( users ),\n\t\tqueryID,\n\t};\n}\n\n/**\n * Returns an action used in signalling that the current user has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentUser Current user object.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentUser( currentUser ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_USER',\n\t\tcurrentUser,\n\t};\n}\n\n/**\n * Returns an action object used in adding new entities.\n *\n * @param {Array} entities Entities received.\n *\n * @return {Object} Action object.\n */\nexport function addEntities( entities ) {\n\treturn {\n\t\ttype: 'ADD_ENTITIES',\n\t\tentities,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been received.\n *\n * @param {string} kind Kind of the received entity record.\n * @param {string} name Name of the received entity record.\n * @param {Array|Object} records Records received.\n * @param {?Object} query Query Object.\n * @param {?boolean} invalidateCache Should invalidate query caches.\n * @param {?Object} edits Edits to reset.\n * @return {Object} Action object.\n */\nexport function receiveEntityRecords(\n\tkind,\n\tname,\n\trecords,\n\tquery,\n\tinvalidateCache = false,\n\tedits\n) {\n\t// Auto drafts should not have titles, but some plugins rely on them so we can't filter this\n\t// on the server.\n\tif ( kind === 'postType' ) {\n\t\trecords = castArray( records ).map( ( record ) =>\n\t\t\trecord.status === 'auto-draft' ? { ...record, title: '' } : record\n\t\t);\n\t}\n\tlet action;\n\tif ( query ) {\n\t\taction = receiveQueriedItems( records, query, edits );\n\t} else {\n\t\taction = receiveItems( records, edits );\n\t}\n\n\treturn {\n\t\t...action,\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current theme has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentTheme The current theme.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentTheme( currentTheme ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_THEME',\n\t\tcurrentTheme,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current global styles id has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} currentGlobalStylesId The current global styles id.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveCurrentGlobalStylesId(\n\tcurrentGlobalStylesId\n) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_GLOBAL_STYLES_ID',\n\t\tid: currentGlobalStylesId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme base global styles have been received\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Object} globalStyles The global styles object.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeBaseGlobalStyles(\n\tstylesheet,\n\tglobalStyles\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLES',\n\t\tstylesheet,\n\t\tglobalStyles,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles variations have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Array} variations The global styles variations.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeGlobalStyleVariations(\n\tstylesheet,\n\tvariations\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS',\n\t\tstylesheet,\n\t\tvariations,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the index has been received.\n *\n * @deprecated since WP 5.9, this is not useful anymore, use the selector direclty.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeSupports() {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveThemeSupports\", {\n\t\tsince: '5.9',\n\t} );\n\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the preview data for\n * a given URl has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} url URL to preview the embed for.\n * @param {*} preview Preview data.\n *\n * @return {Object} Action object.\n */\nexport function receiveEmbedPreview( url, preview ) {\n\treturn {\n\t\ttype: 'RECEIVE_EMBED_PREVIEW',\n\t\turl,\n\t\tpreview,\n\t};\n}\n\n/**\n * Action triggered to delete an entity record.\n *\n * @param {string} kind Kind of the deleted entity.\n * @param {string} name Name of the deleted entity.\n * @param {string} recordId Record ID of the deleted entity.\n * @param {?Object} query Special query parameters for the\n * DELETE API call.\n * @param {Object} [options] Delete options.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const deleteEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecordId,\n\t\tquery,\n\t\t{ __unstableFetch = apiFetch, throwOnError = false } = {}\n\t) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tlet error;\n\t\tlet deletedRecord = false;\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t} );\n\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tlet path = `${ entityConfig.baseURL }/${ recordId }`;\n\n\t\t\t\tif ( query ) {\n\t\t\t\t\tpath = addQueryArgs( path, query );\n\t\t\t\t}\n\n\t\t\t\tdeletedRecord = await __unstableFetch( {\n\t\t\t\t\tpath,\n\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t} );\n\n\t\t\t\tawait dispatch( removeItems( kind, name, recordId, true ) );\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn deletedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Returns an action object that triggers an\n * edit to an entity record.\n *\n * @param {string} kind Kind of the edited entity record.\n * @param {string} name Name of the edited entity record.\n * @param {number} recordId Record ID of the edited entity record.\n * @param {Object} edits The edits.\n * @param {Object} options Options for the edit.\n * @param {boolean} [options.undoIgnore] Whether to ignore the edit in undo history or not.\n *\n * @return {Object} Action object.\n */\nexport const editEntityRecord =\n\t( kind, name, recordId, edits, options = {} ) =>\n\t( { select, dispatch } ) => {\n\t\tconst entityConfig = select.getEntityConfig( kind, name );\n\t\tif ( ! entityConfig ) {\n\t\t\tthrow new Error(\n\t\t\t\t`The entity being edited (${ kind }, ${ name }) does not have a loaded config.`\n\t\t\t);\n\t\t}\n\t\tconst { transientEdits = {}, mergedEdits = {} } = entityConfig;\n\t\tconst record = select.getRawEntityRecord( kind, name, recordId );\n\t\tconst editedRecord = select.getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\n\t\tconst edit = {\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId,\n\t\t\t// Clear edits when they are equal to their persisted counterparts\n\t\t\t// so that the property is not considered dirty.\n\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\tconst recordValue = record[ key ];\n\t\t\t\tconst editedRecordValue = editedRecord[ key ];\n\t\t\t\tconst value = mergedEdits[ key ]\n\t\t\t\t\t? { ...editedRecordValue, ...edits[ key ] }\n\t\t\t\t\t: edits[ key ];\n\t\t\t\tacc[ key ] = isEqual( recordValue, value ) ? undefined : value;\n\t\t\t\treturn acc;\n\t\t\t}, {} ),\n\t\t\ttransientEdits,\n\t\t};\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...edit,\n\t\t\tmeta: {\n\t\t\t\tundo: ! options.undoIgnore && {\n\t\t\t\t\t...edit,\n\t\t\t\t\t// Send the current values for things like the first undo stack entry.\n\t\t\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\t\t\tacc[ key ] = editedRecord[ key ];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} ),\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t};\n\n/**\n * Action triggered to undo the last edit to\n * an entity record, if any.\n */\nexport const undo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst undoEdit = select.getUndoEdit();\n\t\tif ( ! undoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...undoEdit,\n\t\t\tmeta: { isUndo: true },\n\t\t} );\n\t};\n\n/**\n * Action triggered to redo the last undoed\n * edit to an entity record, if any.\n */\nexport const redo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst redoEdit = select.getRedoEdit();\n\t\tif ( ! redoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...redoEdit,\n\t\t\tmeta: { isRedo: true },\n\t\t} );\n\t};\n\n/**\n * Forces the creation of a new undo level.\n *\n * @return {Object} Action object.\n */\nexport function __unstableCreateUndoLevel() {\n\treturn { type: 'CREATE_UNDO_LEVEL' };\n}\n\n/**\n * Action triggered to save an entity record.\n *\n * @param {string} kind Kind of the received entity.\n * @param {string} name Name of the received entity.\n * @param {Object} record Record to be saved.\n * @param {Object} options Saving options.\n * @param {boolean} [options.isAutosave=false] Whether this is an autosave.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const saveEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecord,\n\t\t{\n\t\t\tisAutosave = false,\n\t\t\t__unstableFetch = apiFetch,\n\t\t\tthrowOnError = false,\n\t\t} = {}\n\t) =>\n\tasync ( { select, resolveSelect, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\tconst recordId = record[ entityIdKey ];\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId || uuid() ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\t// Evaluate optimized edits.\n\t\t\t// (Function edits that should be evaluated on save to avoid expensive computations on every edit.)\n\t\t\tfor ( const [ key, value ] of Object.entries( record ) ) {\n\t\t\t\tif ( typeof value === 'function' ) {\n\t\t\t\t\tconst evaluatedValue = value(\n\t\t\t\t\t\tselect.getEditedEntityRecord( kind, name, recordId )\n\t\t\t\t\t);\n\t\t\t\t\tdispatch.editEntityRecord(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ key ]: evaluatedValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t\t);\n\t\t\t\t\trecord[ key ] = evaluatedValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\t\t\tlet updatedRecord;\n\t\t\tlet error;\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tconst path = `${ entityConfig.baseURL }${\n\t\t\t\t\trecordId ? '/' + recordId : ''\n\t\t\t\t}`;\n\t\t\t\tconst persistedRecord = select.getRawEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t);\n\n\t\t\t\tif ( isAutosave ) {\n\t\t\t\t\t// Most of this autosave logic is very specific to posts.\n\t\t\t\t\t// This is fine for now as it is the only supported autosave,\n\t\t\t\t\t// but ideally this should all be handled in the back end,\n\t\t\t\t\t// so the client just sends and receives objects.\n\t\t\t\t\tconst currentUser = select.getCurrentUser();\n\t\t\t\t\tconst currentUserId = currentUser\n\t\t\t\t\t\t? currentUser.id\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\tconst autosavePost = await resolveSelect.getAutosave(\n\t\t\t\t\t\tpersistedRecord.type,\n\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\tcurrentUserId\n\t\t\t\t\t);\n\t\t\t\t\t// Autosaves need all expected fields to be present.\n\t\t\t\t\t// So we fallback to the previous autosave and then\n\t\t\t\t\t// to the actual persisted entity if the edits don't\n\t\t\t\t\t// have a value.\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t...autosavePost,\n\t\t\t\t\t\t...record,\n\t\t\t\t\t};\n\t\t\t\t\tdata = Object.keys( data ).reduce(\n\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tacc[ key ] = data[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus:\n\t\t\t\t\t\t\t\tdata.status === 'auto-draft'\n\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t: data.status,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath: `${ path }/autosaves`,\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\n\t\t\t\t\t// An autosave may be processed by the server as a regular save\n\t\t\t\t\t// when its update is requested by the author and the post had\n\t\t\t\t\t// draft or auto-draft status.\n\t\t\t\t\tif ( persistedRecord.id === updatedRecord.id ) {\n\t\t\t\t\t\tlet newRecord = {\n\t\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t...updatedRecord,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnewRecord = Object.keys( newRecord ).reduce(\n\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t// These properties are persisted in autosaves.\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tacc[ key ] = newRecord[ key ];\n\t\t\t\t\t\t\t\t} else if ( key === 'status' ) {\n\t\t\t\t\t\t\t\t\t// Status is only persisted in autosaves when going from\n\t\t\t\t\t\t\t\t\t// \"auto-draft\" to \"draft\".\n\t\t\t\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\t\t\t\tpersistedRecord.status ===\n\t\t\t\t\t\t\t\t\t\t\t'auto-draft' &&\n\t\t\t\t\t\t\t\t\t\tnewRecord.status === 'draft'\n\t\t\t\t\t\t\t\t\t\t\t? newRecord.status\n\t\t\t\t\t\t\t\t\t\t\t: persistedRecord.status;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// These properties are not persisted in autosaves.\n\t\t\t\t\t\t\t\t\tacc[ key ] = persistedRecord[ key ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnewRecord,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdispatch.receiveAutosaves(\n\t\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\t\tupdatedRecord\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet edits = record;\n\t\t\t\t\tif ( entityConfig.__unstablePrePersist ) {\n\t\t\t\t\t\tedits = {\n\t\t\t\t\t\t\t...edits,\n\t\t\t\t\t\t\t...entityConfig.__unstablePrePersist(\n\t\t\t\t\t\t\t\tpersistedRecord,\n\t\t\t\t\t\t\t\tedits\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tmethod: recordId ? 'PUT' : 'POST',\n\t\t\t\t\t\tdata: edits,\n\t\t\t\t\t} );\n\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tupdatedRecord,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tedits\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn updatedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Runs multiple core-data actions at the same time using one API request.\n *\n * Example:\n *\n * ```\n * const [ savedRecord, updatedRecord, deletedRecord ] =\n * await dispatch( 'core' ).__experimentalBatch( [\n * ( { saveEntityRecord } ) => saveEntityRecord( 'root', 'widget', widget ),\n * ( { saveEditedEntityRecord } ) => saveEntityRecord( 'root', 'widget', 123 ),\n * ( { deleteEntityRecord } ) => deleteEntityRecord( 'root', 'widget', 123, null ),\n * ] );\n * ```\n *\n * @param {Array} requests Array of functions which are invoked simultaneously.\n * Each function is passed an object containing\n * `saveEntityRecord`, `saveEditedEntityRecord`, and\n * `deleteEntityRecord`.\n *\n * @return {(thunkArgs: Object) => Promise} A promise that resolves to an array containing the return\n * values of each function given in `requests`.\n */\nexport const __experimentalBatch =\n\t( requests ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst batch = createBatch();\n\t\tconst api = {\n\t\t\tsaveEntityRecord( kind, name, record, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEntityRecord( kind, name, record, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tsaveEditedEntityRecord( kind, name, recordId, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tdeleteEntityRecord( kind, name, recordId, query, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.deleteEntityRecord( kind, name, recordId, query, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t\tconst resultPromises = requests.map( ( request ) => request( api ) );\n\t\tconst [ , ...results ] = await Promise.all( [\n\t\t\tbatch.run(),\n\t\t\t...resultPromises,\n\t\t] );\n\t\treturn results;\n\t};\n\n/**\n * Action triggered to save an entity record's edits.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Object} options Saving options.\n */\nexport const saveEditedEntityRecord =\n\t( kind, name, recordId, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst record = { [ entityIdKey ]: recordId, ...edits };\n\t\treturn await dispatch.saveEntityRecord( kind, name, record, options );\n\t};\n\n/**\n * Action triggered to save only specified properties for the entity.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Array} itemsToSave List of entity properties to save.\n * @param {Object} options Saving options.\n */\nexport const __experimentalSaveSpecifiedEntityEdits =\n\t( kind, name, recordId, itemsToSave, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst editsToSave = {};\n\t\tfor ( const edit in edits ) {\n\t\t\tif ( itemsToSave.some( ( item ) => item === edit ) ) {\n\t\t\t\teditsToSave[ edit ] = edits[ edit ];\n\t\t\t}\n\t\t}\n\t\treturn await dispatch.saveEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\teditsToSave,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Returns an action object used in signalling that Upload permissions have been received.\n *\n * @deprecated since WP 5.9, use receiveUserPermission instead.\n *\n * @param {boolean} hasUploadPermissions Does the user have permission to upload files?\n *\n * @return {Object} Action object.\n */\nexport function receiveUploadPermissions( hasUploadPermissions ) {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveUploadPermissions\", {\n\t\tsince: '5.9',\n\t\talternative: 'receiveUserPermission',\n\t} );\n\n\treturn receiveUserPermission( 'create/media', hasUploadPermissions );\n}\n\n/**\n * Returns an action object used in signalling that the current user has\n * permission to perform an action on a REST resource.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} key A key that represents the action and REST resource.\n * @param {boolean} isAllowed Whether or not the user can perform the action.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserPermission( key, isAllowed ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_PERMISSION',\n\t\tkey,\n\t\tisAllowed,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the autosaves for a\n * post have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} postId The id of the post that is parent to the autosave.\n * @param {Array|Object} autosaves An array of autosaves or singular autosave object.\n *\n * @return {Object} Action object.\n */\nexport function receiveAutosaves( postId, autosaves ) {\n\treturn {\n\t\ttype: 'RECEIVE_AUTOSAVES',\n\t\tpostId,\n\t\tautosaves: castArray( autosaves ),\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/actions.js"],"names":["receiveUserQuery","queryID","users","type","Array","isArray","receiveCurrentUser","currentUser","addEntities","entities","receiveEntityRecords","kind","name","records","query","invalidateCache","edits","map","record","status","title","action","receiveCurrentTheme","currentTheme","__experimentalReceiveCurrentGlobalStylesId","currentGlobalStylesId","id","__experimentalReceiveThemeBaseGlobalStyles","stylesheet","globalStyles","__experimentalReceiveThemeGlobalStyleVariations","variations","receiveThemeSupports","since","receiveEmbedPreview","url","preview","deleteEntityRecord","recordId","__unstableFetch","apiFetch","throwOnError","dispatch","configs","entityConfig","error","deletedRecord","__experimentalNoFetch","lock","__unstableAcquireStoreLock","STORE_NAME","exclusive","hasError","path","baseURL","method","_error","__unstableReleaseStoreLock","editEntityRecord","options","select","getEntityConfig","Error","transientEdits","mergedEdits","getRawEntityRecord","editedRecord","getEditedEntityRecord","edit","Object","keys","reduce","acc","key","recordValue","editedRecordValue","value","undefined","meta","undo","undoIgnore","undoEdit","getUndoEdit","isUndo","redo","redoEdit","getRedoEdit","isRedo","__unstableCreateUndoLevel","saveEntityRecord","isAutosave","resolveSelect","entityIdKey","DEFAULT_ENTITY_KEY","entries","evaluatedValue","updatedRecord","persistedRecord","getCurrentUser","currentUserId","autosavePost","getAutosave","data","includes","newRecord","receiveAutosaves","__unstablePrePersist","__experimentalBatch","requests","batch","api","add","saveEditedEntityRecord","resultPromises","request","results","Promise","all","run","hasEditsForEntityRecord","getEntityRecordNonTransientEdits","__experimentalSaveSpecifiedEntityEdits","itemsToSave","editsToSave","some","item","receiveUploadPermissions","hasUploadPermissions","alternative","receiveUserPermission","isAllowed","postId","autosaves"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,gBAAT,CAA2BC,OAA3B,EAAoCC,KAApC,EAA4C;AAClD,SAAO;AACNC,IAAAA,IAAI,EAAE,oBADA;AAEND,IAAAA,KAAK,EAAEE,KAAK,CAACC,OAAN,CAAeH,KAAf,IAAyBA,KAAzB,GAAiC,CAAEA,KAAF,CAFlC;AAGND,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASK,kBAAT,CAA6BC,WAA7B,EAA2C;AACjD,SAAO;AACNJ,IAAAA,IAAI,EAAE,sBADA;AAENI,IAAAA;AAFM,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,WAAT,CAAsBC,QAAtB,EAAiC;AACvC,SAAO;AACNN,IAAAA,IAAI,EAAE,cADA;AAENM,IAAAA;AAFM,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,oBAAT,CACNC,IADM,EAENC,IAFM,EAGNC,OAHM,EAINC,KAJM,EAOL;AAAA,MAFDC,eAEC,uEAFiB,KAEjB;AAAA,MADDC,KACC;;AACD;AACA;AACA,MAAKL,IAAI,KAAK,UAAd,EAA2B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A;AACA;AACA;;;;;AACO,SAASmE,wBAAT,CAAmCC,oBAAnC,EAA0D;AAChE,2BAAY,qDAAZ,EAAmE;AAClE9F,IAAAA,KAAK,EAAE,KAD2D;AAElE+F,IAAAA,WAAW,EAAE;AAFqD,GAAnE;AAKA,SAAOC,qBAAqB,CAAE,cAAF,EAAkBF,oBAAlB,CAA5B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASE,qBAAT,CAAgCxD,GAAhC,EAAqCyD,SAArC,EAAiD;AACvD,SAAO;AACN/H,IAAAA,IAAI,EAAE,yBADA;AAENsE,IAAAA,GAFM;AAGNyD,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASzB,gBAAT,CAA2B0B,MAA3B,EAAmCC,SAAnC,EAA+C;AACrD,SAAO;AACNjI,IAAAA,IAAI,EAAE,mBADA;AAENgI,IAAAA,MAFM;AAGNC,IAAAA,SAAS,EAAEhI,KAAK,CAACC,OAAN,CAAe+H,SAAf,IAA6BA,SAA7B,GAAyC,CAAEA,SAAF;AAH9C,GAAP;AAKA","sourcesContent":["/**\n * External dependencies\n */\nimport { isEqual, find } from 'lodash';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { receiveItems, removeItems, receiveQueriedItems } from './queried-data';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { createBatch } from './batch';\nimport { STORE_NAME } from './name';\n\n/**\n * Returns an action object used in signalling that authors have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} queryID Query ID.\n * @param {Array|Object} users Users received.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserQuery( queryID, users ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_QUERY',\n\t\tusers: Array.isArray( users ) ? users : [ users ],\n\t\tqueryID,\n\t};\n}\n\n/**\n * Returns an action used in signalling that the current user has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentUser Current user object.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentUser( currentUser ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_USER',\n\t\tcurrentUser,\n\t};\n}\n\n/**\n * Returns an action object used in adding new entities.\n *\n * @param {Array} entities Entities received.\n *\n * @return {Object} Action object.\n */\nexport function addEntities( entities ) {\n\treturn {\n\t\ttype: 'ADD_ENTITIES',\n\t\tentities,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been received.\n *\n * @param {string} kind Kind of the received entity record.\n * @param {string} name Name of the received entity record.\n * @param {Array|Object} records Records received.\n * @param {?Object} query Query Object.\n * @param {?boolean} invalidateCache Should invalidate query caches.\n * @param {?Object} edits Edits to reset.\n * @return {Object} Action object.\n */\nexport function receiveEntityRecords(\n\tkind,\n\tname,\n\trecords,\n\tquery,\n\tinvalidateCache = false,\n\tedits\n) {\n\t// Auto drafts should not have titles, but some plugins rely on them so we can't filter this\n\t// on the server.\n\tif ( kind === 'postType' ) {\n\t\trecords = ( Array.isArray( records ) ? records : [ records ] ).map(\n\t\t\t( record ) =>\n\t\t\t\trecord.status === 'auto-draft'\n\t\t\t\t\t? { ...record, title: '' }\n\t\t\t\t\t: record\n\t\t);\n\t}\n\tlet action;\n\tif ( query ) {\n\t\taction = receiveQueriedItems( records, query, edits );\n\t} else {\n\t\taction = receiveItems( records, edits );\n\t}\n\n\treturn {\n\t\t...action,\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current theme has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentTheme The current theme.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentTheme( currentTheme ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_THEME',\n\t\tcurrentTheme,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current global styles id has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} currentGlobalStylesId The current global styles id.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveCurrentGlobalStylesId(\n\tcurrentGlobalStylesId\n) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_GLOBAL_STYLES_ID',\n\t\tid: currentGlobalStylesId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme base global styles have been received\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Object} globalStyles The global styles object.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeBaseGlobalStyles(\n\tstylesheet,\n\tglobalStyles\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLES',\n\t\tstylesheet,\n\t\tglobalStyles,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles variations have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Array} variations The global styles variations.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeGlobalStyleVariations(\n\tstylesheet,\n\tvariations\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS',\n\t\tstylesheet,\n\t\tvariations,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the index has been received.\n *\n * @deprecated since WP 5.9, this is not useful anymore, use the selector direclty.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeSupports() {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveThemeSupports\", {\n\t\tsince: '5.9',\n\t} );\n\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the preview data for\n * a given URl has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} url URL to preview the embed for.\n * @param {*} preview Preview data.\n *\n * @return {Object} Action object.\n */\nexport function receiveEmbedPreview( url, preview ) {\n\treturn {\n\t\ttype: 'RECEIVE_EMBED_PREVIEW',\n\t\turl,\n\t\tpreview,\n\t};\n}\n\n/**\n * Action triggered to delete an entity record.\n *\n * @param {string} kind Kind of the deleted entity.\n * @param {string} name Name of the deleted entity.\n * @param {string} recordId Record ID of the deleted entity.\n * @param {?Object} query Special query parameters for the\n * DELETE API call.\n * @param {Object} [options] Delete options.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const deleteEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecordId,\n\t\tquery,\n\t\t{ __unstableFetch = apiFetch, throwOnError = false } = {}\n\t) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tlet error;\n\t\tlet deletedRecord = false;\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t} );\n\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tlet path = `${ entityConfig.baseURL }/${ recordId }`;\n\n\t\t\t\tif ( query ) {\n\t\t\t\t\tpath = addQueryArgs( path, query );\n\t\t\t\t}\n\n\t\t\t\tdeletedRecord = await __unstableFetch( {\n\t\t\t\t\tpath,\n\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t} );\n\n\t\t\t\tawait dispatch( removeItems( kind, name, recordId, true ) );\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn deletedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Returns an action object that triggers an\n * edit to an entity record.\n *\n * @param {string} kind Kind of the edited entity record.\n * @param {string} name Name of the edited entity record.\n * @param {number} recordId Record ID of the edited entity record.\n * @param {Object} edits The edits.\n * @param {Object} options Options for the edit.\n * @param {boolean} [options.undoIgnore] Whether to ignore the edit in undo history or not.\n *\n * @return {Object} Action object.\n */\nexport const editEntityRecord =\n\t( kind, name, recordId, edits, options = {} ) =>\n\t( { select, dispatch } ) => {\n\t\tconst entityConfig = select.getEntityConfig( kind, name );\n\t\tif ( ! entityConfig ) {\n\t\t\tthrow new Error(\n\t\t\t\t`The entity being edited (${ kind }, ${ name }) does not have a loaded config.`\n\t\t\t);\n\t\t}\n\t\tconst { transientEdits = {}, mergedEdits = {} } = entityConfig;\n\t\tconst record = select.getRawEntityRecord( kind, name, recordId );\n\t\tconst editedRecord = select.getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\n\t\tconst edit = {\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId,\n\t\t\t// Clear edits when they are equal to their persisted counterparts\n\t\t\t// so that the property is not considered dirty.\n\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\tconst recordValue = record[ key ];\n\t\t\t\tconst editedRecordValue = editedRecord[ key ];\n\t\t\t\tconst value = mergedEdits[ key ]\n\t\t\t\t\t? { ...editedRecordValue, ...edits[ key ] }\n\t\t\t\t\t: edits[ key ];\n\t\t\t\tacc[ key ] = isEqual( recordValue, value ) ? undefined : value;\n\t\t\t\treturn acc;\n\t\t\t}, {} ),\n\t\t\ttransientEdits,\n\t\t};\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...edit,\n\t\t\tmeta: {\n\t\t\t\tundo: ! options.undoIgnore && {\n\t\t\t\t\t...edit,\n\t\t\t\t\t// Send the current values for things like the first undo stack entry.\n\t\t\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\t\t\tacc[ key ] = editedRecord[ key ];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} ),\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t};\n\n/**\n * Action triggered to undo the last edit to\n * an entity record, if any.\n */\nexport const undo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst undoEdit = select.getUndoEdit();\n\t\tif ( ! undoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...undoEdit,\n\t\t\tmeta: { isUndo: true },\n\t\t} );\n\t};\n\n/**\n * Action triggered to redo the last undoed\n * edit to an entity record, if any.\n */\nexport const redo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst redoEdit = select.getRedoEdit();\n\t\tif ( ! redoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...redoEdit,\n\t\t\tmeta: { isRedo: true },\n\t\t} );\n\t};\n\n/**\n * Forces the creation of a new undo level.\n *\n * @return {Object} Action object.\n */\nexport function __unstableCreateUndoLevel() {\n\treturn { type: 'CREATE_UNDO_LEVEL' };\n}\n\n/**\n * Action triggered to save an entity record.\n *\n * @param {string} kind Kind of the received entity.\n * @param {string} name Name of the received entity.\n * @param {Object} record Record to be saved.\n * @param {Object} options Saving options.\n * @param {boolean} [options.isAutosave=false] Whether this is an autosave.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const saveEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecord,\n\t\t{\n\t\t\tisAutosave = false,\n\t\t\t__unstableFetch = apiFetch,\n\t\t\tthrowOnError = false,\n\t\t} = {}\n\t) =>\n\tasync ( { select, resolveSelect, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\tconst recordId = record[ entityIdKey ];\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId || uuid() ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\t// Evaluate optimized edits.\n\t\t\t// (Function edits that should be evaluated on save to avoid expensive computations on every edit.)\n\t\t\tfor ( const [ key, value ] of Object.entries( record ) ) {\n\t\t\t\tif ( typeof value === 'function' ) {\n\t\t\t\t\tconst evaluatedValue = value(\n\t\t\t\t\t\tselect.getEditedEntityRecord( kind, name, recordId )\n\t\t\t\t\t);\n\t\t\t\t\tdispatch.editEntityRecord(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ key ]: evaluatedValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t\t);\n\t\t\t\t\trecord[ key ] = evaluatedValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\t\t\tlet updatedRecord;\n\t\t\tlet error;\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tconst path = `${ entityConfig.baseURL }${\n\t\t\t\t\trecordId ? '/' + recordId : ''\n\t\t\t\t}`;\n\t\t\t\tconst persistedRecord = select.getRawEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t);\n\n\t\t\t\tif ( isAutosave ) {\n\t\t\t\t\t// Most of this autosave logic is very specific to posts.\n\t\t\t\t\t// This is fine for now as it is the only supported autosave,\n\t\t\t\t\t// but ideally this should all be handled in the back end,\n\t\t\t\t\t// so the client just sends and receives objects.\n\t\t\t\t\tconst currentUser = select.getCurrentUser();\n\t\t\t\t\tconst currentUserId = currentUser\n\t\t\t\t\t\t? currentUser.id\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\tconst autosavePost = await resolveSelect.getAutosave(\n\t\t\t\t\t\tpersistedRecord.type,\n\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\tcurrentUserId\n\t\t\t\t\t);\n\t\t\t\t\t// Autosaves need all expected fields to be present.\n\t\t\t\t\t// So we fallback to the previous autosave and then\n\t\t\t\t\t// to the actual persisted entity if the edits don't\n\t\t\t\t\t// have a value.\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t...autosavePost,\n\t\t\t\t\t\t...record,\n\t\t\t\t\t};\n\t\t\t\t\tdata = Object.keys( data ).reduce(\n\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tacc[ key ] = data[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus:\n\t\t\t\t\t\t\t\tdata.status === 'auto-draft'\n\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t: data.status,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath: `${ path }/autosaves`,\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\n\t\t\t\t\t// An autosave may be processed by the server as a regular save\n\t\t\t\t\t// when its update is requested by the author and the post had\n\t\t\t\t\t// draft or auto-draft status.\n\t\t\t\t\tif ( persistedRecord.id === updatedRecord.id ) {\n\t\t\t\t\t\tlet newRecord = {\n\t\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t...updatedRecord,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnewRecord = Object.keys( newRecord ).reduce(\n\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t// These properties are persisted in autosaves.\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tacc[ key ] = newRecord[ key ];\n\t\t\t\t\t\t\t\t} else if ( key === 'status' ) {\n\t\t\t\t\t\t\t\t\t// Status is only persisted in autosaves when going from\n\t\t\t\t\t\t\t\t\t// \"auto-draft\" to \"draft\".\n\t\t\t\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\t\t\t\tpersistedRecord.status ===\n\t\t\t\t\t\t\t\t\t\t\t'auto-draft' &&\n\t\t\t\t\t\t\t\t\t\tnewRecord.status === 'draft'\n\t\t\t\t\t\t\t\t\t\t\t? newRecord.status\n\t\t\t\t\t\t\t\t\t\t\t: persistedRecord.status;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// These properties are not persisted in autosaves.\n\t\t\t\t\t\t\t\t\tacc[ key ] = persistedRecord[ key ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnewRecord,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdispatch.receiveAutosaves(\n\t\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\t\tupdatedRecord\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet edits = record;\n\t\t\t\t\tif ( entityConfig.__unstablePrePersist ) {\n\t\t\t\t\t\tedits = {\n\t\t\t\t\t\t\t...edits,\n\t\t\t\t\t\t\t...entityConfig.__unstablePrePersist(\n\t\t\t\t\t\t\t\tpersistedRecord,\n\t\t\t\t\t\t\t\tedits\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tmethod: recordId ? 'PUT' : 'POST',\n\t\t\t\t\t\tdata: edits,\n\t\t\t\t\t} );\n\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tupdatedRecord,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tedits\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn updatedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Runs multiple core-data actions at the same time using one API request.\n *\n * Example:\n *\n * ```\n * const [ savedRecord, updatedRecord, deletedRecord ] =\n * await dispatch( 'core' ).__experimentalBatch( [\n * ( { saveEntityRecord } ) => saveEntityRecord( 'root', 'widget', widget ),\n * ( { saveEditedEntityRecord } ) => saveEntityRecord( 'root', 'widget', 123 ),\n * ( { deleteEntityRecord } ) => deleteEntityRecord( 'root', 'widget', 123, null ),\n * ] );\n * ```\n *\n * @param {Array} requests Array of functions which are invoked simultaneously.\n * Each function is passed an object containing\n * `saveEntityRecord`, `saveEditedEntityRecord`, and\n * `deleteEntityRecord`.\n *\n * @return {(thunkArgs: Object) => Promise} A promise that resolves to an array containing the return\n * values of each function given in `requests`.\n */\nexport const __experimentalBatch =\n\t( requests ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst batch = createBatch();\n\t\tconst api = {\n\t\t\tsaveEntityRecord( kind, name, record, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEntityRecord( kind, name, record, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tsaveEditedEntityRecord( kind, name, recordId, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tdeleteEntityRecord( kind, name, recordId, query, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.deleteEntityRecord( kind, name, recordId, query, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t\tconst resultPromises = requests.map( ( request ) => request( api ) );\n\t\tconst [ , ...results ] = await Promise.all( [\n\t\t\tbatch.run(),\n\t\t\t...resultPromises,\n\t\t] );\n\t\treturn results;\n\t};\n\n/**\n * Action triggered to save an entity record's edits.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Object} options Saving options.\n */\nexport const saveEditedEntityRecord =\n\t( kind, name, recordId, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst record = { [ entityIdKey ]: recordId, ...edits };\n\t\treturn await dispatch.saveEntityRecord( kind, name, record, options );\n\t};\n\n/**\n * Action triggered to save only specified properties for the entity.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Array} itemsToSave List of entity properties to save.\n * @param {Object} options Saving options.\n */\nexport const __experimentalSaveSpecifiedEntityEdits =\n\t( kind, name, recordId, itemsToSave, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst editsToSave = {};\n\t\tfor ( const edit in edits ) {\n\t\t\tif ( itemsToSave.some( ( item ) => item === edit ) ) {\n\t\t\t\teditsToSave[ edit ] = edits[ edit ];\n\t\t\t}\n\t\t}\n\t\treturn await dispatch.saveEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\teditsToSave,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Returns an action object used in signalling that Upload permissions have been received.\n *\n * @deprecated since WP 5.9, use receiveUserPermission instead.\n *\n * @param {boolean} hasUploadPermissions Does the user have permission to upload files?\n *\n * @return {Object} Action object.\n */\nexport function receiveUploadPermissions( hasUploadPermissions ) {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveUploadPermissions\", {\n\t\tsince: '5.9',\n\t\talternative: 'receiveUserPermission',\n\t} );\n\n\treturn receiveUserPermission( 'create/media', hasUploadPermissions );\n}\n\n/**\n * Returns an action object used in signalling that the current user has\n * permission to perform an action on a REST resource.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} key A key that represents the action and REST resource.\n * @param {boolean} isAllowed Whether or not the user can perform the action.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserPermission( key, isAllowed ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_PERMISSION',\n\t\tkey,\n\t\tisAllowed,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the autosaves for a\n * post have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} postId The id of the post that is parent to the autosave.\n * @param {Array|Object} autosaves An array of autosaves or singular autosave object.\n *\n * @return {Object} Action object.\n */\nexport function receiveAutosaves( postId, autosaves ) {\n\treturn {\n\t\ttype: 'RECEIVE_AUTOSAVES',\n\t\tpostId,\n\t\tautosaves: Array.isArray( autosaves ) ? autosaves : [ autosaves ],\n\t};\n}\n"]}
@@ -37,7 +37,7 @@ function chunk(arr, chunkSize) {
37
37
  * @param {Array} requests List of API requests to perform at once.
38
38
  *
39
39
  * @return {Promise} Promise that resolves to a list of objects containing
40
- * either `output` (if that request was succesful) or `error`
40
+ * either `output` (if that request was successful) or `error`
41
41
  * (if not ).
42
42
  */
43
43
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/batch/default-processor.js"],"names":["maxItems","chunk","arr","chunkSize","tmp","cache","length","push","splice","defaultProcessor","requests","preflightResponse","path","method","endpoints","args","results","batchRequests","batchResponse","data","validation","map","request","body","headers","batchResults","failed","responses","response","error","result","status","output"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,QAAQ,GAAG,IAAf;;AAEA,SAASC,KAAT,CAAgBC,GAAhB,EAAqBC,SAArB,EAAiC;AAChC,QAAMC,GAAG,GAAG,CAAE,GAAGF,GAAL,CAAZ;AACA,QAAMG,KAAK,GAAG,EAAd;;AACA,SAAQD,GAAG,CAACE,MAAZ,EAAqB;AACpBD,IAAAA,KAAK,CAACE,IAAN,CAAYH,GAAG,CAACI,MAAJ,CAAY,CAAZ,EAAeL,SAAf,CAAZ;AACA;;AAED,SAAOE,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACe,eAAeI,gBAAf,CAAiCC,QAAjC,EAA4C;AAC1D,MAAKV,QAAQ,KAAK,IAAlB,EAAyB;AACxB,UAAMW,iBAAiB,GAAG,MAAM,uBAAU;AACzCC,MAAAA,IAAI,EAAE,WADmC;AAEzCC,MAAAA,MAAM,EAAE;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,CAACE,MAAP,GAAgBJ,QAAQ,CAACL,IAAzB;AACA,SAFD,MAEO;AACNO,UAAAA,MAAM,CAACD,KAAP,GAAeD,QAAQ,CAACL,IAAxB;AACA;;AACD,eAAOO,MAAP;AACA,OARc,CAAf;AASA;;AAEDd,IAAAA,OAAO,CAACT,IAAR,CAAc,GAAGkB,YAAjB;AACA;;AAED,SAAOT,OAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Maximum number of requests to place in a single batch request. Obtained by\n * sending a preflight OPTIONS request to /batch/v1/.\n *\n * @type {number?}\n */\nlet maxItems = null;\n\nfunction chunk( arr, chunkSize ) {\n\tconst tmp = [ ...arr ];\n\tconst cache = [];\n\twhile ( tmp.length ) {\n\t\tcache.push( tmp.splice( 0, chunkSize ) );\n\t}\n\n\treturn cache;\n}\n\n/**\n * Default batch processor. Sends its input requests to /batch/v1.\n *\n * @param {Array} requests List of API requests to perform at once.\n *\n * @return {Promise} Promise that resolves to a list of objects containing\n * either `output` (if that request was succesful) or `error`\n * (if not ).\n */\nexport default async function defaultProcessor( requests ) {\n\tif ( maxItems === null ) {\n\t\tconst preflightResponse = await apiFetch( {\n\t\t\tpath: '/batch/v1',\n\t\t\tmethod: 'OPTIONS',\n\t\t} );\n\t\tmaxItems = preflightResponse.endpoints[ 0 ].args.requests.maxItems;\n\t}\n\n\tconst results = [];\n\n\t// @ts-ignore We would have crashed or never gotten to this point if we hadn't received the maxItems count.\n\tfor ( const batchRequests of chunk( requests, maxItems ) ) {\n\t\tconst batchResponse = await apiFetch( {\n\t\t\tpath: '/batch/v1',\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tvalidation: 'require-all-validate',\n\t\t\t\trequests: batchRequests.map( ( request ) => ( {\n\t\t\t\t\tpath: request.path,\n\t\t\t\t\tbody: request.data, // Rename 'data' to 'body'.\n\t\t\t\t\tmethod: request.method,\n\t\t\t\t\theaders: request.headers,\n\t\t\t\t} ) ),\n\t\t\t},\n\t\t} );\n\n\t\tlet batchResults;\n\n\t\tif ( batchResponse.failed ) {\n\t\t\tbatchResults = batchResponse.responses.map( ( response ) => ( {\n\t\t\t\terror: response?.body,\n\t\t\t} ) );\n\t\t} else {\n\t\t\tbatchResults = batchResponse.responses.map( ( response ) => {\n\t\t\t\tconst result = {};\n\t\t\t\tif ( response.status >= 200 && response.status < 300 ) {\n\t\t\t\t\tresult.output = response.body;\n\t\t\t\t} else {\n\t\t\t\t\tresult.error = response.body;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t} );\n\t\t}\n\n\t\tresults.push( ...batchResults );\n\t}\n\n\treturn results;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/batch/default-processor.js"],"names":["maxItems","chunk","arr","chunkSize","tmp","cache","length","push","splice","defaultProcessor","requests","preflightResponse","path","method","endpoints","args","results","batchRequests","batchResponse","data","validation","map","request","body","headers","batchResults","failed","responses","response","error","result","status","output"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,QAAQ,GAAG,IAAf;;AAEA,SAASC,KAAT,CAAgBC,GAAhB,EAAqBC,SAArB,EAAiC;AAChC,QAAMC,GAAG,GAAG,CAAE,GAAGF,GAAL,CAAZ;AACA,QAAMG,KAAK,GAAG,EAAd;;AACA,SAAQD,GAAG,CAACE,MAAZ,EAAqB;AACpBD,IAAAA,KAAK,CAACE,IAAN,CAAYH,GAAG,CAACI,MAAJ,CAAY,CAAZ,EAAeL,SAAf,CAAZ;AACA;;AAED,SAAOE,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACe,eAAeI,gBAAf,CAAiCC,QAAjC,EAA4C;AAC1D,MAAKV,QAAQ,KAAK,IAAlB,EAAyB;AACxB,UAAMW,iBAAiB,GAAG,MAAM,uBAAU;AACzCC,MAAAA,IAAI,EAAE,WADmC;AAEzCC,MAAAA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,UAAAA,MAAM,CAACE,MAAP,GAAgBJ,QAAQ,CAACL,IAAzB;AACA,SAFD,MAEO;AACNO,UAAAA,MAAM,CAACD,KAAP,GAAeD,QAAQ,CAACL,IAAxB;AACA;;AACD,eAAOO,MAAP;AACA,OARc,CAAf;AASA;;AAEDd,IAAAA,OAAO,CAACT,IAAR,CAAc,GAAGkB,YAAjB;AACA;;AAED,SAAOT,OAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Maximum number of requests to place in a single batch request. Obtained by\n * sending a preflight OPTIONS request to /batch/v1/.\n *\n * @type {number?}\n */\nlet maxItems = null;\n\nfunction chunk( arr, chunkSize ) {\n\tconst tmp = [ ...arr ];\n\tconst cache = [];\n\twhile ( tmp.length ) {\n\t\tcache.push( tmp.splice( 0, chunkSize ) );\n\t}\n\n\treturn cache;\n}\n\n/**\n * Default batch processor. Sends its input requests to /batch/v1.\n *\n * @param {Array} requests List of API requests to perform at once.\n *\n * @return {Promise} Promise that resolves to a list of objects containing\n * either `output` (if that request was successful) or `error`\n * (if not ).\n */\nexport default async function defaultProcessor( requests ) {\n\tif ( maxItems === null ) {\n\t\tconst preflightResponse = await apiFetch( {\n\t\t\tpath: '/batch/v1',\n\t\t\tmethod: 'OPTIONS',\n\t\t} );\n\t\tmaxItems = preflightResponse.endpoints[ 0 ].args.requests.maxItems;\n\t}\n\n\tconst results = [];\n\n\t// @ts-ignore We would have crashed or never gotten to this point if we hadn't received the maxItems count.\n\tfor ( const batchRequests of chunk( requests, maxItems ) ) {\n\t\tconst batchResponse = await apiFetch( {\n\t\t\tpath: '/batch/v1',\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tvalidation: 'require-all-validate',\n\t\t\t\trequests: batchRequests.map( ( request ) => ( {\n\t\t\t\t\tpath: request.path,\n\t\t\t\t\tbody: request.data, // Rename 'data' to 'body'.\n\t\t\t\t\tmethod: request.method,\n\t\t\t\t\theaders: request.headers,\n\t\t\t\t} ) ),\n\t\t\t},\n\t\t} );\n\n\t\tlet batchResults;\n\n\t\tif ( batchResponse.failed ) {\n\t\t\tbatchResults = batchResponse.responses.map( ( response ) => ( {\n\t\t\t\terror: response?.body,\n\t\t\t} ) );\n\t\t} else {\n\t\t\tbatchResults = batchResponse.responses.map( ( response ) => {\n\t\t\t\tconst result = {};\n\t\t\t\tif ( response.status >= 200 && response.status < 300 ) {\n\t\t\t\t\tresult.output = response.body;\n\t\t\t\t} else {\n\t\t\t\t\tresult.error = response.body;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t} );\n\t\t}\n\n\t\tresults.push( ...batchResults );\n\t}\n\n\treturn results;\n}\n"]}
@@ -7,12 +7,6 @@ exports.receiveItems = receiveItems;
7
7
  exports.receiveQueriedItems = receiveQueriedItems;
8
8
  exports.removeItems = removeItems;
9
9
 
10
- var _lodash = require("lodash");
11
-
12
- /**
13
- * External dependencies
14
- */
15
-
16
10
  /**
17
11
  * Returns an action object used in signalling that items have been received.
18
12
  *
@@ -24,7 +18,7 @@ var _lodash = require("lodash");
24
18
  function receiveItems(items, edits) {
25
19
  return {
26
20
  type: 'RECEIVE_ITEMS',
27
- items: (0, _lodash.castArray)(items),
21
+ items: Array.isArray(items) ? items : [items],
28
22
  persistedEdits: edits
29
23
  };
30
24
  }
@@ -44,7 +38,7 @@ function removeItems(kind, name, records) {
44
38
  let invalidateCache = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
45
39
  return {
46
40
  type: 'REMOVE_ITEMS',
47
- itemIds: (0, _lodash.castArray)(records),
41
+ itemIds: Array.isArray(records) ? records : [records],
48
42
  kind,
49
43
  name,
50
44
  invalidateCache
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/queried-data/actions.js"],"names":["receiveItems","items","edits","type","persistedEdits","removeItems","kind","name","records","invalidateCache","itemIds","receiveQueriedItems","query"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,YAAT,CAAuBC,KAAvB,EAA8BC,KAA9B,EAAsC;AAC5C,SAAO;AACNC,IAAAA,IAAI,EAAE,eADA;AAENF,IAAAA,KAAK,EAAE,uBAAWA,KAAX,CAFD;AAGNG,IAAAA,cAAc,EAAEF;AAHV,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASG,WAAT,CAAsBC,IAAtB,EAA4BC,IAA5B,EAAkCC,OAAlC,EAAqE;AAAA,MAA1BC,eAA0B,uEAAR,KAAQ;AAC3E,SAAO;AACNN,IAAAA,IAAI,EAAE,cADA;AAENO,IAAAA,OAAO,EAAE,uBAAWF,OAAX,CAFH;AAGNF,IAAAA,IAHM;AAINC,IAAAA,IAJM;AAKNE,IAAAA;AALM,GAAP;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASE,mBAAT,CAA8BV,KAA9B,EAAyD;AAAA,MAApBW,KAAoB,uEAAZ,EAAY;AAAA,MAARV,KAAQ;AAC/D,SAAO,EACN,GAAGF,YAAY,CAAEC,KAAF,EAASC,KAAT,CADT;AAENU,IAAAA;AAFM,GAAP;AAIA","sourcesContent":["/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * Returns an action object used in signalling that items have been received.\n *\n * @param {Array} items Items received.\n * @param {?Object} edits Optional edits to reset.\n *\n * @return {Object} Action object.\n */\nexport function receiveItems( items, edits ) {\n\treturn {\n\t\ttype: 'RECEIVE_ITEMS',\n\t\titems: castArray( items ),\n\t\tpersistedEdits: edits,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been\n * deleted and they need to be removed from entities state.\n *\n * @param {string} kind Kind of the removed entities.\n * @param {string} name Name of the removed entities.\n * @param {Array|number|string} records Record IDs of the removed entities.\n * @param {boolean} invalidateCache Controls whether we want to invalidate the cache.\n * @return {Object} Action object.\n */\nexport function removeItems( kind, name, records, invalidateCache = false ) {\n\treturn {\n\t\ttype: 'REMOVE_ITEMS',\n\t\titemIds: castArray( records ),\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that queried data has been\n * received.\n *\n * @param {Array} items Queried items received.\n * @param {?Object} query Optional query object.\n * @param {?Object} edits Optional edits to reset.\n *\n * @return {Object} Action object.\n */\nexport function receiveQueriedItems( items, query = {}, edits ) {\n\treturn {\n\t\t...receiveItems( items, edits ),\n\t\tquery,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/queried-data/actions.js"],"names":["receiveItems","items","edits","type","Array","isArray","persistedEdits","removeItems","kind","name","records","invalidateCache","itemIds","receiveQueriedItems","query"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,YAAT,CAAuBC,KAAvB,EAA8BC,KAA9B,EAAsC;AAC5C,SAAO;AACNC,IAAAA,IAAI,EAAE,eADA;AAENF,IAAAA,KAAK,EAAEG,KAAK,CAACC,OAAN,CAAeJ,KAAf,IAAyBA,KAAzB,GAAiC,CAAEA,KAAF,CAFlC;AAGNK,IAAAA,cAAc,EAAEJ;AAHV,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASK,WAAT,CAAsBC,IAAtB,EAA4BC,IAA5B,EAAkCC,OAAlC,EAAqE;AAAA,MAA1BC,eAA0B,uEAAR,KAAQ;AAC3E,SAAO;AACNR,IAAAA,IAAI,EAAE,cADA;AAENS,IAAAA,OAAO,EAAER,KAAK,CAACC,OAAN,CAAeK,OAAf,IAA2BA,OAA3B,GAAqC,CAAEA,OAAF,CAFxC;AAGNF,IAAAA,IAHM;AAINC,IAAAA,IAJM;AAKNE,IAAAA;AALM,GAAP;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASE,mBAAT,CAA8BZ,KAA9B,EAAyD;AAAA,MAApBa,KAAoB,uEAAZ,EAAY;AAAA,MAARZ,KAAQ;AAC/D,SAAO,EACN,GAAGF,YAAY,CAAEC,KAAF,EAASC,KAAT,CADT;AAENY,IAAAA;AAFM,GAAP;AAIA","sourcesContent":["/**\n * Returns an action object used in signalling that items have been received.\n *\n * @param {Array} items Items received.\n * @param {?Object} edits Optional edits to reset.\n *\n * @return {Object} Action object.\n */\nexport function receiveItems( items, edits ) {\n\treturn {\n\t\ttype: 'RECEIVE_ITEMS',\n\t\titems: Array.isArray( items ) ? items : [ items ],\n\t\tpersistedEdits: edits,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been\n * deleted and they need to be removed from entities state.\n *\n * @param {string} kind Kind of the removed entities.\n * @param {string} name Name of the removed entities.\n * @param {Array|number|string} records Record IDs of the removed entities.\n * @param {boolean} invalidateCache Controls whether we want to invalidate the cache.\n * @return {Object} Action object.\n */\nexport function removeItems( kind, name, records, invalidateCache = false ) {\n\treturn {\n\t\ttype: 'REMOVE_ITEMS',\n\t\titemIds: Array.isArray( records ) ? records : [ records ],\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that queried data has been\n * received.\n *\n * @param {Array} items Queried items received.\n * @param {?Object} query Optional query object.\n * @param {?Object} edits Optional edits to reset.\n *\n * @return {Object} Action object.\n */\nexport function receiveQueriedItems( items, query = {}, edits ) {\n\treturn {\n\t\t...receiveItems( items, edits ),\n\t\tquery,\n\t};\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { castArray, isEqual, find } from 'lodash';
4
+ import { isEqual, find } from 'lodash';
5
5
  import { v4 as uuid } from 'uuid';
6
6
  /**
7
7
  * WordPress dependencies
@@ -33,7 +33,7 @@ import { STORE_NAME } from './name';
33
33
  export function receiveUserQuery(queryID, users) {
34
34
  return {
35
35
  type: 'RECEIVE_USER_QUERY',
36
- users: castArray(users),
36
+ users: Array.isArray(users) ? users : [users],
37
37
  queryID
38
38
  };
39
39
  }
@@ -87,7 +87,7 @@ export function receiveEntityRecords(kind, name, records, query) {
87
87
  // Auto drafts should not have titles, but some plugins rely on them so we can't filter this
88
88
  // on the server.
89
89
  if (kind === 'postType') {
90
- records = castArray(records).map(record => record.status === 'auto-draft' ? { ...record,
90
+ records = (Array.isArray(records) ? records : [records]).map(record => record.status === 'auto-draft' ? { ...record,
91
91
  title: ''
92
92
  } : record);
93
93
  }
@@ -767,7 +767,7 @@ export function receiveAutosaves(postId, autosaves) {
767
767
  return {
768
768
  type: 'RECEIVE_AUTOSAVES',
769
769
  postId,
770
- autosaves: castArray(autosaves)
770
+ autosaves: Array.isArray(autosaves) ? autosaves : [autosaves]
771
771
  };
772
772
  }
773
773
  //# sourceMappingURL=actions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/actions.js"],"names":["castArray","isEqual","find","v4","uuid","apiFetch","addQueryArgs","deprecated","receiveItems","removeItems","receiveQueriedItems","getOrLoadEntitiesConfig","DEFAULT_ENTITY_KEY","createBatch","STORE_NAME","receiveUserQuery","queryID","users","type","receiveCurrentUser","currentUser","addEntities","entities","receiveEntityRecords","kind","name","records","query","invalidateCache","edits","map","record","status","title","action","receiveCurrentTheme","currentTheme","__experimentalReceiveCurrentGlobalStylesId","currentGlobalStylesId","id","__experimentalReceiveThemeBaseGlobalStyles","stylesheet","globalStyles","__experimentalReceiveThemeGlobalStyleVariations","variations","receiveThemeSupports","since","receiveEmbedPreview","url","preview","deleteEntityRecord","recordId","__unstableFetch","throwOnError","dispatch","configs","entityConfig","error","deletedRecord","__experimentalNoFetch","lock","__unstableAcquireStoreLock","exclusive","hasError","path","baseURL","method","_error","__unstableReleaseStoreLock","editEntityRecord","options","select","getEntityConfig","Error","transientEdits","mergedEdits","getRawEntityRecord","editedRecord","getEditedEntityRecord","edit","Object","keys","reduce","acc","key","recordValue","editedRecordValue","value","undefined","meta","undo","undoIgnore","undoEdit","getUndoEdit","isUndo","redo","redoEdit","getRedoEdit","isRedo","__unstableCreateUndoLevel","saveEntityRecord","isAutosave","resolveSelect","entityIdKey","entries","evaluatedValue","updatedRecord","persistedRecord","getCurrentUser","currentUserId","autosavePost","getAutosave","data","includes","newRecord","receiveAutosaves","__unstablePrePersist","__experimentalBatch","requests","batch","api","add","saveEditedEntityRecord","resultPromises","request","results","Promise","all","run","hasEditsForEntityRecord","getEntityRecordNonTransientEdits","__experimentalSaveSpecifiedEntityEdits","itemsToSave","editsToSave","some","item","receiveUploadPermissions","hasUploadPermissions","alternative","receiveUserPermission","isAllowed","postId","autosaves"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,OAApB,EAA6BC,IAA7B,QAAyC,QAAzC;AACA,SAASC,EAAE,IAAIC,IAAf,QAA2B,MAA3B;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,sBAArB;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,SAASC,YAAT,EAAuBC,WAAvB,EAAoCC,mBAApC,QAA+D,gBAA/D;AACA,SAASC,uBAAT,EAAkCC,kBAAlC,QAA4D,YAA5D;AACA,SAASC,WAAT,QAA4B,SAA5B;AACA,SAASC,UAAT,QAA2B,QAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,gBAAT,CAA2BC,OAA3B,EAAoCC,KAApC,EAA4C;AAClD,SAAO;AACNC,IAAAA,IAAI,EAAE,oBADA;AAEND,IAAAA,KAAK,EAAEjB,SAAS,CAAEiB,KAAF,CAFV;AAGND,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASG,kBAAT,CAA6BC,WAA7B,EAA2C;AACjD,SAAO;AACNF,IAAAA,IAAI,EAAE,sBADA;AAENE,IAAAA;A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SAAS,CAAE8I,SAAF;AAHd,GAAP;AAKA","sourcesContent":["/**\n * External dependencies\n */\nimport { castArray, isEqual, find } from 'lodash';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { receiveItems, removeItems, receiveQueriedItems } from './queried-data';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { createBatch } from './batch';\nimport { STORE_NAME } from './name';\n\n/**\n * Returns an action object used in signalling that authors have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} queryID Query ID.\n * @param {Array|Object} users Users received.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserQuery( queryID, users ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_QUERY',\n\t\tusers: castArray( users ),\n\t\tqueryID,\n\t};\n}\n\n/**\n * Returns an action used in signalling that the current user has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentUser Current user object.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentUser( currentUser ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_USER',\n\t\tcurrentUser,\n\t};\n}\n\n/**\n * Returns an action object used in adding new entities.\n *\n * @param {Array} entities Entities received.\n *\n * @return {Object} Action object.\n */\nexport function addEntities( entities ) {\n\treturn {\n\t\ttype: 'ADD_ENTITIES',\n\t\tentities,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been received.\n *\n * @param {string} kind Kind of the received entity record.\n * @param {string} name Name of the received entity record.\n * @param {Array|Object} records Records received.\n * @param {?Object} query Query Object.\n * @param {?boolean} invalidateCache Should invalidate query caches.\n * @param {?Object} edits Edits to reset.\n * @return {Object} Action object.\n */\nexport function receiveEntityRecords(\n\tkind,\n\tname,\n\trecords,\n\tquery,\n\tinvalidateCache = false,\n\tedits\n) {\n\t// Auto drafts should not have titles, but some plugins rely on them so we can't filter this\n\t// on the server.\n\tif ( kind === 'postType' ) {\n\t\trecords = castArray( records ).map( ( record ) =>\n\t\t\trecord.status === 'auto-draft' ? { ...record, title: '' } : record\n\t\t);\n\t}\n\tlet action;\n\tif ( query ) {\n\t\taction = receiveQueriedItems( records, query, edits );\n\t} else {\n\t\taction = receiveItems( records, edits );\n\t}\n\n\treturn {\n\t\t...action,\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current theme has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentTheme The current theme.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentTheme( currentTheme ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_THEME',\n\t\tcurrentTheme,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current global styles id has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} currentGlobalStylesId The current global styles id.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveCurrentGlobalStylesId(\n\tcurrentGlobalStylesId\n) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_GLOBAL_STYLES_ID',\n\t\tid: currentGlobalStylesId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme base global styles have been received\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Object} globalStyles The global styles object.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeBaseGlobalStyles(\n\tstylesheet,\n\tglobalStyles\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLES',\n\t\tstylesheet,\n\t\tglobalStyles,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles variations have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Array} variations The global styles variations.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeGlobalStyleVariations(\n\tstylesheet,\n\tvariations\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS',\n\t\tstylesheet,\n\t\tvariations,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the index has been received.\n *\n * @deprecated since WP 5.9, this is not useful anymore, use the selector direclty.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeSupports() {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveThemeSupports\", {\n\t\tsince: '5.9',\n\t} );\n\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the preview data for\n * a given URl has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} url URL to preview the embed for.\n * @param {*} preview Preview data.\n *\n * @return {Object} Action object.\n */\nexport function receiveEmbedPreview( url, preview ) {\n\treturn {\n\t\ttype: 'RECEIVE_EMBED_PREVIEW',\n\t\turl,\n\t\tpreview,\n\t};\n}\n\n/**\n * Action triggered to delete an entity record.\n *\n * @param {string} kind Kind of the deleted entity.\n * @param {string} name Name of the deleted entity.\n * @param {string} recordId Record ID of the deleted entity.\n * @param {?Object} query Special query parameters for the\n * DELETE API call.\n * @param {Object} [options] Delete options.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const deleteEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecordId,\n\t\tquery,\n\t\t{ __unstableFetch = apiFetch, throwOnError = false } = {}\n\t) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tlet error;\n\t\tlet deletedRecord = false;\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t} );\n\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tlet path = `${ entityConfig.baseURL }/${ recordId }`;\n\n\t\t\t\tif ( query ) {\n\t\t\t\t\tpath = addQueryArgs( path, query );\n\t\t\t\t}\n\n\t\t\t\tdeletedRecord = await __unstableFetch( {\n\t\t\t\t\tpath,\n\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t} );\n\n\t\t\t\tawait dispatch( removeItems( kind, name, recordId, true ) );\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn deletedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Returns an action object that triggers an\n * edit to an entity record.\n *\n * @param {string} kind Kind of the edited entity record.\n * @param {string} name Name of the edited entity record.\n * @param {number} recordId Record ID of the edited entity record.\n * @param {Object} edits The edits.\n * @param {Object} options Options for the edit.\n * @param {boolean} [options.undoIgnore] Whether to ignore the edit in undo history or not.\n *\n * @return {Object} Action object.\n */\nexport const editEntityRecord =\n\t( kind, name, recordId, edits, options = {} ) =>\n\t( { select, dispatch } ) => {\n\t\tconst entityConfig = select.getEntityConfig( kind, name );\n\t\tif ( ! entityConfig ) {\n\t\t\tthrow new Error(\n\t\t\t\t`The entity being edited (${ kind }, ${ name }) does not have a loaded config.`\n\t\t\t);\n\t\t}\n\t\tconst { transientEdits = {}, mergedEdits = {} } = entityConfig;\n\t\tconst record = select.getRawEntityRecord( kind, name, recordId );\n\t\tconst editedRecord = select.getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\n\t\tconst edit = {\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId,\n\t\t\t// Clear edits when they are equal to their persisted counterparts\n\t\t\t// so that the property is not considered dirty.\n\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\tconst recordValue = record[ key ];\n\t\t\t\tconst editedRecordValue = editedRecord[ key ];\n\t\t\t\tconst value = mergedEdits[ key ]\n\t\t\t\t\t? { ...editedRecordValue, ...edits[ key ] }\n\t\t\t\t\t: edits[ key ];\n\t\t\t\tacc[ key ] = isEqual( recordValue, value ) ? undefined : value;\n\t\t\t\treturn acc;\n\t\t\t}, {} ),\n\t\t\ttransientEdits,\n\t\t};\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...edit,\n\t\t\tmeta: {\n\t\t\t\tundo: ! options.undoIgnore && {\n\t\t\t\t\t...edit,\n\t\t\t\t\t// Send the current values for things like the first undo stack entry.\n\t\t\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\t\t\tacc[ key ] = editedRecord[ key ];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} ),\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t};\n\n/**\n * Action triggered to undo the last edit to\n * an entity record, if any.\n */\nexport const undo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst undoEdit = select.getUndoEdit();\n\t\tif ( ! undoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...undoEdit,\n\t\t\tmeta: { isUndo: true },\n\t\t} );\n\t};\n\n/**\n * Action triggered to redo the last undoed\n * edit to an entity record, if any.\n */\nexport const redo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst redoEdit = select.getRedoEdit();\n\t\tif ( ! redoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...redoEdit,\n\t\t\tmeta: { isRedo: true },\n\t\t} );\n\t};\n\n/**\n * Forces the creation of a new undo level.\n *\n * @return {Object} Action object.\n */\nexport function __unstableCreateUndoLevel() {\n\treturn { type: 'CREATE_UNDO_LEVEL' };\n}\n\n/**\n * Action triggered to save an entity record.\n *\n * @param {string} kind Kind of the received entity.\n * @param {string} name Name of the received entity.\n * @param {Object} record Record to be saved.\n * @param {Object} options Saving options.\n * @param {boolean} [options.isAutosave=false] Whether this is an autosave.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const saveEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecord,\n\t\t{\n\t\t\tisAutosave = false,\n\t\t\t__unstableFetch = apiFetch,\n\t\t\tthrowOnError = false,\n\t\t} = {}\n\t) =>\n\tasync ( { select, resolveSelect, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\tconst recordId = record[ entityIdKey ];\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId || uuid() ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\t// Evaluate optimized edits.\n\t\t\t// (Function edits that should be evaluated on save to avoid expensive computations on every edit.)\n\t\t\tfor ( const [ key, value ] of Object.entries( record ) ) {\n\t\t\t\tif ( typeof value === 'function' ) {\n\t\t\t\t\tconst evaluatedValue = value(\n\t\t\t\t\t\tselect.getEditedEntityRecord( kind, name, recordId )\n\t\t\t\t\t);\n\t\t\t\t\tdispatch.editEntityRecord(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ key ]: evaluatedValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t\t);\n\t\t\t\t\trecord[ key ] = evaluatedValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\t\t\tlet updatedRecord;\n\t\t\tlet error;\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tconst path = `${ entityConfig.baseURL }${\n\t\t\t\t\trecordId ? '/' + recordId : ''\n\t\t\t\t}`;\n\t\t\t\tconst persistedRecord = select.getRawEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t);\n\n\t\t\t\tif ( isAutosave ) {\n\t\t\t\t\t// Most of this autosave logic is very specific to posts.\n\t\t\t\t\t// This is fine for now as it is the only supported autosave,\n\t\t\t\t\t// but ideally this should all be handled in the back end,\n\t\t\t\t\t// so the client just sends and receives objects.\n\t\t\t\t\tconst currentUser = select.getCurrentUser();\n\t\t\t\t\tconst currentUserId = currentUser\n\t\t\t\t\t\t? currentUser.id\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\tconst autosavePost = await resolveSelect.getAutosave(\n\t\t\t\t\t\tpersistedRecord.type,\n\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\tcurrentUserId\n\t\t\t\t\t);\n\t\t\t\t\t// Autosaves need all expected fields to be present.\n\t\t\t\t\t// So we fallback to the previous autosave and then\n\t\t\t\t\t// to the actual persisted entity if the edits don't\n\t\t\t\t\t// have a value.\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t...autosavePost,\n\t\t\t\t\t\t...record,\n\t\t\t\t\t};\n\t\t\t\t\tdata = Object.keys( data ).reduce(\n\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tacc[ key ] = data[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus:\n\t\t\t\t\t\t\t\tdata.status === 'auto-draft'\n\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t: data.status,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath: `${ path }/autosaves`,\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\n\t\t\t\t\t// An autosave may be processed by the server as a regular save\n\t\t\t\t\t// when its update is requested by the author and the post had\n\t\t\t\t\t// draft or auto-draft status.\n\t\t\t\t\tif ( persistedRecord.id === updatedRecord.id ) {\n\t\t\t\t\t\tlet newRecord = {\n\t\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t...updatedRecord,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnewRecord = Object.keys( newRecord ).reduce(\n\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t// These properties are persisted in autosaves.\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tacc[ key ] = newRecord[ key ];\n\t\t\t\t\t\t\t\t} else if ( key === 'status' ) {\n\t\t\t\t\t\t\t\t\t// Status is only persisted in autosaves when going from\n\t\t\t\t\t\t\t\t\t// \"auto-draft\" to \"draft\".\n\t\t\t\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\t\t\t\tpersistedRecord.status ===\n\t\t\t\t\t\t\t\t\t\t\t'auto-draft' &&\n\t\t\t\t\t\t\t\t\t\tnewRecord.status === 'draft'\n\t\t\t\t\t\t\t\t\t\t\t? newRecord.status\n\t\t\t\t\t\t\t\t\t\t\t: persistedRecord.status;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// These properties are not persisted in autosaves.\n\t\t\t\t\t\t\t\t\tacc[ key ] = persistedRecord[ key ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnewRecord,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdispatch.receiveAutosaves(\n\t\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\t\tupdatedRecord\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet edits = record;\n\t\t\t\t\tif ( entityConfig.__unstablePrePersist ) {\n\t\t\t\t\t\tedits = {\n\t\t\t\t\t\t\t...edits,\n\t\t\t\t\t\t\t...entityConfig.__unstablePrePersist(\n\t\t\t\t\t\t\t\tpersistedRecord,\n\t\t\t\t\t\t\t\tedits\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tmethod: recordId ? 'PUT' : 'POST',\n\t\t\t\t\t\tdata: edits,\n\t\t\t\t\t} );\n\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tupdatedRecord,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tedits\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn updatedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Runs multiple core-data actions at the same time using one API request.\n *\n * Example:\n *\n * ```\n * const [ savedRecord, updatedRecord, deletedRecord ] =\n * await dispatch( 'core' ).__experimentalBatch( [\n * ( { saveEntityRecord } ) => saveEntityRecord( 'root', 'widget', widget ),\n * ( { saveEditedEntityRecord } ) => saveEntityRecord( 'root', 'widget', 123 ),\n * ( { deleteEntityRecord } ) => deleteEntityRecord( 'root', 'widget', 123, null ),\n * ] );\n * ```\n *\n * @param {Array} requests Array of functions which are invoked simultaneously.\n * Each function is passed an object containing\n * `saveEntityRecord`, `saveEditedEntityRecord`, and\n * `deleteEntityRecord`.\n *\n * @return {(thunkArgs: Object) => Promise} A promise that resolves to an array containing the return\n * values of each function given in `requests`.\n */\nexport const __experimentalBatch =\n\t( requests ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst batch = createBatch();\n\t\tconst api = {\n\t\t\tsaveEntityRecord( kind, name, record, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEntityRecord( kind, name, record, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tsaveEditedEntityRecord( kind, name, recordId, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tdeleteEntityRecord( kind, name, recordId, query, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.deleteEntityRecord( kind, name, recordId, query, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t\tconst resultPromises = requests.map( ( request ) => request( api ) );\n\t\tconst [ , ...results ] = await Promise.all( [\n\t\t\tbatch.run(),\n\t\t\t...resultPromises,\n\t\t] );\n\t\treturn results;\n\t};\n\n/**\n * Action triggered to save an entity record's edits.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Object} options Saving options.\n */\nexport const saveEditedEntityRecord =\n\t( kind, name, recordId, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst record = { [ entityIdKey ]: recordId, ...edits };\n\t\treturn await dispatch.saveEntityRecord( kind, name, record, options );\n\t};\n\n/**\n * Action triggered to save only specified properties for the entity.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Array} itemsToSave List of entity properties to save.\n * @param {Object} options Saving options.\n */\nexport const __experimentalSaveSpecifiedEntityEdits =\n\t( kind, name, recordId, itemsToSave, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst editsToSave = {};\n\t\tfor ( const edit in edits ) {\n\t\t\tif ( itemsToSave.some( ( item ) => item === edit ) ) {\n\t\t\t\teditsToSave[ edit ] = edits[ edit ];\n\t\t\t}\n\t\t}\n\t\treturn await dispatch.saveEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\teditsToSave,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Returns an action object used in signalling that Upload permissions have been received.\n *\n * @deprecated since WP 5.9, use receiveUserPermission instead.\n *\n * @param {boolean} hasUploadPermissions Does the user have permission to upload files?\n *\n * @return {Object} Action object.\n */\nexport function receiveUploadPermissions( hasUploadPermissions ) {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveUploadPermissions\", {\n\t\tsince: '5.9',\n\t\talternative: 'receiveUserPermission',\n\t} );\n\n\treturn receiveUserPermission( 'create/media', hasUploadPermissions );\n}\n\n/**\n * Returns an action object used in signalling that the current user has\n * permission to perform an action on a REST resource.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} key A key that represents the action and REST resource.\n * @param {boolean} isAllowed Whether or not the user can perform the action.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserPermission( key, isAllowed ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_PERMISSION',\n\t\tkey,\n\t\tisAllowed,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the autosaves for a\n * post have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} postId The id of the post that is parent to the autosave.\n * @param {Array|Object} autosaves An array of autosaves or singular autosave object.\n *\n * @return {Object} Action object.\n */\nexport function receiveAutosaves( postId, autosaves ) {\n\treturn {\n\t\ttype: 'RECEIVE_AUTOSAVES',\n\t\tpostId,\n\t\tautosaves: castArray( autosaves ),\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/actions.js"],"names":["isEqual","find","v4","uuid","apiFetch","addQueryArgs","deprecated","receiveItems","removeItems","receiveQueriedItems","getOrLoadEntitiesConfig","DEFAULT_ENTITY_KEY","createBatch","STORE_NAME","receiveUserQuery","queryID","users","type","Array","isArray","receiveCurrentUser","currentUser","addEntities","entities","receiveEntityRecords","kind","name","records","query","invalidateCache","edits","map","record","status","title","action","receiveCurrentTheme","currentTheme","__experimentalReceiveCurrentGlobalStylesId","currentGlobalStylesId","id","__experimentalReceiveThemeBaseGlobalStyles","stylesheet","globalStyles","__experimentalReceiveThemeGlobalStyleVariations","variations","receiveThemeSupports","since","receiveEmbedPreview","url","preview","deleteEntityRecord","recordId","__unstableFetch","throwOnError","dispatch","configs","entityConfig","error","deletedRecord","__experimentalNoFetch","lock","__unstableAcquireStoreLock","exclusive","hasError","path","baseURL","method","_error","__unstableReleaseStoreLock","editEntityRecord","options","select","getEntityConfig","Error","transientEdits","mergedEdits","getRawEntityRecord","editedRecord","getEditedEntityRecord","edit","Object","keys","reduce","acc","key","recordValue","editedRecordValue","value","undefined","meta","undo","undoIgnore","undoEdit","getUndoEdit","isUndo","redo","redoEdit","getRedoEdit","isRedo","__unstableCreateUndoLevel","saveEntityRecord","isAutosave","resolveSelect","entityIdKey","entries","evaluatedValue","updatedRecord","persistedRecord","getCurrentUser","currentUserId","autosavePost","getAutosave","data","includes","newRecord","receiveAutosaves","__unstablePrePersist","__experimentalBatch","requests","batch","api","add","saveEditedEntityRecord","resultPromises","request","results","Promise","all","run","hasEditsForEntityRecord","getEntityRecordNonTransientEdits","__experimentalSaveSpecifiedEntityEdits","itemsToSave","editsToSave","some","item","receiveUploadPermissions","hasUploadPermissions","alternative","receiveUserPermission","isAllowed","postId","autosaves"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,EAAkBC,IAAlB,QAA8B,QAA9B;AACA,SAASC,EAAE,IAAIC,IAAf,QAA2B,MAA3B;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,sBAArB;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,SAASC,YAAT,EAAuBC,WAAvB,EAAoCC,mBAApC,QAA+D,gBAA/D;AACA,SAASC,uBAAT,EAAkCC,kBAAlC,QAA4D,YAA5D;AACA,SAASC,WAAT,QAA4B,SAA5B;AACA,SAASC,UAAT,QAA2B,QAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,gBAAT,CAA2BC,OAA3B,EAAoCC,KAApC,EAA4C;AAClD,SAAO;AACNC,IAAAA,IAAI,EAAE,oBADA;AAEND,IAAAA,KAAK,EAAEE,KAAK,CAACC,OAAN,CAAeH,KAAf,IAAyBA,KAAzB,GAAiC,CAAEA,KAAF,CAFlC;AAGND,IAAAA;AAHM,GAAP;AAKA;AA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;AACnD,SAAO;AACNpB,IAAAA,IAAI,EAAE,uBADA;AAENoB,IAAAA;AAFM,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,0CAAT,CACNC,qBADM,EAEL;AACD,SAAO;AACNtB,IAAAA,IAAI,EAAE,kCADA;AAENuB,IAAAA,EAAE,EAAED;AAFE,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,0CAAT,CACNC,UADM,EAENC,YAFM,EAGL;AACD,SAAO;AACN1B,IAAAA,IAAI,EAAE,6BADA;AAENyB,IAAAA,UAFM;AAGNC,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,+CAAT,CACNF,UADM,EAENG,UAFM,EAGL;AACD,SAAO;AACN5B,IAAAA,IAAI,EAAE,uCADA;AAENyB,IAAAA,UAFM;AAGNG,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,oBAAT,GAAgC;AACtCxC,EAAAA,UAAU,CAAE,iDAAF,EAAqD;AAC9DyC,IAAAA,KAAK,EAAE;AADuD,GAArD,CAAV;AAIA,SAAO;AACN9B,IAAAA,IAAI,EAAE;AADA,GAAP;AAGA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAAS+B,mBAAT,CAA8BC,GAA9B,EAAmCC,OAAnC,EAA6C;AACnD,SAAO;AACNjC,IAAAA,IAAI,EAAE,uBADA;AAENgC,IAAAA,GAFM;AAGNC,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,kBAAkB,GAC9B,UACC1B,IADD,EAECC,IAFD,EAGC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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASzB,gBAAT,CAA2B0B,MAA3B,EAAmCC,SAAnC,EAA+C;AACrD,SAAO;AACN9H,IAAAA,IAAI,EAAE,mBADA;AAEN6H,IAAAA,MAFM;AAGNC,IAAAA,SAAS,EAAE7H,KAAK,CAACC,OAAN,CAAe4H,SAAf,IAA6BA,SAA7B,GAAyC,CAAEA,SAAF;AAH9C,GAAP;AAKA","sourcesContent":["/**\n * External dependencies\n */\nimport { isEqual, find } from 'lodash';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { receiveItems, removeItems, receiveQueriedItems } from './queried-data';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { createBatch } from './batch';\nimport { STORE_NAME } from './name';\n\n/**\n * Returns an action object used in signalling that authors have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} queryID Query ID.\n * @param {Array|Object} users Users received.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserQuery( queryID, users ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_QUERY',\n\t\tusers: Array.isArray( users ) ? users : [ users ],\n\t\tqueryID,\n\t};\n}\n\n/**\n * Returns an action used in signalling that the current user has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentUser Current user object.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentUser( currentUser ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_USER',\n\t\tcurrentUser,\n\t};\n}\n\n/**\n * Returns an action object used in adding new entities.\n *\n * @param {Array} entities Entities received.\n *\n * @return {Object} Action object.\n */\nexport function addEntities( entities ) {\n\treturn {\n\t\ttype: 'ADD_ENTITIES',\n\t\tentities,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been received.\n *\n * @param {string} kind Kind of the received entity record.\n * @param {string} name Name of the received entity record.\n * @param {Array|Object} records Records received.\n * @param {?Object} query Query Object.\n * @param {?boolean} invalidateCache Should invalidate query caches.\n * @param {?Object} edits Edits to reset.\n * @return {Object} Action object.\n */\nexport function receiveEntityRecords(\n\tkind,\n\tname,\n\trecords,\n\tquery,\n\tinvalidateCache = false,\n\tedits\n) {\n\t// Auto drafts should not have titles, but some plugins rely on them so we can't filter this\n\t// on the server.\n\tif ( kind === 'postType' ) {\n\t\trecords = ( Array.isArray( records ) ? records : [ records ] ).map(\n\t\t\t( record ) =>\n\t\t\t\trecord.status === 'auto-draft'\n\t\t\t\t\t? { ...record, title: '' }\n\t\t\t\t\t: record\n\t\t);\n\t}\n\tlet action;\n\tif ( query ) {\n\t\taction = receiveQueriedItems( records, query, edits );\n\t} else {\n\t\taction = receiveItems( records, edits );\n\t}\n\n\treturn {\n\t\t...action,\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current theme has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentTheme The current theme.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentTheme( currentTheme ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_THEME',\n\t\tcurrentTheme,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current global styles id has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} currentGlobalStylesId The current global styles id.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveCurrentGlobalStylesId(\n\tcurrentGlobalStylesId\n) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_GLOBAL_STYLES_ID',\n\t\tid: currentGlobalStylesId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme base global styles have been received\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Object} globalStyles The global styles object.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeBaseGlobalStyles(\n\tstylesheet,\n\tglobalStyles\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLES',\n\t\tstylesheet,\n\t\tglobalStyles,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles variations have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Array} variations The global styles variations.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeGlobalStyleVariations(\n\tstylesheet,\n\tvariations\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS',\n\t\tstylesheet,\n\t\tvariations,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the index has been received.\n *\n * @deprecated since WP 5.9, this is not useful anymore, use the selector direclty.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeSupports() {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveThemeSupports\", {\n\t\tsince: '5.9',\n\t} );\n\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the preview data for\n * a given URl has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} url URL to preview the embed for.\n * @param {*} preview Preview data.\n *\n * @return {Object} Action object.\n */\nexport function receiveEmbedPreview( url, preview ) {\n\treturn {\n\t\ttype: 'RECEIVE_EMBED_PREVIEW',\n\t\turl,\n\t\tpreview,\n\t};\n}\n\n/**\n * Action triggered to delete an entity record.\n *\n * @param {string} kind Kind of the deleted entity.\n * @param {string} name Name of the deleted entity.\n * @param {string} recordId Record ID of the deleted entity.\n * @param {?Object} query Special query parameters for the\n * DELETE API call.\n * @param {Object} [options] Delete options.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const deleteEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecordId,\n\t\tquery,\n\t\t{ __unstableFetch = apiFetch, throwOnError = false } = {}\n\t) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tlet error;\n\t\tlet deletedRecord = false;\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t} );\n\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tlet path = `${ entityConfig.baseURL }/${ recordId }`;\n\n\t\t\t\tif ( query ) {\n\t\t\t\t\tpath = addQueryArgs( path, query );\n\t\t\t\t}\n\n\t\t\t\tdeletedRecord = await __unstableFetch( {\n\t\t\t\t\tpath,\n\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t} );\n\n\t\t\t\tawait dispatch( removeItems( kind, name, recordId, true ) );\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn deletedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Returns an action object that triggers an\n * edit to an entity record.\n *\n * @param {string} kind Kind of the edited entity record.\n * @param {string} name Name of the edited entity record.\n * @param {number} recordId Record ID of the edited entity record.\n * @param {Object} edits The edits.\n * @param {Object} options Options for the edit.\n * @param {boolean} [options.undoIgnore] Whether to ignore the edit in undo history or not.\n *\n * @return {Object} Action object.\n */\nexport const editEntityRecord =\n\t( kind, name, recordId, edits, options = {} ) =>\n\t( { select, dispatch } ) => {\n\t\tconst entityConfig = select.getEntityConfig( kind, name );\n\t\tif ( ! entityConfig ) {\n\t\t\tthrow new Error(\n\t\t\t\t`The entity being edited (${ kind }, ${ name }) does not have a loaded config.`\n\t\t\t);\n\t\t}\n\t\tconst { transientEdits = {}, mergedEdits = {} } = entityConfig;\n\t\tconst record = select.getRawEntityRecord( kind, name, recordId );\n\t\tconst editedRecord = select.getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\n\t\tconst edit = {\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId,\n\t\t\t// Clear edits when they are equal to their persisted counterparts\n\t\t\t// so that the property is not considered dirty.\n\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\tconst recordValue = record[ key ];\n\t\t\t\tconst editedRecordValue = editedRecord[ key ];\n\t\t\t\tconst value = mergedEdits[ key ]\n\t\t\t\t\t? { ...editedRecordValue, ...edits[ key ] }\n\t\t\t\t\t: edits[ key ];\n\t\t\t\tacc[ key ] = isEqual( recordValue, value ) ? undefined : value;\n\t\t\t\treturn acc;\n\t\t\t}, {} ),\n\t\t\ttransientEdits,\n\t\t};\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...edit,\n\t\t\tmeta: {\n\t\t\t\tundo: ! options.undoIgnore && {\n\t\t\t\t\t...edit,\n\t\t\t\t\t// Send the current values for things like the first undo stack entry.\n\t\t\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\t\t\tacc[ key ] = editedRecord[ key ];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} ),\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t};\n\n/**\n * Action triggered to undo the last edit to\n * an entity record, if any.\n */\nexport const undo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst undoEdit = select.getUndoEdit();\n\t\tif ( ! undoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...undoEdit,\n\t\t\tmeta: { isUndo: true },\n\t\t} );\n\t};\n\n/**\n * Action triggered to redo the last undoed\n * edit to an entity record, if any.\n */\nexport const redo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst redoEdit = select.getRedoEdit();\n\t\tif ( ! redoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...redoEdit,\n\t\t\tmeta: { isRedo: true },\n\t\t} );\n\t};\n\n/**\n * Forces the creation of a new undo level.\n *\n * @return {Object} Action object.\n */\nexport function __unstableCreateUndoLevel() {\n\treturn { type: 'CREATE_UNDO_LEVEL' };\n}\n\n/**\n * Action triggered to save an entity record.\n *\n * @param {string} kind Kind of the received entity.\n * @param {string} name Name of the received entity.\n * @param {Object} record Record to be saved.\n * @param {Object} options Saving options.\n * @param {boolean} [options.isAutosave=false] Whether this is an autosave.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const saveEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecord,\n\t\t{\n\t\t\tisAutosave = false,\n\t\t\t__unstableFetch = apiFetch,\n\t\t\tthrowOnError = false,\n\t\t} = {}\n\t) =>\n\tasync ( { select, resolveSelect, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\tconst recordId = record[ entityIdKey ];\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId || uuid() ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\t// Evaluate optimized edits.\n\t\t\t// (Function edits that should be evaluated on save to avoid expensive computations on every edit.)\n\t\t\tfor ( const [ key, value ] of Object.entries( record ) ) {\n\t\t\t\tif ( typeof value === 'function' ) {\n\t\t\t\t\tconst evaluatedValue = value(\n\t\t\t\t\t\tselect.getEditedEntityRecord( kind, name, recordId )\n\t\t\t\t\t);\n\t\t\t\t\tdispatch.editEntityRecord(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ key ]: evaluatedValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t\t);\n\t\t\t\t\trecord[ key ] = evaluatedValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\t\t\tlet updatedRecord;\n\t\t\tlet error;\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tconst path = `${ entityConfig.baseURL }${\n\t\t\t\t\trecordId ? '/' + recordId : ''\n\t\t\t\t}`;\n\t\t\t\tconst persistedRecord = select.getRawEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t);\n\n\t\t\t\tif ( isAutosave ) {\n\t\t\t\t\t// Most of this autosave logic is very specific to posts.\n\t\t\t\t\t// This is fine for now as it is the only supported autosave,\n\t\t\t\t\t// but ideally this should all be handled in the back end,\n\t\t\t\t\t// so the client just sends and receives objects.\n\t\t\t\t\tconst currentUser = select.getCurrentUser();\n\t\t\t\t\tconst currentUserId = currentUser\n\t\t\t\t\t\t? currentUser.id\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\tconst autosavePost = await resolveSelect.getAutosave(\n\t\t\t\t\t\tpersistedRecord.type,\n\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\tcurrentUserId\n\t\t\t\t\t);\n\t\t\t\t\t// Autosaves need all expected fields to be present.\n\t\t\t\t\t// So we fallback to the previous autosave and then\n\t\t\t\t\t// to the actual persisted entity if the edits don't\n\t\t\t\t\t// have a value.\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t...autosavePost,\n\t\t\t\t\t\t...record,\n\t\t\t\t\t};\n\t\t\t\t\tdata = Object.keys( data ).reduce(\n\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tacc[ key ] = data[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus:\n\t\t\t\t\t\t\t\tdata.status === 'auto-draft'\n\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t: data.status,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath: `${ path }/autosaves`,\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\n\t\t\t\t\t// An autosave may be processed by the server as a regular save\n\t\t\t\t\t// when its update is requested by the author and the post had\n\t\t\t\t\t// draft or auto-draft status.\n\t\t\t\t\tif ( persistedRecord.id === updatedRecord.id ) {\n\t\t\t\t\t\tlet newRecord = {\n\t\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t...updatedRecord,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnewRecord = Object.keys( newRecord ).reduce(\n\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t// These properties are persisted in autosaves.\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tacc[ key ] = newRecord[ key ];\n\t\t\t\t\t\t\t\t} else if ( key === 'status' ) {\n\t\t\t\t\t\t\t\t\t// Status is only persisted in autosaves when going from\n\t\t\t\t\t\t\t\t\t// \"auto-draft\" to \"draft\".\n\t\t\t\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\t\t\t\tpersistedRecord.status ===\n\t\t\t\t\t\t\t\t\t\t\t'auto-draft' &&\n\t\t\t\t\t\t\t\t\t\tnewRecord.status === 'draft'\n\t\t\t\t\t\t\t\t\t\t\t? newRecord.status\n\t\t\t\t\t\t\t\t\t\t\t: persistedRecord.status;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// These properties are not persisted in autosaves.\n\t\t\t\t\t\t\t\t\tacc[ key ] = persistedRecord[ key ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnewRecord,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdispatch.receiveAutosaves(\n\t\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\t\tupdatedRecord\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet edits = record;\n\t\t\t\t\tif ( entityConfig.__unstablePrePersist ) {\n\t\t\t\t\t\tedits = {\n\t\t\t\t\t\t\t...edits,\n\t\t\t\t\t\t\t...entityConfig.__unstablePrePersist(\n\t\t\t\t\t\t\t\tpersistedRecord,\n\t\t\t\t\t\t\t\tedits\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tmethod: recordId ? 'PUT' : 'POST',\n\t\t\t\t\t\tdata: edits,\n\t\t\t\t\t} );\n\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tupdatedRecord,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tedits\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn updatedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Runs multiple core-data actions at the same time using one API request.\n *\n * Example:\n *\n * ```\n * const [ savedRecord, updatedRecord, deletedRecord ] =\n * await dispatch( 'core' ).__experimentalBatch( [\n * ( { saveEntityRecord } ) => saveEntityRecord( 'root', 'widget', widget ),\n * ( { saveEditedEntityRecord } ) => saveEntityRecord( 'root', 'widget', 123 ),\n * ( { deleteEntityRecord } ) => deleteEntityRecord( 'root', 'widget', 123, null ),\n * ] );\n * ```\n *\n * @param {Array} requests Array of functions which are invoked simultaneously.\n * Each function is passed an object containing\n * `saveEntityRecord`, `saveEditedEntityRecord`, and\n * `deleteEntityRecord`.\n *\n * @return {(thunkArgs: Object) => Promise} A promise that resolves to an array containing the return\n * values of each function given in `requests`.\n */\nexport const __experimentalBatch =\n\t( requests ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst batch = createBatch();\n\t\tconst api = {\n\t\t\tsaveEntityRecord( kind, name, record, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEntityRecord( kind, name, record, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tsaveEditedEntityRecord( kind, name, recordId, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tdeleteEntityRecord( kind, name, recordId, query, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.deleteEntityRecord( kind, name, recordId, query, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t\tconst resultPromises = requests.map( ( request ) => request( api ) );\n\t\tconst [ , ...results ] = await Promise.all( [\n\t\t\tbatch.run(),\n\t\t\t...resultPromises,\n\t\t] );\n\t\treturn results;\n\t};\n\n/**\n * Action triggered to save an entity record's edits.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Object} options Saving options.\n */\nexport const saveEditedEntityRecord =\n\t( kind, name, recordId, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = find( configs, { kind, name } );\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst record = { [ entityIdKey ]: recordId, ...edits };\n\t\treturn await dispatch.saveEntityRecord( kind, name, record, options );\n\t};\n\n/**\n * Action triggered to save only specified properties for the entity.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Array} itemsToSave List of entity properties to save.\n * @param {Object} options Saving options.\n */\nexport const __experimentalSaveSpecifiedEntityEdits =\n\t( kind, name, recordId, itemsToSave, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst editsToSave = {};\n\t\tfor ( const edit in edits ) {\n\t\t\tif ( itemsToSave.some( ( item ) => item === edit ) ) {\n\t\t\t\teditsToSave[ edit ] = edits[ edit ];\n\t\t\t}\n\t\t}\n\t\treturn await dispatch.saveEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\teditsToSave,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Returns an action object used in signalling that Upload permissions have been received.\n *\n * @deprecated since WP 5.9, use receiveUserPermission instead.\n *\n * @param {boolean} hasUploadPermissions Does the user have permission to upload files?\n *\n * @return {Object} Action object.\n */\nexport function receiveUploadPermissions( hasUploadPermissions ) {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveUploadPermissions\", {\n\t\tsince: '5.9',\n\t\talternative: 'receiveUserPermission',\n\t} );\n\n\treturn receiveUserPermission( 'create/media', hasUploadPermissions );\n}\n\n/**\n * Returns an action object used in signalling that the current user has\n * permission to perform an action on a REST resource.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} key A key that represents the action and REST resource.\n * @param {boolean} isAllowed Whether or not the user can perform the action.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserPermission( key, isAllowed ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_PERMISSION',\n\t\tkey,\n\t\tisAllowed,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the autosaves for a\n * post have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} postId The id of the post that is parent to the autosave.\n * @param {Array|Object} autosaves An array of autosaves or singular autosave object.\n *\n * @return {Object} Action object.\n */\nexport function receiveAutosaves( postId, autosaves ) {\n\treturn {\n\t\ttype: 'RECEIVE_AUTOSAVES',\n\t\tpostId,\n\t\tautosaves: Array.isArray( autosaves ) ? autosaves : [ autosaves ],\n\t};\n}\n"]}
@@ -27,7 +27,7 @@ function chunk(arr, chunkSize) {
27
27
  * @param {Array} requests List of API requests to perform at once.
28
28
  *
29
29
  * @return {Promise} Promise that resolves to a list of objects containing
30
- * either `output` (if that request was succesful) or `error`
30
+ * either `output` (if that request was successful) or `error`
31
31
  * (if not ).
32
32
  */
33
33
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/batch/default-processor.js"],"names":["apiFetch","maxItems","chunk","arr","chunkSize","tmp","cache","length","push","splice","defaultProcessor","requests","preflightResponse","path","method","endpoints","args","results","batchRequests","batchResponse","data","validation","map","request","body","headers","batchResults","failed","responses","response","error","result","status","output"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAP,MAAqB,sBAArB;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAIC,QAAQ,GAAG,IAAf;;AAEA,SAASC,KAAT,CAAgBC,GAAhB,EAAqBC,SAArB,EAAiC;AAChC,QAAMC,GAAG,GAAG,CAAE,GAAGF,GAAL,CAAZ;AACA,QAAMG,KAAK,GAAG,EAAd;;AACA,SAAQD,GAAG,CAACE,MAAZ,EAAqB;AACpBD,IAAAA,KAAK,CAACE,IAAN,CAAYH,GAAG,CAACI,MAAJ,CAAY,CAAZ,EAAeL,SAAf,CAAZ;AACA;;AAED,SAAOE,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,eAAe,eAAeI,gBAAf,CAAiCC,QAAjC,EAA4C;AAC1D,MAAKV,QAAQ,KAAK,IAAlB,EAAyB;AACxB,UAAMW,iBAAiB,GAAG,MAAMZ,QAAQ,CAAE;AACzCa,MAAAA,IAAI,EAAE,WADmC;AAEzCC,MAAAA,MAAM,EAAE;AAFiC,KAAF,CAAxC;AAIAb,IAAAA,QAAQ,GAAGW,iBAAiB,CAACG,SAAlB,CAA6B,CAA7B,EAAiCC,IAAjC,CAAsCL,QAAtC,CAA+CV,QAA1D;AACA;;AAED,QAAMgB,OAAO,GAAG,EAAhB,CAT0D,CAW1D;;AACA,OAAM,MAAMC,aAAZ,IAA6BhB,KAAK,CAAES,QAAF,EAAYV,QAAZ,CAAlC,EAA2D;AAC1D,UAAMkB,aAAa,GAAG,MAAMnB,QAAQ,CAAE;AACrCa,MAAAA,IAAI,EAAE,WAD+B;AAErCC,MAAAA,MAAM,EAAE,MAF6B;AAGrCM,MAAAA,IAAI,EAAE;AACLC,QAAAA,UAAU,EAAE,sBADP;AAELV,QAAAA,QAAQ,EAAEO,aAAa,CAACI,GAAd,CAAqBC,OAAF,KAAiB;AAC7CV,UAAAA,IAAI,EAAEU,OAAO,CAACV,IAD+B;AAE7CW,UAAAA,IAAI,EAAED,OAAO,CAACH,IAF+B;AAEzB;AACpBN,UAAAA,MAAM,EAAES,OAAO,CAACT,MAH6B;AAI7CW,UAAAA,OAAO,EAAEF,OAAO,CAACE;AAJ4B,SAAjB,CAAnB;AAFL;AAH+B,KAAF,CAApC;AAcA,QAAIC,YAAJ;;AAEA,QAAKP,aAAa,CAACQ,MAAnB,EAA4B;AAC3BD,MAAAA,YAAY,GAAGP,aAAa,CAACS,SAAd,CAAwBN,GAAxB,CAA+BO,QAAF,KAAkB;AAC7DC,QAAAA,KAAK,EAAED,QAAF,aAAEA,QAAF,uBAAEA,QAAQ,CAAEL;AAD4C,OAAlB,CAA7B,CAAf;AAGA,KAJD,MAIO;AACNE,MAAAA,YAAY,GAAGP,aAAa,CAACS,SAAd,CAAwBN,GAAxB,CAA+BO,QAAF,IAAgB;AAC3D,cAAME,MAAM,GAAG,EAAf;;AACA,YAAKF,QAAQ,CAACG,MAAT,IAAmB,GAAnB,IAA0BH,QAAQ,CAACG,MAAT,GAAkB,GAAjD,EAAuD;AACtDD,UAAAA,MAAM,CAACE,MAAP,GAAgBJ,QAAQ,CAACL,IAAzB;AACA,SAFD,MAEO;AACNO,UAAAA,MAAM,CAACD,KAAP,GAAeD,QAAQ,CAACL,IAAxB;AACA;;AACD,eAAOO,MAAP;AACA,OARc,CAAf;AASA;;AAEDd,IAAAA,OAAO,CAACT,IAAR,CAAc,GAAGkB,YAAjB;AACA;;AAED,SAAOT,OAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Maximum number of requests to place in a single batch request. Obtained by\n * sending a preflight OPTIONS request to /batch/v1/.\n *\n * @type {number?}\n */\nlet maxItems = null;\n\nfunction chunk( arr, chunkSize ) {\n\tconst tmp = [ ...arr ];\n\tconst cache = [];\n\twhile ( tmp.length ) {\n\t\tcache.push( tmp.splice( 0, chunkSize ) );\n\t}\n\n\treturn cache;\n}\n\n/**\n * Default batch processor. Sends its input requests to /batch/v1.\n *\n * @param {Array} requests List of API requests to perform at once.\n *\n * @return {Promise} Promise that resolves to a list of objects containing\n * either `output` (if that request was succesful) or `error`\n * (if not ).\n */\nexport default async function defaultProcessor( requests ) {\n\tif ( maxItems === null ) {\n\t\tconst preflightResponse = await apiFetch( {\n\t\t\tpath: '/batch/v1',\n\t\t\tmethod: 'OPTIONS',\n\t\t} );\n\t\tmaxItems = preflightResponse.endpoints[ 0 ].args.requests.maxItems;\n\t}\n\n\tconst results = [];\n\n\t// @ts-ignore We would have crashed or never gotten to this point if we hadn't received the maxItems count.\n\tfor ( const batchRequests of chunk( requests, maxItems ) ) {\n\t\tconst batchResponse = await apiFetch( {\n\t\t\tpath: '/batch/v1',\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tvalidation: 'require-all-validate',\n\t\t\t\trequests: batchRequests.map( ( request ) => ( {\n\t\t\t\t\tpath: request.path,\n\t\t\t\t\tbody: request.data, // Rename 'data' to 'body'.\n\t\t\t\t\tmethod: request.method,\n\t\t\t\t\theaders: request.headers,\n\t\t\t\t} ) ),\n\t\t\t},\n\t\t} );\n\n\t\tlet batchResults;\n\n\t\tif ( batchResponse.failed ) {\n\t\t\tbatchResults = batchResponse.responses.map( ( response ) => ( {\n\t\t\t\terror: response?.body,\n\t\t\t} ) );\n\t\t} else {\n\t\t\tbatchResults = batchResponse.responses.map( ( response ) => {\n\t\t\t\tconst result = {};\n\t\t\t\tif ( response.status >= 200 && response.status < 300 ) {\n\t\t\t\t\tresult.output = response.body;\n\t\t\t\t} else {\n\t\t\t\t\tresult.error = response.body;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t} );\n\t\t}\n\n\t\tresults.push( ...batchResults );\n\t}\n\n\treturn results;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/batch/default-processor.js"],"names":["apiFetch","maxItems","chunk","arr","chunkSize","tmp","cache","length","push","splice","defaultProcessor","requests","preflightResponse","path","method","endpoints","args","results","batchRequests","batchResponse","data","validation","map","request","body","headers","batchResults","failed","responses","response","error","result","status","output"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAP,MAAqB,sBAArB;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAIC,QAAQ,GAAG,IAAf;;AAEA,SAASC,KAAT,CAAgBC,GAAhB,EAAqBC,SAArB,EAAiC;AAChC,QAAMC,GAAG,GAAG,CAAE,GAAGF,GAAL,CAAZ;AACA,QAAMG,KAAK,GAAG,EAAd;;AACA,SAAQD,GAAG,CAACE,MAAZ,EAAqB;AACpBD,IAAAA,KAAK,CAACE,IAAN,CAAYH,GAAG,CAACI,MAAJ,CAAY,CAAZ,EAAeL,SAAf,CAAZ;AACA;;AAED,SAAOE,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,eAAe,eAAeI,gBAAf,CAAiCC,QAAjC,EAA4C;AAC1D,MAAKV,QAAQ,KAAK,IAAlB,EAAyB;AACxB,UAAMW,iBAAiB,GAAG,MAAMZ,QAAQ,CAAE;AACzCa,MAAAA,IAAI,EAAE,WADmC;AAEzCC,MAAAA,MAAM,EAAE;AAFiC,KAAF,CAAxC;AAIAb,IAAAA,QAAQ,GAAGW,iBAAiB,CAACG,SAAlB,CAA6B,CAA7B,EAAiCC,IAAjC,CAAsCL,QAAtC,CAA+CV,QAA1D;AACA;;AAED,QAAMgB,OAAO,GAAG,EAAhB,CAT0D,CAW1D;;AACA,OAAM,MAAMC,aAAZ,IAA6BhB,KAAK,CAAES,QAAF,EAAYV,QAAZ,CAAlC,EAA2D;AAC1D,UAAMkB,aAAa,GAAG,MAAMnB,QAAQ,CAAE;AACrCa,MAAAA,IAAI,EAAE,WAD+B;AAErCC,MAAAA,MAAM,EAAE,MAF6B;AAGrCM,MAAAA,IAAI,EAAE;AACLC,QAAAA,UAAU,EAAE,sBADP;AAELV,QAAAA,QAAQ,EAAEO,aAAa,CAACI,GAAd,CAAqBC,OAAF,KAAiB;AAC7CV,UAAAA,IAAI,EAAEU,OAAO,CAACV,IAD+B;AAE7CW,UAAAA,IAAI,EAAED,OAAO,CAACH,IAF+B;AAEzB;AACpBN,UAAAA,MAAM,EAAES,OAAO,CAACT,MAH6B;AAI7CW,UAAAA,OAAO,EAAEF,OAAO,CAACE;AAJ4B,SAAjB,CAAnB;AAFL;AAH+B,KAAF,CAApC;AAcA,QAAIC,YAAJ;;AAEA,QAAKP,aAAa,CAACQ,MAAnB,EAA4B;AAC3BD,MAAAA,YAAY,GAAGP,aAAa,CAACS,SAAd,CAAwBN,GAAxB,CAA+BO,QAAF,KAAkB;AAC7DC,QAAAA,KAAK,EAAED,QAAF,aAAEA,QAAF,uBAAEA,QAAQ,CAAEL;AAD4C,OAAlB,CAA7B,CAAf;AAGA,KAJD,MAIO;AACNE,MAAAA,YAAY,GAAGP,aAAa,CAACS,SAAd,CAAwBN,GAAxB,CAA+BO,QAAF,IAAgB;AAC3D,cAAME,MAAM,GAAG,EAAf;;AACA,YAAKF,QAAQ,CAACG,MAAT,IAAmB,GAAnB,IAA0BH,QAAQ,CAACG,MAAT,GAAkB,GAAjD,EAAuD;AACtDD,UAAAA,MAAM,CAACE,MAAP,GAAgBJ,QAAQ,CAACL,IAAzB;AACA,SAFD,MAEO;AACNO,UAAAA,MAAM,CAACD,KAAP,GAAeD,QAAQ,CAACL,IAAxB;AACA;;AACD,eAAOO,MAAP;AACA,OARc,CAAf;AASA;;AAEDd,IAAAA,OAAO,CAACT,IAAR,CAAc,GAAGkB,YAAjB;AACA;;AAED,SAAOT,OAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Maximum number of requests to place in a single batch request. Obtained by\n * sending a preflight OPTIONS request to /batch/v1/.\n *\n * @type {number?}\n */\nlet maxItems = null;\n\nfunction chunk( arr, chunkSize ) {\n\tconst tmp = [ ...arr ];\n\tconst cache = [];\n\twhile ( tmp.length ) {\n\t\tcache.push( tmp.splice( 0, chunkSize ) );\n\t}\n\n\treturn cache;\n}\n\n/**\n * Default batch processor. Sends its input requests to /batch/v1.\n *\n * @param {Array} requests List of API requests to perform at once.\n *\n * @return {Promise} Promise that resolves to a list of objects containing\n * either `output` (if that request was successful) or `error`\n * (if not ).\n */\nexport default async function defaultProcessor( requests ) {\n\tif ( maxItems === null ) {\n\t\tconst preflightResponse = await apiFetch( {\n\t\t\tpath: '/batch/v1',\n\t\t\tmethod: 'OPTIONS',\n\t\t} );\n\t\tmaxItems = preflightResponse.endpoints[ 0 ].args.requests.maxItems;\n\t}\n\n\tconst results = [];\n\n\t// @ts-ignore We would have crashed or never gotten to this point if we hadn't received the maxItems count.\n\tfor ( const batchRequests of chunk( requests, maxItems ) ) {\n\t\tconst batchResponse = await apiFetch( {\n\t\t\tpath: '/batch/v1',\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tvalidation: 'require-all-validate',\n\t\t\t\trequests: batchRequests.map( ( request ) => ( {\n\t\t\t\t\tpath: request.path,\n\t\t\t\t\tbody: request.data, // Rename 'data' to 'body'.\n\t\t\t\t\tmethod: request.method,\n\t\t\t\t\theaders: request.headers,\n\t\t\t\t} ) ),\n\t\t\t},\n\t\t} );\n\n\t\tlet batchResults;\n\n\t\tif ( batchResponse.failed ) {\n\t\t\tbatchResults = batchResponse.responses.map( ( response ) => ( {\n\t\t\t\terror: response?.body,\n\t\t\t} ) );\n\t\t} else {\n\t\t\tbatchResults = batchResponse.responses.map( ( response ) => {\n\t\t\t\tconst result = {};\n\t\t\t\tif ( response.status >= 200 && response.status < 300 ) {\n\t\t\t\t\tresult.output = response.body;\n\t\t\t\t} else {\n\t\t\t\t\tresult.error = response.body;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t} );\n\t\t}\n\n\t\tresults.push( ...batchResults );\n\t}\n\n\treturn results;\n}\n"]}
@@ -1,7 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { castArray } from 'lodash';
5
1
  /**
6
2
  * Returns an action object used in signalling that items have been received.
7
3
  *
@@ -10,11 +6,10 @@ import { castArray } from 'lodash';
10
6
  *
11
7
  * @return {Object} Action object.
12
8
  */
13
-
14
9
  export function receiveItems(items, edits) {
15
10
  return {
16
11
  type: 'RECEIVE_ITEMS',
17
- items: castArray(items),
12
+ items: Array.isArray(items) ? items : [items],
18
13
  persistedEdits: edits
19
14
  };
20
15
  }
@@ -33,7 +28,7 @@ export function removeItems(kind, name, records) {
33
28
  let invalidateCache = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
34
29
  return {
35
30
  type: 'REMOVE_ITEMS',
36
- itemIds: castArray(records),
31
+ itemIds: Array.isArray(records) ? records : [records],
37
32
  kind,
38
33
  name,
39
34
  invalidateCache
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/queried-data/actions.js"],"names":["castArray","receiveItems","items","edits","type","persistedEdits","removeItems","kind","name","records","invalidateCache","itemIds","receiveQueriedItems","query"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CAAuBC,KAAvB,EAA8BC,KAA9B,EAAsC;AAC5C,SAAO;AACNC,IAAAA,IAAI,EAAE,eADA;AAENF,IAAAA,KAAK,EAAEF,SAAS,CAAEE,KAAF,CAFV;AAGNG,IAAAA,cAAc,EAAEF;AAHV,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASG,WAAT,CAAsBC,IAAtB,EAA4BC,IAA5B,EAAkCC,OAAlC,EAAqE;AAAA,MAA1BC,eAA0B,uEAAR,KAAQ;AAC3E,SAAO;AACNN,IAAAA,IAAI,EAAE,cADA;AAENO,IAAAA,OAAO,EAAEX,SAAS,CAAES,OAAF,CAFZ;AAGNF,IAAAA,IAHM;AAINC,IAAAA,IAJM;AAKNE,IAAAA;AALM,GAAP;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,mBAAT,CAA8BV,KAA9B,EAAyD;AAAA,MAApBW,KAAoB,uEAAZ,EAAY;AAAA,MAARV,KAAQ;AAC/D,SAAO,EACN,GAAGF,YAAY,CAAEC,KAAF,EAASC,KAAT,CADT;AAENU,IAAAA;AAFM,GAAP;AAIA","sourcesContent":["/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * Returns an action object used in signalling that items have been received.\n *\n * @param {Array} items Items received.\n * @param {?Object} edits Optional edits to reset.\n *\n * @return {Object} Action object.\n */\nexport function receiveItems( items, edits ) {\n\treturn {\n\t\ttype: 'RECEIVE_ITEMS',\n\t\titems: castArray( items ),\n\t\tpersistedEdits: edits,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been\n * deleted and they need to be removed from entities state.\n *\n * @param {string} kind Kind of the removed entities.\n * @param {string} name Name of the removed entities.\n * @param {Array|number|string} records Record IDs of the removed entities.\n * @param {boolean} invalidateCache Controls whether we want to invalidate the cache.\n * @return {Object} Action object.\n */\nexport function removeItems( kind, name, records, invalidateCache = false ) {\n\treturn {\n\t\ttype: 'REMOVE_ITEMS',\n\t\titemIds: castArray( records ),\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that queried data has been\n * received.\n *\n * @param {Array} items Queried items received.\n * @param {?Object} query Optional query object.\n * @param {?Object} edits Optional edits to reset.\n *\n * @return {Object} Action object.\n */\nexport function receiveQueriedItems( items, query = {}, edits ) {\n\treturn {\n\t\t...receiveItems( items, edits ),\n\t\tquery,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/queried-data/actions.js"],"names":["receiveItems","items","edits","type","Array","isArray","persistedEdits","removeItems","kind","name","records","invalidateCache","itemIds","receiveQueriedItems","query"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,YAAT,CAAuBC,KAAvB,EAA8BC,KAA9B,EAAsC;AAC5C,SAAO;AACNC,IAAAA,IAAI,EAAE,eADA;AAENF,IAAAA,KAAK,EAAEG,KAAK,CAACC,OAAN,CAAeJ,KAAf,IAAyBA,KAAzB,GAAiC,CAAEA,KAAF,CAFlC;AAGNK,IAAAA,cAAc,EAAEJ;AAHV,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASK,WAAT,CAAsBC,IAAtB,EAA4BC,IAA5B,EAAkCC,OAAlC,EAAqE;AAAA,MAA1BC,eAA0B,uEAAR,KAAQ;AAC3E,SAAO;AACNR,IAAAA,IAAI,EAAE,cADA;AAENS,IAAAA,OAAO,EAAER,KAAK,CAACC,OAAN,CAAeK,OAAf,IAA2BA,OAA3B,GAAqC,CAAEA,OAAF,CAFxC;AAGNF,IAAAA,IAHM;AAINC,IAAAA,IAJM;AAKNE,IAAAA;AALM,GAAP;AAOA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,mBAAT,CAA8BZ,KAA9B,EAAyD;AAAA,MAApBa,KAAoB,uEAAZ,EAAY;AAAA,MAARZ,KAAQ;AAC/D,SAAO,EACN,GAAGF,YAAY,CAAEC,KAAF,EAASC,KAAT,CADT;AAENY,IAAAA;AAFM,GAAP;AAIA","sourcesContent":["/**\n * Returns an action object used in signalling that items have been received.\n *\n * @param {Array} items Items received.\n * @param {?Object} edits Optional edits to reset.\n *\n * @return {Object} Action object.\n */\nexport function receiveItems( items, edits ) {\n\treturn {\n\t\ttype: 'RECEIVE_ITEMS',\n\t\titems: Array.isArray( items ) ? items : [ items ],\n\t\tpersistedEdits: edits,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been\n * deleted and they need to be removed from entities state.\n *\n * @param {string} kind Kind of the removed entities.\n * @param {string} name Name of the removed entities.\n * @param {Array|number|string} records Record IDs of the removed entities.\n * @param {boolean} invalidateCache Controls whether we want to invalidate the cache.\n * @return {Object} Action object.\n */\nexport function removeItems( kind, name, records, invalidateCache = false ) {\n\treturn {\n\t\ttype: 'REMOVE_ITEMS',\n\t\titemIds: Array.isArray( records ) ? records : [ records ],\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that queried data has been\n * received.\n *\n * @param {Array} items Queried items received.\n * @param {?Object} query Optional query object.\n * @param {?Object} edits Optional edits to reset.\n *\n * @return {Object} Action object.\n */\nexport function receiveQueriedItems( items, query = {}, edits ) {\n\treturn {\n\t\t...receiveItems( items, edits ),\n\t\tquery,\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;GAUG;AACH,0CALW,MAAM,SACN,WAAY,OAUtB;AAED;;;;;;;;;GASG;AACH,0DAKC;AAED;;;;;;GAMG;AACH,kDAKC;AAED;;;;;;;;;;GAUG;AACH,2CARW,MAAM,QACN,MAAM,WACN,WAAY,0FAkCtB;AAED;;;;;;;;;GASG;AACH,4DAKC;AAED;;;;;;;;;GASG;AACH,kFAJW,MAAM,OAWhB;AAED;;;;;;;;;;GAUG;AACH,uEALW,MAAM,0BAchB;AAED;;;;;;;;;;GAUG;AACH,4EALW,MAAM,0BAchB;AAED;;;;;;GAMG;AACH,4CAQC;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,qBAWhB;AAwLD;;;;GAIG;AACH,iDAEC;AA8VD;;;;;;;;GAQG;AACH,+DAJW,OAAO,OAWjB;AAED;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,aACN,OAAO,OAUjB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,aACN,WAAY,OAUtB;AApkBM,yCAZI,MAAM,QACN,MAAM,YACN,MAAM;;;;;mCA4Ef;AAeK,uCATI,MAAM,QACN,MAAM,YACN,MAAM;IAGY,UAAU;QAoDrC;AAMK;;;WAYL;AAMK;;;WAYL;AAyBK,uCAXI,MAAM,QACN,MAAM;IAGa,UAAU;IACV,eAAe;IAGf,YAAY;;;;;mBAmNxC;AAwBK,uFAoCL;AAUK,6CALI,MAAM,QACN,MAAM;;;mBAwBf;AAWK,6DANI,MAAM,QACN,MAAM;;;mBA4Bf"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;GAUG;AACH,0CALW,MAAM,SACN,WAAY,OAUtB;AAED;;;;;;;;;GASG;AACH,0DAKC;AAED;;;;;;GAMG;AACH,kDAKC;AAED;;;;;;;;;;GAUG;AACH,2CARW,MAAM,QACN,MAAM,WACN,WAAY,0FAqCtB;AAED;;;;;;;;;GASG;AACH,4DAKC;AAED;;;;;;;;;GASG;AACH,kFAJW,MAAM,OAWhB;AAED;;;;;;;;;;GAUG;AACH,uEALW,MAAM,0BAchB;AAED;;;;;;;;;;GAUG;AACH,4EALW,MAAM,0BAchB;AAED;;;;;;GAMG;AACH,4CAQC;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,qBAWhB;AAwLD;;;;GAIG;AACH,iDAEC;AA8VD;;;;;;;;GAQG;AACH,+DAJW,OAAO,OAWjB;AAED;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,aACN,OAAO,OAUjB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,aACN,WAAY,OAUtB;AApkBM,yCAZI,MAAM,QACN,MAAM,YACN,MAAM;;;;;mCA4Ef;AAeK,uCATI,MAAM,QACN,MAAM,YACN,MAAM;IAGY,UAAU;QAoDrC;AAMK;;;WAYL;AAMK;;;WAYL;AAyBK,uCAXI,MAAM,QACN,MAAM;IAGa,UAAU;IACV,eAAe;IAGf,YAAY;;;;;mBAmNxC;AAwBK,uFAoCL;AAUK,6CALI,MAAM,QACN,MAAM;;;mBAwBf;AAWK,6DANI,MAAM,QACN,MAAM;;;mBA4Bf"}
@@ -4,7 +4,7 @@
4
4
  * @param {Array} requests List of API requests to perform at once.
5
5
  *
6
6
  * @return {Promise} Promise that resolves to a list of objects containing
7
- * either `output` (if that request was succesful) or `error`
7
+ * either `output` (if that request was successful) or `error`
8
8
  * (if not ).
9
9
  */
10
10
  export default function defaultProcessor(requests: any[]): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/queried-data/actions.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,mEAMC;AAED;;;;;;;;;GASG;AACH,kCANW,MAAM,QACN,MAAM,WACN,QAAM,MAAM,GAAC,MAAM,oBACnB,OAAO,OAWjB;AAED;;;;;;;;;GASG;AACH,6FAKC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/queried-data/actions.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,mEAMC;AAED;;;;;;;;;GASG;AACH,kCANW,MAAM,QACN,MAAM,WACN,QAAM,MAAM,GAAC,MAAM,oBACnB,OAAO,OAWjB;AAED;;;;;;;;;GASG;AACH,6FAKC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/core-data",
3
- "version": "5.3.0",
3
+ "version": "5.5.0",
4
4
  "description": "Access to and manipulation of core WordPress entities.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,16 +31,16 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.16.0",
34
- "@wordpress/api-fetch": "^6.17.0",
35
- "@wordpress/blocks": "^11.19.0",
36
- "@wordpress/compose": "^5.18.0",
37
- "@wordpress/data": "^7.4.0",
38
- "@wordpress/deprecated": "^3.20.0",
39
- "@wordpress/element": "^4.18.0",
40
- "@wordpress/html-entities": "^3.20.0",
41
- "@wordpress/i18n": "^4.20.0",
42
- "@wordpress/is-shallow-equal": "^4.20.0",
43
- "@wordpress/url": "^3.21.0",
34
+ "@wordpress/api-fetch": "^6.19.0",
35
+ "@wordpress/blocks": "^11.21.0",
36
+ "@wordpress/compose": "^5.20.0",
37
+ "@wordpress/data": "^7.6.0",
38
+ "@wordpress/deprecated": "^3.22.0",
39
+ "@wordpress/element": "^4.20.0",
40
+ "@wordpress/html-entities": "^3.22.0",
41
+ "@wordpress/i18n": "^4.22.0",
42
+ "@wordpress/is-shallow-equal": "^4.22.0",
43
+ "@wordpress/url": "^3.23.0",
44
44
  "change-case": "^4.1.2",
45
45
  "equivalent-key-map": "^0.2.2",
46
46
  "lodash": "^4.17.21",
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "a2ff0e6471c88436dad0287beb88d1729aa6f5dd"
57
+ "gitHead": "7ac04f446242452d3cb24372f9ca58f0cae97715"
58
58
  }
package/src/actions.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { castArray, isEqual, find } from 'lodash';
4
+ import { isEqual, find } from 'lodash';
5
5
  import { v4 as uuid } from 'uuid';
6
6
 
7
7
  /**
@@ -33,7 +33,7 @@ import { STORE_NAME } from './name';
33
33
  export function receiveUserQuery( queryID, users ) {
34
34
  return {
35
35
  type: 'RECEIVE_USER_QUERY',
36
- users: castArray( users ),
36
+ users: Array.isArray( users ) ? users : [ users ],
37
37
  queryID,
38
38
  };
39
39
  }
@@ -91,8 +91,11 @@ export function receiveEntityRecords(
91
91
  // Auto drafts should not have titles, but some plugins rely on them so we can't filter this
92
92
  // on the server.
93
93
  if ( kind === 'postType' ) {
94
- records = castArray( records ).map( ( record ) =>
95
- record.status === 'auto-draft' ? { ...record, title: '' } : record
94
+ records = ( Array.isArray( records ) ? records : [ records ] ).map(
95
+ ( record ) =>
96
+ record.status === 'auto-draft'
97
+ ? { ...record, title: '' }
98
+ : record
96
99
  );
97
100
  }
98
101
  let action;
@@ -820,6 +823,6 @@ export function receiveAutosaves( postId, autosaves ) {
820
823
  return {
821
824
  type: 'RECEIVE_AUTOSAVES',
822
825
  postId,
823
- autosaves: castArray( autosaves ),
826
+ autosaves: Array.isArray( autosaves ) ? autosaves : [ autosaves ],
824
827
  };
825
828
  }
@@ -27,7 +27,7 @@ function chunk( arr, chunkSize ) {
27
27
  * @param {Array} requests List of API requests to perform at once.
28
28
  *
29
29
  * @return {Promise} Promise that resolves to a list of objects containing
30
- * either `output` (if that request was succesful) or `error`
30
+ * either `output` (if that request was successful) or `error`
31
31
  * (if not ).
32
32
  */
33
33
  export default async function defaultProcessor( requests ) {
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { castArray } from 'lodash';
5
-
6
1
  /**
7
2
  * Returns an action object used in signalling that items have been received.
8
3
  *
@@ -14,7 +9,7 @@ import { castArray } from 'lodash';
14
9
  export function receiveItems( items, edits ) {
15
10
  return {
16
11
  type: 'RECEIVE_ITEMS',
17
- items: castArray( items ),
12
+ items: Array.isArray( items ) ? items : [ items ],
18
13
  persistedEdits: edits,
19
14
  };
20
15
  }
@@ -32,7 +27,7 @@ export function receiveItems( items, edits ) {
32
27
  export function removeItems( kind, name, records, invalidateCache = false ) {
33
28
  return {
34
29
  type: 'REMOVE_ITEMS',
35
- itemIds: castArray( records ),
30
+ itemIds: Array.isArray( records ) ? records : [ records ],
36
31
  kind,
37
32
  name,
38
33
  invalidateCache,
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../api-fetch/build-types/types.d.ts","../api-fetch/build-types/middlewares/nonce.d.ts","../api-fetch/build-types/middlewares/preloading.d.ts","../api-fetch/build-types/middlewares/root-url.d.ts","../api-fetch/build-types/middlewares/fetch-all-middleware.d.ts","../api-fetch/build-types/middlewares/media-upload.d.ts","../api-fetch/build-types/index.d.ts","../url/build-types/is-url.d.ts","../url/build-types/is-email.d.ts","../url/build-types/get-protocol.d.ts","../url/build-types/is-valid-protocol.d.ts","../url/build-types/get-authority.d.ts","../url/build-types/is-valid-authority.d.ts","../url/build-types/get-path.d.ts","../url/build-types/is-valid-path.d.ts","../url/build-types/get-query-string.d.ts","../url/build-types/build-query-string.d.ts","../url/build-types/is-valid-query-string.d.ts","../url/build-types/get-path-and-query-string.d.ts","../url/build-types/get-fragment.d.ts","../url/build-types/is-valid-fragment.d.ts","../url/build-types/add-query-args.d.ts","../url/build-types/get-query-arg.d.ts","../url/build-types/get-query-args.d.ts","../url/build-types/has-query-arg.d.ts","../url/build-types/remove-query-args.d.ts","../url/build-types/prepend-http.d.ts","../url/build-types/safe-decode-uri.d.ts","../url/build-types/safe-decode-uri-component.d.ts","../url/build-types/filter-url-for-display.d.ts","../url/build-types/clean-for-slug.d.ts","../url/build-types/get-filename.d.ts","../url/build-types/normalize-path.d.ts","../url/build-types/index.d.ts","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/queried-data/actions.js","../../node_modules/rememo/rememo.d.ts","./src/utils/conservative-map-item.js","./src/utils/get-normalized-comma-separable.js","./src/types.ts","./src/utils/if-matching-action.js","./src/utils/forward-resolver.js","./src/utils/on-sub-key.js","./src/utils/replace-action.js","./src/utils/with-weak-map-cache.js","./src/utils/is-raw-attribute.js","./src/utils/index.js","./src/queried-data/get-query-parts.js","./src/queried-data/selectors.js","../data/build-types/components/with-select/index.d.ts","../data/build-types/components/with-dispatch/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","../data/build-types/components/with-registry/index.d.ts","../../node_modules/redux/index.d.ts","../data/build-types/types.d.ts","../data/build-types/components/use-dispatch/use-dispatch.d.ts","../data/build-types/components/use-dispatch/use-dispatch-with-map.d.ts","../data/build-types/components/use-dispatch/index.d.ts","../data/build-types/components/async-mode-provider/use-async-mode.d.ts","../data/build-types/components/async-mode-provider/context.d.ts","../data/build-types/components/async-mode-provider/index.d.ts","../data/build-types/registry.d.ts","../data/build-types/controls.d.ts","../data/build-types/redux-store/index.d.ts","../data/build-types/plugins/persistence/index.d.ts","../data/build-types/plugins/index.d.ts","../data/build-types/components/registry-provider/use-registry.d.ts","../data/build-types/components/registry-provider/context.d.ts","../data/build-types/components/registry-provider/index.d.ts","../data/build-types/components/use-select/index.d.ts","../data/build-types/factory.d.ts","../data/build-types/index.d.ts","../compose/build-types/utils/create-higher-order-component/index.d.ts","../compose/build-types/utils/debounce/index.d.ts","../compose/build-types/utils/throttle/index.d.ts","../compose/build-types/higher-order/compose.d.ts","../compose/build-types/higher-order/pipe.d.ts","../compose/build-types/higher-order/if-condition/index.d.ts","../compose/build-types/higher-order/pure/index.d.ts","../compose/build-types/higher-order/with-global-events/index.d.ts","../compose/build-types/higher-order/with-instance-id/index.d.ts","../compose/build-types/higher-order/with-safe-timeout/index.d.ts","../compose/build-types/higher-order/with-state/index.d.ts","../compose/build-types/hooks/use-constrained-tabbing/index.d.ts","../compose/build-types/hooks/use-copy-on-click/index.d.ts","../compose/build-types/hooks/use-copy-to-clipboard/index.d.ts","../compose/build-types/hooks/use-focus-on-mount/index.d.ts","../compose/build-types/hooks/use-focus-outside/index.d.ts","../compose/build-types/hooks/use-dialog/index.d.ts","../compose/build-types/hooks/use-disabled/index.d.ts","../compose/build-types/hooks/use-dragging/index.d.ts","../compose/build-types/hooks/use-focus-return/index.d.ts","../compose/build-types/hooks/use-instance-id/index.d.ts","../element/build-types/react.d.ts","../compose/build-types/hooks/use-isomorphic-layout-effect/index.d.ts","../../node_modules/@types/mousetrap/index.d.ts","../compose/build-types/hooks/use-keyboard-shortcut/index.d.ts","../compose/build-types/hooks/use-media-query/index.d.ts","../compose/build-types/hooks/use-previous/index.d.ts","../compose/build-types/hooks/use-reduced-motion/index.d.ts","../compose/build-types/hooks/use-viewport-match/index.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react-dom/index.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","../compose/build-types/hooks/use-resize-observer/index.d.ts","../compose/build-types/hooks/use-async-list/index.d.ts","../compose/build-types/hooks/use-warn-on-change/index.d.ts","../compose/build-types/hooks/use-debounce/index.d.ts","../compose/build-types/hooks/use-throttle/index.d.ts","../compose/build-types/hooks/use-merge-refs/index.d.ts","../compose/build-types/hooks/use-ref-effect/index.d.ts","../compose/build-types/hooks/use-drop-zone/index.d.ts","../compose/build-types/hooks/use-focusable-iframe/index.d.ts","../compose/build-types/hooks/use-fixed-window-list/index.d.ts","../compose/build-types/index.d.ts","../../node_modules/no-case/dist/index.d.ts","../../node_modules/pascal-case/dist/index.d.ts","../../node_modules/camel-case/dist/index.d.ts","../../node_modules/capital-case/dist/index.d.ts","../../node_modules/constant-case/dist/index.d.ts","../../node_modules/dot-case/dist/index.d.ts","../../node_modules/header-case/dist/index.d.ts","../../node_modules/param-case/dist/index.d.ts","../../node_modules/path-case/dist/index.d.ts","../../node_modules/sentence-case/dist/index.d.ts","../../node_modules/snake-case/dist/index.d.ts","../../node_modules/change-case/dist/index.d.ts","../i18n/build-types/sprintf.d.ts","../hooks/build-types/createAddHook.d.ts","../hooks/build-types/createRemoveHook.d.ts","../hooks/build-types/createHasHook.d.ts","../hooks/build-types/createDoingHook.d.ts","../hooks/build-types/createDidHook.d.ts","../hooks/build-types/index.d.ts","../hooks/build-types/createHooks.d.ts","../i18n/build-types/create-i18n.d.ts","../i18n/build-types/default-i18n.d.ts","../i18n/build-types/index.d.ts","./src/entities.js","./src/queried-data/reducer.js","./src/queried-data/index.js","./src/batch/default-processor.js","./src/batch/create-batch.js","./src/batch/index.js","./src/name.js","./src/actions.js","./src/entity-provider.js","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","./src/reducer.js","./src/entity-types/helpers.ts","./src/entity-types/base-entity-records.ts","./src/entity-types/attachment.ts","./src/entity-types/comment.ts","./src/entity-types/menu-location.ts","./src/entity-types/nav-menu.ts","./src/entity-types/nav-menu-item.ts","./src/entity-types/page.ts","./src/entity-types/plugin.ts","./src/entity-types/post.ts","./src/entity-types/settings.ts","./src/entity-types/sidebar.ts","./src/entity-types/taxonomy.ts","./src/entity-types/theme.ts","./src/entity-types/user.ts","./src/entity-types/type.ts","./src/entity-types/widget.ts","./src/entity-types/widget-type.ts","./src/entity-types/wp-template.ts","./src/entity-types/wp-template-part.ts","./src/entity-types/index.ts","./src/selectors.ts","./src/resolvers.js","./src/locks/utils.js","./src/locks/reducer.js","./src/locks/selectors.js","./src/locks/engine.js","./src/locks/actions.js","../html-entities/build-types/index.d.ts","./src/fetch/__experimental-fetch-link-suggestions.js","./src/fetch/__experimental-fetch-url-data.js","./src/fetch/index.js","../../node_modules/memize/index.d.ts","./src/hooks/memoize.js","./src/hooks/constants.ts","./src/hooks/use-query-select.ts","./src/hooks/use-entity-record.ts","./src/hooks/use-entity-records.ts","./src/hooks/use-resource-permissions.ts","./src/hooks/index.ts","./src/index.js"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","6aae23700d45e8ac7ca7e269047aed3eecc64ce87c8fa5e52f2d98e280bd04ef","6b3d3ecbf6958624910af080a873cd84b5b99d513eb52147f18fe04a51cb19ce","ea9b95f45cd90b16200134d1f79e36380d57b866300b479b3e5b62a6dbeb92bb","14bc80bd2cb4c72aaaf27cfcdb62377cf3e3366f9e9045fa8ca232629457aca9","ff164c4671955c882140da80d0a6a69552ba5c2ddce3969f74c5c9d63683744b","dca26c859f7b4b8cf118dc9b5e99d295a3031bbd980e488819ed830ba769b890","1152220b82b14ecd456908cf61b6089b49596278eace0d10030384f8e31ba5ee","91265e9c2705df9edc7d912afe177cb9dbe4bd4fe254cc43466885544c065013","81e7db9916d6ce0323656530cb9aba444450454e5a8f3d0108f04931abb36258","7858aa21ac91fef2c9cdf96b3ae00e025efed2920ffca40a75df452d4f5a9576","eb80dedcd92c17d93f403e736e1c3e2aef39379841070221a353a7c13b57369f","029f3a1e2534e85a7cd00f3e79781003e0bcf5147d96db93594ace839803c6cf","2eea9984a7ea08e576d2970ba65a65ebba02699bccdbd0d3a08bb141e15972a1","308246446616acc5397747f35fa8788de7e6ba6cd5dc0ec2752bd75eafefcdb9","9677ef56e52539a73f1d9b89c692cf866d05017b05d9d2fe8cd35a30b42c2d47","6048b5c50d6486b1084b036a7f7d6c76c032d90cc2186f79b344a12ceb488511","26885abe66e07fd38da599d5fc9b4fa8b2df803c56e9bba99a2505e0b982c042","507dc7647a71c90e8cce85259c624b355c22e0dee1833aa4ba20c15a4f5bd21a","c30aaf3d189be8c29b2d3a7761e94b5b532fec6ba0caa74d07a4c1056469acf0","454217fe7beba4cb5497d4bc7fd3116437ce85e5217eb66f3b367fbcbfd45861","65e1ffb7b2343a1814c5cb85164f7d26bce1477b2cf04e6736f37732bc4801d6","3f810d7cac3e3729241d52d667538dc4ca27687f5d40d91f4cb5bce955df5f94","a2bedf5636ce572e507823229c9b7d4e87d97830497822d76e95a971fee78c92","17ab13eba7cde42ca7c95110c7eda405ba6aba7471437d912078d67dfada98eb","f7e734ca25cb0e8c52247b9a7d98f81ffd6ac52485bf9d8938fdbd4d828f469c","5261283f0b521fc1f255a060dcd86986985bd516822b69bb5504392462962899","44e20ca481bcc2abec1f4fcf54139caa4389f1bc16e3ee9d19a10e522903e9ab","a31eda6fcbf86596f69f7c18e6d13af58191fdc9c9620bcc67595fd9e49043ab","c93085fa9e5e568c0a45f64caa05e713fd5438e93d32f5970753e44910bdd540","1e442333978b5864818023d54d4f2e2aa0cbdfb2b486a0d43c900a7a87d61d1d","f215ce6766668f37f5e4652d0facdf55816f24aa5fc6f68c5e33754dbe5219fb","e900ec60297a15c4de70ddaade026ea4fe635e27c286fedd82dd5e963daa1930","e4e975c7339a9579209f12246e95f95216aa3558b8e7719fea2fbadaf28c574b","178efee8d4335cb61ec45c10e6de6d7afe48028963c5633f5937f25eaffa2387","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","acc22baecb7e578a5639f47b09e19de1d81ec91cf762d6f91d68297b10c63177","d83d6ec306241a9a59716eadf007d405cbc9d77b688871089a02159087100d5c","bcfac9632a790e732341b5009a60e86d72da1d2cc383c1796a66d233c5942c6f","0292552bfdda78ed1910905ea046a336186ce82d9fab516ea21616f47147ccdc","78673ec3910aff07d76d2a24b460523c69d50afadfcd836cd9a022ad1a3ebfc2","ff41da7aeac53e419a3a7eb792ea03c77cf05e44d379dfa2190920bfe6dde09b","849507adfc66cfedda67c3384a1ec078c542263589413c5b31c195aee25dc1f2","c30b952d25562463882bbbaac6242e2cb47cd342c27388f46e4b7b0c98a4b659","c32e26a53123519e9bcf0aa960cc0a5dfb3ecebcc27fe0ccc649702b45da1e2a","59688ffdb24f7f057e35f54280e90bda1e57efee745479a1bb98321b263870e8","95d027d78b9577e00f9d4e0eba816fd21f1b2927c801f89a1db8369b837471c3","9f1a1489db159ad8956dfa60d68a51f7a740f644385220af1ccfde5d5fba79c6","91faeb8163ec860e5b5c02eda51cd16e64de95baaadfec34e0fbd9d39176ed8a","b94c955213263a318d4ab2f33479464e1ee5551b9b29859b9084f4b741dc7ed6","a355bc3ad1c78a74de3dd67cc484ea4667a3f28f7d5384bcc10d0f1a2a506901","cb1063fcd20e601b70c6ce424597018ef658b4aa5ff4bf6514a351a9222238da",{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"a958d081d81c1194d1878b28f081d0144d95f4e36c6b375e357cb982e8b40705",{"version":"8f19251323456195ec9236df857bac3b8f97b73b540ef06ead2ceccc3884954f","affectsGlobalScope":true},"f97551b80f0ba672ee7133b6a96ab7a5decbac5734f3aea25f93653d8b6a3d8d","6fca127aadf9a3a6ec914442d3995cdca17a9d1b337138da166d65663921dcac","d23aeb9ad9955d3b6df7a972355dd465aaa0f7b8c223834f9499585b75f2ab04","cf000108177216c2ffd9962c785dfe0eb36306b14817894115be2d8f470552d6","61937532d01a86bc9f9847e016305cec9b5a716db5a630a0c37049a477d18f60","c792ecb733fc79337b7b497d3298dc31217f0f2b944ade255037dea871915353","61e8a34952f23c48deff3e85e982b1b3a600d15fb4d3b7c07a9096505ad2c35c","4fe57f4d9ea10f6069813ca18818838ce21258f42e79f898b4fb7860ce0c58ca","1e525db7ea2d7369211b74756f1034e4219134c3c99c0e147998caf43b10e017","4d3af9c3e4d7e0b2eeed3f0eb0190aaaaa6655a63275fbc2f5d6a7cde8aa70ec","d2c8976d6e6874ce159fc31c8511fffde72dcdf230394750ea4ef3c02a32e52e","fb6fa5434ecf7670f3dba36bced663afe875282d1231fb3ae95eeedae85ce4cf","e4cb6f9e4d40f538e26c72cc81ebd8ebae3317f940f39696e30d1381f36e5a0a","30289252a73fce7ff4b88369c829ed1f8533ccc028c55b264fc96fb576ffdd6a","3f473bb1c974b627227610013561332ea2f8e6eed0e86e87eaef96b6146d28c8","c841bf19529e2909275a743e54d43dadc52671909fa27db84f965c4fa5ec3b6f","c8bd10b6cdcb527ce859b9c5b4b6168f270cec11cb051cc77eb4dead206b5e0f","19179e07983759a8dd6adeb0c6e5c6a9525564aa986123d426171bd586791d21","c8b8656890f0c3cbcbfa35247885999be08c3e6391d04c6970e6edbd113c0359","bf1c5b444373d2d9eb03cedc6a9b6eca7c3667585596a5af3a44092c190dec0f","511e4d83de1ad331844ad7d94709b33046c464c867aa8b7d849e97205a61a948","a0cf70217b68c414db6c4863831250c8a2d96469c8044b75edd3a460793c9887","8d7c0f64cebcc3690112c28a4861bd9385836b47e9d1c171e6362100b3cc32a8","04ada34f81611d5344e26d98a6817bb0fc34c7bf7370b5c8ec9b562c56161ae9","8b495154f6d961654e7d0f4ba35bd115160d6d6bfce3dc9c3d122f0948402e9f","f9523fca1617fd31e048afd09f08cca592a7bbaeca4d5ff1e1781ab0cd2ffe9b","471a29292fd062298595f697fedc5e8c7ab42539770da59a3c76592330cf3c14","a2f3cab1b4ff63fa311519603bec5420b6c65b3c0cf6e29aec508bcdd68ea3a7","23d7a8b5d3297675007160f5cc75777e6eccf63ff6650bd3ed01eb0b3cdf2a38","8db59d5540f8bc033f35eb1a4a7903d202fbace0874b456e463af2675da2398b","c5a28d3d50c8edecc8cc87ae3a5dcfa34e630f970626bf30c552e681c7055fd0","5f8402dfce577684c2de40394f60628ffe6e44e6bc308dbeb1b643c527d758bf","daa0b5b58eab0c3dfc200cde4cc933084b908ede3aacdda1d2797f98c172142b","62517d6229922cb446b02a0a8df424b8def7ce40570e2a3c67df93c321bc4ba7","ef94bb34934085e6f95d8a8023775c29991a7f1db2e426edcabe06bc39469b15","4807581687ad8a41a480f2f55a93eed33881d2c3a4bbcba14cd77fddd6c32f8c","afa8dec86e0e11ff50a234b685b18674af64cda1e3671908559949301080bff0","f08d251cb25341aedf5edbfa1317f59f93ddb133de124a31962f656ab4f6ebd9","c0ac0d5a66d62f30b200514957ad91050a4f13b38f1c023422d76c2ea20d3813","e59d00012fb20e6746def2f4bc94650526aa6c574c49ad6a50a992f61a3ee675","2cc143754ed238f214e763525cd4c11613409a643fdd602f4e0a2b19f1f2d397","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","c7284023c5462180e492357aeb94551a20aa41eac8ac517606f3766359d08bb9","ed4ec3d435678a5703a016a801afc2cd7b543c53ab4615b3e214cac9c30f560a","e1e870a8a409e1eb530b841c9fa03165041518270de8eb37d8cf00c64a53b864","501be290436f06ae2182915329b01cfd0850961814802237b5c24749fd2afa0c","cc34c3c1590513cdb6374890f421c06ad969cfd99b28efb6003a6afc845c49f8","e47b8ec56eb49bc1c53c9012daa9874de14ad0c5da442485aec333571c74b526","45a63e17814c570ea59407f231ef9c561510bd6edb36f17479b09b44619496c6","5d7018910750d9cb4a912577ad2951fc3fad83c30d637689b69ffc6bbb0c9f5a","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff",{"version":"b5b080e499df18235bac525ce43da935d1a068c5770f58b245d24b6ae8baa166","affectsGlobalScope":true},"b935d4ca97dc9aa05c92aaa51ab5cf2ada5b9722e84ea3af8dc5f93fea3cd361","f295ab6b1bfd2b6b5b19ba621cca18c1b94b25c430c67fcb66c9594e89e3ff39","ea6c58f9711f6dc2f5609e085a1751d1284f1097b568852863bc24becf970831","f59327cd1c98362028d2d2b034b9bada17481ef7f12f13b046bc047ab4fc343c","d759d5a895085d1cfc89d1d1791c188c8170d933092db93e2b48676c49ee7310","2d1b4aec91b432ab2fe2b22f376a34dbc9d9b4b34acbd552f9cd0d3d98bcfca2","0b1d7ac8c1abd81feb21f2bc5d9539610dfa03c2874652cb9c6f4859731edd00","ee316055baf21ac2fdc96c90f19fb4a2e4b5ef225df0698e3bcb20f90b16b689","5fac858cb922fe34b898ddc12db441c878ec72bf6a1e3bcbe297f4da4bb6672a","7f119c8c5d4d145e6fcf668055a76f37ed273c24584d5bb90ff9f5520648b47d","b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1","762bc52248d3fab9873c7af564caf622358312cb35de42a4393b71cc36e14621","d02ec79cefaf292fae64b3be5a4416e64b4e420a6429fd458fac6e1bb4c7950e","27abed653f600ea0d5c86e94181beb42824e0f3f16337e2f9e7e9e9c2c392edf","d7871e0e653aa7197fee88886db5678bee6d42164c1f36e4bce9421ddfa7ca49","11ed10bdb3bcc99893570507eac8fece4840add97ee1d4f5a7fbf41cbfdea0d4","429fb571d3db07d3eaa2e74d43eb4190ece3e0de832ed564aeeaf08873e598eb","406d52bf33d618d846aa0d831ee004290567e328edcd4517bbff2937cc977abf","d3060e0810fc0d0dc009e6f086ef413d3c8aeaaf07da25c8d25fd4e181646acf","c0306658efb85764bb6d8d55097007c68a70539b24d0e18fb6edd6eb1778f632","08f7e6ffa66c66a636aecc5acbeb998215d9d09ccba0c558afb7df7e218edeaf","f829eb39aea4487f0ff94a42c56a1a73bc5202bbdeb03f7a638e4ab3e290d017","549d265a212fb5157c8919a4115e83529d0efadb9ab3bd674bc75e5df0fdf403","36f13e842356a220f1763f867133154a1ea6ff8f7bc39f7ac26090baf6f0e761","87f792436b033580a1dcc908d15851e4a5d3d7aa68b1d1c6a142706ef8b154a3","647dd8fd86e81524dc5915ec4997b8fc66d4a86ac2e37cde40e903ba1b349cb9","56a3aef852aa146f9fe362a1d09e13dae20f3794d33f66b371829348a8ee0e62","07c14b3359e3ed5607c690b9f421f84dd93887e06416d52f60889b4082030464","063f439998b87e20f46fa82cb793c5aae5c2d714a26bb8221e07f5d4c82c989d","573c9d08965a7fff6d8c08b20e525b10fdc5ba44c2feeda5b16edd6e4fd64dd0","cbe4710c187acaa5f02b08715c1563fdad82764462654043eb68232ecb626b8d","5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","9c4f32d2fa2b6efeed4f9fbd98254121b17982110b48edcede96e2dc2af0894d","8ed8a955d25000784e5f66b3afbe37c23f363f7671d077c6a15285ef13809dd4","a3dcfa473fb451f89860a5dc83f1994fccd151af55a87683cb6dffc0abba782b","40b369b61fd0bede44a39611baae531e6d46a718b705b9b45c5add4711f19744","225a94e9b80d9ed325a5996ddf6e8e8ec1e35d0cc78ce63b4f7bc3109c41fcfd","220b6ba3c2274aada1b2a9ad69f6966c8d36de546e708fe2b42425a265a48e2a","29733740a84bde4ceebd6415c3a47d36c9a956fdddeacec49a664665a54018b0","6e603a0983306db957764528f138c4897f0391799f876c4c1b46226c0dd8cef2","36d8781b9aa56efc6c8e0c6366ecdebf7327a2ac5b1e1490de1ad5a911457bb1","e8184f498bb78351e6d6f9fe654279d9882d58dd822a9a1178a96e7570262502","ff0a6ed7e754b2cfb1a907578f1c335b4c5ace714a5adb956f94d6192b17f078","bd3086a825d96259e7a1c79ad1bb13749d41cb79ba4336ba813cc65cbd51fd74","46adb1b5ccc5123a4592a20c1c56c8c7ef34d9b2ea43b16a271587ac2076728f","a32f1f8649b0e898d4a54e1860effc7f48dd285bc99f83dc35ccf85203736b3b","beacf8337f15a959b6e4d95d7b55432af842b0484da0f0d342a0dd75beab8fe3","8800447dd5175024126c56daa37ee888e507a5b4cb010790ccc86530a46424fb","cd04b594271be8b8eca1453116f1591ba60ce64d80183b07765a4b5e811966ea","c2c2c6c7ab6fd08050cc906a2230657bd7ae25365a38db7a4c2f84980133d0cf","8199ff7448213d4633834954dad4e5a5e7ed2e14fcfd3f5a1b53d156a1cd9972","327bc1d7e826f1be1b18c51b3444a2dfc66d3f810b43ff5f32b26587db3ea1d2","8818dcc765cb9236f6a01aaa837a3612271777a26ffbd29282a3c282f8704649","d461fc73e0721ae92652f11a61cd1014a0698fb7ddb81beac1aa7d09aa139abb","83ff1f6f71ab0ea7a2a725a864d70672acadada85bba149552c8d815684d90ea","2820e39cdd88b35803c0323a52c12b3fd022b246c805a9c797659f1a1f6c2437","b0d35fd661c6d3a53bc9568b079ebc3363561d6e42b773ab40f2217310b3d1a1","b5f5bbc6d622c252fc13b512ed42cafd65019768e3f0430637e517d9be69547f","71fce7a0dc64feb145e0f58842f43984a2e9ecd79861d8ad7315c0d272575275","066db40ccd6c90d1e57e9f163458713463d4e2771c156acf9ffb7f258646946e","2366b3f634513f748f1cc92ba9a5b015b39cf0195e25c942e3d844721f0e233d","667a5fe656b9e0bf163b829ad74d679c56e82c83456a7c5387ffca0d1f901e5e","d93931264950da279434192bb043f8e379b4a0959bcd294ca89c8b89e1a6772b","3a1cab834f4a3ceedd0dfe8c00b9ca84431454cad8730eef0d0a18d1c0f7a7aa","8d8b84756b85d1dd9d3a60d54f4410b892f931d46560f60ddc44a4decb8f9ee4","902abf1b6aeb2908452ad206db72b0d39029e000a28dff529751585a4e7e5f07","68e39d827a3bd5054e54a433fc90c118941096eb3e9f432b28ea5f88b0fe77b1","691a13dbde331d5bcce65e1463f924b78ad046c0c05ec57bca010e6435de8905","0f112494322a7ecb5dda1823f0f84255451a51d2ad862a0ae1014d361f0257de","bca410625e15b9622626f7ae8aa445153232e0d45e46f0e8dbcd632d735c8e47","e1802d98bc1c1b96b44ea5bb57126dc9757c9b99d87ee997af0ffe1d33afbdb0","658cdacff92cbe3b7e6a7ccdb71bd7928104e067e998157c132d6e11f320bbc3","e6295247cd02955c7385b55efa603d19c4d9330b1343937a9b1c023e346f1ab5","a1473225afc48a471cde6656263736febf2dc83543ad10ef66936f7ed71b2fe3","fadb19eb44c06b59275ad6f620324ea297cbaa20f744ca09d9d83ae122bee14c"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":false,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":false,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[45,47,48,49,50,51,52,53,54,55,56,57],[45,46,48,49,50,51,52,53,54,55,56,57],[46,47,48,49,50,51,52,53,54,55,56,57],[45,46,47,49,50,51,52,53,54,55,56,57],[45,46,47,48,50,51,52,53,54,55,56,57],[45,46,47,48,49,51,52,53,54,55,56,57],[45,46,47,48,49,50,52,53,54,55,56,57],[45,46,47,48,49,50,51,53,54,55,56,57],[45,46,47,48,49,50,51,52,54,55,56,57],[45,46,47,48,49,50,51,52,53,55,56,57],[45,46,47,48,49,50,51,52,53,54,56,57],[45,46,47,48,49,50,51,52,53,54,55,57],[45,46,47,48,49,50,51,52,53,54,55,56],[119],[115,116,117,118],[189],[188],[188,189,190,191,192,193,194,195,196,197,198],[191],[193],[93,94,95,96],[93],[94],[59,60,61,62,63,64],[59],[140],[119,140],[141],[119,154,155],[161],[119,163],[176],[141,142],[140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,162,164,165,166,167,168,177,178,179,180,181,182,183,184,185,186],[57,58,65,92,98,211,213,216,217],[214],[65],[214,215],[57,65,199,210,218],[139,176,211,217],[224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243],[244],[65,92,210,252],[65,92],[253,254],[260,261,262],[256],[98,139,176,258,259,264],[92,98,258,259,260,264],[139,257,258],[98,258,259,264],[139,211,217,218,219,223,244,245,246,251,255,263],[250],[248,249],[247],[57],[92,110],[99,112,212],[57,110,111,139,187,211],[57,100,111],[57,103,110,139,187,211,213,222],[65,92,110,199,211,217],[57,92,98,100,110,139,211,213,217,244],[103],[101,102,104,105,106,107,108,109],[126,127],[119,129],[134,135],[123,124],[122],[113,114,120,122,125,128,129,130,131,133,136,137,138],[132],[129],[121],[97],[161,169,171,172,173,174,175],[170],[119,161],[206],[201,202,203,204,205,206],[201,202,203,204,205,207],[206,207],[208],[200,208,209],[220,221],[222],[81],[66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91]],"referencedMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[170,14],[119,15],[190,16],[191,17],[199,18],[192,17],[193,17],[194,19],[195,20],[189,17],[196,20],[197,17],[198,20],[97,21],[94,22],[95,23],[65,24],[63,25],[64,25],[60,25],[61,25],[62,25],[145,14],[146,14],[148,26],[149,27],[151,14],[152,14],[153,14],[180,28],[156,29],[158,14],[184,14],[186,14],[154,14],[155,14],[159,14],[162,30],[164,31],[182,14],[183,14],[177,32],[181,33],[168,14],[187,34],[140,14],[218,35],[215,36],[214,37],[216,38],[211,39],[219,40],[226,41],[227,41],[224,42],[244,41],[228,41],[230,41],[229,41],[231,41],[232,41],[233,41],[234,41],[235,41],[236,41],[237,41],[239,41],[238,41],[241,41],[240,41],[243,41],[242,41],[253,43],[254,44],[255,45],[263,46],[257,47],[260,48],[261,49],[259,50],[262,51],[264,52],[251,53],[250,54],[248,55],[249,55],[99,56],[111,57],[213,58],[212,59],[112,60],[223,61],[246,62],[245,63],[101,56],[104,64],[110,65],[106,64],[107,64],[127,14],[128,66],[135,67],[136,68],[125,69],[123,70],[137,70],[120,14],[130,70],[139,71],[133,72],[132,73],[131,70],[129,70],[122,74],[98,75],[169,30],[176,76],[175,14],[171,77],[161,14],[174,78],[201,79],[205,79],[204,79],[203,79],[207,80],[202,79],[206,81],[208,82],[209,83],[210,84],[222,85],[220,86],[82,87],[92,88]],"exportedModulesMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[170,14],[119,15],[190,16],[191,17],[199,18],[192,17],[193,17],[194,19],[195,20],[189,17],[196,20],[197,17],[198,20],[97,21],[94,22],[95,23],[65,24],[63,25],[64,25],[60,25],[61,25],[62,25],[145,14],[146,14],[148,26],[149,27],[151,14],[152,14],[153,14],[180,28],[156,29],[158,14],[184,14],[186,14],[154,14],[155,14],[159,14],[162,30],[164,31],[182,14],[183,14],[177,32],[181,33],[168,14],[187,34],[140,14],[218,35],[215,36],[214,37],[216,38],[211,39],[219,40],[226,41],[227,41],[224,42],[244,41],[228,41],[230,41],[229,41],[231,41],[232,41],[233,41],[234,41],[235,41],[236,41],[237,41],[239,41],[238,41],[241,41],[240,41],[243,41],[242,41],[253,43],[254,44],[255,45],[263,46],[257,47],[260,48],[261,49],[259,50],[262,51],[264,52],[251,53],[250,54],[248,55],[249,55],[99,56],[111,57],[213,58],[212,59],[112,60],[223,61],[246,62],[245,63],[101,56],[104,64],[110,65],[106,64],[107,64],[127,14],[128,66],[135,67],[136,68],[125,69],[123,70],[137,70],[120,14],[130,70],[139,71],[133,72],[132,73],[131,70],[129,70],[122,74],[98,75],[169,30],[176,76],[175,14],[171,77],[161,14],[174,78],[201,79],[205,79],[204,79],[203,79],[207,80],[202,79],[206,81],[208,82],[209,83],[210,84],[222,85],[220,86],[82,87],[92,88]],"semanticDiagnosticsPerFile":[46,47,45,48,49,50,51,52,53,54,55,56,57,163,117,170,115,119,116,118,58,190,191,199,192,193,194,256,188,195,189,196,121,100,197,198,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,93,96,97,94,95,65,63,64,60,61,62,59,143,145,144,146,147,148,149,150,178,151,152,153,180,156,157,158,184,186,154,155,159,185,160,162,164,165,182,166,167,183,177,181,168,179,187,140,141,142,218,215,214,216,211,219,226,225,227,224,244,228,230,229,231,232,233,234,235,236,237,239,238,241,240,243,242,253,254,255,258,263,257,260,261,259,262,264,251,250,248,249,247,217,99,111,213,212,112,223,246,245,103,101,105,102,104,110,109,106,107,108,127,128,126,135,136,134,125,124,123,137,114,120,113,130,138,139,133,132,131,129,122,98,169,176,173,175,171,161,174,172,201,205,204,203,207,202,206,252,208,209,210,200,221,222,220,80,75,89,88,70,90,78,77,72,68,81,82,74,83,92,67,66,71,79,73,69,76,91,85,84,87,86]},"version":"4.4.2"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../api-fetch/build-types/types.d.ts","../api-fetch/build-types/middlewares/nonce.d.ts","../api-fetch/build-types/middlewares/preloading.d.ts","../api-fetch/build-types/middlewares/root-url.d.ts","../api-fetch/build-types/middlewares/fetch-all-middleware.d.ts","../api-fetch/build-types/middlewares/media-upload.d.ts","../api-fetch/build-types/index.d.ts","../url/build-types/is-url.d.ts","../url/build-types/is-email.d.ts","../url/build-types/get-protocol.d.ts","../url/build-types/is-valid-protocol.d.ts","../url/build-types/get-authority.d.ts","../url/build-types/is-valid-authority.d.ts","../url/build-types/get-path.d.ts","../url/build-types/is-valid-path.d.ts","../url/build-types/get-query-string.d.ts","../url/build-types/build-query-string.d.ts","../url/build-types/is-valid-query-string.d.ts","../url/build-types/get-path-and-query-string.d.ts","../url/build-types/get-fragment.d.ts","../url/build-types/is-valid-fragment.d.ts","../url/build-types/add-query-args.d.ts","../url/build-types/get-query-arg.d.ts","../url/build-types/get-query-args.d.ts","../url/build-types/has-query-arg.d.ts","../url/build-types/remove-query-args.d.ts","../url/build-types/prepend-http.d.ts","../url/build-types/safe-decode-uri.d.ts","../url/build-types/safe-decode-uri-component.d.ts","../url/build-types/filter-url-for-display.d.ts","../url/build-types/clean-for-slug.d.ts","../url/build-types/get-filename.d.ts","../url/build-types/normalize-path.d.ts","../url/build-types/index.d.ts","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/queried-data/actions.js","../../node_modules/rememo/rememo.d.ts","./src/utils/conservative-map-item.js","./src/utils/get-normalized-comma-separable.js","./src/types.ts","./src/utils/if-matching-action.js","./src/utils/forward-resolver.js","./src/utils/on-sub-key.js","./src/utils/replace-action.js","./src/utils/with-weak-map-cache.js","./src/utils/is-raw-attribute.js","./src/utils/index.js","./src/queried-data/get-query-parts.js","./src/queried-data/selectors.js","../data/build-types/components/with-select/index.d.ts","../data/build-types/components/with-dispatch/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","../data/build-types/components/with-registry/index.d.ts","../../node_modules/redux/index.d.ts","../data/build-types/types.d.ts","../data/build-types/components/use-dispatch/use-dispatch.d.ts","../data/build-types/components/use-dispatch/use-dispatch-with-map.d.ts","../data/build-types/components/use-dispatch/index.d.ts","../data/build-types/components/async-mode-provider/use-async-mode.d.ts","../data/build-types/components/async-mode-provider/context.d.ts","../data/build-types/components/async-mode-provider/index.d.ts","../data/build-types/registry.d.ts","../data/build-types/controls.d.ts","../data/build-types/redux-store/index.d.ts","../data/build-types/plugins/persistence/index.d.ts","../data/build-types/plugins/index.d.ts","../data/build-types/components/registry-provider/use-registry.d.ts","../data/build-types/components/registry-provider/context.d.ts","../data/build-types/components/registry-provider/index.d.ts","../data/build-types/components/use-select/index.d.ts","../data/build-types/factory.d.ts","../data/build-types/index.d.ts","../compose/build-types/utils/create-higher-order-component/index.d.ts","../compose/build-types/utils/debounce/index.d.ts","../compose/build-types/utils/throttle/index.d.ts","../compose/build-types/higher-order/compose.d.ts","../compose/build-types/higher-order/pipe.d.ts","../compose/build-types/higher-order/if-condition/index.d.ts","../compose/build-types/higher-order/pure/index.d.ts","../compose/build-types/higher-order/with-global-events/index.d.ts","../compose/build-types/higher-order/with-instance-id/index.d.ts","../compose/build-types/higher-order/with-safe-timeout/index.d.ts","../compose/build-types/higher-order/with-state/index.d.ts","../compose/build-types/hooks/use-constrained-tabbing/index.d.ts","../compose/build-types/hooks/use-copy-on-click/index.d.ts","../compose/build-types/hooks/use-copy-to-clipboard/index.d.ts","../compose/build-types/hooks/use-focus-on-mount/index.d.ts","../compose/build-types/hooks/use-focus-outside/index.d.ts","../compose/build-types/hooks/use-dialog/index.d.ts","../compose/build-types/hooks/use-disabled/index.d.ts","../compose/build-types/hooks/use-dragging/index.d.ts","../compose/build-types/hooks/use-focus-return/index.d.ts","../compose/build-types/hooks/use-instance-id/index.d.ts","../element/build-types/react.d.ts","../compose/build-types/hooks/use-isomorphic-layout-effect/index.d.ts","../../node_modules/@types/mousetrap/index.d.ts","../compose/build-types/hooks/use-keyboard-shortcut/index.d.ts","../compose/build-types/hooks/use-media-query/index.d.ts","../compose/build-types/hooks/use-previous/index.d.ts","../compose/build-types/hooks/use-reduced-motion/index.d.ts","../compose/build-types/hooks/use-viewport-match/index.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react-dom/index.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","../compose/build-types/hooks/use-resize-observer/index.d.ts","../compose/build-types/hooks/use-async-list/index.d.ts","../compose/build-types/hooks/use-warn-on-change/index.d.ts","../compose/build-types/hooks/use-debounce/index.d.ts","../compose/build-types/hooks/use-throttle/index.d.ts","../compose/build-types/hooks/use-merge-refs/index.d.ts","../compose/build-types/hooks/use-ref-effect/index.d.ts","../compose/build-types/hooks/use-drop-zone/index.d.ts","../compose/build-types/hooks/use-focusable-iframe/index.d.ts","../compose/build-types/hooks/use-fixed-window-list/index.d.ts","../compose/build-types/index.d.ts","../../node_modules/no-case/dist/index.d.ts","../../node_modules/pascal-case/dist/index.d.ts","../../node_modules/camel-case/dist/index.d.ts","../../node_modules/capital-case/dist/index.d.ts","../../node_modules/constant-case/dist/index.d.ts","../../node_modules/dot-case/dist/index.d.ts","../../node_modules/header-case/dist/index.d.ts","../../node_modules/param-case/dist/index.d.ts","../../node_modules/path-case/dist/index.d.ts","../../node_modules/sentence-case/dist/index.d.ts","../../node_modules/snake-case/dist/index.d.ts","../../node_modules/change-case/dist/index.d.ts","../i18n/build-types/sprintf.d.ts","../hooks/build-types/createAddHook.d.ts","../hooks/build-types/createRemoveHook.d.ts","../hooks/build-types/createHasHook.d.ts","../hooks/build-types/createDoingHook.d.ts","../hooks/build-types/createDidHook.d.ts","../hooks/build-types/index.d.ts","../hooks/build-types/createHooks.d.ts","../i18n/build-types/create-i18n.d.ts","../i18n/build-types/default-i18n.d.ts","../i18n/build-types/index.d.ts","./src/entities.js","./src/queried-data/reducer.js","./src/queried-data/index.js","./src/batch/default-processor.js","./src/batch/create-batch.js","./src/batch/index.js","./src/name.js","./src/actions.js","./src/entity-provider.js","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","./src/reducer.js","./src/entity-types/helpers.ts","./src/entity-types/base-entity-records.ts","./src/entity-types/attachment.ts","./src/entity-types/comment.ts","./src/entity-types/menu-location.ts","./src/entity-types/nav-menu.ts","./src/entity-types/nav-menu-item.ts","./src/entity-types/page.ts","./src/entity-types/plugin.ts","./src/entity-types/post.ts","./src/entity-types/settings.ts","./src/entity-types/sidebar.ts","./src/entity-types/taxonomy.ts","./src/entity-types/theme.ts","./src/entity-types/user.ts","./src/entity-types/type.ts","./src/entity-types/widget.ts","./src/entity-types/widget-type.ts","./src/entity-types/wp-template.ts","./src/entity-types/wp-template-part.ts","./src/entity-types/index.ts","./src/selectors.ts","./src/resolvers.js","./src/locks/utils.js","./src/locks/reducer.js","./src/locks/selectors.js","./src/locks/engine.js","./src/locks/actions.js","../html-entities/build-types/index.d.ts","./src/fetch/__experimental-fetch-link-suggestions.js","./src/fetch/__experimental-fetch-url-data.js","./src/fetch/index.js","../../node_modules/memize/index.d.ts","./src/hooks/memoize.js","./src/hooks/constants.ts","./src/hooks/use-query-select.ts","./src/hooks/use-entity-record.ts","./src/hooks/use-entity-records.ts","./src/hooks/use-resource-permissions.ts","./src/hooks/index.ts","./src/index.js"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","6aae23700d45e8ac7ca7e269047aed3eecc64ce87c8fa5e52f2d98e280bd04ef","6b3d3ecbf6958624910af080a873cd84b5b99d513eb52147f18fe04a51cb19ce","ea9b95f45cd90b16200134d1f79e36380d57b866300b479b3e5b62a6dbeb92bb","14bc80bd2cb4c72aaaf27cfcdb62377cf3e3366f9e9045fa8ca232629457aca9","ff164c4671955c882140da80d0a6a69552ba5c2ddce3969f74c5c9d63683744b","dca26c859f7b4b8cf118dc9b5e99d295a3031bbd980e488819ed830ba769b890","1152220b82b14ecd456908cf61b6089b49596278eace0d10030384f8e31ba5ee","91265e9c2705df9edc7d912afe177cb9dbe4bd4fe254cc43466885544c065013","81e7db9916d6ce0323656530cb9aba444450454e5a8f3d0108f04931abb36258","7858aa21ac91fef2c9cdf96b3ae00e025efed2920ffca40a75df452d4f5a9576","eb80dedcd92c17d93f403e736e1c3e2aef39379841070221a353a7c13b57369f","029f3a1e2534e85a7cd00f3e79781003e0bcf5147d96db93594ace839803c6cf","2eea9984a7ea08e576d2970ba65a65ebba02699bccdbd0d3a08bb141e15972a1","308246446616acc5397747f35fa8788de7e6ba6cd5dc0ec2752bd75eafefcdb9","9677ef56e52539a73f1d9b89c692cf866d05017b05d9d2fe8cd35a30b42c2d47","6048b5c50d6486b1084b036a7f7d6c76c032d90cc2186f79b344a12ceb488511","26885abe66e07fd38da599d5fc9b4fa8b2df803c56e9bba99a2505e0b982c042","507dc7647a71c90e8cce85259c624b355c22e0dee1833aa4ba20c15a4f5bd21a","c30aaf3d189be8c29b2d3a7761e94b5b532fec6ba0caa74d07a4c1056469acf0","454217fe7beba4cb5497d4bc7fd3116437ce85e5217eb66f3b367fbcbfd45861","65e1ffb7b2343a1814c5cb85164f7d26bce1477b2cf04e6736f37732bc4801d6","3f810d7cac3e3729241d52d667538dc4ca27687f5d40d91f4cb5bce955df5f94","a2bedf5636ce572e507823229c9b7d4e87d97830497822d76e95a971fee78c92","17ab13eba7cde42ca7c95110c7eda405ba6aba7471437d912078d67dfada98eb","f7e734ca25cb0e8c52247b9a7d98f81ffd6ac52485bf9d8938fdbd4d828f469c","5261283f0b521fc1f255a060dcd86986985bd516822b69bb5504392462962899","44e20ca481bcc2abec1f4fcf54139caa4389f1bc16e3ee9d19a10e522903e9ab","a31eda6fcbf86596f69f7c18e6d13af58191fdc9c9620bcc67595fd9e49043ab","c93085fa9e5e568c0a45f64caa05e713fd5438e93d32f5970753e44910bdd540","1e442333978b5864818023d54d4f2e2aa0cbdfb2b486a0d43c900a7a87d61d1d","f215ce6766668f37f5e4652d0facdf55816f24aa5fc6f68c5e33754dbe5219fb","e900ec60297a15c4de70ddaade026ea4fe635e27c286fedd82dd5e963daa1930","e4e975c7339a9579209f12246e95f95216aa3558b8e7719fea2fbadaf28c574b","178efee8d4335cb61ec45c10e6de6d7afe48028963c5633f5937f25eaffa2387","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","09adfb20f411f337cadecc85c838fc0cfe849182ba7458219035ffa6ac82fb5b","d83d6ec306241a9a59716eadf007d405cbc9d77b688871089a02159087100d5c","bcfac9632a790e732341b5009a60e86d72da1d2cc383c1796a66d233c5942c6f","0292552bfdda78ed1910905ea046a336186ce82d9fab516ea21616f47147ccdc","78673ec3910aff07d76d2a24b460523c69d50afadfcd836cd9a022ad1a3ebfc2","ff41da7aeac53e419a3a7eb792ea03c77cf05e44d379dfa2190920bfe6dde09b","849507adfc66cfedda67c3384a1ec078c542263589413c5b31c195aee25dc1f2","c30b952d25562463882bbbaac6242e2cb47cd342c27388f46e4b7b0c98a4b659","c32e26a53123519e9bcf0aa960cc0a5dfb3ecebcc27fe0ccc649702b45da1e2a","59688ffdb24f7f057e35f54280e90bda1e57efee745479a1bb98321b263870e8","95d027d78b9577e00f9d4e0eba816fd21f1b2927c801f89a1db8369b837471c3","9f1a1489db159ad8956dfa60d68a51f7a740f644385220af1ccfde5d5fba79c6","91faeb8163ec860e5b5c02eda51cd16e64de95baaadfec34e0fbd9d39176ed8a","b94c955213263a318d4ab2f33479464e1ee5551b9b29859b9084f4b741dc7ed6","a355bc3ad1c78a74de3dd67cc484ea4667a3f28f7d5384bcc10d0f1a2a506901","cb1063fcd20e601b70c6ce424597018ef658b4aa5ff4bf6514a351a9222238da",{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"a958d081d81c1194d1878b28f081d0144d95f4e36c6b375e357cb982e8b40705",{"version":"8f19251323456195ec9236df857bac3b8f97b73b540ef06ead2ceccc3884954f","affectsGlobalScope":true},"f97551b80f0ba672ee7133b6a96ab7a5decbac5734f3aea25f93653d8b6a3d8d","6fca127aadf9a3a6ec914442d3995cdca17a9d1b337138da166d65663921dcac","d23aeb9ad9955d3b6df7a972355dd465aaa0f7b8c223834f9499585b75f2ab04","cf000108177216c2ffd9962c785dfe0eb36306b14817894115be2d8f470552d6","61937532d01a86bc9f9847e016305cec9b5a716db5a630a0c37049a477d18f60","c792ecb733fc79337b7b497d3298dc31217f0f2b944ade255037dea871915353","61e8a34952f23c48deff3e85e982b1b3a600d15fb4d3b7c07a9096505ad2c35c","4fe57f4d9ea10f6069813ca18818838ce21258f42e79f898b4fb7860ce0c58ca","1e525db7ea2d7369211b74756f1034e4219134c3c99c0e147998caf43b10e017","4d3af9c3e4d7e0b2eeed3f0eb0190aaaaa6655a63275fbc2f5d6a7cde8aa70ec","d2c8976d6e6874ce159fc31c8511fffde72dcdf230394750ea4ef3c02a32e52e","fb6fa5434ecf7670f3dba36bced663afe875282d1231fb3ae95eeedae85ce4cf","e4cb6f9e4d40f538e26c72cc81ebd8ebae3317f940f39696e30d1381f36e5a0a","30289252a73fce7ff4b88369c829ed1f8533ccc028c55b264fc96fb576ffdd6a","3f473bb1c974b627227610013561332ea2f8e6eed0e86e87eaef96b6146d28c8","c841bf19529e2909275a743e54d43dadc52671909fa27db84f965c4fa5ec3b6f","c8bd10b6cdcb527ce859b9c5b4b6168f270cec11cb051cc77eb4dead206b5e0f","19179e07983759a8dd6adeb0c6e5c6a9525564aa986123d426171bd586791d21","c8b8656890f0c3cbcbfa35247885999be08c3e6391d04c6970e6edbd113c0359","bf1c5b444373d2d9eb03cedc6a9b6eca7c3667585596a5af3a44092c190dec0f","511e4d83de1ad331844ad7d94709b33046c464c867aa8b7d849e97205a61a948","a0cf70217b68c414db6c4863831250c8a2d96469c8044b75edd3a460793c9887","8d7c0f64cebcc3690112c28a4861bd9385836b47e9d1c171e6362100b3cc32a8","04ada34f81611d5344e26d98a6817bb0fc34c7bf7370b5c8ec9b562c56161ae9","8b495154f6d961654e7d0f4ba35bd115160d6d6bfce3dc9c3d122f0948402e9f","f9523fca1617fd31e048afd09f08cca592a7bbaeca4d5ff1e1781ab0cd2ffe9b","471a29292fd062298595f697fedc5e8c7ab42539770da59a3c76592330cf3c14","a2f3cab1b4ff63fa311519603bec5420b6c65b3c0cf6e29aec508bcdd68ea3a7","23d7a8b5d3297675007160f5cc75777e6eccf63ff6650bd3ed01eb0b3cdf2a38","8db59d5540f8bc033f35eb1a4a7903d202fbace0874b456e463af2675da2398b","c5a28d3d50c8edecc8cc87ae3a5dcfa34e630f970626bf30c552e681c7055fd0","5f8402dfce577684c2de40394f60628ffe6e44e6bc308dbeb1b643c527d758bf","daa0b5b58eab0c3dfc200cde4cc933084b908ede3aacdda1d2797f98c172142b","7d87403765aa7f53bf7b10ac89499008f0c98086a450cd9859f5b03ce9bd2996","96785f84f3baedac10ed5a27b39023f0ee1540917b4f255eb5504d4d3c25cfe9","4807581687ad8a41a480f2f55a93eed33881d2c3a4bbcba14cd77fddd6c32f8c","afa8dec86e0e11ff50a234b685b18674af64cda1e3671908559949301080bff0","f08d251cb25341aedf5edbfa1317f59f93ddb133de124a31962f656ab4f6ebd9","c0ac0d5a66d62f30b200514957ad91050a4f13b38f1c023422d76c2ea20d3813","e59d00012fb20e6746def2f4bc94650526aa6c574c49ad6a50a992f61a3ee675","2cc143754ed238f214e763525cd4c11613409a643fdd602f4e0a2b19f1f2d397","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","c7284023c5462180e492357aeb94551a20aa41eac8ac517606f3766359d08bb9","ed4ec3d435678a5703a016a801afc2cd7b543c53ab4615b3e214cac9c30f560a","e1e870a8a409e1eb530b841c9fa03165041518270de8eb37d8cf00c64a53b864","501be290436f06ae2182915329b01cfd0850961814802237b5c24749fd2afa0c","cc34c3c1590513cdb6374890f421c06ad969cfd99b28efb6003a6afc845c49f8","e47b8ec56eb49bc1c53c9012daa9874de14ad0c5da442485aec333571c74b526","45a63e17814c570ea59407f231ef9c561510bd6edb36f17479b09b44619496c6","5d7018910750d9cb4a912577ad2951fc3fad83c30d637689b69ffc6bbb0c9f5a","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff",{"version":"b5b080e499df18235bac525ce43da935d1a068c5770f58b245d24b6ae8baa166","affectsGlobalScope":true},"b935d4ca97dc9aa05c92aaa51ab5cf2ada5b9722e84ea3af8dc5f93fea3cd361","f295ab6b1bfd2b6b5b19ba621cca18c1b94b25c430c67fcb66c9594e89e3ff39","ea6c58f9711f6dc2f5609e085a1751d1284f1097b568852863bc24becf970831","f59327cd1c98362028d2d2b034b9bada17481ef7f12f13b046bc047ab4fc343c","d759d5a895085d1cfc89d1d1791c188c8170d933092db93e2b48676c49ee7310","2d1b4aec91b432ab2fe2b22f376a34dbc9d9b4b34acbd552f9cd0d3d98bcfca2","0b1d7ac8c1abd81feb21f2bc5d9539610dfa03c2874652cb9c6f4859731edd00","2c8e1d8fe99738fe377049c1baa8b074ac11bdbfad103881c6f012a09383e361","5fac858cb922fe34b898ddc12db441c878ec72bf6a1e3bcbe297f4da4bb6672a","7f119c8c5d4d145e6fcf668055a76f37ed273c24584d5bb90ff9f5520648b47d","b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1","762bc52248d3fab9873c7af564caf622358312cb35de42a4393b71cc36e14621","d02ec79cefaf292fae64b3be5a4416e64b4e420a6429fd458fac6e1bb4c7950e","27abed653f600ea0d5c86e94181beb42824e0f3f16337e2f9e7e9e9c2c392edf","d7871e0e653aa7197fee88886db5678bee6d42164c1f36e4bce9421ddfa7ca49","11ed10bdb3bcc99893570507eac8fece4840add97ee1d4f5a7fbf41cbfdea0d4","429fb571d3db07d3eaa2e74d43eb4190ece3e0de832ed564aeeaf08873e598eb","406d52bf33d618d846aa0d831ee004290567e328edcd4517bbff2937cc977abf","d3060e0810fc0d0dc009e6f086ef413d3c8aeaaf07da25c8d25fd4e181646acf","c0306658efb85764bb6d8d55097007c68a70539b24d0e18fb6edd6eb1778f632","08f7e6ffa66c66a636aecc5acbeb998215d9d09ccba0c558afb7df7e218edeaf","f829eb39aea4487f0ff94a42c56a1a73bc5202bbdeb03f7a638e4ab3e290d017","549d265a212fb5157c8919a4115e83529d0efadb9ab3bd674bc75e5df0fdf403","36f13e842356a220f1763f867133154a1ea6ff8f7bc39f7ac26090baf6f0e761","87f792436b033580a1dcc908d15851e4a5d3d7aa68b1d1c6a142706ef8b154a3","a6099f12a9f086aec74c8c7a40051a3ce11c89aa331a39002edcdf808a09d9dd","56a3aef852aa146f9fe362a1d09e13dae20f3794d33f66b371829348a8ee0e62","07c14b3359e3ed5607c690b9f421f84dd93887e06416d52f60889b4082030464","063f439998b87e20f46fa82cb793c5aae5c2d714a26bb8221e07f5d4c82c989d","57a70c348060470b755bb989fccfbf70b17cf48d00589e4d36868874a99cc921","cbe4710c187acaa5f02b08715c1563fdad82764462654043eb68232ecb626b8d","5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","9c4f32d2fa2b6efeed4f9fbd98254121b17982110b48edcede96e2dc2af0894d","8ed8a955d25000784e5f66b3afbe37c23f363f7671d077c6a15285ef13809dd4","a3dcfa473fb451f89860a5dc83f1994fccd151af55a87683cb6dffc0abba782b","40b369b61fd0bede44a39611baae531e6d46a718b705b9b45c5add4711f19744","225a94e9b80d9ed325a5996ddf6e8e8ec1e35d0cc78ce63b4f7bc3109c41fcfd","220b6ba3c2274aada1b2a9ad69f6966c8d36de546e708fe2b42425a265a48e2a","29733740a84bde4ceebd6415c3a47d36c9a956fdddeacec49a664665a54018b0","6e603a0983306db957764528f138c4897f0391799f876c4c1b46226c0dd8cef2","36d8781b9aa56efc6c8e0c6366ecdebf7327a2ac5b1e1490de1ad5a911457bb1","e8184f498bb78351e6d6f9fe654279d9882d58dd822a9a1178a96e7570262502","ff0a6ed7e754b2cfb1a907578f1c335b4c5ace714a5adb956f94d6192b17f078","bd3086a825d96259e7a1c79ad1bb13749d41cb79ba4336ba813cc65cbd51fd74","46adb1b5ccc5123a4592a20c1c56c8c7ef34d9b2ea43b16a271587ac2076728f","a32f1f8649b0e898d4a54e1860effc7f48dd285bc99f83dc35ccf85203736b3b","beacf8337f15a959b6e4d95d7b55432af842b0484da0f0d342a0dd75beab8fe3","8800447dd5175024126c56daa37ee888e507a5b4cb010790ccc86530a46424fb","cd04b594271be8b8eca1453116f1591ba60ce64d80183b07765a4b5e811966ea","c2c2c6c7ab6fd08050cc906a2230657bd7ae25365a38db7a4c2f84980133d0cf","8199ff7448213d4633834954dad4e5a5e7ed2e14fcfd3f5a1b53d156a1cd9972","327bc1d7e826f1be1b18c51b3444a2dfc66d3f810b43ff5f32b26587db3ea1d2","8818dcc765cb9236f6a01aaa837a3612271777a26ffbd29282a3c282f8704649","d461fc73e0721ae92652f11a61cd1014a0698fb7ddb81beac1aa7d09aa139abb","83ff1f6f71ab0ea7a2a725a864d70672acadada85bba149552c8d815684d90ea","2820e39cdd88b35803c0323a52c12b3fd022b246c805a9c797659f1a1f6c2437","b0d35fd661c6d3a53bc9568b079ebc3363561d6e42b773ab40f2217310b3d1a1","b5f5bbc6d622c252fc13b512ed42cafd65019768e3f0430637e517d9be69547f","71fce7a0dc64feb145e0f58842f43984a2e9ecd79861d8ad7315c0d272575275","066db40ccd6c90d1e57e9f163458713463d4e2771c156acf9ffb7f258646946e","2366b3f634513f748f1cc92ba9a5b015b39cf0195e25c942e3d844721f0e233d","667a5fe656b9e0bf163b829ad74d679c56e82c83456a7c5387ffca0d1f901e5e","d93931264950da279434192bb043f8e379b4a0959bcd294ca89c8b89e1a6772b","3a1cab834f4a3ceedd0dfe8c00b9ca84431454cad8730eef0d0a18d1c0f7a7aa","8d8b84756b85d1dd9d3a60d54f4410b892f931d46560f60ddc44a4decb8f9ee4","902abf1b6aeb2908452ad206db72b0d39029e000a28dff529751585a4e7e5f07","68e39d827a3bd5054e54a433fc90c118941096eb3e9f432b28ea5f88b0fe77b1","691a13dbde331d5bcce65e1463f924b78ad046c0c05ec57bca010e6435de8905","0f112494322a7ecb5dda1823f0f84255451a51d2ad862a0ae1014d361f0257de","bca410625e15b9622626f7ae8aa445153232e0d45e46f0e8dbcd632d735c8e47","e1802d98bc1c1b96b44ea5bb57126dc9757c9b99d87ee997af0ffe1d33afbdb0","658cdacff92cbe3b7e6a7ccdb71bd7928104e067e998157c132d6e11f320bbc3","e6295247cd02955c7385b55efa603d19c4d9330b1343937a9b1c023e346f1ab5","a1473225afc48a471cde6656263736febf2dc83543ad10ef66936f7ed71b2fe3","fadb19eb44c06b59275ad6f620324ea297cbaa20f744ca09d9d83ae122bee14c"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":false,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":false,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[45,47,48,49,50,51,52,53,54,55,56,57],[45,46,48,49,50,51,52,53,54,55,56,57],[46,47,48,49,50,51,52,53,54,55,56,57],[45,46,47,49,50,51,52,53,54,55,56,57],[45,46,47,48,50,51,52,53,54,55,56,57],[45,46,47,48,49,51,52,53,54,55,56,57],[45,46,47,48,49,50,52,53,54,55,56,57],[45,46,47,48,49,50,51,53,54,55,56,57],[45,46,47,48,49,50,51,52,54,55,56,57],[45,46,47,48,49,50,51,52,53,55,56,57],[45,46,47,48,49,50,51,52,53,54,56,57],[45,46,47,48,49,50,51,52,53,54,55,57],[45,46,47,48,49,50,51,52,53,54,55,56],[119],[115,116,117,118],[189],[188],[188,189,190,191,192,193,194,195,196,197,198],[191],[193],[93,94,95,96],[93],[94],[59,60,61,62,63,64],[59],[140],[119,140],[141],[119,154,155],[161],[119,163],[176],[141,142],[140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,162,164,165,166,167,168,177,178,179,180,181,182,183,184,185,186],[57,58,65,92,98,211,213,216,217],[214],[65],[214,215],[57,65,199,210,218],[139,176,211,217],[224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243],[244],[65,92,210,252],[65,92],[253,254],[260,261,262],[256],[98,139,176,258,259,264],[92,98,258,259,260,264],[139,257,258],[98,258,259,264],[139,211,217,218,219,223,244,245,246,251,255,263],[250],[248,249],[247],[92,110],[99,112,212],[57,110,111,139,187,211],[57,100,111],[57,103,110,139,187,211,213,222],[65,92,110,199,211,217],[57,92,98,100,110,139,211,213,217,244],[57],[103],[101,102,104,105,106,107,108,109],[126,127],[119,129],[134,135],[123,124],[122],[113,114,120,122,125,128,129,130,131,133,136,137,138],[132],[129],[121],[97],[161,169,171,172,173,174,175],[170],[119,161],[206],[201,202,203,204,205,206],[201,202,203,204,205,207],[206,207],[208],[200,208,209],[220,221],[222],[81],[66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91]],"referencedMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[170,14],[119,15],[190,16],[191,17],[199,18],[192,17],[193,17],[194,19],[195,20],[189,17],[196,20],[197,17],[198,20],[97,21],[94,22],[95,23],[65,24],[63,25],[64,25],[60,25],[61,25],[62,25],[145,14],[146,14],[148,26],[149,27],[151,14],[152,14],[153,14],[180,28],[156,29],[158,14],[184,14],[186,14],[154,14],[155,14],[159,14],[185,14],[162,30],[164,31],[182,14],[183,14],[177,32],[181,33],[168,14],[187,34],[140,14],[218,35],[215,36],[214,37],[216,38],[211,39],[219,40],[226,41],[227,41],[224,42],[244,41],[228,41],[230,41],[229,41],[231,41],[232,41],[233,41],[234,41],[235,41],[236,41],[237,41],[239,41],[238,41],[241,41],[240,41],[243,41],[242,41],[253,43],[254,44],[255,45],[263,46],[257,47],[260,48],[261,49],[259,50],[262,51],[264,52],[251,53],[250,54],[248,55],[249,55],[111,56],[213,57],[212,58],[112,59],[223,60],[246,61],[245,62],[101,63],[104,64],[110,65],[106,64],[107,64],[127,14],[128,66],[135,67],[136,68],[125,69],[123,70],[137,70],[120,14],[130,70],[139,71],[133,72],[132,73],[131,70],[129,70],[122,74],[98,75],[169,30],[176,76],[175,14],[171,77],[161,14],[174,78],[201,79],[205,79],[204,79],[203,79],[207,80],[202,79],[206,81],[208,82],[209,83],[210,84],[222,85],[220,86],[82,87],[92,88]],"exportedModulesMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[170,14],[119,15],[190,16],[191,17],[199,18],[192,17],[193,17],[194,19],[195,20],[189,17],[196,20],[197,17],[198,20],[97,21],[94,22],[95,23],[65,24],[63,25],[64,25],[60,25],[61,25],[62,25],[145,14],[146,14],[148,26],[149,27],[151,14],[152,14],[153,14],[180,28],[156,29],[158,14],[184,14],[186,14],[154,14],[155,14],[159,14],[185,14],[162,30],[164,31],[182,14],[183,14],[177,32],[181,33],[168,14],[187,34],[140,14],[218,35],[215,36],[214,37],[216,38],[211,39],[219,40],[226,41],[227,41],[224,42],[244,41],[228,41],[230,41],[229,41],[231,41],[232,41],[233,41],[234,41],[235,41],[236,41],[237,41],[239,41],[238,41],[241,41],[240,41],[243,41],[242,41],[253,43],[254,44],[255,45],[263,46],[257,47],[260,48],[261,49],[259,50],[262,51],[264,52],[251,53],[250,54],[248,55],[249,55],[111,56],[213,57],[212,58],[112,59],[223,60],[246,61],[245,62],[101,63],[104,64],[110,65],[106,64],[107,64],[127,14],[128,66],[135,67],[136,68],[125,69],[123,70],[137,70],[120,14],[130,70],[139,71],[133,72],[132,73],[131,70],[129,70],[122,74],[98,75],[169,30],[176,76],[175,14],[171,77],[161,14],[174,78],[201,79],[205,79],[204,79],[203,79],[207,80],[202,79],[206,81],[208,82],[209,83],[210,84],[222,85],[220,86],[82,87],[92,88]],"semanticDiagnosticsPerFile":[46,47,45,48,49,50,51,52,53,54,55,56,57,163,117,170,115,119,116,118,58,190,191,199,192,193,194,256,188,195,189,196,121,100,197,198,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,93,96,97,94,95,65,63,64,60,61,62,59,143,145,144,146,147,148,149,150,178,151,152,153,180,156,157,158,184,186,154,155,159,185,160,162,164,165,182,166,167,183,177,181,168,179,187,140,141,142,218,215,214,216,211,219,226,225,227,224,244,228,230,229,231,232,233,234,235,236,237,239,238,241,240,243,242,253,254,255,258,263,257,260,261,259,262,264,251,250,248,249,247,217,99,111,213,212,112,223,246,245,103,101,105,102,104,110,109,106,107,108,127,128,126,135,136,134,125,124,123,137,114,120,113,130,138,139,133,132,131,129,122,98,169,176,173,175,171,161,174,172,201,205,204,203,207,202,206,252,208,209,210,200,221,222,220,80,75,89,88,70,90,78,77,72,68,81,82,74,83,92,67,66,71,79,73,69,76,91,85,84,87,86]},"version":"4.4.2"}