})("width:100%;background-color:", G2.darkGray.primary, ";box-sizing:border-box;color:#f0f0f0;padding:0 ", space(1), ";overflow:hidden;" + ( true ? "" : undefined));
var MenuUI = styled_base_browser_esm("div", {
})("margin-top:", space(3), ";margin-bottom:", space(3), ";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:", space(3), ";}.components-navigation__group + .components-navigation__group{margin-top:", space(3), ";}" + ( true ? "" : undefined));
var MenuBackButtonUI = /*#__PURE__*/styled_base_browser_esm(build_module_button["a" /* default */], {
label: "MenuBackButtonUI"
})("&.is-tertiary{color:", G2.lightGray.ui, ";&:hover:not(:disabled ){color:#ddd;box-shadow:none;}&:active:not(:disabled ){background:transparent;color:#ddd;}}" + ( true ? "" : undefined));
var MenuTitleUI = styled_base_browser_esm("div", {
styles: "overflow:hidden;width:100%;"
var MenuTitleHeadingUI = /*#__PURE__*/styled_base_browser_esm(build_module_text, {
label: "MenuTitleHeadingUI"
})("align-items:center;color:", G2.gray[100], ";display:flex;justify-content:space-between;margin-bottom:", space(1), ";padding:", function () {
return Object(external_wp_i18n_["isRTL"])() ? "".concat(space(0.5), " ").concat(space(2), " ").concat(space(0.5), " ").concat(space(1.5)) : "".concat(space(0.5), " ").concat(space(1.5), " ").concat(space(0.5), " ").concat(space(2));
}, ";" + ( true ? "" : undefined));
var MenuTitleActionsUI = styled_base_browser_esm("span", {
label: "MenuTitleActionsUI"
})("height:", space(3), ";.components-button.is-small{color:", G2.lightGray.ui, ";margin-right:", space(0.5), ";padding:0;&:active:not(:disabled ){background:none;color:", G2.gray[200], ";}&:hover:not(:disabled ){box-shadow:none;color:", G2.gray[200], ";}}" + ( true ? "" : undefined));
var MenuTitleSearchUI = styled_base_browser_esm("div", {
label: "MenuTitleSearchUI"
})("padding:0;position:relative;input{height:", space(4.5), ";margin-bottom:", space(1), ";padding-left:", space(4), ";padding-right:", space(4), ";&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}}> svg{left:", space(0.5), ";position:absolute;top:6px;}.components-button.is-small{height:30px;padding:0;position:absolute;right:", space(1), ";top:3px;&:active:not(:disabled ){background:none;}&:hover:not(:disabled ){box-shadow:none;}}" + ( true ? "" : undefined));
var GroupTitleUI = /*#__PURE__*/styled_base_browser_esm(build_module_text, {
})("margin-top:", space(1), ";padding:", function () {
return Object(external_wp_i18n_["isRTL"])() ? "".concat(space(0.5), " ").concat(space(2), " ").concat(space(0.5), " 0") : "".concat(space(0.5), " 0 ").concat(space(0.5), " ").concat(space(2));
}, ";text-transform:uppercase;color:", G2.gray[100], ";" + ( true ? "" : undefined));
var ItemBaseUI = styled_base_browser_esm("li", {
})("border-radius:2px;color:", G2.lightGray.ui, ";margin-bottom:0;button,a{width:100%;&:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:#ddd;}}&.is-active{background-color:", UI.theme, ";color:", UI.textDark, ";button,a{color:", UI.textDark, ";}}svg path{color:", G2.lightGray.ui, ";}" + ( true ? "" : undefined));
var ItemUI = styled_base_browser_esm("div", {
})("display:flex;align-items:center;height:auto;min-height:32px;margin:0;padding:", space(0.75), " ", space(2), ";font-weight:400;line-height:20px;width:100%;color:", G2.lightGray.ui, ";" + ( true ? "" : undefined));
var ItemBadgeUI = styled_base_browser_esm("span", {
})("margin-left:", function () {
return Object(external_wp_i18n_["isRTL"])() ? '0' : space(1);
}, ";margin-right:", function () {
return Object(external_wp_i18n_["isRTL"])() ? space(1) : '0';
}, ";display:inline-flex;padding:", space(0.5), " ", space(1.5), ";border-radius:2px;animation:fade-in 250ms ease-out;@keyframes fade-in{from{opacity:0;}to{opacity:1;}}", reduceMotion('animation'), ";" + ( true ? "" : undefined));
var ItemTitleUI = /*#__PURE__*/styled_base_browser_esm(build_module_text, {
return Object(external_wp_i18n_["isRTL"])() ? 'margin-left: auto;' : 'margin-right: auto;';
}, " font-size:13px;" + ( true ? "" : undefined));
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/use-navigation-tree-nodes.js
function use_navigation_tree_nodes_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function use_navigation_tree_nodes_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { use_navigation_tree_nodes_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { use_navigation_tree_nodes_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var use_navigation_tree_nodes_useNavigationTreeNodes = function useNavigationTreeNodes() {
var _useState = Object(external_wp_element_["useState"])({}),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
setNodes = _useState2[1];
var getNode = function getNode(key) {
var addNode = function addNode(key, value) {
return setNodes(function (original) {
return use_navigation_tree_nodes_objectSpread(use_navigation_tree_nodes_objectSpread({}, original), {}, Object(esm_defineProperty["a" /* default */])({}, key, Object(external_lodash_["omit"])(value, 'children')));
var removeNode = function removeNode(key) {
return setNodes(function (original) {
return Object(external_lodash_["omit"])(original, key);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/use-create-navigation-tree.js
function use_create_navigation_tree_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function use_create_navigation_tree_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { use_create_navigation_tree_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { use_create_navigation_tree_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var use_create_navigation_tree_useCreateNavigationTree = function useCreateNavigationTree() {
var _useNavigationTreeNod = use_navigation_tree_nodes_useNavigationTreeNodes(),
items = _useNavigationTreeNod.nodes,
getItem = _useNavigationTreeNod.getNode,
addItem = _useNavigationTreeNod.addNode,
removeItem = _useNavigationTreeNod.removeNode;
var _useNavigationTreeNod2 = use_navigation_tree_nodes_useNavigationTreeNodes(),
menus = _useNavigationTreeNod2.nodes,
getMenu = _useNavigationTreeNod2.getNode,
_addMenu = _useNavigationTreeNod2.addNode,
removeMenu = _useNavigationTreeNod2.removeNode;
* Stores direct nested menus of menus
* This makes it easy to traverse menu tree
* Key is the menu prop of the menu
* Value is an array of menu keys
var _useState = Object(external_wp_element_["useState"])({}),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
childMenu = _useState2[0],
setChildMenu = _useState2[1];
var getChildMenu = function getChildMenu(menu) {
return childMenu[menu] || [];
var traverseMenu = function traverseMenu(startMenu, callback) {
while (queue.length > 0) {
current = getMenu(queue.shift());
if (!current || visited.includes(current.menu)) {
visited.push(current.menu);
queue = [].concat(Object(toConsumableArray["a" /* default */])(queue), Object(toConsumableArray["a" /* default */])(getChildMenu(current.menu)));
if (callback(current) === false) {
var isMenuEmpty = function isMenuEmpty(menuToCheck) {
traverseMenu(menuToCheck, function (current) {
addMenu: function addMenu(key, value) {
setChildMenu(function (state) {
var newState = use_create_navigation_tree_objectSpread({}, state);
if (!newState[value.parentMenu]) {
newState[value.parentMenu] = [];
newState[value.parentMenu].push(key);
traverseMenu: traverseMenu,
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/index.js
function Navigation(_ref) {
var activeItem = _ref.activeItem,
_ref$activeMenu = _ref.activeMenu,
activeMenu = _ref$activeMenu === void 0 ? ROOT_MENU : _ref$activeMenu,
children = _ref.children,
className = _ref.className,
_ref$onActivateMenu = _ref.onActivateMenu,
onActivateMenu = _ref$onActivateMenu === void 0 ? external_lodash_["noop"] : _ref$onActivateMenu;
var _useState = Object(external_wp_element_["useState"])(activeMenu),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
var _useState3 = Object(external_wp_element_["useState"])(),
_useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
slideOrigin = _useState4[0],
setSlideOrigin = _useState4[1];
var navigationTree = use_create_navigation_tree_useCreateNavigationTree();
var defaultSlideOrigin = Object(external_wp_i18n_["isRTL"])() ? 'right' : 'left';
var setActiveMenu = function setActiveMenu(menuId) {
var slideInOrigin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultSlideOrigin;
if (!navigationTree.getMenu(menuId)) {
setSlideOrigin(slideInOrigin);
}; // Used to prevent the sliding animation on mount
var isMounted = Object(external_wp_element_["useRef"])(false);
Object(external_wp_element_["useEffect"])(function () {
if (!isMounted.current) {
isMounted.current = true;
Object(external_wp_element_["useEffect"])(function () {
if (activeMenu !== menu) {
setActiveMenu(activeMenu);
setActiveMenu: setActiveMenu,
navigationTree: navigationTree
var classes = classnames_default()('components-navigation', className);
var animateClassName = Object(animate["b" /* getAnimateClassName */])({
return Object(external_wp_element_["createElement"])(NavigationUI, {
}, Object(external_wp_element_["createElement"])("div", {
className: classnames_default()(Object(esm_defineProperty["a" /* default */])({}, animateClassName, isMounted.current && slideOrigin))
}, Object(external_wp_element_["createElement"])(NavigationContext.Provider, {
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
var chevron_right = __webpack_require__("1iEr");
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
var chevron_left = __webpack_require__("2gm7");
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/back-button/index.js
function NavigationBackButton(_ref, ref) {
var _navigationTree$getMe;
var backButtonLabel = _ref.backButtonLabel,
className = _ref.className,
parentMenu = _ref.parentMenu;
var _useNavigationContext = context_useNavigationContext(),
setActiveMenu = _useNavigationContext.setActiveMenu,
navigationTree = _useNavigationContext.navigationTree;
var classes = classnames_default()('components-navigation__back-button', className);
var parentMenuTitle = (_navigationTree$getMe = navigationTree.getMenu(parentMenu)) === null || _navigationTree$getMe === void 0 ? void 0 : _navigationTree$getMe.title;
var handleOnClick = function handleOnClick(event) {
if (typeof onClick === 'function') {
var animationDirection = Object(external_wp_i18n_["isRTL"])() ? 'left' : 'right';
if (parentMenu && !event.defaultPrevented) {
setActiveMenu(parentMenu, animationDirection);
var icon = Object(external_wp_i18n_["isRTL"])() ? chevron_right["a" /* default */] : chevron_left["a" /* default */];
return Object(external_wp_element_["createElement"])(MenuBackButtonUI, {
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
}), backButtonLabel || parentMenuTitle || Object(external_wp_i18n_["__"])('Back'));
/* harmony default export */ var back_button = (Object(external_wp_element_["forwardRef"])(NavigationBackButton));
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/group/context.js
var NavigationGroupContext = Object(external_wp_element_["createContext"])({
var context_useNavigationGroupContext = function useNavigationGroupContext() {
return Object(external_wp_element_["useContext"])(NavigationGroupContext);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/group/index.js
function NavigationGroup(_ref) {
var children = _ref.children,
className = _ref.className,
var _useState = Object(external_wp_element_["useState"])(Object(external_lodash_["uniqueId"])('group-')),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 1),
var _useNavigationContext = context_useNavigationContext(),
items = _useNavigationContext.navigationTree.items;
}; // Keep the children rendered to make sure invisible items are included in the navigation tree.
if (!Object(external_lodash_["find"])(items, {
return Object(external_wp_element_["createElement"])(NavigationGroupContext.Provider, {
var groupTitleId = "components-navigation__group-title-".concat(groupId);
var classes = classnames_default()('components-navigation__group', className);
return Object(external_wp_element_["createElement"])(NavigationGroupContext.Provider, {
}, Object(external_wp_element_["createElement"])("li", {
}, title && Object(external_wp_element_["createElement"])(GroupTitleUI, {
className: "components-navigation__group-title",
}, title), Object(external_wp_element_["createElement"])("ul", {
"aria-labelledby": groupTitleId,
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/item/base-content.js
function NavigationItemBaseContent(props) {
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, title && Object(external_wp_element_["createElement"])(ItemTitleUI, {
className: "components-navigation__item-title",
}, title), badge && Object(external_wp_element_["createElement"])(ItemBadgeUI, {
className: "components-navigation__item-badge"
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/menu/context.js
var NavigationMenuContext = Object(external_wp_element_["createContext"])({
var context_useNavigationMenuContext = function useNavigationMenuContext() {
return Object(external_wp_element_["useContext"])(NavigationMenuContext);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/utils.js
// @see packages/block-editor/src/components/inserter/search-items.js
var utils_normalizeInput = function normalizeInput(input) {
return Object(external_lodash_["deburr"])(input).replace(/^\//, '').toLowerCase();
var normalizedSearch = function normalizedSearch(title, search) {
return -1 !== utils_normalizeInput(title).indexOf(utils_normalizeInput(search));
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/item/use-navigation-tree-item.js