2024-04-17 11:32:24 +02:00
/******/ ( ( ) => { // webpackBootstrap
2025-02-28 08:42:11 +01:00
/******/ "use strict" ;
2022-06-16 14:03:35 +02:00
/******/ var _ _webpack _modules _ _ = ( {
2024-04-17 11:32:24 +02:00
/***/ 7734 :
/***/ ( ( module ) => {
2023-04-26 17:39:43 +02:00
// do not edit .js files directly - edit src/index.jst
var envHasBigInt64Array = typeof BigInt64Array !== 'undefined' ;
module . exports = function equal ( a , b ) {
if ( a === b ) return true ;
if ( a && b && typeof a == 'object' && typeof b == 'object' ) {
if ( a . constructor !== b . constructor ) return false ;
var length , i , keys ;
if ( Array . isArray ( a ) ) {
length = a . length ;
if ( length != b . length ) return false ;
for ( i = length ; i -- !== 0 ; )
if ( ! equal ( a [ i ] , b [ i ] ) ) return false ;
return true ;
}
if ( ( a instanceof Map ) && ( b instanceof Map ) ) {
if ( a . size !== b . size ) return false ;
for ( i of a . entries ( ) )
if ( ! b . has ( i [ 0 ] ) ) return false ;
for ( i of a . entries ( ) )
if ( ! equal ( i [ 1 ] , b . get ( i [ 0 ] ) ) ) return false ;
return true ;
}
if ( ( a instanceof Set ) && ( b instanceof Set ) ) {
if ( a . size !== b . size ) return false ;
for ( i of a . entries ( ) )
if ( ! b . has ( i [ 0 ] ) ) return false ;
return true ;
}
if ( ArrayBuffer . isView ( a ) && ArrayBuffer . isView ( b ) ) {
length = a . length ;
if ( length != b . length ) return false ;
for ( i = length ; i -- !== 0 ; )
if ( a [ i ] !== b [ i ] ) return false ;
return true ;
}
if ( a . constructor === RegExp ) return a . source === b . source && a . flags === b . flags ;
if ( a . valueOf !== Object . prototype . valueOf ) return a . valueOf ( ) === b . valueOf ( ) ;
if ( a . toString !== Object . prototype . toString ) return a . toString ( ) === b . toString ( ) ;
keys = Object . keys ( a ) ;
length = keys . length ;
if ( length !== Object . keys ( b ) . length ) return false ;
for ( i = length ; i -- !== 0 ; )
if ( ! Object . prototype . hasOwnProperty . call ( b , keys [ i ] ) ) return false ;
for ( i = length ; i -- !== 0 ; ) {
var key = keys [ i ] ;
if ( ! equal ( a [ key ] , b [ key ] ) ) return false ;
}
return true ;
}
// true if both NaN, false otherwise
return a !== a && b !== b ;
} ;
2022-06-16 14:03:35 +02:00
/***/ } )
/******/ } ) ;
/************************************************************************/
2021-07-23 11:58:50 +02:00
/******/ // The module cache
2022-06-16 14:03:35 +02:00
/******/ var _ _webpack _module _cache _ _ = { } ;
/******/
2021-07-23 11:58:50 +02:00
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/ // Check if module is in cache
2022-06-16 14:03:35 +02:00
/******/ var cachedModule = _ _webpack _module _cache _ _ [ moduleId ] ;
/******/ if ( cachedModule !== undefined ) {
/******/ return cachedModule . exports ;
2021-07-23 11:58:50 +02:00
/******/ }
/******/ // Create a new module (and put it into the cache)
2022-06-16 14:03:35 +02:00
/******/ var module = _ _webpack _module _cache _ _ [ moduleId ] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
2021-07-23 11:58:50 +02:00
/******/ exports : { }
/******/ } ;
2022-06-16 14:03:35 +02:00
/******/
2021-07-23 11:58:50 +02:00
/******/ // Execute the module function
2022-06-16 14:03:35 +02:00
/******/ _ _webpack _modules _ _ [ moduleId ] ( module , module . exports , _ _webpack _require _ _ ) ;
/******/
2021-07-23 11:58:50 +02:00
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
2022-06-16 14:03:35 +02:00
/******/
2021-07-23 11:58:50 +02:00
/************************************************************************/
2022-06-16 14:03:35 +02:00
/******/ /* webpack/runtime/compat get default export */
2024-04-17 11:32:24 +02:00
/******/ ( ( ) => {
2022-06-16 14:03:35 +02:00
/******/ // getDefaultExport function for compatibility with non-harmony modules
2024-04-17 11:32:24 +02:00
/******/ _ _webpack _require _ _ . n = ( module ) => {
2022-06-16 14:03:35 +02:00
/******/ var getter = module && module . _ _esModule ?
2024-04-17 11:32:24 +02:00
/******/ ( ) => ( module [ 'default' ] ) :
/******/ ( ) => ( module ) ;
2022-06-16 14:03:35 +02:00
/******/ _ _webpack _require _ _ . d ( getter , { a : getter } ) ;
/******/ return getter ;
/******/ } ;
2024-04-17 11:32:24 +02:00
/******/ } ) ( ) ;
2022-06-16 14:03:35 +02:00
/******/
/******/ /* webpack/runtime/define property getters */
2024-04-17 11:32:24 +02:00
/******/ ( ( ) => {
2022-06-16 14:03:35 +02:00
/******/ // define getter functions for harmony exports
2024-04-17 11:32:24 +02:00
/******/ _ _webpack _require _ _ . d = ( exports , definition ) => {
2022-06-16 14:03:35 +02:00
/******/ for ( var key in definition ) {
/******/ if ( _ _webpack _require _ _ . o ( definition , key ) && ! _ _webpack _require _ _ . o ( exports , key ) ) {
/******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
/******/ }
/******/ }
/******/ } ;
2024-04-17 11:32:24 +02:00
/******/ } ) ( ) ;
2022-06-16 14:03:35 +02:00
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
2024-04-17 11:32:24 +02:00
/******/ ( ( ) => {
/******/ _ _webpack _require _ _ . o = ( obj , prop ) => ( Object . prototype . hasOwnProperty . call ( obj , prop ) )
/******/ } ) ( ) ;
2022-06-16 14:03:35 +02:00
/******/
/******/ /* webpack/runtime/make namespace object */
2024-04-17 11:32:24 +02:00
/******/ ( ( ) => {
2022-06-16 14:03:35 +02:00
/******/ // define __esModule on exports
2024-04-17 11:32:24 +02:00
/******/ _ _webpack _require _ _ . r = ( exports ) => {
2022-06-16 14:03:35 +02:00
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
2024-04-17 11:32:24 +02:00
/******/ } ) ( ) ;
2022-06-16 14:03:35 +02:00
/******/
/************************************************************************/
var _ _webpack _exports _ _ = { } ;
2021-07-23 11:58:50 +02:00
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
// EXPORTS
2022-06-16 14:03:35 +02:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
2024-04-17 11:32:24 +02:00
initialize : ( ) => ( /* binding */ initialize ) ,
store : ( ) => ( /* reexport */ store )
2022-06-16 14:03:35 +02:00
} ) ;
2021-07-23 11:58:50 +02:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
2022-06-16 14:03:35 +02:00
_ _webpack _require _ _ . d ( selectors _namespaceObject , {
2024-04-17 11:32:24 +02:00
_ _experimentalGetInsertionPoint : ( ) => ( _ _experimentalGetInsertionPoint ) ,
isInserterOpened : ( ) => ( isInserterOpened )
2022-06-16 14:03:35 +02:00
} ) ;
2021-07-23 11:58:50 +02:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
2022-06-16 14:03:35 +02:00
_ _webpack _require _ _ . d ( actions _namespaceObject , {
2024-04-17 11:32:24 +02:00
setIsInserterOpened : ( ) => ( setIsInserterOpened )
2022-06-16 14:03:35 +02:00
} ) ;
2022-04-02 10:26:41 +02:00
2025-12-12 13:15:55 +01:00
; // external "ReactJSXRuntime"
const external _ReactJSXRuntime _namespaceObject = window [ "ReactJSXRuntime" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","element"]
2024-04-17 11:32:24 +02:00
const external _wp _element _namespaceObject = window [ "wp" ] [ "element" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","blockLibrary"]
2024-04-17 11:32:24 +02:00
const external _wp _blockLibrary _namespaceObject = window [ "wp" ] [ "blockLibrary" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","widgets"]
2024-04-17 11:32:24 +02:00
const external _wp _widgets _namespaceObject = window [ "wp" ] [ "widgets" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","blocks"]
2024-04-17 11:32:24 +02:00
const external _wp _blocks _namespaceObject = window [ "wp" ] [ "blocks" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","data"]
2024-04-17 11:32:24 +02:00
const external _wp _data _namespaceObject = window [ "wp" ] [ "data" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","preferences"]
2024-04-17 11:32:24 +02:00
const external _wp _preferences _namespaceObject = window [ "wp" ] [ "preferences" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","components"]
2024-04-17 11:32:24 +02:00
const external _wp _components _namespaceObject = window [ "wp" ] [ "components" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","i18n"]
2024-04-17 11:32:24 +02:00
const external _wp _i18n _namespaceObject = window [ "wp" ] [ "i18n" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","blockEditor"]
2024-04-17 11:32:24 +02:00
const external _wp _blockEditor _namespaceObject = window [ "wp" ] [ "blockEditor" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","compose"]
2024-04-17 11:32:24 +02:00
const external _wp _compose _namespaceObject = window [ "wp" ] [ "compose" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","hooks"]
2024-04-17 11:32:24 +02:00
const external _wp _hooks _namespaceObject = window [ "wp" ] [ "hooks" ] ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/error-boundary/index.js
2022-04-02 10:26:41 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
function CopyButton ( { text , children } ) {
2022-06-16 14:03:35 +02:00
const ref = ( 0 , external _wp _compose _namespaceObject . useCopyToClipboard ) ( text ) ;
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Button , { size : "compact" , variant : "secondary" , ref , children } ) ;
2022-04-02 10:26:41 +02:00
}
2022-06-16 14:03:35 +02:00
class ErrorBoundary extends external _wp _element _namespaceObject . Component {
2022-04-02 10:26:41 +02:00
constructor ( ) {
super ( ... arguments ) ;
this . state = {
error : null
} ;
}
componentDidCatch ( error ) {
2025-12-12 13:15:55 +01:00
this . setState ( { error } ) ;
( 0 , external _wp _hooks _namespaceObject . doAction ) ( "editor.ErrorBoundary.errorLogged" , error ) ;
2022-04-02 10:26:41 +02:00
}
render ( ) {
2025-12-12 13:15:55 +01:00
const { error } = this . state ;
2022-04-02 10:26:41 +02:00
if ( ! error ) {
return this . props . children ;
}
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _blockEditor _namespaceObject . Warning ,
{
className : "customize-widgets-error-boundary" ,
actions : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( CopyButton , { text : error . stack , children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Copy Error" ) } , "copy-error" )
] ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "The editor has encountered an unexpected error." )
}
) ;
2022-04-02 10:26:41 +02:00
}
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // external ["wp","coreData"]
2024-04-17 11:32:24 +02:00
const external _wp _coreData _namespaceObject = window [ "wp" ] [ "coreData" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","mediaUtils"]
2024-04-17 11:32:24 +02:00
const external _wp _mediaUtils _namespaceObject = window [ "wp" ] [ "mediaUtils" ] ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/block-inspector-button/index.js
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
function BlockInspectorButton ( { inspector , closeMenu , ... props } ) {
const selectedBlockClientId = ( 0 , external _wp _data _namespaceObject . useSelect ) (
( select ) => select ( external _wp _blockEditor _namespaceObject . store ) . getSelectedBlockClientId ( ) ,
[ ]
) ;
const selectedBlock = ( 0 , external _wp _element _namespaceObject . useMemo ) (
( ) => document . getElementById ( ` block- ${ selectedBlockClientId } ` ) ,
[ selectedBlockClientId ]
) ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . MenuItem ,
{
onClick : ( ) => {
inspector . open ( {
returnFocusWhenClose : selectedBlock
} ) ;
closeMenu ( ) ;
} ,
... props ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Show more settings" )
}
) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
var block _inspector _button _default = BlockInspectorButton ;
2021-07-23 11:58:50 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/clsx/dist/clsx.mjs
2025-02-28 08:42:11 +01:00
function r ( e ) { var t , f , n = "" ; if ( "string" == typeof e || "number" == typeof e ) n += e ; else if ( "object" == typeof e ) if ( Array . isArray ( e ) ) { var o = e . length ; for ( t = 0 ; t < o ; t ++ ) e [ t ] && ( f = r ( e [ t ] ) ) && ( n && ( n += " " ) , n += f ) } else for ( f in e ) e [ f ] && ( n && ( n += " " ) , n += f ) ; return n } function clsx ( ) { for ( var e , t , f = 0 , n = "" , o = arguments . length ; f < o ; f ++ ) ( e = arguments [ f ] ) && ( t = r ( e ) ) && ( n && ( n += " " ) , n += t ) ; return n } /* harmony default export */ const dist _clsx = ( clsx ) ;
2025-04-25 12:30:07 +02:00
; // external ["wp","keycodes"]
2024-04-17 11:32:24 +02:00
const external _wp _keycodes _namespaceObject = window [ "wp" ] [ "keycodes" ] ;
2025-04-25 12:30:07 +02:00
; // external ["wp","primitives"]
2024-04-17 11:32:24 +02:00
const external _wp _primitives _namespaceObject = window [ "wp" ] [ "primitives" ] ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/icons/build-module/library/undo.js
2022-06-16 14:03:35 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
var undo _default = /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , { xmlns : "http://www.w3.org/2000/svg" , viewBox : "0 0 24 24" , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , { d : "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z" } ) } ) ;
2022-06-16 14:03:35 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/icons/build-module/library/redo.js
2022-06-16 14:03:35 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
var redo _default = /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , { xmlns : "http://www.w3.org/2000/svg" , viewBox : "0 0 24 24" , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , { d : "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z" } ) } ) ;
2021-07-23 11:58:50 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/icons/build-module/library/plus.js
2022-06-16 14:03:35 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
var plus _default = /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , { xmlns : "http://www.w3.org/2000/svg" , viewBox : "0 0 24 24" , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , { d : "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" } ) } ) ;
2021-07-23 11:58:50 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/icons/build-module/library/close-small.js
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
var close _small _default = /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , { xmlns : "http://www.w3.org/2000/svg" , viewBox : "0 0 24 24" , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , { d : "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z" } ) } ) ;
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/store/reducer.js
2023-12-07 09:44:11 +01:00
2023-09-26 10:33:34 +02:00
function blockInserterPanel ( state = false , action ) {
2022-04-02 10:26:41 +02:00
switch ( action . type ) {
2025-12-12 13:15:55 +01:00
case "SET_IS_INSERTER_OPENED" :
2022-04-02 10:26:41 +02:00
return action . value ;
2021-07-23 11:58:50 +02:00
}
2022-04-02 10:26:41 +02:00
return state ;
}
2025-12-12 13:15:55 +01:00
var reducer _default = ( 0 , external _wp _data _namespaceObject . combineReducers ) ( {
2022-04-02 10:26:41 +02:00
blockInserterPanel
2025-12-12 13:15:55 +01:00
} ) ;
2021-07-23 11:58:50 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/store/selectors.js
2023-12-07 09:44:11 +01:00
const EMPTY _INSERTION _POINT = {
2025-12-12 13:15:55 +01:00
rootClientId : void 0 ,
insertionIndex : void 0
2023-12-07 09:44:11 +01:00
} ;
2022-06-16 14:03:35 +02:00
function isInserterOpened ( state ) {
2022-04-02 10:26:41 +02:00
return ! ! state . blockInserterPanel ;
}
function _ _experimentalGetInsertionPoint ( state ) {
2025-12-12 13:15:55 +01:00
if ( typeof state . blockInserterPanel === "boolean" ) {
2023-12-07 09:44:11 +01:00
return EMPTY _INSERTION _POINT ;
}
return state . blockInserterPanel ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/store/actions.js
2022-06-16 14:03:35 +02:00
function setIsInserterOpened ( value ) {
2021-07-23 11:58:50 +02:00
return {
2025-12-12 13:15:55 +01:00
type : "SET_IS_INSERTER_OPENED" ,
2022-04-02 10:26:41 +02:00
value
2021-07-23 11:58:50 +02:00
} ;
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/store/constants.js
const STORE _NAME = "core/customize-widgets" ;
2021-07-23 11:58:50 +02:00
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/store/index.js
2021-07-23 11:58:50 +02:00
const storeConfig = {
2025-12-12 13:15:55 +01:00
reducer : reducer _default ,
2021-07-23 11:58:50 +02:00
selectors : selectors _namespaceObject ,
2022-04-02 10:26:41 +02:00
actions : actions _namespaceObject
2021-07-23 11:58:50 +02:00
} ;
2022-06-16 14:03:35 +02:00
const store = ( 0 , external _wp _data _namespaceObject . createReduxStore ) ( STORE _NAME , storeConfig ) ;
( 0 , external _wp _data _namespaceObject . register ) ( store ) ;
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/index.js
2021-07-23 11:58:50 +02:00
2022-04-02 10:26:41 +02:00
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
function Inserter ( { setIsOpened } ) {
const inserterTitleId = ( 0 , external _wp _compose _namespaceObject . useInstanceId ) (
Inserter ,
"customize-widget-layout__inserter-panel-title"
) ;
const insertionPoint = ( 0 , external _wp _data _namespaceObject . useSelect ) (
( select ) => select ( store ) . _ _experimentalGetInsertionPoint ( ) ,
[ ]
) ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) (
"div" ,
{
className : "customize-widgets-layout__inserter-panel" ,
"aria-labelledby" : inserterTitleId ,
children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , { className : "customize-widgets-layout__inserter-panel-header" , children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
"h2" ,
{
id : inserterTitleId ,
className : "customize-widgets-layout__inserter-panel-header-title" ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Add a block" )
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . Button ,
{
size : "small" ,
icon : close _small _default ,
onClick : ( ) => setIsOpened ( false ) ,
"aria-label" : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Close inserter" )
}
)
] } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , { className : "customize-widgets-layout__inserter-panel-content" , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _blockEditor _namespaceObject . _ _experimentalLibrary ,
{
rootClientId : insertionPoint . rootClientId ,
_ _experimentalInsertionIndex : insertionPoint . insertionIndex ,
showInserterHelpPanel : true ,
onSelect : ( ) => setIsOpened ( false )
}
) } )
]
}
) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
var inserter _default = Inserter ;
2022-04-02 10:26:41 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
2021-07-23 11:58:50 +02:00
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
var more _vertical _default = /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , { xmlns : "http://www.w3.org/2000/svg" , viewBox : "0 0 24 24" , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , { d : "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" } ) } ) ;
2023-12-07 09:44:11 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/icons/build-module/library/external.js
2022-06-16 14:03:35 +02:00
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
var external _default = /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . SVG , { xmlns : "http://www.w3.org/2000/svg" , viewBox : "0 0 24 24" , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _primitives _namespaceObject . Path , { d : "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z" } ) } ) ;
2022-06-16 14:03:35 +02:00
2025-04-25 12:30:07 +02:00
; // external ["wp","keyboardShortcuts"]
2025-02-28 08:42:11 +01:00
const external _wp _keyboardShortcuts _namespaceObject = window [ "wp" ] [ "keyboardShortcuts" ] ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/config.js
2025-12-12 13:15:55 +01:00
const textFormattingShortcuts = [
{
keyCombination : { modifier : "primary" , character : "b" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Make the selected text bold." )
2022-06-16 14:03:35 +02:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : { modifier : "primary" , character : "i" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Make the selected text italic." )
2022-06-16 14:03:35 +02:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : { modifier : "primary" , character : "k" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Convert the selected text into a link." )
2022-06-16 14:03:35 +02:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : { modifier : "primaryShift" , character : "k" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Remove a link." )
2022-12-15 17:47:31 +01:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : { character : "[[" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Insert a link to a post or page." )
2022-06-16 14:03:35 +02:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : { modifier : "primary" , character : "u" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Underline the selected text." )
2022-12-15 17:47:31 +01:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : { modifier : "access" , character : "d" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Strikethrough the selected text." )
2022-12-15 17:47:31 +01:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : { modifier : "access" , character : "x" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Make the selected text inline code." )
2023-09-26 10:33:34 +02:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : {
modifier : "access" ,
character : "0"
} ,
aliases : [
{
modifier : "access" ,
character : "7"
}
] ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Convert the current heading to a paragraph." )
2023-09-26 10:33:34 +02:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : { modifier : "access" , character : "1-6" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Convert the current paragraph or heading to a heading of level 1 to 6."
)
2025-02-28 08:42:11 +01:00
} ,
2025-12-12 13:15:55 +01:00
{
keyCombination : { modifier : "primaryShift" , character : "SPACE" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Add non breaking space." )
}
] ;
2022-06-16 14:03:35 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.js
2022-06-16 14:03:35 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
function KeyCombination ( { keyCombination , forceAriaLabel } ) {
const shortcut = keyCombination . modifier ? external _wp _keycodes _namespaceObject . displayShortcutList [ keyCombination . modifier ] (
keyCombination . character
) : keyCombination . character ;
const ariaLabel = keyCombination . modifier ? external _wp _keycodes _namespaceObject . shortcutAriaLabel [ keyCombination . modifier ] (
keyCombination . character
) : keyCombination . character ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
"kbd" ,
{
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination" ,
"aria-label" : forceAriaLabel || ariaLabel ,
children : ( Array . isArray ( shortcut ) ? shortcut : [ shortcut ] ) . map (
( character , index ) => {
if ( character === "+" ) {
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _element _namespaceObject . Fragment , { children : character } , index ) ;
}
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
"kbd" ,
{
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-key" ,
children : character
} ,
index
) ;
}
)
}
) ;
2022-06-16 14:03:35 +02:00
}
2025-12-12 13:15:55 +01:00
function Shortcut ( { description , keyCombination , aliases = [ ] , ariaLabel } ) {
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , { children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , { className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-description" , children : description } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , { className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-term" , children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
KeyCombination ,
{
keyCombination ,
forceAriaLabel : ariaLabel
}
) ,
aliases . map ( ( alias , index ) => /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
KeyCombination ,
{
keyCombination : alias ,
forceAriaLabel : ariaLabel
} ,
index
) )
] } )
] } ) ;
2022-06-16 14:03:35 +02:00
}
2025-12-12 13:15:55 +01:00
var shortcut _default = Shortcut ;
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
2022-06-16 14:03:35 +02:00
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
function DynamicShortcut ( { name } ) {
const { keyCombination , description , aliases } = ( 0 , external _wp _data _namespaceObject . useSelect ) (
( select ) => {
const {
getShortcutKeyCombination ,
getShortcutDescription ,
getShortcutAliases
} = select ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
return {
keyCombination : getShortcutKeyCombination ( name ) ,
aliases : getShortcutAliases ( name ) ,
description : getShortcutDescription ( name )
} ;
} ,
[ name ]
) ;
2021-07-23 11:58:50 +02:00
if ( ! keyCombination ) {
return null ;
}
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
shortcut _default ,
{
keyCombination ,
description ,
aliases
}
) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
var dynamic _shortcut _default = DynamicShortcut ;
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcut-help-modal/index.js
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const ShortcutList = ( { shortcuts } ) => (
/ *
* Disable reason : The ` list ` ARIA role is redundant but
* Safari + VoiceOver won ' t announce the list otherwise .
* /
/* eslint-disable jsx-a11y/no-redundant-roles */
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
"ul" ,
{
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut-list" ,
role : "list" ,
children : shortcuts . map ( ( shortcut , index ) => /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
"li" ,
{
className : "customize-widgets-keyboard-shortcut-help-modal__shortcut" ,
children : typeof shortcut === "string" ? /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( dynamic _shortcut _default , { name : shortcut } ) : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( shortcut _default , { ... shortcut } )
} ,
index
) )
}
)
) ;
const ShortcutSection = ( { title , shortcuts , className } ) => /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) (
"section" ,
{
className : dist _clsx (
"customize-widgets-keyboard-shortcut-help-modal__section" ,
className
) ,
children : [
! ! title && /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h2" , { className : "customize-widgets-keyboard-shortcut-help-modal__section-title" , children : title } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ShortcutList , { shortcuts } )
]
}
) ;
2023-09-26 10:33:34 +02:00
const ShortcutCategorySection = ( {
title ,
categoryName ,
additionalShortcuts = [ ]
} ) => {
2025-12-12 13:15:55 +01:00
const categoryShortcuts = ( 0 , external _wp _data _namespaceObject . useSelect ) (
( select ) => {
return select ( external _wp _keyboardShortcuts _namespaceObject . store ) . getCategoryShortcuts (
categoryName
) ;
} ,
[ categoryName ]
) ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
ShortcutSection ,
{
title ,
shortcuts : categoryShortcuts . concat ( additionalShortcuts )
}
) ;
2021-07-23 11:58:50 +02:00
} ;
2023-09-26 10:33:34 +02:00
function KeyboardShortcutHelpModal ( {
isModalActive ,
toggleModal
} ) {
2025-12-12 13:15:55 +01:00
const { registerShortcut } = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
registerShortcut ( {
name : "core/customize-widgets/keyboard-shortcuts" ,
category : "main" ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Display these keyboard shortcuts." ) ,
keyCombination : {
modifier : "access" ,
character : "h"
}
} ) ;
} , [ registerShortcut ] ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( "core/customize-widgets/keyboard-shortcuts" , toggleModal ) ;
2021-07-23 11:58:50 +02:00
if ( ! isModalActive ) {
return null ;
}
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) (
external _wp _components _namespaceObject . Modal ,
{
className : "customize-widgets-keyboard-shortcut-help-modal" ,
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Keyboard shortcuts" ) ,
onRequestClose : toggleModal ,
children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
ShortcutSection ,
{
className : "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts" ,
shortcuts : [ "core/customize-widgets/keyboard-shortcuts" ]
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
ShortcutCategorySection ,
{
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Global shortcuts" ) ,
categoryName : "global"
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
ShortcutCategorySection ,
{
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Selection shortcuts" ) ,
categoryName : "selection"
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
ShortcutCategorySection ,
{
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Block shortcuts" ) ,
categoryName : "block" ,
additionalShortcuts : [
{
keyCombination : { character : "/" } ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Change the block type after adding a new paragraph."
) ,
/* translators: The forward-slash character. e.g. '/'. */
ariaLabel : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Forward-slash" )
}
]
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
ShortcutSection ,
{
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Text formatting" ) ,
shortcuts : textFormattingShortcuts
}
)
]
}
) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/more-menu/index.js
2021-07-23 11:58:50 +02:00
2022-04-02 10:26:41 +02:00
2022-06-16 14:03:35 +02:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2021-07-23 11:58:50 +02:00
function MoreMenu ( ) {
2025-12-12 13:15:55 +01:00
const [
isKeyboardShortcutsModalActive ,
setIsKeyboardShortcutsModalVisible
] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
2021-07-23 11:58:50 +02:00
const toggleKeyboardShortcutsModal = ( ) => setIsKeyboardShortcutsModalVisible ( ! isKeyboardShortcutsModalActive ) ;
2025-12-12 13:15:55 +01:00
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) (
"core/customize-widgets/keyboard-shortcuts" ,
toggleKeyboardShortcutsModal
) ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , { children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . ToolbarDropdownMenu ,
{
icon : more _vertical _default ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Options" ) ,
popoverProps : {
placement : "bottom-end" ,
className : "more-menu-dropdown__content"
} ,
toggleProps : {
tooltipPosition : "bottom" ,
size : "compact"
} ,
children : ( ) => /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , { children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . MenuGroup , { label : ( 0 , external _wp _i18n _namespaceObject . _x ) ( "View" , "noun" ) , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _preferences _namespaceObject . PreferenceToggleMenuItem ,
{
scope : "core/customize-widgets" ,
name : "fixedToolbar" ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Top toolbar" ) ,
info : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Access all block and document tools in a single place"
) ,
messageActivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Top toolbar activated"
) ,
messageDeactivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Top toolbar deactivated"
)
}
) } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _wp _components _namespaceObject . MenuGroup , { label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Tools" ) , children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . MenuItem ,
{
onClick : ( ) => {
setIsKeyboardShortcutsModalVisible ( true ) ;
} ,
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . access ( "h" ) ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Keyboard shortcuts" )
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _preferences _namespaceObject . PreferenceToggleMenuItem ,
{
scope : "core/customize-widgets" ,
name : "welcomeGuide" ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Welcome Guide" )
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) (
external _wp _components _namespaceObject . MenuItem ,
{
role : "menuitem" ,
icon : external _default ,
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"https://wordpress.org/documentation/article/block-based-widgets-editor/"
) ,
target : "_blank" ,
rel : "noopener noreferrer" ,
children : [
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Help" ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . VisuallyHidden , {
as : "span" ,
/* translators: accessibility text */
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "(opens in a new tab)" )
} )
]
}
)
] } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . MenuGroup , { label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Preferences" ) , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _preferences _namespaceObject . PreferenceToggleMenuItem ,
{
scope : "core/customize-widgets" ,
name : "keepCaretInsideBlock" ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Contain text cursor inside block"
) ,
info : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Aids screen readers by stopping text caret from leaving blocks."
) ,
messageActivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Contain text cursor inside block activated"
) ,
messageDeactivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Contain text cursor inside block deactivated"
)
}
) } )
] } )
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
KeyboardShortcutHelpModal ,
{
isModalActive : isKeyboardShortcutsModalActive ,
toggleModal : toggleKeyboardShortcutsModal
}
)
] } ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/header/index.js
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2023-09-26 10:33:34 +02:00
function Header ( {
sidebar ,
inserter ,
isInserterOpened ,
setIsInserterOpened ,
isFixedToolbarActive
} ) {
2025-12-12 13:15:55 +01:00
const [ [ hasUndo , hasRedo ] , setUndoRedo ] = ( 0 , external _wp _element _namespaceObject . useState ) ( [
sidebar . hasUndo ( ) ,
sidebar . hasRedo ( )
] ) ;
const shortcut = ( 0 , external _wp _keycodes _namespaceObject . isAppleOS ) ( ) ? external _wp _keycodes _namespaceObject . displayShortcut . primaryShift ( "z" ) : external _wp _keycodes _namespaceObject . displayShortcut . primary ( "y" ) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-07-23 11:58:50 +02:00
return sidebar . subscribeHistory ( ( ) => {
setUndoRedo ( [ sidebar . hasUndo ( ) , sidebar . hasRedo ( ) ] ) ;
} ) ;
} , [ sidebar ] ) ;
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , { children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
"div" ,
{
className : dist _clsx ( "customize-widgets-header" , {
"is-fixed-toolbar-active" : isFixedToolbarActive
} ) ,
children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) (
external _wp _blockEditor _namespaceObject . NavigableToolbar ,
{
className : "customize-widgets-header-toolbar" ,
"aria-label" : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Document tools" ) ,
children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . ToolbarButton ,
{
icon : ! ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? undo _default : redo _default ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Undo" ) ,
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . primary ( "z" ) ,
disabled : ! hasUndo ,
onClick : sidebar . undo ,
className : "customize-widgets-editor-history-button undo-button"
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . ToolbarButton ,
{
icon : ! ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? redo _default : undo _default ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Redo" ) ,
shortcut ,
disabled : ! hasRedo ,
onClick : sidebar . redo ,
className : "customize-widgets-editor-history-button redo-button"
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . ToolbarButton ,
{
className : "customize-widgets-header-toolbar__inserter-toggle" ,
isPressed : isInserterOpened ,
variant : "primary" ,
icon : plus _default ,
label : ( 0 , external _wp _i18n _namespaceObject . _x ) (
"Add block" ,
"Generic label for block inserter button"
) ,
onClick : ( ) => {
setIsInserterOpened ( ( isOpen ) => ! isOpen ) ;
}
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( MoreMenu , { } )
]
2025-02-28 08:42:11 +01:00
}
2025-12-12 13:15:55 +01:00
)
}
) ,
( 0 , external _wp _element _namespaceObject . createPortal ) (
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( inserter _default , { setIsOpened : setIsInserterOpened } ) ,
inserter . contentContainer [ 0 ]
)
] } ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
var header _default = Header ;
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/use-inserter.js
2022-04-02 10:26:41 +02:00
2023-12-07 09:44:11 +01:00
2022-04-02 10:26:41 +02:00
2021-07-23 11:58:50 +02:00
function useInserter ( inserter ) {
2025-12-12 13:15:55 +01:00
const isInserterOpened = ( 0 , external _wp _data _namespaceObject . useSelect ) (
( select ) => select ( store ) . isInserterOpened ( ) ,
[ ]
) ;
const { setIsInserterOpened } = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2022-04-02 10:26:41 +02:00
if ( isInserterOpened ) {
inserter . open ( ) ;
} else {
inserter . close ( ) ;
}
} , [ inserter , isInserterOpened ] ) ;
2025-12-12 13:15:55 +01:00
return [
isInserterOpened ,
( 0 , external _wp _element _namespaceObject . useCallback ) (
( updater ) => {
let isOpen = updater ;
if ( typeof updater === "function" ) {
isOpen = updater (
( 0 , external _wp _data _namespaceObject . select ) ( store ) . isInserterOpened ( )
) ;
}
setIsInserterOpened ( isOpen ) ;
} ,
[ setIsInserterOpened ]
)
] ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
2023-04-26 17:39:43 +02:00
// EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js
2024-04-17 11:32:24 +02:00
var es6 = _ _webpack _require _ _ ( 7734 ) ;
2023-04-26 17:39:43 +02:00
var es6 _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( es6 ) ;
2025-04-25 12:30:07 +02:00
; // external ["wp","isShallowEqual"]
2024-04-17 11:32:24 +02:00
const external _wp _isShallowEqual _namespaceObject = window [ "wp" ] [ "isShallowEqual" ] ;
2022-06-16 14:03:35 +02:00
var external _wp _isShallowEqual _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _isShallowEqual _namespaceObject ) ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/utils.js
2021-07-23 11:58:50 +02:00
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
function settingIdToWidgetId ( settingId ) {
const matches = settingId . match ( /^widget_(.+)(?:\[(\d+)\])$/ ) ;
if ( matches ) {
const idBase = matches [ 1 ] ;
const number = parseInt ( matches [ 2 ] , 10 ) ;
return ` ${ idBase } - ${ number } ` ;
}
return settingId ;
}
2023-09-26 10:33:34 +02:00
function blockToWidget ( block , existingWidget = null ) {
2021-07-23 11:58:50 +02:00
let widget ;
2025-12-12 13:15:55 +01:00
const isValidLegacyWidgetBlock = block . name === "core/legacy-widget" && ( block . attributes . id || block . attributes . instance ) ;
2021-07-23 11:58:50 +02:00
if ( isValidLegacyWidgetBlock ) {
if ( block . attributes . id ) {
widget = {
id : block . attributes . id
} ;
} else {
2025-12-12 13:15:55 +01:00
const { encoded , hash , raw , ... rest } = block . attributes . instance ;
2021-07-23 11:58:50 +02:00
widget = {
idBase : block . attributes . idBase ,
2023-12-07 09:44:11 +01:00
instance : {
... existingWidget ? . instance ,
2021-07-23 11:58:50 +02:00
// Required only for the customizer.
is _widget _customizer _js _value : true ,
encoded _serialized _instance : encoded ,
instance _hash _key : hash ,
raw _instance : raw ,
... rest
}
} ;
}
} else {
const instance = {
2022-06-16 14:03:35 +02:00
content : ( 0 , external _wp _blocks _namespaceObject . serialize ) ( block )
2021-07-23 11:58:50 +02:00
} ;
widget = {
2025-12-12 13:15:55 +01:00
idBase : "block" ,
widgetClass : "WP_Widget_Block" ,
2021-07-23 11:58:50 +02:00
instance : {
raw _instance : instance
}
} ;
}
2025-12-12 13:15:55 +01:00
const { form , rendered , ... restExistingWidget } = existingWidget || { } ;
2023-12-07 09:44:11 +01:00
return {
... restExistingWidget ,
2021-07-23 11:58:50 +02:00
... widget
} ;
}
2025-12-12 13:15:55 +01:00
function widgetToBlock ( { id , idBase , number , instance } ) {
2021-07-23 11:58:50 +02:00
let block ;
const {
encoded _serialized _instance : encoded ,
instance _hash _key : hash ,
raw _instance : raw ,
... rest
} = instance ;
2025-12-12 13:15:55 +01:00
if ( idBase === "block" ) {
const parsedBlocks = ( 0 , external _wp _blocks _namespaceObject . parse ) ( raw . content ? ? "" , {
2022-12-15 17:47:31 +01:00
_ _unstableSkipAutop : true
} ) ;
2025-12-12 13:15:55 +01:00
block = parsedBlocks . length ? parsedBlocks [ 0 ] : ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( "core/paragraph" , { } ) ;
2021-07-23 11:58:50 +02:00
} else if ( number ) {
2025-12-12 13:15:55 +01:00
block = ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( "core/legacy-widget" , {
2021-07-23 11:58:50 +02:00
idBase ,
instance : {
encoded ,
hash ,
raw ,
... rest
}
} ) ;
} else {
2025-12-12 13:15:55 +01:00
block = ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( "core/legacy-widget" , {
2021-07-23 11:58:50 +02:00
id
} ) ;
}
2022-06-16 14:03:35 +02:00
return ( 0 , external _wp _widgets _namespaceObject . addWidgetIdToBlock ) ( block , id ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js
2021-07-23 11:58:50 +02:00
function widgetsToBlocks ( widgets ) {
2025-12-12 13:15:55 +01:00
return widgets . map ( ( widget ) => widgetToBlock ( widget ) ) ;
2021-07-23 11:58:50 +02:00
}
function useSidebarBlockEditor ( sidebar ) {
2025-12-12 13:15:55 +01:00
const [ blocks , setBlocks ] = ( 0 , external _wp _element _namespaceObject . useState ) (
( ) => widgetsToBlocks ( sidebar . getWidgets ( ) )
) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-07-23 11:58:50 +02:00
return sidebar . subscribe ( ( prevWidgets , nextWidgets ) => {
2025-12-12 13:15:55 +01:00
setBlocks ( ( prevBlocks ) => {
const prevWidgetsMap = new Map (
prevWidgets . map ( ( widget ) => [ widget . id , widget ] )
) ;
const prevBlocksMap = new Map (
prevBlocks . map ( ( block ) => [
( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) ,
block
] )
) ;
const nextBlocks = nextWidgets . map ( ( nextWidget ) => {
2023-12-07 09:44:11 +01:00
const prevWidget = prevWidgetsMap . get ( nextWidget . id ) ;
2021-07-23 11:58:50 +02:00
if ( prevWidget && prevWidget === nextWidget ) {
return prevBlocksMap . get ( nextWidget . id ) ;
}
return widgetToBlock ( nextWidget ) ;
2023-12-07 09:44:11 +01:00
} ) ;
2021-07-23 11:58:50 +02:00
if ( external _wp _isShallowEqual _default ( ) ( prevBlocks , nextBlocks ) ) {
return prevBlocks ;
}
return nextBlocks ;
} ) ;
} ) ;
} , [ sidebar ] ) ;
2025-12-12 13:15:55 +01:00
const onChangeBlocks = ( 0 , external _wp _element _namespaceObject . useCallback ) (
( nextBlocks ) => {
setBlocks ( ( prevBlocks ) => {
if ( external _wp _isShallowEqual _default ( ) ( prevBlocks , nextBlocks ) ) {
return prevBlocks ;
2023-12-07 09:44:11 +01:00
}
2025-12-12 13:15:55 +01:00
const prevBlocksMap = new Map (
prevBlocks . map ( ( block ) => [
( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) ,
block
] )
) ;
const nextWidgets = nextBlocks . map ( ( nextBlock ) => {
const widgetId = ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( nextBlock ) ;
if ( widgetId && prevBlocksMap . has ( widgetId ) ) {
const prevBlock = prevBlocksMap . get ( widgetId ) ;
const prevWidget = sidebar . getWidget ( widgetId ) ;
if ( es6 _default ( ) ( nextBlock , prevBlock ) && prevWidget ) {
return prevWidget ;
}
return blockToWidget ( nextBlock , prevWidget ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
return blockToWidget ( nextBlock ) ;
} ) ;
if ( external _wp _isShallowEqual _default ( ) ( sidebar . getWidgets ( ) , nextWidgets ) ) {
return prevBlocks ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
const addedWidgetIds = sidebar . setWidgets ( nextWidgets ) ;
return nextBlocks . reduce (
( updatedNextBlocks , nextBlock , index ) => {
const addedWidgetId = addedWidgetIds [ index ] ;
if ( addedWidgetId !== null ) {
if ( updatedNextBlocks === nextBlocks ) {
updatedNextBlocks = nextBlocks . slice ( ) ;
}
updatedNextBlocks [ index ] = ( 0 , external _wp _widgets _namespaceObject . addWidgetIdToBlock ) (
nextBlock ,
addedWidgetId
) ;
}
return updatedNextBlocks ;
} ,
nextBlocks
) ;
} ) ;
} ,
[ sidebar ]
) ;
2021-07-23 11:58:50 +02:00
return [ blocks , onChangeBlocks , onChangeBlocks ] ;
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/index.js
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2022-06-16 14:03:35 +02:00
const FocusControlContext = ( 0 , external _wp _element _namespaceObject . createContext ) ( ) ;
2025-12-12 13:15:55 +01:00
FocusControlContext . displayName = "FocusControlContext" ;
function FocusControl ( { api , sidebarControls , children } ) {
2022-06-16 14:03:35 +02:00
const [ focusedWidgetIdRef , setFocusedWidgetIdRef ] = ( 0 , external _wp _element _namespaceObject . useState ) ( {
2021-07-23 11:58:50 +02:00
current : null
} ) ;
2025-12-12 13:15:55 +01:00
const focusWidget = ( 0 , external _wp _element _namespaceObject . useCallback ) (
( widgetId ) => {
for ( const sidebarControl of sidebarControls ) {
const widgets = sidebarControl . setting . get ( ) ;
if ( widgets . includes ( widgetId ) ) {
sidebarControl . sectionInstance . expand ( {
// Schedule it after the complete callback so that
// it won't be overridden by the "Back" button focus.
completeCallback ( ) {
setFocusedWidgetIdRef ( { current : widgetId } ) ;
}
} ) ;
break ;
}
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
} ,
[ sidebarControls ]
) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-07-23 11:58:50 +02:00
function handleFocus ( settingId ) {
const widgetId = settingIdToWidgetId ( settingId ) ;
focusWidget ( widgetId ) ;
}
2023-09-26 10:33:34 +02:00
let previewBound = false ;
2021-07-23 11:58:50 +02:00
function handleReady ( ) {
2025-12-12 13:15:55 +01:00
api . previewer . preview . bind (
"focus-control-for-setting" ,
handleFocus
) ;
2023-09-26 10:33:34 +02:00
previewBound = true ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
api . previewer . bind ( "ready" , handleReady ) ;
2021-07-23 11:58:50 +02:00
return ( ) => {
2025-12-12 13:15:55 +01:00
api . previewer . unbind ( "ready" , handleReady ) ;
2023-09-26 10:33:34 +02:00
if ( previewBound ) {
2025-12-12 13:15:55 +01:00
api . previewer . preview . unbind (
"focus-control-for-setting" ,
handleFocus
) ;
2023-09-26 10:33:34 +02:00
}
2021-07-23 11:58:50 +02:00
} ;
} , [ api , focusWidget ] ) ;
2025-12-12 13:15:55 +01:00
const context = ( 0 , external _wp _element _namespaceObject . useMemo ) (
( ) => [ focusedWidgetIdRef , focusWidget ] ,
[ focusedWidgetIdRef , focusWidget ]
) ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( FocusControlContext . Provider , { value : context , children } ) ;
2021-07-23 11:58:50 +02:00
}
2022-06-16 14:03:35 +02:00
const useFocusControl = ( ) => ( 0 , external _wp _element _namespaceObject . useContext ) ( FocusControlContext ) ;
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.js
2021-07-23 11:58:50 +02:00
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
function useBlocksFocusControl ( blocks ) {
2025-12-12 13:15:55 +01:00
const { selectBlock } = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
2021-07-23 11:58:50 +02:00
const [ focusedWidgetIdRef ] = useFocusControl ( ) ;
2022-06-16 14:03:35 +02:00
const blocksRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( blocks ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-07-23 11:58:50 +02:00
blocksRef . current = blocks ;
} , [ blocks ] ) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-07-23 11:58:50 +02:00
if ( focusedWidgetIdRef . current ) {
2025-12-12 13:15:55 +01:00
const focusedBlock = blocksRef . current . find (
( block ) => ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( block ) === focusedWidgetIdRef . current
) ;
2021-07-23 11:58:50 +02:00
if ( focusedBlock ) {
2023-12-07 09:44:11 +01:00
selectBlock ( focusedBlock . clientId ) ;
2025-12-12 13:15:55 +01:00
const blockNode = document . querySelector (
` [data-block=" ${ focusedBlock . clientId } "] `
) ;
2023-09-26 10:33:34 +02:00
blockNode ? . focus ( ) ;
2021-07-23 11:58:50 +02:00
}
}
} , [ focusedWidgetIdRef , selectBlock ] ) ;
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // external ["wp","privateApis"]
2024-04-17 11:32:24 +02:00
const external _wp _privateApis _namespaceObject = window [ "wp" ] [ "privateApis" ] ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/lock-unlock.js
2023-04-26 17:39:43 +02:00
2025-12-12 13:15:55 +01:00
const { lock , unlock } = ( 0 , external _wp _privateApis _namespaceObject . _ _dangerousOptInToUnstableAPIsOnlyForCoreModules ) (
"I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress." ,
"@wordpress/customize-widgets"
) ;
2023-04-26 17:39:43 +02:00
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.js
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const { ExperimentalBlockEditorProvider } = unlock ( external _wp _blockEditor _namespaceObject . privateApis ) ;
2023-09-26 10:33:34 +02:00
function SidebarEditorProvider ( {
sidebar ,
settings ,
children
} ) {
2021-07-23 11:58:50 +02:00
const [ blocks , onInput , onChange ] = useSidebarBlockEditor ( sidebar ) ;
useBlocksFocusControl ( blocks ) ;
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
ExperimentalBlockEditorProvider ,
{
value : blocks ,
onInput ,
onChange ,
settings ,
useSubRegistry : false ,
children
}
) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/welcome-guide/index.js
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
function WelcomeGuide ( { sidebar } ) {
const { toggle } = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _preferences _namespaceObject . store ) ;
const isEntirelyBlockWidgets = sidebar . getWidgets ( ) . every ( ( widget ) => widget . id . startsWith ( "block-" ) ) ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "div" , { className : "customize-widgets-welcome-guide" , children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , { className : "customize-widgets-welcome-guide__image__wrapper" , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "picture" , { children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
"source" ,
{
2025-02-28 08:42:11 +01:00
srcSet : "https://s.w.org/images/block-editor/welcome-editor.svg" ,
media : "(prefers-reduced-motion: reduce)"
2025-12-12 13:15:55 +01:00
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
"img" ,
{
2025-02-28 08:42:11 +01:00
className : "customize-widgets-welcome-guide__image" ,
src : "https://s.w.org/images/block-editor/welcome-editor.gif" ,
width : "312" ,
height : "240" ,
alt : ""
2025-12-12 13:15:55 +01:00
}
)
] } ) } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "h1" , { className : "customize-widgets-welcome-guide__heading" , children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Welcome to block Widgets" ) } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "p" , { className : "customize-widgets-welcome-guide__text" , children : isEntirelyBlockWidgets ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"Your theme provides different \u201Cblock\u201D areas for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site."
) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"You can now add any block to your site\u2019s widget areas. Don\u2019t worry, all of your favorite widgets still work flawlessly."
) } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . Button ,
{
size : "compact" ,
variant : "primary" ,
onClick : ( ) => toggle ( "core/customize-widgets" , "welcomeGuide" ) ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Got it" )
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "hr" , { className : "customize-widgets-welcome-guide__separator" } ) ,
! isEntirelyBlockWidgets && /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "p" , { className : "customize-widgets-welcome-guide__more-info" , children : [
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Want to stick with the old widgets?" ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "br" , { } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . ExternalLink ,
{
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"https://wordpress.org/plugins/classic-widgets/"
) ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Get the Classic Widgets plugin." )
}
)
] } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( "p" , { className : "customize-widgets-welcome-guide__more-info" , children : [
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "New to the block editor?" ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "br" , { } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _components _namespaceObject . ExternalLink ,
{
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) (
"https://wordpress.org/documentation/article/wordpress-block-editor/"
) ,
children : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Here's a detailed guide." )
}
)
] } )
] } ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/keyboard-shortcuts/index.js
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
function KeyboardShortcuts ( { undo , redo , save } ) {
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( "core/customize-widgets/undo" , ( event ) => {
2021-07-23 11:58:50 +02:00
undo ( ) ;
event . preventDefault ( ) ;
} ) ;
2025-12-12 13:15:55 +01:00
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( "core/customize-widgets/redo" , ( event ) => {
2021-07-23 11:58:50 +02:00
redo ( ) ;
event . preventDefault ( ) ;
} ) ;
2025-12-12 13:15:55 +01:00
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( "core/customize-widgets/save" , ( event ) => {
2021-07-23 11:58:50 +02:00
event . preventDefault ( ) ;
save ( ) ;
} ) ;
return null ;
}
function KeyboardShortcutsRegister ( ) {
2025-12-12 13:15:55 +01:00
const { registerShortcut , unregisterShortcut } = ( 0 , external _wp _data _namespaceObject . useDispatch ) (
external _wp _keyboardShortcuts _namespaceObject . store
) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-07-23 11:58:50 +02:00
registerShortcut ( {
2025-12-12 13:15:55 +01:00
name : "core/customize-widgets/undo" ,
category : "global" ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Undo your last changes." ) ,
2021-07-23 11:58:50 +02:00
keyCombination : {
2025-12-12 13:15:55 +01:00
modifier : "primary" ,
character : "z"
2021-07-23 11:58:50 +02:00
}
} ) ;
registerShortcut ( {
2025-12-12 13:15:55 +01:00
name : "core/customize-widgets/redo" ,
category : "global" ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Redo your last undo." ) ,
2021-07-23 11:58:50 +02:00
keyCombination : {
2025-12-12 13:15:55 +01:00
modifier : "primaryShift" ,
character : "z"
2023-04-26 17:39:43 +02:00
} ,
// Disable on Apple OS because it conflicts with the browser's
// history shortcut. It's a fine alias for both Windows and Linux.
// Since there's no conflict for Ctrl+Shift+Z on both Windows and
// Linux, we keep it as the default for consistency.
2025-12-12 13:15:55 +01:00
aliases : ( 0 , external _wp _keycodes _namespaceObject . isAppleOS ) ( ) ? [ ] : [
{
modifier : "primary" ,
character : "y"
}
]
2021-07-23 11:58:50 +02:00
} ) ;
registerShortcut ( {
2025-12-12 13:15:55 +01:00
name : "core/customize-widgets/save" ,
category : "global" ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Save your changes." ) ,
2021-07-23 11:58:50 +02:00
keyCombination : {
2025-12-12 13:15:55 +01:00
modifier : "primary" ,
character : "s"
2021-07-23 11:58:50 +02:00
}
} ) ;
return ( ) => {
2025-12-12 13:15:55 +01:00
unregisterShortcut ( "core/customize-widgets/undo" ) ;
unregisterShortcut ( "core/customize-widgets/redo" ) ;
unregisterShortcut ( "core/customize-widgets/save" ) ;
2021-07-23 11:58:50 +02:00
} ;
} , [ registerShortcut ] ) ;
return null ;
}
KeyboardShortcuts . Register = KeyboardShortcutsRegister ;
2025-12-12 13:15:55 +01:00
var keyboard _shortcuts _default = KeyboardShortcuts ;
2021-07-23 11:58:50 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/block-appender/index.js
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2021-07-23 11:58:50 +02:00
function BlockAppender ( props ) {
2022-06-16 14:03:35 +02:00
const ref = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
2025-12-12 13:15:55 +01:00
const isBlocksListEmpty = ( 0 , external _wp _data _namespaceObject . useSelect ) (
( select ) => select ( external _wp _blockEditor _namespaceObject . store ) . getBlockCount ( ) === 0
) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-07-23 11:58:50 +02:00
if ( isBlocksListEmpty && ref . current ) {
2025-12-12 13:15:55 +01:00
const { ownerDocument } = ref . current ;
2021-07-23 11:58:50 +02:00
if ( ! ownerDocument . activeElement || ownerDocument . activeElement === ownerDocument . body ) {
ref . current . focus ( ) ;
}
}
} , [ isBlocksListEmpty ] ) ;
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . ButtonBlockAppender , { ... props , ref } ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/index.js
2021-07-23 11:58:50 +02:00
2023-12-07 09:44:11 +01:00
2024-04-17 11:32:24 +02:00
2025-02-28 08:42:11 +01:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const { ExperimentalBlockCanvas : BlockCanvas } = unlock (
external _wp _blockEditor _namespaceObject . privateApis
) ;
const { BlockKeyboardShortcuts } = unlock ( external _wp _blockLibrary _namespaceObject . privateApis ) ;
2023-09-26 10:33:34 +02:00
function SidebarBlockEditor ( {
blockEditorSettings ,
sidebar ,
inserter ,
inspector
} ) {
2021-07-23 11:58:50 +02:00
const [ isInserterOpened , setIsInserterOpened ] = useInserter ( inserter ) ;
2025-12-12 13:15:55 +01:00
const isMediumViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( "small" ) ;
2021-07-23 11:58:50 +02:00
const {
hasUploadPermissions ,
isFixedToolbarActive ,
keepCaretInsideBlock ,
isWelcomeGuideActive
2025-12-12 13:15:55 +01:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( ( select ) => {
const { get } = select ( external _wp _preferences _namespaceObject . store ) ;
2021-07-23 11:58:50 +02:00
return {
2025-12-12 13:15:55 +01:00
hasUploadPermissions : select ( external _wp _coreData _namespaceObject . store ) . canUser ( "create" , {
kind : "postType" ,
name : "attachment"
} ) ? ? true ,
isFixedToolbarActive : ! ! get (
"core/customize-widgets" ,
"fixedToolbar"
) ,
keepCaretInsideBlock : ! ! get (
"core/customize-widgets" ,
"keepCaretInsideBlock"
) ,
isWelcomeGuideActive : ! ! get (
"core/customize-widgets" ,
"welcomeGuide"
)
2021-07-23 11:58:50 +02:00
} ;
} , [ ] ) ;
2022-06-16 14:03:35 +02:00
const settings = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => {
2021-07-23 11:58:50 +02:00
let mediaUploadBlockEditor ;
if ( hasUploadPermissions ) {
2025-12-12 13:15:55 +01:00
mediaUploadBlockEditor = ( { onError , ... argumentsObject } ) => {
2022-06-16 14:03:35 +02:00
( 0 , external _wp _mediaUtils _namespaceObject . uploadMedia ) ( {
2021-07-23 11:58:50 +02:00
wpAllowedMimeTypes : blockEditorSettings . allowedMimeTypes ,
2025-12-12 13:15:55 +01:00
onError : ( { message } ) => onError ( message ) ,
2021-07-23 11:58:50 +02:00
... argumentsObject
} ) ;
} ;
}
2023-12-07 09:44:11 +01:00
return {
... blockEditorSettings ,
2021-07-23 11:58:50 +02:00
_ _experimentalSetIsInserterOpened : setIsInserterOpened ,
mediaUpload : mediaUploadBlockEditor ,
2024-04-17 11:32:24 +02:00
hasFixedToolbar : isFixedToolbarActive || ! isMediumViewport ,
2021-07-23 11:58:50 +02:00
keepCaretInsideBlock ,
2025-12-12 13:15:55 +01:00
editorTool : "edit" ,
2021-07-23 11:58:50 +02:00
_ _unstableHasCustomAppender : true
} ;
2025-12-12 13:15:55 +01:00
} , [
hasUploadPermissions ,
blockEditorSettings ,
isFixedToolbarActive ,
isMediumViewport ,
keepCaretInsideBlock ,
setIsInserterOpened
] ) ;
2021-07-23 11:58:50 +02:00
if ( isWelcomeGuideActive ) {
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( WelcomeGuide , { sidebar } ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , { children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( keyboard _shortcuts _default . Register , { } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( BlockKeyboardShortcuts , { } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( SidebarEditorProvider , { sidebar , settings , children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
keyboard _shortcuts _default ,
{
undo : sidebar . undo ,
redo : sidebar . redo ,
save : sidebar . save
}
) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
header _default ,
{
sidebar ,
inserter ,
isInserterOpened ,
setIsInserterOpened ,
isFixedToolbarActive : isFixedToolbarActive || ! isMediumViewport
}
) ,
( isFixedToolbarActive || ! isMediumViewport ) && /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockToolbar , { hideDragHandle : true } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
BlockCanvas ,
{
shouldIframe : false ,
styles : settings . defaultEditorStyles ,
height : "100%" ,
children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockList , { renderAppender : BlockAppender } )
}
) ,
( 0 , external _wp _element _namespaceObject . createPortal ) (
// This is a temporary hack to prevent button component inside <BlockInspector>
// from submitting form when type="button" is not specified.
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "form" , { onSubmit : ( event ) => event . preventDefault ( ) , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockInspector , { } ) } ) ,
inspector . contentContainer [ 0 ]
)
] } ) ,
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . _ _unstableBlockSettingsMenuFirstItem , { children : ( { onClose } ) => /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
block _inspector _button _default ,
{
inspector ,
2025-02-28 08:42:11 +01:00
closeMenu : onClose
2025-12-12 13:15:55 +01:00
}
) } )
] } ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-controls/index.js
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2022-06-16 14:03:35 +02:00
const SidebarControlsContext = ( 0 , external _wp _element _namespaceObject . createContext ) ( ) ;
2025-12-12 13:15:55 +01:00
SidebarControlsContext . displayName = "SidebarControlsContext" ;
2023-09-26 10:33:34 +02:00
function SidebarControls ( {
sidebarControls ,
activeSidebarControl ,
children
} ) {
2025-12-12 13:15:55 +01:00
const context = ( 0 , external _wp _element _namespaceObject . useMemo ) (
( ) => ( {
sidebarControls ,
activeSidebarControl
} ) ,
[ sidebarControls , activeSidebarControl ]
) ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( SidebarControlsContext . Provider , { value : context , children } ) ;
2021-07-23 11:58:50 +02:00
}
function useSidebarControls ( ) {
2025-12-12 13:15:55 +01:00
const { sidebarControls } = ( 0 , external _wp _element _namespaceObject . useContext ) ( SidebarControlsContext ) ;
2021-07-23 11:58:50 +02:00
return sidebarControls ;
}
function useActiveSidebarControl ( ) {
2025-12-12 13:15:55 +01:00
const { activeSidebarControl } = ( 0 , external _wp _element _namespaceObject . useContext ) ( SidebarControlsContext ) ;
2021-07-23 11:58:50 +02:00
return activeSidebarControl ;
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/use-clear-selected-block.js
2025-12-12 13:15:55 +01:00
2021-07-23 11:58:50 +02:00
function useClearSelectedBlock ( sidebarControl , popoverRef ) {
2025-12-12 13:15:55 +01:00
const { hasSelectedBlock , hasMultiSelection } = ( 0 , external _wp _data _namespaceObject . useSelect ) ( external _wp _blockEditor _namespaceObject . store ) ;
const { clearSelectedBlock } = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-07-23 11:58:50 +02:00
if ( popoverRef . current && sidebarControl ) {
2025-12-12 13:15:55 +01:00
let handleClearSelectedBlock = function ( element ) {
2023-12-07 09:44:11 +01:00
if (
2025-12-12 13:15:55 +01:00
// 1. Make sure there are blocks being selected.
( hasSelectedBlock ( ) || hasMultiSelection ( ) ) && // 2. The element should exist in the DOM (not deleted).
element && ownerDocument . contains ( element ) && // 3. It should also not exist in the container, the popover, nor the dialog.
! container . contains ( element ) && ! popoverRef . current . contains ( element ) && ! element . closest ( '[role="dialog"]' ) && // 4. The inspector should not be opened.
! inspector . expanded ( )
) {
2021-07-23 11:58:50 +02:00
clearSelectedBlock ( ) ;
}
2025-12-12 13:15:55 +01:00
} , handleMouseDown = function ( event ) {
2021-07-23 11:58:50 +02:00
handleClearSelectedBlock ( event . target ) ;
2025-12-12 13:15:55 +01:00
} , handleBlur = function ( ) {
2021-07-23 11:58:50 +02:00
handleClearSelectedBlock ( ownerDocument . activeElement ) ;
2025-12-12 13:15:55 +01:00
} ;
const inspector = sidebarControl . inspector ;
const container = sidebarControl . container [ 0 ] ;
const ownerDocument = container . ownerDocument ;
const ownerWindow = ownerDocument . defaultView ;
ownerDocument . addEventListener ( "mousedown" , handleMouseDown ) ;
ownerWindow . addEventListener ( "blur" , handleBlur ) ;
2021-07-23 11:58:50 +02:00
return ( ) => {
2025-12-12 13:15:55 +01:00
ownerDocument . removeEventListener (
"mousedown" ,
handleMouseDown
) ;
ownerWindow . removeEventListener ( "blur" , handleBlur ) ;
2021-07-23 11:58:50 +02:00
} ;
}
2025-12-12 13:15:55 +01:00
} , [
popoverRef ,
sidebarControl ,
hasSelectedBlock ,
hasMultiSelection ,
clearSelectedBlock
] ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/customize-widgets/index.js
2021-07-23 11:58:50 +02:00
2022-04-02 10:26:41 +02:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2023-09-26 10:33:34 +02:00
function CustomizeWidgets ( {
api ,
sidebarControls ,
blockEditorSettings
} ) {
2022-06-16 14:03:35 +02:00
const [ activeSidebarControl , setActiveSidebarControl ] = ( 0 , external _wp _element _namespaceObject . useState ) ( null ) ;
2025-12-12 13:15:55 +01:00
const parentContainer = document . getElementById (
"customize-theme-controls"
) ;
2022-06-16 14:03:35 +02:00
const popoverRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
2021-07-23 11:58:50 +02:00
useClearSelectedBlock ( activeSidebarControl , popoverRef ) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2025-12-12 13:15:55 +01:00
const unsubscribers = sidebarControls . map (
( sidebarControl ) => sidebarControl . subscribe ( ( expanded ) => {
if ( expanded ) {
setActiveSidebarControl ( sidebarControl ) ;
}
} )
) ;
2021-07-23 11:58:50 +02:00
return ( ) => {
2025-12-12 13:15:55 +01:00
unsubscribers . forEach ( ( unsubscriber ) => unsubscriber ( ) ) ;
2021-07-23 11:58:50 +02:00
} ;
} , [ sidebarControls ] ) ;
2025-12-12 13:15:55 +01:00
const activeSidebar = activeSidebarControl && ( 0 , external _wp _element _namespaceObject . createPortal ) (
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( ErrorBoundary , { children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
SidebarBlockEditor ,
{
blockEditorSettings ,
sidebar : activeSidebarControl . sidebarAdapter ,
inserter : activeSidebarControl . inserter ,
inspector : activeSidebarControl . inspector
} ,
activeSidebarControl . id
) } ) ,
activeSidebarControl . container [ 0 ]
) ;
const popover = parentContainer && ( 0 , external _wp _element _namespaceObject . createPortal ) (
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( "div" , { className : "customize-widgets-popover" , ref : popoverRef , children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . Popover . Slot , { } ) } ) ,
parentContainer
) ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _components _namespaceObject . SlotFillProvider , { children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
SidebarControls ,
{
sidebarControls ,
activeSidebarControl ,
children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( FocusControl , { api , sidebarControls , children : [
activeSidebar ,
popover
] } )
}
) } ) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/controls/inspector-section.js
2021-07-23 11:58:50 +02:00
function getInspectorSection ( ) {
const {
2025-12-12 13:15:55 +01:00
wp : { customize }
2021-07-23 11:58:50 +02:00
} = window ;
return class InspectorSection extends customize . Section {
constructor ( id , options ) {
super ( id , options ) ;
this . parentSection = options . parentSection ;
this . returnFocusWhenClose = null ;
2022-04-02 10:26:41 +02:00
this . _isOpen = false ;
}
get isOpen ( ) {
return this . _isOpen ;
}
set isOpen ( value ) {
this . _isOpen = value ;
this . triggerActiveCallbacks ( ) ;
2021-07-23 11:58:50 +02:00
}
ready ( ) {
2025-12-12 13:15:55 +01:00
this . contentContainer [ 0 ] . classList . add (
"customize-widgets-layout__inspector"
) ;
2021-07-23 11:58:50 +02:00
}
2022-04-02 10:26:41 +02:00
isContextuallyActive ( ) {
return this . isOpen ;
}
2021-07-23 11:58:50 +02:00
onChangeExpanded ( expanded , args ) {
super . onChangeExpanded ( expanded , args ) ;
if ( this . parentSection && ! args . unchanged ) {
if ( expanded ) {
this . parentSection . collapse ( {
manualTransition : true
} ) ;
} else {
this . parentSection . expand ( {
manualTransition : true ,
completeCallback : ( ) => {
2025-12-12 13:15:55 +01:00
if ( this . returnFocusWhenClose && ! this . contentContainer [ 0 ] . contains (
this . returnFocusWhenClose
) ) {
2021-07-23 11:58:50 +02:00
this . returnFocusWhenClose . focus ( ) ;
}
}
} ) ;
}
}
}
2025-12-12 13:15:55 +01:00
open ( { returnFocusWhenClose } = { } ) {
2022-04-02 10:26:41 +02:00
this . isOpen = true ;
2021-07-23 11:58:50 +02:00
this . returnFocusWhenClose = returnFocusWhenClose ;
this . expand ( {
allowMultiple : true
} ) ;
}
close ( ) {
this . collapse ( {
allowMultiple : true
} ) ;
}
2022-04-02 10:26:41 +02:00
collapse ( options ) {
this . isOpen = false ;
super . collapse ( options ) ;
}
triggerActiveCallbacks ( ) {
this . active . callbacks . fireWith ( this . active , [ false , true ] ) ;
}
2021-07-23 11:58:50 +02:00
} ;
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-section.js
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
const getInspectorSectionId = ( sidebarId ) => ` widgets-inspector- ${ sidebarId } ` ;
2021-07-23 11:58:50 +02:00
function getSidebarSection ( ) {
const {
2025-12-12 13:15:55 +01:00
wp : { customize }
2021-07-23 11:58:50 +02:00
} = window ;
2025-12-12 13:15:55 +01:00
const reduceMotionMediaQuery = window . matchMedia (
"(prefers-reduced-motion: reduce)"
) ;
2022-06-16 14:03:35 +02:00
let isReducedMotion = reduceMotionMediaQuery . matches ;
2025-12-12 13:15:55 +01:00
reduceMotionMediaQuery . addEventListener ( "change" , ( event ) => {
2022-06-16 14:03:35 +02:00
isReducedMotion = event . matches ;
} ) ;
2021-07-23 11:58:50 +02:00
return class SidebarSection extends customize . Section {
ready ( ) {
const InspectorSection = getInspectorSection ( ) ;
2025-12-12 13:15:55 +01:00
this . inspector = new InspectorSection (
getInspectorSectionId ( this . id ) ,
{
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Block Settings" ) ,
parentSection : this ,
customizeAction : [
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Customizing" ) ,
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Widgets" ) ,
this . params . title
] . join ( " \u25B8 " )
}
) ;
2021-07-23 11:58:50 +02:00
customize . section . add ( this . inspector ) ;
2025-12-12 13:15:55 +01:00
this . contentContainer [ 0 ] . classList . add (
"customize-widgets__sidebar-section"
) ;
2021-07-23 11:58:50 +02:00
}
hasSubSectionOpened ( ) {
return this . inspector . expanded ( ) ;
}
onChangeExpanded ( expanded , _args ) {
const controls = this . controls ( ) ;
2023-12-07 09:44:11 +01:00
const args = {
... _args ,
2021-07-23 11:58:50 +02:00
completeCallback ( ) {
2025-12-12 13:15:55 +01:00
controls . forEach ( ( control ) => {
2023-09-26 10:33:34 +02:00
control . onChangeSectionExpanded ? . ( expanded , args ) ;
2021-07-23 11:58:50 +02:00
} ) ;
2023-09-26 10:33:34 +02:00
_args . completeCallback ? . ( ) ;
2021-07-23 11:58:50 +02:00
}
} ;
if ( args . manualTransition ) {
if ( expanded ) {
2025-12-12 13:15:55 +01:00
this . contentContainer . addClass ( [ "busy" , "open" ] ) ;
this . contentContainer . removeClass ( "is-sub-section-open" ) ;
this . contentContainer . closest ( ".wp-full-overlay" ) . addClass ( "section-open" ) ;
2021-07-23 11:58:50 +02:00
} else {
2025-12-12 13:15:55 +01:00
this . contentContainer . addClass ( [
"busy" ,
"is-sub-section-open"
] ) ;
this . contentContainer . closest ( ".wp-full-overlay" ) . addClass ( "section-open" ) ;
this . contentContainer . removeClass ( "open" ) ;
2022-06-16 14:03:35 +02:00
}
const handleTransitionEnd = ( ) => {
2025-12-12 13:15:55 +01:00
this . contentContainer . removeClass ( "busy" ) ;
2022-06-16 14:03:35 +02:00
args . completeCallback ( ) ;
} ;
if ( isReducedMotion ) {
handleTransitionEnd ( ) ;
} else {
2025-12-12 13:15:55 +01:00
this . contentContainer . one (
"transitionend" ,
handleTransitionEnd
) ;
2021-07-23 11:58:50 +02:00
}
} else {
super . onChangeExpanded ( expanded , args ) ;
}
}
} ;
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-adapter.js
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
const { wp } = window ;
2021-07-23 11:58:50 +02:00
function parseWidgetId ( widgetId ) {
const matches = widgetId . match ( /^(.+)-(\d+)$/ ) ;
if ( matches ) {
return {
idBase : matches [ 1 ] ,
number : parseInt ( matches [ 2 ] , 10 )
} ;
2023-12-07 09:44:11 +01:00
}
2025-12-12 13:15:55 +01:00
return { idBase : widgetId } ;
2021-07-23 11:58:50 +02:00
}
function widgetIdToSettingId ( widgetId ) {
2025-12-12 13:15:55 +01:00
const { idBase , number } = parseWidgetId ( widgetId ) ;
2021-07-23 11:58:50 +02:00
if ( number ) {
return ` widget_ ${ idBase } [ ${ number } ] ` ;
}
return ` widget_ ${ idBase } ` ;
}
function debounce ( leading , callback , timeout ) {
let isLeading = false ;
let timerID ;
2023-09-26 10:33:34 +02:00
function debounced ( ... args ) {
2021-07-23 11:58:50 +02:00
const result = ( isLeading ? callback : leading ) . apply ( this , args ) ;
isLeading = true ;
clearTimeout ( timerID ) ;
timerID = setTimeout ( ( ) => {
isLeading = false ;
} , timeout ) ;
return result ;
}
debounced . cancel = ( ) => {
isLeading = false ;
clearTimeout ( timerID ) ;
} ;
return debounced ;
}
2022-06-16 14:03:35 +02:00
class SidebarAdapter {
2021-07-23 11:58:50 +02:00
constructor ( setting , api ) {
this . setting = setting ;
this . api = api ;
this . locked = false ;
2025-12-12 13:15:55 +01:00
this . widgetsCache = /* @__PURE__ */ new WeakMap ( ) ;
this . subscribers = /* @__PURE__ */ new Set ( ) ;
this . history = [
this . _getWidgetIds ( ) . map (
( widgetId ) => this . getWidget ( widgetId )
)
] ;
2021-07-23 11:58:50 +02:00
this . historyIndex = 0 ;
2025-12-12 13:15:55 +01:00
this . historySubscribers = /* @__PURE__ */ new Set ( ) ;
this . _debounceSetHistory = debounce (
this . _pushHistory ,
this . _replaceHistory ,
1e3
) ;
2021-07-23 11:58:50 +02:00
this . setting . bind ( this . _handleSettingChange . bind ( this ) ) ;
2025-12-12 13:15:55 +01:00
this . api . bind ( "change" , this . _handleAllSettingsChange . bind ( this ) ) ;
2021-07-23 11:58:50 +02:00
this . undo = this . undo . bind ( this ) ;
this . redo = this . redo . bind ( this ) ;
this . save = this . save . bind ( this ) ;
}
subscribe ( callback ) {
this . subscribers . add ( callback ) ;
return ( ) => {
this . subscribers . delete ( callback ) ;
} ;
}
getWidgets ( ) {
return this . history [ this . historyIndex ] ;
}
2023-09-26 10:33:34 +02:00
_emit ( ... args ) {
2021-07-23 11:58:50 +02:00
for ( const callback of this . subscribers ) {
2023-09-26 10:33:34 +02:00
callback ( ... args ) ;
2021-07-23 11:58:50 +02:00
}
}
_getWidgetIds ( ) {
return this . setting . get ( ) ;
}
_pushHistory ( ) {
2025-12-12 13:15:55 +01:00
this . history = [
... this . history . slice ( 0 , this . historyIndex + 1 ) ,
this . _getWidgetIds ( ) . map (
( widgetId ) => this . getWidget ( widgetId )
)
] ;
2021-07-23 11:58:50 +02:00
this . historyIndex += 1 ;
2025-12-12 13:15:55 +01:00
this . historySubscribers . forEach ( ( listener ) => listener ( ) ) ;
2021-07-23 11:58:50 +02:00
}
_replaceHistory ( ) {
2025-12-12 13:15:55 +01:00
this . history [ this . historyIndex ] = this . _getWidgetIds ( ) . map (
( widgetId ) => this . getWidget ( widgetId )
) ;
2021-07-23 11:58:50 +02:00
}
_handleSettingChange ( ) {
if ( this . locked ) {
return ;
}
const prevWidgets = this . getWidgets ( ) ;
this . _pushHistory ( ) ;
this . _emit ( prevWidgets , this . getWidgets ( ) ) ;
}
_handleAllSettingsChange ( setting ) {
if ( this . locked ) {
return ;
}
2025-12-12 13:15:55 +01:00
if ( ! setting . id . startsWith ( "widget_" ) ) {
2021-07-23 11:58:50 +02:00
return ;
}
const widgetId = settingIdToWidgetId ( setting . id ) ;
if ( ! this . setting . get ( ) . includes ( widgetId ) ) {
return ;
}
const prevWidgets = this . getWidgets ( ) ;
this . _pushHistory ( ) ;
this . _emit ( prevWidgets , this . getWidgets ( ) ) ;
}
_createWidget ( widget ) {
const widgetModel = wp . customize . Widgets . availableWidgets . findWhere ( {
id _base : widget . idBase
} ) ;
let number = widget . number ;
2025-12-12 13:15:55 +01:00
if ( widgetModel . get ( "is_multi" ) && ! number ) {
widgetModel . set (
"multi_number" ,
widgetModel . get ( "multi_number" ) + 1
) ;
number = widgetModel . get ( "multi_number" ) ;
2021-07-23 11:58:50 +02:00
}
const settingId = number ? ` widget_ ${ widget . idBase } [ ${ number } ] ` : ` widget_ ${ widget . idBase } ` ;
const settingArgs = {
2025-12-12 13:15:55 +01:00
transport : wp . customize . Widgets . data . selectiveRefreshableWidgets [ widgetModel . get ( "id_base" ) ] ? "postMessage" : "refresh" ,
2021-07-23 11:58:50 +02:00
previewer : this . setting . previewer
} ;
2025-12-12 13:15:55 +01:00
const setting = this . api . create (
settingId ,
settingId ,
"" ,
settingArgs
) ;
2021-07-23 11:58:50 +02:00
setting . set ( widget . instance ) ;
const widgetId = settingIdToWidgetId ( settingId ) ;
return widgetId ;
}
_removeWidget ( widget ) {
const settingId = widgetIdToSettingId ( widget . id ) ;
const setting = this . api ( settingId ) ;
if ( setting ) {
const instance = setting . get ( ) ;
this . widgetsCache . delete ( instance ) ;
}
this . api . remove ( settingId ) ;
}
_updateWidget ( widget ) {
2023-12-07 09:44:11 +01:00
const prevWidget = this . getWidget ( widget . id ) ;
2021-07-23 11:58:50 +02:00
if ( prevWidget === widget ) {
return widget . id ;
2023-12-07 09:44:11 +01:00
}
2021-07-23 11:58:50 +02:00
if ( prevWidget . idBase && widget . idBase && prevWidget . idBase === widget . idBase ) {
const settingId = widgetIdToSettingId ( widget . id ) ;
this . api ( settingId ) . set ( widget . instance ) ;
return widget . id ;
2023-12-07 09:44:11 +01:00
}
2021-07-23 11:58:50 +02:00
this . _removeWidget ( widget ) ;
return this . _createWidget ( widget ) ;
}
getWidget ( widgetId ) {
if ( ! widgetId ) {
return null ;
}
2025-12-12 13:15:55 +01:00
const { idBase , number } = parseWidgetId ( widgetId ) ;
2021-07-23 11:58:50 +02:00
const settingId = widgetIdToSettingId ( widgetId ) ;
const setting = this . api ( settingId ) ;
if ( ! setting ) {
return null ;
}
const instance = setting . get ( ) ;
if ( this . widgetsCache . has ( instance ) ) {
return this . widgetsCache . get ( instance ) ;
}
const widget = {
id : widgetId ,
idBase ,
number ,
instance
} ;
this . widgetsCache . set ( instance , widget ) ;
return widget ;
}
_updateWidgets ( nextWidgets ) {
this . locked = true ;
const addedWidgetIds = [ ] ;
2025-12-12 13:15:55 +01:00
const nextWidgetIds = nextWidgets . map ( ( nextWidget ) => {
2021-07-23 11:58:50 +02:00
if ( nextWidget . id && this . getWidget ( nextWidget . id ) ) {
addedWidgetIds . push ( null ) ;
return this . _updateWidget ( nextWidget ) ;
}
const widgetId = this . _createWidget ( nextWidget ) ;
addedWidgetIds . push ( widgetId ) ;
return widgetId ;
} ) ;
2025-12-12 13:15:55 +01:00
const deletedWidgets = this . getWidgets ( ) . filter (
( widget ) => ! nextWidgetIds . includes ( widget . id )
) ;
deletedWidgets . forEach ( ( widget ) => this . _removeWidget ( widget ) ) ;
2021-07-23 11:58:50 +02:00
this . setting . set ( nextWidgetIds ) ;
this . locked = false ;
return addedWidgetIds ;
}
setWidgets ( nextWidgets ) {
const addedWidgetIds = this . _updateWidgets ( nextWidgets ) ;
this . _debounceSetHistory ( ) ;
return addedWidgetIds ;
}
/ * *
* Undo / Redo related features
* /
hasUndo ( ) {
return this . historyIndex > 0 ;
}
hasRedo ( ) {
return this . historyIndex < this . history . length - 1 ;
}
_seek ( historyIndex ) {
const currentWidgets = this . getWidgets ( ) ;
this . historyIndex = historyIndex ;
const widgets = this . history [ this . historyIndex ] ;
this . _updateWidgets ( widgets ) ;
this . _emit ( currentWidgets , this . getWidgets ( ) ) ;
2025-12-12 13:15:55 +01:00
this . historySubscribers . forEach ( ( listener ) => listener ( ) ) ;
2021-07-23 11:58:50 +02:00
this . _debounceSetHistory . cancel ( ) ;
}
undo ( ) {
if ( ! this . hasUndo ( ) ) {
return ;
}
this . _seek ( this . historyIndex - 1 ) ;
}
redo ( ) {
if ( ! this . hasRedo ( ) ) {
return ;
}
this . _seek ( this . historyIndex + 1 ) ;
}
subscribeHistory ( listener ) {
this . historySubscribers . add ( listener ) ;
return ( ) => {
this . historySubscribers . delete ( listener ) ;
} ;
}
save ( ) {
this . api . previewer . save ( ) ;
}
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
; // external ["wp","dom"]
2024-04-17 11:32:24 +02:00
const external _wp _dom _namespaceObject = window [ "wp" ] [ "dom" ] ;
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/controls/inserter-outer-section.js
2021-07-23 11:58:50 +02:00
2022-04-02 10:26:41 +02:00
2023-12-07 09:44:11 +01:00
2022-04-02 10:26:41 +02:00
2021-07-23 11:58:50 +02:00
function getInserterOuterSection ( ) {
const {
2025-12-12 13:15:55 +01:00
wp : { customize }
2021-07-23 11:58:50 +02:00
} = window ;
2023-12-07 09:44:11 +01:00
const OuterSection = customize . OuterSection ;
2021-07-23 11:58:50 +02:00
customize . OuterSection = class extends OuterSection {
onChangeExpanded ( expanded , args ) {
if ( expanded ) {
2025-12-12 13:15:55 +01:00
customize . section . each ( ( section ) => {
if ( section . params . type === "outer" && section . id !== this . id ) {
2021-07-23 11:58:50 +02:00
if ( section . expanded ( ) ) {
section . collapse ( ) ;
}
}
} ) ;
}
return super . onChangeExpanded ( expanded , args ) ;
}
2023-12-07 09:44:11 +01:00
} ;
2021-07-23 11:58:50 +02:00
customize . sectionConstructor . outer = customize . OuterSection ;
return class InserterOuterSection extends customize . OuterSection {
2023-09-26 10:33:34 +02:00
constructor ( ... args ) {
2023-12-07 09:44:11 +01:00
super ( ... args ) ;
2025-12-12 13:15:55 +01:00
this . params . type = "outer" ;
2021-07-23 11:58:50 +02:00
this . activeElementBeforeExpanded = null ;
2023-12-07 09:44:11 +01:00
const ownerWindow = this . contentContainer [ 0 ] . ownerDocument . defaultView ;
2025-12-12 13:15:55 +01:00
ownerWindow . addEventListener (
"keydown" ,
( event ) => {
if ( this . expanded ( ) && ( event . keyCode === external _wp _keycodes _namespaceObject . ESCAPE || event . code === "Escape" ) && ! event . defaultPrevented ) {
event . preventDefault ( ) ;
event . stopPropagation ( ) ;
( 0 , external _wp _data _namespaceObject . dispatch ) ( store ) . setIsInserterOpened (
false
) ;
}
} ,
// Use capture mode to make this run before other event listeners.
true
) ;
this . contentContainer . addClass ( "widgets-inserter" ) ;
2022-04-02 10:26:41 +02:00
this . isFromInternalAction = false ;
this . expanded . bind ( ( ) => {
if ( ! this . isFromInternalAction ) {
2025-12-12 13:15:55 +01:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( store ) . setIsInserterOpened (
this . expanded ( )
) ;
2022-04-02 10:26:41 +02:00
}
this . isFromInternalAction = false ;
} ) ;
2021-07-23 11:58:50 +02:00
}
open ( ) {
2022-04-02 10:26:41 +02:00
if ( ! this . expanded ( ) ) {
2021-07-23 11:58:50 +02:00
const contentContainer = this . contentContainer [ 0 ] ;
this . activeElementBeforeExpanded = contentContainer . ownerDocument . activeElement ;
2022-04-02 10:26:41 +02:00
this . isFromInternalAction = true ;
2021-07-23 11:58:50 +02:00
this . expand ( {
completeCallback ( ) {
2022-06-16 14:03:35 +02:00
const searchBox = external _wp _dom _namespaceObject . focus . tabbable . find ( contentContainer ) [ 1 ] ;
2021-07-23 11:58:50 +02:00
if ( searchBox ) {
searchBox . focus ( ) ;
}
}
} ) ;
}
}
close ( ) {
2022-04-02 10:26:41 +02:00
if ( this . expanded ( ) ) {
2021-07-23 11:58:50 +02:00
const contentContainer = this . contentContainer [ 0 ] ;
const activeElement = contentContainer . ownerDocument . activeElement ;
2022-04-02 10:26:41 +02:00
this . isFromInternalAction = true ;
2021-07-23 11:58:50 +02:00
this . collapse ( {
completeCallback ( ) {
if ( contentContainer . contains ( activeElement ) ) {
if ( this . activeElementBeforeExpanded ) {
this . activeElementBeforeExpanded . focus ( ) ;
}
}
}
} ) ;
}
}
} ;
}
2022-04-02 10:26:41 +02:00
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/controls/sidebar-control.js
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
2025-12-12 13:15:55 +01:00
const getInserterId = ( controlId ) => ` widgets-inserter- ${ controlId } ` ;
2021-07-23 11:58:50 +02:00
function getSidebarControl ( ) {
const {
2025-12-12 13:15:55 +01:00
wp : { customize }
2021-07-23 11:58:50 +02:00
} = window ;
return class SidebarControl extends customize . Control {
2023-09-26 10:33:34 +02:00
constructor ( ... args ) {
super ( ... args ) ;
2025-12-12 13:15:55 +01:00
this . subscribers = /* @__PURE__ */ new Set ( ) ;
2021-07-23 11:58:50 +02:00
}
ready ( ) {
const InserterOuterSection = getInserterOuterSection ( ) ;
2025-12-12 13:15:55 +01:00
this . inserter = new InserterOuterSection (
getInserterId ( this . id ) ,
{ }
) ;
2021-07-23 11:58:50 +02:00
customize . section . add ( this . inserter ) ;
this . sectionInstance = customize . section ( this . section ( ) ) ;
this . inspector = this . sectionInstance . inspector ;
2022-06-16 14:03:35 +02:00
this . sidebarAdapter = new SidebarAdapter ( this . setting , customize ) ;
2021-07-23 11:58:50 +02:00
}
subscribe ( callback ) {
this . subscribers . add ( callback ) ;
return ( ) => {
this . subscribers . delete ( callback ) ;
} ;
}
onChangeSectionExpanded ( expanded , args ) {
if ( ! args . unchanged ) {
if ( ! expanded ) {
2025-12-12 13:15:55 +01:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( store ) . setIsInserterOpened (
false
) ;
2021-07-23 11:58:50 +02:00
}
2025-12-12 13:15:55 +01:00
this . subscribers . forEach (
( subscriber ) => subscriber ( expanded , args )
) ;
2021-07-23 11:58:50 +02:00
}
}
} ;
}
2025-12-12 13:15:55 +01:00
; // ./node_modules/@wordpress/customize-widgets/build-module/filters/move-to-sidebar.js
2021-07-23 11:58:50 +02:00
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const withMoveToSidebarToolbarItem = ( 0 , external _wp _compose _namespaceObject . createHigherOrderComponent ) (
( BlockEdit ) => ( props ) => {
let widgetId = ( 0 , external _wp _widgets _namespaceObject . getWidgetIdFromBlock ) ( props ) ;
const sidebarControls = useSidebarControls ( ) ;
const activeSidebarControl = useActiveSidebarControl ( ) ;
const hasMultipleSidebars = sidebarControls ? . length > 1 ;
const blockName = props . name ;
const clientId = props . clientId ;
const canInsertBlockInSidebar = ( 0 , external _wp _data _namespaceObject . useSelect ) (
( select ) => {
return select ( external _wp _blockEditor _namespaceObject . store ) . canInsertBlockType (
blockName ,
""
) ;
} ,
[ blockName ]
) ;
const block = ( 0 , external _wp _data _namespaceObject . useSelect ) (
( select ) => select ( external _wp _blockEditor _namespaceObject . store ) . getBlock ( clientId ) ,
[ clientId ]
) ;
const { removeBlock } = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _blockEditor _namespaceObject . store ) ;
const [ , focusWidget ] = useFocusControl ( ) ;
function moveToSidebar ( sidebarControlId ) {
const newSidebarControl = sidebarControls . find (
( sidebarControl ) => sidebarControl . id === sidebarControlId
) ;
if ( widgetId ) {
const oldSetting = activeSidebarControl . setting ;
const newSetting = newSidebarControl . setting ;
oldSetting ( oldSetting ( ) . filter ( ( id ) => id !== widgetId ) ) ;
newSetting ( [ ... newSetting ( ) , widgetId ] ) ;
} else {
const sidebarAdapter = newSidebarControl . sidebarAdapter ;
removeBlock ( clientId ) ;
const addedWidgetIds = sidebarAdapter . setWidgets ( [
... sidebarAdapter . getWidgets ( ) ,
blockToWidget ( block )
] ) ;
widgetId = addedWidgetIds . reverse ( ) . find ( ( id ) => ! ! id ) ;
}
focusWidget ( widgetId ) ;
2023-12-07 09:44:11 +01:00
}
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsxs ) ( external _ReactJSXRuntime _namespaceObject . Fragment , { children : [
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( BlockEdit , { ... props } , "edit" ) ,
hasMultipleSidebars && canInsertBlockInSidebar && /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _blockEditor _namespaceObject . BlockControls , { children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
external _wp _widgets _namespaceObject . MoveToWidgetArea ,
{
widgetAreas : sidebarControls . map (
( sidebarControl ) => ( {
id : sidebarControl . id ,
name : sidebarControl . params . label ,
description : sidebarControl . params . description
} )
) ,
currentWidgetAreaId : activeSidebarControl ? . id ,
onSelect : moveToSidebar
}
) } )
] } ) ;
} ,
"withMoveToSidebarToolbarItem"
) ;
( 0 , external _wp _hooks _namespaceObject . addFilter ) (
"editor.BlockEdit" ,
"core/customize-widgets/block-edit" ,
withMoveToSidebarToolbarItem
) ;
2021-07-23 11:58:50 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/filters/replace-media-upload.js
2021-07-23 11:58:50 +02:00
2022-06-16 14:03:35 +02:00
const replaceMediaUpload = ( ) => external _wp _mediaUtils _namespaceObject . MediaUpload ;
2025-12-12 13:15:55 +01:00
( 0 , external _wp _hooks _namespaceObject . addFilter ) (
"editor.MediaUpload" ,
"core/edit-widgets/replace-media-upload" ,
replaceMediaUpload
) ;
2021-07-23 11:58:50 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/filters/wide-widget-display.js
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const { wp : wide _widget _display _wp } = window ;
const withWideWidgetDisplay = ( 0 , external _wp _compose _namespaceObject . createHigherOrderComponent ) (
( BlockEdit ) => ( props ) => {
const { idBase } = props . attributes ;
const isWide = wide _widget _display _wp . customize . Widgets . data . availableWidgets . find (
( widget ) => widget . id _base === idBase
) ? . is _wide ? ? false ;
return /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( BlockEdit , { ... props , isWide } , "edit" ) ;
} ,
"withWideWidgetDisplay"
) ;
( 0 , external _wp _hooks _namespaceObject . addFilter ) (
"editor.BlockEdit" ,
"core/customize-widgets/wide-widget-display" ,
withWideWidgetDisplay
) ;
2021-07-23 11:58:50 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/filters/index.js
2021-07-23 11:58:50 +02:00
2025-04-25 12:30:07 +02:00
; // ./node_modules/@wordpress/customize-widgets/build-module/index.js
2021-07-23 11:58:50 +02:00
2022-04-02 10:26:41 +02:00
2023-12-07 09:44:11 +01:00
2021-07-23 11:58:50 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const { wp : build _module _wp } = window ;
const DISABLED _BLOCKS = [
"core/more" ,
"core/block" ,
"core/freeform" ,
"core/template-part"
] ;
2021-07-23 11:58:50 +02:00
const ENABLE _EXPERIMENTAL _FSE _BLOCKS = false ;
function initialize ( editorName , blockEditorSettings ) {
2025-12-12 13:15:55 +01:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _preferences _namespaceObject . store ) . setDefaults ( "core/customize-widgets" , {
2022-04-02 10:26:41 +02:00
fixedToolbar : false ,
welcomeGuide : true
} ) ;
2023-12-07 09:44:11 +01:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _blocks _namespaceObject . store ) . reapplyBlockTypeFilters ( ) ;
2025-12-12 13:15:55 +01:00
const coreBlocks = ( 0 , external _wp _blockLibrary _namespaceObject . _ _experimentalGetCoreBlocks ) ( ) . filter ( ( block ) => {
return ! ( DISABLED _BLOCKS . includes ( block . name ) || block . name . startsWith ( "core/post" ) || block . name . startsWith ( "core/query" ) || block . name . startsWith ( "core/site" ) || block . name . startsWith ( "core/navigation" ) ) ;
2021-07-23 11:58:50 +02:00
} ) ;
2022-06-16 14:03:35 +02:00
( 0 , external _wp _blockLibrary _namespaceObject . registerCoreBlocks ) ( coreBlocks ) ;
( 0 , external _wp _widgets _namespaceObject . registerLegacyWidgetBlock ) ( ) ;
2021-07-23 11:58:50 +02:00
if ( false ) { }
2022-06-16 14:03:35 +02:00
( 0 , external _wp _widgets _namespaceObject . registerLegacyWidgetVariations ) ( blockEditorSettings ) ;
2023-12-07 09:44:11 +01:00
( 0 , external _wp _widgets _namespaceObject . registerWidgetGroupBlock ) ( ) ;
2025-12-12 13:15:55 +01:00
( 0 , external _wp _blocks _namespaceObject . setFreeformContentHandlerName ) ( "core/html" ) ;
2021-07-23 11:58:50 +02:00
const SidebarControl = getSidebarControl ( blockEditorSettings ) ;
build _module _wp . customize . sectionConstructor . sidebar = getSidebarSection ( ) ;
build _module _wp . customize . controlConstructor . sidebar _block _editor = SidebarControl ;
2025-12-12 13:15:55 +01:00
const container = document . createElement ( "div" ) ;
2021-07-23 11:58:50 +02:00
document . body . appendChild ( container ) ;
2025-12-12 13:15:55 +01:00
build _module _wp . customize . bind ( "ready" , ( ) => {
2021-07-23 11:58:50 +02:00
const sidebarControls = [ ] ;
2025-12-12 13:15:55 +01:00
build _module _wp . customize . control . each ( ( control ) => {
2021-07-23 11:58:50 +02:00
if ( control instanceof SidebarControl ) {
sidebarControls . push ( control ) ;
}
} ) ;
2025-12-12 13:15:55 +01:00
( 0 , external _wp _element _namespaceObject . createRoot ) ( container ) . render (
/* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) ( external _wp _element _namespaceObject . StrictMode , { children : /* @__PURE__ */ ( 0 , external _ReactJSXRuntime _namespaceObject . jsx ) (
CustomizeWidgets ,
{
api : build _module _wp . customize ,
sidebarControls ,
blockEditorSettings
}
) } )
) ;
2021-07-23 11:58:50 +02:00
} ) ;
}
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
2022-06-16 14:03:35 +02:00
( window . wp = window . wp || { } ) . customizeWidgets = _ _webpack _exports _ _ ;
/******/ } ) ( )
;