PluginProbe
Gutenberg / 23.1.1
Gutenberg v23.1.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.1.1, at build/modules/boot/index.js

2,930 lines 135.4 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 // vendor-external:react
53 var require_react = __commonJS({
54 "vendor-external:react"(exports, module) {
55 module.exports = window.React;
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 // package-external:@wordpress/primitives
67 var require_primitives = __commonJS({
68 "package-external:@wordpress/primitives"(exports, module) {
69 module.exports = window.wp.primitives;
70 }
71 });
72
73 // package-external:@wordpress/compose
74 var require_compose = __commonJS({
75 "package-external:@wordpress/compose"(exports, module) {
76 module.exports = window.wp.compose;
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/components
95 var require_components = __commonJS({
96 "package-external:@wordpress/components"(exports, module) {
97 module.exports = window.wp.components;
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_element17 = __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_element16 = __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 // node_modules/@base-ui/utils/esm/useRefWithInit.js
182 var React = __toESM(require_react(), 1);
183 var UNINITIALIZED = {};
184 function useRefWithInit(init2, initArg) {
185 const ref = React.useRef(UNINITIALIZED);
186 if (ref.current === UNINITIALIZED) {
187 ref.current = init2(initArg);
188 }
189 return ref;
190 }
191
192 // node_modules/@base-ui/utils/esm/warn.js
193 var set;
194 if (true) {
195 set = /* @__PURE__ */ new Set();
196 }
197 function warn(...messages) {
198 if (true) {
199 const messageKey = messages.join(" ");
200 if (!set.has(messageKey)) {
201 set.add(messageKey);
202 console.warn(`Base UI: ${messageKey}`);
203 }
204 }
205 }
206
207 // node_modules/@base-ui/react/esm/internals/useRenderElement.js
208 var React4 = __toESM(require_react(), 1);
209
210 // node_modules/@base-ui/utils/esm/useMergedRefs.js
211 function useMergedRefs(a, b, c, d) {
212 const forkRef = useRefWithInit(createForkRef).current;
213 if (didChange(forkRef, a, b, c, d)) {
214 update(forkRef, [a, b, c, d]);
215 }
216 return forkRef.callback;
217 }
218 function useMergedRefsN(refs) {
219 const forkRef = useRefWithInit(createForkRef).current;
220 if (didChangeN(forkRef, refs)) {
221 update(forkRef, refs);
222 }
223 return forkRef.callback;
224 }
225 function createForkRef() {
226 return {
227 callback: null,
228 cleanup: null,
229 refs: []
230 };
231 }
232 function didChange(forkRef, a, b, c, d) {
233 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
234 }
235 function didChangeN(forkRef, newRefs) {
236 return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
237 }
238 function update(forkRef, refs) {
239 forkRef.refs = refs;
240 if (refs.every((ref) => ref == null)) {
241 forkRef.callback = null;
242 return;
243 }
244 forkRef.callback = (instance) => {
245 if (forkRef.cleanup) {
246 forkRef.cleanup();
247 forkRef.cleanup = null;
248 }
249 if (instance != null) {
250 const cleanupCallbacks = Array(refs.length).fill(null);
251 for (let i = 0; i < refs.length; i += 1) {
252 const ref = refs[i];
253 if (ref == null) {
254 continue;
255 }
256 switch (typeof ref) {
257 case "function": {
258 const refCleanup = ref(instance);
259 if (typeof refCleanup === "function") {
260 cleanupCallbacks[i] = refCleanup;
261 }
262 break;
263 }
264 case "object": {
265 ref.current = instance;
266 break;
267 }
268 default:
269 }
270 }
271 forkRef.cleanup = () => {
272 for (let i = 0; i < refs.length; i += 1) {
273 const ref = refs[i];
274 if (ref == null) {
275 continue;
276 }
277 switch (typeof ref) {
278 case "function": {
279 const cleanupCallback = cleanupCallbacks[i];
280 if (typeof cleanupCallback === "function") {
281 cleanupCallback();
282 } else {
283 ref(null);
284 }
285 break;
286 }
287 case "object": {
288 ref.current = null;
289 break;
290 }
291 default:
292 }
293 }
294 };
295 }
296 };
297 }
298
299 // node_modules/@base-ui/utils/esm/getReactElementRef.js
300 var React3 = __toESM(require_react(), 1);
301
302 // node_modules/@base-ui/utils/esm/reactVersion.js
303 var React2 = __toESM(require_react(), 1);
304 var majorVersion = parseInt(React2.version, 10);
305 function isReactVersionAtLeast(reactVersionToCheck) {
306 return majorVersion >= reactVersionToCheck;
307 }
308
309 // node_modules/@base-ui/utils/esm/getReactElementRef.js
310 function getReactElementRef(element) {
311 if (!/* @__PURE__ */ React3.isValidElement(element)) {
312 return null;
313 }
314 const reactElement = element;
315 const propsWithRef = reactElement.props;
316 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
317 }
318
319 // node_modules/@base-ui/utils/esm/mergeObjects.js
320 function mergeObjects(a, b) {
321 if (a && !b) {
322 return a;
323 }
324 if (!a && b) {
325 return b;
326 }
327 if (a || b) {
328 return {
329 ...a,
330 ...b
331 };
332 }
333 return void 0;
334 }
335
336 // node_modules/@base-ui/utils/esm/empty.js
337 var EMPTY_ARRAY = Object.freeze([]);
338 var EMPTY_OBJECT = Object.freeze({});
339
340 // node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
341 function getStateAttributesProps(state, customMapping) {
342 const props = {};
343 for (const key in state) {
344 const value = state[key];
345 if (customMapping?.hasOwnProperty(key)) {
346 const customProps = customMapping[key](value);
347 if (customProps != null) {
348 Object.assign(props, customProps);
349 }
350 continue;
351 }
352 if (value === true) {
353 props[`data-${key.toLowerCase()}`] = "";
354 } else if (value) {
355 props[`data-${key.toLowerCase()}`] = value.toString();
356 }
357 }
358 return props;
359 }
360
361 // node_modules/@base-ui/react/esm/utils/resolveClassName.js
362 function resolveClassName(className, state) {
363 return typeof className === "function" ? className(state) : className;
364 }
365
366 // node_modules/@base-ui/react/esm/utils/resolveStyle.js
367 function resolveStyle(style, state) {
368 return typeof style === "function" ? style(state) : style;
369 }
370
371 // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
372 var EMPTY_PROPS = {};
373 function mergeProps(a, b, c, d, e) {
374 if (!c && !d && !e && !a) {
375 return createInitialMergedProps(b);
376 }
377 let merged = createInitialMergedProps(a);
378 if (b) {
379 merged = mergeInto(merged, b);
380 }
381 if (c) {
382 merged = mergeInto(merged, c);
383 }
384 if (d) {
385 merged = mergeInto(merged, d);
386 }
387 if (e) {
388 merged = mergeInto(merged, e);
389 }
390 return merged;
391 }
392 function mergePropsN(props) {
393 if (props.length === 0) {
394 return EMPTY_PROPS;
395 }
396 if (props.length === 1) {
397 return createInitialMergedProps(props[0]);
398 }
399 let merged = createInitialMergedProps(props[0]);
400 for (let i = 1; i < props.length; i += 1) {
401 merged = mergeInto(merged, props[i]);
402 }
403 return merged;
404 }
405 function createInitialMergedProps(inputProps) {
406 if (isPropsGetter(inputProps)) {
407 return {
408 ...resolvePropsGetter(inputProps, EMPTY_PROPS)
409 };
410 }
411 return copyInitialProps(inputProps);
412 }
413 function mergeInto(merged, inputProps) {
414 if (isPropsGetter(inputProps)) {
415 return resolvePropsGetter(inputProps, merged);
416 }
417 return mutablyMergeInto(merged, inputProps);
418 }
419 function copyInitialProps(inputProps) {
420 const copiedProps = {
421 ...inputProps
422 };
423 for (const propName in copiedProps) {
424 const propValue = copiedProps[propName];
425 if (isEventHandler(propName, propValue)) {
426 copiedProps[propName] = wrapEventHandler(propValue);
427 }
428 }
429 return copiedProps;
430 }
431 function mutablyMergeInto(mergedProps, externalProps) {
432 if (!externalProps) {
433 return mergedProps;
434 }
435 for (const propName in externalProps) {
436 const externalPropValue = externalProps[propName];
437 switch (propName) {
438 case "style": {
439 mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
440 break;
441 }
442 case "className": {
443 mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
444 break;
445 }
446 default: {
447 if (isEventHandler(propName, externalPropValue)) {
448 mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
449 } else {
450 mergedProps[propName] = externalPropValue;
451 }
452 }
453 }
454 }
455 return mergedProps;
456 }
457 function isEventHandler(key, value) {
458 const code0 = key.charCodeAt(0);
459 const code1 = key.charCodeAt(1);
460 const code2 = key.charCodeAt(2);
461 return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
462 }
463 function isPropsGetter(inputProps) {
464 return typeof inputProps === "function";
465 }
466 function resolvePropsGetter(inputProps, previousProps) {
467 if (isPropsGetter(inputProps)) {
468 return inputProps(previousProps);
469 }
470 return inputProps ?? EMPTY_PROPS;
471 }
472 function mergeEventHandlers(ourHandler, theirHandler) {
473 if (!theirHandler) {
474 return ourHandler;
475 }
476 if (!ourHandler) {
477 return wrapEventHandler(theirHandler);
478 }
479 return (...args) => {
480 const event = args[0];
481 if (isSyntheticEvent(event)) {
482 const baseUIEvent = event;
483 makeEventPreventable(baseUIEvent);
484 const result2 = theirHandler(...args);
485 if (!baseUIEvent.baseUIHandlerPrevented) {
486 ourHandler?.(...args);
487 }
488 return result2;
489 }
490 const result = theirHandler(...args);
491 ourHandler?.(...args);
492 return result;
493 };
494 }
495 function wrapEventHandler(handler) {
496 if (!handler) {
497 return handler;
498 }
499 return (...args) => {
500 const event = args[0];
501 if (isSyntheticEvent(event)) {
502 makeEventPreventable(event);
503 }
504 return handler(...args);
505 };
506 }
507 function makeEventPreventable(event) {
508 event.preventBaseUIHandler = () => {
509 event.baseUIHandlerPrevented = true;
510 };
511 return event;
512 }
513 function mergeClassNames(ourClassName, theirClassName) {
514 if (theirClassName) {
515 if (ourClassName) {
516 return theirClassName + " " + ourClassName;
517 }
518 return theirClassName;
519 }
520 return ourClassName;
521 }
522 function isSyntheticEvent(event) {
523 return event != null && typeof event === "object" && "nativeEvent" in event;
524 }
525
526 // node_modules/@base-ui/react/esm/internals/useRenderElement.js
527 var import_react = __toESM(require_react(), 1);
528 function useRenderElement(element, componentProps, params = {}) {
529 const renderProp = componentProps.render;
530 const outProps = useRenderElementProps(componentProps, params);
531 if (params.enabled === false) {
532 return null;
533 }
534 const state = params.state ?? EMPTY_OBJECT;
535 return evaluateRenderProp(element, renderProp, outProps, state);
536 }
537 function useRenderElementProps(componentProps, params = {}) {
538 const {
539 className: classNameProp,
540 style: styleProp,
541 render: renderProp
542 } = componentProps;
543 const {
544 state = EMPTY_OBJECT,
545 ref,
546 props,
547 stateAttributesMapping,
548 enabled = true
549 } = params;
550 const className = enabled ? resolveClassName(classNameProp, state) : void 0;
551 const style = enabled ? resolveStyle(styleProp, state) : void 0;
552 const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
553 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
554 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
555 if (typeof document !== "undefined") {
556 if (!enabled) {
557 useMergedRefs(null, null);
558 } else if (Array.isArray(ref)) {
559 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
560 } else {
561 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
562 }
563 }
564 if (!enabled) {
565 return EMPTY_OBJECT;
566 }
567 if (className !== void 0) {
568 outProps.className = mergeClassNames(outProps.className, className);
569 }
570 if (style !== void 0) {
571 outProps.style = mergeObjects(outProps.style, style);
572 }
573 return outProps;
574 }
575 function resolveRenderFunctionProps(props) {
576 if (Array.isArray(props)) {
577 return mergePropsN(props);
578 }
579 return mergeProps(void 0, props);
580 }
581 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
582 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
583 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
584 function evaluateRenderProp(element, render, props, state) {
585 if (render) {
586 if (typeof render === "function") {
587 if (true) {
588 warnIfRenderPropLooksLikeComponent(render);
589 }
590 return render(props, state);
591 }
592 const mergedProps = mergeProps(props, render.props);
593 mergedProps.ref = props.ref;
594 let newElement = render;
595 if (newElement?.$$typeof === REACT_LAZY_TYPE) {
596 const children = React4.Children.toArray(render);
597 newElement = children[0];
598 }
599 if (true) {
600 if (!/* @__PURE__ */ React4.isValidElement(newElement)) {
601 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"));
602 }
603 }
604 return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps);
605 }
606 if (element) {
607 if (typeof element === "string") {
608 return renderTag(element, props);
609 }
610 }
611 throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
612 }
613 function warnIfRenderPropLooksLikeComponent(renderFn) {
614 const functionName = renderFn.name;
615 if (functionName.length === 0) {
616 return;
617 }
618 if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
619 return;
620 }
621 if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
622 return;
623 }
624 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");
625 }
626 function renderTag(Tag, props) {
627 if (Tag === "button") {
628 return /* @__PURE__ */ (0, import_react.createElement)("button", {
629 type: "button",
630 ...props,
631 key: props.key
632 });
633 }
634 if (Tag === "img") {
635 return /* @__PURE__ */ (0, import_react.createElement)("img", {
636 alt: "",
637 ...props,
638 key: props.key
639 });
640 }
641 return /* @__PURE__ */ React4.createElement(Tag, props);
642 }
643
644 // node_modules/@base-ui/react/esm/use-render/useRender.js
645 function useRender(params) {
646 return useRenderElement(params.defaultTagName ?? "div", params, params);
647 }
648
649 // packages/ui/build-module/text/text.mjs
650 var import_element = __toESM(require_element(), 1);
651 var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
652 function getRuntime() {
653 const globalScope = globalThis;
654 if (globalScope.__wpStyleRuntime) {
655 return globalScope.__wpStyleRuntime;
656 }
657 globalScope.__wpStyleRuntime = {
658 documents: /* @__PURE__ */ new Map(),
659 styles: /* @__PURE__ */ new Map(),
660 injectedStyles: /* @__PURE__ */ new WeakMap()
661 };
662 if (typeof document !== "undefined") {
663 registerDocument(document);
664 }
665 return globalScope.__wpStyleRuntime;
666 }
667 function documentContainsStyleHash(targetDocument, hash) {
668 if (!targetDocument.head) {
669 return false;
670 }
671 for (const style of targetDocument.head.querySelectorAll(
672 `style[${STYLE_HASH_ATTRIBUTE}]`
673 )) {
674 if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
675 return true;
676 }
677 }
678 return false;
679 }
680 function injectStyle(targetDocument, hash, css) {
681 if (!targetDocument.head) {
682 return;
683 }
684 const runtime = getRuntime();
685 let injectedStyles = runtime.injectedStyles.get(targetDocument);
686 if (!injectedStyles) {
687 injectedStyles = /* @__PURE__ */ new Set();
688 runtime.injectedStyles.set(targetDocument, injectedStyles);
689 }
690 if (injectedStyles.has(hash)) {
691 return;
692 }
693 if (documentContainsStyleHash(targetDocument, hash)) {
694 injectedStyles.add(hash);
695 return;
696 }
697 const style = targetDocument.createElement("style");
698 style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
699 style.appendChild(targetDocument.createTextNode(css));
700 targetDocument.head.appendChild(style);
701 injectedStyles.add(hash);
702 }
703 function registerDocument(targetDocument) {
704 const runtime = getRuntime();
705 runtime.documents.set(
706 targetDocument,
707 (runtime.documents.get(targetDocument) ?? 0) + 1
708 );
709 for (const [hash, css] of runtime.styles) {
710 injectStyle(targetDocument, hash, css);
711 }
712 return () => {
713 const count = runtime.documents.get(targetDocument);
714 if (count === void 0) {
715 return;
716 }
717 if (count <= 1) {
718 runtime.documents.delete(targetDocument);
719 return;
720 }
721 runtime.documents.set(targetDocument, count - 1);
722 };
723 }
724 function registerStyle(hash, css) {
725 const runtime = getRuntime();
726 runtime.styles.set(hash, css);
727 for (const targetDocument of runtime.documents.keys()) {
728 injectStyle(targetDocument, hash, css);
729 }
730 }
731 if (typeof process === "undefined" || true) {
732 registerStyle("4130d64bea", '@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);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-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}');
733 }
734 var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
735 if (typeof process === "undefined" || true) {
736 registerStyle("1fb29d3a3c", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");
737 }
738 var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
739 var Text = (0, import_element.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
740 const element = useRender({
741 render,
742 defaultTagName: "span",
743 ref,
744 props: mergeProps(props, {
745 className: clsx_default(
746 style_default.text,
747 global_css_defense_default.heading,
748 global_css_defense_default.p,
749 style_default[variant],
750 className
751 )
752 })
753 });
754 return element;
755 });
756
757 // packages/icons/build-module/icon/index.mjs
758 var import_element2 = __toESM(require_element(), 1);
759 var icon_default = (0, import_element2.forwardRef)(
760 ({ icon, size = 24, ...props }, ref) => {
761 return (0, import_element2.cloneElement)(icon, {
762 width: size,
763 height: size,
764 ...props,
765 ref
766 });
767 }
768 );
769
770 // packages/icons/build-module/library/arrow-up-left.mjs
771 var import_primitives = __toESM(require_primitives(), 1);
772 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
773 var arrow_up_left_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z" }) });
774
775 // packages/icons/build-module/library/check.mjs
776 var import_primitives2 = __toESM(require_primitives(), 1);
777 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
778 var check_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.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" }) });
779
780 // packages/icons/build-module/library/chevron-down-small.mjs
781 var import_primitives3 = __toESM(require_primitives(), 1);
782 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
783 var chevron_down_small_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.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" }) });
784
785 // packages/icons/build-module/library/chevron-left-small.mjs
786 var import_primitives4 = __toESM(require_primitives(), 1);
787 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
788 var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.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" }) });
789
790 // packages/icons/build-module/library/chevron-left.mjs
791 var import_primitives5 = __toESM(require_primitives(), 1);
792 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
793 var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });
794
795 // packages/icons/build-module/library/chevron-right-small.mjs
796 var import_primitives6 = __toESM(require_primitives(), 1);
797 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
798 var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.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" }) });
799
800 // packages/icons/build-module/library/chevron-right.mjs
801 var import_primitives7 = __toESM(require_primitives(), 1);
802 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
803 var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });
804
805 // packages/icons/build-module/library/menu.mjs
806 var import_primitives8 = __toESM(require_primitives(), 1);
807 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
808 var menu_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });
809
810 // packages/icons/build-module/library/search.mjs
811 var import_primitives9 = __toESM(require_primitives(), 1);
812 var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
813 var search_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.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" }) });
814
815 // packages/icons/build-module/library/wordpress.mjs
816 var import_primitives10 = __toESM(require_primitives(), 1);
817 var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
818 var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.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" }) });
819
820 // packages/ui/build-module/stack/stack.mjs
821 var import_element3 = __toESM(require_element(), 1);
822 var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
823 function getRuntime2() {
824 const globalScope = globalThis;
825 if (globalScope.__wpStyleRuntime) {
826 return globalScope.__wpStyleRuntime;
827 }
828 globalScope.__wpStyleRuntime = {
829 documents: /* @__PURE__ */ new Map(),
830 styles: /* @__PURE__ */ new Map(),
831 injectedStyles: /* @__PURE__ */ new WeakMap()
832 };
833 if (typeof document !== "undefined") {
834 registerDocument2(document);
835 }
836 return globalScope.__wpStyleRuntime;
837 }
838 function documentContainsStyleHash2(targetDocument, hash) {
839 if (!targetDocument.head) {
840 return false;
841 }
842 for (const style of targetDocument.head.querySelectorAll(
843 `style[${STYLE_HASH_ATTRIBUTE2}]`
844 )) {
845 if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
846 return true;
847 }
848 }
849 return false;
850 }
851 function injectStyle2(targetDocument, hash, css) {
852 if (!targetDocument.head) {
853 return;
854 }
855 const runtime = getRuntime2();
856 let injectedStyles = runtime.injectedStyles.get(targetDocument);
857 if (!injectedStyles) {
858 injectedStyles = /* @__PURE__ */ new Set();
859 runtime.injectedStyles.set(targetDocument, injectedStyles);
860 }
861 if (injectedStyles.has(hash)) {
862 return;
863 }
864 if (documentContainsStyleHash2(targetDocument, hash)) {
865 injectedStyles.add(hash);
866 return;
867 }
868 const style = targetDocument.createElement("style");
869 style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
870 style.appendChild(targetDocument.createTextNode(css));
871 targetDocument.head.appendChild(style);
872 injectedStyles.add(hash);
873 }
874 function registerDocument2(targetDocument) {
875 const runtime = getRuntime2();
876 runtime.documents.set(
877 targetDocument,
878 (runtime.documents.get(targetDocument) ?? 0) + 1
879 );
880 for (const [hash, css] of runtime.styles) {
881 injectStyle2(targetDocument, hash, css);
882 }
883 return () => {
884 const count = runtime.documents.get(targetDocument);
885 if (count === void 0) {
886 return;
887 }
888 if (count <= 1) {
889 runtime.documents.delete(targetDocument);
890 return;
891 }
892 runtime.documents.set(targetDocument, count - 1);
893 };
894 }
895 function registerStyle2(hash, css) {
896 const runtime = getRuntime2();
897 runtime.styles.set(hash, css);
898 for (const targetDocument of runtime.documents.keys()) {
899 injectStyle2(targetDocument, hash, css);
900 }
901 }
902 if (typeof process === "undefined" || true) {
903 registerStyle2("b51ff41489", "@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}");
904 }
905 var style_default2 = { "stack": "_19ce0419607e1896__stack" };
906 var gapTokens = {
907 xs: "var(--wpds-dimension-gap-xs, 4px)",
908 sm: "var(--wpds-dimension-gap-sm, 8px)",
909 md: "var(--wpds-dimension-gap-md, 12px)",
910 lg: "var(--wpds-dimension-gap-lg, 16px)",
911 xl: "var(--wpds-dimension-gap-xl, 24px)",
912 "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
913 "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
914 };
915 var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
916 const style = {
917 gap: gap && gapTokens[gap],
918 alignItems: align,
919 justifyContent: justify,
920 flexDirection: direction,
921 flexWrap: wrap
922 };
923 const element = useRender({
924 render,
925 ref,
926 props: mergeProps(props, { style, className: style_default2.stack })
927 });
928 return element;
929 });
930
931 // packages/admin-ui/build-module/navigable-region/index.mjs
932 var import_element4 = __toESM(require_element(), 1);
933 var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
934 var NavigableRegion = (0, import_element4.forwardRef)(
935 ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
936 return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
937 Tag,
938 {
939 ref,
940 className: clsx_default("admin-ui-navigable-region", className),
941 "aria-label": ariaLabel,
942 role: "region",
943 tabIndex: "-1",
944 ...props,
945 children
946 }
947 );
948 }
949 );
950 NavigableRegion.displayName = "NavigableRegion";
951 var navigable_region_default = NavigableRegion;
952
953 // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
954 var import_components = __toESM(require_components(), 1);
955 var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
956
957 // packages/admin-ui/build-module/page/header.mjs
958 var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
959 var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
960 function getRuntime3() {
961 const globalScope = globalThis;
962 if (globalScope.__wpStyleRuntime) {
963 return globalScope.__wpStyleRuntime;
964 }
965 globalScope.__wpStyleRuntime = {
966 documents: /* @__PURE__ */ new Map(),
967 styles: /* @__PURE__ */ new Map(),
968 injectedStyles: /* @__PURE__ */ new WeakMap()
969 };
970 if (typeof document !== "undefined") {
971 registerDocument3(document);
972 }
973 return globalScope.__wpStyleRuntime;
974 }
975 function documentContainsStyleHash3(targetDocument, hash) {
976 if (!targetDocument.head) {
977 return false;
978 }
979 for (const style of targetDocument.head.querySelectorAll(
980 `style[${STYLE_HASH_ATTRIBUTE3}]`
981 )) {
982 if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
983 return true;
984 }
985 }
986 return false;
987 }
988 function injectStyle3(targetDocument, hash, css) {
989 if (!targetDocument.head) {
990 return;
991 }
992 const runtime = getRuntime3();
993 let injectedStyles = runtime.injectedStyles.get(targetDocument);
994 if (!injectedStyles) {
995 injectedStyles = /* @__PURE__ */ new Set();
996 runtime.injectedStyles.set(targetDocument, injectedStyles);
997 }
998 if (injectedStyles.has(hash)) {
999 return;
1000 }
1001 if (documentContainsStyleHash3(targetDocument, hash)) {
1002 injectedStyles.add(hash);
1003 return;
1004 }
1005 const style = targetDocument.createElement("style");
1006 style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
1007 style.appendChild(targetDocument.createTextNode(css));
1008 targetDocument.head.appendChild(style);
1009 injectedStyles.add(hash);
1010 }
1011 function registerDocument3(targetDocument) {
1012 const runtime = getRuntime3();
1013 runtime.documents.set(
1014 targetDocument,
1015 (runtime.documents.get(targetDocument) ?? 0) + 1
1016 );
1017 for (const [hash, css] of runtime.styles) {
1018 injectStyle3(targetDocument, hash, css);
1019 }
1020 return () => {
1021 const count = runtime.documents.get(targetDocument);
1022 if (count === void 0) {
1023 return;
1024 }
1025 if (count <= 1) {
1026 runtime.documents.delete(targetDocument);
1027 return;
1028 }
1029 runtime.documents.set(targetDocument, count - 1);
1030 };
1031 }
1032 function registerStyle3(hash, css) {
1033 const runtime = getRuntime3();
1034 runtime.styles.set(hash, css);
1035 for (const targetDocument of runtime.documents.keys()) {
1036 injectStyle3(targetDocument, hash, css);
1037 }
1038 }
1039 if (typeof process === "undefined" || true) {
1040 registerStyle3("aa9c241ccc", "._956b6df0898efed0__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}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
1041 }
1042 var style_default3 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
1043 function Header({
1044 headingLevel = 1,
1045 breadcrumbs,
1046 badges,
1047 visual,
1048 title,
1049 subTitle,
1050 actions,
1051 showSidebarToggle = true
1052 }) {
1053 const HeadingTag = `h${headingLevel}`;
1054 return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1055 Stack,
1056 {
1057 direction: "column",
1058 className: style_default3.header,
1059 render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("header", {}),
1060 children: [
1061 /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1062 Stack,
1063 {
1064 className: style_default3["header-content"],
1065 direction: "row",
1066 gap: "sm",
1067 justify: "space-between",
1068 children: [
1069 /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
1070 showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1071 SidebarToggleSlot,
1072 {
1073 bubblesVirtually: true,
1074 className: style_default3["sidebar-toggle-slot"]
1075 }
1076 ),
1077 visual && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1078 "div",
1079 {
1080 className: style_default3["header-visual"],
1081 "aria-hidden": "true",
1082 children: visual
1083 }
1084 ),
1085 title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1086 Text,
1087 {
1088 className: style_default3["header-title"],
1089 render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HeadingTag, {}),
1090 variant: "heading-lg",
1091 children: title
1092 }
1093 ),
1094 breadcrumbs,
1095 badges
1096 ] }),
1097 actions && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1098 Stack,
1099 {
1100 align: "center",
1101 className: style_default3["header-actions"],
1102 direction: "row",
1103 gap: "sm",
1104 children: actions
1105 }
1106 )
1107 ]
1108 }
1109 ),
1110 subTitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1111 Text,
1112 {
1113 render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", {}),
1114 variant: "body-md",
1115 className: style_default3["header-subtitle"],
1116 children: subTitle
1117 }
1118 )
1119 ]
1120 }
1121 );
1122 }
1123
1124 // packages/admin-ui/build-module/page/index.mjs
1125 var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
1126 var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
1127 function getRuntime4() {
1128 const globalScope = globalThis;
1129 if (globalScope.__wpStyleRuntime) {
1130 return globalScope.__wpStyleRuntime;
1131 }
1132 globalScope.__wpStyleRuntime = {
1133 documents: /* @__PURE__ */ new Map(),
1134 styles: /* @__PURE__ */ new Map(),
1135 injectedStyles: /* @__PURE__ */ new WeakMap()
1136 };
1137 if (typeof document !== "undefined") {
1138 registerDocument4(document);
1139 }
1140 return globalScope.__wpStyleRuntime;
1141 }
1142 function documentContainsStyleHash4(targetDocument, hash) {
1143 if (!targetDocument.head) {
1144 return false;
1145 }
1146 for (const style of targetDocument.head.querySelectorAll(
1147 `style[${STYLE_HASH_ATTRIBUTE4}]`
1148 )) {
1149 if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
1150 return true;
1151 }
1152 }
1153 return false;
1154 }
1155 function injectStyle4(targetDocument, hash, css) {
1156 if (!targetDocument.head) {
1157 return;
1158 }
1159 const runtime = getRuntime4();
1160 let injectedStyles = runtime.injectedStyles.get(targetDocument);
1161 if (!injectedStyles) {
1162 injectedStyles = /* @__PURE__ */ new Set();
1163 runtime.injectedStyles.set(targetDocument, injectedStyles);
1164 }
1165 if (injectedStyles.has(hash)) {
1166 return;
1167 }
1168 if (documentContainsStyleHash4(targetDocument, hash)) {
1169 injectedStyles.add(hash);
1170 return;
1171 }
1172 const style = targetDocument.createElement("style");
1173 style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
1174 style.appendChild(targetDocument.createTextNode(css));
1175 targetDocument.head.appendChild(style);
1176 injectedStyles.add(hash);
1177 }
1178 function registerDocument4(targetDocument) {
1179 const runtime = getRuntime4();
1180 runtime.documents.set(
1181 targetDocument,
1182 (runtime.documents.get(targetDocument) ?? 0) + 1
1183 );
1184 for (const [hash, css] of runtime.styles) {
1185 injectStyle4(targetDocument, hash, css);
1186 }
1187 return () => {
1188 const count = runtime.documents.get(targetDocument);
1189 if (count === void 0) {
1190 return;
1191 }
1192 if (count <= 1) {
1193 runtime.documents.delete(targetDocument);
1194 return;
1195 }
1196 runtime.documents.set(targetDocument, count - 1);
1197 };
1198 }
1199 function registerStyle4(hash, css) {
1200 const runtime = getRuntime4();
1201 runtime.styles.set(hash, css);
1202 for (const targetDocument of runtime.documents.keys()) {
1203 injectStyle4(targetDocument, hash, css);
1204 }
1205 }
1206 if (typeof process === "undefined" || true) {
1207 registerStyle4("aa9c241ccc", "._956b6df0898efed0__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}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
1208 }
1209 var style_default4 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
1210 function Page({
1211 headingLevel,
1212 breadcrumbs,
1213 badges,
1214 visual,
1215 title,
1216 subTitle,
1217 children,
1218 className,
1219 actions,
1220 ariaLabel,
1221 hasPadding = false,
1222 showSidebarToggle = true
1223 }) {
1224 const classes = clsx_default(style_default4.page, className);
1225 const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
1226 return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
1227 (title || breadcrumbs || badges || actions || visual) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1228 Header,
1229 {
1230 headingLevel,
1231 breadcrumbs,
1232 badges,
1233 visual,
1234 title,
1235 subTitle,
1236 actions,
1237 showSidebarToggle
1238 }
1239 ),
1240 hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1241 "div",
1242 {
1243 className: clsx_default(
1244 style_default4.content,
1245 style_default4["has-padding"]
1246 ),
1247 children
1248 }
1249 ) : children
1250 ] });
1251 }
1252 Page.SidebarToggleFill = SidebarToggleFill;
1253 var page_default = Page;
1254
1255 // packages/boot/build-module/components/app/router.mjs
1256 var import_data10 = __toESM(require_data(), 1);
1257 var import_core_data6 = __toESM(require_core_data(), 1);
1258 import {
1259 privateApis as routePrivateApis6
1260 } from "@wordpress/route";
1261
1262 // packages/boot/build-module/components/root/index.mjs
1263 var import_notices = __toESM(require_notices(), 1);
1264 var import_compose4 = __toESM(require_compose(), 1);
1265 var import_components14 = __toESM(require_components(), 1);
1266 import { privateApis as routePrivateApis5 } from "@wordpress/route";
1267 var import_element15 = __toESM(require_element(), 1);
1268 var import_i18n10 = __toESM(require_i18n(), 1);
1269
1270 // packages/boot/build-module/components/site-hub/index.mjs
1271 var import_data3 = __toESM(require_data(), 1);
1272 var import_components3 = __toESM(require_components(), 1);
1273 var import_i18n2 = __toESM(require_i18n(), 1);
1274 var import_core_data2 = __toESM(require_core_data(), 1);
1275 var import_html_entities = __toESM(require_html_entities(), 1);
1276 var import_keycodes = __toESM(require_keycodes(), 1);
1277 var import_commands = __toESM(require_commands(), 1);
1278 var import_url = __toESM(require_url(), 1);
1279
1280 // packages/boot/build-module/components/site-icon-link/index.mjs
1281 var import_components2 = __toESM(require_components(), 1);
1282 import { Link, privateApis as routePrivateApis } from "@wordpress/route";
1283
1284 // packages/boot/build-module/lock-unlock.mjs
1285 var import_private_apis = __toESM(require_private_apis(), 1);
1286 var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
1287 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
1288 "@wordpress/boot"
1289 );
1290
1291 // packages/boot/build-module/components/site-icon/index.mjs
1292 var import_data = __toESM(require_data(), 1);
1293 var import_i18n = __toESM(require_i18n(), 1);
1294 var import_core_data = __toESM(require_core_data(), 1);
1295 var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
1296 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='3ada0e3b8a']")) {
1297 const style = document.createElement("style");
1298 style.setAttribute("data-wp-hash", "3ada0e3b8a");
1299 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}"));
1300 document.head.appendChild(style);
1301 }
1302 function SiteIcon({ className }) {
1303 const { isRequestingSite, siteIconUrl } = (0, import_data.useSelect)((select) => {
1304 const { getEntityRecord } = select(import_core_data.store);
1305 const siteData = getEntityRecord(
1306 "root",
1307 "__unstableBase",
1308 void 0
1309 );
1310 return {
1311 isRequestingSite: !siteData,
1312 siteIconUrl: siteData?.site_icon_url
1313 };
1314 }, []);
1315 let icon = null;
1316 if (isRequestingSite && !siteIconUrl) {
1317 icon = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "boot-site-icon__image" });
1318 } else {
1319 icon = siteIconUrl ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1320 "img",
1321 {
1322 className: "boot-site-icon__image",
1323 alt: (0, import_i18n.__)("Site Icon"),
1324 src: siteIconUrl
1325 }
1326 ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1327 icon_default,
1328 {
1329 className: "boot-site-icon__icon",
1330 icon: wordpress_default,
1331 size: 48
1332 }
1333 );
1334 }
1335 return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: clsx_default(className, "boot-site-icon"), children: icon });
1336 }
1337 var site_icon_default = SiteIcon;
1338
1339 // packages/boot/build-module/components/site-icon-link/index.mjs
1340 var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
1341 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='5aacc86eea']")) {
1342 const style = document.createElement("style");
1343 style.setAttribute("data-wp-hash", "5aacc86eea");
1344 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)}"));
1345 document.head.appendChild(style);
1346 }
1347 var { useCanGoBack, useRouter } = unlock(routePrivateApis);
1348 function SiteIconLink({
1349 to,
1350 isBackButton,
1351 ...props
1352 }) {
1353 const router = useRouter();
1354 const canGoBack = useCanGoBack();
1355 return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components2.Tooltip, { text: props["aria-label"], placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1356 Link,
1357 {
1358 to,
1359 "aria-label": props["aria-label"],
1360 className: "boot-site-icon-link",
1361 onClick: (event) => {
1362 if (canGoBack && isBackButton) {
1363 event.preventDefault();
1364 router.history.back();
1365 }
1366 },
1367 children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(site_icon_default, {})
1368 }
1369 ) });
1370 }
1371 var site_icon_link_default = SiteIconLink;
1372
1373 // packages/boot/build-module/store/index.mjs
1374 var import_data2 = __toESM(require_data(), 1);
1375
1376 // packages/boot/build-module/store/reducer.mjs
1377 var initialState = {
1378 menuItems: {},
1379 routes: [],
1380 dashboardLink: void 0
1381 };
1382 function reducer(state = initialState, action) {
1383 switch (action.type) {
1384 case "REGISTER_MENU_ITEM":
1385 return {
1386 ...state,
1387 menuItems: {
1388 ...state.menuItems,
1389 [action.id]: action.menuItem
1390 }
1391 };
1392 case "UPDATE_MENU_ITEM":
1393 return {
1394 ...state,
1395 menuItems: {
1396 ...state.menuItems,
1397 [action.id]: {
1398 ...state.menuItems[action.id],
1399 ...action.updates
1400 }
1401 }
1402 };
1403 case "REGISTER_ROUTE":
1404 return {
1405 ...state,
1406 routes: [...state.routes, action.route]
1407 };
1408 case "SET_DASHBOARD_LINK":
1409 return {
1410 ...state,
1411 dashboardLink: action.dashboardLink
1412 };
1413 }
1414 return state;
1415 }
1416
1417 // packages/boot/build-module/store/actions.mjs
1418 var actions_exports = {};
1419 __export(actions_exports, {
1420 registerMenuItem: () => registerMenuItem,
1421 registerRoute: () => registerRoute,
1422 setDashboardLink: () => setDashboardLink,
1423 updateMenuItem: () => updateMenuItem
1424 });
1425 function registerMenuItem(id, menuItem) {
1426 return {
1427 type: "REGISTER_MENU_ITEM",
1428 id,
1429 menuItem
1430 };
1431 }
1432 function updateMenuItem(id, updates) {
1433 return {
1434 type: "UPDATE_MENU_ITEM",
1435 id,
1436 updates
1437 };
1438 }
1439 function registerRoute(route) {
1440 return {
1441 type: "REGISTER_ROUTE",
1442 route
1443 };
1444 }
1445 function setDashboardLink(dashboardLink) {
1446 return {
1447 type: "SET_DASHBOARD_LINK",
1448 dashboardLink
1449 };
1450 }
1451
1452 // packages/boot/build-module/store/selectors.mjs
1453 var selectors_exports = {};
1454 __export(selectors_exports, {
1455 getDashboardLink: () => getDashboardLink,
1456 getMenuItems: () => getMenuItems,
1457 getRoutes: () => getRoutes
1458 });
1459 function getMenuItems(state) {
1460 return Object.values(state.menuItems);
1461 }
1462 function getRoutes(state) {
1463 return state.routes;
1464 }
1465 function getDashboardLink(state) {
1466 return state.dashboardLink;
1467 }
1468
1469 // packages/boot/build-module/store/index.mjs
1470 var STORE_NAME = "wordpress/boot";
1471 var store = (0, import_data2.createReduxStore)(STORE_NAME, {
1472 reducer,
1473 actions: actions_exports,
1474 selectors: selectors_exports
1475 });
1476 (0, import_data2.register)(store);
1477
1478 // packages/boot/build-module/components/site-hub/index.mjs
1479 var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
1480 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='bc60675bd6']")) {
1481 const style = document.createElement("style");
1482 style.setAttribute("data-wp-hash", "bc60675bd6");
1483 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}"));
1484 document.head.appendChild(style);
1485 }
1486 function SiteHub() {
1487 const { dashboardLink, homeUrl, siteTitle } = (0, import_data3.useSelect)((select) => {
1488 const { getEntityRecord } = select(import_core_data2.store);
1489 const _base = getEntityRecord(
1490 "root",
1491 "__unstableBase"
1492 );
1493 return {
1494 dashboardLink: select(store).getDashboardLink(),
1495 homeUrl: _base?.home,
1496 siteTitle: !_base?.name && !!_base?.url ? (0, import_url.filterURLForDisplay)(_base?.url) : _base?.name
1497 };
1498 }, []);
1499 const { open: openCommandCenter } = (0, import_data3.useDispatch)(import_commands.store);
1500 return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "boot-site-hub", children: [
1501 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1502 site_icon_link_default,
1503 {
1504 to: dashboardLink || "/",
1505 "aria-label": (0, import_i18n2.__)("Go to the Dashboard")
1506 }
1507 ),
1508 /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1509 import_components3.ExternalLink,
1510 {
1511 href: homeUrl ?? "/",
1512 className: "boot-site-hub__title",
1513 children: [
1514 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__title-text", children: siteTitle && (0, import_html_entities.decodeEntities)(siteTitle) }),
1515 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__url", children: (0, import_url.filterURLForDisplay)(homeUrl ?? "") })
1516 ]
1517 }
1518 ),
1519 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components3.__experimentalHStack, { className: "boot-site-hub__actions", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1520 import_components3.Button,
1521 {
1522 variant: "tertiary",
1523 icon: search_default,
1524 onClick: () => openCommandCenter(),
1525 size: "compact",
1526 label: (0, import_i18n2.__)("Open command palette"),
1527 shortcut: import_keycodes.displayShortcut.primary("k")
1528 }
1529 ) })
1530 ] });
1531 }
1532 var site_hub_default = SiteHub;
1533
1534 // packages/boot/build-module/components/navigation/index.mjs
1535 var import_element8 = __toESM(require_element(), 1);
1536 var import_data6 = __toESM(require_data(), 1);
1537
1538 // packages/boot/build-module/components/navigation/navigation-item/index.mjs
1539 var import_components6 = __toESM(require_components(), 1);
1540
1541 // packages/boot/build-module/components/navigation/router-link-item.mjs
1542 var import_element5 = __toESM(require_element(), 1);
1543 var import_components4 = __toESM(require_components(), 1);
1544 import { privateApis as routePrivateApis2 } from "@wordpress/route";
1545 var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
1546 var { createLink } = unlock(routePrivateApis2);
1547 function AnchorOnlyItem(props, forwardedRef) {
1548 return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components4.__experimentalItem, { as: "a", ref: forwardedRef, ...props });
1549 }
1550 var RouterLinkItem = createLink((0, import_element5.forwardRef)(AnchorOnlyItem));
1551 var router_link_item_default = RouterLinkItem;
1552
1553 // packages/boot/build-module/components/navigation/items.mjs
1554 var import_element6 = __toESM(require_element(), 1);
1555 var import_components5 = __toESM(require_components(), 1);
1556 var import_primitives11 = __toESM(require_primitives(), 1);
1557 var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
1558 function isSvg(element) {
1559 return (0, import_element6.isValidElement)(element) && (element.type === import_primitives11.SVG || element.type === "svg");
1560 }
1561 function wrapIcon(icon, shouldShowPlaceholder = true) {
1562 if (isSvg(icon)) {
1563 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components5.Icon, { icon });
1564 }
1565 if (typeof icon === "string" && icon.startsWith("dashicons-")) {
1566 const iconKey = icon.replace(
1567 /^dashicons-/,
1568 ""
1569 );
1570 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1571 import_components5.Dashicon,
1572 {
1573 style: { padding: "2px" },
1574 icon: iconKey,
1575 "aria-hidden": "true"
1576 }
1577 );
1578 }
1579 if (typeof icon === "string" && icon.startsWith("data:")) {
1580 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1581 "img",
1582 {
1583 src: icon,
1584 alt: "",
1585 "aria-hidden": "true",
1586 style: {
1587 width: "20px",
1588 height: "20px",
1589 display: "block",
1590 padding: "2px"
1591 }
1592 }
1593 );
1594 }
1595 if (icon) {
1596 return icon;
1597 }
1598 if (shouldShowPlaceholder) {
1599 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1600 "div",
1601 {
1602 style: { width: "24px", height: "24px" },
1603 "aria-hidden": "true"
1604 }
1605 );
1606 }
1607 return null;
1608 }
1609
1610 // packages/boot/build-module/components/navigation/navigation-item/index.mjs
1611 var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
1612 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='26b8e27d3f']")) {
1613 const style = document.createElement("style");
1614 style.setAttribute("data-wp-hash", "26b8e27d3f");
1615 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}'));
1616 document.head.appendChild(style);
1617 }
1618 function NavigationItem({
1619 className,
1620 icon,
1621 shouldShowPlaceholder = true,
1622 children,
1623 to
1624 }) {
1625 const isExternal = !String(
1626 new URL(to, window.location.origin)
1627 ).startsWith(window.location.origin);
1628 const content = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_components6.__experimentalHStack, { justify: "flex-start", spacing: 2, style: { flexGrow: "1" }, children: [
1629 wrapIcon(icon, shouldShowPlaceholder),
1630 /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components6.FlexBlock, { children })
1631 ] });
1632 if (isExternal) {
1633 return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1634 import_components6.__experimentalItem,
1635 {
1636 as: "a",
1637 href: to,
1638 className: clsx_default("boot-navigation-item", className),
1639 children: content
1640 }
1641 );
1642 }
1643 return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1644 router_link_item_default,
1645 {
1646 to,
1647 className: clsx_default("boot-navigation-item", className),
1648 children: content
1649 }
1650 );
1651 }
1652
1653 // packages/boot/build-module/components/navigation/drilldown-item/index.mjs
1654 var import_components7 = __toESM(require_components(), 1);
1655 var import_i18n3 = __toESM(require_i18n(), 1);
1656 var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
1657 function DrilldownItem({
1658 className,
1659 id,
1660 icon,
1661 shouldShowPlaceholder = true,
1662 children,
1663 onNavigate
1664 }) {
1665 const handleClick = (e) => {
1666 e.preventDefault();
1667 onNavigate({ id, direction: "forward" });
1668 };
1669 return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1670 import_components7.__experimentalItem,
1671 {
1672 className: clsx_default("boot-navigation-item", className),
1673 onClick: handleClick,
1674 children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1675 import_components7.__experimentalHStack,
1676 {
1677 justify: "flex-start",
1678 spacing: 2,
1679 style: { flexGrow: "1" },
1680 children: [
1681 wrapIcon(icon, shouldShowPlaceholder),
1682 /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.FlexBlock, { children }),
1683 /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.Icon, { icon: (0, import_i18n3.isRTL)() ? chevron_left_small_default : chevron_right_small_default })
1684 ]
1685 }
1686 )
1687 }
1688 );
1689 }
1690
1691 // packages/boot/build-module/components/navigation/dropdown-item/index.mjs
1692 var import_components8 = __toESM(require_components(), 1);
1693 var import_compose = __toESM(require_compose(), 1);
1694 var import_data4 = __toESM(require_data(), 1);
1695 var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
1696 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='608eff82f3']")) {
1697 const style = document.createElement("style");
1698 style.setAttribute("data-wp-hash", "608eff82f3");
1699 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)}"));
1700 document.head.appendChild(style);
1701 }
1702 var ANIMATION_DURATION = 0.2;
1703 function DropdownItem({
1704 className,
1705 id,
1706 icon,
1707 children,
1708 isExpanded,
1709 onToggle
1710 }) {
1711 const menuItems = (0, import_data4.useSelect)(
1712 (select) => (
1713 // @ts-ignore
1714 select(STORE_NAME).getMenuItems()
1715 ),
1716 []
1717 );
1718 const items = menuItems.filter((item) => item.parent === id);
1719 const disableMotion = (0, import_compose.useReducedMotion)();
1720 return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boot-dropdown-item", children: [
1721 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1722 import_components8.__experimentalItem,
1723 {
1724 className: clsx_default("boot-navigation-item", className),
1725 onClick: (e) => {
1726 e.preventDefault();
1727 e.stopPropagation();
1728 onToggle();
1729 },
1730 onMouseDown: (e) => e.preventDefault(),
1731 children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1732 import_components8.__experimentalHStack,
1733 {
1734 justify: "flex-start",
1735 spacing: 2,
1736 style: { flexGrow: "1" },
1737 children: [
1738 wrapIcon(icon, false),
1739 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.FlexBlock, { children }),
1740 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1741 import_components8.Icon,
1742 {
1743 icon: chevron_down_small_default,
1744 className: clsx_default("boot-dropdown-item__chevron", {
1745 "is-up": isExpanded
1746 })
1747 }
1748 )
1749 ]
1750 }
1751 )
1752 }
1753 ),
1754 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.__unstableAnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1755 import_components8.__unstableMotion.div,
1756 {
1757 initial: { height: 0 },
1758 animate: { height: "auto" },
1759 exit: { height: 0 },
1760 transition: {
1761 type: "tween",
1762 duration: disableMotion ? 0 : ANIMATION_DURATION,
1763 ease: "easeOut"
1764 },
1765 className: "boot-dropdown-item__children",
1766 children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1767 NavigationItem,
1768 {
1769 to: item.to,
1770 shouldShowPlaceholder: false,
1771 children: item.label
1772 },
1773 index
1774 ))
1775 }
1776 ) })
1777 ] });
1778 }
1779
1780 // packages/boot/build-module/components/navigation/navigation-screen/index.mjs
1781 var import_components9 = __toESM(require_components(), 1);
1782 var import_i18n4 = __toESM(require_i18n(), 1);
1783 var import_compose2 = __toESM(require_compose(), 1);
1784 var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
1785 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c5e42e1495']")) {
1786 const style = document.createElement("style");
1787 style.setAttribute("data-wp-hash", "c5e42e1495");
1788 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}"));
1789 document.head.appendChild(style);
1790 }
1791 var ANIMATION_DURATION2 = 0.3;
1792 var slideVariants = {
1793 initial: (direction) => ({
1794 x: direction === "forward" ? 100 : -100,
1795 opacity: 0
1796 }),
1797 animate: {
1798 x: 0,
1799 opacity: 1
1800 },
1801 exit: (direction) => ({
1802 x: direction === "forward" ? 100 : -100,
1803 opacity: 0
1804 })
1805 };
1806 function NavigationScreen({
1807 isRoot,
1808 title,
1809 actions,
1810 content,
1811 description,
1812 animationDirection,
1813 backMenuItem,
1814 backButtonRef,
1815 navigationKey,
1816 onNavigate
1817 }) {
1818 const icon = (0, import_i18n4.isRTL)() ? chevron_right_default : chevron_left_default;
1819 const disableMotion = (0, import_compose2.useReducedMotion)();
1820 const handleBackClick = (e) => {
1821 e.preventDefault();
1822 onNavigate({ id: backMenuItem, direction: "backward" });
1823 };
1824 return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1825 "div",
1826 {
1827 className: "boot-navigation-screen",
1828 style: {
1829 overflow: "hidden",
1830 position: "relative",
1831 display: "grid",
1832 gridTemplateColumns: "1fr",
1833 gridTemplateRows: "1fr"
1834 },
1835 children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components9.__unstableAnimatePresence, { initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1836 import_components9.__unstableMotion.div,
1837 {
1838 custom: animationDirection,
1839 variants: slideVariants,
1840 initial: "initial",
1841 animate: "animate",
1842 exit: "exit",
1843 transition: {
1844 type: "tween",
1845 duration: disableMotion ? 0 : ANIMATION_DURATION2,
1846 ease: [0.33, 0, 0, 1]
1847 },
1848 style: {
1849 width: "100%",
1850 gridColumn: "1",
1851 gridRow: "1"
1852 },
1853 children: [
1854 /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1855 import_components9.__experimentalHStack,
1856 {
1857 spacing: 2,
1858 className: "boot-navigation-screen__title-icon",
1859 children: [
1860 !isRoot && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1861 import_components9.Button,
1862 {
1863 ref: backButtonRef,
1864 icon,
1865 onClick: handleBackClick,
1866 label: (0, import_i18n4.__)("Back"),
1867 size: "small",
1868 variant: "tertiary"
1869 }
1870 ),
1871 /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1872 import_components9.__experimentalHeading,
1873 {
1874 className: "boot-navigation-screen__title",
1875 level: 1,
1876 size: "15px",
1877 children: title
1878 }
1879 ),
1880 actions && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__actions", children: actions })
1881 ]
1882 }
1883 ),
1884 description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__description", children: description }),
1885 content
1886 ]
1887 },
1888 navigationKey
1889 ) })
1890 }
1891 );
1892 }
1893
1894 // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
1895 var import_element7 = __toESM(require_element(), 1);
1896 var import_data5 = __toESM(require_data(), 1);
1897 import { privateApis as routePrivateApis3 } from "@wordpress/route";
1898
1899 // packages/boot/build-module/components/navigation/path-matching.mjs
1900 var isValidParentPath = (currentPath, menuPath) => {
1901 if (!menuPath || menuPath === currentPath) {
1902 return false;
1903 }
1904 const normalizePath = (path) => {
1905 const normalized = path.startsWith("/") ? path : "/" + path;
1906 return normalized.endsWith("/") && normalized.length > 1 ? normalized.slice(0, -1) : normalized;
1907 };
1908 const normalizedCurrent = normalizePath(currentPath);
1909 const normalizedMenu = normalizePath(menuPath);
1910 return normalizedCurrent.startsWith(normalizedMenu) && (normalizedCurrent[normalizedMenu.length] === "/" || normalizedMenu === "/");
1911 };
1912 var findClosestMenuItem = (currentPath, menuItems) => {
1913 const exactMatch = menuItems.find((item) => item.to === currentPath);
1914 if (exactMatch) {
1915 return exactMatch;
1916 }
1917 let bestMatch = null;
1918 let bestPathLength = 0;
1919 for (const item of menuItems) {
1920 if (!item.to) {
1921 continue;
1922 }
1923 if (isValidParentPath(currentPath, item.to)) {
1924 if (item.to.length > bestPathLength) {
1925 bestMatch = item;
1926 bestPathLength = item.to.length;
1927 }
1928 }
1929 }
1930 return bestMatch;
1931 };
1932 var findDrilldownParent = (id, menuItems) => {
1933 if (!id) {
1934 return void 0;
1935 }
1936 const currentItem = menuItems.find((item) => item.id === id);
1937 if (!currentItem) {
1938 return void 0;
1939 }
1940 if (currentItem.parent) {
1941 const parentItem = menuItems.find(
1942 (item) => item.id === currentItem.parent
1943 );
1944 if (parentItem?.parent_type === "drilldown") {
1945 return parentItem.id;
1946 }
1947 if (parentItem) {
1948 return findDrilldownParent(parentItem.id, menuItems);
1949 }
1950 }
1951 return void 0;
1952 };
1953 var findDropdownParent = (id, menuItems) => {
1954 if (!id) {
1955 return void 0;
1956 }
1957 const currentItem = menuItems.find((item) => item.id === id);
1958 if (!currentItem) {
1959 return void 0;
1960 }
1961 if (currentItem.parent) {
1962 const parentItem = menuItems.find(
1963 (item) => item.id === currentItem.parent
1964 );
1965 if (parentItem?.parent_type === "dropdown") {
1966 return parentItem.id;
1967 }
1968 }
1969 return void 0;
1970 };
1971
1972 // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
1973 var { useRouter: useRouter2, useMatches } = unlock(routePrivateApis3);
1974 function useSidebarParent() {
1975 const matches = useMatches();
1976 const router = useRouter2();
1977 const menuItems = (0, import_data5.useSelect)(
1978 (select) => (
1979 // @ts-ignore
1980 select(STORE_NAME).getMenuItems()
1981 ),
1982 []
1983 );
1984 const currentPath = matches[matches.length - 1].pathname.slice(
1985 router.options.basepath?.length ?? 0
1986 );
1987 const currentMenuItem = findClosestMenuItem(currentPath, menuItems);
1988 const [parentId, setParentId] = (0, import_element7.useState)(
1989 findDrilldownParent(currentMenuItem?.id, menuItems)
1990 );
1991 const [parentDropdownId, setParentDropdownId] = (0, import_element7.useState)(findDropdownParent(currentMenuItem?.id, menuItems));
1992 (0, import_element7.useEffect)(() => {
1993 const matchedMenuItem = findClosestMenuItem(currentPath, menuItems);
1994 const updatedParentId = findDrilldownParent(
1995 matchedMenuItem?.id,
1996 menuItems
1997 );
1998 const updatedDropdownParent = findDropdownParent(
1999 matchedMenuItem?.id,
2000 menuItems
2001 );
2002 setParentId(updatedParentId);
2003 setParentDropdownId(updatedDropdownParent);
2004 }, [currentPath, menuItems]);
2005 return [
2006 parentId,
2007 setParentId,
2008 parentDropdownId,
2009 setParentDropdownId
2010 ];
2011 }
2012
2013 // packages/boot/build-module/components/navigation/index.mjs
2014 var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
2015 function Navigation() {
2016 const backButtonRef = (0, import_element8.useRef)(null);
2017 const [animationDirection, setAnimationDirection] = (0, import_element8.useState)(null);
2018 const [parentId, setParentId, parentDropdownId, setParentDropdownId] = useSidebarParent();
2019 const menuItems = (0, import_data6.useSelect)(
2020 (select) => (
2021 // @ts-ignore
2022 select(STORE_NAME).getMenuItems()
2023 ),
2024 []
2025 );
2026 const parent = (0, import_element8.useMemo)(
2027 () => menuItems.find((item) => item.id === parentId),
2028 [menuItems, parentId]
2029 );
2030 const navigationKey = parent ? `drilldown-${parent.id}` : "root";
2031 const handleNavigate = ({
2032 id,
2033 direction
2034 }) => {
2035 setAnimationDirection(direction);
2036 setParentId(id);
2037 };
2038 const handleDropdownToggle = (dropdownId) => {
2039 setParentDropdownId(
2040 parentDropdownId === dropdownId ? void 0 : dropdownId
2041 );
2042 };
2043 const items = (0, import_element8.useMemo)(
2044 () => menuItems.filter((item) => item.parent === parentId),
2045 [menuItems, parentId]
2046 );
2047 const hasRealIcons = items.some((item) => !!item.icon);
2048 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2049 NavigationScreen,
2050 {
2051 isRoot: !parent,
2052 title: parent ? parent.label : "",
2053 backMenuItem: parent?.parent,
2054 backButtonRef,
2055 animationDirection: animationDirection || void 0,
2056 navigationKey,
2057 onNavigate: handleNavigate,
2058 content: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: items.map((item) => {
2059 if (item.parent_type === "dropdown") {
2060 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2061 DropdownItem,
2062 {
2063 id: item.id,
2064 className: "boot-navigation-item",
2065 icon: item.icon,
2066 shouldShowPlaceholder: hasRealIcons,
2067 isExpanded: parentDropdownId === item.id,
2068 onToggle: () => handleDropdownToggle(item.id),
2069 children: item.label
2070 },
2071 item.id
2072 );
2073 }
2074 if (item.parent_type === "drilldown") {
2075 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2076 DrilldownItem,
2077 {
2078 id: item.id,
2079 icon: item.icon,
2080 shouldShowPlaceholder: hasRealIcons,
2081 onNavigate: handleNavigate,
2082 children: item.label
2083 },
2084 item.id
2085 );
2086 }
2087 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2088 NavigationItem,
2089 {
2090 to: item.to,
2091 icon: item.icon,
2092 shouldShowPlaceholder: hasRealIcons,
2093 children: item.label
2094 },
2095 item.id
2096 );
2097 }) })
2098 }
2099 );
2100 }
2101 var navigation_default = Navigation;
2102
2103 // packages/boot/build-module/components/save-button/index.mjs
2104 var import_element10 = __toESM(require_element(), 1);
2105 var import_data8 = __toESM(require_data(), 1);
2106 var import_i18n6 = __toESM(require_i18n(), 1);
2107 var import_core_data4 = __toESM(require_core_data(), 1);
2108 var import_keycodes2 = __toESM(require_keycodes(), 1);
2109 var import_editor2 = __toESM(require_editor(), 1);
2110 var import_components10 = __toESM(require_components(), 1);
2111
2112 // packages/boot/build-module/components/save-panel/use-save-shortcut.mjs
2113 var import_element9 = __toESM(require_element(), 1);
2114 var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
2115 var import_i18n5 = __toESM(require_i18n(), 1);
2116 var import_data7 = __toESM(require_data(), 1);
2117 var import_core_data3 = __toESM(require_core_data(), 1);
2118 var import_editor = __toESM(require_editor(), 1);
2119 var shortcutName = "core/boot/save";
2120 function useSaveShortcut({
2121 openSavePanel
2122 }) {
2123 const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } = (0, import_data7.useSelect)(import_core_data3.store);
2124 const { hasNonPostEntityChanges, isPostSavingLocked } = (0, import_data7.useSelect)(import_editor.store);
2125 const { savePost } = (0, import_data7.useDispatch)(import_editor.store);
2126 const { registerShortcut, unregisterShortcut } = (0, import_data7.useDispatch)(
2127 import_keyboard_shortcuts.store
2128 );
2129 (0, import_element9.useEffect)(() => {
2130 registerShortcut({
2131 name: shortcutName,
2132 category: "global",
2133 description: (0, import_i18n5.__)("Save your changes."),
2134 keyCombination: {
2135 modifier: "primary",
2136 character: "s"
2137 }
2138 });
2139 return () => {
2140 unregisterShortcut(shortcutName);
2141 };
2142 }, [registerShortcut, unregisterShortcut]);
2143 (0, import_keyboard_shortcuts.useShortcut)(shortcutName, (event) => {
2144 event.preventDefault();
2145 const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
2146 const hasDirtyEntities = !!dirtyEntityRecords.length;
2147 const isSaving = dirtyEntityRecords.some(
2148 (record) => isSavingEntityRecord(record.kind, record.name, record.key)
2149 );
2150 if (!hasDirtyEntities || isSaving) {
2151 return;
2152 }
2153 if (hasNonPostEntityChanges()) {
2154 openSavePanel();
2155 } else if (!isPostSavingLocked()) {
2156 savePost();
2157 }
2158 });
2159 }
2160
2161 // packages/boot/build-module/components/save-button/index.mjs
2162 var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
2163 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='294e36b777']")) {
2164 const style = document.createElement("style");
2165 style.setAttribute("data-wp-hash", "294e36b777");
2166 style.appendChild(document.createTextNode(".boot-save-button{width:100%}"));
2167 document.head.appendChild(style);
2168 }
2169 function SaveButton() {
2170 const [isSaveViewOpen, setIsSaveViewOpened] = (0, import_element10.useState)(false);
2171 const { isSaving, dirtyEntityRecordsCount } = (0, import_data8.useSelect)((select) => {
2172 const { isSavingEntityRecord, __experimentalGetDirtyEntityRecords } = select(import_core_data4.store);
2173 const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
2174 return {
2175 isSaving: dirtyEntityRecords.some(
2176 (record) => isSavingEntityRecord(record.kind, record.name, record.key)
2177 ),
2178 dirtyEntityRecordsCount: dirtyEntityRecords.length
2179 };
2180 }, []);
2181 const [showSavedState, setShowSavedState] = (0, import_element10.useState)(false);
2182 (0, import_element10.useEffect)(() => {
2183 if (isSaving) {
2184 setShowSavedState(true);
2185 }
2186 }, [isSaving]);
2187 const hasChanges = dirtyEntityRecordsCount > 0;
2188 (0, import_element10.useEffect)(() => {
2189 if (!isSaving && hasChanges) {
2190 setShowSavedState(false);
2191 }
2192 }, [isSaving, hasChanges]);
2193 function hideSavedState() {
2194 if (showSavedState) {
2195 setShowSavedState(false);
2196 }
2197 }
2198 const shouldShowButton = hasChanges || showSavedState;
2199 useSaveShortcut({ openSavePanel: () => setIsSaveViewOpened(true) });
2200 if (!shouldShowButton) {
2201 return null;
2202 }
2203 const isInSavedState = showSavedState && !hasChanges;
2204 const disabled = isSaving || isInSavedState;
2205 const getLabel = () => {
2206 if (isInSavedState) {
2207 return (0, import_i18n6.__)("Saved");
2208 }
2209 return (0, import_i18n6.sprintf)(
2210 // translators: %d: number of unsaved changes (number).
2211 (0, import_i18n6._n)(
2212 "Review %d change\u2026",
2213 "Review %d changes\u2026",
2214 dirtyEntityRecordsCount
2215 ),
2216 dirtyEntityRecordsCount
2217 );
2218 };
2219 const label = getLabel();
2220 return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
2221 /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2222 import_components10.Tooltip,
2223 {
2224 text: hasChanges ? label : void 0,
2225 shortcut: import_keycodes2.displayShortcut.primary("s"),
2226 children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2227 import_components10.Button,
2228 {
2229 variant: "primary",
2230 size: "compact",
2231 onClick: () => setIsSaveViewOpened(true),
2232 onBlur: hideSavedState,
2233 disabled,
2234 accessibleWhenDisabled: true,
2235 isBusy: isSaving,
2236 "aria-keyshortcuts": import_keycodes2.rawShortcut.primary("s"),
2237 className: "boot-save-button",
2238 icon: isInSavedState ? check_default : void 0,
2239 children: label
2240 }
2241 )
2242 }
2243 ),
2244 isSaveViewOpen && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2245 import_components10.Modal,
2246 {
2247 title: (0, import_i18n6.__)("Review changes"),
2248 onRequestClose: () => setIsSaveViewOpened(false),
2249 size: "small",
2250 children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2251 import_editor2.EntitiesSavedStates,
2252 {
2253 close: () => setIsSaveViewOpened(false),
2254 variant: "inline"
2255 }
2256 )
2257 }
2258 )
2259 ] });
2260 }
2261
2262 // packages/boot/build-module/components/sidebar/index.mjs
2263 var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
2264 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='6064f6f183']")) {
2265 const style = document.createElement("style");
2266 style.setAttribute("data-wp-hash", "6064f6f183");
2267 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}"));
2268 document.head.appendChild(style);
2269 }
2270 function Sidebar() {
2271 return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "boot-sidebar__scrollable", children: [
2272 /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(site_hub_default, {}),
2273 /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__content", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(navigation_default, {}) }),
2274 /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__footer", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SaveButton, {}) })
2275 ] });
2276 }
2277
2278 // packages/boot/build-module/components/save-panel/index.mjs
2279 var import_element11 = __toESM(require_element(), 1);
2280 var import_components11 = __toESM(require_components(), 1);
2281 var import_editor3 = __toESM(require_editor(), 1);
2282 var import_i18n7 = __toESM(require_i18n(), 1);
2283 var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
2284 function SavePanel() {
2285 const [isOpen, setIsOpen] = (0, import_element11.useState)(false);
2286 useSaveShortcut({
2287 openSavePanel: () => setIsOpen(true)
2288 });
2289 if (!isOpen) {
2290 return false;
2291 }
2292 return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2293 import_components11.Modal,
2294 {
2295 className: "edit-site-save-panel__modal",
2296 onRequestClose: () => setIsOpen(false),
2297 title: (0, import_i18n7.__)("Review changes"),
2298 size: "small",
2299 children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2300 import_editor3.EntitiesSavedStates,
2301 {
2302 close: () => setIsOpen(false),
2303 variant: "inline"
2304 }
2305 )
2306 }
2307 );
2308 }
2309
2310 // packages/boot/build-module/components/canvas-renderer/index.mjs
2311 var import_element13 = __toESM(require_element(), 1);
2312
2313 // packages/boot/build-module/components/canvas/index.mjs
2314 var import_element12 = __toESM(require_element(), 1);
2315 var import_components13 = __toESM(require_components(), 1);
2316 import { useNavigate } from "@wordpress/route";
2317
2318 // packages/boot/build-module/components/canvas/back-button.mjs
2319 var import_components12 = __toESM(require_components(), 1);
2320 var import_compose3 = __toESM(require_compose(), 1);
2321 var import_i18n8 = __toESM(require_i18n(), 1);
2322 var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
2323 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c8750e18d1']")) {
2324 const style = document.createElement("style");
2325 style.setAttribute("data-wp-hash", "c8750e18d1");
2326 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}"));
2327 document.head.appendChild(style);
2328 }
2329 var toggleHomeIconVariants = {
2330 edit: {
2331 opacity: 0,
2332 scale: 0.2
2333 },
2334 hover: {
2335 opacity: 1,
2336 scale: 1,
2337 clipPath: "inset( 22% round 2px )"
2338 }
2339 };
2340 function BootBackButton({ length }) {
2341 const disableMotion = (0, import_compose3.useReducedMotion)();
2342 const handleBack = () => {
2343 window.history.back();
2344 };
2345 if (length > 1) {
2346 return null;
2347 }
2348 const transition = {
2349 duration: disableMotion ? 0 : 0.3
2350 };
2351 return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2352 import_components12.__unstableMotion.div,
2353 {
2354 className: "boot-canvas-back-button",
2355 animate: "edit",
2356 initial: "edit",
2357 whileHover: "hover",
2358 whileTap: "tap",
2359 transition,
2360 children: [
2361 /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2362 import_components12.Button,
2363 {
2364 className: "boot-canvas-back-button__link",
2365 onClick: handleBack,
2366 "aria-label": (0, import_i18n8.__)("Go back"),
2367 __next40pxDefaultSize: true,
2368 children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(site_icon_default, {})
2369 }
2370 ),
2371 /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2372 import_components12.__unstableMotion.div,
2373 {
2374 className: "boot-canvas-back-button__icon",
2375 variants: toggleHomeIconVariants,
2376 children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components12.Icon, { icon: arrow_up_left_default })
2377 }
2378 )
2379 ]
2380 }
2381 );
2382 }
2383
2384 // packages/boot/build-module/components/canvas/index.mjs
2385 var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
2386 function Canvas({ canvas }) {
2387 const [Editor, setEditor] = (0, import_element12.useState)(null);
2388 const navigate = useNavigate();
2389 (0, import_element12.useEffect)(() => {
2390 import("@wordpress/lazy-editor").then((module) => {
2391 setEditor(() => module.Editor);
2392 }).catch((error) => {
2393 console.error("Failed to load lazy editor:", error);
2394 });
2395 }, []);
2396 if (!Editor) {
2397 return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2398 "div",
2399 {
2400 style: {
2401 display: "flex",
2402 justifyContent: "center",
2403 alignItems: "center",
2404 height: "100%",
2405 padding: "2rem"
2406 },
2407 children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components13.Spinner, {})
2408 }
2409 );
2410 }
2411 const backButton = !canvas.isPreview ? ({ length }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BootBackButton, { length }) : void 0;
2412 return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { height: "100%", position: "relative" }, children: [
2413 /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2414 "div",
2415 {
2416 style: { height: "100%" },
2417 inert: canvas.isPreview ? "true" : void 0,
2418 children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2419 Editor,
2420 {
2421 postType: canvas.postType,
2422 postId: canvas.postId,
2423 settings: {
2424 isPreviewMode: canvas.isPreview,
2425 styles: canvas.isPreview ? [{ css: "body{min-height:100vh;}" }] : []
2426 },
2427 backButton
2428 }
2429 )
2430 }
2431 ),
2432 canvas.isPreview && canvas.editLink && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2433 "div",
2434 {
2435 onClick: () => navigate({ to: canvas.editLink }),
2436 onKeyDown: (e) => {
2437 if (e.key === "Enter" || e.key === " ") {
2438 e.preventDefault();
2439 navigate({ to: canvas.editLink });
2440 }
2441 },
2442 style: {
2443 position: "absolute",
2444 inset: 0,
2445 cursor: "pointer",
2446 zIndex: 1
2447 },
2448 role: "button",
2449 tabIndex: 0,
2450 "aria-label": "Click to edit"
2451 }
2452 )
2453 ] });
2454 }
2455
2456 // packages/boot/build-module/components/canvas-renderer/index.mjs
2457 var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
2458 function CanvasRenderer({
2459 canvas,
2460 routeContentModule
2461 }) {
2462 const [CustomCanvas, setCustomCanvas] = (0, import_element13.useState)(null);
2463 (0, import_element13.useEffect)(() => {
2464 if (canvas === null && routeContentModule) {
2465 import(routeContentModule).then((module) => {
2466 setCustomCanvas(() => module.canvas);
2467 }).catch((error) => {
2468 console.error("Failed to load custom canvas:", error);
2469 });
2470 } else {
2471 setCustomCanvas(null);
2472 }
2473 }, [canvas, routeContentModule]);
2474 if (canvas === void 0) {
2475 return null;
2476 }
2477 if (canvas === null) {
2478 if (!CustomCanvas) {
2479 return null;
2480 }
2481 return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CustomCanvas, {});
2482 }
2483 return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Canvas, { canvas });
2484 }
2485
2486 // packages/boot/build-module/components/app/use-route-title.mjs
2487 var import_element14 = __toESM(require_element(), 1);
2488 var import_data9 = __toESM(require_data(), 1);
2489 var import_core_data5 = __toESM(require_core_data(), 1);
2490 var import_i18n9 = __toESM(require_i18n(), 1);
2491 var import_html_entities2 = __toESM(require_html_entities(), 1);
2492 import { speak } from "@wordpress/a11y";
2493 import { privateApis as routePrivateApis4 } from "@wordpress/route";
2494 var { useLocation, useMatches: useMatches2 } = unlock(routePrivateApis4);
2495 function useRouteTitle() {
2496 const location = useLocation();
2497 const matches = useMatches2();
2498 const currentMatch = matches[matches.length - 1];
2499 const routeTitle = currentMatch?.loaderData?.title;
2500 const siteTitle = (0, import_data9.useSelect)(
2501 (select) => select(import_core_data5.store).getEntityRecord(
2502 "root",
2503 "__unstableBase"
2504 )?.name,
2505 []
2506 );
2507 const isInitialLocationRef = (0, import_element14.useRef)(true);
2508 (0, import_element14.useEffect)(() => {
2509 isInitialLocationRef.current = false;
2510 }, [location]);
2511 (0, import_element14.useEffect)(() => {
2512 if (isInitialLocationRef.current) {
2513 return;
2514 }
2515 if (routeTitle && typeof routeTitle === "string" && siteTitle && typeof siteTitle === "string") {
2516 const decodedRouteTitle = (0, import_html_entities2.decodeEntities)(routeTitle);
2517 const decodedSiteTitle = (0, import_html_entities2.decodeEntities)(siteTitle);
2518 const formattedTitle = (0, import_i18n9.sprintf)(
2519 /* translators: Admin document title. 1: Admin screen name, 2: Site name. */
2520 (0, import_i18n9.__)("%1$s \u2039 %2$s \u2014 WordPress"),
2521 decodedRouteTitle,
2522 decodedSiteTitle
2523 );
2524 document.title = formattedTitle;
2525 if (decodedRouteTitle) {
2526 speak(decodedRouteTitle, "assertive");
2527 }
2528 }
2529 }, [routeTitle, siteTitle, location]);
2530 }
2531
2532 // packages/boot/build-module/components/user-theme-provider/index.mjs
2533 var import_theme = __toESM(require_theme(), 1);
2534 var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
2535 var ThemeProvider = unlock(import_theme.privateApis).ThemeProvider;
2536 var THEME_PRIMARY_COLORS = /* @__PURE__ */ new Map([
2537 ["light", "#0085ba"],
2538 ["modern", "#3858e9"],
2539 ["blue", "#096484"],
2540 ["coffee", "#46403c"],
2541 ["ectoplasm", "#523f6d"],
2542 ["midnight", "#e14d43"],
2543 ["ocean", "#627c83"],
2544 ["sunrise", "#dd823b"]
2545 ]);
2546 function getAdminThemePrimaryColor() {
2547 const theme = document.body.className.match(/admin-color-([a-z]+)/)?.[1];
2548 return theme && THEME_PRIMARY_COLORS.get(theme);
2549 }
2550 function UserThemeProvider({
2551 color,
2552 ...restProps
2553 }) {
2554 const primary = getAdminThemePrimaryColor();
2555 return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ThemeProvider, { ...restProps, color: { primary, ...color } });
2556 }
2557
2558 // packages/boot/build-module/components/root/index.mjs
2559 var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
2560 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='be0c278a6c']")) {
2561 const style = document.createElement("style");
2562 style.setAttribute("data-wp-hash", "be0c278a6c");
2563 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:var(--wpds-cursor-control,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}}"));
2564 document.head.appendChild(style);
2565 }
2566 var { useLocation: useLocation2, useMatches: useMatches3, Outlet } = unlock(routePrivateApis5);
2567 function Root() {
2568 const matches = useMatches3();
2569 const location = useLocation2();
2570 const currentMatch = matches[matches.length - 1];
2571 const canvas = currentMatch?.loaderData?.canvas;
2572 const routeContentModule = currentMatch?.loaderData?.routeContentModule;
2573 const isFullScreen = canvas && !canvas.isPreview;
2574 useRouteTitle();
2575 const isMobileViewport = (0, import_compose4.useViewportMatch)("medium", "<");
2576 const [isMobileSidebarOpen, setIsMobileSidebarOpen] = (0, import_element15.useState)(false);
2577 const disableMotion = (0, import_compose4.useReducedMotion)();
2578 (0, import_element15.useEffect)(() => {
2579 setIsMobileSidebarOpen(false);
2580 }, [location.pathname, isMobileViewport]);
2581 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)(
2582 "div",
2583 {
2584 className: clsx_default("boot-layout", {
2585 "has-canvas": !!canvas || canvas === null,
2586 "has-full-canvas": isFullScreen
2587 }),
2588 children: [
2589 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SavePanel, {}),
2590 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_notices.SnackbarNotices, { className: "boot-notices__snackbar" }),
2591 isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(page_default.SidebarToggleFill, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2592 import_components14.Button,
2593 {
2594 icon: menu_default,
2595 onClick: () => setIsMobileSidebarOpen(true),
2596 label: (0, import_i18n10.__)("Open navigation panel"),
2597 size: "compact"
2598 }
2599 ) }),
2600 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2601 import_components14.__unstableMotion.div,
2602 {
2603 initial: { opacity: 0 },
2604 animate: { opacity: 1 },
2605 exit: { opacity: 0 },
2606 transition: {
2607 type: "tween",
2608 duration: disableMotion ? 0 : 0.2,
2609 ease: "easeOut"
2610 },
2611 className: "boot-layout__sidebar-backdrop",
2612 onClick: () => setIsMobileSidebarOpen(false),
2613 onKeyDown: (event) => {
2614 if (event.key === "Escape") {
2615 setIsMobileSidebarOpen(false);
2616 }
2617 },
2618 role: "button",
2619 tabIndex: -1,
2620 "aria-label": (0, import_i18n10.__)(
2621 "Close navigation panel"
2622 )
2623 }
2624 ) }),
2625 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2626 import_components14.__unstableMotion.div,
2627 {
2628 initial: { x: "-100%" },
2629 animate: { x: 0 },
2630 exit: { x: "-100%" },
2631 transition: {
2632 type: "tween",
2633 duration: disableMotion ? 0 : 0.2,
2634 ease: "easeOut"
2635 },
2636 className: "boot-layout__sidebar is-mobile",
2637 children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {})
2638 }
2639 ) }),
2640 !isMobileViewport && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {}) }),
2641 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
2642 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Outlet, {}),
2643 (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2644 "div",
2645 {
2646 className: clsx_default(
2647 "boot-layout__canvas",
2648 {
2649 "has-mobile-drawer": canvas?.isPreview && isMobileViewport
2650 }
2651 ),
2652 children: [
2653 canvas?.isPreview && isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__mobile-sidebar-drawer", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2654 import_components14.Button,
2655 {
2656 icon: menu_default,
2657 onClick: () => setIsMobileSidebarOpen(
2658 true
2659 ),
2660 label: (0, import_i18n10.__)(
2661 "Open navigation panel"
2662 ),
2663 size: "compact"
2664 }
2665 ) }),
2666 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2667 CanvasRenderer,
2668 {
2669 canvas,
2670 routeContentModule
2671 }
2672 )
2673 ]
2674 }
2675 )
2676 ] }) })
2677 ]
2678 }
2679 ) }) }) });
2680 }
2681
2682 // packages/boot/build-module/components/app/router.mjs
2683 var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
2684 var {
2685 createLazyRoute,
2686 createRouter,
2687 createRootRoute,
2688 createRoute,
2689 RouterProvider,
2690 createBrowserHistory,
2691 parseHref,
2692 useLoaderData
2693 } = unlock(routePrivateApis6);
2694 function NotFoundComponent() {
2695 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") }) });
2696 }
2697 function createRouteFromDefinition(route, parentRoute) {
2698 let tanstackRoute = createRoute({
2699 getParentRoute: () => parentRoute,
2700 path: route.path,
2701 beforeLoad: async (opts) => {
2702 if (route.route_module) {
2703 const module = await import(route.route_module);
2704 const routeConfig = module.route || {};
2705 if (routeConfig.beforeLoad) {
2706 return routeConfig.beforeLoad({
2707 params: opts.params || {},
2708 search: opts.search || {}
2709 });
2710 }
2711 }
2712 },
2713 loader: async (opts) => {
2714 let routeConfig = {};
2715 if (route.route_module) {
2716 const module = await import(route.route_module);
2717 routeConfig = module.route || {};
2718 }
2719 const context = {
2720 params: opts.params || {},
2721 search: opts.deps || {}
2722 };
2723 const [, loaderData, canvasData, titleData] = await Promise.all([
2724 (0, import_data10.resolveSelect)(import_core_data6.store).getEntityRecord(
2725 "root",
2726 "__unstableBase"
2727 ),
2728 routeConfig.loader ? routeConfig.loader(context) : Promise.resolve(void 0),
2729 routeConfig.canvas ? routeConfig.canvas(context) : Promise.resolve(void 0),
2730 routeConfig.title ? routeConfig.title(context) : Promise.resolve(void 0)
2731 ]);
2732 let inspector = true;
2733 if (routeConfig.inspector) {
2734 inspector = await routeConfig.inspector(context);
2735 }
2736 return {
2737 ...loaderData,
2738 canvas: canvasData,
2739 inspector,
2740 title: titleData,
2741 routeContentModule: route.content_module
2742 };
2743 },
2744 loaderDeps: (opts) => opts.search
2745 });
2746 tanstackRoute = tanstackRoute.lazy(async () => {
2747 const module = route.content_module ? await import(route.content_module) : {};
2748 const Stage = module.stage;
2749 const Inspector = module.inspector;
2750 return createLazyRoute(route.path)({
2751 component: function RouteComponent() {
2752 const { inspector: showInspector } = useLoaderData({ from: route.path }) ?? {};
2753 return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
2754 Stage && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Stage, {}) }),
2755 Inspector && showInspector && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__inspector", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Inspector, {}) })
2756 ] });
2757 }
2758 });
2759 });
2760 return tanstackRoute;
2761 }
2762 function createRouteTree(routes, rootComponent = Root) {
2763 const rootRoute = createRootRoute({
2764 component: rootComponent,
2765 context: () => ({})
2766 });
2767 const dynamicRoutes = routes.map(
2768 (route) => createRouteFromDefinition(route, rootRoute)
2769 );
2770 return rootRoute.addChildren(dynamicRoutes);
2771 }
2772 function createPathHistory() {
2773 return createBrowserHistory({
2774 parseLocation: () => {
2775 const url = new URL(window.location.href);
2776 const path = url.searchParams.get("p") || "/";
2777 const pathHref = `${path}${url.hash}`;
2778 return parseHref(pathHref, window.history.state);
2779 },
2780 createHref: (href) => {
2781 const searchParams = new URLSearchParams(window.location.search);
2782 searchParams.set("p", href);
2783 return `${window.location.pathname}?${searchParams}`;
2784 }
2785 });
2786 }
2787 function Router({
2788 routes,
2789 rootComponent = Root
2790 }) {
2791 const router = (0, import_element16.useMemo)(() => {
2792 const history = createPathHistory();
2793 const routeTree = createRouteTree(routes, rootComponent);
2794 return createRouter({
2795 history,
2796 routeTree,
2797 defaultPreload: "intent",
2798 defaultNotFoundComponent: NotFoundComponent,
2799 defaultViewTransition: {
2800 types: ({
2801 fromLocation
2802 }) => {
2803 if (!fromLocation) {
2804 return false;
2805 }
2806 return ["navigate"];
2807 }
2808 }
2809 });
2810 }, [routes, rootComponent]);
2811 return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RouterProvider, { router });
2812 }
2813
2814 // packages/boot/build-module/components/root/single-page.mjs
2815 var import_notices2 = __toESM(require_notices(), 1);
2816 var import_components15 = __toESM(require_components(), 1);
2817 import { privateApis as routePrivateApis7 } from "@wordpress/route";
2818 var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
2819 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='be0c278a6c']")) {
2820 const style = document.createElement("style");
2821 style.setAttribute("data-wp-hash", "be0c278a6c");
2822 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:var(--wpds-cursor-control,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}}"));
2823 document.head.appendChild(style);
2824 }
2825 var { useMatches: useMatches4, Outlet: Outlet2 } = unlock(routePrivateApis7);
2826 function RootSinglePage() {
2827 const matches = useMatches4();
2828 const currentMatch = matches[matches.length - 1];
2829 const canvas = currentMatch?.loaderData?.canvas;
2830 const routeContentModule = currentMatch?.loaderData?.routeContentModule;
2831 const isFullScreen = canvas && !canvas.isPreview;
2832 useRouteTitle();
2833 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)(
2834 "div",
2835 {
2836 className: clsx_default(
2837 "boot-layout boot-layout--single-page",
2838 {
2839 "has-canvas": !!canvas || canvas === null,
2840 "has-full-canvas": isFullScreen
2841 }
2842 ),
2843 children: [
2844 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SavePanel, {}),
2845 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_notices2.SnackbarNotices, { className: "boot-notices__snackbar" }),
2846 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
2847 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Outlet2, {}),
2848 (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__canvas", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2849 CanvasRenderer,
2850 {
2851 canvas,
2852 routeContentModule
2853 }
2854 ) })
2855 ] }) })
2856 ]
2857 }
2858 ) }) }) });
2859 }
2860
2861 // packages/boot/build-module/components/app/index.mjs
2862 var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
2863 function App({ rootComponent }) {
2864 const routes = (0, import_data11.useSelect)((select) => select(store).getRoutes(), []);
2865 return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Router, { routes, rootComponent });
2866 }
2867 async function init({
2868 mountId,
2869 menuItems,
2870 routes,
2871 initModules,
2872 dashboardLink
2873 }) {
2874 (menuItems ?? []).forEach((menuItem) => {
2875 (0, import_data11.dispatch)(store).registerMenuItem(menuItem.id, menuItem);
2876 });
2877 (routes ?? []).forEach((route) => {
2878 (0, import_data11.dispatch)(store).registerRoute(route);
2879 });
2880 if (dashboardLink) {
2881 (0, import_data11.dispatch)(store).setDashboardLink(dashboardLink);
2882 }
2883 for (const moduleId of initModules ?? []) {
2884 const module = await import(moduleId);
2885 await module.init();
2886 }
2887 const rootElement = document.getElementById(mountId);
2888 if (rootElement) {
2889 const root = (0, import_element17.createRoot)(rootElement);
2890 root.render(
2891 /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element17.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, {}) })
2892 );
2893 }
2894 }
2895 async function initSinglePage({
2896 mountId,
2897 routes
2898 }) {
2899 (routes ?? []).forEach((route) => {
2900 (0, import_data11.dispatch)(store).registerRoute(route);
2901 });
2902 const rootElement = document.getElementById(mountId);
2903 if (rootElement) {
2904 const root = (0, import_element17.createRoot)(rootElement);
2905 root.render(
2906 /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element17.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, { rootComponent: RootSinglePage }) })
2907 );
2908 }
2909 }
2910
2911 // packages/boot/build-module/index.mjs
2912 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c310114eb0']")) {
2913 const style = document.createElement("style");
2914 style.setAttribute("data-wp-hash", "c310114eb0");
2915 style.appendChild(document.createTextNode(':root{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-width-xs:1px;--wpds-border-width-sm:2px;--wpds-border-width-md:4px;--wpds-border-width-lg:8px;--wpds-border-width-focus:2px;--wpds-color-bg-surface-neutral:#fcfcfc;--wpds-color-bg-surface-neutral-strong:#fff;--wpds-color-bg-surface-neutral-weak:#f4f4f4;--wpds-color-bg-surface-brand:#ecf0fa;--wpds-color-bg-surface-success:#c6f7cd;--wpds-color-bg-surface-success-weak:#ebffed;--wpds-color-bg-surface-info:#deebfa;--wpds-color-bg-surface-info-weak:#f3f9ff;--wpds-color-bg-surface-warning:#fde6be;--wpds-color-bg-surface-warning-weak:#fff7e1;--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-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-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-track-neutral-weak:#e4e4e4;--wpds-color-bg-track-neutral:#dbdbdb;--wpds-color-bg-thumb-neutral-weak:#8d8d8d;--wpds-color-bg-thumb-neutral-weak-active:#6e6e6e;--wpds-color-bg-thumb-brand:#3858e9;--wpds-color-bg-thumb-brand-active:#3858e9;--wpds-color-bg-thumb-neutral-disabled:#dbdbdb;--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-info:#001b4f;--wpds-color-fg-content-info-weak:#006bd7;--wpds-color-fg-content-warning:#2e1900;--wpds-color-fg-content-warning-weak:#926300;--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-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-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-stroke-surface-neutral:#dbdbdb;--wpds-color-stroke-surface-neutral-weak:#e4e4e4;--wpds-color-stroke-surface-neutral-strong:#8d8d8d;--wpds-color-stroke-surface-brand:#a3b1d4;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-success:#8ac894;--wpds-color-stroke-surface-success-strong:#008030;--wpds-color-stroke-surface-info:#9fbcdc;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-warning:#d0b481;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-color-stroke-surface-error:#daa39b;--wpds-color-stroke-surface-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-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-focus-brand:#3858e9;--wpds-cursor-control:pointer;--wpds-dimension-base:4px;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--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-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-typography-font-family-heading:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-body:-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-xs:11px;--wpds-typography-font-size-sm:12px;--wpds-typography-font-size-md:13px;--wpds-typography-font-size-lg:15px;--wpds-typography-font-size-xl:20px;--wpds-typography-font-size-2xl:32px;--wpds-typography-line-height-xs:16px;--wpds-typography-line-height-sm:20px;--wpds-typography-line-height-md:24px;--wpds-typography-line-height-lg:28px;--wpds-typography-line-height-xl:32px;--wpds-typography-line-height-2xl:40px;--wpds-typography-font-weight-regular:400;--wpds-typography-font-weight-medium:499}[data-wpds-theme-provider-id][data-wpds-density=compact]{--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:4px;--wpds-dimension-padding-md:8px;--wpds-dimension-padding-lg:12px;--wpds-dimension-padding-xl:16px;--wpds-dimension-padding-2xl:20px;--wpds-dimension-padding-3xl:24px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:4px;--wpds-dimension-gap-md:8px;--wpds-dimension-gap-lg:12px;--wpds-dimension-gap-xl:20px;--wpds-dimension-gap-2xl:24px;--wpds-dimension-gap-3xl:32px}[data-wpds-theme-provider-id][data-wpds-density=comfortable]{--wpds-dimension-padding-xs:8px;--wpds-dimension-padding-sm:12px;--wpds-dimension-padding-md:16px;--wpds-dimension-padding-lg:20px;--wpds-dimension-padding-xl:24px;--wpds-dimension-padding-2xl:32px;--wpds-dimension-padding-3xl:40px;--wpds-dimension-gap-xs:8px;--wpds-dimension-gap-sm:12px;--wpds-dimension-gap-md:16px;--wpds-dimension-gap-lg:20px;--wpds-dimension-gap-xl:32px;--wpds-dimension-gap-2xl:40px;--wpds-dimension-gap-3xl:48px}[data-wpds-theme-provider-id][data-wpds-density=default]{--wpds-dimension-base:4px;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}@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}'));
2916 document.head.appendChild(style);
2917 }
2918 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='cc217bc358']")) {
2919 const style = document.createElement("style");
2920 style.setAttribute("data-wp-hash", "cc217bc358");
2921 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%)}}"));
2922 document.head.appendChild(style);
2923 }
2924 export {
2925 init,
2926 initSinglePage,
2927 store
2928 };
2929 //# sourceMappingURL=index.js.map
2930