File "index.min.js.map"

Full Path: /home/pumpbmko/public_html/wp-content/plugins/gutenberg/build/preferences-persistence/index.min.js.map
File size: 38.76 KB
MIME-type: application/json
Charset: utf-8

{"version":3,"file":"./build/preferences-persistence/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,yECL9D,MAAM,EAA+BC,OAAW,GAAY,S,aCU5D,MAAMC,EAAe,CAAC,EAChBC,EAAeF,OAAOE,aAmBb,SAASC,GAAQ,cAC/BC,EAAa,uBACbC,EAAyB,8BAA6B,kBACtDC,EAAoB,MACjB,CAAC,GACJ,IAAIC,EAAQH,EACZ,MAAMI,ECnBQ,SAAwBC,EAAMC,GAC5C,IAAIC,EACAC,EAEJ,OAAOC,kBAA6BC,GAGnC,OAAOF,GAAmBD,GAkBrBC,SAEEA,EAKFD,IACJI,aAAcJ,GACdA,EAAY,MAIN,IAAIK,SAAS,CAAEC,EAASC,KAE9BP,EAAYQ,YAAY,KACvBP,EAAgBH,KAASK,GACvBM,MAAM,IAAKC,KACXJ,KAAYI,EAAU,IAEtBC,OAASC,IACTL,EAAQK,EAAO,I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MAAMzF,EAA0B,uBAAuByF,IACjD9D,EAAYC,KAAKC,MACtBlC,OAAOE,aAAaiC,QAAS9B,IAKxBmI,EACLnG,KAAKH,MAAOL,GAAcA,EAAWS,YAAe,EAC/CmG,EAAgBpG,KAAKH,MAAOF,GAAaA,EAAUM,YAAe,EAExE,IAAIlC,EAUJ,OARCA,EADIyB,GAAc2G,GAAkBC,EACpBb,EAA+B/F,GACpCG,EACK4F,EAA+B5F,GAG/B6D,EAA+BC,GAGzC3F,EAAQ,CACdC,gBACAC,0BAEF,E","sources":["webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/compat get default export","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/external window [\"wp\",\"apiFetch\"]","../../packages/preferences-persistence/src/create/index.js","../../packages/preferences-persistence/src/create/debounce-async.js","../../packages/preferences-persistence/src/migrations/legacy-local-storage-data/move-feature-preferences.js","../../packages/preferences-persistence/src/migrations/legacy-local-storage-data/move-individual-preference.js","../../packages/preferences-persistence/src/migrations/legacy-local-storage-data/convert-edit-post-panels.js","../../packages/preferences-persistence/src/migrations/legacy-local-storage-data/index.js","../../packages/preferences-persistence/src/migrations/legacy-local-storage-data/move-interface-enable-items.js","../../packages/preferences-persistence/src/migrations/legacy-local-storage-data/move-third-party-feature-preferences.js","../../packages/preferences-persistence/src/migrations/preferences-package-data/index.js","../../packages/preferences-persistence/src/migrations/preferences-package-data/convert-complementary-areas.js","../../packages/preferences-persistence/src/migrations/preferences-package-data/convert-editor-settings.js","../../packages/preferences-persistence/src/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport debounceAsync from './debounce-async';\n\nconst EMPTY_OBJECT = {};\nconst localStorage = window.localStorage;\n\n/**\n * Creates a persistence layer that stores data in WordPress user meta via the\n * REST API.\n *\n * @param {Object}  options\n * @param {?Object} options.preloadedData          Any persisted preferences data that should be preloaded.\n *                                                 When set, the persistence layer will avoid fetching data\n *                                                 from the REST API.\n * @param {?string} options.localStorageRestoreKey The key to use for restoring the localStorage backup, used\n *                                                 when the persistence layer calls `localStorage.getItem` or\n *                                                 `localStorage.setItem`.\n * @param {?number} options.requestDebounceMS      Debounce requests to the API so that they only occur at\n *                                                 minimum every `requestDebounceMS` milliseconds, and don't\n *                                                 swamp the server. Defaults to 2500ms.\n *\n * @return {Object} A persistence layer for WordPress user meta.\n */\nexport default function create( {\n\tpreloadedData,\n\tlocalStorageRestoreKey = 'WP_PREFERENCES_RESTORE_DATA',\n\trequestDebounceMS = 2500,\n} = {} ) {\n\tlet cache = preloadedData;\n\tconst debouncedApiFetch = debounceAsync( apiFetch, requestDebounceMS );\n\n\tasync function get() {\n\t\tif ( cache ) {\n\t\t\treturn cache;\n\t\t}\n\n\t\tconst user = await apiFetch( {\n\t\t\tpath: '/wp/v2/users/me?context=edit',\n\t\t} );\n\n\t\tconst serverData = user?.meta?.persisted_preferences;\n\t\tconst localData = JSON.parse(\n\t\t\tlocalStorage.getItem( localStorageRestoreKey )\n\t\t);\n\n\t\t// Date parse returns NaN for invalid input. Coerce anything invalid\n\t\t// into a conveniently comparable zero.\n\t\tconst serverTimestamp = Date.parse( serverData?._modified ) || 0;\n\t\tconst localTimestamp = Date.parse( localData?._modified ) || 0;\n\n\t\t// Prefer server data if it exists and is more recent.\n\t\t// Otherwise fallback to localStorage data.\n\t\tif ( serverData && serverTimestamp >= localTimestamp ) {\n\t\t\tcache = serverData;\n\t\t} else if ( localData ) {\n\t\t\tcache = localData;\n\t\t} else {\n\t\t\tcache = EMPTY_OBJECT;\n\t\t}\n\n\t\treturn cache;\n\t}\n\n\tfunction set( newData ) {\n\t\tconst dataWithTimestamp = {\n\t\t\t...newData,\n\t\t\t_modified: new Date().toISOString(),\n\t\t};\n\t\tcache = dataWithTimestamp;\n\n\t\t// Store data in local storage as a fallback. If for some reason the\n\t\t// api request does not complete or becomes unavailable, this data\n\t\t// can be used to restore preferences.\n\t\tlocalStorage.setItem(\n\t\t\tlocalStorageRestoreKey,\n\t\t\tJSON.stringify( dataWithTimestamp )\n\t\t);\n\n\t\t// The user meta endpoint seems susceptible to errors when consecutive\n\t\t// requests are made in quick succession. Ensure there's a gap between\n\t\t// any consecutive requests.\n\t\t//\n\t\t// Catch and do nothing with errors from the REST API.\n\t\tdebouncedApiFetch( {\n\t\t\tpath: '/wp/v2/users/me',\n\t\t\tmethod: 'PUT',\n\t\t\t// `keepalive` will still send the request in the background,\n\t\t\t// even when a browser unload event might interrupt it.\n\t\t\t// This should hopefully make things more resilient.\n\t\t\t// This does have a size limit of 64kb, but the data is usually\n\t\t\t// much less.\n\t\t\tkeepalive: true,\n\t\t\tdata: {\n\t\t\t\tmeta: {\n\t\t\t\t\tpersisted_preferences: dataWithTimestamp,\n\t\t\t\t},\n\t\t\t},\n\t\t} ).catch( () => {} );\n\t}\n\n\treturn {\n\t\tget,\n\t\tset,\n\t};\n}\n","/**\n * Performs a leading edge debounce of async functions.\n *\n * If three functions are throttled at the same time:\n * - The first happens immediately.\n * - The second is never called.\n * - The third happens `delayMS` milliseconds after the first has resolved.\n *\n * This is distinct from `{ debounce } from @wordpress/compose` in that it\n * waits for promise resolution.\n *\n * @param {Function} func    A function that returns a promise.\n * @param {number}   delayMS A delay in milliseconds.\n *\n * @return {Function} A function that debounce whatever function is passed\n *                    to it.\n */\nexport default function debounceAsync( func, delayMS ) {\n\tlet timeoutId;\n\tlet activePromise;\n\n\treturn async function debounced( ...args ) {\n\t\t// This is a leading edge debounce. If there's no promise or timeout\n\t\t// in progress, call the debounced function immediately.\n\t\tif ( ! activePromise && ! timeoutId ) {\n\t\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\t\t// Keep a reference to the promise.\n\t\t\t\tactivePromise = func( ...args )\n\t\t\t\t\t.then( ( ...thenArgs ) => {\n\t\t\t\t\t\tresolve( ...thenArgs );\n\t\t\t\t\t} )\n\t\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\t\treject( error );\n\t\t\t\t\t} )\n\t\t\t\t\t.finally( () => {\n\t\t\t\t\t\t// As soon this promise is complete, clear the way for the\n\t\t\t\t\t\t// next one to happen immediately.\n\t\t\t\t\t\tactivePromise = null;\n\t\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\n\t\tif ( activePromise ) {\n\t\t\t// Let any active promises finish before queuing the next request.\n\t\t\tawait activePromise;\n\t\t}\n\n\t\t// Clear any active timeouts, abandoning any requests that have\n\t\t// been queued but not been made.\n\t\tif ( timeoutId ) {\n\t\t\tclearTimeout( timeoutId );\n\t\t\ttimeoutId = null;\n\t\t}\n\n\t\t// Trigger any trailing edge calls to the function.\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\t// Schedule the next request but with a delay.\n\t\t\ttimeoutId = setTimeout( () => {\n\t\t\t\tactivePromise = func( ...args )\n\t\t\t\t\t.then( ( ...thenArgs ) => {\n\t\t\t\t\t\tresolve( ...thenArgs );\n\t\t\t\t\t} )\n\t\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\t\treject( error );\n\t\t\t\t\t} )\n\t\t\t\t\t.finally( () => {\n\t\t\t\t\t\t// As soon this promise is complete, clear the way for the\n\t\t\t\t\t\t// next one to happen immediately.\n\t\t\t\t\t\tactivePromise = null;\n\t\t\t\t\t\ttimeoutId = null;\n\t\t\t\t\t} );\n\t\t\t}, delayMS );\n\t\t} );\n\t};\n}\n","/**\n * Move the 'features' object in local storage from the sourceStoreName to the\n * preferences store data structure.\n *\n * Previously, editors used a data structure like this for feature preferences:\n * ```js\n * {\n *     'core/edit-post': {\n *         preferences: {\n *             features; {\n *                 topToolbar: true,\n *                 // ... other boolean 'feature' preferences\n *             },\n *         },\n *     },\n * }\n * ```\n *\n * And for a while these feature preferences lived in the interface package:\n * ```js\n * {\n *     'core/interface': {\n *         preferences: {\n *             features: {\n *                 'core/edit-post': {\n *                     topToolbar: true\n *                 }\n *             }\n *         }\n *     }\n * }\n * ```\n *\n * In the preferences store, 'features' aren't considered special, they're\n * merged to the root level of the scope along with other preferences:\n * ```js\n * {\n *     'core/preferences': {\n *         preferences: {\n *             'core/edit-post': {\n *                 topToolbar: true,\n *                 // ... any other preferences.\n *             }\n *         }\n *     }\n * }\n * ```\n *\n * This function handles moving from either the source store or the interface\n * store to the preferences data structure.\n *\n * @param {Object} state           The state before migration.\n * @param {string} sourceStoreName The name of the store that has persisted\n *                                 preferences to migrate to the preferences\n *                                 package.\n * @return {Object} The migrated state\n */\nexport default function moveFeaturePreferences( state, sourceStoreName ) {\n\tconst preferencesStoreName = 'core/preferences';\n\tconst interfaceStoreName = 'core/interface';\n\n\t// Features most recently (and briefly) lived in the interface package.\n\t// If data exists there, prioritize using that for the migration. If not\n\t// also check the original package as the user may have updated from an\n\t// older block editor version.\n\tconst interfaceFeatures =\n\t\tstate?.[ interfaceStoreName ]?.preferences?.features?.[\n\t\t\tsourceStoreName\n\t\t];\n\tconst sourceFeatures = state?.[ sourceStoreName ]?.preferences?.features;\n\tconst featuresToMigrate = interfaceFeatures\n\t\t? interfaceFeatures\n\t\t: sourceFeatures;\n\n\tif ( ! featuresToMigrate ) {\n\t\treturn state;\n\t}\n\n\tconst existingPreferences = state?.[ preferencesStoreName ]?.preferences;\n\n\t// Avoid migrating features again if they've previously been migrated.\n\tif ( existingPreferences?.[ sourceStoreName ] ) {\n\t\treturn state;\n\t}\n\n\tlet updatedInterfaceState;\n\tif ( interfaceFeatures ) {\n\t\tconst otherInterfaceState = state?.[ interfaceStoreName ];\n\t\tconst otherInterfaceScopes =\n\t\t\tstate?.[ interfaceStoreName ]?.preferences?.features;\n\n\t\tupdatedInterfaceState = {\n\t\t\t[ interfaceStoreName ]: {\n\t\t\t\t...otherInterfaceState,\n\t\t\t\tpreferences: {\n\t\t\t\t\tfeatures: {\n\t\t\t\t\t\t...otherInterfaceScopes,\n\t\t\t\t\t\t[ sourceStoreName ]: undefined,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tlet updatedSourceState;\n\tif ( sourceFeatures ) {\n\t\tconst otherSourceState = state?.[ sourceStoreName ];\n\t\tconst sourcePreferences = state?.[ sourceStoreName ]?.preferences;\n\n\t\tupdatedSourceState = {\n\t\t\t[ sourceStoreName ]: {\n\t\t\t\t...otherSourceState,\n\t\t\t\tpreferences: {\n\t\t\t\t\t...sourcePreferences,\n\t\t\t\t\tfeatures: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\t// Set the feature values in the interface store, the features\n\t// object is keyed by 'scope', which matches the store name for\n\t// the source.\n\treturn {\n\t\t...state,\n\t\t[ preferencesStoreName ]: {\n\t\t\tpreferences: {\n\t\t\t\t...existingPreferences,\n\t\t\t\t[ sourceStoreName ]: featuresToMigrate,\n\t\t\t},\n\t\t},\n\t\t...updatedInterfaceState,\n\t\t...updatedSourceState,\n\t};\n}\n","const identity = ( arg ) => arg;\n\n/**\n * Migrates an individual item inside the `preferences` object for a package's store.\n *\n * Previously, some packages had individual 'preferences' of any data type, and many used\n * complex nested data structures. For example:\n * ```js\n * {\n *     'core/edit-post': {\n *         preferences: {\n *             panels: {\n *                 publish: {\n *                     opened: true,\n *                     enabled: true,\n *                 }\n *             },\n *             // ...other preferences.\n *         },\n *     },\n * }\n *\n * This function supports moving an individual preference like 'panels' above into the\n * preferences package data structure.\n *\n * It supports moving a preference to a particular scope in the preferences store and\n * optionally converting the data using a `convert` function.\n *\n * ```\n *\n * @param {Object}    state        The original state.\n * @param {Object}    migrate      An options object that contains details of the migration.\n * @param {string}    migrate.from The name of the store to migrate from.\n * @param {string}    migrate.to   The scope in the preferences store to migrate to.\n * @param {string}    key          The key in the preferences object to migrate.\n * @param {?Function} convert      A function that converts preferences from one format to another.\n */\nexport default function moveIndividualPreferenceToPreferences(\n\tstate,\n\t{ from: sourceStoreName, to: scope },\n\tkey,\n\tconvert = identity\n) {\n\tconst preferencesStoreName = 'core/preferences';\n\tconst sourcePreference = state?.[ sourceStoreName ]?.preferences?.[ key ];\n\n\t// There's nothing to migrate, exit early.\n\tif ( sourcePreference === undefined ) {\n\t\treturn state;\n\t}\n\n\tconst targetPreference =\n\t\tstate?.[ preferencesStoreName ]?.preferences?.[ scope ]?.[ key ];\n\n\t// There's existing data at the target, so don't overwrite it, exit early.\n\tif ( targetPreference ) {\n\t\treturn state;\n\t}\n\n\tconst otherScopes = state?.[ preferencesStoreName ]?.preferences;\n\tconst otherPreferences =\n\t\tstate?.[ preferencesStoreName ]?.preferences?.[ scope ];\n\n\tconst otherSourceState = state?.[ sourceStoreName ];\n\tconst allSourcePreferences = state?.[ sourceStoreName ]?.preferences;\n\n\t// Pass an object with the key and value as this allows the convert\n\t// function to convert to a data structure that has different keys.\n\tconst convertedPreferences = convert( { [ key ]: sourcePreference } );\n\n\treturn {\n\t\t...state,\n\t\t[ preferencesStoreName ]: {\n\t\t\tpreferences: {\n\t\t\t\t...otherScopes,\n\t\t\t\t[ scope ]: {\n\t\t\t\t\t...otherPreferences,\n\t\t\t\t\t...convertedPreferences,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t[ sourceStoreName ]: {\n\t\t\t...otherSourceState,\n\t\t\tpreferences: {\n\t\t\t\t...allSourcePreferences,\n\t\t\t\t[ key ]: undefined,\n\t\t\t},\n\t\t},\n\t};\n}\n","/**\n * Convert the post editor's panels state from:\n * ```\n * {\n *     panels: {\n *         tags: {\n *             enabled: true,\n *             opened: true,\n *         },\n *         permalinks: {\n *             enabled: false,\n *             opened: false,\n *         },\n *     },\n * }\n * ```\n *\n * to a new, more concise data structure:\n * {\n *     inactivePanels: [\n *         'permalinks',\n *     ],\n *     openPanels: [\n *         'tags',\n *     ],\n * }\n *\n * @param {Object} preferences A preferences object.\n *\n * @return {Object} The converted data.\n */\nexport default function convertEditPostPanels( preferences ) {\n\tconst panels = preferences?.panels ?? {};\n\treturn Object.keys( panels ).reduce(\n\t\t( convertedData, panelName ) => {\n\t\t\tconst panel = panels[ panelName ];\n\n\t\t\tif ( panel?.enabled === false ) {\n\t\t\t\tconvertedData.inactivePanels.push( panelName );\n\t\t\t}\n\n\t\t\tif ( panel?.opened === true ) {\n\t\t\t\tconvertedData.openPanels.push( panelName );\n\t\t\t}\n\n\t\t\treturn convertedData;\n\t\t},\n\t\t{ inactivePanels: [], openPanels: [] }\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport moveFeaturePreferences from './move-feature-preferences';\nimport moveThirdPartyFeaturePreferences from './move-third-party-feature-preferences';\nimport moveIndividualPreference from './move-individual-preference';\nimport moveInterfaceEnableItems from './move-interface-enable-items';\nimport convertEditPostPanels from './convert-edit-post-panels';\n\n/**\n * Gets the legacy local storage data for a given user.\n *\n * @param {string | number} userId The user id.\n *\n * @return {Object | null} The local storage data.\n */\nfunction getLegacyData( userId ) {\n\tconst key = `WP_DATA_USER_${ userId }`;\n\tconst unparsedData = window.localStorage.getItem( key );\n\treturn JSON.parse( unparsedData );\n}\n\n/**\n * Converts data from the old `@wordpress/data` package format.\n *\n * @param {Object | null | undefined} data The legacy data in its original format.\n *\n * @return {Object | undefined} The converted data or `undefined` if there was\n *                              nothing to convert.\n */\nexport function convertLegacyData( data ) {\n\tif ( ! data ) {\n\t\treturn;\n\t}\n\n\t// Move boolean feature preferences from each editor into the\n\t// preferences store data structure.\n\tdata = moveFeaturePreferences( data, 'core/edit-widgets' );\n\tdata = moveFeaturePreferences( data, 'core/customize-widgets' );\n\tdata = moveFeaturePreferences( data, 'core/edit-post' );\n\tdata = moveFeaturePreferences( data, 'core/edit-site' );\n\n\t// Move third party boolean feature preferences from the interface package\n\t// to the preferences store data structure.\n\tdata = moveThirdPartyFeaturePreferences( data );\n\n\t// Move and convert the interface store's `enableItems` data into the\n\t// preferences data structure.\n\tdata = moveInterfaceEnableItems( data );\n\n\t// Move individual ad-hoc preferences from various packages into the\n\t// preferences store data structure.\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core/edit-post' },\n\t\t'hiddenBlockTypes'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core/edit-post' },\n\t\t'editorMode'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core/edit-post' },\n\t\t'panels',\n\t\tconvertEditPostPanels\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/editor', to: 'core' },\n\t\t'isPublishSidebarEnabled'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core' },\n\t\t'isPublishSidebarEnabled'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-site', to: 'core/edit-site' },\n\t\t'editorMode'\n\t);\n\n\t// The new system is only concerned with persisting\n\t// 'core/preferences' preferences reducer, so only return that.\n\treturn data?.[ 'core/preferences' ]?.preferences;\n}\n\n/**\n * Gets the legacy local storage data for the given user and returns the\n * data converted to the new format.\n *\n * @param {string | number} userId The user id.\n *\n * @return {Object | undefined} The converted data or undefined if no local\n *                              storage data could be found.\n */\nexport default function convertLegacyLocalStorageData( userId ) {\n\tconst data = getLegacyData( userId );\n\treturn convertLegacyData( data );\n}\n","/**\n * Migrates interface 'enableItems' data to the preferences store.\n *\n * The interface package stores this data in this format:\n * ```js\n * {\n *     enableItems: {\n *         singleEnableItems: {\n * \t           complementaryArea: {\n *                 'core/edit-post': 'edit-post/document',\n *                 'core/edit-site': 'edit-site/global-styles',\n *             }\n *         },\n *         multipleEnableItems: {\n *             pinnedItems: {\n *                 'core/edit-post': {\n *                     'plugin-1': true,\n *                 },\n *                 'core/edit-site': {\n *                     'plugin-2': true,\n *                 },\n *             },\n *         }\n *     }\n * }\n * ```\n *\n * and it should be converted it to:\n * ```js\n * {\n *     'core/edit-post': {\n *         complementaryArea: 'edit-post/document',\n *         pinnedItems: {\n *             'plugin-1': true,\n *         },\n *     },\n *     'core/edit-site': {\n *         complementaryArea: 'edit-site/global-styles',\n *         pinnedItems: {\n *             'plugin-2': true,\n *         },\n *     },\n * }\n * ```\n *\n * @param {Object} state The local storage state.\n */\nexport default function moveInterfaceEnableItems( state ) {\n\tconst interfaceStoreName = 'core/interface';\n\tconst preferencesStoreName = 'core/preferences';\n\tconst sourceEnableItems = state?.[ interfaceStoreName ]?.enableItems;\n\n\t// There's nothing to migrate, exit early.\n\tif ( ! sourceEnableItems ) {\n\t\treturn state;\n\t}\n\n\tconst allPreferences = state?.[ preferencesStoreName ]?.preferences ?? {};\n\n\t// First convert complementaryAreas into the right format.\n\t// Use the existing preferences as the accumulator so that the data is\n\t// merged.\n\tconst sourceComplementaryAreas =\n\t\tsourceEnableItems?.singleEnableItems?.complementaryArea ?? {};\n\n\tconst preferencesWithConvertedComplementaryAreas = Object.keys(\n\t\tsourceComplementaryAreas\n\t).reduce( ( accumulator, scope ) => {\n\t\tconst data = sourceComplementaryAreas[ scope ];\n\n\t\t// Don't overwrite any existing data in the preferences store.\n\t\tif ( accumulator?.[ scope ]?.complementaryArea ) {\n\t\t\treturn accumulator;\n\t\t}\n\n\t\treturn {\n\t\t\t...accumulator,\n\t\t\t[ scope ]: {\n\t\t\t\t...accumulator[ scope ],\n\t\t\t\tcomplementaryArea: data,\n\t\t\t},\n\t\t};\n\t}, allPreferences );\n\n\t// Next feed the converted complementary areas back into a reducer that\n\t// converts the pinned items, resulting in the fully migrated data.\n\tconst sourcePinnedItems =\n\t\tsourceEnableItems?.multipleEnableItems?.pinnedItems ?? {};\n\tconst allConvertedData = Object.keys( sourcePinnedItems ).reduce(\n\t\t( accumulator, scope ) => {\n\t\t\tconst data = sourcePinnedItems[ scope ];\n\t\t\t// Don't overwrite any existing data in the preferences store.\n\t\t\tif ( accumulator?.[ scope ]?.pinnedItems ) {\n\t\t\t\treturn accumulator;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...accumulator,\n\t\t\t\t[ scope ]: {\n\t\t\t\t\t...accumulator[ scope ],\n\t\t\t\t\tpinnedItems: data,\n\t\t\t\t},\n\t\t\t};\n\t\t},\n\t\tpreferencesWithConvertedComplementaryAreas\n\t);\n\n\tconst otherInterfaceItems = state[ interfaceStoreName ];\n\n\treturn {\n\t\t...state,\n\t\t[ preferencesStoreName ]: {\n\t\t\tpreferences: allConvertedData,\n\t\t},\n\t\t[ interfaceStoreName ]: {\n\t\t\t...otherInterfaceItems,\n\t\t\tenableItems: undefined,\n\t\t},\n\t};\n}\n","/**\n * The interface package previously had a public API that could be used by\n * plugins to set persisted boolean 'feature' preferences.\n *\n * While usage was likely non-existent or very small, this function ensures\n * those are migrated to the preferences data structure. The interface\n * package's APIs have now been deprecated and use the preferences store.\n *\n * This will convert data that looks like this:\n * ```js\n * {\n *     'core/interface': {\n *         preferences: {\n *             features: {\n *                 'my-plugin': {\n *                     myPluginFeature: true\n *                 }\n *             }\n *         }\n *     }\n * }\n * ```\n *\n * To this:\n * ```js\n *  * {\n *     'core/preferences': {\n *         preferences: {\n *             'my-plugin': {\n *                 myPluginFeature: true\n *             }\n *         }\n *     }\n * }\n * ```\n *\n * @param {Object} state The local storage state\n *\n * @return {Object} The state with third party preferences moved to the\n *                  preferences data structure.\n */\nexport default function moveThirdPartyFeaturePreferencesToPreferences( state ) {\n\tconst interfaceStoreName = 'core/interface';\n\tconst preferencesStoreName = 'core/preferences';\n\n\tconst interfaceScopes =\n\t\tstate?.[ interfaceStoreName ]?.preferences?.features;\n\tconst interfaceScopeKeys = interfaceScopes\n\t\t? Object.keys( interfaceScopes )\n\t\t: [];\n\n\tif ( ! interfaceScopeKeys?.length ) {\n\t\treturn state;\n\t}\n\n\treturn interfaceScopeKeys.reduce( function ( convertedState, scope ) {\n\t\tif ( scope.startsWith( 'core' ) ) {\n\t\t\treturn convertedState;\n\t\t}\n\n\t\tconst featuresToMigrate = interfaceScopes?.[ scope ];\n\t\tif ( ! featuresToMigrate ) {\n\t\t\treturn convertedState;\n\t\t}\n\n\t\tconst existingMigratedData =\n\t\t\tconvertedState?.[ preferencesStoreName ]?.preferences?.[ scope ];\n\n\t\tif ( existingMigratedData ) {\n\t\t\treturn convertedState;\n\t\t}\n\n\t\tconst otherPreferencesScopes =\n\t\t\tconvertedState?.[ preferencesStoreName ]?.preferences;\n\t\tconst otherInterfaceState = convertedState?.[ interfaceStoreName ];\n\t\tconst otherInterfaceScopes =\n\t\t\tconvertedState?.[ interfaceStoreName ]?.preferences?.features;\n\n\t\treturn {\n\t\t\t...convertedState,\n\t\t\t[ preferencesStoreName ]: {\n\t\t\t\tpreferences: {\n\t\t\t\t\t...otherPreferencesScopes,\n\t\t\t\t\t[ scope ]: featuresToMigrate,\n\t\t\t\t},\n\t\t\t},\n\t\t\t[ interfaceStoreName ]: {\n\t\t\t\t...otherInterfaceState,\n\t\t\t\tpreferences: {\n\t\t\t\t\tfeatures: {\n\t\t\t\t\t\t...otherInterfaceScopes,\n\t\t\t\t\t\t[ scope ]: undefined,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}, state );\n}\n","/**\n * Internal dependencies\n */\nimport convertComplementaryAreas from './convert-complementary-areas';\nimport convertEditorSettings from './convert-editor-settings';\n\nexport default function convertPreferencesPackageData( data ) {\n\tlet newData = convertComplementaryAreas( data );\n\tnewData = convertEditorSettings( newData );\n\treturn newData;\n}\n","export default function convertComplementaryAreas( state ) {\n\treturn Object.keys( state ).reduce( ( stateAccumulator, scope ) => {\n\t\tconst scopeData = state[ scope ];\n\n\t\t// If a complementary area is truthy, convert it to the `isComplementaryAreaVisible` boolean.\n\t\tif ( scopeData?.complementaryArea ) {\n\t\t\tconst updatedScopeData = { ...scopeData };\n\t\t\tdelete updatedScopeData.complementaryArea;\n\t\t\tupdatedScopeData.isComplementaryAreaVisible = true;\n\t\t\tstateAccumulator[ scope ] = updatedScopeData;\n\t\t\treturn stateAccumulator;\n\t\t}\n\n\t\treturn stateAccumulator;\n\t}, state );\n}\n","/**\n * Internal dependencies\n */\n\nexport default function convertEditorSettings( data ) {\n\tlet newData = data;\n\tconst settingsToMoveToCore = [\n\t\t'allowRightClickOverrides',\n\t\t'distractionFree',\n\t\t'editorMode',\n\t\t'fixedToolbar',\n\t\t'focusMode',\n\t\t'hiddenBlockTypes',\n\t\t'inactivePanels',\n\t\t'keepCaretInsideBlock',\n\t\t'mostUsedBlocks',\n\t\t'openPanels',\n\t\t'showBlockBreadcrumbs',\n\t\t'showIconLabels',\n\t\t'showListViewByDefault',\n\t\t'isPublishSidebarEnabled',\n\t\t'isComplementaryAreaVisible',\n\t\t'pinnedItems',\n\t];\n\n\tsettingsToMoveToCore.forEach( ( setting ) => {\n\t\tif ( data?.[ 'core/edit-post' ]?.[ setting ] !== undefined ) {\n\t\t\tnewData = {\n\t\t\t\t...newData,\n\t\t\t\tcore: {\n\t\t\t\t\t...newData?.core,\n\t\t\t\t\t[ setting ]: data[ 'core/edit-post' ][ setting ],\n\t\t\t\t},\n\t\t\t};\n\t\t\tdelete newData[ 'core/edit-post' ][ setting ];\n\t\t}\n\n\t\tif ( data?.[ 'core/edit-site' ]?.[ setting ] !== undefined ) {\n\t\t\tdelete newData[ 'core/edit-site' ][ setting ];\n\t\t}\n\t} );\n\n\tif ( Object.keys( newData?.[ 'core/edit-post' ] ?? {} )?.length === 0 ) {\n\t\tdelete newData[ 'core/edit-post' ];\n\t}\n\n\tif ( Object.keys( newData?.[ 'core/edit-site' ] ?? {} )?.length === 0 ) {\n\t\tdelete newData[ 'core/edit-site' ];\n\t}\n\n\treturn newData;\n}\n","/**\n * Internal dependencies\n */\nimport create from './create';\nimport convertLegacyLocalStorageData from './migrations/legacy-local-storage-data';\nimport convertPreferencesPackageData from './migrations/preferences-package-data';\n\nexport { create };\n\n/**\n * Creates the persistence layer with preloaded data.\n *\n * It prioritizes any data from the server, but falls back first to localStorage\n * restore data, and then to any legacy data.\n *\n * This function is used internally by WordPress in an inline script, so\n * prefixed with `__unstable`.\n *\n * @param {Object} serverData Preferences data preloaded from the server.\n * @param {string} userId     The user id.\n *\n * @return {Object} The persistence layer initialized with the preloaded data.\n */\nexport function __unstableCreatePersistenceLayer( serverData, userId ) {\n\tconst localStorageRestoreKey = `WP_PREFERENCES_USER_${ userId }`;\n\tconst localData = JSON.parse(\n\t\twindow.localStorage.getItem( localStorageRestoreKey )\n\t);\n\n\t// Date parse returns NaN for invalid input. Coerce anything invalid\n\t// into a conveniently comparable zero.\n\tconst serverModified =\n\t\tDate.parse( serverData && serverData._modified ) || 0;\n\tconst localModified = Date.parse( localData && localData._modified ) || 0;\n\n\tlet preloadedData;\n\tif ( serverData && serverModified >= localModified ) {\n\t\tpreloadedData = convertPreferencesPackageData( serverData );\n\t} else if ( localData ) {\n\t\tpreloadedData = convertPreferencesPackageData( localData );\n\t} else {\n\t\t// Check if there is data in the legacy format from the old persistence system.\n\t\tpreloadedData = convertLegacyLocalStorageData( userId );\n\t}\n\n\treturn create( {\n\t\tpreloadedData,\n\t\tlocalStorageRestoreKey,\n\t} );\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","EMPTY_OBJECT","localStorage","create","preloadedData","localStorageRestoreKey","requestDebounceMS","cache","debouncedApiFetch","func","delayMS","timeoutId","activePromise","async","args","clearTimeout","Promise","resolve","reject","setTimeout","then","thenArgs","catch","error","finally","debounceAsync","apiFetch","user","path","serverData","meta","persisted_preferences","localData","JSON","parse","getItem","serverTimestamp","Date","_modified","localTimestamp","set","newData","dataWithTimestamp","toISOString","setItem","stringify","method","keepalive","data","moveFeaturePreferences","state","sourceStoreName","preferencesStoreName","interfaceStoreName","interfaceFeatures","preferences","features","sourceFeatures","featuresToMigrate","existingPreferences","updatedInterfaceState","updatedSourceState","otherInterfaceState","otherInterfaceScopes","undefined","otherSourceState","sourcePreferences","identity","arg","moveIndividualPreferenceToPreferences","from","to","scope","convert","sourcePreference","targetPreference","otherScopes","otherPreferences","allSourcePreferences","convertedPreferences","convertEditPostPanels","_preferences$panels","panels","keys","reduce","convertedData","panelName","panel","enabled","inactivePanels","push","opened","openPanels","convertLegacyLocalStorageData","userId","unparsedData","getLegacyData","moveIndividualPreference","_state$preferencesSto","_sourceEnableItems$si","_sourceEnableItems$mu","sourceEnableItems","enableItems","allPreferences","sourceComplementaryAreas","singleEnableItems","complementaryArea","preferencesWithConvertedComplementaryAreas","accumulator","sourcePinnedItems","multipleEnableItems","pinnedItems","allConvertedData","otherInterfaceItems","moveInterfaceEnableItems","interfaceScopes","interfaceScopeKeys","length","convertedState","startsWith","existingMigratedData","otherPreferencesScopes","moveThirdPartyFeaturePreferences","convertLegacyData","convertPreferencesPackageData","stateAccumulator","scopeData","updatedScopeData","isComplementaryAreaVisible","_newData$coreEditPo","_newData$coreEditSi","forEach","setting","core","convertEditorSettings","__unstableCreatePersistenceLayer","serverModified","localModified"],"sourceRoot":""}