PluginProbe
Gutenberg / 23.0.1
Gutenberg v23.0.1
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / modules / boot / index.js

index.js in Gutenberg 23.0.1, at build/modules/boot/index.js

2,537 lines 116.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var __create = Object.create;
2 var __defProp = Object.defineProperty;
3 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4 var __getOwnPropNames = Object.getOwnPropertyNames;
5 var __getProtoOf = Object.getPrototypeOf;
6 var __hasOwnProp = Object.prototype.hasOwnProperty;
7 var __commonJS = (cb, mod) => function __require() {
8 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9 };
10 var __export = (target, all) => {
11 for (var name in all)
12 __defProp(target, name, { get: all[name], enumerable: true });
13 };
14 var __copyProps = (to, from, except, desc) => {
15 if (from && typeof from === "object" || typeof from === "function") {
16 for (let key of __getOwnPropNames(from))
17 if (!__hasOwnProp.call(to, key) && key !== except)
18 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19 }
20 return to;
21 };
22 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23 // If the importer is in node compatibility mode or this is not an ESM
24 // file that has been converted to a CommonJS file using a Babel-
25 // compatible transform (i.e. "__esModule" has not been set), then set
26 // "default" to the CommonJS "module.exports" for node compatibility.
27 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28 mod
29 ));
30
31 // package-external:@wordpress/element
32 var require_element = __commonJS({
33 "package-external:@wordpress/element"(exports, module) {
34 module.exports = window.wp.element;
35 }
36 });
37
38 // package-external:@wordpress/data
39 var require_data = __commonJS({
40 "package-external:@wordpress/data"(exports, module) {
41 module.exports = window.wp.data;
42 }
43 });
44
45 // package-external:@wordpress/i18n
46 var require_i18n = __commonJS({
47 "package-external:@wordpress/i18n"(exports, module) {
48 module.exports = window.wp.i18n;
49 }
50 });
51
52 // package-external:@wordpress/components
53 var require_components = __commonJS({
54 "package-external:@wordpress/components"(exports, module) {
55 module.exports = window.wp.components;
56 }
57 });
58
59 // vendor-external:react/jsx-runtime
60 var require_jsx_runtime = __commonJS({
61 "vendor-external:react/jsx-runtime"(exports, module) {
62 module.exports = window.ReactJSXRuntime;
63 }
64 });
65
66 // vendor-external:react
67 var require_react = __commonJS({
68 "vendor-external:react"(exports, module) {
69 module.exports = window.React;
70 }
71 });
72
73 // package-external:@wordpress/primitives
74 var require_primitives = __commonJS({
75 "package-external:@wordpress/primitives"(exports, module) {
76 module.exports = window.wp.primitives;
77 }
78 });
79
80 // package-external:@wordpress/theme
81 var require_theme = __commonJS({
82 "package-external:@wordpress/theme"(exports, module) {
83 module.exports = window.wp.theme;
84 }
85 });
86
87 // package-external:@wordpress/private-apis
88 var require_private_apis = __commonJS({
89 "package-external:@wordpress/private-apis"(exports, module) {
90 module.exports = window.wp.privateApis;
91 }
92 });
93
94 // package-external:@wordpress/compose
95 var require_compose = __commonJS({
96 "package-external:@wordpress/compose"(exports, module) {
97 module.exports = window.wp.compose;
98 }
99 });
100
101 // package-external:@wordpress/core-data
102 var require_core_data = __commonJS({
103 "package-external:@wordpress/core-data"(exports, module) {
104 module.exports = window.wp.coreData;
105 }
106 });
107
108 // package-external:@wordpress/notices
109 var require_notices = __commonJS({
110 "package-external:@wordpress/notices"(exports, module) {
111 module.exports = window.wp.notices;
112 }
113 });
114
115 // package-external:@wordpress/html-entities
116 var require_html_entities = __commonJS({
117 "package-external:@wordpress/html-entities"(exports, module) {
118 module.exports = window.wp.htmlEntities;
119 }
120 });
121
122 // package-external:@wordpress/keycodes
123 var require_keycodes = __commonJS({
124 "package-external:@wordpress/keycodes"(exports, module) {
125 module.exports = window.wp.keycodes;
126 }
127 });
128
129 // package-external:@wordpress/commands
130 var require_commands = __commonJS({
131 "package-external:@wordpress/commands"(exports, module) {
132 module.exports = window.wp.commands;
133 }
134 });
135
136 // package-external:@wordpress/url
137 var require_url = __commonJS({
138 "package-external:@wordpress/url"(exports, module) {
139 module.exports = window.wp.url;
140 }
141 });
142
143 // package-external:@wordpress/editor
144 var require_editor = __commonJS({
145 "package-external:@wordpress/editor"(exports, module) {
146 module.exports = window.wp.editor;
147 }
148 });
149
150 // package-external:@wordpress/keyboard-shortcuts
151 var require_keyboard_shortcuts = __commonJS({
152 "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
153 module.exports = window.wp.keyboardShortcuts;
154 }
155 });
156
157 // packages/boot/build-module/components/app/index.mjs
158 var import_element16 = __toESM(require_element(), 1);
159 var import_data11 = __toESM(require_data(), 1);
160
161 // packages/boot/build-module/components/app/router.mjs
162 var import_i18n11 = __toESM(require_i18n(), 1);
163 var import_element15 = __toESM(require_element(), 1);
164
165 // node_modules/clsx/dist/clsx.mjs
166 function r(e) {
167 var t, f, n = "";
168 if ("string" == typeof e || "number" == typeof e) n += e;
169 else if ("object" == typeof e) if (Array.isArray(e)) {
170 var o = e.length;
171 for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
172 } else for (f in e) e[f] && (n && (n += " "), n += f);
173 return n;
174 }
175 function clsx() {
176 for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
177 return n;
178 }
179 var clsx_default = clsx;
180
181 // packages/admin-ui/build-module/navigable-region/index.mjs
182 var import_element = __toESM(require_element(), 1);
183 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
184 var NavigableRegion = (0, import_element.forwardRef)(
185 ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
186 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
187 Tag,
188 {
189 ref,
190 className: clsx_default("admin-ui-navigable-region", className),
191 "aria-label": ariaLabel,
192 role: "region",
193 tabIndex: "-1",
194 ...props,
195 children
196 }
197 );
198 }
199 );
200 NavigableRegion.displayName = "NavigableRegion";
201 var navigable_region_default = NavigableRegion;
202
203 // node_modules/@base-ui/utils/esm/useRefWithInit.js
204 var React = __toESM(require_react(), 1);
205 var UNINITIALIZED = {};
206 function useRefWithInit(init2, initArg) {
207 const ref = React.useRef(UNINITIALIZED);
208 if (ref.current === UNINITIALIZED) {
209 ref.current = init2(initArg);
210 }
211 return ref;
212 }
213
214 // node_modules/@base-ui/utils/esm/warn.js
215 var set;
216 if (true) {
217 set = /* @__PURE__ */ new Set();
218 }
219 function warn(...messages) {
220 if (true) {
221 const messageKey = messages.join(" ");
222 if (!set.has(messageKey)) {
223 set.add(messageKey);
224 console.warn(`Base UI: ${messageKey}`);
225 }
226 }
227 }
228
229 // node_modules/@base-ui/react/esm/utils/useRenderElement.js
230 var React4 = __toESM(require_react(), 1);
231
232 // node_modules/@base-ui/utils/esm/useMergedRefs.js
233 function useMergedRefs(a, b, c, d) {
234 const forkRef = useRefWithInit(createForkRef).current;
235 if (didChange(forkRef, a, b, c, d)) {
236 update(forkRef, [a, b, c, d]);
237 }
238 return forkRef.callback;
239 }
240 function useMergedRefsN(refs) {
241 const forkRef = useRefWithInit(createForkRef).current;
242 if (didChangeN(forkRef, refs)) {
243 update(forkRef, refs);
244 }
245 return forkRef.callback;
246 }
247 function createForkRef() {
248 return {
249 callback: null,
250 cleanup: null,
251 refs: []
252 };
253 }
254 function didChange(forkRef, a, b, c, d) {
255 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
256 }
257 function didChangeN(forkRef, newRefs) {
258 return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
259 }
260 function update(forkRef, refs) {
261 forkRef.refs = refs;
262 if (refs.every((ref) => ref == null)) {
263 forkRef.callback = null;
264 return;
265 }
266 forkRef.callback = (instance) => {
267 if (forkRef.cleanup) {
268 forkRef.cleanup();
269 forkRef.cleanup = null;
270 }
271 if (instance != null) {
272 const cleanupCallbacks = Array(refs.length).fill(null);
273 for (let i = 0; i < refs.length; i += 1) {
274 const ref = refs[i];
275 if (ref == null) {
276 continue;
277 }
278 switch (typeof ref) {
279 case "function": {
280 const refCleanup = ref(instance);
281 if (typeof refCleanup === "function") {
282 cleanupCallbacks[i] = refCleanup;
283 }
284 break;
285 }
286 case "object": {
287 ref.current = instance;
288 break;
289 }
290 default:
291 }
292 }
293 forkRef.cleanup = () => {
294 for (let i = 0; i < refs.length; i += 1) {
295 const ref = refs[i];
296 if (ref == null) {
297 continue;
298 }
299 switch (typeof ref) {
300 case "function": {
301 const cleanupCallback = cleanupCallbacks[i];
302 if (typeof cleanupCallback === "function") {
303 cleanupCallback();
304 } else {
305 ref(null);
306 }
307 break;
308 }
309 case "object": {
310 ref.current = null;
311 break;
312 }
313 default:
314 }
315 }
316 };
317 }
318 };
319 }
320
321 // node_modules/@base-ui/utils/esm/getReactElementRef.js
322 var React3 = __toESM(require_react(), 1);
323
324 // node_modules/@base-ui/utils/esm/reactVersion.js
325 var React2 = __toESM(require_react(), 1);
326 var majorVersion = parseInt(React2.version, 10);
327 function isReactVersionAtLeast(reactVersionToCheck) {
328 return majorVersion >= reactVersionToCheck;
329 }
330
331 // node_modules/@base-ui/utils/esm/getReactElementRef.js
332 function getReactElementRef(element) {
333 if (!/* @__PURE__ */ React3.isValidElement(element)) {
334 return null;
335 }
336 const reactElement = element;
337 const propsWithRef = reactElement.props;
338 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
339 }
340
341 // node_modules/@base-ui/utils/esm/mergeObjects.js
342 function mergeObjects(a, b) {
343 if (a && !b) {
344 return a;
345 }
346 if (!a && b) {
347 return b;
348 }
349 if (a || b) {
350 return {
351 ...a,
352 ...b
353 };
354 }
355 return void 0;
356 }
357
358 // node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js
359 function getStateAttributesProps(state, customMapping) {
360 const props = {};
361 for (const key in state) {
362 const value = state[key];
363 if (customMapping?.hasOwnProperty(key)) {
364 const customProps = customMapping[key](value);
365 if (customProps != null) {
366 Object.assign(props, customProps);
367 }
368 continue;
369 }
370 if (value === true) {
371 props[`data-${key.toLowerCase()}`] = "";
372 } else if (value) {
373 props[`data-${key.toLowerCase()}`] = value.toString();
374 }
375 }
376 return props;
377 }
378
379 // node_modules/@base-ui/react/esm/utils/resolveClassName.js
380 function resolveClassName(className, state) {
381 return typeof className === "function" ? className(state) : className;
382 }
383
384 // node_modules/@base-ui/react/esm/utils/resolveStyle.js
385 function resolveStyle(style, state) {
386 return typeof style === "function" ? style(state) : style;
387 }
388
389 // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
390 var EMPTY_PROPS = {};
391 function mergeProps(a, b, c, d, e) {
392 if (!c && !d && !e && !a) {
393 return createInitialMergedProps(b);
394 }
395 let merged = createInitialMergedProps(a);
396 if (b) {
397 merged = mergeInto(merged, b);
398 }
399 if (c) {
400 merged = mergeInto(merged, c);
401 }
402 if (d) {
403 merged = mergeInto(merged, d);
404 }
405 if (e) {
406 merged = mergeInto(merged, e);
407 }
408 return merged;
409 }
410 function mergePropsN(props) {
411 if (props.length === 0) {
412 return EMPTY_PROPS;
413 }
414 if (props.length === 1) {
415 return createInitialMergedProps(props[0]);
416 }
417 let merged = createInitialMergedProps(props[0]);
418 for (let i = 1; i < props.length; i += 1) {
419 merged = mergeInto(merged, props[i]);
420 }
421 return merged;
422 }
423 function createInitialMergedProps(inputProps) {
424 if (isPropsGetter(inputProps)) {
425 return {
426 ...resolvePropsGetter(inputProps, EMPTY_PROPS)
427 };
428 }
429 return copyInitialProps(inputProps);
430 }
431 function mergeInto(merged, inputProps) {
432 if (isPropsGetter(inputProps)) {
433 return resolvePropsGetter(inputProps, merged);
434 }
435 return mutablyMergeInto(merged, inputProps);
436 }
437 function copyInitialProps(inputProps) {
438 const copiedProps = {
439 ...inputProps
440 };
441 for (const propName in copiedProps) {
442 const propValue = copiedProps[propName];
443 if (isEventHandler(propName, propValue)) {
444 copiedProps[propName] = wrapEventHandler(propValue);
445 }
446 }
447 return copiedProps;
448 }
449 function mutablyMergeInto(mergedProps, externalProps) {
450 if (!externalProps) {
451 return mergedProps;
452 }
453 for (const propName in externalProps) {
454 const externalPropValue = externalProps[propName];
455 switch (propName) {
456 case "style": {
457 mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
458 break;
459 }
460 case "className": {
461 mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
462 break;
463 }
464 default: {
465 if (isEventHandler(propName, externalPropValue)) {
466 mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
467 } else {
468 mergedProps[propName] = externalPropValue;
469 }
470 }
471 }
472 }
473 return mergedProps;
474 }
475 function isEventHandler(key, value) {
476 const code0 = key.charCodeAt(0);
477 const code1 = key.charCodeAt(1);
478 const code2 = key.charCodeAt(2);
479 return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
480 }
481 function isPropsGetter(inputProps) {
482 return typeof inputProps === "function";
483 }
484 function resolvePropsGetter(inputProps, previousProps) {
485 if (isPropsGetter(inputProps)) {
486 return inputProps(previousProps);
487 }
488 return inputProps ?? EMPTY_PROPS;
489 }
490 function mergeEventHandlers(ourHandler, theirHandler) {
491 if (!theirHandler) {
492 return ourHandler;
493 }
494 if (!ourHandler) {
495 return wrapEventHandler(theirHandler);
496 }
497 return (event) => {
498 if (isSyntheticEvent(event)) {
499 const baseUIEvent = event;
500 makeEventPreventable(baseUIEvent);
501 const result2 = theirHandler(baseUIEvent);
502 if (!baseUIEvent.baseUIHandlerPrevented) {
503 ourHandler?.(baseUIEvent);
504 }
505 return result2;
506 }
507 const result = theirHandler(event);
508 ourHandler?.(event);
509 return result;
510 };
511 }
512 function wrapEventHandler(handler) {
513 if (!handler) {
514 return handler;
515 }
516 return (event) => {
517 if (isSyntheticEvent(event)) {
518 makeEventPreventable(event);
519 }
520 return handler(event);
521 };
522 }
523 function makeEventPreventable(event) {
524 event.preventBaseUIHandler = () => {
525 event.baseUIHandlerPrevented = true;
526 };
527 return event;
528 }
529 function mergeClassNames(ourClassName, theirClassName) {
530 if (theirClassName) {
531 if (ourClassName) {
532 return theirClassName + " " + ourClassName;
533 }
534 return theirClassName;
535 }
536 return ourClassName;
537 }
538 function isSyntheticEvent(event) {
539 return event != null && typeof event === "object" && "nativeEvent" in event;
540 }
541
542 // node_modules/@base-ui/utils/esm/empty.js
543 var EMPTY_ARRAY = Object.freeze([]);
544 var EMPTY_OBJECT = Object.freeze({});
545
546 // node_modules/@base-ui/react/esm/utils/constants.js
547 var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
548 var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
549 var BASE_UI_SWIPE_IGNORE_SELECTOR = `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
550 var LEGACY_SWIPE_IGNORE_SELECTOR = `[${LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
551
552 // node_modules/@base-ui/react/esm/utils/useRenderElement.js
553 var import_react = __toESM(require_react(), 1);
554 function useRenderElement(element, componentProps, params = {}) {
555 const renderProp = componentProps.render;
556 const outProps = useRenderElementProps(componentProps, params);
557 if (params.enabled === false) {
558 return null;
559 }
560 const state = params.state ?? EMPTY_OBJECT;
561 return evaluateRenderProp(element, renderProp, outProps, state);
562 }
563 function useRenderElementProps(componentProps, params = {}) {
564 const {
565 className: classNameProp,
566 style: styleProp,
567 render: renderProp
568 } = componentProps;
569 const {
570 state = EMPTY_OBJECT,
571 ref,
572 props,
573 stateAttributesMapping,
574 enabled = true
575 } = params;
576 const className = enabled ? resolveClassName(classNameProp, state) : void 0;
577 const style = enabled ? resolveStyle(styleProp, state) : void 0;
578 const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
579 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
580 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
581 if (typeof document !== "undefined") {
582 if (!enabled) {
583 useMergedRefs(null, null);
584 } else if (Array.isArray(ref)) {
585 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
586 } else {
587 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
588 }
589 }
590 if (!enabled) {
591 return EMPTY_OBJECT;
592 }
593 if (className !== void 0) {
594 outProps.className = mergeClassNames(outProps.className, className);
595 }
596 if (style !== void 0) {
597 outProps.style = mergeObjects(outProps.style, style);
598 }
599 return outProps;
600 }
601 function resolveRenderFunctionProps(props) {
602 if (Array.isArray(props)) {
603 return mergePropsN(props);
604 }
605 return mergeProps(void 0, props);
606 }
607 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
608 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
609 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
610 function evaluateRenderProp(element, render, props, state) {
611 if (render) {
612 if (typeof render === "function") {
613 if (true) {
614 warnIfRenderPropLooksLikeComponent(render);
615 }
616 return render(props, state);
617 }
618 const mergedProps = mergeProps(props, render.props);
619 mergedProps.ref = props.ref;
620 let newElement = render;
621 if (newElement?.$$typeof === REACT_LAZY_TYPE) {
622 const children = React4.Children.toArray(render);
623 newElement = children[0];
624 }
625 if (true) {
626 if (!/* @__PURE__ */ React4.isValidElement(newElement)) {
627 throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
628 }
629 }
630 return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps);
631 }
632 if (element) {
633 if (typeof element === "string") {
634 return renderTag(element, props);
635 }
636 }
637 throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
638 }
639 function warnIfRenderPropLooksLikeComponent(renderFn) {
640 const functionName = renderFn.name;
641 if (functionName.length === 0) {
642 return;
643 }
644 if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
645 return;
646 }
647 if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
648 return;
649 }
650 warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
651 }
652 function renderTag(Tag, props) {
653 if (Tag === "button") {
654 return /* @__PURE__ */ (0, import_react.createElement)("button", {
655 type: "button",
656 ...props,
657 key: props.key
658 });
659 }
660 if (Tag === "img") {
661 return /* @__PURE__ */ (0, import_react.createElement)("img", {
662 alt: "",
663 ...props,
664 key: props.key
665 });
666 }
667 return /* @__PURE__ */ React4.createElement(Tag, props);
668 }
669
670 // node_modules/@base-ui/react/esm/use-render/useRender.js
671 function useRender(params) {
672 return useRenderElement(params.defaultTagName ?? "div", params, params);
673 }
674
675 // packages/icons/build-module/icon/index.mjs
676 var import_element2 = __toESM(require_element(), 1);
677 var icon_default = (0, import_element2.forwardRef)(
678 ({ icon, size = 24, ...props }, ref) => {
679 return (0, import_element2.cloneElement)(icon, {
680 width: size,
681 height: size,
682 ...props,
683 ref
684 });
685 }
686 );
687
688 // packages/icons/build-module/library/arrow-up-left.mjs
689 var import_primitives = __toESM(require_primitives(), 1);
690 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
691 var arrow_up_left_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z" }) });
692
693 // packages/icons/build-module/library/check.mjs
694 var import_primitives2 = __toESM(require_primitives(), 1);
695 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
696 var check_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });
697
698 // packages/icons/build-module/library/chevron-down-small.mjs
699 var import_primitives3 = __toESM(require_primitives(), 1);
700 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
701 var chevron_down_small_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { d: "m15.99 10.889-3.988 3.418-3.988-3.418.976-1.14 3.012 2.582 3.012-2.581.976 1.139Z" }) });
702
703 // packages/icons/build-module/library/chevron-left-small.mjs
704 var import_primitives4 = __toESM(require_primitives(), 1);
705 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
706 var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });
707
708 // packages/icons/build-module/library/chevron-left.mjs
709 var import_primitives5 = __toESM(require_primitives(), 1);
710 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
711 var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });
712
713 // packages/icons/build-module/library/chevron-right-small.mjs
714 var import_primitives6 = __toESM(require_primitives(), 1);
715 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
716 var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });
717
718 // packages/icons/build-module/library/chevron-right.mjs
719 var import_primitives7 = __toESM(require_primitives(), 1);
720 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
721 var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });
722
723 // packages/icons/build-module/library/menu.mjs
724 var import_primitives8 = __toESM(require_primitives(), 1);
725 var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
726 var menu_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });
727
728 // packages/icons/build-module/library/search.mjs
729 var import_primitives9 = __toESM(require_primitives(), 1);
730 var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
731 var search_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) });
732
733 // packages/icons/build-module/library/wordpress.mjs
734 var import_primitives10 = __toESM(require_primitives(), 1);
735 var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
736 var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.Path, { d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z" }) });
737
738 // packages/ui/build-module/stack/stack.mjs
739 var import_element3 = __toESM(require_element(), 1);
740 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='b51ff41489']")) {
741 const style = document.createElement("style");
742 style.setAttribute("data-wp-hash", "b51ff41489");
743 style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}"));
744 document.head.appendChild(style);
745 }
746 var style_default = { "stack": "_19ce0419607e1896__stack" };
747 var gapTokens = {
748 xs: "var(--wpds-dimension-gap-xs, 4px)",
749 sm: "var(--wpds-dimension-gap-sm, 8px)",
750 md: "var(--wpds-dimension-gap-md, 12px)",
751 lg: "var(--wpds-dimension-gap-lg, 16px)",
752 xl: "var(--wpds-dimension-gap-xl, 24px)",
753 "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
754 "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
755 };
756 var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
757 const style = {
758 gap: gap && gapTokens[gap],
759 alignItems: align,
760 justifyContent: justify,
761 flexDirection: direction,
762 flexWrap: wrap
763 };
764 const element = useRender({
765 render,
766 ref,
767 props: mergeProps(props, { style, className: style_default.stack })
768 });
769 return element;
770 });
771
772 // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
773 var import_components = __toESM(require_components(), 1);
774 var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
775
776 // packages/admin-ui/build-module/page/header.mjs
777 var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
778 function Header({
779 headingLevel = 2,
780 breadcrumbs,
781 badges,
782 title,
783 subTitle,
784 actions,
785 showSidebarToggle = true
786 }) {
787 const HeadingTag = `h${headingLevel}`;
788 return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
789 Stack,
790 {
791 direction: "column",
792 className: "admin-ui-page__header",
793 render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("header", {}),
794 children: [
795 /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { direction: "row", justify: "space-between", gap: "sm", children: [
796 /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
797 showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
798 SidebarToggleSlot,
799 {
800 bubblesVirtually: true,
801 className: "admin-ui-page__sidebar-toggle-slot"
802 }
803 ),
804 title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HeadingTag, { className: "admin-ui-page__header-title", children: title }),
805 breadcrumbs,
806 badges
807 ] }),
808 /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
809 Stack,
810 {
811 direction: "row",
812 gap: "sm",
813 style: { width: "auto", flexShrink: 0 },
814 className: "admin-ui-page__header-actions",
815 align: "center",
816 children: actions
817 }
818 )
819 ] }),
820 subTitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "admin-ui-page__header-subtitle", children: subTitle })
821 ]
822 }
823 );
824 }
825
826 // packages/admin-ui/build-module/page/index.mjs
827 var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
828 function Page({
829 headingLevel,
830 breadcrumbs,
831 badges,
832 title,
833 subTitle,
834 children,
835 className,
836 actions,
837 ariaLabel,
838 hasPadding = false,
839 showSidebarToggle = true
840 }) {
841 const classes = clsx_default("admin-ui-page", className);
842 const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
843 return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
844 (title || breadcrumbs || badges || actions) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
845 Header,
846 {
847 headingLevel,
848 breadcrumbs,
849 badges,
850 title,
851 subTitle,
852 actions,
853 showSidebarToggle
854 }
855 ),
856 hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "admin-ui-page__content has-padding", children }) : children
857 ] });
858 }
859 Page.SidebarToggleFill = SidebarToggleFill;
860 var page_default = Page;
861
862 // packages/boot/build-module/components/app/router.mjs
863 var import_data10 = __toESM(require_data(), 1);
864 var import_core_data6 = __toESM(require_core_data(), 1);
865 import {
866 privateApis as routePrivateApis6
867 } from "@wordpress/route";
868
869 // packages/boot/build-module/components/root/index.mjs
870 var import_notices = __toESM(require_notices(), 1);
871 var import_compose4 = __toESM(require_compose(), 1);
872 var import_components14 = __toESM(require_components(), 1);
873 import { privateApis as routePrivateApis5 } from "@wordpress/route";
874 var import_element14 = __toESM(require_element(), 1);
875 var import_i18n10 = __toESM(require_i18n(), 1);
876
877 // packages/boot/build-module/components/site-hub/index.mjs
878 var import_data3 = __toESM(require_data(), 1);
879 var import_components3 = __toESM(require_components(), 1);
880 var import_i18n2 = __toESM(require_i18n(), 1);
881 var import_core_data2 = __toESM(require_core_data(), 1);
882 var import_html_entities = __toESM(require_html_entities(), 1);
883 var import_keycodes = __toESM(require_keycodes(), 1);
884 var import_commands = __toESM(require_commands(), 1);
885 var import_url = __toESM(require_url(), 1);
886
887 // packages/boot/build-module/components/site-icon-link/index.mjs
888 var import_components2 = __toESM(require_components(), 1);
889 import { Link, privateApis as routePrivateApis } from "@wordpress/route";
890
891 // packages/boot/build-module/lock-unlock.mjs
892 var import_private_apis = __toESM(require_private_apis(), 1);
893 var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
894 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
895 "@wordpress/boot"
896 );
897
898 // packages/boot/build-module/components/site-icon/index.mjs
899 var import_data = __toESM(require_data(), 1);
900 var import_i18n = __toESM(require_i18n(), 1);
901 var import_core_data = __toESM(require_core_data(), 1);
902 var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
903 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='3ada0e3b8a']")) {
904 const style = document.createElement("style");
905 style.setAttribute("data-wp-hash", "3ada0e3b8a");
906 style.appendChild(document.createTextNode(".boot-site-icon{display:flex}.boot-site-icon__icon{fill:var(--wpds-color-fg-content-neutral,#1e1e1e);height:32px;width:32px}.boot-site-icon__image{aspect-ratio:1/1;border-radius:var(--wpds-border-radius-md,4px);height:32px;object-fit:cover;width:32px}"));
907 document.head.appendChild(style);
908 }
909 function SiteIcon({ className }) {
910 const { isRequestingSite, siteIconUrl } = (0, import_data.useSelect)((select) => {
911 const { getEntityRecord } = select(import_core_data.store);
912 const siteData = getEntityRecord(
913 "root",
914 "__unstableBase",
915 void 0
916 );
917 return {
918 isRequestingSite: !siteData,
919 siteIconUrl: siteData?.site_icon_url
920 };
921 }, []);
922 let icon = null;
923 if (isRequestingSite && !siteIconUrl) {
924 icon = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "boot-site-icon__image" });
925 } else {
926 icon = siteIconUrl ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
927 "img",
928 {
929 className: "boot-site-icon__image",
930 alt: (0, import_i18n.__)("Site Icon"),
931 src: siteIconUrl
932 }
933 ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
934 icon_default,
935 {
936 className: "boot-site-icon__icon",
937 icon: wordpress_default,
938 size: 48
939 }
940 );
941 }
942 return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: clsx_default(className, "boot-site-icon"), children: icon });
943 }
944 var site_icon_default = SiteIcon;
945
946 // packages/boot/build-module/components/site-icon-link/index.mjs
947 var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
948 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='5aacc86eea']")) {
949 const style = document.createElement("style");
950 style.setAttribute("data-wp-hash", "5aacc86eea");
951 style.appendChild(document.createTextNode(".boot-site-icon-link{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);display:inline-flex;height:64px;justify-content:center;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-site-icon-link{transition:outline .1s ease-out}}.boot-site-icon-link:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}"));
952 document.head.appendChild(style);
953 }
954 var { useCanGoBack, useRouter } = unlock(routePrivateApis);
955 function SiteIconLink({
956 to,
957 isBackButton,
958 ...props
959 }) {
960 const router = useRouter();
961 const canGoBack = useCanGoBack();
962 return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components2.Tooltip, { text: props["aria-label"], placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
963 Link,
964 {
965 to,
966 "aria-label": props["aria-label"],
967 className: "boot-site-icon-link",
968 onClick: (event) => {
969 if (canGoBack && isBackButton) {
970 event.preventDefault();
971 router.history.back();
972 }
973 },
974 children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(site_icon_default, {})
975 }
976 ) });
977 }
978 var site_icon_link_default = SiteIconLink;
979
980 // packages/boot/build-module/store/index.mjs
981 var import_data2 = __toESM(require_data(), 1);
982
983 // packages/boot/build-module/store/reducer.mjs
984 var initialState = {
985 menuItems: {},
986 routes: [],
987 dashboardLink: void 0
988 };
989 function reducer(state = initialState, action) {
990 switch (action.type) {
991 case "REGISTER_MENU_ITEM":
992 return {
993 ...state,
994 menuItems: {
995 ...state.menuItems,
996 [action.id]: action.menuItem
997 }
998 };
999 case "UPDATE_MENU_ITEM":
1000 return {
1001 ...state,
1002 menuItems: {
1003 ...state.menuItems,
1004 [action.id]: {
1005 ...state.menuItems[action.id],
1006 ...action.updates
1007 }
1008 }
1009 };
1010 case "REGISTER_ROUTE":
1011 return {
1012 ...state,
1013 routes: [...state.routes, action.route]
1014 };
1015 case "SET_DASHBOARD_LINK":
1016 return {
1017 ...state,
1018 dashboardLink: action.dashboardLink
1019 };
1020 }
1021 return state;
1022 }
1023
1024 // packages/boot/build-module/store/actions.mjs
1025 var actions_exports = {};
1026 __export(actions_exports, {
1027 registerMenuItem: () => registerMenuItem,
1028 registerRoute: () => registerRoute,
1029 setDashboardLink: () => setDashboardLink,
1030 updateMenuItem: () => updateMenuItem
1031 });
1032 function registerMenuItem(id, menuItem) {
1033 return {
1034 type: "REGISTER_MENU_ITEM",
1035 id,
1036 menuItem
1037 };
1038 }
1039 function updateMenuItem(id, updates) {
1040 return {
1041 type: "UPDATE_MENU_ITEM",
1042 id,
1043 updates
1044 };
1045 }
1046 function registerRoute(route) {
1047 return {
1048 type: "REGISTER_ROUTE",
1049 route
1050 };
1051 }
1052 function setDashboardLink(dashboardLink) {
1053 return {
1054 type: "SET_DASHBOARD_LINK",
1055 dashboardLink
1056 };
1057 }
1058
1059 // packages/boot/build-module/store/selectors.mjs
1060 var selectors_exports = {};
1061 __export(selectors_exports, {
1062 getDashboardLink: () => getDashboardLink,
1063 getMenuItems: () => getMenuItems,
1064 getRoutes: () => getRoutes
1065 });
1066 function getMenuItems(state) {
1067 return Object.values(state.menuItems);
1068 }
1069 function getRoutes(state) {
1070 return state.routes;
1071 }
1072 function getDashboardLink(state) {
1073 return state.dashboardLink;
1074 }
1075
1076 // packages/boot/build-module/store/index.mjs
1077 var STORE_NAME = "wordpress/boot";
1078 var store = (0, import_data2.createReduxStore)(STORE_NAME, {
1079 reducer,
1080 actions: actions_exports,
1081 selectors: selectors_exports
1082 });
1083 (0, import_data2.register)(store);
1084
1085 // packages/boot/build-module/components/site-hub/index.mjs
1086 var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
1087 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='bc60675bd6']")) {
1088 const style = document.createElement("style");
1089 style.setAttribute("data-wp-hash", "bc60675bd6");
1090 style.appendChild(document.createTextNode(".boot-site-hub{align-items:center;background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);display:grid;flex-shrink:0;grid-template-columns:60px 1fr auto;padding-right:16px;position:sticky;top:0;z-index:1}.boot-site-hub__actions{flex-shrink:0}.boot-site-hub__title{align-items:center;display:flex;text-decoration:none}.boot-site-hub__title .components-external-link__contents{margin-inline-start:4px;max-width:140px;overflow:hidden;text-decoration:none}.boot-site-hub__title .components-external-link__icon{opacity:0;transition:opacity .1s ease-out}.boot-site-hub__title:hover .components-external-link__icon{opacity:1}@media not (prefers-reduced-motion){.boot-site-hub__title{transition:outline .1s ease-out}}.boot-site-hub__title:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-site-hub__title-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-size:13px;font-weight:499}.boot-site-hub__title-text,.boot-site-hub__url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.boot-site-hub__url{color:var(--wpds-color-fg-content-neutral-weak,#707070);font-size:12px}"));
1091 document.head.appendChild(style);
1092 }
1093 function SiteHub() {
1094 const { dashboardLink, homeUrl, siteTitle } = (0, import_data3.useSelect)((select) => {
1095 const { getEntityRecord } = select(import_core_data2.store);
1096 const _base = getEntityRecord(
1097 "root",
1098 "__unstableBase"
1099 );
1100 return {
1101 dashboardLink: select(store).getDashboardLink(),
1102 homeUrl: _base?.home,
1103 siteTitle: !_base?.name && !!_base?.url ? (0, import_url.filterURLForDisplay)(_base?.url) : _base?.name
1104 };
1105 }, []);
1106 const { open: openCommandCenter } = (0, import_data3.useDispatch)(import_commands.store);
1107 return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "boot-site-hub", children: [
1108 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1109 site_icon_link_default,
1110 {
1111 to: dashboardLink || "/",
1112 "aria-label": (0, import_i18n2.__)("Go to the Dashboard")
1113 }
1114 ),
1115 /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1116 import_components3.ExternalLink,
1117 {
1118 href: homeUrl ?? "/",
1119 className: "boot-site-hub__title",
1120 children: [
1121 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__title-text", children: siteTitle && (0, import_html_entities.decodeEntities)(siteTitle) }),
1122 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__url", children: (0, import_url.filterURLForDisplay)(homeUrl ?? "") })
1123 ]
1124 }
1125 ),
1126 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components3.__experimentalHStack, { className: "boot-site-hub__actions", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1127 import_components3.Button,
1128 {
1129 variant: "tertiary",
1130 icon: search_default,
1131 onClick: () => openCommandCenter(),
1132 size: "compact",
1133 label: (0, import_i18n2.__)("Open command palette"),
1134 shortcut: import_keycodes.displayShortcut.primary("k")
1135 }
1136 ) })
1137 ] });
1138 }
1139 var site_hub_default = SiteHub;
1140
1141 // packages/boot/build-module/components/navigation/index.mjs
1142 var import_element7 = __toESM(require_element(), 1);
1143 var import_data6 = __toESM(require_data(), 1);
1144
1145 // packages/boot/build-module/components/navigation/navigation-item/index.mjs
1146 var import_components6 = __toESM(require_components(), 1);
1147
1148 // packages/boot/build-module/components/navigation/router-link-item.mjs
1149 var import_element4 = __toESM(require_element(), 1);
1150 var import_components4 = __toESM(require_components(), 1);
1151 import { privateApis as routePrivateApis2 } from "@wordpress/route";
1152 var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
1153 var { createLink } = unlock(routePrivateApis2);
1154 function AnchorOnlyItem(props, forwardedRef) {
1155 return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components4.__experimentalItem, { as: "a", ref: forwardedRef, ...props });
1156 }
1157 var RouterLinkItem = createLink((0, import_element4.forwardRef)(AnchorOnlyItem));
1158 var router_link_item_default = RouterLinkItem;
1159
1160 // packages/boot/build-module/components/navigation/items.mjs
1161 var import_element5 = __toESM(require_element(), 1);
1162 var import_components5 = __toESM(require_components(), 1);
1163 var import_primitives11 = __toESM(require_primitives(), 1);
1164 var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
1165 function isSvg(element) {
1166 return (0, import_element5.isValidElement)(element) && (element.type === import_primitives11.SVG || element.type === "svg");
1167 }
1168 function wrapIcon(icon, shouldShowPlaceholder = true) {
1169 if (isSvg(icon)) {
1170 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components5.Icon, { icon });
1171 }
1172 if (typeof icon === "string" && icon.startsWith("dashicons-")) {
1173 const iconKey = icon.replace(
1174 /^dashicons-/,
1175 ""
1176 );
1177 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1178 import_components5.Dashicon,
1179 {
1180 style: { padding: "2px" },
1181 icon: iconKey,
1182 "aria-hidden": "true"
1183 }
1184 );
1185 }
1186 if (typeof icon === "string" && icon.startsWith("data:")) {
1187 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1188 "img",
1189 {
1190 src: icon,
1191 alt: "",
1192 "aria-hidden": "true",
1193 style: {
1194 width: "20px",
1195 height: "20px",
1196 display: "block",
1197 padding: "2px"
1198 }
1199 }
1200 );
1201 }
1202 if (icon) {
1203 return icon;
1204 }
1205 if (shouldShowPlaceholder) {
1206 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1207 "div",
1208 {
1209 style: { width: "24px", height: "24px" },
1210 "aria-hidden": "true"
1211 }
1212 );
1213 }
1214 return null;
1215 }
1216
1217 // packages/boot/build-module/components/navigation/navigation-item/index.mjs
1218 var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
1219 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='26b8e27d3f']")) {
1220 const style = document.createElement("style");
1221 style.setAttribute("data-wp-hash", "26b8e27d3f");
1222 style.appendChild(document.createTextNode('.boot-navigation-item.components-item{align-items:center;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin-block-end:4px;margin-inline:12px;min-height:32px;padding-block:0;padding-inline:4px;width:calc(100% - 24px)}.boot-dropdown-item__children .boot-navigation-item.components-item{min-height:24px}.boot-navigation-item.components-item{border-radius:var(--wpds-border-radius-sm,2px)}.boot-navigation-item.components-item.active,.boot-navigation-item.components-item:focus,.boot-navigation-item.components-item:hover,.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9))}.boot-navigation-item.components-item.active{font-weight:499}.boot-navigation-item.components-item svg:last-child{padding:4px}.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9));font-weight:499}.boot-navigation-item.components-item:focus-visible{transform:translateZ(0)}.boot-navigation-item.components-item.with-suffix{padding-right:16px}'));
1223 document.head.appendChild(style);
1224 }
1225 function NavigationItem({
1226 className,
1227 icon,
1228 shouldShowPlaceholder = true,
1229 children,
1230 to
1231 }) {
1232 const isExternal = !String(
1233 new URL(to, window.location.origin)
1234 ).startsWith(window.location.origin);
1235 const content = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_components6.__experimentalHStack, { justify: "flex-start", spacing: 2, style: { flexGrow: "1" }, children: [
1236 wrapIcon(icon, shouldShowPlaceholder),
1237 /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components6.FlexBlock, { children })
1238 ] });
1239 if (isExternal) {
1240 return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1241 import_components6.__experimentalItem,
1242 {
1243 as: "a",
1244 href: to,
1245 className: clsx_default("boot-navigation-item", className),
1246 children: content
1247 }
1248 );
1249 }
1250 return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1251 router_link_item_default,
1252 {
1253 to,
1254 className: clsx_default("boot-navigation-item", className),
1255 children: content
1256 }
1257 );
1258 }
1259
1260 // packages/boot/build-module/components/navigation/drilldown-item/index.mjs
1261 var import_components7 = __toESM(require_components(), 1);
1262 var import_i18n3 = __toESM(require_i18n(), 1);
1263 var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
1264 function DrilldownItem({
1265 className,
1266 id,
1267 icon,
1268 shouldShowPlaceholder = true,
1269 children,
1270 onNavigate
1271 }) {
1272 const handleClick = (e) => {
1273 e.preventDefault();
1274 onNavigate({ id, direction: "forward" });
1275 };
1276 return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1277 import_components7.__experimentalItem,
1278 {
1279 className: clsx_default("boot-navigation-item", className),
1280 onClick: handleClick,
1281 children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1282 import_components7.__experimentalHStack,
1283 {
1284 justify: "flex-start",
1285 spacing: 2,
1286 style: { flexGrow: "1" },
1287 children: [
1288 wrapIcon(icon, shouldShowPlaceholder),
1289 /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.FlexBlock, { children }),
1290 /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.Icon, { icon: (0, import_i18n3.isRTL)() ? chevron_left_small_default : chevron_right_small_default })
1291 ]
1292 }
1293 )
1294 }
1295 );
1296 }
1297
1298 // packages/boot/build-module/components/navigation/dropdown-item/index.mjs
1299 var import_components8 = __toESM(require_components(), 1);
1300 var import_compose = __toESM(require_compose(), 1);
1301 var import_data4 = __toESM(require_data(), 1);
1302 var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
1303 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='608eff82f3']")) {
1304 const style = document.createElement("style");
1305 style.setAttribute("data-wp-hash", "608eff82f3");
1306 style.appendChild(document.createTextNode(".boot-dropdown-item__children{display:flex;flex-direction:column;margin-block-end:2px;margin-block-start:-2px;margin-inline-start:30px;overflow:hidden;padding:2px}.boot-dropdown-item__chevron.is-up{transform:rotate(180deg)}"));
1307 document.head.appendChild(style);
1308 }
1309 var ANIMATION_DURATION = 0.2;
1310 function DropdownItem({
1311 className,
1312 id,
1313 icon,
1314 children,
1315 isExpanded,
1316 onToggle
1317 }) {
1318 const menuItems = (0, import_data4.useSelect)(
1319 (select) => (
1320 // @ts-ignore
1321 select(STORE_NAME).getMenuItems()
1322 ),
1323 []
1324 );
1325 const items = menuItems.filter((item) => item.parent === id);
1326 const disableMotion = (0, import_compose.useReducedMotion)();
1327 return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boot-dropdown-item", children: [
1328 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1329 import_components8.__experimentalItem,
1330 {
1331 className: clsx_default("boot-navigation-item", className),
1332 onClick: (e) => {
1333 e.preventDefault();
1334 e.stopPropagation();
1335 onToggle();
1336 },
1337 onMouseDown: (e) => e.preventDefault(),
1338 children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1339 import_components8.__experimentalHStack,
1340 {
1341 justify: "flex-start",
1342 spacing: 2,
1343 style: { flexGrow: "1" },
1344 children: [
1345 wrapIcon(icon, false),
1346 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.FlexBlock, { children }),
1347 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1348 import_components8.Icon,
1349 {
1350 icon: chevron_down_small_default,
1351 className: clsx_default("boot-dropdown-item__chevron", {
1352 "is-up": isExpanded
1353 })
1354 }
1355 )
1356 ]
1357 }
1358 )
1359 }
1360 ),
1361 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.__unstableAnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1362 import_components8.__unstableMotion.div,
1363 {
1364 initial: { height: 0 },
1365 animate: { height: "auto" },
1366 exit: { height: 0 },
1367 transition: {
1368 type: "tween",
1369 duration: disableMotion ? 0 : ANIMATION_DURATION,
1370 ease: "easeOut"
1371 },
1372 className: "boot-dropdown-item__children",
1373 children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1374 NavigationItem,
1375 {
1376 to: item.to,
1377 shouldShowPlaceholder: false,
1378 children: item.label
1379 },
1380 index
1381 ))
1382 }
1383 ) })
1384 ] });
1385 }
1386
1387 // packages/boot/build-module/components/navigation/navigation-screen/index.mjs
1388 var import_components9 = __toESM(require_components(), 1);
1389 var import_i18n4 = __toESM(require_i18n(), 1);
1390 var import_compose2 = __toESM(require_compose(), 1);
1391 var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
1392 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c5e42e1495']")) {
1393 const style = document.createElement("style");
1394 style.setAttribute("data-wp-hash", "c5e42e1495");
1395 style.appendChild(document.createTextNode(".boot-navigation-screen{padding-block-end:4px}.boot-navigation-screen .components-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e)}.boot-navigation-screen__title-icon{padding:12px 16px 8px;position:sticky;top:0}.boot-navigation-screen__title{flex-grow:1;overflow-wrap:break-word}.boot-navigation-screen__title.boot-navigation-screen__title,.boot-navigation-screen__title.boot-navigation-screen__title .boot-navigation-screen__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);line-height:32px}.boot-navigation-screen__actions{display:flex;flex-shrink:0}"));
1396 document.head.appendChild(style);
1397 }
1398 var ANIMATION_DURATION2 = 0.3;
1399 var slideVariants = {
1400 initial: (direction) => ({
1401 x: direction === "forward" ? 100 : -100,
1402 opacity: 0
1403 }),
1404 animate: {
1405 x: 0,
1406 opacity: 1
1407 },
1408 exit: (direction) => ({
1409 x: direction === "forward" ? 100 : -100,
1410 opacity: 0
1411 })
1412 };
1413 function NavigationScreen({
1414 isRoot,
1415 title,
1416 actions,
1417 content,
1418 description,
1419 animationDirection,
1420 backMenuItem,
1421 backButtonRef,
1422 navigationKey,
1423 onNavigate
1424 }) {
1425 const icon = (0, import_i18n4.isRTL)() ? chevron_right_default : chevron_left_default;
1426 const disableMotion = (0, import_compose2.useReducedMotion)();
1427 const handleBackClick = (e) => {
1428 e.preventDefault();
1429 onNavigate({ id: backMenuItem, direction: "backward" });
1430 };
1431 return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1432 "div",
1433 {
1434 className: "boot-navigation-screen",
1435 style: {
1436 overflow: "hidden",
1437 position: "relative",
1438 display: "grid",
1439 gridTemplateColumns: "1fr",
1440 gridTemplateRows: "1fr"
1441 },
1442 children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components9.__unstableAnimatePresence, { initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1443 import_components9.__unstableMotion.div,
1444 {
1445 custom: animationDirection,
1446 variants: slideVariants,
1447 initial: "initial",
1448 animate: "animate",
1449 exit: "exit",
1450 transition: {
1451 type: "tween",
1452 duration: disableMotion ? 0 : ANIMATION_DURATION2,
1453 ease: [0.33, 0, 0, 1]
1454 },
1455 style: {
1456 width: "100%",
1457 gridColumn: "1",
1458 gridRow: "1"
1459 },
1460 children: [
1461 /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1462 import_components9.__experimentalHStack,
1463 {
1464 spacing: 2,
1465 className: "boot-navigation-screen__title-icon",
1466 children: [
1467 !isRoot && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1468 import_components9.Button,
1469 {
1470 ref: backButtonRef,
1471 icon,
1472 onClick: handleBackClick,
1473 label: (0, import_i18n4.__)("Back"),
1474 size: "small",
1475 variant: "tertiary"
1476 }
1477 ),
1478 /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1479 import_components9.__experimentalHeading,
1480 {
1481 className: "boot-navigation-screen__title",
1482 level: 1,
1483 size: "15px",
1484 children: title
1485 }
1486 ),
1487 actions && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__actions", children: actions })
1488 ]
1489 }
1490 ),
1491 description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__description", children: description }),
1492 content
1493 ]
1494 },
1495 navigationKey
1496 ) })
1497 }
1498 );
1499 }
1500
1501 // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
1502 var import_element6 = __toESM(require_element(), 1);
1503 var import_data5 = __toESM(require_data(), 1);
1504 import { privateApis as routePrivateApis3 } from "@wordpress/route";
1505
1506 // packages/boot/build-module/components/navigation/path-matching.mjs
1507 var isValidParentPath = (currentPath, menuPath) => {
1508 if (!menuPath || menuPath === currentPath) {
1509 return false;
1510 }
1511 const normalizePath = (path) => {
1512 const normalized = path.startsWith("/") ? path : "/" + path;
1513 return normalized.endsWith("/") && normalized.length > 1 ? normalized.slice(0, -1) : normalized;
1514 };
1515 const normalizedCurrent = normalizePath(currentPath);
1516 const normalizedMenu = normalizePath(menuPath);
1517 return normalizedCurrent.startsWith(normalizedMenu) && (normalizedCurrent[normalizedMenu.length] === "/" || normalizedMenu === "/");
1518 };
1519 var findClosestMenuItem = (currentPath, menuItems) => {
1520 const exactMatch = menuItems.find((item) => item.to === currentPath);
1521 if (exactMatch) {
1522 return exactMatch;
1523 }
1524 let bestMatch = null;
1525 let bestPathLength = 0;
1526 for (const item of menuItems) {
1527 if (!item.to) {
1528 continue;
1529 }
1530 if (isValidParentPath(currentPath, item.to)) {
1531 if (item.to.length > bestPathLength) {
1532 bestMatch = item;
1533 bestPathLength = item.to.length;
1534 }
1535 }
1536 }
1537 return bestMatch;
1538 };
1539 var findDrilldownParent = (id, menuItems) => {
1540 if (!id) {
1541 return void 0;
1542 }
1543 const currentItem = menuItems.find((item) => item.id === id);
1544 if (!currentItem) {
1545 return void 0;
1546 }
1547 if (currentItem.parent) {
1548 const parentItem = menuItems.find(
1549 (item) => item.id === currentItem.parent
1550 );
1551 if (parentItem?.parent_type === "drilldown") {
1552 return parentItem.id;
1553 }
1554 if (parentItem) {
1555 return findDrilldownParent(parentItem.id, menuItems);
1556 }
1557 }
1558 return void 0;
1559 };
1560 var findDropdownParent = (id, menuItems) => {
1561 if (!id) {
1562 return void 0;
1563 }
1564 const currentItem = menuItems.find((item) => item.id === id);
1565 if (!currentItem) {
1566 return void 0;
1567 }
1568 if (currentItem.parent) {
1569 const parentItem = menuItems.find(
1570 (item) => item.id === currentItem.parent
1571 );
1572 if (parentItem?.parent_type === "dropdown") {
1573 return parentItem.id;
1574 }
1575 }
1576 return void 0;
1577 };
1578
1579 // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
1580 var { useRouter: useRouter2, useMatches } = unlock(routePrivateApis3);
1581 function useSidebarParent() {
1582 const matches = useMatches();
1583 const router = useRouter2();
1584 const menuItems = (0, import_data5.useSelect)(
1585 (select) => (
1586 // @ts-ignore
1587 select(STORE_NAME).getMenuItems()
1588 ),
1589 []
1590 );
1591 const currentPath = matches[matches.length - 1].pathname.slice(
1592 router.options.basepath?.length ?? 0
1593 );
1594 const currentMenuItem = findClosestMenuItem(currentPath, menuItems);
1595 const [parentId, setParentId] = (0, import_element6.useState)(
1596 findDrilldownParent(currentMenuItem?.id, menuItems)
1597 );
1598 const [parentDropdownId, setParentDropdownId] = (0, import_element6.useState)(findDropdownParent(currentMenuItem?.id, menuItems));
1599 (0, import_element6.useEffect)(() => {
1600 const matchedMenuItem = findClosestMenuItem(currentPath, menuItems);
1601 const updatedParentId = findDrilldownParent(
1602 matchedMenuItem?.id,
1603 menuItems
1604 );
1605 const updatedDropdownParent = findDropdownParent(
1606 matchedMenuItem?.id,
1607 menuItems
1608 );
1609 setParentId(updatedParentId);
1610 setParentDropdownId(updatedDropdownParent);
1611 }, [currentPath, menuItems]);
1612 return [
1613 parentId,
1614 setParentId,
1615 parentDropdownId,
1616 setParentDropdownId
1617 ];
1618 }
1619
1620 // packages/boot/build-module/components/navigation/index.mjs
1621 var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
1622 function Navigation() {
1623 const backButtonRef = (0, import_element7.useRef)(null);
1624 const [animationDirection, setAnimationDirection] = (0, import_element7.useState)(null);
1625 const [parentId, setParentId, parentDropdownId, setParentDropdownId] = useSidebarParent();
1626 const menuItems = (0, import_data6.useSelect)(
1627 (select) => (
1628 // @ts-ignore
1629 select(STORE_NAME).getMenuItems()
1630 ),
1631 []
1632 );
1633 const parent = (0, import_element7.useMemo)(
1634 () => menuItems.find((item) => item.id === parentId),
1635 [menuItems, parentId]
1636 );
1637 const navigationKey = parent ? `drilldown-${parent.id}` : "root";
1638 const handleNavigate = ({
1639 id,
1640 direction
1641 }) => {
1642 setAnimationDirection(direction);
1643 setParentId(id);
1644 };
1645 const handleDropdownToggle = (dropdownId) => {
1646 setParentDropdownId(
1647 parentDropdownId === dropdownId ? void 0 : dropdownId
1648 );
1649 };
1650 const items = (0, import_element7.useMemo)(
1651 () => menuItems.filter((item) => item.parent === parentId),
1652 [menuItems, parentId]
1653 );
1654 const hasRealIcons = items.some((item) => !!item.icon);
1655 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1656 NavigationScreen,
1657 {
1658 isRoot: !parent,
1659 title: parent ? parent.label : "",
1660 backMenuItem: parent?.parent,
1661 backButtonRef,
1662 animationDirection: animationDirection || void 0,
1663 navigationKey,
1664 onNavigate: handleNavigate,
1665 content: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: items.map((item) => {
1666 if (item.parent_type === "dropdown") {
1667 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1668 DropdownItem,
1669 {
1670 id: item.id,
1671 className: "boot-navigation-item",
1672 icon: item.icon,
1673 shouldShowPlaceholder: hasRealIcons,
1674 isExpanded: parentDropdownId === item.id,
1675 onToggle: () => handleDropdownToggle(item.id),
1676 children: item.label
1677 },
1678 item.id
1679 );
1680 }
1681 if (item.parent_type === "drilldown") {
1682 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1683 DrilldownItem,
1684 {
1685 id: item.id,
1686 icon: item.icon,
1687 shouldShowPlaceholder: hasRealIcons,
1688 onNavigate: handleNavigate,
1689 children: item.label
1690 },
1691 item.id
1692 );
1693 }
1694 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1695 NavigationItem,
1696 {
1697 to: item.to,
1698 icon: item.icon,
1699 shouldShowPlaceholder: hasRealIcons,
1700 children: item.label
1701 },
1702 item.id
1703 );
1704 }) })
1705 }
1706 );
1707 }
1708 var navigation_default = Navigation;
1709
1710 // packages/boot/build-module/components/save-button/index.mjs
1711 var import_element9 = __toESM(require_element(), 1);
1712 var import_data8 = __toESM(require_data(), 1);
1713 var import_i18n6 = __toESM(require_i18n(), 1);
1714 var import_core_data4 = __toESM(require_core_data(), 1);
1715 var import_keycodes2 = __toESM(require_keycodes(), 1);
1716 var import_editor2 = __toESM(require_editor(), 1);
1717 var import_components10 = __toESM(require_components(), 1);
1718
1719 // packages/boot/build-module/components/save-panel/use-save-shortcut.mjs
1720 var import_element8 = __toESM(require_element(), 1);
1721 var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
1722 var import_i18n5 = __toESM(require_i18n(), 1);
1723 var import_data7 = __toESM(require_data(), 1);
1724 var import_core_data3 = __toESM(require_core_data(), 1);
1725 var import_editor = __toESM(require_editor(), 1);
1726 var shortcutName = "core/boot/save";
1727 function useSaveShortcut({
1728 openSavePanel
1729 }) {
1730 const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } = (0, import_data7.useSelect)(import_core_data3.store);
1731 const { hasNonPostEntityChanges, isPostSavingLocked } = (0, import_data7.useSelect)(import_editor.store);
1732 const { savePost } = (0, import_data7.useDispatch)(import_editor.store);
1733 const { registerShortcut, unregisterShortcut } = (0, import_data7.useDispatch)(
1734 import_keyboard_shortcuts.store
1735 );
1736 (0, import_element8.useEffect)(() => {
1737 registerShortcut({
1738 name: shortcutName,
1739 category: "global",
1740 description: (0, import_i18n5.__)("Save your changes."),
1741 keyCombination: {
1742 modifier: "primary",
1743 character: "s"
1744 }
1745 });
1746 return () => {
1747 unregisterShortcut(shortcutName);
1748 };
1749 }, [registerShortcut, unregisterShortcut]);
1750 (0, import_keyboard_shortcuts.useShortcut)(shortcutName, (event) => {
1751 event.preventDefault();
1752 const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
1753 const hasDirtyEntities = !!dirtyEntityRecords.length;
1754 const isSaving = dirtyEntityRecords.some(
1755 (record) => isSavingEntityRecord(record.kind, record.name, record.key)
1756 );
1757 if (!hasDirtyEntities || isSaving) {
1758 return;
1759 }
1760 if (hasNonPostEntityChanges()) {
1761 openSavePanel();
1762 } else if (!isPostSavingLocked()) {
1763 savePost();
1764 }
1765 });
1766 }
1767
1768 // packages/boot/build-module/components/save-button/index.mjs
1769 var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
1770 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='294e36b777']")) {
1771 const style = document.createElement("style");
1772 style.setAttribute("data-wp-hash", "294e36b777");
1773 style.appendChild(document.createTextNode(".boot-save-button{width:100%}"));
1774 document.head.appendChild(style);
1775 }
1776 function SaveButton() {
1777 const [isSaveViewOpen, setIsSaveViewOpened] = (0, import_element9.useState)(false);
1778 const { isSaving, dirtyEntityRecordsCount } = (0, import_data8.useSelect)((select) => {
1779 const { isSavingEntityRecord, __experimentalGetDirtyEntityRecords } = select(import_core_data4.store);
1780 const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
1781 return {
1782 isSaving: dirtyEntityRecords.some(
1783 (record) => isSavingEntityRecord(record.kind, record.name, record.key)
1784 ),
1785 dirtyEntityRecordsCount: dirtyEntityRecords.length
1786 };
1787 }, []);
1788 const [showSavedState, setShowSavedState] = (0, import_element9.useState)(false);
1789 (0, import_element9.useEffect)(() => {
1790 if (isSaving) {
1791 setShowSavedState(true);
1792 }
1793 }, [isSaving]);
1794 const hasChanges = dirtyEntityRecordsCount > 0;
1795 (0, import_element9.useEffect)(() => {
1796 if (!isSaving && hasChanges) {
1797 setShowSavedState(false);
1798 }
1799 }, [isSaving, hasChanges]);
1800 function hideSavedState() {
1801 if (showSavedState) {
1802 setShowSavedState(false);
1803 }
1804 }
1805 const shouldShowButton = hasChanges || showSavedState;
1806 useSaveShortcut({ openSavePanel: () => setIsSaveViewOpened(true) });
1807 if (!shouldShowButton) {
1808 return null;
1809 }
1810 const isInSavedState = showSavedState && !hasChanges;
1811 const disabled = isSaving || isInSavedState;
1812 const getLabel = () => {
1813 if (isInSavedState) {
1814 return (0, import_i18n6.__)("Saved");
1815 }
1816 return (0, import_i18n6.sprintf)(
1817 // translators: %d: number of unsaved changes (number).
1818 (0, import_i18n6._n)(
1819 "Review %d change\u2026",
1820 "Review %d changes\u2026",
1821 dirtyEntityRecordsCount
1822 ),
1823 dirtyEntityRecordsCount
1824 );
1825 };
1826 const label = getLabel();
1827 return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1828 /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1829 import_components10.Tooltip,
1830 {
1831 text: hasChanges ? label : void 0,
1832 shortcut: import_keycodes2.displayShortcut.primary("s"),
1833 children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1834 import_components10.Button,
1835 {
1836 variant: "primary",
1837 size: "compact",
1838 onClick: () => setIsSaveViewOpened(true),
1839 onBlur: hideSavedState,
1840 disabled,
1841 accessibleWhenDisabled: true,
1842 isBusy: isSaving,
1843 "aria-keyshortcuts": import_keycodes2.rawShortcut.primary("s"),
1844 className: "boot-save-button",
1845 icon: isInSavedState ? check_default : void 0,
1846 children: label
1847 }
1848 )
1849 }
1850 ),
1851 isSaveViewOpen && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1852 import_components10.Modal,
1853 {
1854 title: (0, import_i18n6.__)("Review changes"),
1855 onRequestClose: () => setIsSaveViewOpened(false),
1856 size: "small",
1857 children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1858 import_editor2.EntitiesSavedStates,
1859 {
1860 close: () => setIsSaveViewOpened(false),
1861 variant: "inline"
1862 }
1863 )
1864 }
1865 )
1866 ] });
1867 }
1868
1869 // packages/boot/build-module/components/sidebar/index.mjs
1870 var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
1871 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='6064f6f183']")) {
1872 const style = document.createElement("style");
1873 style.setAttribute("data-wp-hash", "6064f6f183");
1874 style.appendChild(document.createTextNode(".boot-sidebar__scrollable{display:flex;flex-direction:column;height:100%;overflow:auto;position:relative}.boot-sidebar__content{contain:content;flex-grow:1;position:relative}.boot-sidebar__footer{padding:16px 8px 8px 16px}"));
1875 document.head.appendChild(style);
1876 }
1877 function Sidebar() {
1878 return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "boot-sidebar__scrollable", children: [
1879 /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(site_hub_default, {}),
1880 /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__content", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(navigation_default, {}) }),
1881 /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__footer", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SaveButton, {}) })
1882 ] });
1883 }
1884
1885 // packages/boot/build-module/components/save-panel/index.mjs
1886 var import_element10 = __toESM(require_element(), 1);
1887 var import_components11 = __toESM(require_components(), 1);
1888 var import_editor3 = __toESM(require_editor(), 1);
1889 var import_i18n7 = __toESM(require_i18n(), 1);
1890 var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
1891 function SavePanel() {
1892 const [isOpen, setIsOpen] = (0, import_element10.useState)(false);
1893 useSaveShortcut({
1894 openSavePanel: () => setIsOpen(true)
1895 });
1896 if (!isOpen) {
1897 return false;
1898 }
1899 return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1900 import_components11.Modal,
1901 {
1902 className: "edit-site-save-panel__modal",
1903 onRequestClose: () => setIsOpen(false),
1904 title: (0, import_i18n7.__)("Review changes"),
1905 size: "small",
1906 children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1907 import_editor3.EntitiesSavedStates,
1908 {
1909 close: () => setIsOpen(false),
1910 variant: "inline"
1911 }
1912 )
1913 }
1914 );
1915 }
1916
1917 // packages/boot/build-module/components/canvas-renderer/index.mjs
1918 var import_element12 = __toESM(require_element(), 1);
1919
1920 // packages/boot/build-module/components/canvas/index.mjs
1921 var import_element11 = __toESM(require_element(), 1);
1922 var import_components13 = __toESM(require_components(), 1);
1923 import { useNavigate } from "@wordpress/route";
1924
1925 // packages/boot/build-module/components/canvas/back-button.mjs
1926 var import_components12 = __toESM(require_components(), 1);
1927 var import_compose3 = __toESM(require_compose(), 1);
1928 var import_i18n8 = __toESM(require_i18n(), 1);
1929 var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
1930 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c8750e18d1']")) {
1931 const style = document.createElement("style");
1932 style.setAttribute("data-wp-hash", "c8750e18d1");
1933 style.appendChild(document.createTextNode(".boot-canvas-back-button{height:64px;left:0;position:absolute;top:0;width:64px;z-index:100}.boot-canvas-back-button__container{height:100%;position:relative;width:100%}.boot-canvas-back-button__link.components-button{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);border-radius:0;display:inline-flex;height:64px;justify-content:center;padding:0;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-canvas-back-button__link.components-button{transition:outline .1s ease-out}}.boot-canvas-back-button__link.components-button:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-canvas-back-button__icon{align-items:center;background-color:#ccc;display:flex;height:64px;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:64px}.boot-canvas-back-button__icon svg{fill:currentColor}.boot-canvas-back-button__icon.has-site-icon{-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px);background-color:#fff9}.interface-interface-skeleton__header{margin-top:0!important}"));
1934 document.head.appendChild(style);
1935 }
1936 var toggleHomeIconVariants = {
1937 edit: {
1938 opacity: 0,
1939 scale: 0.2
1940 },
1941 hover: {
1942 opacity: 1,
1943 scale: 1,
1944 clipPath: "inset( 22% round 2px )"
1945 }
1946 };
1947 function BootBackButton({ length }) {
1948 const disableMotion = (0, import_compose3.useReducedMotion)();
1949 const handleBack = () => {
1950 window.history.back();
1951 };
1952 if (length > 1) {
1953 return null;
1954 }
1955 const transition = {
1956 duration: disableMotion ? 0 : 0.3
1957 };
1958 return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1959 import_components12.__unstableMotion.div,
1960 {
1961 className: "boot-canvas-back-button",
1962 animate: "edit",
1963 initial: "edit",
1964 whileHover: "hover",
1965 whileTap: "tap",
1966 transition,
1967 children: [
1968 /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1969 import_components12.Button,
1970 {
1971 className: "boot-canvas-back-button__link",
1972 onClick: handleBack,
1973 "aria-label": (0, import_i18n8.__)("Go back"),
1974 __next40pxDefaultSize: true,
1975 children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(site_icon_default, {})
1976 }
1977 ),
1978 /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1979 import_components12.__unstableMotion.div,
1980 {
1981 className: "boot-canvas-back-button__icon",
1982 variants: toggleHomeIconVariants,
1983 children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components12.Icon, { icon: arrow_up_left_default })
1984 }
1985 )
1986 ]
1987 }
1988 );
1989 }
1990
1991 // packages/boot/build-module/components/canvas/index.mjs
1992 var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
1993 function Canvas({ canvas }) {
1994 const [Editor, setEditor] = (0, import_element11.useState)(null);
1995 const navigate = useNavigate();
1996 (0, import_element11.useEffect)(() => {
1997 import("@wordpress/lazy-editor").then((module) => {
1998 setEditor(() => module.Editor);
1999 }).catch((error) => {
2000 console.error("Failed to load lazy editor:", error);
2001 });
2002 }, []);
2003 if (!Editor) {
2004 return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2005 "div",
2006 {
2007 style: {
2008 display: "flex",
2009 justifyContent: "center",
2010 alignItems: "center",
2011 height: "100%",
2012 padding: "2rem"
2013 },
2014 children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components13.Spinner, {})
2015 }
2016 );
2017 }
2018 const backButton = !canvas.isPreview ? ({ length }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BootBackButton, { length }) : void 0;
2019 return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { height: "100%", position: "relative" }, children: [
2020 /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2021 "div",
2022 {
2023 style: { height: "100%" },
2024 inert: canvas.isPreview ? "true" : void 0,
2025 children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2026 Editor,
2027 {
2028 postType: canvas.postType,
2029 postId: canvas.postId,
2030 settings: {
2031 isPreviewMode: canvas.isPreview,
2032 styles: canvas.isPreview ? [{ css: "body{min-height:100vh;}" }] : []
2033 },
2034 backButton
2035 }
2036 )
2037 }
2038 ),
2039 canvas.isPreview && canvas.editLink && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2040 "div",
2041 {
2042 onClick: () => navigate({ to: canvas.editLink }),
2043 onKeyDown: (e) => {
2044 if (e.key === "Enter" || e.key === " ") {
2045 e.preventDefault();
2046 navigate({ to: canvas.editLink });
2047 }
2048 },
2049 style: {
2050 position: "absolute",
2051 inset: 0,
2052 cursor: "pointer",
2053 zIndex: 1
2054 },
2055 role: "button",
2056 tabIndex: 0,
2057 "aria-label": "Click to edit"
2058 }
2059 )
2060 ] });
2061 }
2062
2063 // packages/boot/build-module/components/canvas-renderer/index.mjs
2064 var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
2065 function CanvasRenderer({
2066 canvas,
2067 routeContentModule
2068 }) {
2069 const [CustomCanvas, setCustomCanvas] = (0, import_element12.useState)(null);
2070 (0, import_element12.useEffect)(() => {
2071 if (canvas === null && routeContentModule) {
2072 import(routeContentModule).then((module) => {
2073 setCustomCanvas(() => module.canvas);
2074 }).catch((error) => {
2075 console.error("Failed to load custom canvas:", error);
2076 });
2077 } else {
2078 setCustomCanvas(null);
2079 }
2080 }, [canvas, routeContentModule]);
2081 if (canvas === void 0) {
2082 return null;
2083 }
2084 if (canvas === null) {
2085 if (!CustomCanvas) {
2086 return null;
2087 }
2088 return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CustomCanvas, {});
2089 }
2090 return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Canvas, { canvas });
2091 }
2092
2093 // packages/boot/build-module/components/app/use-route-title.mjs
2094 var import_element13 = __toESM(require_element(), 1);
2095 var import_data9 = __toESM(require_data(), 1);
2096 var import_core_data5 = __toESM(require_core_data(), 1);
2097 var import_i18n9 = __toESM(require_i18n(), 1);
2098 var import_html_entities2 = __toESM(require_html_entities(), 1);
2099 import { speak } from "@wordpress/a11y";
2100 import { privateApis as routePrivateApis4 } from "@wordpress/route";
2101 var { useLocation, useMatches: useMatches2 } = unlock(routePrivateApis4);
2102 function useRouteTitle() {
2103 const location = useLocation();
2104 const matches = useMatches2();
2105 const currentMatch = matches[matches.length - 1];
2106 const routeTitle = currentMatch?.loaderData?.title;
2107 const siteTitle = (0, import_data9.useSelect)(
2108 (select) => select(import_core_data5.store).getEntityRecord(
2109 "root",
2110 "__unstableBase"
2111 )?.name,
2112 []
2113 );
2114 const isInitialLocationRef = (0, import_element13.useRef)(true);
2115 (0, import_element13.useEffect)(() => {
2116 isInitialLocationRef.current = false;
2117 }, [location]);
2118 (0, import_element13.useEffect)(() => {
2119 if (isInitialLocationRef.current) {
2120 return;
2121 }
2122 if (routeTitle && typeof routeTitle === "string" && siteTitle && typeof siteTitle === "string") {
2123 const decodedRouteTitle = (0, import_html_entities2.decodeEntities)(routeTitle);
2124 const decodedSiteTitle = (0, import_html_entities2.decodeEntities)(siteTitle);
2125 const formattedTitle = (0, import_i18n9.sprintf)(
2126 /* translators: Admin document title. 1: Admin screen name, 2: Site name. */
2127 (0, import_i18n9.__)("%1$s \u2039 %2$s \u2014 WordPress"),
2128 decodedRouteTitle,
2129 decodedSiteTitle
2130 );
2131 document.title = formattedTitle;
2132 if (decodedRouteTitle) {
2133 speak(decodedRouteTitle, "assertive");
2134 }
2135 }
2136 }, [routeTitle, siteTitle, location]);
2137 }
2138
2139 // packages/boot/build-module/components/user-theme-provider/index.mjs
2140 var import_theme = __toESM(require_theme(), 1);
2141 var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
2142 var ThemeProvider = unlock(import_theme.privateApis).ThemeProvider;
2143 var THEME_PRIMARY_COLORS = /* @__PURE__ */ new Map([
2144 ["light", "#0085ba"],
2145 ["modern", "#3858e9"],
2146 ["blue", "#096484"],
2147 ["coffee", "#46403c"],
2148 ["ectoplasm", "#523f6d"],
2149 ["midnight", "#e14d43"],
2150 ["ocean", "#627c83"],
2151 ["sunrise", "#dd823b"]
2152 ]);
2153 function getAdminThemePrimaryColor() {
2154 const theme = document.body.className.match(/admin-color-([a-z]+)/)?.[1];
2155 return theme && THEME_PRIMARY_COLORS.get(theme);
2156 }
2157 function UserThemeProvider({
2158 color,
2159 ...restProps
2160 }) {
2161 const primary = getAdminThemePrimaryColor();
2162 return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ThemeProvider, { ...restProps, color: { primary, ...color } });
2163 }
2164
2165 // packages/boot/build-module/components/root/index.mjs
2166 var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
2167 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='d63512417f']")) {
2168 const style = document.createElement("style");
2169 style.setAttribute("data-wp-hash", "d63512417f");
2170 style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:pointer;left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
2171 document.head.appendChild(style);
2172 }
2173 var { useLocation: useLocation2, useMatches: useMatches3, Outlet } = unlock(routePrivateApis5);
2174 function Root() {
2175 const matches = useMatches3();
2176 const location = useLocation2();
2177 const currentMatch = matches[matches.length - 1];
2178 const canvas = currentMatch?.loaderData?.canvas;
2179 const routeContentModule = currentMatch?.loaderData?.routeContentModule;
2180 const isFullScreen = canvas && !canvas.isPreview;
2181 useRouteTitle();
2182 const isMobileViewport = (0, import_compose4.useViewportMatch)("medium", "<");
2183 const [isMobileSidebarOpen, setIsMobileSidebarOpen] = (0, import_element14.useState)(false);
2184 const disableMotion = (0, import_compose4.useReducedMotion)();
2185 (0, import_element14.useEffect)(() => {
2186 setIsMobileSidebarOpen(false);
2187 }, [location.pathname, isMobileViewport]);
2188 return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UserThemeProvider, { isRoot: true, color: { bg: "#f8f8f8" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UserThemeProvider, { color: { bg: "#1d2327" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2189 "div",
2190 {
2191 className: clsx_default("boot-layout", {
2192 "has-canvas": !!canvas || canvas === null,
2193 "has-full-canvas": isFullScreen
2194 }),
2195 children: [
2196 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SavePanel, {}),
2197 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_notices.SnackbarNotices, { className: "boot-notices__snackbar" }),
2198 isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(page_default.SidebarToggleFill, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2199 import_components14.Button,
2200 {
2201 icon: menu_default,
2202 onClick: () => setIsMobileSidebarOpen(true),
2203 label: (0, import_i18n10.__)("Open navigation panel"),
2204 size: "compact"
2205 }
2206 ) }),
2207 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2208 import_components14.__unstableMotion.div,
2209 {
2210 initial: { opacity: 0 },
2211 animate: { opacity: 1 },
2212 exit: { opacity: 0 },
2213 transition: {
2214 type: "tween",
2215 duration: disableMotion ? 0 : 0.2,
2216 ease: "easeOut"
2217 },
2218 className: "boot-layout__sidebar-backdrop",
2219 onClick: () => setIsMobileSidebarOpen(false),
2220 onKeyDown: (event) => {
2221 if (event.key === "Escape") {
2222 setIsMobileSidebarOpen(false);
2223 }
2224 },
2225 role: "button",
2226 tabIndex: -1,
2227 "aria-label": (0, import_i18n10.__)(
2228 "Close navigation panel"
2229 )
2230 }
2231 ) }),
2232 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2233 import_components14.__unstableMotion.div,
2234 {
2235 initial: { x: "-100%" },
2236 animate: { x: 0 },
2237 exit: { x: "-100%" },
2238 transition: {
2239 type: "tween",
2240 duration: disableMotion ? 0 : 0.2,
2241 ease: "easeOut"
2242 },
2243 className: "boot-layout__sidebar is-mobile",
2244 children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {})
2245 }
2246 ) }),
2247 !isMobileViewport && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {}) }),
2248 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
2249 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Outlet, {}),
2250 (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2251 "div",
2252 {
2253 className: clsx_default(
2254 "boot-layout__canvas",
2255 {
2256 "has-mobile-drawer": canvas?.isPreview && isMobileViewport
2257 }
2258 ),
2259 children: [
2260 canvas?.isPreview && isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__mobile-sidebar-drawer", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2261 import_components14.Button,
2262 {
2263 icon: menu_default,
2264 onClick: () => setIsMobileSidebarOpen(
2265 true
2266 ),
2267 label: (0, import_i18n10.__)(
2268 "Open navigation panel"
2269 ),
2270 size: "compact"
2271 }
2272 ) }),
2273 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2274 CanvasRenderer,
2275 {
2276 canvas,
2277 routeContentModule
2278 }
2279 )
2280 ]
2281 }
2282 )
2283 ] }) })
2284 ]
2285 }
2286 ) }) }) });
2287 }
2288
2289 // packages/boot/build-module/components/app/router.mjs
2290 var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
2291 var {
2292 createLazyRoute,
2293 createRouter,
2294 createRootRoute,
2295 createRoute,
2296 RouterProvider,
2297 createBrowserHistory,
2298 parseHref,
2299 useLoaderData
2300 } = unlock(routePrivateApis6);
2301 function NotFoundComponent() {
2302 return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(page_default, { title: (0, import_i18n11.__)("Route not found"), hasPadding: true, children: (0, import_i18n11.__)("The page you're looking for does not exist") }) });
2303 }
2304 function createRouteFromDefinition(route, parentRoute) {
2305 let tanstackRoute = createRoute({
2306 getParentRoute: () => parentRoute,
2307 path: route.path,
2308 beforeLoad: async (opts) => {
2309 if (route.route_module) {
2310 const module = await import(route.route_module);
2311 const routeConfig = module.route || {};
2312 if (routeConfig.beforeLoad) {
2313 return routeConfig.beforeLoad({
2314 params: opts.params || {},
2315 search: opts.search || {}
2316 });
2317 }
2318 }
2319 },
2320 loader: async (opts) => {
2321 let routeConfig = {};
2322 if (route.route_module) {
2323 const module = await import(route.route_module);
2324 routeConfig = module.route || {};
2325 }
2326 const context = {
2327 params: opts.params || {},
2328 search: opts.deps || {}
2329 };
2330 const [, loaderData, canvasData, titleData] = await Promise.all([
2331 (0, import_data10.resolveSelect)(import_core_data6.store).getEntityRecord(
2332 "root",
2333 "__unstableBase"
2334 ),
2335 routeConfig.loader ? routeConfig.loader(context) : Promise.resolve(void 0),
2336 routeConfig.canvas ? routeConfig.canvas(context) : Promise.resolve(void 0),
2337 routeConfig.title ? routeConfig.title(context) : Promise.resolve(void 0)
2338 ]);
2339 let inspector = true;
2340 if (routeConfig.inspector) {
2341 inspector = await routeConfig.inspector(context);
2342 }
2343 return {
2344 ...loaderData,
2345 canvas: canvasData,
2346 inspector,
2347 title: titleData,
2348 routeContentModule: route.content_module
2349 };
2350 },
2351 loaderDeps: (opts) => opts.search
2352 });
2353 tanstackRoute = tanstackRoute.lazy(async () => {
2354 const module = route.content_module ? await import(route.content_module) : {};
2355 const Stage = module.stage;
2356 const Inspector = module.inspector;
2357 return createLazyRoute(route.path)({
2358 component: function RouteComponent() {
2359 const { inspector: showInspector } = useLoaderData({ from: route.path }) ?? {};
2360 return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
2361 Stage && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Stage, {}) }),
2362 Inspector && showInspector && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__inspector", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Inspector, {}) })
2363 ] });
2364 }
2365 });
2366 });
2367 return tanstackRoute;
2368 }
2369 function createRouteTree(routes, rootComponent = Root) {
2370 const rootRoute = createRootRoute({
2371 component: rootComponent,
2372 context: () => ({})
2373 });
2374 const dynamicRoutes = routes.map(
2375 (route) => createRouteFromDefinition(route, rootRoute)
2376 );
2377 return rootRoute.addChildren(dynamicRoutes);
2378 }
2379 function createPathHistory() {
2380 return createBrowserHistory({
2381 parseLocation: () => {
2382 const url = new URL(window.location.href);
2383 const path = url.searchParams.get("p") || "/";
2384 const pathHref = `${path}${url.hash}`;
2385 return parseHref(pathHref, window.history.state);
2386 },
2387 createHref: (href) => {
2388 const searchParams = new URLSearchParams(window.location.search);
2389 searchParams.set("p", href);
2390 return `${window.location.pathname}?${searchParams}`;
2391 }
2392 });
2393 }
2394 function Router({
2395 routes,
2396 rootComponent = Root
2397 }) {
2398 const router = (0, import_element15.useMemo)(() => {
2399 const history = createPathHistory();
2400 const routeTree = createRouteTree(routes, rootComponent);
2401 return createRouter({
2402 history,
2403 routeTree,
2404 defaultPreload: "intent",
2405 defaultNotFoundComponent: NotFoundComponent,
2406 defaultViewTransition: {
2407 types: ({
2408 fromLocation
2409 }) => {
2410 if (!fromLocation) {
2411 return false;
2412 }
2413 return ["navigate"];
2414 }
2415 }
2416 });
2417 }, [routes, rootComponent]);
2418 return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RouterProvider, { router });
2419 }
2420
2421 // packages/boot/build-module/components/root/single-page.mjs
2422 var import_notices2 = __toESM(require_notices(), 1);
2423 var import_components15 = __toESM(require_components(), 1);
2424 import { privateApis as routePrivateApis7 } from "@wordpress/route";
2425 var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
2426 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='d63512417f']")) {
2427 const style = document.createElement("style");
2428 style.setAttribute("data-wp-hash", "d63512417f");
2429 style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:pointer;left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
2430 document.head.appendChild(style);
2431 }
2432 var { useMatches: useMatches4, Outlet: Outlet2 } = unlock(routePrivateApis7);
2433 function RootSinglePage() {
2434 const matches = useMatches4();
2435 const currentMatch = matches[matches.length - 1];
2436 const canvas = currentMatch?.loaderData?.canvas;
2437 const routeContentModule = currentMatch?.loaderData?.routeContentModule;
2438 const isFullScreen = canvas && !canvas.isPreview;
2439 useRouteTitle();
2440 return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components15.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UserThemeProvider, { isRoot: true, color: { bg: "#f8f8f8" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UserThemeProvider, { color: { bg: "#1d2327" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2441 "div",
2442 {
2443 className: clsx_default(
2444 "boot-layout boot-layout--single-page",
2445 {
2446 "has-canvas": !!canvas || canvas === null,
2447 "has-full-canvas": isFullScreen
2448 }
2449 ),
2450 children: [
2451 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SavePanel, {}),
2452 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_notices2.SnackbarNotices, { className: "boot-notices__snackbar" }),
2453 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
2454 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Outlet2, {}),
2455 (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__canvas", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2456 CanvasRenderer,
2457 {
2458 canvas,
2459 routeContentModule
2460 }
2461 ) })
2462 ] }) })
2463 ]
2464 }
2465 ) }) }) });
2466 }
2467
2468 // packages/boot/build-module/components/app/index.mjs
2469 var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
2470 function App({ rootComponent }) {
2471 const routes = (0, import_data11.useSelect)((select) => select(store).getRoutes(), []);
2472 return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Router, { routes, rootComponent });
2473 }
2474 async function init({
2475 mountId,
2476 menuItems,
2477 routes,
2478 initModules,
2479 dashboardLink
2480 }) {
2481 (menuItems ?? []).forEach((menuItem) => {
2482 (0, import_data11.dispatch)(store).registerMenuItem(menuItem.id, menuItem);
2483 });
2484 (routes ?? []).forEach((route) => {
2485 (0, import_data11.dispatch)(store).registerRoute(route);
2486 });
2487 if (dashboardLink) {
2488 (0, import_data11.dispatch)(store).setDashboardLink(dashboardLink);
2489 }
2490 for (const moduleId of initModules ?? []) {
2491 const module = await import(moduleId);
2492 await module.init();
2493 }
2494 const rootElement = document.getElementById(mountId);
2495 if (rootElement) {
2496 const root = (0, import_element16.createRoot)(rootElement);
2497 root.render(
2498 /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element16.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, {}) })
2499 );
2500 }
2501 }
2502 async function initSinglePage({
2503 mountId,
2504 routes
2505 }) {
2506 (routes ?? []).forEach((route) => {
2507 (0, import_data11.dispatch)(store).registerRoute(route);
2508 });
2509 const rootElement = document.getElementById(mountId);
2510 if (rootElement) {
2511 const root = (0, import_element16.createRoot)(rootElement);
2512 root.render(
2513 /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element16.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, { rootComponent: RootSinglePage }) })
2514 );
2515 }
2516 }
2517
2518 // packages/boot/build-module/index.mjs
2519 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='11e2a67d86']")) {
2520 const style = document.createElement("style");
2521 style.setAttribute("data-wp-hash", "11e2a67d86");
2522 style.appendChild(document.createTextNode(':root{--wpds-border-radius-lg:8px;--wpds-border-radius-md:4px;--wpds-border-radius-sm:2px;--wpds-border-radius-xs:1px;--wpds-border-width-focus:2px;--wpds-border-width-lg:8px;--wpds-border-width-md:4px;--wpds-border-width-sm:2px;--wpds-border-width-xs:1px;--wpds-color-bg-interactive-brand-strong:#3858e9;--wpds-color-bg-interactive-brand-strong-active:#2e49d9;--wpds-color-bg-interactive-brand-weak:#0000;--wpds-color-bg-interactive-brand-weak-active:#e6eaf4;--wpds-color-bg-interactive-error:#0000;--wpds-color-bg-interactive-error-active:#fff6f5;--wpds-color-bg-interactive-error-strong:#cc1818;--wpds-color-bg-interactive-error-strong-active:#b90000;--wpds-color-bg-interactive-error-weak:#0000;--wpds-color-bg-interactive-error-weak-active:#f6e6e3;--wpds-color-bg-interactive-neutral-strong:#2d2d2d;--wpds-color-bg-interactive-neutral-strong-active:#1e1e1e;--wpds-color-bg-interactive-neutral-strong-disabled:#e6e6e6;--wpds-color-bg-interactive-neutral-weak:#0000;--wpds-color-bg-interactive-neutral-weak-active:#ededed;--wpds-color-bg-interactive-neutral-weak-disabled:#0000;--wpds-color-bg-surface-brand:#ecf0fa;--wpds-color-bg-surface-caution:#fee995;--wpds-color-bg-surface-caution-weak:#fff9ca;--wpds-color-bg-surface-error:#f6e6e3;--wpds-color-bg-surface-error-weak:#fff6f5;--wpds-color-bg-surface-info:#deebfa;--wpds-color-bg-surface-info-weak:#f3f9ff;--wpds-color-bg-surface-neutral:#fcfcfc;--wpds-color-bg-surface-neutral-strong:#fff;--wpds-color-bg-surface-neutral-weak:#f4f4f4;--wpds-color-bg-surface-success:#c6f7cd;--wpds-color-bg-surface-success-weak:#ebffed;--wpds-color-bg-surface-warning:#fde6be;--wpds-color-bg-surface-warning-weak:#fff7e1;--wpds-color-bg-thumb-brand:#3858e9;--wpds-color-bg-thumb-brand-active:#3858e9;--wpds-color-bg-thumb-neutral-disabled:#dbdbdb;--wpds-color-bg-thumb-neutral-weak:#8d8d8d;--wpds-color-bg-thumb-neutral-weak-active:#6e6e6e;--wpds-color-bg-track-neutral:#dbdbdb;--wpds-color-bg-track-neutral-weak:#e4e4e4;--wpds-color-fg-content-caution:#281d00;--wpds-color-fg-content-caution-weak:#826a00;--wpds-color-fg-content-error:#470000;--wpds-color-fg-content-error-weak:#cc1818;--wpds-color-fg-content-info:#001b4f;--wpds-color-fg-content-info-weak:#006bd7;--wpds-color-fg-content-neutral:#1e1e1e;--wpds-color-fg-content-neutral-weak:#707070;--wpds-color-fg-content-success:#002900;--wpds-color-fg-content-success-weak:#008030;--wpds-color-fg-content-warning:#2e1900;--wpds-color-fg-content-warning-weak:#926300;--wpds-color-fg-interactive-brand:#3858e9;--wpds-color-fg-interactive-brand-active:#3858e9;--wpds-color-fg-interactive-brand-strong:#eff0f2;--wpds-color-fg-interactive-brand-strong-active:#eff0f2;--wpds-color-fg-interactive-error:#cc1818;--wpds-color-fg-interactive-error-active:#cc1818;--wpds-color-fg-interactive-error-strong:#f2efef;--wpds-color-fg-interactive-error-strong-active:#f2efef;--wpds-color-fg-interactive-neutral:#1e1e1e;--wpds-color-fg-interactive-neutral-active:#1e1e1e;--wpds-color-fg-interactive-neutral-disabled:#8d8d8d;--wpds-color-fg-interactive-neutral-strong:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-active:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-disabled:#8d8d8d;--wpds-color-fg-interactive-neutral-weak:#707070;--wpds-color-fg-interactive-neutral-weak-disabled:#8d8d8d;--wpds-color-stroke-focus-brand:#3858e9;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8d8d8d;--wpds-color-stroke-interactive-neutral-active:#6e6e6e;--wpds-color-stroke-interactive-neutral-disabled:#dbdbdb;--wpds-color-stroke-interactive-neutral-strong:#6e6e6e;--wpds-color-stroke-surface-brand:#a3b1d4;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-error:#daa39b;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-surface-info:#9fbcdc;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-neutral:#dbdbdb;--wpds-color-stroke-surface-neutral-strong:#8d8d8d;--wpds-color-stroke-surface-neutral-weak:#e4e4e4;--wpds-color-stroke-surface-success:#8ac894;--wpds-color-stroke-surface-success-strong:#008030;--wpds-color-stroke-surface-warning:#d0b481;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-cursor-control:pointer;--wpds-dimension-base:4px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-xs:4px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-xs:4px;--wpds-dimension-surface-width-2xl:960px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-xs:240px;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-typography-font-family-body:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-heading:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-mono:"Menlo","Consolas",monaco,monospace;--wpds-typography-font-size-2xl:32px;--wpds-typography-font-size-lg:15px;--wpds-typography-font-size-md:13px;--wpds-typography-font-size-sm:12px;--wpds-typography-font-size-xl:20px;--wpds-typography-font-size-xs:11px;--wpds-typography-font-weight-medium:499;--wpds-typography-font-weight-regular:400;--wpds-typography-line-height-2xl:40px;--wpds-typography-line-height-lg:28px;--wpds-typography-line-height-md:24px;--wpds-typography-line-height-sm:20px;--wpds-typography-line-height-xl:32px;--wpds-typography-line-height-xs:16px}[data-wpds-theme-provider-id][data-wpds-density=compact]{--wpds-dimension-gap-2xl:24px;--wpds-dimension-gap-3xl:32px;--wpds-dimension-gap-lg:12px;--wpds-dimension-gap-md:8px;--wpds-dimension-gap-sm:4px;--wpds-dimension-gap-xl:20px;--wpds-dimension-gap-xs:4px;--wpds-dimension-padding-2xl:20px;--wpds-dimension-padding-3xl:24px;--wpds-dimension-padding-lg:12px;--wpds-dimension-padding-md:8px;--wpds-dimension-padding-sm:4px;--wpds-dimension-padding-xl:16px;--wpds-dimension-padding-xs:4px}[data-wpds-theme-provider-id][data-wpds-density=comfortable]{--wpds-dimension-gap-2xl:40px;--wpds-dimension-gap-3xl:48px;--wpds-dimension-gap-lg:20px;--wpds-dimension-gap-md:16px;--wpds-dimension-gap-sm:12px;--wpds-dimension-gap-xl:32px;--wpds-dimension-gap-xs:8px;--wpds-dimension-padding-2xl:32px;--wpds-dimension-padding-3xl:40px;--wpds-dimension-padding-lg:20px;--wpds-dimension-padding-md:16px;--wpds-dimension-padding-sm:12px;--wpds-dimension-padding-xl:24px;--wpds-dimension-padding-xs:8px}[data-wpds-theme-provider-id][data-wpds-density=default]{--wpds-dimension-base:4px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-xs:4px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-xs:4px;--wpds-dimension-surface-width-2xl:960px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-xs:240px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}.admin-ui-page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}.admin-ui-page__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-bottom:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;top:0;z-index:1}.admin-ui-page__header-title{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-lg,15px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-lg,28px);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-ui-page__sidebar-toggle-slot:empty{display:none}.admin-ui-page__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-md,24px);margin:0;padding-block-end:var(--wpds-dimension-padding-xs,4px)}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 var(--wpds-dimension-padding-xs,4px);width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:var(--wpds-typography-font-size-sm,12px)}.admin-ui-breadcrumbs__list{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-lg,15px);font-weight:var(--wpds-typography-font-weight-medium,499);gap:0;line-height:var(--wpds-typography-line-height-lg,28px);list-style:none;margin:0;min-height:32px;padding:0}.admin-ui-breadcrumbs__list li:not(:last-child):after{content:"/";margin:0 8px}.admin-ui-breadcrumbs__list h1{font-size:inherit;line-height:inherit}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}'));
2523 document.head.appendChild(style);
2524 }
2525 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='cc217bc358']")) {
2526 const style = document.createElement("style");
2527 style.setAttribute("data-wp-hash", "cc217bc358");
2528 style.appendChild(document.createTextNode("@media (max-width:782px){*{view-transition-name:none!important}}::view-transition-new(root),::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){.boot-layout__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.boot-layout__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.boot-layout.has-full-canvas .boot-layout__canvas .boot-site-icon-link,.boot-layout:not(.has-full-canvas) .boot-site-hub .boot-site-icon-link{view-transition-name:boot--site-icon-link}.boot-layout__stage{view-transition-name:boot--stage}.boot-layout__inspector{view-transition-name:boot--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.boot-layout__stage{view-transition-name:boot-safari--stage}.boot-layout__inspector{view-transition-name:boot-safari--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot-safari--canvas}}.components-popover:first-of-type{view-transition-name:boot--components-popover}}::view-transition-group(boot--canvas),::view-transition-group(boot--canvas-header),::view-transition-group(boot--canvas-sidebar),::view-transition-group(boot-safari--canvas){z-index:1}::view-transition-group(boot--site-icon-link){z-index:2}::view-transition-new(boot--site-icon-link),::view-transition-old(boot--site-icon-link){animation:none}::view-transition-new(boot-safari--canvas),::view-transition-new(boot-safari--inspector),::view-transition-new(boot-safari--stage),::view-transition-old(boot-safari--canvas),::view-transition-old(boot-safari--inspector),::view-transition-old(boot-safari--stage){width:auto}::view-transition-new(boot--canvas),::view-transition-new(boot--inspector),::view-transition-new(boot--stage),::view-transition-old(boot--canvas),::view-transition-old(boot--inspector),::view-transition-old(boot--stage){background:#fff;border-radius:8px;height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}::view-transition-new(boot--canvas),::view-transition-old(boot--canvas){object-position:center top}::view-transition-old(boot--inspector):only-child,::view-transition-old(boot--stage):only-child,::view-transition-old(boot-safari--inspector):only-child,::view-transition-old(boot-safari--stage):only-child{animation-name:zoomOut;will-change:transform,opacity}::view-transition-new(boot--inspector):only-child,::view-transition-new(boot--stage):only-child,::view-transition-new(boot-safari--inspector):only-child,::view-transition-new(boot-safari--stage):only-child{animation-name:zoomIn;will-change:transform,opacity}@keyframes zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}::view-transition-new(boot--canvas):only-child,::view-transition-new(boot-safari--canvas):only-child{animation-name:slideFromRight;will-change:transform}::view-transition-old(boot--canvas):only-child,::view-transition-old(boot-safari--canvas):only-child{animation-name:slideToRight;will-change:transform}@keyframes slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}::view-transition-new(boot--canvas-header):only-child{animation-name:slideHeaderFromTop;will-change:transform}::view-transition-old(boot--canvas-header):only-child{animation-name:slideHeaderToTop;will-change:transform}@keyframes slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes slideHeaderToTop{to{transform:translateY(-100%)}}::view-transition-new(boot--canvas-sidebar):only-child{animation-name:slideSidebarFromRight;will-change:transform}::view-transition-old(boot--canvas-sidebar):only-child{animation-name:slideSidebarToRight;will-change:transform}@keyframes slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes slideSidebarToRight{to{transform:translateX(100%)}}"));
2529 document.head.appendChild(style);
2530 }
2531 export {
2532 init,
2533 initSinglePage,
2534 store
2535 };
2536 //# sourceMappingURL=index.js.map
2537