PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 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 All 404 releases
← All changes | build/scripts/format-library/index.js +1595 -1069 23.9.0 → trunk View file →
@@ -1,5 +1,6 @@
1 1 (function() {
2 +"use strict";
2 3 var wp;
3 4 (wp ||= {}).formatLibrary = (() => {
4 5 var __create = Object.create;
5 6 var __defProp = Object.defineProperty;
@@ -108,9 +109,9 @@
108 109 function is(x, y) {
109 110 return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
110 111 }
111 112 function useSyncExternalStore$2(subscribe2, getSnapshot2) {
112 - didWarnOld18Alpha || void 0 === React50.startTransition || (didWarnOld18Alpha = true, console.error(
113 + didWarnOld18Alpha || void 0 === React51.startTransition || (didWarnOld18Alpha = true, console.error(
113 114 "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
114 115 ));
115 116 var value = getSnapshot2();
116 117 if (!didWarnUncachedGetSnapshot) {
@@ -130,9 +131,9 @@
130 131 checkIfSnapshotChanged(inst) && forceUpdate({ inst });
131 132 },
132 133 [subscribe2, value, getSnapshot2]
133 134 );
134 - useEffect15(
135 + useEffect14(
135 136 function() {
136 137 checkIfSnapshotChanged(inst) && forceUpdate({ inst });
137 138 return subscribe2(function() {
138 139 checkIfSnapshotChanged(inst) && forceUpdate({ inst });
@@ -156,10 +157,10 @@
156 157 function useSyncExternalStore$1(subscribe2, getSnapshot2) {
157 158 return getSnapshot2();
158 159 }
159 160 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
160 - var React50 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState21 = React50.useState, useEffect15 = React50.useEffect, useLayoutEffect3 = React50.useLayoutEffect, useDebugValue = React50.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
161 - exports.useSyncExternalStore = void 0 !== React50.useSyncExternalStore ? React50.useSyncExternalStore : shim;
161 + var React51 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState21 = React51.useState, useEffect14 = React51.useEffect, useLayoutEffect3 = React51.useLayoutEffect, useDebugValue = React51.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
162 + exports.useSyncExternalStore = void 0 !== React51.useSyncExternalStore ? React51.useSyncExternalStore : shim;
162 163 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
163 164 })();
164 165 }
165 166 });
@@ -175,8 +176,15 @@
175 176 }
176 177 }
177 178 });
178 179
180 + // package-external:@wordpress/compose
181 + var require_compose = __commonJS({
182 + "package-external:@wordpress/compose"(exports, module) {
183 + module.exports = window.wp.compose;
184 + }
185 + });
186 +
179 187 // package-external:@wordpress/a11y
180 188 var require_a11y = __commonJS({
181 189 "package-external:@wordpress/a11y"(exports, module) {
182 190 module.exports = window.wp.a11y;
@@ -182,15 +190,8 @@
182 190 module.exports = window.wp.a11y;
183 191 }
184 192 });
185 193
186 - // package-external:@wordpress/compose
187 - var require_compose = __commonJS({
188 - "package-external:@wordpress/compose"(exports, module) {
189 - module.exports = window.wp.compose;
190 - }
191 - });
192 -
193 194 // package-external:@wordpress/url
194 195 var require_url = __commonJS({
195 196 "package-external:@wordpress/url"(exports, module) {
196 197 module.exports = window.wp.url;
@@ -221,13 +222,19 @@
221 222
222 223 // packages/icons/build-module/icon/index.mjs
223 224 var import_element = __toESM(require_element(), 1);
224 225 var icon_default = (0, import_element.forwardRef)(
225 - ({ icon, size = 24, ...props }, ref) => {
226 + ({ icon, size = 24, style, ...props }, ref) => {
227 + const intrinsicStyle = icon.props.style;
228 + const mergedStyle = intrinsicStyle || style ? { ...intrinsicStyle, ...style } : void 0;
226 229 return (0, import_element.cloneElement)(icon, {
227 230 width: size,
228 231 height: size,
229 232 ...props,
233 + // Merge styles so the icon's intrinsic style (e.g. `fill: none` on
234 + // stroke-based icons) is preserved unless the consumer overrides
235 + // the same property explicitly.
236 + ...mergedStyle ? { style: mergedStyle } : {},
230 237 ref
231 238 });
232 239 }
233 240 );
@@ -234,89 +241,104 @@
234 241
235 242 // packages/icons/build-module/library/button.mjs
236 243 var import_primitives = __toESM(require_primitives(), 1);
237 244 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
238 - var button_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z" }) });
245 + var button_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M8 11.75H16M5 16.25H19C19.6904 16.25 20.25 15.6904 20.25 15V8.5C20.25 7.80964 19.6904 7.25 19 7.25H5C4.30964 7.25 3.75 7.80964 3.75 8.5V15C3.75 15.6904 4.30964 16.25 5 16.25Z", vectorEffect: "non-scaling-stroke" }) });
239 246
240 247 // packages/icons/build-module/library/chevron-right.mjs
241 248 var import_primitives2 = __toESM(require_primitives(), 1);
242 249 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
243 - var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });
250 + var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M10 6.5L15 12L10 17.5", vectorEffect: "non-scaling-stroke" }) });
244 251
245 252 // packages/icons/build-module/library/code.mjs
246 253 var import_primitives3 = __toESM(require_primitives(), 1);
247 254 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
248 - var code_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z" }) });
255 + var code_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M7.99997 7L3.70708 11.2929C3.31655 11.6834 3.31655 12.3166 3.70708 12.7071L7.99997 17M16 17L20.2929 12.7071C20.6834 12.3166 20.6834 11.6834 20.2929 11.2929L16 7", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
249 256
250 257 // packages/icons/build-module/library/color.mjs
251 258 var import_primitives4 = __toESM(require_primitives(), 1);
252 259 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
253 - var color_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z" }) });
260 + var color_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M17.25 14C17.25 16.8995 14.8995 19.25 12 19.25C9.10051 19.25 6.75 16.8995 6.75 14C6.75 11.1005 10 7.37 12 5.12C14 7.37 17.25 11.1005 17.25 14Z", vectorEffect: "non-scaling-stroke" }) });
254 261
255 262 // packages/icons/build-module/library/error.mjs
256 263 var import_primitives5 = __toESM(require_primitives(), 1);
257 264 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
258 - var error_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z" }) });
265 + var error_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M12 9L12 14M12 15.5V17M11.1284 5.04947L3.83827 18.0097C3.46331 18.6763 3.94502 19.5 4.70985 19.5H19.2902C20.055 19.5 20.5367 18.6763 20.1617 18.0097L12.8716 5.04947C12.4893 4.36982 11.5107 4.36982 11.1284 5.04947Z", vectorEffect: "non-scaling-stroke" }) });
259 266
260 267 // packages/icons/build-module/library/format-bold.mjs
261 268 var import_primitives6 = __toESM(require_primitives(), 1);
262 269 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
263 - var format_bold_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z" }) });
270 + var format_bold_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M13 11.5H7.75M13 11.5L13.7412 11.6059C15.3242 11.832 16.5 13.1877 16.5 14.7868C16.5 16.5614 15.0614 18 13.2868 18H7.75C7.75 18 7.75 14.9338 7.75 11.5M13 11.5L13.2913 11.4417C14.5756 11.1849 15.5 10.0573 15.5 8.74755C15.5 7.23012 14.2699 6 12.7525 6H7.75C7.75 7.65199 7.75 9.63049 7.75 11.5", vectorEffect: "non-scaling-stroke" }) });
264 271
265 272 // packages/icons/build-module/library/format-italic.mjs
266 273 var import_primitives7 = __toESM(require_primitives(), 1);
267 274 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
268 - var format_italic_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M12.5 5L10 19h1.9l2.5-14z" }) });
275 + var format_italic_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M11 19L13.5 5", vectorEffect: "non-scaling-stroke" }) });
269 276
270 277 // packages/icons/build-module/library/format-strikethrough.mjs
271 278 var import_primitives8 = __toESM(require_primitives(), 1);
272 279 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
273 - var format_strikethrough_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z" }) });
280 + var format_strikethrough_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M9 16.1554C12 18.02 15 16.5283 15 14.2908C15 13.6314 14.6839 12.999 14.1213 12.5328C14.108 12.5217 14.0945 12.5108 14.081 12.5M9 9.31845C9 7.49773 11.4313 6.3247 13.9199 7.4278M5.5 12.5H14.081M18.5 12.5H14.081", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }) });
274 281
275 282 // packages/icons/build-module/library/help.mjs
276 283 var import_primitives9 = __toESM(require_primitives(), 1);
277 284 var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
278 - var help_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z" }) });
285 + var help_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
286 + /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M9.75 10.25C9.75 9.00736 10.7574 8 12 8C13.2426 8 14.25 9.00736 14.25 10.25C14.25 11.4083 13.3748 12.3621 12.2496 12.4863C12.1124 12.5015 12 12.6119 12 12.75V14M12 15V16.5", vectorEffect: "non-scaling-stroke" }),
287 + /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" })
288 + ] });
279 289
280 290 // packages/icons/build-module/library/inline-image.mjs
281 291 var import_primitives10 = __toESM(require_primitives(), 1);
282 292 var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
283 - var inline_image_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z" }) });
293 + var inline_image_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M13.25 11.3197L11.4155 9.48453C11.3765 9.44547 11.3132 9.44546 11.2741 9.48452L9.05837 11.7003C9.02448 11.7341 8.97132 11.7392 8.93163 11.7124L7.0648 10.4495C7.03003 10.426 6.98426 10.4267 6.95022 10.4513L4.75 12.0405M13.25 11.3197V7C13.25 6.30964 12.6904 5.75 12 5.75H6C5.30964 5.75 4.75 6.30965 4.75 7V12.0405M13.25 11.3197V13C13.25 13.6904 12.6904 14.25 12 14.25H6C5.30964 14.25 4.75 13.6904 4.75 13V12.0405M16 14H20M4 18H20", vectorEffect: "non-scaling-stroke" }) });
284 294
285 295 // packages/icons/build-module/library/language.mjs
286 296 var import_primitives11 = __toESM(require_primitives(), 1);
287 297 var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
288 - var language_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M17.5 10h-1.7l-3.7 10.5h1.7l.9-2.6h3.9l.9 2.6h1.7L17.5 10zm-2.2 6.3 1.4-4 1.4 4h-2.8zm-4.8-3.8c1.6-1.8 2.9-3.6 3.7-5.7H16V5.2h-5.8V3H8.8v2.2H3v1.5h9.6c-.7 1.6-1.8 3.1-3.1 4.6C8.6 10.2 7.8 9 7.2 8H5.6c.6 1.4 1.7 2.9 2.9 4.4l-2.4 2.4c-.3.4-.7.8-1.1 1.2l1 1 1.2-1.2c.8-.8 1.6-1.5 2.3-2.3.8.9 1.7 1.7 2.5 2.5l.6-1.5c-.7-.6-1.4-1.3-2.1-2z" }) });
298 + var language_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
299 + /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M3 6H9.5M16 6H13.5M9.5 6V3M9.5 6H13.5M13.5 6C13.0477 7.24386 11.7361 9.79194 9.44037 12.5512M5.5 16.5C7.04336 15.2139 8.35238 13.8588 9.44037 12.5512M6.5 8C6.9232 8.9522 7.93743 10.7507 9.44037 12.5512M12.5 15.5C11.3314 14.6235 10.305 13.587 9.44037 12.5512", vectorEffect: "non-scaling-stroke" }),
300 + /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M13.75 20V19.75L14.6667 17M14.6667 17L16.75 10.75H17.25L19.3333 17L20.25 19.75V20M19.3333 17H14.6667", vectorEffect: "non-scaling-stroke" })
301 + ] });
289 302
290 303 // packages/icons/build-module/library/link.mjs
291 304 var import_primitives12 = __toESM(require_primitives(), 1);
292 305 var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
293 - var link_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });
306 + var link_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M9.5 12L14.5 12M10 7.75H8.25C5.90279 7.75 4 9.65279 4 12C4 14.3472 5.90279 16.25 8.25 16.25H10M14 16.25H15.75C18.0972 16.25 20 14.3472 20 12C20 9.65279 18.0972 7.75 15.75 7.75L14 7.75", vectorEffect: "non-scaling-stroke" }) });
294 307
295 308 // packages/icons/build-module/library/math.mjs
296 309 var import_primitives13 = __toESM(require_primitives(), 1);
297 310 var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
298 - var math_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { d: "M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z" }) });
311 + var math_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { d: "M3 14H5L6.8916 16.3645C6.93974 16.4247 7.03496 16.4101 7.06289 16.3383L10.2521 8.13755C10.4015 7.75318 10.7717 7.5 11.1841 7.5H19M17 11L14.5 13.5M12 16L14.5 13.5M14.5 13.5L17 16M14.5 13.5L12 11", vectorEffect: "non-scaling-stroke" }) });
299 312
300 313 // packages/icons/build-module/library/published.mjs
301 314 var import_primitives14 = __toESM(require_primitives(), 1);
302 315 var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
303 - var published_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z" }) });
316 + var published_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
317 + /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { d: "M12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75C7.99594 4.75 4.75 7.99594 4.75 12C4.75 16.0041 7.99594 19.25 12 19.25Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
318 + /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { d: "M9 12L11 14L15 10", vectorEffect: "non-scaling-stroke" })
319 + ] });
304 320
305 321 // packages/icons/build-module/library/subscript.mjs
306 322 var import_primitives15 = __toESM(require_primitives(), 1);
307 323 var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
308 - var subscript_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.Path, { d: "M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z" }) });
324 + var subscript_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
325 + /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.Path, { d: "M17.75 18.5988H15.75C15.75 16.5322 17.75 17.0489 17.75 15.4989C17.75 14.7239 16.75 14.0738 15.75 14.8488", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
326 + /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.Path, { d: "M10 12L13 7.4V7M10 12L7 7.4L7.00004 7M10 12L7 16.6V17M10 12L13 16.6V17", vectorEffect: "non-scaling-stroke" })
327 + ] });
309 328
310 329 // packages/icons/build-module/library/superscript.mjs
311 330 var import_primitives16 = __toESM(require_primitives(), 1);
312 331 var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
313 - var superscript_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.Path, { d: "M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z" }) });
332 + var superscript_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
333 + /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.Path, { d: "M17.75 8.59884H15.75C15.75 6.53219 17.75 7.04885 17.75 5.49887C17.75 4.72388 16.75 4.07384 15.75 4.84884", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
334 + /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.Path, { d: "M10 12L13 7.4V7M10 12L7 7.4L7.00004 7M10 12L7 16.6V17M10 12L13 16.6V17", vectorEffect: "non-scaling-stroke" })
335 + ] });
314 336
315 337 // packages/icons/build-module/library/text-color.mjs
316 338 var import_primitives17 = __toESM(require_primitives(), 1);
317 339 var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
318 - var text_color_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.Path, { d: "M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z" }) });
340 + var text_color_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.Path, { d: "M8 17.5V17.223L9.01577 14.1757M9.01577 14.1757L11.3243 7.25H11.8784L14.1869 14.1757L15.2027 17.223V17.5M14.1869 14.1757H9.01577", vectorEffect: "non-scaling-stroke" }) });
319 341
320 342 // packages/format-library/build-module/bold/index.mjs
321 343 var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
322 344 var name = "core/bold";
@@ -325,14 +347,20 @@
325 347 name,
326 348 title,
327 349 tagName: "strong",
328 350 className: null,
329 - edit({ isActive, value, onChange, onFocus, isVisible = true }) {
351 + edit({
352 + isActive,
353 + value,
354 + onChange,
355 + onFocus,
356 + isVisible = true
357 + }) {
330 358 function onToggle() {
331 359 onChange((0, import_rich_text.toggleFormat)(value, { type: name, title }));
332 360 }
333 361 function onClick() {
334 - onChange((0, import_rich_text.toggleFormat)(value, { type: name }));
362 + onChange((0, import_rich_text.toggleFormat)(value, { type: name, title }));
335 363 onFocus();
336 364 }
337 365 return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
338 366 /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -401,9 +429,14 @@
401 429 value = (0, import_rich_text2.remove)(value, endIndex, endIndex + 1);
402 430 value = (0, import_rich_text2.applyFormat)(value, { type: name2 }, startIndex, endIndex);
403 431 return value;
404 432 },
405 - edit({ value, onChange, onFocus, isActive }) {
433 + edit({
434 + value,
435 + onChange,
436 + onFocus,
437 + isActive
438 + }) {
406 439 function onClick() {
407 440 onChange((0, import_rich_text2.toggleFormat)(value, { type: name2, title: title2 }));
408 441 onFocus();
409 442 }
@@ -451,23 +484,34 @@
451 484
452 485 // node_modules/@base-ui/utils/useControlled.mjs
453 486 var React = __toESM(require_react(), 1);
454 487
455 - // node_modules/@base-ui/utils/error.mjs
456 - var set;
488 + // node_modules/@base-ui/utils/createLogOnce.mjs
489 + var loggedMessages;
457 490 if (true) {
458 - set = /* @__PURE__ */ new Set();
491 + loggedMessages = /* @__PURE__ */ new Set();
459 492 }
460 - function error(...messages) {
461 - if (true) {
462 - const messageKey = messages.join(" ");
463 - if (!set.has(messageKey)) {
464 - set.add(messageKey);
465 - console.error(`Base UI: ${messageKey}`);
493 + function createLogOnce(severity, prefix) {
494 + return function logOnce(...messages) {
495 + if (true) {
496 + const message = messages.join(" ");
497 + const output = prefix ? `${prefix}: ${message}` : message;
498 + const key = `${severity}:${output}`;
499 + if (!loggedMessages.has(key)) {
500 + loggedMessages.add(key);
501 + if (severity === "warn") {
502 + console.warn(output);
503 + } else {
504 + console.error(output);
505 + }
506 + }
466 507 }
467 - }
508 + };
468 509 }
469 510
511 + // node_modules/@base-ui/utils/error.mjs
512 + var error = createLogOnce("error", "Base UI");
513 +
470 514 // node_modules/@base-ui/utils/useControlled.mjs
471 515 function useControlled({
472 516 controlled,
473 517 default: defaultProp,
@@ -477,9 +521,9 @@
477 521 const {
478 522 current: isControlled
479 523 } = React.useRef(controlled !== void 0);
480 524 const [valueState, setValue] = React.useState(defaultProp);
481 - const value = isControlled ? controlled : valueState;
525 + const value = isControlled && controlled !== void 0 ? controlled : valueState;
482 526 if (true) {
483 527 React.useEffect(() => {
484 528 if (isControlled !== (controlled !== void 0)) {
485 529 error([`A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name16} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name16} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n"));
@@ -578,21 +622,15 @@
578 622 }
579 623 }
580 624
581 625 // node_modules/@base-ui/utils/warn.mjs
582 - var set2;
583 - if (true) {
584 - set2 = /* @__PURE__ */ new Set();
626 + var warn = createLogOnce("warn", "Base UI");
627 +
628 + // node_modules/@base-ui/utils/empty.mjs
629 + function NOOP() {
585 630 }
586 - function warn(...messages) {
587 - if (true) {
588 - const messageKey = messages.join(" ");
589 - if (!set2.has(messageKey)) {
590 - set2.add(messageKey);
591 - console.warn(`Base UI: ${messageKey}`);
592 - }
593 - }
594 - }
631 + var EMPTY_ARRAY = Object.freeze([]);
632 + var EMPTY_OBJECT = Object.freeze({});
595 633
596 634 // node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
597 635 var React6 = __toESM(require_react(), 1);
598 636
@@ -634,9 +672,9 @@
634 672 const listeners = useRefWithInit(createListeners).current;
635 673 const map = useRefWithInit(createMap).current;
636 674 const nextIndexRef = React6.useRef(0);
637 675 const isDirtyRef = React6.useRef(true);
638 - const itemsRef = React6.useRef([]);
676 + const itemsRef = React6.useRef(null);
639 677 const mutationObserverRef = React6.useRef(null);
640 678 const scheduleMapUpdate = useStableCallback(() => {
641 679 if (isDirtyRef.current) {
642 680 return;
@@ -708,16 +746,24 @@
708 746 }
709 747 const flush = useStableCallback(() => {
710 748 const [items, automaticNodes] = getCompositeListSnapshot(map);
711 749 const nextMap = syncRefs(items);
750 + const previousItems = itemsRef.current;
751 + const changed = !previousItems || previousItems.length !== items.length || items.some((item, index2) => {
752 + const previousItem = previousItems[index2];
753 + return item.index !== previousItem.index || item.element !== previousItem.element || item.registration.index !== previousItem.registration.index || item.registration.metadata !== previousItem.registration.metadata;
754 + });
712 755 observe(automaticNodes);
713 756 itemsRef.current = items;
714 757 isDirtyRef.current = false;
758 + if (!changed) {
759 + return;
760 + }
715 761 listeners.forEach((listener) => listener(nextMap));
716 762 onMapChange(nextMap);
717 763 });
718 764 useIsoLayoutEffect(() => {
719 - if (!isDirtyRef.current) {
765 + if (!isDirtyRef.current && itemsRef.current) {
720 766 syncRefs(itemsRef.current);
721 767 }
722 768 return () => {
723 769 elementsRef.current = [];
@@ -767,18 +813,18 @@
767 813 map.forEach((registration, node) => {
768 814 if (!node.isConnected) {
769 815 return;
770 816 }
771 - const index = registration.index;
817 + const index2 = registration.index;
772 818 const item = {
773 - index: index ?? -1,
819 + index: index2 ?? -1,
774 820 element: node,
775 821 registration
776 822 };
777 - if (index === null) {
823 + if (index2 === null) {
778 824 automaticItems.push(item);
779 - } else if (index >= 0) {
780 - reservedIndices.add(index);
825 + } else if (index2 >= 0) {
826 + reservedIndices.add(index2);
781 827 items.push(item);
782 828 }
783 829 });
784 830 let nextAutomaticIndex = 0;
@@ -845,9 +891,9 @@
845 891 function didChange(forkRef, a, b, c, d) {
846 892 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
847 893 }
848 894 function didChangeN(forkRef, newRefs) {
849 - return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
895 + return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
850 896 }
851 897 function update(forkRef, refs) {
852 898 forkRef.refs = refs;
853 899 if (refs.every((ref) => ref == null)) {
@@ -945,14 +991,8 @@
945 991 }
946 992 return void 0;
947 993 }
948 994
949 - // node_modules/@base-ui/utils/empty.mjs
950 - function NOOP() {
951 - }
952 - var EMPTY_ARRAY = Object.freeze([]);
953 - var EMPTY_OBJECT = Object.freeze({});
954 -
955 995 // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
956 996 function getStateAttributesProps(state, customMapping) {
957 997 const props = {};
958 998 for (const key in state) {
@@ -1140,10 +1180,13 @@
1140 1180
1141 1181 // node_modules/@base-ui/react/internals/useRenderElement.mjs
1142 1182 var import_react = __toESM(require_react(), 1);
1143 1183 function useRenderElement(element, componentProps, params = {}) {
1144 - const renderProp = componentProps.render;
1145 - const outProps = useRenderElementProps(componentProps, params);
1184 + let renderProp = componentProps.render;
1185 + if (params.enabled !== false) {
1186 + renderProp = unwrapLazyRenderProp(renderProp);
1187 + }
1188 + const outProps = useRenderElementProps(componentProps, params, renderProp);
1146 1189 if (params.enabled === false) {
1147 1190 return null;
1148 1191 }
1149 1192 const state = params.state ?? EMPTY_OBJECT;
@@ -1148,13 +1191,12 @@
1148 1191 }
1149 1192 const state = params.state ?? EMPTY_OBJECT;
1150 1193 return evaluateRenderProp(element, renderProp, outProps, state);
1151 1194 }
1152 - function useRenderElementProps(componentProps, params = {}) {
1195 + function useRenderElementProps(componentProps, params, renderProp) {
1153 1196 const {
1154 1197 className: classNameProp,
1155 - style: styleProp,
1156 - render: renderProp
1198 + style: styleProp
1157 1199 } = componentProps;
1158 1200 const {
1159 1201 state = EMPTY_OBJECT,
1160 1202 ref,
@@ -1195,8 +1237,15 @@
1195 1237 }
1196 1238 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
1197 1239 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
1198 1240 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
1241 + function unwrapLazyRenderProp(render) {
1242 + if (render?.$$typeof !== REACT_LAZY_TYPE) {
1243 + return render;
1244 + }
1245 + const unwrapped = React9.Children.toArray(render)[0];
1246 + return /* @__PURE__ */ React9.isValidElement(unwrapped) ? unwrapped : render;
1247 + }
1199 1248 function evaluateRenderProp(element, render, props, state) {
1200 1249 if (render) {
1201 1250 if (typeof render === "function") {
1202 1251 if (true) {
@@ -1205,19 +1254,14 @@
1205 1254 return render(props, state);
1206 1255 }
1207 1256 const mergedProps = mergeProps(props, render.props);
1208 1257 mergedProps.ref = props.ref;
1209 - let newElement = render;
1210 - if (newElement?.$$typeof === REACT_LAZY_TYPE) {
1211 - const children = React9.Children.toArray(render);
1212 - newElement = children[0];
1213 - }
1214 1258 if (true) {
1215 - if (!/* @__PURE__ */ React9.isValidElement(newElement)) {
1259 + if (!/* @__PURE__ */ React9.isValidElement(render)) {
1216 1260 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"));
1217 1261 }
1218 1262 }
1219 - return /* @__PURE__ */ React9.cloneElement(newElement, mergedProps);
1263 + return /* @__PURE__ */ React9.cloneElement(render, mergedProps);
1220 1264 }
1221 1265 if (element) {
1222 1266 if (typeof element === "string") {
1223 1267 return renderTag(element, props);
@@ -1435,13 +1479,16 @@
1435 1479 }
1436 1480 return id;
1437 1481 }
1438 1482 cancel(id) {
1439 - const index = id - this.startId;
1440 - if (index < 0 || index >= this.callbacks.length) {
1483 + const index2 = id - this.startId;
1484 + if (index2 < 0 || index2 >= this.callbacks.length) {
1441 1485 return;
1442 1486 }
1443 - this.callbacks[index] = null;
1487 + if (this.callbacks[index2] === null) {
1488 + return;
1489 + }
1490 + this.callbacks[index2] = null;
1444 1491 this.callbacksCount -= 1;
1445 1492 }
1446 1493 };
1447 1494 var scheduler = new Scheduler();
@@ -1482,11 +1529,11 @@
1482 1529 return timeout;
1483 1530 }
1484 1531
1485 1532 // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1486 - function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {
1533 + function useTransitionStatus(open, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
1487 1534 const [transitionStatus, setTransitionStatus] = React12.useState(open && enableIdleState ? "idle" : void 0);
1488 - const [mounted, setMounted] = React12.useState(open);
1535 + const [mounted, setMounted] = React12.useState(open && !animateInitialOpen);
1489 1536 if (open && !mounted) {
1490 1537 setMounted(true);
1491 1538 setTransitionStatus("starting");
1492 1539 }
@@ -1563,9 +1610,9 @@
1563 1610 indexRef.current = newIndex;
1564 1611 }
1565 1612 return indexRef.current;
1566 1613 } : -1);
1567 - const index = externalIndex ?? internalIndex;
1614 + const index2 = externalIndex ?? internalIndex;
1568 1615 const componentRef = React13.useRef(null);
1569 1616 const ref = React13.useCallback((node) => {
1570 1617 const previousNode = componentRef.current;
1571 1618 if (previousNode) {
@@ -1593,18 +1640,27 @@
1593 1640 });
1594 1641 }, [externalIndex, subscribeMapChange]);
1595 1642 return {
1596 1643 ref,
1597 - index
1644 + index: index2
1598 1645 };
1599 1646 }
1600 1647
1648 + // node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
1649 + var TransitionStatusDataAttributes_exports = {};
1650 + __export(TransitionStatusDataAttributes_exports, {
1651 + endingStyle: () => endingStyle,
1652 + startingStyle: () => startingStyle
1653 + });
1654 + var startingStyle = "data-starting-style";
1655 + var endingStyle = "data-ending-style";
1656 +
1601 1657 // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1602 1658 var STARTING_HOOK = {
1603 - "data-starting-style": ""
1659 + [startingStyle]: ""
1604 1660 };
1605 1661 var ENDING_HOOK = {
1606 - "data-ending-style": ""
1662 + [endingStyle]: ""
1607 1663 };
1608 1664 var transitionStatusMapping = {
1609 1665 transitionStatus(value) {
1610 1666 if (value === "starting") {
@@ -1623,17 +1679,27 @@
1623 1679 // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1624 1680 function hasWindow() {
1625 1681 return typeof window !== "undefined";
1626 1682 }
1683 + function getNodeName(node) {
1684 + if (isNode(node)) {
1685 + return (node.nodeName || "").toLowerCase();
1686 + }
1687 + return "#document";
1688 + }
1627 1689 function getWindow(node) {
1628 1690 var _node$ownerDocument;
1629 1691 return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1630 1692 }
1631 - function isElement(value) {
1693 + function getDocumentElement(node) {
1694 + var _ref;
1695 + return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1696 + }
1697 + function isNode(value) {
1632 1698 if (!hasWindow()) {
1633 1699 return false;
1634 1700 }
1635 - return value instanceof Element || value instanceof getWindow(value).Element;
1701 + return value instanceof Node || value instanceof getWindow(value).Node;
1636 1702 }
1637 1703 function isHTMLElement(value) {
1638 1704 if (!hasWindow()) {
1639 1705 return false;
@@ -1645,11 +1711,27 @@
1645 1711 return false;
1646 1712 }
1647 1713 return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1648 1714 }
1715 + function isLastTraversableNode(node) {
1716 + return /^(html|body|#document)$/.test(getNodeName(node));
1717 + }
1649 1718 function getComputedStyle2(element) {
1650 1719 return getWindow(element).getComputedStyle(element);
1651 1720 }
1721 + function getParentNode(node) {
1722 + if (getNodeName(node) === "html") {
1723 + return node;
1724 + }
1725 + const result = (
1726 + // Step into the shadow DOM of the parent of a slotted node.
1727 + node.assignedSlot || // DOM Element detected.
1728 + node.parentNode || // ShadowRoot detected.
1729 + isShadowRoot(node) && node.host || // Fallback.
1730 + getDocumentElement(node)
1731 + );
1732 + return isShadowRoot(result) ? result.host : result;
1733 + }
1652 1734
1653 1735 // node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
1654 1736 var React14 = __toESM(require_react(), 1);
1655 1737 var CompositeRootContext = /* @__PURE__ */ React14.createContext(void 0);
@@ -1900,9 +1982,25 @@
1900 1982 return "current" in maybeRef ? maybeRef.current : maybeRef;
1901 1983 }
1902 1984
1903 1985 // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1904 - function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false) {
1986 + var pendingCallbacks = null;
1987 + function flushBeforePaint(fn) {
1988 + if (!pendingCallbacks) {
1989 + const callbacks = [];
1990 + pendingCallbacks = callbacks;
1991 + queueMicrotask(() => {
1992 + pendingCallbacks = null;
1993 + ReactDOM.flushSync(() => {
1994 + for (const callback of callbacks) {
1995 + callback();
1996 + }
1997 + });
1998 + });
1999 + }
2000 + pendingCallbacks.push(fn);
2001 + }
2002 + function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
1905 2003 const frame = useAnimationFrame();
1906 2004 return useStableCallback((fnToExecute, signal = null) => {
1907 2005 frame.cancel();
1908 2006 const element = resolveRef(elementOrRef);
@@ -1910,9 +2008,17 @@
1910 2008 return;
1911 2009 }
1912 2010 const resolvedElement = element;
1913 2011 const done = () => {
1914 - ReactDOM.flushSync(fnToExecute);
2012 + if (!batch) {
2013 + ReactDOM.flushSync(fnToExecute);
2014 + return;
2015 + }
2016 + flushBeforePaint(() => {
2017 + if (!signal?.aborted) {
2018 + fnToExecute();
2019 + }
2020 + });
1915 2021 };
1916 2022 if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1917 2023 fnToExecute();
1918 2024 return;
@@ -1934,9 +2040,9 @@
1934 2040 done();
1935 2041 });
1936 2042 }
1937 2043 if (waitForStartingStyleRemoved) {
1938 - const startingStyleAttribute = "data-starting-style";
2044 + const startingStyleAttribute = startingStyle;
1939 2045 if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1940 2046 frame.request(exec);
1941 2047 return;
1942 2048 }
@@ -1964,12 +2070,13 @@
1964 2070 const {
1965 2071 enabled = true,
1966 2072 open,
1967 2073 ref,
2074 + batch = false,
1968 2075 onComplete: onCompleteParam
1969 2076 } = parameters;
1970 2077 const onComplete = useStableCallback(onCompleteParam);
1971 - const runOnceAnimationsFinish = useAnimationsFinished(ref, open);
2078 + const runOnceAnimationsFinish = useAnimationsFinished(ref, open, batch);
1972 2079 React17.useEffect(() => {
1973 2080 if (!enabled) {
1974 2081 return void 0;
1975 2082 }
@@ -2016,9 +2123,9 @@
2016 2123 useOnMount(timeout.disposeEffect);
2017 2124 return timeout;
2018 2125 }
2019 2126
2020 - // node_modules/@base-ui/react/internals/shadowDom.mjs
2127 + // node_modules/@base-ui/utils/shadowDom.mjs
2021 2128 function activeElement(doc) {
2022 2129 let element = doc.activeElement;
2023 2130 while (element?.shadowRoot?.activeElement != null) {
2024 2131 element = element.shadowRoot.activeElement;
@@ -2045,9 +2152,9 @@
2045 2152 return false;
2046 2153 }
2047 2154 function getTarget(event) {
2048 2155 if ("composedPath" in event) {
2049 - return event.composedPath()[0];
2156 + return event.composedPath()[0] ?? event.target;
2050 2157 }
2051 2158 return event.target;
2052 2159 }
2053 2160
@@ -2054,10 +2161,10 @@
2054 2161 // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2055 2162 var round = Math.round;
2056 2163
2057 2164 // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2058 - function isIndexOutOfListBounds(list, index) {
2059 - return index < 0 || index >= list.length;
2165 + function isIndexOutOfListBounds(list, index2) {
2166 + return index2 < 0 || index2 >= list.length;
2060 2167 }
2061 2168 function getMinListIndex(listRef, disabledIndices) {
2062 2169 return findNonDisabledListIndex(listRef.current, {
2063 2170 disabledIndices
@@ -2075,20 +2182,20 @@
2075 2182 decrement = false,
2076 2183 disabledIndices,
2077 2184 amount = 1
2078 2185 } = {}) {
2079 - let index = startingIndex;
2186 + let index2 = startingIndex;
2080 2187 do {
2081 - index += decrement ? -amount : amount;
2082 - } while (index >= 0 && index <= list.length - 1 && isListIndexDisabled(list, index, disabledIndices));
2083 - return index;
2188 + index2 += decrement ? -amount : amount;
2189 + } while (index2 >= 0 && index2 <= list.length - 1 && isListIndexDisabled(list, index2, disabledIndices));
2190 + return index2;
2084 2191 }
2085 - function isListIndexDisabled(list, index, disabledIndices) {
2086 - const isExplicitlyDisabled = typeof disabledIndices === "function" ? disabledIndices(index) : disabledIndices?.includes(index) ?? false;
2192 + function isListIndexDisabled(list, index2, disabledIndices) {
2193 + const isExplicitlyDisabled = typeof disabledIndices === "function" ? disabledIndices(index2) : disabledIndices?.includes(index2) ?? false;
2087 2194 if (isExplicitlyDisabled) {
2088 2195 return true;
2089 2196 }
2090 - const element = list[index];
2197 + const element = list[index2];
2091 2198 if (!element) {
2092 2199 return false;
2093 2200 }
2094 2201 if (!isElementVisible(element)) {
@@ -2219,11 +2326,28 @@
2219 2326 }
2220 2327 return value ? "true" : void 0;
2221 2328 }
2222 2329
2330 + // node_modules/@base-ui/react/internals/useValueChanged.mjs
2331 + var React19 = __toESM(require_react(), 1);
2332 + function useValueChanged(value, onChange) {
2333 + const valueRef = React19.useRef(value);
2334 + const onChangeCallback = useStableCallback(onChange);
2335 + useIsoLayoutEffect(() => {
2336 + if (valueRef.current !== value) {
2337 + onChangeCallback(valueRef.current);
2338 + }
2339 + valueRef.current = value;
2340 + }, [value, onChangeCallback]);
2341 + }
2342 +
2223 2343 // node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
2224 - var React19 = __toESM(require_react(), 1);
2344 + var React20 = __toESM(require_react(), 1);
2225 2345
2346 + // node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
2347 + var valid = "data-valid";
2348 + var invalid = "data-invalid";
2349 +
2226 2350 // node_modules/@base-ui/react/internals/field-constants/constants.mjs
2227 2351 var DEFAULT_VALIDITY_STATE = {
2228 2352 badInput: false,
2229 2353 customError: false,
@@ -2254,13 +2378,13 @@
2254 2378 return null;
2255 2379 }
2256 2380 if (value) {
2257 2381 return {
2258 - "data-valid": ""
2382 + [valid]: ""
2259 2383 };
2260 2384 }
2261 2385 return {
2262 - "data-invalid": ""
2386 + [invalid]: ""
2263 2387 };
2264 2388 }
2265 2389 };
2266 2390
@@ -2297,12 +2421,12 @@
2297 2421 },
2298 2422 change: NOOP
2299 2423 }
2300 2424 };
2301 - var FieldRootContext = /* @__PURE__ */ React19.createContext(DEFAULT_FIELD_ROOT_CONTEXT);
2425 + var FieldRootContext = /* @__PURE__ */ React20.createContext(DEFAULT_FIELD_ROOT_CONTEXT);
2302 2426 if (true) FieldRootContext.displayName = "FieldRootContext";
2303 2427 function useFieldRootContext(optional = true) {
2304 - const context = React19.useContext(FieldRootContext);
2428 + const context = React20.useContext(FieldRootContext);
2305 2429 if (context.setValidityData === NOOP && !optional) {
2306 2430 throw new Error(true ? "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>." : formatErrorMessage_default(28));
2307 2431 }
2308 2432 return context;
@@ -2337,10 +2461,10 @@
2337 2461 }, [registerFieldControl, sourceRef]);
2338 2462 }
2339 2463
2340 2464 // node_modules/@base-ui/react/internals/form-context/FormContext.mjs
2341 - var React20 = __toESM(require_react(), 1);
2342 - var FormContext = /* @__PURE__ */ React20.createContext({
2465 + var React21 = __toESM(require_react(), 1);
2466 + var FormContext = /* @__PURE__ */ React21.createContext({
2343 2467 elementRef: {
2344 2468 current: null
2345 2469 },
2346 2470 formRef: {
@@ -2350,25 +2474,26 @@
2350 2474 },
2351 2475 errors: {},
2352 2476 clearErrors: NOOP,
2353 2477 validationMode: "onSubmit",
2354 - submitAttemptedRef: {
2355 - current: false
2478 + submitCountRef: {
2479 + current: 0
2356 2480 }
2357 2481 });
2358 2482 if (true) FormContext.displayName = "FormContext";
2359 2483 function useFormContext() {
2360 - return React20.useContext(FormContext);
2484 + return React21.useContext(FormContext);
2361 2485 }
2362 2486
2363 2487 // node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
2364 - var React22 = __toESM(require_react(), 1);
2488 + var React23 = __toESM(require_react(), 1);
2365 2489
2366 2490 // node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
2367 - var React21 = __toESM(require_react(), 1);
2368 - var LabelableContext = /* @__PURE__ */ React21.createContext({
2491 + var React22 = __toESM(require_react(), 1);
2492 + var LabelableContext = /* @__PURE__ */ React22.createContext({
2369 2493 controlId: void 0,
2370 2494 registerControlId: NOOP,
2495 + resetControlId: NOOP,
2371 2496 labelId: void 0,
2372 2497 setLabelId: NOOP,
2373 2498 messageIds: [],
2374 2499 setMessageIds: NOOP,
@@ -2375,9 +2500,9 @@
2375 2500 getDescriptionProps: (externalProps) => externalProps
2376 2501 });
2377 2502 if (true) LabelableContext.displayName = "LabelableContext";
2378 2503 function useLabelableContext() {
2379 - return React21.useContext(LabelableContext);
2504 + return React22.useContext(LabelableContext);
2380 2505 }
2381 2506
2382 2507 // node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
2383 2508 function useLabelableId(params = {}) {
@@ -2382,20 +2507,19 @@
2382 2507 // node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
2383 2508 function useLabelableId(params = {}) {
2384 2509 const {
2385 2510 id,
2386 - implicit = false,
2387 - controlRef
2511 + enabled = true
2388 2512 } = params;
2389 2513 const {
2390 2514 controlId,
2391 - registerControlId
2515 + registerControlId,
2516 + resetControlId
2392 2517 } = useLabelableContext();
2393 - const defaultId = useBaseUiId(id);
2394 - const controlIdForEffect = implicit ? controlId : void 0;
2518 + const defaultId = useBaseUiId();
2395 2519 const controlSourceRef = useRefWithInit(() => /* @__PURE__ */ Symbol());
2396 - const hasRegisteredRef = React22.useRef(false);
2397 - const hadExplicitIdRef = React22.useRef(id != null);
2520 + const hasRegisteredRef = React23.useRef(false);
2521 + const hadExplicitIdRef = React23.useRef(false);
2398 2522 const unregisterControlId = useStableCallback(() => {
2399 2523 if (!hasRegisteredRef.current || registerControlId === NOOP) {
2400 2524 return;
2401 2525 }
@@ -2402,26 +2526,20 @@
2402 2526 hasRegisteredRef.current = false;
2403 2527 registerControlId(controlSourceRef.current, void 0);
2404 2528 });
2405 2529 useIsoLayoutEffect(() => {
2406 - if (registerControlId === NOOP) {
2530 + if (!enabled || registerControlId === NOOP) {
2531 + unregisterControlId();
2407 2532 return void 0;
2408 2533 }
2409 2534 let nextId;
2410 - if (implicit) {
2411 - const elem = controlRef?.current;
2412 - if (isElement(elem) && elem.closest("label") != null) {
2413 - nextId = id ?? null;
2414 - } else {
2415 - nextId = controlIdForEffect ?? defaultId;
2416 - }
2417 - } else if (id != null) {
2535 + if (id !== void 0) {
2418 2536 hadExplicitIdRef.current = true;
2419 2537 nextId = id;
2420 2538 } else if (hadExplicitIdRef.current) {
2421 2539 nextId = defaultId;
2422 2540 } else {
2423 - unregisterControlId();
2541 + resetControlId();
2424 2542 return void 0;
2425 2543 }
2426 2544 if (nextId === void 0) {
2427 2545 unregisterControlId();
@@ -2429,45 +2547,45 @@
2429 2547 }
2430 2548 hasRegisteredRef.current = true;
2431 2549 registerControlId(controlSourceRef.current, nextId);
2432 2550 return void 0;
2433 - }, [id, controlRef, controlIdForEffect, registerControlId, implicit, defaultId, controlSourceRef, unregisterControlId]);
2434 - React22.useEffect(() => {
2551 + }, [id, enabled, registerControlId, resetControlId, defaultId, controlSourceRef, unregisterControlId]);
2552 + useIsoLayoutEffect(() => {
2435 2553 return unregisterControlId;
2436 2554 }, [unregisterControlId]);
2437 - return controlId ?? defaultId;
2555 + return (enabled ? controlId : void 0) ?? id ?? defaultId;
2438 2556 }
2439 2557
2440 2558 // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
2441 - var React23 = __toESM(require_react(), 1);
2442 - var DirectionContext = /* @__PURE__ */ React23.createContext(void 0);
2559 + var React24 = __toESM(require_react(), 1);
2560 + var DirectionContext = /* @__PURE__ */ React24.createContext(void 0);
2443 2561 if (true) DirectionContext.displayName = "DirectionContext";
2444 2562 function useDirection() {
2445 - const context = React23.useContext(DirectionContext);
2563 + const context = React24.useContext(DirectionContext);
2446 2564 return context?.direction ?? "ltr";
2447 2565 }
2448 2566
2449 2567 // node_modules/@base-ui/react/field/item/FieldItemContext.mjs
2450 - var React24 = __toESM(require_react(), 1);
2451 - var FieldItemContext = /* @__PURE__ */ React24.createContext({
2568 + var React25 = __toESM(require_react(), 1);
2569 + var FieldItemContext = /* @__PURE__ */ React25.createContext({
2452 2570 disabled: false
2453 2571 });
2454 2572 if (true) FieldItemContext.displayName = "FieldItemContext";
2455 2573 function useFieldItemContext() {
2456 - const context = React24.useContext(FieldItemContext);
2574 + const context = React25.useContext(FieldItemContext);
2457 2575 return context;
2458 2576 }
2459 2577
2460 2578 // node_modules/@base-ui/react/field/root/useFieldValidation.mjs
2461 - var React25 = __toESM(require_react(), 1);
2579 + var React26 = __toESM(require_react(), 1);
2462 2580
2463 2581 // node_modules/@base-ui/react/field/utils/getCombinedFieldValidityData.mjs
2464 - function getCombinedFieldValidityData(validityData, invalid) {
2582 + function getCombinedFieldValidityData(validityData, invalid2) {
2465 2583 return {
2466 2584 ...validityData,
2467 2585 state: {
2468 2586 ...validityData.state,
2469 - valid: !invalid && validityData.state.valid
2587 + valid: !invalid2 && validityData.state.valid
2470 2588 }
2471 2589 };
2472 2590 }
2473 2591
@@ -2494,14 +2612,18 @@
2494 2612 fallback ??= input;
2495 2613 }
2496 2614 return fallback;
2497 2615 }
2498 - function clearCustomValidity(element, inputs) {
2499 - for (const input of inputs.keys()) {
2500 - input.setCustomValidity("");
2501 - }
2502 - element?.setCustomValidity("");
2616 + function makeState(customError) {
2617 + return {
2618 + ...DEFAULT_VALIDITY_STATE,
2619 + valid: !customError,
2620 + customError
2621 + };
2503 2622 }
2623 + function getNativeErrors(element) {
2624 + return element && element.validationMessage ? [element.validationMessage] : [];
2625 + }
2504 2626 function useFieldValidation(params) {
2505 2627 const {
2506 2628 elementRef,
2507 2629 formRef
@@ -2510,12 +2632,13 @@
2510 2632 setValidityData,
2511 2633 validate,
2512 2634 validityData,
2513 2635 validationDebounceTime,
2514 - invalid,
2636 + invalid: invalid2,
2515 2637 markedDirtyRef,
2516 2638 state,
2517 2639 shouldValidateOnChange,
2640 + validationMode,
2518 2641 registeredFieldIdRef
2519 2642 } = params;
2520 2643 const {
2521 2644 controlId,
@@ -2521,12 +2644,13 @@
2521 2644 controlId,
2522 2645 getDescriptionProps
2523 2646 } = useLabelableContext();
2524 2647 const timeout = useTimeout();
2525 - const inputRef = React25.useRef(null);
2648 + const inputRef = React26.useRef(null);
2526 2649 const registeredInputs = useRefWithInit(() => /* @__PURE__ */ new Map()).current;
2527 - const validationCommitIdRef = React25.useRef(0);
2528 - const registerInput = React25.useCallback((element, registration) => {
2650 + const validationCommitIdRef = React26.useRef(0);
2651 + const customValidityRef = React26.useRef(null);
2652 + const registerInput = React26.useCallback((element, registration) => {
2529 2653 registeredInputs.set(element, registration);
2530 2654 return () => {
2531 2655 registeredInputs.delete(element);
2532 2656 };
@@ -2537,9 +2661,9 @@
2537 2661 });
2538 2662 const commit = useStableCallback(async (value, revalidate = false) => {
2539 2663 validationCommitIdRef.current += 1;
2540 2664 const validationCommitId = validationCommitIdRef.current;
2541 - function updateRegisteredFieldValidity(nextValidityData2, externalInvalid = invalid) {
2665 + function updateRegisteredFieldValidity(nextValidityData, externalInvalid = invalid2) {
2542 2666 const fieldId = registeredFieldIdRef.current ?? controlId;
2543 2667 if (fieldId == null) {
2544 2668 return;
2545 2669 }
@@ -2546,45 +2670,42 @@
2546 2670 const currentFieldData = formRef.current.fields.get(fieldId);
2547 2671 if (!currentFieldData) {
2548 2672 return;
2549 2673 }
2550 - const validityDataWithFormErrors = getCombinedFieldValidityData(nextValidityData2, externalInvalid);
2674 + const validityDataWithFormErrors = getCombinedFieldValidityData(nextValidityData, externalInvalid);
2551 2675 formRef.current.fields.set(fieldId, {
2552 2676 ...currentFieldData,
2553 2677 validityData: validityDataWithFormErrors
2554 2678 });
2555 2679 }
2556 - function publishAllValid(input, externalInvalid) {
2557 - const nextValidityData2 = {
2680 + function makeValidityData(validityState, errorMessages) {
2681 + const errors = validityState.valid === false ? errorMessages : [];
2682 + return {
2558 2683 value,
2559 - state: {
2560 - ...DEFAULT_VALIDITY_STATE,
2561 - valid: true
2562 - },
2563 - error: "",
2564 - errors: [],
2684 + state: validityState,
2685 + error: errors[0] ?? "",
2686 + errors,
2565 2687 initialValue: validityData.initialValue
2566 2688 };
2567 - clearCustomValidity(input, registeredInputs);
2568 - updateRegisteredFieldValidity(nextValidityData2, externalInvalid);
2569 - setValidityData(nextValidityData2);
2570 2689 }
2571 - const element = registeredInputs.size > 0 ? findRepresentativeInput(registeredInputs, elementRef.current) : inputRef.current;
2572 - if (revalidate) {
2573 - if (state.valid !== false || !element) {
2574 - return;
2690 + function setCustomValidity(element2, message) {
2691 + const displaced = element2.validity.customError ? element2.validationMessage : "";
2692 + const ownedMessage = message.replace(/\r\n?/g, "\n");
2693 + element2.setCustomValidity(ownedMessage);
2694 + customValidityRef.current = [element2, ownedMessage, displaced];
2695 + }
2696 + function clearCustomValidity() {
2697 + const record = customValidityRef.current;
2698 + customValidityRef.current = null;
2699 + if (record && (!record[0].willValidate || record[0].validationMessage === record[1])) {
2700 + record[0].setCustomValidity(record[2]);
2575 2701 }
2576 - const currentNativeValidity = element.validity;
2577 - if (!currentNativeValidity.valueMissing) {
2578 - publishAllValid(element, false);
2579 - return;
2580 - }
2581 - for (const key of validityKeys) {
2582 - if (key !== "valid" && key !== "valueMissing" && key !== "customError" && currentNativeValidity[key]) {
2583 - return;
2584 - }
2585 - }
2586 2702 }
2703 + function publish(validityState, errorMessages, externalInvalid) {
2704 + const nextValidityData = makeValidityData(validityState, errorMessages);
2705 + updateRegisteredFieldValidity(nextValidityData, externalInvalid);
2706 + setValidityData(nextValidityData);
2707 + }
2587 2708 function getState(el) {
2588 2709 const computedState = validityKeys.reduce((acc, key) => {
2589 2710 acc[key] = el.validity[key];
2590 2711 return acc;
@@ -2605,21 +2726,39 @@
2605 2726 computedState.valueMissing = false;
2606 2727 }
2607 2728 return computedState;
2608 2729 }
2730 + function resolveRepresentativeInput() {
2731 + return registeredInputs.size > 0 ? findRepresentativeInput(registeredInputs, elementRef.current) : inputRef.current;
2732 + }
2733 + let element = resolveRepresentativeInput();
2734 + function refreshState() {
2735 + element = resolveRepresentativeInput();
2736 + return element?.willValidate ? getState(element) : makeState(false);
2737 + }
2738 + if (revalidate) {
2739 + if (state.valid !== false || !element) {
2740 + return;
2741 + }
2742 + if (!element.validity.valueMissing) {
2743 + clearCustomValidity();
2744 + const currentElement = resolveRepresentativeInput();
2745 + const foreign = currentElement?.validity.customError ? getNativeErrors(currentElement) : [];
2746 + publish(makeState(foreign.length > 0), foreign, false);
2747 + return;
2748 + }
2749 + for (const key of validityKeys) {
2750 + if (key !== "valid" && key !== "valueMissing" && key !== "customError" && element.validity[key]) {
2751 + return;
2752 + }
2753 + }
2754 + }
2609 2755 timeout.clear();
2610 - let result = null;
2611 - let validationErrors = [];
2612 - const nextState = element ? getState(element) : {
2613 - ...DEFAULT_VALIDITY_STATE,
2614 - valid: true
2615 - };
2616 - let defaultValidationMessage;
2756 + clearCustomValidity();
2757 + let nextState = refreshState();
2758 + let validationErrors = getNativeErrors(element);
2617 2759 const isValidatingOnChange = shouldValidateOnChange();
2618 - if (element && element.validationMessage && !isValidatingOnChange) {
2619 - defaultValidationMessage = element.validationMessage;
2620 - validationErrors = [element.validationMessage];
2621 - } else {
2760 + if (validationErrors.length === 0 || isValidatingOnChange) {
2622 2761 const formValues = Array.from(formRef.current.fields.values()).reduce((acc, field) => {
2623 2762 if (field.name) {
2624 2763 acc[field.name] = field.getValue();
2625 2764 }
@@ -2625,52 +2764,45 @@
2625 2764 }
2626 2765 return acc;
2627 2766 }, {});
2628 2767 const resultOrPromise = validate(value, formValues);
2768 + let result;
2629 2769 if (typeof resultOrPromise === "object" && resultOrPromise !== null && "then" in resultOrPromise) {
2770 + if (nextState.valid === false) {
2771 + publish(nextState, validationErrors);
2772 + } else if (validationMode === "onSubmit" || !validityData.state.customError) {
2773 + nextState.valid = null;
2774 + publish(nextState, validationErrors);
2775 + }
2630 2776 result = await resultOrPromise;
2631 2777 if (validationCommitId !== validationCommitIdRef.current) {
2632 2778 return;
2633 2779 }
2780 + nextState = refreshState();
2634 2781 } else {
2635 2782 result = resultOrPromise;
2636 2783 }
2637 - if (result !== null) {
2784 + validationErrors = result ? [].concat(result).filter(Boolean) : [];
2785 + if (validationErrors.length > 0) {
2638 2786 nextState.valid = false;
2639 2787 nextState.customError = true;
2640 - if (Array.isArray(result)) {
2641 - validationErrors = result;
2642 - element?.setCustomValidity(result.join("\n"));
2643 - } else if (result) {
2644 - validationErrors = [result];
2645 - element?.setCustomValidity(result);
2788 + if (element?.willValidate) {
2789 + setCustomValidity(element, validationErrors.join("\n"));
2646 2790 }
2647 - } else if (isValidatingOnChange) {
2648 - clearCustomValidity(element, registeredInputs);
2649 - nextState.customError = false;
2650 - if (element && element.validationMessage) {
2651 - defaultValidationMessage = element.validationMessage;
2652 - validationErrors = [element.validationMessage];
2653 - } else if ((!element || element.validity.valid) && !nextState.valid) {
2654 - nextState.valid = true;
2655 - }
2791 + } else {
2792 + validationErrors = getNativeErrors(element);
2656 2793 }
2657 2794 }
2658 - const nextValidityData = {
2659 - value,
2660 - state: nextState,
2661 - error: defaultValidationMessage ?? (Array.isArray(result) ? result[0] : result ?? ""),
2662 - errors: validationErrors,
2663 - initialValue: validityData.initialValue
2664 - };
2665 - updateRegisteredFieldValidity(nextValidityData);
2666 - setValidityData(nextValidityData);
2795 + publish(nextState, validationErrors);
2667 2796 });
2668 - const change = useStableCallback((value) => {
2797 + const change = useStableCallback((value, cancelPending = false) => {
2669 2798 timeout.clear();
2799 + validationCommitIdRef.current += 1;
2800 + if (cancelPending) {
2801 + return;
2802 + }
2670 2803 const validateOnChange = shouldValidateOnChange();
2671 2804 if (validateOnChange && value !== "" && validationDebounceTime) {
2672 - validationCommitIdRef.current += 1;
2673 2805 timeout.start(validationDebounceTime, () => {
2674 2806 commit(value);
2675 2807 });
2676 2808 } else {
@@ -2676,12 +2808,12 @@
2676 2808 } else {
2677 2809 commit(value, !validateOnChange);
2678 2810 }
2679 2811 });
2680 - const getValidationProps = React25.useCallback((disabled2, externalProps = {}) => mergeProps(getDescriptionProps(externalProps), state.valid === false && !state.disabled && !disabled2 ? {
2812 + const getValidationProps = React26.useCallback((disabled2, externalProps = {}) => mergeProps(getDescriptionProps(externalProps), state.valid === false && !state.disabled && !disabled2 ? {
2681 2813 "aria-invalid": true
2682 2814 } : EMPTY_OBJECT), [getDescriptionProps, state.disabled, state.valid]);
2683 - return React25.useMemo(() => ({
2815 + return React26.useMemo(() => ({
2684 2816 getValidationProps,
2685 2817 inputRef,
2686 2818 registeredInputs,
2687 2819 registerInput,
@@ -2749,9 +2881,9 @@
2749 2881 focusControl(event);
2750 2882 }
2751 2883 return native ? {
2752 2884 id,
2753 - htmlFor: resolvedControlId ?? void 0,
2885 + htmlFor: resolvedControlId,
2754 2886 onMouseDown: handleInteraction
2755 2887 } : {
2756 2888 id,
2757 2889 onClick: handleInteraction,
@@ -2768,9 +2900,9 @@
2768 2900 });
2769 2901 }
2770 2902
2771 2903 // node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs
2772 - var React26 = __toESM(require_react(), 1);
2904 + var React27 = __toESM(require_react(), 1);
2773 2905 function useCompositeItem(params = {}) {
2774 2906 const {
2775 2907 highlightItemOnHover,
2776 2908 highlightedIndex,
@@ -2777,17 +2909,17 @@
2777 2909 onHighlightedIndexChange
2778 2910 } = useCompositeRootContext();
2779 2911 const {
2780 2912 ref,
2781 - index
2913 + index: index2
2782 2914 } = useCompositeListItem(params);
2783 - const isHighlighted = highlightedIndex === index;
2784 - const itemRef = React26.useRef(null);
2915 + const isHighlighted = highlightedIndex === index2;
2916 + const itemRef = React27.useRef(null);
2785 2917 const mergedRef = useMergedRefs(ref, itemRef);
2786 2918 const compositeProps = {
2787 2919 tabIndex: isHighlighted ? 0 : -1,
2788 2920 onFocus() {
2789 - onHighlightedIndexChange(index);
2921 + onHighlightedIndexChange(index2);
2790 2922 },
2791 2923 onMouseMove() {
2792 2924 const item = itemRef.current;
2793 2925 if (!highlightItemOnHover || !item) {
@@ -2801,9 +2933,9 @@
2801 2933 };
2802 2934 return {
2803 2935 compositeProps,
2804 2936 compositeRef: mergedRef,
2805 - index
2937 + index: index2
2806 2938 };
2807 2939 }
2808 2940
2809 2941 // node_modules/@base-ui/react/utils/getCssDimensions.mjs
@@ -2825,15 +2957,15 @@
2825 2957 };
2826 2958 }
2827 2959
2828 2960 // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
2829 - var React27 = __toESM(require_react(), 1);
2961 + var React28 = __toESM(require_react(), 1);
2830 2962 var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
2831 2963 var DirectionProvider = function DirectionProvider2(props) {
2832 2964 const {
2833 2965 direction = "ltr"
2834 2966 } = props;
2835 - const contextValue = React27.useMemo(() => ({
2967 + const contextValue = React28.useMemo(() => ({
2836 2968 direction
2837 2969 }), [direction]);
2838 2970 return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DirectionContext.Provider, {
2839 2971 value: contextValue,
@@ -2847,18 +2979,46 @@
2847 2979 return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
2848 2980 }
2849 2981
2850 2982 // node_modules/@base-ui/react/internals/csp-context/CSPContext.mjs
2851 - var React28 = __toESM(require_react(), 1);
2852 - var CSPContext = /* @__PURE__ */ React28.createContext(void 0);
2983 + var React29 = __toESM(require_react(), 1);
2984 + var CSPContext = /* @__PURE__ */ React29.createContext(void 0);
2853 2985 if (true) CSPContext.displayName = "CSPContext";
2854 2986 var DEFAULT_CSP_CONTEXT_VALUE = {
2855 2987 disableStyleElements: false
2856 2988 };
2857 2989 function useCSPContext() {
2858 - return React28.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
2990 + return React29.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
2859 2991 }
2860 2992
2993 + // node_modules/@base-ui/react/utils/getElementTransform.mjs
2994 + function getElementTransform(element, computedStyle) {
2995 + const transform = (computedStyle ?? getWindow(element).getComputedStyle(element)).transform;
2996 + let translateX = 0;
2997 + let translateY = 0;
2998 + let scale = 1;
2999 + if (transform && transform !== "none") {
3000 + const matrix = transform.match(/matrix(?:3d)?\(([^)]+)\)/);
3001 + if (matrix) {
3002 + const values = matrix[1].split(", ").map(parseFloat);
3003 + if (values.length === 6) {
3004 + translateX = values[4];
3005 + translateY = values[5];
3006 + scale = Math.sqrt(values[0] * values[0] + values[1] * values[1]);
3007 + } else if (values.length === 16) {
3008 + translateX = values[12];
3009 + translateY = values[13];
3010 + scale = values[0];
3011 + }
3012 + }
3013 + }
3014 + return {
3015 + x: translateX,
3016 + y: translateY,
3017 + scale
3018 + };
3019 + }
3020 +
2861 3021 // node_modules/@base-ui/react/field/index.parts.mjs
2862 3022 var index_parts_exports = {};
2863 3023 __export(index_parts_exports, {
2864 3024 Control: () => FieldControl,
@@ -2870,16 +3030,16 @@
2870 3030 Validity: () => FieldValidity
2871 3031 });
2872 3032
2873 3033 // node_modules/@base-ui/react/field/root/FieldRoot.mjs
2874 - var React32 = __toESM(require_react(), 1);
3034 + var React33 = __toESM(require_react(), 1);
2875 3035
2876 3036 // node_modules/@base-ui/react/fieldset/root/FieldsetRootContext.mjs
2877 - var React29 = __toESM(require_react(), 1);
2878 - var FieldsetRootContext = /* @__PURE__ */ React29.createContext(void 0);
3037 + var React30 = __toESM(require_react(), 1);
3038 + var FieldsetRootContext = /* @__PURE__ */ React30.createContext(void 0);
2879 3039 if (true) FieldsetRootContext.displayName = "FieldsetRootContext";
2880 3040 function useFieldsetRootContext(optional = false) {
2881 - const context = React29.useContext(FieldsetRootContext);
3041 + const context = React30.useContext(FieldsetRootContext);
2882 3042 if (!context && !optional) {
2883 3043 throw new Error(true ? "Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>." : formatErrorMessage_default(86));
2884 3044 }
2885 3045 return context;
@@ -2885,16 +3045,16 @@
2885 3045 return context;
2886 3046 }
2887 3047
2888 3048 // node_modules/@base-ui/react/internals/labelable-provider/LabelableProvider.mjs
2889 - var React30 = __toESM(require_react(), 1);
3049 + var React31 = __toESM(require_react(), 1);
2890 3050 var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
2891 3051 var LabelableProvider = function LabelableProvider2(props) {
2892 3052 const defaultId = useBaseUiId();
2893 - const initialControlId = props.controlId === void 0 ? defaultId : props.controlId;
2894 - const [controlId, setControlIdState] = React30.useState(initialControlId);
2895 - const [labelId, setLabelId] = React30.useState(props.labelId);
2896 - const [messageIds, setMessageIds] = React30.useState([]);
3053 + const [controlIdState, setControlIdState] = React31.useState(defaultId);
3054 + const [labelId, setLabelId] = React31.useState();
3055 + const [messageIds, setMessageIds] = React31.useState([]);
3056 + const controlId = controlIdState === void 0 ? defaultId : controlIdState;
2897 3057 const registrationsRef = useRefWithInit(() => /* @__PURE__ */ new Map());
2898 3058 const {
2899 3059 messageIds: parentMessageIds
2900 3060 } = useLabelableContext();
@@ -2901,18 +3061,18 @@
2901 3061 const registerControlId = useStableCallback((source, nextId) => {
2902 3062 const registrations = registrationsRef.current;
2903 3063 if (nextId === void 0) {
2904 3064 registrations.delete(source);
2905 - return;
3065 + } else {
3066 + registrations.set(source, nextId);
2906 3067 }
2907 - registrations.set(source, nextId);
2908 3068 setControlIdState((prev) => {
2909 3069 if (registrations.size === 0) {
2910 - return void 0;
3070 + return prev;
2911 3071 }
2912 3072 let nextControlId;
2913 3073 for (const id of registrations.values()) {
2914 - if (prev !== void 0 && id === prev) {
3074 + if (id === prev) {
2915 3075 return prev;
2916 3076 }
2917 3077 if (nextControlId === void 0) {
2918 3078 nextControlId = id;
@@ -2920,9 +3080,14 @@
2920 3080 }
2921 3081 return nextControlId;
2922 3082 });
2923 3083 });
2924 - const getDescriptionProps = React30.useCallback((externalProps) => {
3084 + const resetControlId = useStableCallback(() => {
3085 + if (registrationsRef.current.size === 0) {
3086 + setControlIdState(defaultId);
3087 + }
3088 + });
3089 + const getDescriptionProps = React31.useCallback((externalProps) => {
2925 3090 const ids = externalProps["aria-describedby"] ? externalProps["aria-describedby"].split(" ") : [];
2926 3091 ids.push(...parentMessageIds, ...messageIds);
2927 3092 return {
2928 3093 ...externalProps,
@@ -2928,17 +3093,18 @@
2928 3093 ...externalProps,
2929 3094 "aria-describedby": Array.from(new Set(ids)).join(" ") || void 0
2930 3095 };
2931 3096 }, [parentMessageIds, messageIds]);
2932 - const contextValue = React30.useMemo(() => ({
3097 + const contextValue = React31.useMemo(() => ({
2933 3098 controlId,
2934 3099 registerControlId,
3100 + resetControlId,
2935 3101 labelId,
2936 3102 setLabelId,
2937 3103 messageIds,
2938 3104 setMessageIds,
2939 3105 getDescriptionProps
2940 - }), [controlId, registerControlId, labelId, setLabelId, messageIds, setMessageIds, getDescriptionProps]);
3106 + }), [controlId, registerControlId, resetControlId, labelId, setLabelId, messageIds, setMessageIds, getDescriptionProps]);
2941 3107 return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(LabelableContext.Provider, {
2942 3108 value: contextValue,
2943 3109 children: props.children
2944 3110 });
@@ -2945,13 +3111,14 @@
2945 3111 };
2946 3112 if (true) LabelableProvider.displayName = "LabelableProvider";
2947 3113
2948 3114 // node_modules/@base-ui/react/internals/field-register-control/useFieldControlRegistration.mjs
2949 - var React31 = __toESM(require_react(), 1);
3115 + var React32 = __toESM(require_react(), 1);
2950 3116 function useFieldControlRegistration(params) {
2951 3117 const {
3118 + change,
2952 3119 commit,
2953 - invalid,
3120 + invalid: invalid2,
2954 3121 markedDirtyRef,
2955 3122 name: name16,
2956 3123 setRegisteredFieldName,
2957 3124 registeredFieldIdRef,
@@ -2960,11 +3127,11 @@
2960 3127 } = params;
2961 3128 const {
2962 3129 formRef
2963 3130 } = useFormContext();
2964 - const activeFieldControlSourceRef = React31.useRef(null);
2965 - const registrationRef = React31.useRef(null);
2966 - const initialValueCapturedRef = React31.useRef(false);
3131 + const activeFieldControlSourceRef = React32.useRef(null);
3132 + const registrationRef = React32.useRef(null);
3133 + const initialValueCapturedRef = React32.useRef(false);
2967 3134 const getValueForForm = useStableCallback(() => {
2968 3135 const registration = registrationRef.current;
2969 3136 if (!registration) {
2970 3137 return void 0;
@@ -2994,9 +3161,9 @@
2994 3161 formRef.current.fields.set(registration.id, {
2995 3162 getValue: getValueForForm,
2996 3163 name: name16 ?? registration.name,
2997 3164 controlRef: registration.controlRef,
2998 - validityData: getCombinedFieldValidityData(validityData, invalid),
3165 + validityData: getCombinedFieldValidityData(validityData, invalid2),
2999 3166 validate
3000 3167 });
3001 3168 }
3002 3169 function deleteRegistration(id = registrationRef.current?.id) {
@@ -3024,12 +3191,12 @@
3024 3191 formRef.current.fields.set(registration.id, {
3025 3192 getValue: getValueForForm,
3026 3193 name: name16 ?? registration.name,
3027 3194 controlRef: registration.controlRef,
3028 - validityData: getCombinedFieldValidityData(validityData, invalid),
3195 + validityData: getCombinedFieldValidityData(validityData, invalid2),
3029 3196 validate
3030 3197 });
3031 - }, [formRef, getValueForForm, invalid, name16, setRegisteredFieldName, validate, validityData]);
3198 + }, [formRef, getValueForForm, invalid2, name16, setRegisteredFieldName, validate, validityData]);
3032 3199 useIsoLayoutEffect(() => {
3033 3200 const fields = formRef.current.fields;
3034 3201 return () => {
3035 3202 const id = registrationRef.current?.id;
@@ -3041,8 +3208,9 @@
3041 3208 const register = useStableCallback((source, registration) => {
3042 3209 if (!registration) {
3043 3210 if (activeFieldControlSourceRef.current === source) {
3044 3211 activeFieldControlSourceRef.current = null;
3212 + change(void 0, true);
3045 3213 deleteRegistration();
3046 3214 registrationRef.current = null;
3047 3215 setRegisteredFieldName(void 0);
3048 3216 registeredFieldIdRef.current = void 0;
@@ -3049,8 +3217,12 @@
3049 3217 }
3050 3218 return;
3051 3219 }
3052 3220 const previousId = registrationRef.current?.id;
3221 + const previousSource = activeFieldControlSourceRef.current;
3222 + if (previousSource && previousSource !== source) {
3223 + change(void 0, true);
3224 + }
3053 3225 activeFieldControlSourceRef.current = source;
3054 3226 registrationRef.current = registration;
3055 3227 if (!name16) {
3056 3228 setRegisteredFieldName(registration.name);
@@ -3066,13 +3238,13 @@
3066 3238 }
3067 3239
3068 3240 // node_modules/@base-ui/react/field/root/FieldRoot.mjs
3069 3241 var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
3070 - var FieldRootInner = /* @__PURE__ */ React32.forwardRef(function FieldRootInner2(componentProps, forwardedRef) {
3242 + var FieldRootInner = /* @__PURE__ */ React33.forwardRef(function FieldRootInner2(componentProps, forwardedRef) {
3071 3243 const {
3072 3244 errors,
3073 3245 validationMode: formValidationMode,
3074 - submitAttemptedRef
3246 + submitCountRef
3075 3247 } = useFormContext();
3076 3248 const {
3077 3249 render,
3078 3250 className,
@@ -3090,17 +3262,17 @@
3090 3262 } = componentProps;
3091 3263 const disabledFieldset = useFieldsetRootContext(true)?.disabled;
3092 3264 const validate = useStableCallback(validateProp || (() => null));
3093 3265 const disabled2 = disabledFieldset || disabledProp;
3094 - const [touchedState, setTouchedUnwrapped] = React32.useState(false);
3095 - const [dirtyState, setDirtyUnwrapped] = React32.useState(false);
3096 - const [filled, setFilled] = React32.useState(false);
3097 - const [focused, setFocused] = React32.useState(false);
3266 + const [touchedState, setTouchedUnwrapped] = React33.useState(false);
3267 + const [dirtyState, setDirtyUnwrapped] = React33.useState(false);
3268 + const [filled, setFilled] = React33.useState(false);
3269 + const [focused, setFocused] = React33.useState(false);
3098 3270 const dirty = dirtyProp ?? dirtyState;
3099 3271 const touched = touchedProp ?? touchedState;
3100 - const markedDirtyRef = React32.useRef(dirty);
3101 - const registeredFieldIdRef = React32.useRef(void 0);
3102 - const [registeredFieldName, setRegisteredFieldName] = React32.useState();
3272 + const markedDirtyRef = React33.useRef(dirty);
3273 + const registeredFieldIdRef = React33.useRef(void 0);
3274 + const [registeredFieldName, setRegisteredFieldName] = React33.useState();
3103 3275 const effectiveName = name16 ?? registeredFieldName;
3104 3276 useIsoLayoutEffect(() => {
3105 3277 if (dirtyProp !== void 0) {
3106 3278 markedDirtyRef.current = dirtyProp;
@@ -3120,13 +3292,13 @@
3120 3292 return;
3121 3293 }
3122 3294 setTouchedUnwrapped(value);
3123 3295 });
3124 - const shouldValidateOnChange = useStableCallback(() => validationMode === "onChange" || validationMode === "onSubmit" && submitAttemptedRef.current);
3296 + const shouldValidateOnChange = useStableCallback(() => validationMode === "onChange" || validationMode === "onSubmit" && submitCountRef.current > 0);
3125 3297 const formError = effectiveName && Object.hasOwn(errors, effectiveName) ? errors[effectiveName] : null;
3126 3298 const hasFormError = !!(Array.isArray(formError) ? formError.length : formError);
3127 - const invalid = invalidProp === true || hasFormError;
3128 - const [validityData, setValidityData] = React32.useState({
3299 + const invalid2 = invalidProp === true || hasFormError;
3300 + const [validityData, setValidityData] = React33.useState({
3129 3301 state: DEFAULT_VALIDITY_STATE,
3130 3302 error: "",
3131 3303 errors: [],
3132 3304 value: null,
@@ -3131,31 +3303,33 @@
3131 3303 errors: [],
3132 3304 value: null,
3133 3305 initialValue: null
3134 3306 });
3135 - const valid = !invalid && (disabled2 ? null : validityData.state.valid);
3136 - const state = React32.useMemo(() => ({
3307 + const valid2 = !invalid2 && (disabled2 ? null : validityData.state.valid);
3308 + const state = React33.useMemo(() => ({
3137 3309 disabled: disabled2,
3138 3310 touched,
3139 3311 dirty,
3140 - valid,
3312 + valid: valid2,
3141 3313 filled,
3142 3314 focused
3143 - }), [disabled2, touched, dirty, valid, filled, focused]);
3315 + }), [disabled2, touched, dirty, valid2, filled, focused]);
3144 3316 const validation = useFieldValidation({
3145 3317 setValidityData,
3146 3318 validate,
3147 3319 validityData,
3148 3320 validationDebounceTime,
3149 - invalid,
3321 + invalid: invalid2,
3150 3322 markedDirtyRef,
3151 3323 state,
3152 3324 shouldValidateOnChange,
3325 + validationMode,
3153 3326 registeredFieldIdRef
3154 3327 });
3155 3328 const [validateFieldControl, registerFieldControl] = useFieldControlRegistration({
3329 + change: validation.change,
3156 3330 commit: validation.commit,
3157 - invalid,
3331 + invalid: invalid2,
3158 3332 markedDirtyRef,
3159 3333 name: name16,
3160 3334 setRegisteredFieldName,
3161 3335 registeredFieldIdRef,
@@ -3161,13 +3335,13 @@
3161 3335 registeredFieldIdRef,
3162 3336 setValidityData,
3163 3337 validityData
3164 3338 });
3165 - React32.useImperativeHandle(actionsRef, () => ({
3339 + React33.useImperativeHandle(actionsRef, () => ({
3166 3340 validate: validateFieldControl
3167 3341 }), [validateFieldControl]);
3168 - const contextValue = React32.useMemo(() => ({
3169 - invalid,
3342 + const contextValue = React33.useMemo(() => ({
3343 + invalid: invalid2,
3170 3344 name: effectiveName,
3171 3345 validityData,
3172 3346 setValidityData,
3173 3347 disabled: disabled2,
@@ -3179,9 +3353,9 @@
3179 3353 shouldValidateOnChange,
3180 3354 state,
3181 3355 registerFieldControl,
3182 3356 validation
3183 - }), [invalid, effectiveName, validityData, disabled2, setTouched, setDirty, setFilled, setFocused, validationMode, shouldValidateOnChange, state, registerFieldControl, validation]);
3357 + }), [invalid2, effectiveName, validityData, disabled2, setTouched, setDirty, setFilled, setFocused, validationMode, shouldValidateOnChange, state, registerFieldControl, validation]);
3184 3358 const element = useRenderElement("div", componentProps, {
3185 3359 ref: forwardedRef,
3186 3360 state,
3187 3361 props: elementProps,
@@ -3192,9 +3366,9 @@
3192 3366 children: element
3193 3367 });
3194 3368 });
3195 3369 if (true) FieldRootInner.displayName = "FieldRootInner";
3196 - var FieldRoot = /* @__PURE__ */ React32.forwardRef(function FieldRoot2(componentProps, forwardedRef) {
3370 + var FieldRoot = /* @__PURE__ */ React33.forwardRef(function FieldRoot2(componentProps, forwardedRef) {
3197 3371 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(LabelableProvider, {
3198 3372 children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FieldRootInner, {
3199 3373 ...componentProps,
3200 3374 ref: forwardedRef
@@ -3203,10 +3377,10 @@
3203 3377 });
3204 3378 if (true) FieldRoot.displayName = "FieldRoot";
3205 3379
3206 3380 // node_modules/@base-ui/react/field/label/FieldLabel.mjs
3207 - var React33 = __toESM(require_react(), 1);
3208 - var FieldLabel = /* @__PURE__ */ React33.forwardRef(function FieldLabel2(componentProps, forwardedRef) {
3381 + var React34 = __toESM(require_react(), 1);
3382 + var FieldLabel = /* @__PURE__ */ React34.forwardRef(function FieldLabel2(componentProps, forwardedRef) {
3209 3383 const {
3210 3384 render,
3211 3385 className,
3212 3386 style,
@@ -3222,15 +3396,15 @@
3222 3396 const state = {
3223 3397 ...fieldRootContext.state,
3224 3398 disabled: fieldRootContext.disabled || fieldItemContext.disabled
3225 3399 };
3226 - const labelRef = React33.useRef(null);
3400 + const labelRef = React34.useRef(null);
3227 3401 const labelProps = useLabel({
3228 3402 id: labelId ?? idProp,
3229 3403 native: nativeLabel
3230 3404 });
3231 3405 if (true) {
3232 - React33.useEffect(() => {
3406 + React34.useEffect(() => {
3233 3407 if (!labelRef.current) {
3234 3408 return;
3235 3409 }
3236 3410 const isLabelTag = labelRef.current.tagName === "LABEL";
@@ -3257,15 +3431,15 @@
3257 3431 });
3258 3432 if (true) FieldLabel.displayName = "FieldLabel";
3259 3433
3260 3434 // node_modules/@base-ui/react/field/error/FieldError.mjs
3261 - var React34 = __toESM(require_react(), 1);
3435 + var React35 = __toESM(require_react(), 1);
3262 3436 var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
3263 3437 var stateAttributesMapping = {
3264 3438 ...fieldValidityMapping,
3265 3439 ...transitionStatusMapping
3266 3440 };
3267 - var FieldError = /* @__PURE__ */ React34.forwardRef(function FieldError2(componentProps, forwardedRef) {
3441 + var FieldError = /* @__PURE__ */ React35.forwardRef(function FieldError2(componentProps, forwardedRef) {
3268 3442 const {
3269 3443 render,
3270 3444 id: idProp,
3271 3445 className,
@@ -3311,11 +3485,11 @@
3311 3485 return () => {
3312 3486 setMessageIds((v) => v.filter((item) => item !== id));
3313 3487 };
3314 3488 }, [rendered, id, setMessageIds]);
3315 - const errorRef = React34.useRef(null);
3316 - const [lastRenderedMessage, setLastRenderedMessage] = React34.useState(null);
3317 - const [lastRenderedMessageKey, setLastRenderedMessageKey] = React34.useState(null);
3489 + const errorRef = React35.useRef(null);
3490 + const [lastRenderedMessage, setLastRenderedMessage] = React35.useState(null);
3491 + const [lastRenderedMessageKey, setLastRenderedMessageKey] = React35.useState(null);
3318 3492 let error2 = validityData.error;
3319 3493 if (!hasSpecificMatch && hasFormError) {
3320 3494 error2 = formError;
3321 3495 } else if (validityData.errors.length > 1) {
@@ -3364,10 +3538,10 @@
3364 3538 });
3365 3539 if (true) FieldError.displayName = "FieldError";
3366 3540
3367 3541 // node_modules/@base-ui/react/field/description/FieldDescription.mjs
3368 - var React35 = __toESM(require_react(), 1);
3369 - var FieldDescription = /* @__PURE__ */ React35.forwardRef(function FieldDescription2(componentProps, forwardedRef) {
3542 + var React36 = __toESM(require_react(), 1);
3543 + var FieldDescription = /* @__PURE__ */ React36.forwardRef(function FieldDescription2(componentProps, forwardedRef) {
3370 3544 const {
3371 3545 render,
3372 3546 id: idProp,
3373 3547 className,
@@ -3405,10 +3579,10 @@
3405 3579 });
3406 3580 if (true) FieldDescription.displayName = "FieldDescription";
3407 3581
3408 3582 // node_modules/@base-ui/react/field/control/FieldControl.mjs
3409 - var React36 = __toESM(require_react(), 1);
3410 - var FieldControl = /* @__PURE__ */ React36.forwardRef(function FieldControl2(componentProps, forwardedRef) {
3583 + var React37 = __toESM(require_react(), 1);
3584 + var FieldControl = /* @__PURE__ */ React37.forwardRef(function FieldControl2(componentProps, forwardedRef) {
3411 3585 const {
3412 3586 render,
3413 3587 className,
3414 3588 id: idProp,
@@ -3433,9 +3607,11 @@
3433 3607 validationMode,
3434 3608 validation
3435 3609 } = useFieldRootContext();
3436 3610 const {
3437 - clearErrors
3611 + clearErrors,
3612 + elementRef: formElementRef,
3613 + submitCountRef
3438 3614 } = useFormContext();
3439 3615 const disabled2 = fieldDisabled || disabledProp;
3440 3616 const name16 = fieldName ?? nameProp;
3441 3617 const state = {
@@ -3447,22 +3623,8 @@
3447 3623 } = useLabelableContext();
3448 3624 const id = useLabelableId({
3449 3625 id: idProp
3450 3626 });
3451 - useIsoLayoutEffect(() => {
3452 - const hasExternalValue = valueProp != null;
3453 - if (validation.inputRef.current?.value || hasExternalValue && valueProp !== "") {
3454 - setFilled(true);
3455 - } else if (hasExternalValue && valueProp === "") {
3456 - setFilled(false);
3457 - }
3458 - }, [validation.inputRef, setFilled, valueProp]);
3459 - const inputRef = React36.useRef(null);
3460 - useIsoLayoutEffect(() => {
3461 - if (autoFocus && inputRef.current === activeElement(ownerDocument(inputRef.current))) {
3462 - setFocused(true);
3463 - }
3464 - }, [autoFocus, setFocused]);
3465 3627 const [valueUnwrapped] = useControlled({
3466 3628 controlled: valueProp,
3467 3629 default: defaultValue,
3468 3630 name: "FieldControl",
@@ -3469,10 +3631,32 @@
3469 3631 state: "value"
3470 3632 });
3471 3633 const isControlled = valueProp !== void 0;
3472 3634 const value = isControlled ? valueUnwrapped : void 0;
3635 + const serializedValue = value == null ? void 0 : String(value);
3473 3636 const getValueFromInput = useStableCallback(() => validation.inputRef.current?.value);
3474 - useRegisterFieldControl(validation.inputRef, id, value, getValueFromInput, !disabled2, nameProp);
3637 + useRegisterFieldControl(validation.inputRef, id, serializedValue, getValueFromInput, !disabled2, nameProp);
3638 + useIsoLayoutEffect(() => {
3639 + const currentValue = serializedValue ?? validation.inputRef.current?.value;
3640 + if (currentValue !== void 0) {
3641 + setFilled(currentValue !== "");
3642 + }
3643 + }, [serializedValue, validation.inputRef, setFilled]);
3644 + useValueChanged(serializedValue, () => {
3645 + if (serializedValue === void 0) {
3646 + return;
3647 + }
3648 + clearErrors(name16);
3649 + setDirty(serializedValue !== (validityData.initialValue ?? ""));
3650 + validation.change(serializedValue);
3651 + });
3652 + const inputRef = React37.useRef(null);
3653 + const enterValidationTimeout = useTimeout();
3654 + useIsoLayoutEffect(() => {
3655 + if (autoFocus && inputRef.current === activeElement(ownerDocument(inputRef.current))) {
3656 + setFocused(true);
3657 + }
3658 + }, [autoFocus, setFocused]);
3475 3659 const element = useRenderElement("input", componentProps, {
3476 3660 ref: [forwardedRef, inputRef],
3477 3661 state,
3478 3662 props: [{
@@ -3488,12 +3672,16 @@
3488 3672 defaultValue
3489 3673 },
3490 3674 onChange(event) {
3491 3675 const inputValue = event.currentTarget.value;
3492 - onValueChange?.(inputValue, createChangeEventDetails(reason_parts_exports.none, event.nativeEvent));
3676 + const details = createChangeEventDetails(reason_parts_exports.none, event.nativeEvent);
3677 + onValueChange?.(inputValue, details);
3678 + if (isControlled) {
3679 + return;
3680 + }
3493 3681 setDirty(inputValue !== (validityData.initialValue ?? ""));
3494 3682 setFilled(inputValue !== "");
3495 - if (!event.nativeEvent.defaultPrevented) {
3683 + if (!event.nativeEvent.defaultPrevented && !details.isCanceled) {
3496 3684 clearErrors(name16);
3497 3685 validation.change(inputValue);
3498 3686 }
3499 3687 },
@@ -3503,15 +3691,36 @@
3503 3691 onBlur(event) {
3504 3692 setTouched(true);
3505 3693 setFocused(false);
3506 3694 if (validationMode === "onBlur") {
3507 - validation.commit(event.currentTarget.value);
3695 + const inputValue = event.currentTarget.value;
3696 + validation.commit(inputValue);
3697 + if (isControlled) {
3698 + queueMicrotask(() => {
3699 + const nextValue = validation.inputRef.current?.value;
3700 + if (nextValue !== void 0 && nextValue !== inputValue && nextValue !== (validityData.initialValue ?? "")) {
3701 + validation.commit(nextValue);
3702 + }
3703 + });
3704 + }
3508 3705 }
3509 3706 },
3510 3707 onKeyDown(event) {
3511 3708 if (event.currentTarget.tagName === "INPUT" && event.key === "Enter") {
3512 3709 setTouched(true);
3513 - validation.commit(event.currentTarget.value);
3710 + const value2 = event.currentTarget.value;
3711 + const form = event.currentTarget.form;
3712 + if (form && form === formElementRef.current && !event.defaultPrevented) {
3713 + const input = event.currentTarget;
3714 + const submitCount = submitCountRef.current;
3715 + enterValidationTimeout.start(0, () => {
3716 + if (submitCountRef.current === submitCount) {
3717 + validation.commit(input.value);
3718 + }
3719 + });
3720 + } else {
3721 + validation.commit(value2);
3722 + }
3514 3723 }
3515 3724 }
3516 3725 }, elementProps, (props) => validation.getValidationProps(disabled2, props)],
3517 3726 stateAttributesMapping: fieldValidityMapping
@@ -3520,9 +3729,9 @@
3520 3729 });
3521 3730 if (true) FieldControl.displayName = "FieldControl";
3522 3731
3523 3732 // node_modules/@base-ui/react/field/validity/FieldValidity.mjs
3524 - var React37 = __toESM(require_react(), 1);
3733 + var React38 = __toESM(require_react(), 1);
3525 3734 var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
3526 3735 var FieldValidity = function FieldValidity2(props) {
3527 3736 const {
3528 3737 children
@@ -3528,16 +3737,16 @@
3528 3737 children
3529 3738 } = props;
3530 3739 const {
3531 3740 validityData,
3532 - invalid
3741 + invalid: invalid2
3533 3742 } = useFieldRootContext(false);
3534 - const combinedFieldValidityData = React37.useMemo(() => getCombinedFieldValidityData(validityData, invalid), [validityData, invalid]);
3743 + const combinedFieldValidityData = React38.useMemo(() => getCombinedFieldValidityData(validityData, invalid2), [validityData, invalid2]);
3535 3744 const isInvalid = combinedFieldValidityData.state.valid === false;
3536 3745 const {
3537 3746 transitionStatus
3538 3747 } = useTransitionStatus(isInvalid);
3539 - const fieldValidityState = React37.useMemo(() => {
3748 + const fieldValidityState = React38.useMemo(() => {
3540 3749 return {
3541 3750 ...combinedFieldValidityData,
3542 3751 validity: combinedFieldValidityData.state,
3543 3752 transitionStatus
@@ -3542,9 +3751,9 @@
3542 3751 validity: combinedFieldValidityData.state,
3543 3752 transitionStatus
3544 3753 };
3545 3754 }, [combinedFieldValidityData, transitionStatus]);
3546 - return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(React37.Fragment, {
3755 + return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(React38.Fragment, {
3547 3756 children: children(fieldValidityState)
3548 3757 });
3549 3758 };
3550 3759 if (true) FieldValidity.displayName = "FieldValidity";
@@ -3549,11 +3758,11 @@
3549 3758 };
3550 3759 if (true) FieldValidity.displayName = "FieldValidity";
3551 3760
3552 3761 // node_modules/@base-ui/react/field/item/FieldItem.mjs
3553 - var React38 = __toESM(require_react(), 1);
3762 + var React39 = __toESM(require_react(), 1);
3554 3763 var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
3555 - var FieldItem = /* @__PURE__ */ React38.forwardRef(function FieldItem2(componentProps, forwardedRef) {
3764 + var FieldItem = /* @__PURE__ */ React39.forwardRef(function FieldItem2(componentProps, forwardedRef) {
3556 3765 const {
3557 3766 render,
3558 3767 className,
3559 3768 style,
@@ -3568,9 +3777,9 @@
3568 3777 const state = {
3569 3778 ...fieldState,
3570 3779 disabled: disabled2
3571 3780 };
3572 - const fieldItemContext = React38.useMemo(() => ({
3781 + const fieldItemContext = React39.useMemo(() => ({
3573 3782 disabled: disabled2
3574 3783 }), [disabled2]);
3575 3784 const element = useRenderElement("div", componentProps, {
3576 3785 ref: forwardedRef,
@@ -3587,11 +3796,11 @@
3587 3796 });
3588 3797 if (true) FieldItem.displayName = "FieldItem";
3589 3798
3590 3799 // node_modules/@base-ui/react/input/Input.mjs
3591 - var React39 = __toESM(require_react(), 1);
3800 + var React40 = __toESM(require_react(), 1);
3592 3801 var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
3593 - var Input = /* @__PURE__ */ React39.forwardRef(function Input2(props, forwardedRef) {
3802 + var Input = /* @__PURE__ */ React40.forwardRef(function Input2(props, forwardedRef) {
3594 3803 return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(index_parts_exports.Control, {
3595 3804 ref: forwardedRef,
3596 3805 ...props
3597 3806 });
@@ -3598,18 +3807,17 @@
3598 3807 });
3599 3808 if (true) Input.displayName = "Input";
3600 3809
3601 3810 // node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
3602 - var React41 = __toESM(require_react(), 1);
3811 + var React42 = __toESM(require_react(), 1);
3603 3812
3604 3813 // node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
3605 - var React40 = __toESM(require_react(), 1);
3814 + var React41 = __toESM(require_react(), 1);
3606 3815
3607 3816 // node_modules/@base-ui/react/internals/composite/constants.mjs
3608 3817 var ACTIVE_COMPOSITE_ITEM = "data-composite-item-active";
3609 3818
3610 3819 // node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
3611 - var EMPTY_ARRAY2 = [];
3612 3820 function useCompositeRoot(params) {
3613 3821 const {
3614 3822 loopFocus = true,
3615 3823 orientation = "both",
@@ -3621,28 +3829,45 @@
3621 3829 rootRef: externalRef,
3622 3830 enableHomeAndEndKeys = false,
3623 3831 stopEventPropagation,
3624 3832 disabledIndices,
3625 - modifierKeys = EMPTY_ARRAY2
3833 + modifierKeys = EMPTY_ARRAY
3626 3834 } = params;
3627 - const [internalHighlightedIndex, internalSetHighlightedIndex] = React40.useState(0);
3835 + const [internalHighlightedIndex, internalSetHighlightedIndex] = React41.useState(0);
3628 3836 const isGrid = grid != null;
3629 - const rootRef = React40.useRef(null);
3837 + const rootRef = React41.useRef(null);
3630 3838 const mergedRef = useMergedRefs(rootRef, externalRef);
3631 - const elementsRef = React40.useRef([]);
3632 - const hasSetDefaultIndexRef = React40.useRef(false);
3839 + const elementsRef = React41.useRef([]);
3840 + const hasSetDefaultIndexRef = React41.useRef(false);
3841 + const highlightedElementRef = React41.useRef(null);
3633 3842 const highlightedIndex = externalHighlightedIndex ?? internalHighlightedIndex;
3634 - const onHighlightedIndexChange = useStableCallback((index, shouldScrollIntoView = false) => {
3635 - (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index);
3843 + const onHighlightedIndexChange = useStableCallback((index2, shouldScrollIntoView = false) => {
3844 + highlightedElementRef.current = elementsRef.current[index2] ?? null;
3845 + (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index2);
3636 3846 if (shouldScrollIntoView) {
3637 - const newActiveItem = elementsRef.current[index];
3847 + const newActiveItem = elementsRef.current[index2];
3638 3848 scrollIntoViewIfNeeded(rootRef.current, newActiveItem, direction, orientation);
3639 3849 }
3640 3850 });
3641 3851 const onMapChange = useStableCallback((map) => {
3642 - if (map.size === 0 || hasSetDefaultIndexRef.current) {
3852 + if (map.size === 0) {
3643 3853 return;
3644 3854 }
3855 + if (hasSetDefaultIndexRef.current) {
3856 + const elements = elementsRef.current;
3857 + const nextIndex = elements.indexOf(highlightedElementRef.current);
3858 + if (nextIndex === -1) {
3859 + const replacement = elements[highlightedIndex];
3860 + if (!replacement || isListIndexDisabled(elements, highlightedIndex, disabledIndices)) {
3861 + onHighlightedIndexChange(getFallbackIndex(elements, disabledIndices));
3862 + } else {
3863 + highlightedElementRef.current = replacement;
3864 + }
3865 + } else if (nextIndex !== highlightedIndex) {
3866 + onHighlightedIndexChange(nextIndex);
3867 + }
3868 + return;
3869 + }
3645 3870 hasSetDefaultIndexRef.current = true;
3646 3871 const sortedElements = Array.from(map.keys());
3647 3872 const activeItem = sortedElements.find((compositeElement) => compositeElement?.hasAttribute(ACTIVE_COMPOSITE_ITEM)) ?? null;
3648 3873 const activeIndex = activeItem ? map.get(activeItem)?.index ?? -1 : -1;
@@ -3788,8 +4013,24 @@
3788 4013 onMapChange,
3789 4014 relayKeyboardEvent: onKeyDown
3790 4015 };
3791 4016 }
4017 + function getFallbackIndex(elements, disabledIndices) {
4018 + let fallbackIndex = -1;
4019 + for (let index2 = 0; index2 < elements.length; index2 += 1) {
4020 + const element = elements[index2];
4021 + if (!element || isListIndexDisabled(elements, index2, disabledIndices)) {
4022 + continue;
4023 + }
4024 + if (element.hasAttribute(ACTIVE_COMPOSITE_ITEM)) {
4025 + return index2;
4026 + }
4027 + if (fallbackIndex === -1) {
4028 + fallbackIndex = index2;
4029 + }
4030 + }
4031 + return Math.max(fallbackIndex, 0);
4032 + }
3792 4033 function isModifierKeySet(event, ignoredModifierKeys) {
3793 4034 for (const key of MODIFIER_KEYS) {
3794 4035 if (ignoredModifierKeys.includes(key)) {
3795 4036 continue;
@@ -3855,9 +4096,9 @@
3855 4096 ref: refs,
3856 4097 props: [defaultProps, ...props, elementProps],
3857 4098 stateAttributesMapping: stateAttributesMapping4
3858 4099 });
3859 - const contextValue = React41.useMemo(() => ({
4100 + const contextValue = React42.useMemo(() => ({
3860 4101 highlightedIndex,
3861 4102 onHighlightedIndexChange,
3862 4103 highlightItemOnHover,
3863 4104 relayKeyboardEvent
@@ -3893,9 +4134,9 @@
3893 4134 return (0, import_shim.useSyncExternalStore)(subscribe, getSnapshot, getServerSnapshot);
3894 4135 }
3895 4136
3896 4137 // node_modules/@base-ui/react/internals/PrehydrationScript.mjs
3897 - var React42 = __toESM(require_react(), 1);
4138 + var React43 = __toESM(require_react(), 1);
3898 4139 var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
3899 4140 function PrehydrationScript(props) {
3900 4141 const {
3901 4142 script: script2
@@ -3926,16 +4167,16 @@
3926 4167 Tab: () => TabsTab
3927 4168 });
3928 4169
3929 4170 // node_modules/@base-ui/react/tabs/root/TabsRoot.mjs
3930 - var React44 = __toESM(require_react(), 1);
4171 + var React45 = __toESM(require_react(), 1);
3931 4172
3932 4173 // node_modules/@base-ui/react/tabs/root/TabsRootContext.mjs
3933 - var React43 = __toESM(require_react(), 1);
3934 - var TabsRootContext = /* @__PURE__ */ React43.createContext(void 0);
4174 + var React44 = __toESM(require_react(), 1);
4175 + var TabsRootContext = /* @__PURE__ */ React44.createContext(void 0);
3935 4176 if (true) TabsRootContext.displayName = "TabsRootContext";
3936 4177 function useTabsRootContext() {
3937 - const context = React43.useContext(TabsRootContext);
4178 + const context = React44.useContext(TabsRootContext);
3938 4179 if (context === void 0) {
3939 4180 throw new Error(true ? "Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>." : formatErrorMessage_default(64));
3940 4181 }
3941 4182 return context;
@@ -3940,18 +4181,21 @@
3940 4181 }
3941 4182 return context;
3942 4183 }
3943 4184
4185 + // node_modules/@base-ui/react/tabs/root/TabsRootDataAttributes.mjs
4186 + var activationDirection = "data-activation-direction";
4187 +
3944 4188 // node_modules/@base-ui/react/tabs/root/stateAttributesMapping.mjs
3945 4189 var tabsStateAttributesMapping = {
3946 4190 tabActivationDirection: (dir) => ({
3947 - "data-activation-direction": dir
4191 + [activationDirection]: dir
3948 4192 })
3949 4193 };
3950 4194
3951 4195 // node_modules/@base-ui/react/tabs/root/TabsRoot.mjs
3952 4196 var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
3953 - var TabsRoot = /* @__PURE__ */ React44.forwardRef(function TabsRoot2(componentProps, forwardedRef) {
4197 + var TabsRoot = /* @__PURE__ */ React45.forwardRef(function TabsRoot2(componentProps, forwardedRef) {
3954 4198 const {
3955 4199 className,
3956 4200 defaultValue: defaultValueProp = 0,
3957 4201 onValueChange: onValueChangeProp,
@@ -3961,10 +4205,10 @@
3961 4205 style,
3962 4206 ...elementProps
3963 4207 } = componentProps;
3964 4208 const hasExplicitDefaultValueProp = componentProps.defaultValue !== void 0;
3965 - const tabPanelRefs = React44.useRef([]);
3966 - const [mountedTabPanels, setMountedTabPanels] = React44.useState(() => /* @__PURE__ */ new Map());
4209 + const tabPanelRefs = React45.useRef([]);
4210 + const [mountedTabPanels, setMountedTabPanels] = React45.useState(() => /* @__PURE__ */ new Map());
3967 4211 const [value, setValue] = useControlled({
3968 4212 controlled: valueProp,
3969 4213 default: defaultValueProp,
3970 4214 name: "Tabs",
@@ -3970,12 +4214,12 @@
3970 4214 name: "Tabs",
3971 4215 state: "value"
3972 4216 });
3973 4217 const isControlled = valueProp !== void 0;
3974 - const [tabMap, setTabMap] = React44.useState(() => /* @__PURE__ */ new Map());
3975 - const lastKnownTabElementRef = React44.useRef(void 0);
3976 - const getTabElementBySelectedValue = React44.useCallback((selectedValue) => findTabElement(tabMap, selectedValue), [tabMap]);
3977 - const [activationDirectionState, setActivationDirectionState] = React44.useState(() => ({
4218 + const [tabMap, setTabMap] = React45.useState(() => /* @__PURE__ */ new Map());
4219 + const lastKnownTabElementRef = React45.useRef(void 0);
4220 + const getTabElementBySelectedValue = React45.useCallback((selectedValue) => findTabElement(tabMap, selectedValue), [tabMap]);
4221 + const [activationDirectionState, setActivationDirectionState] = React45.useState(() => ({
3978 4222 previousValue: value,
3979 4223 tabActivationDirection: "none"
3980 4224 }));
3981 4225 const {
@@ -3999,10 +4243,10 @@
3999 4243 tabActivationDirection
4000 4244 });
4001 4245 }, [nextPreviousValue, shouldSyncActivationDirectionState, tabActivationDirection]);
4002 4246 const onValueChange = useStableCallback((newValue, eventDetails) => {
4003 - const activationDirection = computeActivationDirection(value, newValue, orientation, tabMap);
4004 - eventDetails.activationDirection = activationDirection;
4247 + const activationDirection2 = computeActivationDirection(value, newValue, orientation, tabMap);
4248 + eventDetails.activationDirection = activationDirection2;
4005 4249 onValueChangeProp?.(newValue, eventDetails);
4006 4250 if (eventDetails.isCanceled) {
4007 4251 return;
4008 4252 }
@@ -4029,12 +4273,12 @@
4029 4273 return next;
4030 4274 });
4031 4275 };
4032 4276 });
4033 - const getTabPanelIdByValue = React44.useCallback((tabValue) => {
4277 + const getTabPanelIdByValue = React45.useCallback((tabValue) => {
4034 4278 return mountedTabPanels.get(tabValue);
4035 4279 }, [mountedTabPanels]);
4036 - const getTabIdByPanelValue = React44.useCallback((tabPanelValue) => {
4280 + const getTabIdByPanelValue = React45.useCallback((tabPanelValue) => {
4037 4281 for (const tabMetadata of tabMap.values()) {
4038 4282 if (tabPanelValue === tabMetadata.value) {
4039 4283 return tabMetadata.id;
4040 4284 }
@@ -4040,9 +4284,9 @@
4040 4284 }
4041 4285 }
4042 4286 return void 0;
4043 4287 }, [tabMap]);
4044 - const tabsContextValue = React44.useMemo(() => ({
4288 + const tabsContextValue = React45.useMemo(() => ({
4045 4289 getTabElementBySelectedValue,
4046 4290 getTabIdByPanelValue,
4047 4291 getTabPanelIdByValue,
4048 4292 onValueChange,
@@ -4051,9 +4295,9 @@
4051 4295 setTabMap,
4052 4296 tabActivationDirection,
4053 4297 value
4054 4298 }), [getTabElementBySelectedValue, getTabIdByPanelValue, getTabPanelIdByValue, onValueChange, orientation, registerMountedTabPanel, setTabMap, tabActivationDirection, value]);
4055 - const selectedTabMetadata = React44.useMemo(() => {
4299 + const selectedTabMetadata = React45.useMemo(() => {
4056 4300 for (const tabMetadata of tabMap.values()) {
4057 4301 if (tabMetadata.value === value) {
4058 4302 return tabMetadata;
4059 4303 }
@@ -4059,9 +4303,9 @@
4059 4303 }
4060 4304 }
4061 4305 return void 0;
4062 4306 }, [tabMap, value]);
4063 - const firstEnabledTabValue = React44.useMemo(() => {
4307 + const firstEnabledTabValue = React45.useMemo(() => {
4064 4308 for (const tabMetadata of tabMap.values()) {
4065 4309 if (!tabMetadata.disabled) {
4066 4310 return tabMetadata.value;
4067 4311 }
@@ -4067,12 +4311,12 @@
4067 4311 }
4068 4312 }
4069 4313 return void 0;
4070 4314 }, [tabMap]);
4071 - const shouldNotifyInitialValueChangeRef = React44.useRef(!hasExplicitDefaultValueProp);
4072 - const initialDefaultValueRef = React44.useRef(defaultValueProp);
4073 - const shouldHonorDisabledDefaultValueRef = React44.useRef(hasExplicitDefaultValueProp);
4074 - const didRegisterTabsRef = React44.useRef(false);
4315 + const shouldNotifyInitialValueChangeRef = React45.useRef(!hasExplicitDefaultValueProp);
4316 + const initialDefaultValueRef = React45.useRef(defaultValueProp);
4317 + const shouldHonorDisabledDefaultValueRef = React45.useRef(hasExplicitDefaultValueProp);
4318 + const didRegisterTabsRef = React45.useRef(false);
4075 4319 useIsoLayoutEffect(() => {
4076 4320 if (isControlled) {
4077 4321 return;
4078 4322 }
@@ -4173,16 +4417,16 @@
4173 4417 return "none";
4174 4418 }
4175 4419
4176 4420 // node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
4177 - var React46 = __toESM(require_react(), 1);
4421 + var React47 = __toESM(require_react(), 1);
4178 4422
4179 4423 // node_modules/@base-ui/react/tabs/list/TabsListContext.mjs
4180 - var React45 = __toESM(require_react(), 1);
4181 - var TabsListContext = /* @__PURE__ */ React45.createContext(void 0);
4424 + var React46 = __toESM(require_react(), 1);
4425 + var TabsListContext = /* @__PURE__ */ React46.createContext(void 0);
4182 4426 if (true) TabsListContext.displayName = "TabsListContext";
4183 4427 function useTabsListContext() {
4184 - const context = React45.useContext(TabsListContext);
4428 + const context = React46.useContext(TabsListContext);
4185 4429 if (context === void 0) {
4186 4430 throw new Error(true ? "Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>." : formatErrorMessage_default(65));
4187 4431 }
4188 4432 return context;
@@ -4188,9 +4432,9 @@
4188 4432 return context;
4189 4433 }
4190 4434
4191 4435 // node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
4192 - var TabsTab = /* @__PURE__ */ React46.forwardRef(function TabsTab2(componentProps, forwardedRef) {
4436 + var TabsTab = /* @__PURE__ */ React47.forwardRef(function TabsTab2(componentProps, forwardedRef) {
4193 4437 const {
4194 4438 className,
4195 4439 disabled: disabled2 = false,
4196 4440 render,
@@ -4216,9 +4460,9 @@
4216 4460 highlightedIndex,
4217 4461 onHighlightedIndexChange
4218 4462 } = useCompositeRootContext();
4219 4463 const id = useBaseUiId(idProp);
4220 - const tabMetadata = React46.useMemo(() => ({
4464 + const tabMetadata = React47.useMemo(() => ({
4221 4465 disabled: disabled2,
4222 4466 id,
4223 4467 value
4224 4468 }), [disabled2, id, value]);
@@ -4224,9 +4468,9 @@
4224 4468 }), [disabled2, id, value]);
4225 4469 const {
4226 4470 compositeProps,
4227 4471 compositeRef,
4228 - index
4472 + index: index2
4229 4473 // hook is used instead of the CompositeItem component
4230 4474 // because the index is needed for Tab internals
4231 4475 } = useCompositeItem({
4232 4476 metadata: tabMetadata
@@ -4231,10 +4475,10 @@
4231 4475 } = useCompositeItem({
4232 4476 metadata: tabMetadata
4233 4477 });
4234 4478 const active = value === activeTabValue;
4235 - const isNavigatingRef = React46.useRef(false);
4236 - const unobserveTabElementRef = React46.useRef(null);
4479 + const isNavigatingRef = React47.useRef(false);
4480 + const unobserveTabElementRef = React47.useRef(null);
4237 4481 const observeTabElement = useStableCallback((element2) => {
4238 4482 unobserveTabElementRef.current?.();
4239 4483 unobserveTabElementRef.current = element2 ? registerTabResizeObserverElement(element2) : null;
4240 4484 });
@@ -4242,9 +4486,9 @@
4242 4486 if (isNavigatingRef.current) {
4243 4487 isNavigatingRef.current = false;
4244 4488 return;
4245 4489 }
4246 - if (!(active && index > -1 && highlightedIndex !== index)) {
4490 + if (!(active && index2 > -1 && highlightedIndex !== index2)) {
4247 4491 return;
4248 4492 }
4249 4493 const listElement = tabsListElement;
4250 4494 if (listElement != null) {
@@ -4253,11 +4497,11 @@
4253 4497 return;
4254 4498 }
4255 4499 }
4256 4500 if (!disabled2) {
4257 - onHighlightedIndexChange(index);
4501 + onHighlightedIndexChange(index2);
4258 4502 }
4259 - }, [active, index, highlightedIndex, onHighlightedIndexChange, disabled2, tabsListElement]);
4503 + }, [active, index2, highlightedIndex, onHighlightedIndexChange, disabled2, tabsListElement]);
4260 4504 const {
4261 4505 getButtonProps,
4262 4506 buttonRef
4263 4507 } = useButton({
@@ -4265,10 +4509,10 @@
4265 4509 native: nativeButton,
4266 4510 focusableWhenDisabled: true
4267 4511 });
4268 4512 const tabPanelId = getTabPanelIdByValue(value);
4269 - const isPressingRef = React46.useRef(false);
4270 - const isMainButtonRef = React46.useRef(false);
4513 + const isPressingRef = React47.useRef(false);
4514 + const isMainButtonRef = React47.useRef(false);
4271 4515 function activate(event) {
4272 4516 onValueChange(value, createChangeEventDetails(reason_parts_exports.none, event.nativeEvent, void 0, {
4273 4517 activationDirection: "none"
4274 4518 }));
@@ -4332,9 +4576,19 @@
4332 4576 });
4333 4577 if (true) TabsTab.displayName = "TabsTab";
4334 4578
4335 4579 // node_modules/@base-ui/react/tabs/indicator/TabsIndicator.mjs
4336 - var React47 = __toESM(require_react(), 1);
4580 + var React48 = __toESM(require_react(), 1);
4581 +
4582 + // node_modules/@base-ui/react/tabs/indicator/TabsIndicatorCssVars.mjs
4583 + var activeTabLeft = "--active-tab-left";
4584 + var activeTabRight = "--active-tab-right";
4585 + var activeTabTop = "--active-tab-top";
4586 + var activeTabBottom = "--active-tab-bottom";
4587 + var activeTabWidth = "--active-tab-width";
4588 + var activeTabHeight = "--active-tab-height";
4589 +
4590 + // node_modules/@base-ui/react/tabs/indicator/TabsIndicator.mjs
4337 4591 var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
4338 4592 var _PrehydrationScript;
4339 4593 var stateAttributesMapping2 = {
4340 4594 ...tabsStateAttributesMapping,
@@ -4340,9 +4594,10 @@
4340 4594 ...tabsStateAttributesMapping,
4341 4595 activeTabPosition: () => null,
4342 4596 activeTabSize: () => null
4343 4597 };
4344 - var TabsIndicator = /* @__PURE__ */ React47.forwardRef(function TabsIndicator2(componentProps, forwardedRef) {
4598 + var MAX_LAYOUT_ROUNDING_ERROR = 2;
4599 + var TabsIndicator = /* @__PURE__ */ React48.forwardRef(function TabsIndicator2(componentProps, forwardedRef) {
4345 4600 const {
4346 4601 className,
4347 4602 render,
4348 4603 renderBeforeHydration = false,
@@ -4359,9 +4614,9 @@
4359 4614 tabsListElement,
4360 4615 registerIndicatorUpdateListener
4361 4616 } = useTabsListContext();
4362 4617 const rerender = useForcedRerendering();
4363 - React47.useEffect(() => {
4618 + React48.useEffect(() => {
4364 4619 return registerIndicatorUpdateListener(rerender);
4365 4620 }, [registerIndicatorUpdateListener, rerender]);
4366 4621 let left = 0;
4367 4622 let right = 0;
@@ -4385,17 +4640,17 @@
4385 4640 const tabRect = activeTab.getBoundingClientRect();
4386 4641 const tabsListRect = tabsListElement.getBoundingClientRect();
4387 4642 const scaleX = tabListWidth > 0 ? tabsListRect.width / tabListWidth : 1;
4388 4643 const scaleY = tabListHeight > 0 ? tabsListRect.height / tabListHeight : 1;
4389 - const hasNonZeroScale = scaleX > Number.EPSILON && scaleY > Number.EPSILON;
4390 - if (hasNonZeroScale) {
4391 - const tabLeftDelta = tabRect.left - tabsListRect.left;
4392 - const tabTopDelta = tabRect.top - tabsListRect.top;
4393 - left = tabLeftDelta / scaleX + tabsListElement.scrollLeft - tabsListElement.clientLeft;
4394 - top = tabTopDelta / scaleY + tabsListElement.scrollTop - tabsListElement.clientTop;
4395 - } else {
4396 - left = activeTab.offsetLeft;
4397 - top = activeTab.offsetTop;
4644 + const layoutOffset = getLayoutOffset(activeTab, tabsListElement);
4645 + left = layoutOffset.left;
4646 + top = layoutOffset.top;
4647 + const rectLeft = (tabRect.left - tabsListRect.left) / scaleX + tabsListElement.scrollLeft - tabsListElement.clientLeft;
4648 + const rectTop = (tabRect.top - tabsListRect.top) / scaleY + tabsListElement.scrollTop - tabsListElement.clientTop;
4649 + const tabTranslation = getActiveTabTranslation(activeTab);
4650 + if (Math.abs(rectLeft - tabTranslation.x - left) <= MAX_LAYOUT_ROUNDING_ERROR && Math.abs(rectTop - tabTranslation.y - top) <= MAX_LAYOUT_ROUNDING_ERROR) {
4651 + left = rectLeft;
4652 + top = rectTop;
4398 4653 }
4399 4654 width = computedWidth;
4400 4655 height = computedHeight;
4401 4656 right = tabsListElement.scrollWidth - left - width;
@@ -4412,14 +4667,14 @@
4412 4667 width,
4413 4668 height
4414 4669 } : null;
4415 4670 const style = isTabSelected ? {
4416 - "--active-tab-left": `${left}px`,
4417 - "--active-tab-right": `${right}px`,
4418 - "--active-tab-top": `${top}px`,
4419 - "--active-tab-bottom": `${bottom}px`,
4420 - "--active-tab-width": `${width}px`,
4421 - "--active-tab-height": `${height}px`
4671 + [activeTabLeft]: `${left}px`,
4672 + [activeTabRight]: `${right}px`,
4673 + [activeTabTop]: `${top}px`,
4674 + [activeTabBottom]: `${bottom}px`,
4675 + [activeTabWidth]: `${width}px`,
4676 + [activeTabHeight]: `${height}px`
4422 4677 } : void 0;
4423 4678 const displayIndicator = isTabSelected && width > 0 && height > 0;
4424 4679 const state = {
4425 4680 orientation,
@@ -4442,9 +4697,9 @@
4442 4697 });
4443 4698 if (value == null) {
4444 4699 return null;
4445 4700 }
4446 - return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(React47.Fragment, {
4701 + return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(React48.Fragment, {
4447 4702 children: [element, renderBeforeHydration && (_PrehydrationScript || (_PrehydrationScript = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PrehydrationScript, {
4448 4703 script
4449 4704 })))]
4450 4705 });
@@ -4449,16 +4704,89 @@
4449 4704 })))]
4450 4705 });
4451 4706 });
4452 4707 if (true) TabsIndicator.displayName = "TabsIndicator";
4708 + function getLayoutOffset(element, ancestor) {
4709 + const elementOffset = getCumulativeOffset(element);
4710 + const ancestorOffset = getCumulativeOffset(ancestor);
4711 + let left = elementOffset.left - ancestorOffset.left - ancestor.clientLeft;
4712 + let top = elementOffset.top - ancestorOffset.top - ancestor.clientTop;
4713 + let node = getParentNode(element);
4714 + while (isHTMLElement(node) && node !== ancestor && !isLastTraversableNode(node)) {
4715 + left -= node.scrollLeft;
4716 + top -= node.scrollTop;
4717 + node = getParentNode(node);
4718 + }
4719 + return {
4720 + left,
4721 + top
4722 + };
4723 + }
4724 + function getCumulativeOffset(element) {
4725 + let left = 0;
4726 + let top = 0;
4727 + let currentElement = element;
4728 + while (currentElement != null) {
4729 + left += currentElement.offsetLeft;
4730 + top += currentElement.offsetTop;
4731 + const offsetParent = currentElement.offsetParent;
4732 + if (offsetParent != null) {
4733 + left += offsetParent.clientLeft;
4734 + top += offsetParent.clientTop;
4735 + }
4736 + currentElement = offsetParent;
4737 + }
4738 + return {
4739 + left,
4740 + top
4741 + };
4742 + }
4743 + function getActiveTabTranslation(element) {
4744 + const computedStyle = getWindow(element).getComputedStyle(element);
4745 + const {
4746 + x,
4747 + y
4748 + } = getElementTransform(element, computedStyle);
4749 + let translateX = x;
4750 + let translateY = y;
4751 + const {
4752 + translate
4753 + } = computedStyle;
4754 + if (translate && translate !== "none") {
4755 + const parts = translate.split(" ");
4756 + translateX += resolveTranslateLength(parts[0], element.offsetWidth);
4757 + translateY += resolveTranslateLength(parts[1], element.offsetHeight);
4758 + }
4759 + return {
4760 + x: translateX,
4761 + y: translateY
4762 + };
4763 + }
4764 + function resolveTranslateLength(value, referenceSize) {
4765 + if (!value) {
4766 + return 0;
4767 + }
4768 + const numeric = parseFloat(value);
4769 + if (!Number.isFinite(numeric)) {
4770 + return 0;
4771 + }
4772 + return value.endsWith("%") ? numeric / 100 * referenceSize : numeric;
4773 + }
4453 4774
4454 4775 // node_modules/@base-ui/react/tabs/panel/TabsPanel.mjs
4455 - var React48 = __toESM(require_react(), 1);
4776 + var React49 = __toESM(require_react(), 1);
4777 +
4778 + // node_modules/@base-ui/react/tabs/panel/TabsPanelDataAttributes.mjs
4779 + var index = "data-index";
4780 + var startingStyle2 = TransitionStatusDataAttributes_exports.startingStyle;
4781 + var endingStyle2 = TransitionStatusDataAttributes_exports.endingStyle;
4782 +
4783 + // node_modules/@base-ui/react/tabs/panel/TabsPanel.mjs
4456 4784 var stateAttributesMapping3 = {
4457 4785 ...tabsStateAttributesMapping,
4458 4786 ...transitionStatusMapping
4459 4787 };
4460 - var TabsPanel = /* @__PURE__ */ React48.forwardRef(function TabsPanel2(componentProps, forwardedRef) {
4788 + var TabsPanel = /* @__PURE__ */ React49.forwardRef(function TabsPanel2(componentProps, forwardedRef) {
4461 4789 const {
4462 4790 className,
4463 4791 value,
4464 4792 render,
@@ -4475,9 +4803,9 @@
4475 4803 } = useTabsRootContext();
4476 4804 const id = useBaseUiId();
4477 4805 const {
4478 4806 ref: listItemRef,
4479 - index
4807 + index: index2
4480 4808 } = useCompositeListItem();
4481 4809 const open = value === selectedValue;
4482 4810 const {
4483 4811 mounted,
@@ -4491,9 +4819,9 @@
4491 4819 orientation,
4492 4820 tabActivationDirection,
4493 4821 transitionStatus
4494 4822 };
4495 - const panelRef = React48.useRef(null);
4823 + const panelRef = React49.useRef(null);
4496 4824 const element = useRenderElement("div", componentProps, {
4497 4825 state,
4498 4826 ref: [forwardedRef, listItemRef, panelRef],
4499 4827 props: [{
@@ -4503,9 +4831,9 @@
4503 4831 role: "tabpanel",
4504 4832 tabIndex: open ? 0 : -1,
4505 4833 inert: inertValue(!open),
4506 4834 // Computed key: a plain literal key fails the DOM-props excess property check.
4507 - ["data-index"]: index
4835 + [index]: index2
4508 4836 }, elementProps],
4509 4837 stateAttributesMapping: stateAttributesMapping3
4510 4838 });
4511 4839 useOpenChangeComplete({
@@ -4531,11 +4859,11 @@
4531 4859 });
4532 4860 if (true) TabsPanel.displayName = "TabsPanel";
4533 4861
4534 4862 // node_modules/@base-ui/react/tabs/list/TabsList.mjs
4535 - var React49 = __toESM(require_react(), 1);
4863 + var React50 = __toESM(require_react(), 1);
4536 4864 var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
4537 - var TabsList = /* @__PURE__ */ React49.forwardRef(function TabsList2(componentProps, forwardedRef) {
4865 + var TabsList = /* @__PURE__ */ React50.forwardRef(function TabsList2(componentProps, forwardedRef) {
4538 4866 const {
4539 4867 activateOnFocus = false,
4540 4868 className,
4541 4869 loopFocus = true,
@@ -4547,13 +4875,13 @@
4547 4875 orientation,
4548 4876 setTabMap,
4549 4877 tabActivationDirection
4550 4878 } = useTabsRootContext();
4551 - const [highlightedTabIndex, setHighlightedTabIndex] = React49.useState(0);
4552 - const [tabsListElement, setTabsListElement] = React49.useState(null);
4553 - const indicatorUpdateListenersRef = React49.useRef(/* @__PURE__ */ new Set());
4554 - const tabResizeObserverElementsRef = React49.useRef(/* @__PURE__ */ new Set());
4555 - const resizeObserverRef = React49.useRef(null);
4879 + const [highlightedTabIndex, setHighlightedTabIndex] = React50.useState(0);
4880 + const [tabsListElement, setTabsListElement] = React50.useState(null);
4881 + const indicatorUpdateListenersRef = React50.useRef(/* @__PURE__ */ new Set());
4882 + const tabResizeObserverElementsRef = React50.useRef(/* @__PURE__ */ new Set());
4883 + const resizeObserverRef = React50.useRef(null);
4556 4884 useIsoLayoutEffect(() => {
4557 4885 if (typeof ResizeObserver === "undefined") {
4558 4886 return void 0;
4559 4887 }
@@ -4595,9 +4923,9 @@
4595 4923 const defaultProps = {
4596 4924 "aria-orientation": orientation === "vertical" ? "vertical" : void 0,
4597 4925 role: "tablist"
4598 4926 };
4599 - const tabsListContextValue = React49.useMemo(() => ({
4927 + const tabsListContextValue = React50.useMemo(() => ({
4600 4928 activateOnFocus,
4601 4929 registerIndicatorUpdateListener,
4602 4930 registerTabResizeObserverElement,
4603 4931 tabsListElement
@@ -4628,34 +4956,19 @@
4628 4956 function useRender(params) {
4629 4957 return useRenderElement(params.defaultTagName ?? "div", params, params);
4630 4958 }
4631 4959
4632 - // packages/ui/build-module/icon/icon.mjs
4633 - var import_element2 = __toESM(require_element(), 1);
4634 - var import_primitives18 = __toESM(require_primitives(), 1);
4635 - var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
4636 - var Icon = (0, import_element2.forwardRef)(function Icon2({ icon, size = 24, ...restProps }, ref) {
4637 - return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4638 - import_primitives18.SVG,
4639 - {
4640 - ref,
4641 - ...icon.props,
4642 - ...restProps,
4643 - width: size,
4644 - height: size
4645 - }
4646 - );
4647 - });
4648 -
4649 4960 // packages/ui/build-module/utils/direction-provider.mjs
4650 4961 var import_i18n3 = __toESM(require_i18n(), 1);
4651 - var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
4962 + var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
4652 4963 function DirectionProvider3({ children }) {
4653 - return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DirectionProvider, { direction: (0, import_i18n3.isRTL)() ? "rtl" : "ltr", children });
4964 + return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DirectionProvider, { direction: (0, import_i18n3.isRTL)() ? "rtl" : "ltr", children });
4654 4965 }
4655 4966
4656 - // packages/ui/build-module/visually-hidden/visually-hidden.mjs
4657 - var import_element3 = __toESM(require_element(), 1);
4967 + // packages/ui/build-module/link/link.mjs
4968 + var import_element2 = __toESM(require_element(), 1);
4969 + var import_i18n4 = __toESM(require_i18n(), 1);
4970 + var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
4658 4971 var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
4659 4972 function getRuntime() {
4660 4973 const globalScope = globalThis;
4661 4974 if (globalScope.__wpStyleRuntime) {
@@ -4735,30 +5048,88 @@
4735 5048 injectStyle(targetDocument, hash, css);
4736 5049 }
4737 5050 }
4738 5051 if (typeof process === "undefined" || true) {
4739 - registerStyle("fa606a57ae", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}}");
5052 + registerStyle("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
4740 5053 }
4741 - var style_default = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
4742 - var VisuallyHidden = (0, import_element3.forwardRef)(
4743 - function VisuallyHidden2({ render, ...restProps }, ref) {
4744 - const element = useRender({
4745 - render,
5054 + var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
5055 + if (typeof process === "undefined" || true) {
5056 + registerStyle("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
5057 + }
5058 + var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
5059 + if (typeof process === "undefined" || true) {
5060 + registerStyle("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
5061 + }
5062 + var style_default = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
5063 + if (typeof process === "undefined" || true) {
5064 + registerStyle("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
5065 + }
5066 + 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", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
5067 + var Link = (0, import_element2.forwardRef)(function Link2({
5068 + children,
5069 + variant = "default",
5070 + tone = "brand",
5071 + openInNewTab = false,
5072 + target,
5073 + render,
5074 + className,
5075 + ...props
5076 + }, ref) {
5077 + const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
5078 + const element = useRender({
5079 + render,
5080 + defaultTagName: "a",
5081 + ref,
5082 + props: mergeProps(props, {
5083 + className: clsx_default(
5084 + global_css_defense_default.a,
5085 + resets_default["box-sizing"],
5086 + focus_module_default["outset-ring--focus-except-active"],
5087 + variant !== "unstyled" && style_default.link,
5088 + variant !== "unstyled" && style_default[`is-${tone}`],
5089 + variant === "unstyled" && style_default["is-unstyled"],
5090 + className
5091 + ),
5092 + target: target ?? (openInNewTab ? "_blank" : void 0),
5093 + children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
5094 + children,
5095 + shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5096 + "span",
5097 + {
5098 + className: style_default["link-icon"],
5099 + role: "img",
5100 + "aria-label": (
5101 + /* translators: accessibility text appended to link text */
5102 + (0, import_i18n4.__)("(opens in a new tab)")
5103 + )
5104 + }
5105 + )
5106 + ] })
5107 + })
5108 + });
5109 + return element;
5110 + });
5111 +
5112 + // packages/ui/build-module/icon/icon.mjs
5113 + var import_element3 = __toESM(require_element(), 1);
5114 + var import_primitives18 = __toESM(require_primitives(), 1);
5115 + var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
5116 + var Icon = (0, import_element3.forwardRef)(function Icon2({ icon, size = 24, style, ...restProps }, ref) {
5117 + const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0;
5118 + return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5119 + import_primitives18.SVG,
5120 + {
4746 5121 ref,
4747 - props: mergeProps(
4748 - { className: style_default["visually-hidden"] },
4749 - restProps,
4750 - {
4751 - // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
4752 - "data-visually-hidden": ""
4753 - }
4754 - )
4755 - });
4756 - return element;
4757 - }
4758 - );
5122 + ...icon.props,
5123 + ...restProps,
5124 + ...mergedStyle ? { style: mergedStyle } : {},
5125 + width: size,
5126 + height: size
5127 + }
5128 + );
5129 + });
4759 5130
4760 - // packages/ui/build-module/stack/stack.mjs
5131 + // packages/ui/build-module/visually-hidden/visually-hidden.mjs
4761 5132 var import_element4 = __toESM(require_element(), 1);
4762 5133 var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
4763 5134 function getRuntime2() {
4764 5135 const globalScope = globalThis;
@@ -4839,11 +5210,115 @@
4839 5210 injectStyle2(targetDocument, hash, css);
4840 5211 }
4841 5212 }
4842 5213 if (typeof process === "undefined" || true) {
4843 - registerStyle2("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
5214 + registerStyle2("f4df7461e9", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px;word-break:normal}}}");
4844 5215 }
4845 - var style_default2 = { "stack": "_19ce0419607e1896__stack" };
5216 + var style_default2 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
5217 + var VisuallyHidden = (0, import_element4.forwardRef)(
5218 + function VisuallyHidden2({ render, ...restProps }, ref) {
5219 + const element = useRender({
5220 + render,
5221 + ref,
5222 + props: mergeProps(
5223 + { className: style_default2["visually-hidden"] },
5224 + restProps,
5225 + {
5226 + // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
5227 + "data-visually-hidden": ""
5228 + }
5229 + )
5230 + });
5231 + return element;
5232 + }
5233 + );
5234 +
5235 + // packages/ui/build-module/stack/stack.mjs
5236 + var import_element5 = __toESM(require_element(), 1);
5237 + var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
5238 + function getRuntime3() {
5239 + const globalScope = globalThis;
5240 + if (globalScope.__wpStyleRuntime) {
5241 + return globalScope.__wpStyleRuntime;
5242 + }
5243 + globalScope.__wpStyleRuntime = {
5244 + documents: /* @__PURE__ */ new Map(),
5245 + styles: /* @__PURE__ */ new Map(),
5246 + injectedStyles: /* @__PURE__ */ new WeakMap()
5247 + };
5248 + if (typeof document !== "undefined") {
5249 + registerDocument3(document);
5250 + }
5251 + return globalScope.__wpStyleRuntime;
5252 + }
5253 + function documentContainsStyleHash3(targetDocument, hash) {
5254 + if (!targetDocument.head) {
5255 + return false;
5256 + }
5257 + for (const style of targetDocument.head.querySelectorAll(
5258 + `style[${STYLE_HASH_ATTRIBUTE3}]`
5259 + )) {
5260 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
5261 + return true;
5262 + }
5263 + }
5264 + return false;
5265 + }
5266 + function injectStyle3(targetDocument, hash, css) {
5267 + if (!targetDocument.head) {
5268 + return;
5269 + }
5270 + const runtime = getRuntime3();
5271 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
5272 + if (!injectedStyles) {
5273 + injectedStyles = /* @__PURE__ */ new Set();
5274 + runtime.injectedStyles.set(targetDocument, injectedStyles);
5275 + }
5276 + if (injectedStyles.has(hash)) {
5277 + return;
5278 + }
5279 + if (documentContainsStyleHash3(targetDocument, hash)) {
5280 + injectedStyles.add(hash);
5281 + return;
5282 + }
5283 + const style = targetDocument.createElement("style");
5284 + style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
5285 + style.appendChild(targetDocument.createTextNode(css));
5286 + targetDocument.head.appendChild(style);
5287 + injectedStyles.add(hash);
5288 + }
5289 + function registerDocument3(targetDocument) {
5290 + const runtime = getRuntime3();
5291 + runtime.documents.set(
5292 + targetDocument,
5293 + (runtime.documents.get(targetDocument) ?? 0) + 1
5294 + );
5295 + for (const [hash, css] of runtime.styles) {
5296 + injectStyle3(targetDocument, hash, css);
5297 + }
5298 + return () => {
5299 + const count = runtime.documents.get(targetDocument);
5300 + if (count === void 0) {
5301 + return;
5302 + }
5303 + if (count <= 1) {
5304 + runtime.documents.delete(targetDocument);
5305 + return;
5306 + }
5307 + runtime.documents.set(targetDocument, count - 1);
5308 + };
5309 + }
5310 + function registerStyle3(hash, css) {
5311 + const runtime = getRuntime3();
5312 + runtime.styles.set(hash, css);
5313 + for (const targetDocument of runtime.documents.keys()) {
5314 + injectStyle3(targetDocument, hash, css);
5315 + }
5316 + }
5317 + if (typeof process === "undefined" || true) {
5318 + registerStyle3("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
5319 + }
5320 + var style_default3 = { "stack": "_19ce0419607e1896__stack" };
4846 5321 var gapTokens = {
4847 5322 xs: "var(--wpds-dimension-gap-xs, 4px)",
4848 5323 sm: "var(--wpds-dimension-gap-sm, 8px)",
4849 5324 md: "var(--wpds-dimension-gap-md, 12px)",
@@ -4851,9 +5326,9 @@
4851 5326 xl: "var(--wpds-dimension-gap-xl, 24px)",
4852 5327 "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
4853 5328 "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
4854 5329 };
4855 - var Stack = (0, import_element4.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
5330 + var Stack = (0, import_element5.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
4856 5331 const style = {
4857 5332 gap: gap && gapTokens[gap],
4858 5333 alignItems: align,
4859 5334 justifyContent: justify,
@@ -4862,21 +5337,21 @@
4862 5337 };
4863 5338 const element = useRender({
4864 5339 render,
4865 5340 ref,
4866 - props: mergeProps(props, { style, className: style_default2.stack })
5341 + props: mergeProps(props, { style, className: style_default3.stack })
4867 5342 });
4868 5343 return element;
4869 5344 });
4870 5345
4871 5346 // packages/ui/build-module/utils/use-schedule-validation.mjs
4872 - var import_element5 = __toESM(require_element(), 1);
5347 + var import_compose = __toESM(require_compose(), 1);
5348 + var import_element6 = __toESM(require_element(), 1);
4873 5349 function useScheduleValidation(validate) {
4874 - const validateRef = (0, import_element5.useRef)(validate);
4875 - validateRef.current = validate;
4876 - const timerRef = (0, import_element5.useRef)(null);
4877 - const unmountedRef = (0, import_element5.useRef)(false);
4878 - const scheduleValidation = (0, import_element5.useCallback)(() => {
5350 + const validateEvent = (0, import_compose.useEvent)(validate);
5351 + const timerRef = (0, import_element6.useRef)(null);
5352 + const unmountedRef = (0, import_element6.useRef)(false);
5353 + const scheduleValidation = (0, import_element6.useCallback)(() => {
4879 5354 if (unmountedRef.current) {
4880 5355 return;
4881 5356 }
4882 5357 if (timerRef.current) {
@@ -4882,13 +5357,13 @@
4882 5357 if (timerRef.current) {
4883 5358 clearTimeout(timerRef.current);
4884 5359 }
4885 5360 timerRef.current = setTimeout(() => {
4886 - validateRef.current();
5361 + validateEvent();
4887 5362 timerRef.current = null;
4888 5363 }, 0);
4889 - }, []);
4890 - (0, import_element5.useEffect)(() => {
5364 + }, [validateEvent]);
5365 + (0, import_element6.useEffect)(() => {
4891 5366 unmountedRef.current = false;
4892 5367 return () => {
4893 5368 unmountedRef.current = true;
4894 5369 if (timerRef.current) {
@@ -4899,15 +5374,15 @@
4899 5374 return scheduleValidation;
4900 5375 }
4901 5376
4902 5377 // packages/ui/build-module/form/primitives/input/input.mjs
4903 - var import_element8 = __toESM(require_element(), 1);
5378 + var import_element9 = __toESM(require_element(), 1);
4904 5379
4905 5380 // packages/ui/build-module/form/primitives/input-layout/input-layout.mjs
4906 - var import_element6 = __toESM(require_element(), 1);
4907 - var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
4908 - var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
4909 - function getRuntime3() {
5381 + var import_element7 = __toESM(require_element(), 1);
5382 + var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
5383 + var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
5384 + function getRuntime4() {
4910 5385 const globalScope = globalThis;
4911 5386 if (globalScope.__wpStyleRuntime) {
4912 5387 return globalScope.__wpStyleRuntime;
4913 5388 }
@@ -4916,30 +5391,30 @@
4916 5391 styles: /* @__PURE__ */ new Map(),
4917 5392 injectedStyles: /* @__PURE__ */ new WeakMap()
4918 5393 };
4919 5394 if (typeof document !== "undefined") {
4920 - registerDocument3(document);
5395 + registerDocument4(document);
4921 5396 }
4922 5397 return globalScope.__wpStyleRuntime;
4923 5398 }
4924 - function documentContainsStyleHash3(targetDocument, hash) {
5399 + function documentContainsStyleHash4(targetDocument, hash) {
4925 5400 if (!targetDocument.head) {
4926 5401 return false;
4927 5402 }
4928 5403 for (const style of targetDocument.head.querySelectorAll(
4929 - `style[${STYLE_HASH_ATTRIBUTE3}]`
5404 + `style[${STYLE_HASH_ATTRIBUTE4}]`
4930 5405 )) {
4931 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
5406 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
4932 5407 return true;
4933 5408 }
4934 5409 }
4935 5410 return false;
4936 5411 }
4937 - function injectStyle3(targetDocument, hash, css) {
5412 + function injectStyle4(targetDocument, hash, css) {
4938 5413 if (!targetDocument.head) {
4939 5414 return;
4940 5415 }
4941 - const runtime = getRuntime3();
5416 + const runtime = getRuntime4();
4942 5417 let injectedStyles = runtime.injectedStyles.get(targetDocument);
4943 5418 if (!injectedStyles) {
4944 5419 injectedStyles = /* @__PURE__ */ new Set();
4945 5420 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -4946,26 +5421,26 @@
4946 5421 }
4947 5422 if (injectedStyles.has(hash)) {
4948 5423 return;
4949 5424 }
4950 - if (documentContainsStyleHash3(targetDocument, hash)) {
5425 + if (documentContainsStyleHash4(targetDocument, hash)) {
4951 5426 injectedStyles.add(hash);
4952 5427 return;
4953 5428 }
4954 5429 const style = targetDocument.createElement("style");
4955 - style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
5430 + style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
4956 5431 style.appendChild(targetDocument.createTextNode(css));
4957 5432 targetDocument.head.appendChild(style);
4958 5433 injectedStyles.add(hash);
4959 5434 }
4960 - function registerDocument3(targetDocument) {
4961 - const runtime = getRuntime3();
5435 + function registerDocument4(targetDocument) {
5436 + const runtime = getRuntime4();
4962 5437 runtime.documents.set(
4963 5438 targetDocument,
4964 5439 (runtime.documents.get(targetDocument) ?? 0) + 1
4965 5440 );
4966 5441 for (const [hash, css] of runtime.styles) {
4967 - injectStyle3(targetDocument, hash, css);
5442 + injectStyle4(targetDocument, hash, css);
4968 5443 }
4969 5444 return () => {
4970 5445 const count = runtime.documents.get(targetDocument);
4971 5446 if (count === void 0) {
@@ -4977,28 +5452,28 @@
4977 5452 }
4978 5453 runtime.documents.set(targetDocument, count - 1);
4979 5454 };
4980 5455 }
4981 - function registerStyle3(hash, css) {
4982 - const runtime = getRuntime3();
5456 + function registerStyle4(hash, css) {
5457 + const runtime = getRuntime4();
4983 5458 runtime.styles.set(hash, css);
4984 5459 for (const targetDocument of runtime.documents.keys()) {
4985 - injectStyle3(targetDocument, hash, css);
5460 + injectStyle4(targetDocument, hash, css);
4986 5461 }
4987 5462 }
4988 5463 if (typeof process === "undefined" || true) {
4989 - registerStyle3("af6d9984a6", "._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");
5464 + registerStyle4("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
4990 5465 }
4991 - 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" };
5466 + var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
4992 5467 if (typeof process === "undefined" || true) {
4993 - registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
5468 + registerStyle4("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
4994 5469 }
4995 - var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
5470 + var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
4996 5471 if (typeof process === "undefined" || true) {
4997 - registerStyle3("4767ce195b", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&._8097270636ca6100__is-borderless{border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');
5472 + registerStyle4("e4f4f9600b", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}&:not(._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-disabled,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText}}}&._8097270636ca6100__is-borderless{background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){--_gcd-div-outline:none;outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-active,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');
4998 5473 }
4999 - var style_default3 = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
5000 - var InputLayout = (0, import_element6.forwardRef)(
5474 + var style_default4 = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
5475 + var InputLayout = (0, import_element7.forwardRef)(
5001 5476 function InputLayout2({
5002 5477 className,
5003 5478 children,
5004 5479 visuallyDisabled,
@@ -5007,36 +5482,36 @@
5007 5482 prefix,
5008 5483 suffix,
5009 5484 ...restProps
5010 5485 }, ref) {
5011 - return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
5486 + return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
5012 5487 "div",
5013 5488 {
5014 5489 ref,
5015 5490 className: clsx_default(
5016 - global_css_defense_default.div,
5017 - resets_default["box-sizing"],
5018 - style_default3["input-layout"],
5019 - style_default3[`is-size-${size}`],
5020 - visuallyDisabled && style_default3["is-disabled"],
5021 - isBorderless && style_default3["is-borderless"],
5491 + global_css_defense_default2.div,
5492 + resets_default2["box-sizing"],
5493 + style_default4["input-layout"],
5494 + style_default4[`is-size-${size}`],
5495 + visuallyDisabled && style_default4["is-disabled"],
5496 + isBorderless && style_default4["is-borderless"],
5022 5497 className
5023 5498 ),
5024 5499 ...restProps,
5025 5500 children: [
5026 - import_element6.Children.count(prefix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5501 + import_element7.Children.count(prefix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5027 5502 "div",
5028 5503 {
5029 - className: style_default3["slot-wrapper"],
5504 + className: style_default4["slot-wrapper"],
5030 5505 "data-slot-type": "prefix",
5031 5506 children: prefix
5032 5507 }
5033 5508 ),
5034 5509 children,
5035 - import_element6.Children.count(suffix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5510 + import_element7.Children.count(suffix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5036 5511 "div",
5037 5512 {
5038 - className: style_default3["slot-wrapper"],
5513 + className: style_default4["slot-wrapper"],
5039 5514 "data-slot-type": "suffix",
5040 5515 children: suffix
5041 5516 }
5042 5517 )
@@ -5046,12 +5521,12 @@
5046 5521 }
5047 5522 );
5048 5523
5049 5524 // packages/ui/build-module/form/primitives/input-layout/slot.mjs
5050 - var import_element7 = __toESM(require_element(), 1);
5051 - var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
5052 - var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
5053 - function getRuntime4() {
5525 + var import_element8 = __toESM(require_element(), 1);
5526 + var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
5527 + var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
5528 + function getRuntime5() {
5054 5529 const globalScope = globalThis;
5055 5530 if (globalScope.__wpStyleRuntime) {
5056 5531 return globalScope.__wpStyleRuntime;
5057 5532 }
@@ -5060,30 +5535,30 @@
5060 5535 styles: /* @__PURE__ */ new Map(),
5061 5536 injectedStyles: /* @__PURE__ */ new WeakMap()
5062 5537 };
5063 5538 if (typeof document !== "undefined") {
5064 - registerDocument4(document);
5539 + registerDocument5(document);
5065 5540 }
5066 5541 return globalScope.__wpStyleRuntime;
5067 5542 }
5068 - function documentContainsStyleHash4(targetDocument, hash) {
5543 + function documentContainsStyleHash5(targetDocument, hash) {
5069 5544 if (!targetDocument.head) {
5070 5545 return false;
5071 5546 }
5072 5547 for (const style of targetDocument.head.querySelectorAll(
5073 - `style[${STYLE_HASH_ATTRIBUTE4}]`
5548 + `style[${STYLE_HASH_ATTRIBUTE5}]`
5074 5549 )) {
5075 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
5550 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
5076 5551 return true;
5077 5552 }
5078 5553 }
5079 5554 return false;
5080 5555 }
5081 - function injectStyle4(targetDocument, hash, css) {
5556 + function injectStyle5(targetDocument, hash, css) {
5082 5557 if (!targetDocument.head) {
5083 5558 return;
5084 5559 }
5085 - const runtime = getRuntime4();
5560 + const runtime = getRuntime5();
5086 5561 let injectedStyles = runtime.injectedStyles.get(targetDocument);
5087 5562 if (!injectedStyles) {
5088 5563 injectedStyles = /* @__PURE__ */ new Set();
5089 5564 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -5090,26 +5565,26 @@
5090 5565 }
5091 5566 if (injectedStyles.has(hash)) {
5092 5567 return;
5093 5568 }
5094 - if (documentContainsStyleHash4(targetDocument, hash)) {
5569 + if (documentContainsStyleHash5(targetDocument, hash)) {
5095 5570 injectedStyles.add(hash);
5096 5571 return;
5097 5572 }
5098 5573 const style = targetDocument.createElement("style");
5099 - style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
5574 + style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
5100 5575 style.appendChild(targetDocument.createTextNode(css));
5101 5576 targetDocument.head.appendChild(style);
5102 5577 injectedStyles.add(hash);
5103 5578 }
5104 - function registerDocument4(targetDocument) {
5105 - const runtime = getRuntime4();
5579 + function registerDocument5(targetDocument) {
5580 + const runtime = getRuntime5();
5106 5581 runtime.documents.set(
5107 5582 targetDocument,
5108 5583 (runtime.documents.get(targetDocument) ?? 0) + 1
5109 5584 );
5110 5585 for (const [hash, css] of runtime.styles) {
5111 - injectStyle4(targetDocument, hash, css);
5586 + injectStyle5(targetDocument, hash, css);
5112 5587 }
5113 5588 return () => {
5114 5589 const count = runtime.documents.get(targetDocument);
5115 5590 if (count === void 0) {
@@ -5121,27 +5596,27 @@
5121 5596 }
5122 5597 runtime.documents.set(targetDocument, count - 1);
5123 5598 };
5124 5599 }
5125 - function registerStyle4(hash, css) {
5126 - const runtime = getRuntime4();
5600 + function registerStyle5(hash, css) {
5601 + const runtime = getRuntime5();
5127 5602 runtime.styles.set(hash, css);
5128 5603 for (const targetDocument of runtime.documents.keys()) {
5129 - injectStyle4(targetDocument, hash, css);
5604 + injectStyle5(targetDocument, hash, css);
5130 5605 }
5131 5606 }
5132 5607 if (typeof process === "undefined" || true) {
5133 - registerStyle4("4767ce195b", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&._8097270636ca6100__is-borderless{border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');
5608 + registerStyle5("e4f4f9600b", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}&:not(._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-disabled,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText}}}&._8097270636ca6100__is-borderless{background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){--_gcd-div-outline:none;outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-active,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');
5134 5609 }
5135 - var style_default4 = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
5136 - var InputLayoutSlot = (0, import_element7.forwardRef)(function InputLayoutSlot2({ padding = "default", className, ...restProps }, ref) {
5137 - return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5610 + var style_default5 = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
5611 + var InputLayoutSlot = (0, import_element8.forwardRef)(function InputLayoutSlot2({ padding = "default", className, ...restProps }, ref) {
5612 + return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5138 5613 "div",
5139 5614 {
5140 5615 ref,
5141 5616 className: clsx_default(
5142 - style_default4["input-layout-slot"],
5143 - style_default4[`is-padding-${padding}`],
5617 + style_default5["input-layout-slot"],
5618 + style_default5[`is-padding-${padding}`],
5144 5619 className
5145 5620 ),
5146 5621 ...restProps
5147 5622 }
@@ -5154,11 +5629,11 @@
5154 5629 Slot: InputLayoutSlot
5155 5630 });
5156 5631
5157 5632 // packages/ui/build-module/form/primitives/input/input.mjs
5158 - var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
5159 - var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
5160 - function getRuntime5() {
5633 + var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
5634 + var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
5635 + function getRuntime6() {
5161 5636 const globalScope = globalThis;
5162 5637 if (globalScope.__wpStyleRuntime) {
5163 5638 return globalScope.__wpStyleRuntime;
5164 5639 }
@@ -5167,30 +5642,30 @@
5167 5642 styles: /* @__PURE__ */ new Map(),
5168 5643 injectedStyles: /* @__PURE__ */ new WeakMap()
5169 5644 };
5170 5645 if (typeof document !== "undefined") {
5171 - registerDocument5(document);
5646 + registerDocument6(document);
5172 5647 }
5173 5648 return globalScope.__wpStyleRuntime;
5174 5649 }
5175 - function documentContainsStyleHash5(targetDocument, hash) {
5650 + function documentContainsStyleHash6(targetDocument, hash) {
5176 5651 if (!targetDocument.head) {
5177 5652 return false;
5178 5653 }
5179 5654 for (const style of targetDocument.head.querySelectorAll(
5180 - `style[${STYLE_HASH_ATTRIBUTE5}]`
5655 + `style[${STYLE_HASH_ATTRIBUTE6}]`
5181 5656 )) {
5182 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
5657 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
5183 5658 return true;
5184 5659 }
5185 5660 }
5186 5661 return false;
5187 5662 }
5188 - function injectStyle5(targetDocument, hash, css) {
5663 + function injectStyle6(targetDocument, hash, css) {
5189 5664 if (!targetDocument.head) {
5190 5665 return;
5191 5666 }
5192 - const runtime = getRuntime5();
5667 + const runtime = getRuntime6();
5193 5668 let injectedStyles = runtime.injectedStyles.get(targetDocument);
5194 5669 if (!injectedStyles) {
5195 5670 injectedStyles = /* @__PURE__ */ new Set();
5196 5671 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -5197,26 +5672,26 @@
5197 5672 }
5198 5673 if (injectedStyles.has(hash)) {
5199 5674 return;
5200 5675 }
5201 - if (documentContainsStyleHash5(targetDocument, hash)) {
5676 + if (documentContainsStyleHash6(targetDocument, hash)) {
5202 5677 injectedStyles.add(hash);
5203 5678 return;
5204 5679 }
5205 5680 const style = targetDocument.createElement("style");
5206 - style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
5681 + style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
5207 5682 style.appendChild(targetDocument.createTextNode(css));
5208 5683 targetDocument.head.appendChild(style);
5209 5684 injectedStyles.add(hash);
5210 5685 }
5211 - function registerDocument5(targetDocument) {
5212 - const runtime = getRuntime5();
5686 + function registerDocument6(targetDocument) {
5687 + const runtime = getRuntime6();
5213 5688 runtime.documents.set(
5214 5689 targetDocument,
5215 5690 (runtime.documents.get(targetDocument) ?? 0) + 1
5216 5691 );
5217 5692 for (const [hash, css] of runtime.styles) {
5218 - injectStyle5(targetDocument, hash, css);
5693 + injectStyle6(targetDocument, hash, css);
5219 5694 }
5220 5695 return () => {
5221 5696 const count = runtime.documents.get(targetDocument);
5222 5697 if (count === void 0) {
@@ -5228,33 +5703,33 @@
5228 5703 }
5229 5704 runtime.documents.set(targetDocument, count - 1);
5230 5705 };
5231 5706 }
5232 - function registerStyle5(hash, css) {
5233 - const runtime = getRuntime5();
5707 + function registerStyle6(hash, css) {
5708 + const runtime = getRuntime6();
5234 5709 runtime.styles.set(hash, css);
5235 5710 for (const targetDocument of runtime.documents.keys()) {
5236 - injectStyle5(targetDocument, hash, css);
5711 + injectStyle6(targetDocument, hash, css);
5237 5712 }
5238 5713 }
5239 5714 if (typeof process === "undefined" || true) {
5240 - registerStyle5("af6d9984a6", "._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");
5715 + registerStyle6("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
5241 5716 }
5242 - var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
5717 + var global_css_defense_default3 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
5243 5718 if (typeof process === "undefined" || true) {
5244 - registerStyle5("96553466c8", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._64de9947bf305b7a__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
5719 + registerStyle6("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
5245 5720 }
5246 - var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-within-visible": "_64de9947bf305b7a__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
5721 + var focus_module_default2 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
5247 5722 if (typeof process === "undefined" || true) {
5248 - registerStyle5("41fce05ee0", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._2ae7be2fc1bb17a3__input{--_gcd-input-padding:var(--wp-ui-input-padding-block,0px) var(--wp-ui-input-layout-padding-inline,0px);background:transparent;border:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);font-family:inherit;font-size:inherit;line-height:inherit;outline:none;padding-block:var(--wp-ui-input-padding-block,0);padding-inline:var(--wp-ui-input-layout-padding-inline,0);width:100%;&::placeholder{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&:disabled,&[aria-disabled=true]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}}&[type=email],&[type=url]{direction:ltr}&[type=number]{appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{appearance:none;margin:0}}}}}");
5723 + registerStyle6("1a25f6a232", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._2ae7be2fc1bb17a3__input{--_gcd-input-padding:var(--wp-ui-input-padding-block,0px) var(--wp-ui-input-layout-padding-inline,0px);background:transparent;border:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);font-family:inherit;font-size:inherit;line-height:inherit;outline:none;padding-block:var(--wp-ui-input-padding-block,0);padding-inline:var(--wp-ui-input-layout-padding-inline,0);width:100%;&::placeholder{color:var(--wpds-color-foreground-interactive-neutral-weak,#707070)}&:disabled,&[aria-disabled=true]{--_gcd-input-placeholder-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&::placeholder{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}@media (forced-colors:active){color:GrayText}}&[type=email],&[type=url]{direction:ltr}&[type=number]{appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{appearance:none;margin:0}}}}}");
5249 5724 }
5250 - var style_default5 = { "input": "_2ae7be2fc1bb17a3__input" };
5251 - var Input3 = (0, import_element8.forwardRef)(function Input22({ className, size = "default", prefix, suffix, style, ...restProps }, ref) {
5252 - return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5725 + var style_default6 = { "input": "_2ae7be2fc1bb17a3__input" };
5726 + var Input3 = (0, import_element9.forwardRef)(function Input22({ className, size = "default", prefix, suffix, style, ...restProps }, ref) {
5727 + return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5253 5728 InputLayout3,
5254 5729 {
5255 5730 className: clsx_default(
5256 - focus_module_default["outset-ring--focus-within"],
5731 + focus_module_default2["outset-ring--focus-within"],
5257 5732 className
5258 5733 ),
5259 5734 style,
5260 5735 size,
@@ -5260,13 +5735,13 @@
5260 5735 size,
5261 5736 visuallyDisabled: restProps.disabled,
5262 5737 prefix,
5263 5738 suffix,
5264 - children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5739 + children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5265 5740 Input,
5266 5741 {
5267 5742 ref,
5268 - className: clsx_default(global_css_defense_default2.input, style_default5.input),
5743 + className: clsx_default(global_css_defense_default3.input, style_default6.input),
5269 5744 ...restProps
5270 5745 }
5271 5746 )
5272 5747 }
@@ -5273,16 +5748,16 @@
5273 5748 );
5274 5749 });
5275 5750
5276 5751 // packages/ui/build-module/form/primitives/control-with-error/control-with-error.mjs
5277 - var import_i18n4 = __toESM(require_i18n(), 1);
5278 - var import_element10 = __toESM(require_element(), 1);
5752 + var import_i18n5 = __toESM(require_i18n(), 1);
5753 + var import_element11 = __toESM(require_element(), 1);
5279 5754
5280 5755 // packages/ui/build-module/spinner/spinner.mjs
5281 - var import_element9 = __toESM(require_element(), 1);
5282 - var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
5283 - var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
5284 - function getRuntime6() {
5756 + var import_element10 = __toESM(require_element(), 1);
5757 + var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
5758 + var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
5759 + function getRuntime7() {
5285 5760 const globalScope = globalThis;
5286 5761 if (globalScope.__wpStyleRuntime) {
5287 5762 return globalScope.__wpStyleRuntime;
5288 5763 }
@@ -5291,30 +5766,30 @@
5291 5766 styles: /* @__PURE__ */ new Map(),
5292 5767 injectedStyles: /* @__PURE__ */ new WeakMap()
5293 5768 };
5294 5769 if (typeof document !== "undefined") {
5295 - registerDocument6(document);
5770 + registerDocument7(document);
5296 5771 }
5297 5772 return globalScope.__wpStyleRuntime;
5298 5773 }
5299 - function documentContainsStyleHash6(targetDocument, hash) {
5774 + function documentContainsStyleHash7(targetDocument, hash) {
5300 5775 if (!targetDocument.head) {
5301 5776 return false;
5302 5777 }
5303 5778 for (const style of targetDocument.head.querySelectorAll(
5304 - `style[${STYLE_HASH_ATTRIBUTE6}]`
5779 + `style[${STYLE_HASH_ATTRIBUTE7}]`
5305 5780 )) {
5306 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
5781 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
5307 5782 return true;
5308 5783 }
5309 5784 }
5310 5785 return false;
5311 5786 }
5312 - function injectStyle6(targetDocument, hash, css) {
5787 + function injectStyle7(targetDocument, hash, css) {
5313 5788 if (!targetDocument.head) {
5314 5789 return;
5315 5790 }
5316 - const runtime = getRuntime6();
5791 + const runtime = getRuntime7();
5317 5792 let injectedStyles = runtime.injectedStyles.get(targetDocument);
5318 5793 if (!injectedStyles) {
5319 5794 injectedStyles = /* @__PURE__ */ new Set();
5320 5795 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -5321,26 +5796,26 @@
5321 5796 }
5322 5797 if (injectedStyles.has(hash)) {
5323 5798 return;
5324 5799 }
5325 - if (documentContainsStyleHash6(targetDocument, hash)) {
5800 + if (documentContainsStyleHash7(targetDocument, hash)) {
5326 5801 injectedStyles.add(hash);
5327 5802 return;
5328 5803 }
5329 5804 const style = targetDocument.createElement("style");
5330 - style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
5805 + style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
5331 5806 style.appendChild(targetDocument.createTextNode(css));
5332 5807 targetDocument.head.appendChild(style);
5333 5808 injectedStyles.add(hash);
5334 5809 }
5335 - function registerDocument6(targetDocument) {
5336 - const runtime = getRuntime6();
5810 + function registerDocument7(targetDocument) {
5811 + const runtime = getRuntime7();
5337 5812 runtime.documents.set(
5338 5813 targetDocument,
5339 5814 (runtime.documents.get(targetDocument) ?? 0) + 1
5340 5815 );
5341 5816 for (const [hash, css] of runtime.styles) {
5342 - injectStyle6(targetDocument, hash, css);
5817 + injectStyle7(targetDocument, hash, css);
5343 5818 }
5344 5819 return () => {
5345 5820 const count = runtime.documents.get(targetDocument);
5346 5821 if (count === void 0) {
@@ -5352,25 +5827,25 @@
5352 5827 }
5353 5828 runtime.documents.set(targetDocument, count - 1);
5354 5829 };
5355 5830 }
5356 - function registerStyle6(hash, css) {
5357 - const runtime = getRuntime6();
5831 + function registerStyle7(hash, css) {
5832 + const runtime = getRuntime7();
5358 5833 runtime.styles.set(hash, css);
5359 5834 for (const targetDocument of runtime.documents.keys()) {
5360 - injectStyle6(targetDocument, hash, css);
5835 + injectStyle7(targetDocument, hash, css);
5361 5836 }
5362 5837 }
5363 5838 if (typeof process === "undefined" || true) {
5364 - registerStyle6("bbbecfe373", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.ab4d64c07c0ba587__spinner{background-color:transparent;display:inline-block;height:var(--wpds-dimension-size-2xs,16px);opacity:1;overflow:visible;position:relative;width:var(--wpds-dimension-size-2xs,16px)}.a7654e10245bb7d2__indicator,.dc51f80c84b35fe2__track{fill:transparent;stroke-width:1.5px}.dc51f80c84b35fe2__track{stroke:var(--wpds-color-background-track-neutral,#dbdbdb)}.a7654e10245bb7d2__indicator{stroke:var(--wpds-color-background-thumb-brand,var(--wp-admin-theme-color,#3858e9));stroke-linecap:round;animation:_02322d973909703c__spinner-spin 1.4s linear infinite both;transform-origin:50% 50%}@keyframes _02322d973909703c__spinner-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}}}");
5839 + registerStyle7("bbbecfe373", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.ab4d64c07c0ba587__spinner{background-color:transparent;display:inline-block;height:var(--wpds-dimension-size-2xs,16px);opacity:1;overflow:visible;position:relative;width:var(--wpds-dimension-size-2xs,16px)}.a7654e10245bb7d2__indicator,.dc51f80c84b35fe2__track{fill:transparent;stroke-width:1.5px}.dc51f80c84b35fe2__track{stroke:var(--wpds-color-background-track-neutral,#dbdbdb)}.a7654e10245bb7d2__indicator{stroke:var(--wpds-color-background-thumb-brand,var(--wp-admin-theme-color,#3858e9));stroke-linecap:round;animation:_02322d973909703c__spinner-spin 1.4s linear infinite both;transform-origin:50% 50%}@keyframes _02322d973909703c__spinner-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}}}");
5365 5840 }
5366 - var style_default6 = { "spinner": "ab4d64c07c0ba587__spinner", "track": "dc51f80c84b35fe2__track", "indicator": "a7654e10245bb7d2__indicator", "spinner-spin": "_02322d973909703c__spinner-spin" };
5367 - var Spinner = (0, import_element9.forwardRef)(
5841 + var style_default7 = { "spinner": "ab4d64c07c0ba587__spinner", "track": "dc51f80c84b35fe2__track", "indicator": "a7654e10245bb7d2__indicator", "spinner-spin": "_02322d973909703c__spinner-spin" };
5842 + var Spinner = (0, import_element10.forwardRef)(
5368 5843 function Spinner2({ className, ...props }, ref) {
5369 - return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
5844 + return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
5370 5845 "svg",
5371 5846 {
5372 - className: clsx_default(style_default6.spinner, className),
5847 + className: clsx_default(style_default7.spinner, className),
5373 5848 viewBox: "0 0 100 100",
5374 5849 xmlns: "http://www.w3.org/2000/svg",
5375 5850 role: "presentation",
5376 5851 focusable: "false",
@@ -5376,12 +5851,12 @@
5376 5851 focusable: "false",
5377 5852 ...props,
5378 5853 ref,
5379 5854 children: [
5380 - /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5855 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5381 5856 "circle",
5382 5857 {
5383 - className: style_default6.track,
5858 + className: style_default7.track,
5384 5859 cx: "50",
5385 5860 cy: "50",
5386 5861 r: "50",
5387 5862 vectorEffect: "non-scaling-stroke"
@@ -5386,12 +5861,12 @@
5386 5861 r: "50",
5387 5862 vectorEffect: "non-scaling-stroke"
5388 5863 }
5389 5864 ),
5390 - /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5865 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5391 5866 "path",
5392 5867 {
5393 - className: style_default6.indicator,
5868 + className: style_default7.indicator,
5394 5869 d: "m 50 0 a 50 50 0 0 1 50 50",
5395 5870 vectorEffect: "non-scaling-stroke"
5396 5871 }
5397 5872 )
@@ -5401,11 +5876,11 @@
5401 5876 }
5402 5877 );
5403 5878
5404 5879 // packages/ui/build-module/form/primitives/validity-indicator/validity-indicator.mjs
5405 - var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
5406 - var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
5407 - function getRuntime7() {
5880 + var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
5881 + var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
5882 + function getRuntime8() {
5408 5883 const globalScope = globalThis;
5409 5884 if (globalScope.__wpStyleRuntime) {
5410 5885 return globalScope.__wpStyleRuntime;
5411 5886 }
@@ -5414,30 +5889,30 @@
5414 5889 styles: /* @__PURE__ */ new Map(),
5415 5890 injectedStyles: /* @__PURE__ */ new WeakMap()
5416 5891 };
5417 5892 if (typeof document !== "undefined") {
5418 - registerDocument7(document);
5893 + registerDocument8(document);
5419 5894 }
5420 5895 return globalScope.__wpStyleRuntime;
5421 5896 }
5422 - function documentContainsStyleHash7(targetDocument, hash) {
5897 + function documentContainsStyleHash8(targetDocument, hash) {
5423 5898 if (!targetDocument.head) {
5424 5899 return false;
5425 5900 }
5426 5901 for (const style of targetDocument.head.querySelectorAll(
5427 - `style[${STYLE_HASH_ATTRIBUTE7}]`
5902 + `style[${STYLE_HASH_ATTRIBUTE8}]`
5428 5903 )) {
5429 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
5904 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
5430 5905 return true;
5431 5906 }
5432 5907 }
5433 5908 return false;
5434 5909 }
5435 - function injectStyle7(targetDocument, hash, css) {
5910 + function injectStyle8(targetDocument, hash, css) {
5436 5911 if (!targetDocument.head) {
5437 5912 return;
5438 5913 }
5439 - const runtime = getRuntime7();
5914 + const runtime = getRuntime8();
5440 5915 let injectedStyles = runtime.injectedStyles.get(targetDocument);
5441 5916 if (!injectedStyles) {
5442 5917 injectedStyles = /* @__PURE__ */ new Set();
5443 5918 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -5444,26 +5919,26 @@
5444 5919 }
5445 5920 if (injectedStyles.has(hash)) {
5446 5921 return;
5447 5922 }
5448 - if (documentContainsStyleHash7(targetDocument, hash)) {
5923 + if (documentContainsStyleHash8(targetDocument, hash)) {
5449 5924 injectedStyles.add(hash);
5450 5925 return;
5451 5926 }
5452 5927 const style = targetDocument.createElement("style");
5453 - style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
5928 + style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
5454 5929 style.appendChild(targetDocument.createTextNode(css));
5455 5930 targetDocument.head.appendChild(style);
5456 5931 injectedStyles.add(hash);
5457 5932 }
5458 - function registerDocument7(targetDocument) {
5459 - const runtime = getRuntime7();
5933 + function registerDocument8(targetDocument) {
5934 + const runtime = getRuntime8();
5460 5935 runtime.documents.set(
5461 5936 targetDocument,
5462 5937 (runtime.documents.get(targetDocument) ?? 0) + 1
5463 5938 );
5464 5939 for (const [hash, css] of runtime.styles) {
5465 - injectStyle7(targetDocument, hash, css);
5940 + injectStyle8(targetDocument, hash, css);
5466 5941 }
5467 5942 return () => {
5468 5943 const count = runtime.documents.get(targetDocument);
5469 5944 if (count === void 0) {
@@ -5475,23 +5950,23 @@
5475 5950 }
5476 5951 runtime.documents.set(targetDocument, count - 1);
5477 5952 };
5478 5953 }
5479 - function registerStyle7(hash, css) {
5480 - const runtime = getRuntime7();
5954 + function registerStyle8(hash, css) {
5955 + const runtime = getRuntime8();
5481 5956 runtime.styles.set(hash, css);
5482 5957 for (const targetDocument of runtime.documents.keys()) {
5483 - injectStyle7(targetDocument, hash, css);
5958 + injectStyle8(targetDocument, hash, css);
5484 5959 }
5485 5960 }
5486 5961 if (typeof process === "undefined" || true) {
5487 - registerStyle7("af6d9984a6", "._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");
5962 + registerStyle8("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
5488 5963 }
5489 - var global_css_defense_default3 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
5964 + var global_css_defense_default4 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
5490 5965 if (typeof process === "undefined" || true) {
5491 - registerStyle7("d7b0469ef4", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7a7ac88e306348e7__indicator{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:var(--wpds-dimension-gap-sm,8px) 0 0;align-items:flex-start;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);gap:var(--wpds-dimension-gap-xs,4px);line-height:var(--wpds-typography-line-height-xs,16px);margin-block:var(--wpds-dimension-gap-sm,8px) 0;margin-inline:0;@media not (prefers-reduced-motion){animation:_48722cc5dd090ce4__indicator-jump var(--wpds-motion-duration-md,.2s) cubic-bezier(.68,-.55,.27,1.55)}}._57a3bbbfbe38a5c6__is-invalid{color:var(--wpds-color-foreground-content-error-weak,#cc1818)}._9e944dc198aac10b__is-valid{color:var(--wpds-color-foreground-content-success-weak,#008030)}.e482806667437c6a__indicator-icon{flex-shrink:0}._6e46434cc23019d2__indicator-spinner{height:var(--wpds-dimension-size-3xs,12px);margin:2px;width:var(--wpds-dimension-size-3xs,12px)}@keyframes _48722cc5dd090ce4__indicator-jump{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}}}');
5966 + registerStyle8("d11816833c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7a7ac88e306348e7__indicator{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);align-items:flex-start;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);gap:var(--wpds-dimension-gap-xs,4px);line-height:var(--wpds-typography-line-height-xs,16px);@media not (prefers-reduced-motion){animation:_48722cc5dd090ce4__indicator-jump var(--wpds-motion-duration-md,.2s) cubic-bezier(.68,-.55,.27,1.55)}}._57a3bbbfbe38a5c6__is-invalid{color:var(--wpds-color-foreground-content-error-weak,#cc1818)}._9e944dc198aac10b__is-valid{color:var(--wpds-color-foreground-content-success-weak,#008030)}.e482806667437c6a__indicator-icon{flex-shrink:0}._6e46434cc23019d2__indicator-spinner{height:var(--wpds-dimension-size-3xs,12px);margin:2px;width:var(--wpds-dimension-size-3xs,12px)}@keyframes _48722cc5dd090ce4__indicator-jump{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}}}');
5492 5967 }
5493 - var style_default7 = { "indicator": "_7a7ac88e306348e7__indicator", "indicator-jump": "_48722cc5dd090ce4__indicator-jump", "is-invalid": "_57a3bbbfbe38a5c6__is-invalid", "is-valid": "_9e944dc198aac10b__is-valid", "indicator-icon": "e482806667437c6a__indicator-icon", "indicator-spinner": "_6e46434cc23019d2__indicator-spinner" };
5968 + var style_default8 = { "indicator": "_7a7ac88e306348e7__indicator", "indicator-jump": "_48722cc5dd090ce4__indicator-jump", "is-invalid": "_57a3bbbfbe38a5c6__is-invalid", "is-valid": "_9e944dc198aac10b__is-valid", "indicator-icon": "e482806667437c6a__indicator-icon", "indicator-spinner": "_6e46434cc23019d2__indicator-spinner" };
5494 5969 var ICON = {
5495 5970 valid: published_default,
5496 5971 invalid: error_default
5497 5972 };
@@ -5499,22 +5974,22 @@
5499 5974 id,
5500 5975 type,
5501 5976 message
5502 5977 }) {
5503 - return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
5978 + return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5504 5979 "p",
5505 5980 {
5506 5981 id,
5507 5982 className: clsx_default(
5508 - global_css_defense_default3.p,
5509 - style_default7.indicator,
5510 - style_default7[`is-${type}`]
5983 + global_css_defense_default4.p,
5984 + style_default8.indicator,
5985 + style_default8[`is-${type}`]
5511 5986 ),
5512 5987 children: [
5513 - type === "validating" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Spinner, { className: style_default7["indicator-spinner"] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5988 + type === "validating" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Spinner, { className: style_default8["indicator-spinner"] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5514 5989 Icon,
5515 5990 {
5516 - className: style_default7["indicator-icon"],
5991 + className: style_default8["indicator-icon"],
5517 5992 icon: ICON[type],
5518 5993 size: 16,
5519 5994 fill: "currentColor"
5520 5995 }
@@ -5525,15 +6000,16 @@
5525 6000 );
5526 6001 }
5527 6002
5528 6003 // packages/ui/build-module/form/primitives/control-with-error/control-with-error.mjs
5529 - var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
6004 + var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
6005 + var DEFAULT_RENDER = (props) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Stack, { ...props, direction: "column", gap: "sm" });
5530 6006 function appendRequiredIndicator(label, required, markWhenOptional) {
5531 6007 let suffix;
5532 6008 if (required && !markWhenOptional) {
5533 - suffix = `(${(0, import_i18n4.__)("Required")})`;
6009 + suffix = `(${(0, import_i18n5.__)("Required")})`;
5534 6010 } else if (!required && markWhenOptional) {
5535 - suffix = `(${(0, import_i18n4.__)("Optional")})`;
6011 + suffix = `(${(0, import_i18n5.__)("Optional")})`;
5536 6012 }
5537 6013 if (!suffix) {
5538 6014 return label;
5539 6015 }
@@ -5539,9 +6015,9 @@
5539 6015 }
5540 6016 if (typeof label === "string") {
5541 6017 return `${label} ${suffix}`;
5542 6018 }
5543 - return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
6019 + return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
5544 6020 label,
5545 6021 " ",
5546 6022 suffix
5547 6023 ] });
@@ -5546,23 +6022,23 @@
5546 6022 suffix
5547 6023 ] });
5548 6024 }
5549 6025 var VALIDITY_VISIBLE_ATTRIBUTE = "data-validity-visible";
5550 - var ControlWithError = (0, import_element10.forwardRef)(function ControlWithError2({
6026 + var ControlWithError = (0, import_element11.forwardRef)(function ControlWithError2({
5551 6027 required,
5552 6028 markWhenOptional,
5553 6029 customValidity,
5554 6030 getValidityTarget,
5555 6031 children,
5556 - render,
6032 + render = DEFAULT_RENDER,
5557 6033 ...restProps
5558 6034 }, forwardedRef) {
5559 - const [errorMessage, setErrorMessage] = (0, import_element10.useState)();
5560 - const [statusMessage, setStatusMessage] = (0, import_element10.useState)();
5561 - const [showMessage, setShowMessage] = (0, import_element10.useState)(false);
5562 - const [isTouched, setIsTouched] = (0, import_element10.useState)(false);
5563 - const wrapperRef = (0, import_element10.useRef)(null);
5564 - (0, import_element10.useEffect)(() => {
6035 + const [errorMessage, setErrorMessage] = (0, import_element11.useState)();
6036 + const [statusMessage, setStatusMessage] = (0, import_element11.useState)();
6037 + const [showMessage, setShowMessage] = (0, import_element11.useState)(false);
6038 + const [isTouched, setIsTouched] = (0, import_element11.useState)(false);
6039 + const wrapperRef = (0, import_element11.useRef)(null);
6040 + (0, import_element11.useEffect)(() => {
5565 6041 const validityTarget = getValidityTarget();
5566 6042 const handler = () => {
5567 6043 if (customValidity?.type !== "validating") {
5568 6044 setErrorMessage(validityTarget?.validationMessage);
@@ -5572,9 +6048,9 @@
5572 6048 };
5573 6049 validityTarget?.addEventListener("invalid", handler);
5574 6050 return () => validityTarget?.removeEventListener("invalid", handler);
5575 6051 }, [customValidity?.type, getValidityTarget]);
5576 - (0, import_element10.useEffect)(() => {
6052 + (0, import_element11.useEffect)(() => {
5577 6053 const validityTarget = getValidityTarget();
5578 6054 const suppressNativePopover = (event) => {
5579 6055 event.preventDefault();
5580 6056 if (!event.isTrusted) {
@@ -5606,9 +6082,9 @@
5606 6082 (sibling) => sibling.removeEventListener("invalid", suppressNativePopover)
5607 6083 );
5608 6084 };
5609 6085 }, [getValidityTarget]);
5610 - (0, import_element10.useEffect)(() => {
6086 + (0, import_element11.useEffect)(() => {
5611 6087 const validityTarget = getValidityTarget();
5612 6088 if (!customValidity?.type) {
5613 6089 validityTarget?.setCustomValidity("");
5614 6090 setErrorMessage(validityTarget?.validationMessage);
@@ -5643,9 +6119,9 @@
5643 6119 break;
5644 6120 }
5645 6121 }
5646 6122 }, [customValidity, getValidityTarget]);
5647 - (0, import_element10.useEffect)(() => {
6123 + (0, import_element11.useEffect)(() => {
5648 6124 if (!isTouched || showMessage) {
5649 6125 return;
5650 6126 }
5651 6127 if (customValidity?.type === "validating") {
@@ -5656,20 +6132,27 @@
5656 6132 }
5657 6133 setShowMessage(true);
5658 6134 }, [isTouched, customValidity?.type, showMessage]);
5659 6135 const onBlur = (event) => {
5660 - if (isTouched) {
6136 + if (event.relatedTarget && event.currentTarget.contains(event.relatedTarget)) {
5661 6137 return;
5662 6138 }
5663 - if (!event.relatedTarget || !event.currentTarget.contains(event.relatedTarget)) {
6139 + if (!isTouched) {
5664 6140 setIsTouched(true);
5665 6141 getValidityTarget()?.setAttribute(VALIDITY_VISIBLE_ATTRIBUTE, "");
5666 6142 }
6143 + const validityTarget = getValidityTarget();
6144 + const isValidating = customValidity?.type === "validating";
6145 + window.queueMicrotask(() => {
6146 + if (!isValidating) {
6147 + setErrorMessage(validityTarget?.validationMessage);
6148 + }
6149 + });
5667 6150 };
5668 - const messageId = (0, import_element10.useId)();
6151 + const messageId = (0, import_element11.useId)();
5669 6152 const message = (() => {
5670 6153 if (errorMessage) {
5671 - return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6154 + return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5672 6155 ValidityIndicator,
5673 6156 {
5674 6157 id: messageId,
5675 6158 type: "invalid",
@@ -5677,9 +6160,9 @@
5677 6160 }
5678 6161 );
5679 6162 }
5680 6163 if (statusMessage?.type) {
5681 - return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6164 + return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5682 6165 ValidityIndicator,
5683 6166 {
5684 6167 id: messageId,
5685 6168 type: statusMessage.type,
@@ -5689,9 +6172,9 @@
5689 6172 }
5690 6173 return null;
5691 6174 })();
5692 6175 const visibleMessage = showMessage ? message : null;
5693 - (0, import_element10.useEffect)(() => {
6176 + (0, import_element11.useEffect)(() => {
5694 6177 const target = getValidityTarget();
5695 6178 if (!target) {
5696 6179 return;
5697 6180 }
@@ -5710,14 +6193,13 @@
5710 6193 return () => setDescribedBy(target, false);
5711 6194 }, [visibleMessage, messageId, getValidityTarget]);
5712 6195 return useRender({
5713 6196 render,
5714 - defaultTagName: "div",
5715 6197 ref: [forwardedRef, wrapperRef],
5716 6198 props: mergeProps(restProps, {
5717 6199 onBlur,
5718 - children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
5719 - (0, import_element10.cloneElement)(children, {
6200 + children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
6201 + (0, import_element11.cloneElement)(children, {
5720 6202 label: appendRequiredIndicator(
5721 6203 children.props.label,
5722 6204 required,
5723 6205 markWhenOptional
@@ -5737,16 +6219,17 @@
5737 6219 Description: () => Description,
5738 6220 Details: () => Details,
5739 6221 Item: () => Item,
5740 6222 Label: () => Label,
5741 - Root: () => Root
6223 + Root: () => Root,
6224 + VisualLabel: () => VisualLabel
5742 6225 });
5743 6226
5744 6227 // packages/ui/build-module/form/primitives/field/root.mjs
5745 - var import_element11 = __toESM(require_element(), 1);
5746 - var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
5747 - var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
5748 - function getRuntime8() {
6228 + var import_element12 = __toESM(require_element(), 1);
6229 + var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
6230 + var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
6231 + function getRuntime9() {
5749 6232 const globalScope = globalThis;
5750 6233 if (globalScope.__wpStyleRuntime) {
5751 6234 return globalScope.__wpStyleRuntime;
5752 6235 }
@@ -5755,30 +6238,30 @@
5755 6238 styles: /* @__PURE__ */ new Map(),
5756 6239 injectedStyles: /* @__PURE__ */ new WeakMap()
5757 6240 };
5758 6241 if (typeof document !== "undefined") {
5759 - registerDocument8(document);
6242 + registerDocument9(document);
5760 6243 }
5761 6244 return globalScope.__wpStyleRuntime;
5762 6245 }
5763 - function documentContainsStyleHash8(targetDocument, hash) {
6246 + function documentContainsStyleHash9(targetDocument, hash) {
5764 6247 if (!targetDocument.head) {
5765 6248 return false;
5766 6249 }
5767 6250 for (const style of targetDocument.head.querySelectorAll(
5768 - `style[${STYLE_HASH_ATTRIBUTE8}]`
6251 + `style[${STYLE_HASH_ATTRIBUTE9}]`
5769 6252 )) {
5770 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
6253 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
5771 6254 return true;
5772 6255 }
5773 6256 }
5774 6257 return false;
5775 6258 }
5776 - function injectStyle8(targetDocument, hash, css) {
6259 + function injectStyle9(targetDocument, hash, css) {
5777 6260 if (!targetDocument.head) {
5778 6261 return;
5779 6262 }
5780 - const runtime = getRuntime8();
6263 + const runtime = getRuntime9();
5781 6264 let injectedStyles = runtime.injectedStyles.get(targetDocument);
5782 6265 if (!injectedStyles) {
5783 6266 injectedStyles = /* @__PURE__ */ new Set();
5784 6267 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -5785,26 +6268,26 @@
5785 6268 }
5786 6269 if (injectedStyles.has(hash)) {
5787 6270 return;
5788 6271 }
5789 - if (documentContainsStyleHash8(targetDocument, hash)) {
6272 + if (documentContainsStyleHash9(targetDocument, hash)) {
5790 6273 injectedStyles.add(hash);
5791 6274 return;
5792 6275 }
5793 6276 const style = targetDocument.createElement("style");
5794 - style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
6277 + style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
5795 6278 style.appendChild(targetDocument.createTextNode(css));
5796 6279 targetDocument.head.appendChild(style);
5797 6280 injectedStyles.add(hash);
5798 6281 }
5799 - function registerDocument8(targetDocument) {
5800 - const runtime = getRuntime8();
6282 + function registerDocument9(targetDocument) {
6283 + const runtime = getRuntime9();
5801 6284 runtime.documents.set(
5802 6285 targetDocument,
5803 6286 (runtime.documents.get(targetDocument) ?? 0) + 1
5804 6287 );
5805 6288 for (const [hash, css] of runtime.styles) {
5806 - injectStyle8(targetDocument, hash, css);
6289 + injectStyle9(targetDocument, hash, css);
5807 6290 }
5808 6291 return () => {
5809 6292 const count = runtime.documents.get(targetDocument);
5810 6293 if (count === void 0) {
@@ -5816,26 +6299,26 @@
5816 6299 }
5817 6300 runtime.documents.set(targetDocument, count - 1);
5818 6301 };
5819 6302 }
5820 - function registerStyle8(hash, css) {
5821 - const runtime = getRuntime8();
6303 + function registerStyle9(hash, css) {
6304 + const runtime = getRuntime9();
5822 6305 runtime.styles.set(hash, css);
5823 6306 for (const targetDocument of runtime.documents.keys()) {
5824 - injectStyle8(targetDocument, hash, css);
6307 + injectStyle9(targetDocument, hash, css);
5825 6308 }
5826 6309 }
5827 6310 if (typeof process === "undefined" || true) {
5828 - registerStyle8("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
6311 + registerStyle9("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
5829 6312 }
5830 - var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
5831 - var DEFAULT_RENDER = (props) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Stack, { ...props, direction: "column", gap: "sm" });
5832 - var Root = (0, import_element11.forwardRef)(function Root2({ className, render = DEFAULT_RENDER, ...restProps }, ref) {
5833 - return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6313 + var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
6314 + var DEFAULT_RENDER2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Stack, { ...props, direction: "column", gap: "sm" });
6315 + var Root = (0, import_element12.forwardRef)(function Root2({ className, render = DEFAULT_RENDER2, ...restProps }, ref) {
6316 + return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5834 6317 index_parts_exports.Root,
5835 6318 {
5836 6319 ref,
5837 - className: clsx_default(resets_default2["box-sizing"], className),
6320 + className: clsx_default(resets_default3["box-sizing"], className),
5838 6321 render,
5839 6322 ...restProps
5840 6323 }
5841 6324 );
@@ -5841,19 +6324,19 @@
5841 6324 );
5842 6325 });
5843 6326
5844 6327 // packages/ui/build-module/form/primitives/field/item.mjs
5845 - var import_element12 = __toESM(require_element(), 1);
5846 - var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
5847 - var Item = (0, import_element12.forwardRef)(function Item2(props, ref) {
5848 - return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(index_parts_exports.Item, { ref, ...props });
6328 + var import_element13 = __toESM(require_element(), 1);
6329 + var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
6330 + var Item = (0, import_element13.forwardRef)(function Item2(props, ref) {
6331 + return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(index_parts_exports.Item, { ref, ...props });
5849 6332 });
5850 6333
5851 6334 // packages/ui/build-module/form/primitives/field/label.mjs
5852 - var import_element13 = __toESM(require_element(), 1);
5853 - var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
5854 - var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
5855 - function getRuntime9() {
6335 + var import_element14 = __toESM(require_element(), 1);
6336 + var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
6337 + var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
6338 + function getRuntime10() {
5856 6339 const globalScope = globalThis;
5857 6340 if (globalScope.__wpStyleRuntime) {
5858 6341 return globalScope.__wpStyleRuntime;
5859 6342 }
@@ -5862,30 +6345,30 @@
5862 6345 styles: /* @__PURE__ */ new Map(),
5863 6346 injectedStyles: /* @__PURE__ */ new WeakMap()
5864 6347 };
5865 6348 if (typeof document !== "undefined") {
5866 - registerDocument9(document);
6349 + registerDocument10(document);
5867 6350 }
5868 6351 return globalScope.__wpStyleRuntime;
5869 6352 }
5870 - function documentContainsStyleHash9(targetDocument, hash) {
6353 + function documentContainsStyleHash10(targetDocument, hash) {
5871 6354 if (!targetDocument.head) {
5872 6355 return false;
5873 6356 }
5874 6357 for (const style of targetDocument.head.querySelectorAll(
5875 - `style[${STYLE_HASH_ATTRIBUTE9}]`
6358 + `style[${STYLE_HASH_ATTRIBUTE10}]`
5876 6359 )) {
5877 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
6360 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
5878 6361 return true;
5879 6362 }
5880 6363 }
5881 6364 return false;
5882 6365 }
5883 - function injectStyle9(targetDocument, hash, css) {
6366 + function injectStyle10(targetDocument, hash, css) {
5884 6367 if (!targetDocument.head) {
5885 6368 return;
5886 6369 }
5887 - const runtime = getRuntime9();
6370 + const runtime = getRuntime10();
5888 6371 let injectedStyles = runtime.injectedStyles.get(targetDocument);
5889 6372 if (!injectedStyles) {
5890 6373 injectedStyles = /* @__PURE__ */ new Set();
5891 6374 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -5892,26 +6375,26 @@
5892 6375 }
5893 6376 if (injectedStyles.has(hash)) {
5894 6377 return;
5895 6378 }
5896 - if (documentContainsStyleHash9(targetDocument, hash)) {
6379 + if (documentContainsStyleHash10(targetDocument, hash)) {
5897 6380 injectedStyles.add(hash);
5898 6381 return;
5899 6382 }
5900 6383 const style = targetDocument.createElement("style");
5901 - style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
6384 + style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
5902 6385 style.appendChild(targetDocument.createTextNode(css));
5903 6386 targetDocument.head.appendChild(style);
5904 6387 injectedStyles.add(hash);
5905 6388 }
5906 - function registerDocument9(targetDocument) {
5907 - const runtime = getRuntime9();
6389 + function registerDocument10(targetDocument) {
6390 + const runtime = getRuntime10();
5908 6391 runtime.documents.set(
5909 6392 targetDocument,
5910 6393 (runtime.documents.get(targetDocument) ?? 0) + 1
5911 6394 );
5912 6395 for (const [hash, css] of runtime.styles) {
5913 - injectStyle9(targetDocument, hash, css);
6396 + injectStyle10(targetDocument, hash, css);
5914 6397 }
5915 6398 return () => {
5916 6399 const count = runtime.documents.get(targetDocument);
5917 6400 if (count === void 0) {
@@ -5923,22 +6406,22 @@
5923 6406 }
5924 6407 runtime.documents.set(targetDocument, count - 1);
5925 6408 };
5926 6409 }
5927 - function registerStyle9(hash, css) {
5928 - const runtime = getRuntime9();
6410 + function registerStyle10(hash, css) {
6411 + const runtime = getRuntime10();
5929 6412 runtime.styles.set(hash, css);
5930 6413 for (const targetDocument of runtime.documents.keys()) {
5931 - injectStyle9(targetDocument, hash, css);
6414 + injectStyle10(targetDocument, hash, css);
5932 6415 }
5933 6416 }
5934 6417 if (typeof process === "undefined" || true) {
5935 - registerStyle9("e08ffbfdae", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6418 + registerStyle10("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
5936 6419 }
5937 6420 var field_default = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
5938 - var Label = (0, import_element13.forwardRef)(
6421 + var Label = (0, import_element14.forwardRef)(
5939 6422 function Label2({ className, hideFromVision, variant, ...restProps }, ref) {
5940 - const label = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6423 + const label = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5941 6424 index_parts_exports.Label,
5942 6425 {
5943 6426 ref,
5944 6427 className: clsx_default(
@@ -5949,9 +6432,9 @@
5949 6432 ...restProps
5950 6433 }
5951 6434 );
5952 6435 if (hideFromVision) {
5953 - return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(VisuallyHidden, { render: label });
6436 + return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(VisuallyHidden, { render: label });
5954 6437 }
5955 6438 return label;
5956 6439 }
5957 6440 );
@@ -5956,12 +6439,12 @@
5956 6439 }
5957 6440 );
5958 6441
5959 6442 // packages/ui/build-module/form/primitives/field/description.mjs
5960 - var import_element14 = __toESM(require_element(), 1);
5961 - var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
5962 - var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
5963 - function getRuntime10() {
6443 + var import_element15 = __toESM(require_element(), 1);
6444 + var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
6445 + var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
6446 + function getRuntime11() {
5964 6447 const globalScope = globalThis;
5965 6448 if (globalScope.__wpStyleRuntime) {
5966 6449 return globalScope.__wpStyleRuntime;
5967 6450 }
@@ -5970,30 +6453,30 @@
5970 6453 styles: /* @__PURE__ */ new Map(),
5971 6454 injectedStyles: /* @__PURE__ */ new WeakMap()
5972 6455 };
5973 6456 if (typeof document !== "undefined") {
5974 - registerDocument10(document);
6457 + registerDocument11(document);
5975 6458 }
5976 6459 return globalScope.__wpStyleRuntime;
5977 6460 }
5978 - function documentContainsStyleHash10(targetDocument, hash) {
6461 + function documentContainsStyleHash11(targetDocument, hash) {
5979 6462 if (!targetDocument.head) {
5980 6463 return false;
5981 6464 }
5982 6465 for (const style of targetDocument.head.querySelectorAll(
5983 - `style[${STYLE_HASH_ATTRIBUTE10}]`
6466 + `style[${STYLE_HASH_ATTRIBUTE11}]`
5984 6467 )) {
5985 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
6468 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
5986 6469 return true;
5987 6470 }
5988 6471 }
5989 6472 return false;
5990 6473 }
5991 - function injectStyle10(targetDocument, hash, css) {
6474 + function injectStyle11(targetDocument, hash, css) {
5992 6475 if (!targetDocument.head) {
5993 6476 return;
5994 6477 }
5995 - const runtime = getRuntime10();
6478 + const runtime = getRuntime11();
5996 6479 let injectedStyles = runtime.injectedStyles.get(targetDocument);
5997 6480 if (!injectedStyles) {
5998 6481 injectedStyles = /* @__PURE__ */ new Set();
5999 6482 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -6000,26 +6483,26 @@
6000 6483 }
6001 6484 if (injectedStyles.has(hash)) {
6002 6485 return;
6003 6486 }
6004 - if (documentContainsStyleHash10(targetDocument, hash)) {
6487 + if (documentContainsStyleHash11(targetDocument, hash)) {
6005 6488 injectedStyles.add(hash);
6006 6489 return;
6007 6490 }
6008 6491 const style = targetDocument.createElement("style");
6009 - style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
6492 + style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
6010 6493 style.appendChild(targetDocument.createTextNode(css));
6011 6494 targetDocument.head.appendChild(style);
6012 6495 injectedStyles.add(hash);
6013 6496 }
6014 - function registerDocument10(targetDocument) {
6015 - const runtime = getRuntime10();
6497 + function registerDocument11(targetDocument) {
6498 + const runtime = getRuntime11();
6016 6499 runtime.documents.set(
6017 6500 targetDocument,
6018 6501 (runtime.documents.get(targetDocument) ?? 0) + 1
6019 6502 );
6020 6503 for (const [hash, css] of runtime.styles) {
6021 - injectStyle10(targetDocument, hash, css);
6504 + injectStyle11(targetDocument, hash, css);
6022 6505 }
6023 6506 return () => {
6024 6507 const count = runtime.documents.get(targetDocument);
6025 6508 if (count === void 0) {
@@ -6031,30 +6514,30 @@
6031 6514 }
6032 6515 runtime.documents.set(targetDocument, count - 1);
6033 6516 };
6034 6517 }
6035 - function registerStyle10(hash, css) {
6036 - const runtime = getRuntime10();
6518 + function registerStyle11(hash, css) {
6519 + const runtime = getRuntime11();
6037 6520 runtime.styles.set(hash, css);
6038 6521 for (const targetDocument of runtime.documents.keys()) {
6039 - injectStyle10(targetDocument, hash, css);
6522 + injectStyle11(targetDocument, hash, css);
6040 6523 }
6041 6524 }
6042 6525 if (typeof process === "undefined" || true) {
6043 - registerStyle10("af6d9984a6", "._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");
6526 + registerStyle11("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
6044 6527 }
6045 - var global_css_defense_default4 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
6528 + var global_css_defense_default5 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
6046 6529 if (typeof process === "undefined" || true) {
6047 - registerStyle10("e08ffbfdae", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6530 + registerStyle11("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6048 6531 }
6049 6532 var field_default2 = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
6050 - var Description = (0, import_element14.forwardRef)(function Description2({ className, ...restProps }, ref) {
6051 - return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6533 + var Description = (0, import_element15.forwardRef)(function Description2({ className, ...restProps }, ref) {
6534 + return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6052 6535 index_parts_exports.Description,
6053 6536 {
6054 6537 ref,
6055 6538 className: clsx_default(
6056 - global_css_defense_default4.p,
6539 + global_css_defense_default5.p,
6057 6540 field_default2.description,
6058 6541 className
6059 6542 ),
6060 6543 ...restProps
@@ -6062,13 +6545,13 @@
6062 6545 );
6063 6546 });
6064 6547
6065 6548 // packages/ui/build-module/form/primitives/field/details.mjs
6066 - var import_element15 = __toESM(require_element(), 1);
6067 - var import_i18n5 = __toESM(require_i18n(), 1);
6068 - var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
6069 - var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
6070 - function getRuntime11() {
6549 + var import_element16 = __toESM(require_element(), 1);
6550 + var import_i18n6 = __toESM(require_i18n(), 1);
6551 + var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
6552 + var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
6553 + function getRuntime12() {
6071 6554 const globalScope = globalThis;
6072 6555 if (globalScope.__wpStyleRuntime) {
6073 6556 return globalScope.__wpStyleRuntime;
6074 6557 }
@@ -6077,30 +6560,30 @@
6077 6560 styles: /* @__PURE__ */ new Map(),
6078 6561 injectedStyles: /* @__PURE__ */ new WeakMap()
6079 6562 };
6080 6563 if (typeof document !== "undefined") {
6081 - registerDocument11(document);
6564 + registerDocument12(document);
6082 6565 }
6083 6566 return globalScope.__wpStyleRuntime;
6084 6567 }
6085 - function documentContainsStyleHash11(targetDocument, hash) {
6568 + function documentContainsStyleHash12(targetDocument, hash) {
6086 6569 if (!targetDocument.head) {
6087 6570 return false;
6088 6571 }
6089 6572 for (const style of targetDocument.head.querySelectorAll(
6090 - `style[${STYLE_HASH_ATTRIBUTE11}]`
6573 + `style[${STYLE_HASH_ATTRIBUTE12}]`
6091 6574 )) {
6092 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
6575 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
6093 6576 return true;
6094 6577 }
6095 6578 }
6096 6579 return false;
6097 6580 }
6098 - function injectStyle11(targetDocument, hash, css) {
6581 + function injectStyle12(targetDocument, hash, css) {
6099 6582 if (!targetDocument.head) {
6100 6583 return;
6101 6584 }
6102 - const runtime = getRuntime11();
6585 + const runtime = getRuntime12();
6103 6586 let injectedStyles = runtime.injectedStyles.get(targetDocument);
6104 6587 if (!injectedStyles) {
6105 6588 injectedStyles = /* @__PURE__ */ new Set();
6106 6589 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -6107,26 +6590,26 @@
6107 6590 }
6108 6591 if (injectedStyles.has(hash)) {
6109 6592 return;
6110 6593 }
6111 - if (documentContainsStyleHash11(targetDocument, hash)) {
6594 + if (documentContainsStyleHash12(targetDocument, hash)) {
6112 6595 injectedStyles.add(hash);
6113 6596 return;
6114 6597 }
6115 6598 const style = targetDocument.createElement("style");
6116 - style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
6599 + style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
6117 6600 style.appendChild(targetDocument.createTextNode(css));
6118 6601 targetDocument.head.appendChild(style);
6119 6602 injectedStyles.add(hash);
6120 6603 }
6121 - function registerDocument11(targetDocument) {
6122 - const runtime = getRuntime11();
6604 + function registerDocument12(targetDocument) {
6605 + const runtime = getRuntime12();
6123 6606 runtime.documents.set(
6124 6607 targetDocument,
6125 6608 (runtime.documents.get(targetDocument) ?? 0) + 1
6126 6609 );
6127 6610 for (const [hash, css] of runtime.styles) {
6128 - injectStyle11(targetDocument, hash, css);
6611 + injectStyle12(targetDocument, hash, css);
6129 6612 }
6130 6613 return () => {
6131 6614 const count = runtime.documents.get(targetDocument);
6132 6615 if (count === void 0) {
@@ -6138,24 +6621,24 @@
6138 6621 }
6139 6622 runtime.documents.set(targetDocument, count - 1);
6140 6623 };
6141 6624 }
6142 - function registerStyle11(hash, css) {
6143 - const runtime = getRuntime11();
6625 + function registerStyle12(hash, css) {
6626 + const runtime = getRuntime12();
6144 6627 runtime.styles.set(hash, css);
6145 6628 for (const targetDocument of runtime.documents.keys()) {
6146 - injectStyle11(targetDocument, hash, css);
6629 + injectStyle12(targetDocument, hash, css);
6147 6630 }
6148 6631 }
6149 6632 if (typeof process === "undefined" || true) {
6150 - registerStyle11("e08ffbfdae", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6633 + registerStyle12("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6151 6634 }
6152 6635 var field_default3 = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
6153 - var Details = (0, import_element15.forwardRef)(
6636 + var Details = (0, import_element16.forwardRef)(
6154 6637 function Details2({ className, ...restProps }, ref) {
6155 - return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
6156 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(VisuallyHidden, { render: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(index_parts_exports.Description, {}), children: (0, import_i18n5.__)("More details follow the field.") }),
6157 - /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6638 + return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6639 + /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(VisuallyHidden, { render: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(index_parts_exports.Description, {}), children: (0, import_i18n6.__)("More details follow the field.") }),
6640 + /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6158 6641 "div",
6159 6642 {
6160 6643 ref,
6161 6644 className: clsx_default(field_default3.description, className),
@@ -6166,21 +6649,20 @@
6166 6649 }
6167 6650 );
6168 6651
6169 6652 // packages/ui/build-module/form/primitives/field/control.mjs
6170 - var import_element16 = __toESM(require_element(), 1);
6171 - var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
6172 - var Control = (0, import_element16.forwardRef)(
6653 + var import_element17 = __toESM(require_element(), 1);
6654 + var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
6655 + var Control = (0, import_element17.forwardRef)(
6173 6656 function Control2(props, ref) {
6174 - return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(index_parts_exports.Control, { ref, ...props });
6657 + return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(index_parts_exports.Control, { ref, ...props });
6175 6658 }
6176 6659 );
6177 6660
6178 - // packages/ui/build-module/form/input-control/input-control.mjs
6179 - var import_element17 = __toESM(require_element(), 1);
6180 - var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
6181 - var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
6182 - function getRuntime12() {
6661 + // packages/ui/build-module/form/primitives/field/visual-label.mjs
6662 + var import_element18 = __toESM(require_element(), 1);
6663 + var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
6664 + function getRuntime13() {
6183 6665 const globalScope = globalThis;
6184 6666 if (globalScope.__wpStyleRuntime) {
6185 6667 return globalScope.__wpStyleRuntime;
6186 6668 }
@@ -6189,30 +6671,30 @@
6189 6671 styles: /* @__PURE__ */ new Map(),
6190 6672 injectedStyles: /* @__PURE__ */ new WeakMap()
6191 6673 };
6192 6674 if (typeof document !== "undefined") {
6193 - registerDocument12(document);
6675 + registerDocument13(document);
6194 6676 }
6195 6677 return globalScope.__wpStyleRuntime;
6196 6678 }
6197 - function documentContainsStyleHash12(targetDocument, hash) {
6679 + function documentContainsStyleHash13(targetDocument, hash) {
6198 6680 if (!targetDocument.head) {
6199 6681 return false;
6200 6682 }
6201 6683 for (const style of targetDocument.head.querySelectorAll(
6202 - `style[${STYLE_HASH_ATTRIBUTE12}]`
6684 + `style[${STYLE_HASH_ATTRIBUTE13}]`
6203 6685 )) {
6204 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
6686 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
6205 6687 return true;
6206 6688 }
6207 6689 }
6208 6690 return false;
6209 6691 }
6210 - function injectStyle12(targetDocument, hash, css) {
6692 + function injectStyle13(targetDocument, hash, css) {
6211 6693 if (!targetDocument.head) {
6212 6694 return;
6213 6695 }
6214 - const runtime = getRuntime12();
6696 + const runtime = getRuntime13();
6215 6697 let injectedStyles = runtime.injectedStyles.get(targetDocument);
6216 6698 if (!injectedStyles) {
6217 6699 injectedStyles = /* @__PURE__ */ new Set();
6218 6700 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -6219,26 +6701,26 @@
6219 6701 }
6220 6702 if (injectedStyles.has(hash)) {
6221 6703 return;
6222 6704 }
6223 - if (documentContainsStyleHash12(targetDocument, hash)) {
6705 + if (documentContainsStyleHash13(targetDocument, hash)) {
6224 6706 injectedStyles.add(hash);
6225 6707 return;
6226 6708 }
6227 6709 const style = targetDocument.createElement("style");
6228 - style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
6710 + style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
6229 6711 style.appendChild(targetDocument.createTextNode(css));
6230 6712 targetDocument.head.appendChild(style);
6231 6713 injectedStyles.add(hash);
6232 6714 }
6233 - function registerDocument12(targetDocument) {
6234 - const runtime = getRuntime12();
6715 + function registerDocument13(targetDocument) {
6716 + const runtime = getRuntime13();
6235 6717 runtime.documents.set(
6236 6718 targetDocument,
6237 6719 (runtime.documents.get(targetDocument) ?? 0) + 1
6238 6720 );
6239 6721 for (const [hash, css] of runtime.styles) {
6240 - injectStyle12(targetDocument, hash, css);
6722 + injectStyle13(targetDocument, hash, css);
6241 6723 }
6242 6724 return () => {
6243 6725 const count = runtime.documents.get(targetDocument);
6244 6726 if (count === void 0) {
@@ -6250,62 +6732,42 @@
6250 6732 }
6251 6733 runtime.documents.set(targetDocument, count - 1);
6252 6734 };
6253 6735 }
6254 - function registerStyle12(hash, css) {
6255 - const runtime = getRuntime12();
6736 + function registerStyle13(hash, css) {
6737 + const runtime = getRuntime13();
6256 6738 runtime.styles.set(hash, css);
6257 6739 for (const targetDocument of runtime.documents.keys()) {
6258 - injectStyle12(targetDocument, hash, css);
6740 + injectStyle13(targetDocument, hash, css);
6259 6741 }
6260 6742 }
6261 6743 if (typeof process === "undefined" || true) {
6262 - registerStyle12("0c752c3d08", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.a9211a7e6af24bed__root input[type=date]:not([data-filled]):not(:focus),.a9211a7e6af24bed__root input[type=datetime-local]:not([data-filled]):not(:focus),.a9211a7e6af24bed__root input[type=time]:not([data-filled]):not(:focus){--_gcd-input-color:transparent;--_gcd-input-color-disabled:transparent;color:transparent;&:disabled::-webkit-datetime-edit-text{color:transparent}}}}}");
6744 + registerStyle13("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6263 6745 }
6264 - var style_default8 = { "root": "a9211a7e6af24bed__root" };
6265 - var InputControl = (0, import_element17.forwardRef)(
6266 - function InputControl2({
6267 - className,
6268 - label,
6269 - description,
6270 - details,
6271 - hideLabelFromVision,
6272 - ...restProps
6273 - }, ref) {
6274 - return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(field_exports.Root, { className: clsx_default(style_default8.root, className), children: [
6275 - /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(field_exports.Label, { hideFromVision: hideLabelFromVision, children: label }),
6276 - /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Input3, { ref, ...restProps }),
6277 - description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(field_exports.Description, { children: description }),
6278 - details && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(field_exports.Details, { children: details })
6279 - ] });
6746 + var field_default4 = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
6747 + var VisualLabel = (0, import_element18.forwardRef)(
6748 + function VisualLabel2({ className, render, variant, ...restProps }, ref) {
6749 + return useRender({
6750 + defaultTagName: "span",
6751 + render,
6752 + ref,
6753 + props: mergeProps(restProps, {
6754 + className: clsx_default(
6755 + field_default4.label,
6756 + variant && field_default4[`is-${variant}`],
6757 + className
6758 + )
6759 + })
6760 + });
6280 6761 }
6281 6762 );
6763 + VisualLabel.displayName = "Field.VisualLabel";
6282 6764
6283 - // packages/ui/build-module/form/with-validation/validated-input-control/validated-input-control.mjs
6284 - var import_element18 = __toESM(require_element(), 1);
6285 - var import_compose = __toESM(require_compose(), 1);
6765 + // packages/ui/build-module/form/input-control/input-control.mjs
6766 + var import_element19 = __toESM(require_element(), 1);
6286 6767 var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
6287 - var ValidatedInputControl = (0, import_element18.forwardRef)(function ValidatedInputControl2({ required, markWhenOptional, customValidity, ...restProps }, forwardedRef) {
6288 - const validityTargetRef = (0, import_element18.useRef)(null);
6289 - const mergedRefs = (0, import_compose.useMergeRefs)([forwardedRef, validityTargetRef]);
6290 - return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6291 - ControlWithError,
6292 - {
6293 - required,
6294 - markWhenOptional,
6295 - customValidity,
6296 - getValidityTarget: () => validityTargetRef.current,
6297 - children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(InputControl, { ref: mergedRefs, ...restProps })
6298 - }
6299 - );
6300 - });
6301 -
6302 - // packages/ui/build-module/link/link.mjs
6303 - var import_element19 = __toESM(require_element(), 1);
6304 - var import_i18n6 = __toESM(require_i18n(), 1);
6305 - var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
6306 - var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
6307 - function getRuntime13() {
6768 + var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
6769 + function getRuntime14() {
6308 6770 const globalScope = globalThis;
6309 6771 if (globalScope.__wpStyleRuntime) {
6310 6772 return globalScope.__wpStyleRuntime;
6311 6773 }
@@ -6314,30 +6776,30 @@
6314 6776 styles: /* @__PURE__ */ new Map(),
6315 6777 injectedStyles: /* @__PURE__ */ new WeakMap()
6316 6778 };
6317 6779 if (typeof document !== "undefined") {
6318 - registerDocument13(document);
6780 + registerDocument14(document);
6319 6781 }
6320 6782 return globalScope.__wpStyleRuntime;
6321 6783 }
6322 - function documentContainsStyleHash13(targetDocument, hash) {
6784 + function documentContainsStyleHash14(targetDocument, hash) {
6323 6785 if (!targetDocument.head) {
6324 6786 return false;
6325 6787 }
6326 6788 for (const style of targetDocument.head.querySelectorAll(
6327 - `style[${STYLE_HASH_ATTRIBUTE13}]`
6789 + `style[${STYLE_HASH_ATTRIBUTE14}]`
6328 6790 )) {
6329 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
6791 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
6330 6792 return true;
6331 6793 }
6332 6794 }
6333 6795 return false;
6334 6796 }
6335 - function injectStyle13(targetDocument, hash, css) {
6797 + function injectStyle14(targetDocument, hash, css) {
6336 6798 if (!targetDocument.head) {
6337 6799 return;
6338 6800 }
6339 - const runtime = getRuntime13();
6801 + const runtime = getRuntime14();
6340 6802 let injectedStyles = runtime.injectedStyles.get(targetDocument);
6341 6803 if (!injectedStyles) {
6342 6804 injectedStyles = /* @__PURE__ */ new Set();
6343 6805 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -6344,26 +6806,26 @@
6344 6806 }
6345 6807 if (injectedStyles.has(hash)) {
6346 6808 return;
6347 6809 }
6348 - if (documentContainsStyleHash13(targetDocument, hash)) {
6810 + if (documentContainsStyleHash14(targetDocument, hash)) {
6349 6811 injectedStyles.add(hash);
6350 6812 return;
6351 6813 }
6352 6814 const style = targetDocument.createElement("style");
6353 - style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
6815 + style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
6354 6816 style.appendChild(targetDocument.createTextNode(css));
6355 6817 targetDocument.head.appendChild(style);
6356 6818 injectedStyles.add(hash);
6357 6819 }
6358 - function registerDocument13(targetDocument) {
6359 - const runtime = getRuntime13();
6820 + function registerDocument14(targetDocument) {
6821 + const runtime = getRuntime14();
6360 6822 runtime.documents.set(
6361 6823 targetDocument,
6362 6824 (runtime.documents.get(targetDocument) ?? 0) + 1
6363 6825 );
6364 6826 for (const [hash, css] of runtime.styles) {
6365 - injectStyle13(targetDocument, hash, css);
6827 + injectStyle14(targetDocument, hash, css);
6366 6828 }
6367 6829 return () => {
6368 6830 const count = runtime.documents.get(targetDocument);
6369 6831 if (count === void 0) {
@@ -6375,72 +6837,54 @@
6375 6837 }
6376 6838 runtime.documents.set(targetDocument, count - 1);
6377 6839 };
6378 6840 }
6379 - function registerStyle13(hash, css) {
6380 - const runtime = getRuntime13();
6841 + function registerStyle14(hash, css) {
6842 + const runtime = getRuntime14();
6381 6843 runtime.styles.set(hash, css);
6382 6844 for (const targetDocument of runtime.documents.keys()) {
6383 - injectStyle13(targetDocument, hash, css);
6845 + injectStyle14(targetDocument, hash, css);
6384 6846 }
6385 6847 }
6386 6848 if (typeof process === "undefined" || true) {
6387 - registerStyle13("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
6849 + registerStyle14("0c752c3d08", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.a9211a7e6af24bed__root input[type=date]:not([data-filled]):not(:focus),.a9211a7e6af24bed__root input[type=datetime-local]:not([data-filled]):not(:focus),.a9211a7e6af24bed__root input[type=time]:not([data-filled]):not(:focus){--_gcd-input-color:transparent;--_gcd-input-color-disabled:transparent;color:transparent;&:disabled::-webkit-datetime-edit-text{color:transparent}}}}}");
6388 6850 }
6389 - var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
6390 - if (typeof process === "undefined" || true) {
6391 - registerStyle13("96553466c8", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._64de9947bf305b7a__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
6392 - }
6393 - var focus_module_default2 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-within-visible": "_64de9947bf305b7a__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
6394 - if (typeof process === "undefined" || true) {
6395 - registerStyle13("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
6396 - }
6397 - var style_default9 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
6398 - if (typeof process === "undefined" || true) {
6399 - registerStyle13("af6d9984a6", "._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");
6400 - }
6401 - var global_css_defense_default5 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
6402 - var Link = (0, import_element19.forwardRef)(function Link2({
6403 - children,
6404 - variant = "default",
6405 - tone = "brand",
6406 - openInNewTab = false,
6407 - render,
6408 - className,
6409 - ...props
6410 - }, ref) {
6411 - const element = useRender({
6412 - render,
6413 - defaultTagName: "a",
6414 - ref,
6415 - props: mergeProps(props, {
6416 - className: clsx_default(
6417 - global_css_defense_default5.a,
6418 - resets_default3["box-sizing"],
6419 - focus_module_default2["outset-ring--focus-except-active"],
6420 - variant !== "unstyled" && style_default9.link,
6421 - variant !== "unstyled" && style_default9[`is-${tone}`],
6422 - variant === "unstyled" && style_default9["is-unstyled"],
6423 - className
6424 - ),
6425 - target: openInNewTab ? "_blank" : void 0,
6426 - children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
6427 - children,
6428 - openInNewTab && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6429 - "span",
6430 - {
6431 - className: style_default9["link-icon"],
6432 - role: "img",
6433 - "aria-label": (
6434 - /* translators: accessibility text appended to link text */
6435 - (0, import_i18n6.__)("(opens in a new tab)")
6436 - )
6437 - }
6438 - )
6439 - ] })
6440 - })
6441 - });
6442 - return element;
6851 + var style_default9 = { "root": "a9211a7e6af24bed__root" };
6852 + var InputControl = (0, import_element19.forwardRef)(
6853 + function InputControl2({
6854 + className,
6855 + label,
6856 + description,
6857 + details,
6858 + hideLabelFromVision,
6859 + ...restProps
6860 + }, ref) {
6861 + return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(field_exports.Root, { className: clsx_default(style_default9.root, className), children: [
6862 + /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(field_exports.Label, { hideFromVision: hideLabelFromVision, children: label }),
6863 + /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Input3, { ref, ...restProps }),
6864 + description && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(field_exports.Description, { children: description }),
6865 + details && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(field_exports.Details, { children: details })
6866 + ] });
6867 + }
6868 + );
6869 +
6870 + // packages/ui/build-module/form/with-validation/validated-input-control/validated-input-control.mjs
6871 + var import_element20 = __toESM(require_element(), 1);
6872 + var import_compose2 = __toESM(require_compose(), 1);
6873 + var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
6874 + var ValidatedInputControl = (0, import_element20.forwardRef)(function ValidatedInputControl2({ required, markWhenOptional, customValidity, ...restProps }, forwardedRef) {
6875 + const validityTargetRef = (0, import_element20.useRef)(null);
6876 + const mergedRefs = (0, import_compose2.useMergeRefs)([forwardedRef, validityTargetRef]);
6877 + return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6878 + ControlWithError,
6879 + {
6880 + required,
6881 + markWhenOptional,
6882 + customValidity,
6883 + getValidityTarget: () => validityTargetRef.current,
6884 + children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(InputControl, { ref: mergedRefs, ...restProps })
6885 + }
6886 + );
6443 6887 });
6444 6888
6445 6889 // packages/ui/build-module/tabs/index.mjs
6446 6890 var tabs_exports = {};
@@ -6451,13 +6895,13 @@
6451 6895 Tab: () => Tab
6452 6896 });
6453 6897
6454 6898 // packages/ui/build-module/tabs/list.mjs
6455 - var import_element20 = __toESM(require_element(), 1);
6456 - var import_compose2 = __toESM(require_compose(), 1);
6899 + var import_element21 = __toESM(require_element(), 1);
6900 + var import_compose3 = __toESM(require_compose(), 1);
6457 6901 var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
6458 - var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
6459 - function getRuntime14() {
6902 + var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
6903 + function getRuntime15() {
6460 6904 const globalScope = globalThis;
6461 6905 if (globalScope.__wpStyleRuntime) {
6462 6906 return globalScope.__wpStyleRuntime;
6463 6907 }
@@ -6466,30 +6910,30 @@
6466 6910 styles: /* @__PURE__ */ new Map(),
6467 6911 injectedStyles: /* @__PURE__ */ new WeakMap()
6468 6912 };
6469 6913 if (typeof document !== "undefined") {
6470 - registerDocument14(document);
6914 + registerDocument15(document);
6471 6915 }
6472 6916 return globalScope.__wpStyleRuntime;
6473 6917 }
6474 - function documentContainsStyleHash14(targetDocument, hash) {
6918 + function documentContainsStyleHash15(targetDocument, hash) {
6475 6919 if (!targetDocument.head) {
6476 6920 return false;
6477 6921 }
6478 6922 for (const style of targetDocument.head.querySelectorAll(
6479 - `style[${STYLE_HASH_ATTRIBUTE14}]`
6923 + `style[${STYLE_HASH_ATTRIBUTE15}]`
6480 6924 )) {
6481 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
6925 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
6482 6926 return true;
6483 6927 }
6484 6928 }
6485 6929 return false;
6486 6930 }
6487 - function injectStyle14(targetDocument, hash, css) {
6931 + function injectStyle15(targetDocument, hash, css) {
6488 6932 if (!targetDocument.head) {
6489 6933 return;
6490 6934 }
6491 - const runtime = getRuntime14();
6935 + const runtime = getRuntime15();
6492 6936 let injectedStyles = runtime.injectedStyles.get(targetDocument);
6493 6937 if (!injectedStyles) {
6494 6938 injectedStyles = /* @__PURE__ */ new Set();
6495 6939 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -6496,26 +6940,26 @@
6496 6940 }
6497 6941 if (injectedStyles.has(hash)) {
6498 6942 return;
6499 6943 }
6500 - if (documentContainsStyleHash14(targetDocument, hash)) {
6944 + if (documentContainsStyleHash15(targetDocument, hash)) {
6501 6945 injectedStyles.add(hash);
6502 6946 return;
6503 6947 }
6504 6948 const style = targetDocument.createElement("style");
6505 - style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
6949 + style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
6506 6950 style.appendChild(targetDocument.createTextNode(css));
6507 6951 targetDocument.head.appendChild(style);
6508 6952 injectedStyles.add(hash);
6509 6953 }
6510 - function registerDocument14(targetDocument) {
6511 - const runtime = getRuntime14();
6954 + function registerDocument15(targetDocument) {
6955 + const runtime = getRuntime15();
6512 6956 runtime.documents.set(
6513 6957 targetDocument,
6514 6958 (runtime.documents.get(targetDocument) ?? 0) + 1
6515 6959 );
6516 6960 for (const [hash, css] of runtime.styles) {
6517 - injectStyle14(targetDocument, hash, css);
6961 + injectStyle15(targetDocument, hash, css);
6518 6962 }
6519 6963 return () => {
6520 6964 const count = runtime.documents.get(targetDocument);
6521 6965 if (count === void 0) {
@@ -6527,21 +6971,21 @@
6527 6971 }
6528 6972 runtime.documents.set(targetDocument, count - 1);
6529 6973 };
6530 6974 }
6531 - function registerStyle14(hash, css) {
6532 - const runtime = getRuntime14();
6975 + function registerStyle15(hash, css) {
6976 + const runtime = getRuntime15();
6533 6977 runtime.styles.set(hash, css);
6534 6978 for (const targetDocument of runtime.documents.keys()) {
6535 - injectStyle14(targetDocument, hash, css);
6979 + injectStyle15(targetDocument, hash, css);
6536 6980 }
6537 6981 }
6538 6982 if (typeof process === "undefined" || true) {
6539 - registerStyle14("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
6983 + registerStyle15("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
6540 6984 }
6541 6985 var style_default10 = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron" };
6542 6986 var SCROLL_EPSILON = 1;
6543 - var List = (0, import_element20.forwardRef)(
6987 + var List = (0, import_element21.forwardRef)(
6544 6988 function TabList({
6545 6989 children,
6546 6990 variant = "default",
6547 6991 className,
@@ -6547,15 +6991,15 @@
6547 6991 className,
6548 6992 activateOnFocus,
6549 6993 ...otherProps
6550 6994 }, forwardedRef) {
6551 - const [listEl, setListEl] = (0, import_element20.useState)(null);
6552 - const [overflow, setOverflow] = (0, import_element20.useState)({
6995 + const [listEl, setListEl] = (0, import_element21.useState)(null);
6996 + const [overflow, setOverflow] = (0, import_element21.useState)({
6553 6997 first: false,
6554 6998 last: false,
6555 6999 isScrolling: false
6556 7000 });
6557 - (0, import_element20.useEffect)(() => {
7001 + (0, import_element21.useEffect)(() => {
6558 7002 if (!listEl) {
6559 7003 return;
6560 7004 }
6561 7005 const measureOverflow = () => {
@@ -6613,9 +7057,9 @@
6613 7057 resizeObserver.disconnect();
6614 7058 mutationObserver.disconnect();
6615 7059 };
6616 7060 }, [listEl]);
6617 - const mergedListRef = (0, import_compose2.useMergeRefs)([
7061 + const mergedListRef = (0, import_compose3.useMergeRefs)([
6618 7062 forwardedRef,
6619 7063 (el) => setListEl(el)
6620 7064 ]);
6621 7065 return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
@@ -6642,18 +7086,18 @@
6642 7086 }
6643 7087 );
6644 7088
6645 7089 // packages/ui/build-module/tabs/panel.mjs
6646 - var import_element22 = __toESM(require_element(), 1);
7090 + var import_element23 = __toESM(require_element(), 1);
6647 7091
6648 7092 // packages/ui/build-module/tabs/context.mjs
6649 - var import_element21 = __toESM(require_element(), 1);
7093 + var import_element22 = __toESM(require_element(), 1);
6650 7094 var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
6651 7095 var VALIDATION_ENABLED = true;
6652 - var TabsValidationContext = VALIDATION_ENABLED ? (0, import_element21.createContext)(null) : null;
7096 + var TabsValidationContext = VALIDATION_ENABLED ? (0, import_element22.createContext)(null) : null;
6653 7097 function useRegisterTabDev() {
6654 - const context = (0, import_element21.useContext)(TabsValidationContext);
6655 - (0, import_element21.useEffect)(() => {
7098 + const context = (0, import_element22.useContext)(TabsValidationContext);
7099 + (0, import_element22.useEffect)(() => {
6656 7100 if (context) {
6657 7101 return context.registerTab();
6658 7102 }
6659 7103 return void 0;
@@ -6662,10 +7106,10 @@
6662 7106 function useRegisterTabProd() {
6663 7107 }
6664 7108 var useRegisterTab = VALIDATION_ENABLED ? useRegisterTabDev : useRegisterTabProd;
6665 7109 function useRegisterPanelDev() {
6666 - const context = (0, import_element21.useContext)(TabsValidationContext);
6667 - (0, import_element21.useEffect)(() => {
7110 + const context = (0, import_element22.useContext)(TabsValidationContext);
7111 + (0, import_element22.useEffect)(() => {
6668 7112 if (context) {
6669 7113 return context.registerPanel();
6670 7114 }
6671 7115 return void 0;
@@ -6676,10 +7120,10 @@
6676 7120 var useRegisterPanel = VALIDATION_ENABLED ? useRegisterPanelDev : useRegisterPanelProd;
6677 7121 function TabsValidationProviderDev({
6678 7122 children
6679 7123 }) {
6680 - const tabCountRef = (0, import_element21.useRef)(0);
6681 - const panelCountRef = (0, import_element21.useRef)(0);
7124 + const tabCountRef = (0, import_element22.useRef)(0);
7125 + const panelCountRef = (0, import_element22.useRef)(0);
6682 7126 const scheduleValidation = useScheduleValidation(() => {
6683 7127 const tabCount = tabCountRef.current;
6684 7128 const panelCount = panelCountRef.current;
6685 7129 if (tabCount !== panelCount) {
@@ -6687,9 +7131,9 @@
6687 7131 `Tabs: Tab/Panel count mismatch (${tabCount} Tabs, ${panelCount} Panels). Each Tab must be associated with exactly one Panel. Mismatched or missing associations can break screen reader navigation and violate WAI-ARIA Tabs pattern requirements.`
6688 7132 );
6689 7133 }
6690 7134 });
6691 - const registerTab = (0, import_element21.useCallback)(() => {
7135 + const registerTab = (0, import_element22.useCallback)(() => {
6692 7136 tabCountRef.current += 1;
6693 7137 scheduleValidation();
6694 7138 return () => {
6695 7139 tabCountRef.current -= 1;
@@ -6695,9 +7139,9 @@
6695 7139 tabCountRef.current -= 1;
6696 7140 scheduleValidation();
6697 7141 };
6698 7142 }, [scheduleValidation]);
6699 - const registerPanel = (0, import_element21.useCallback)(() => {
7143 + const registerPanel = (0, import_element22.useCallback)(() => {
6700 7144 panelCountRef.current += 1;
6701 7145 scheduleValidation();
6702 7146 return () => {
6703 7147 panelCountRef.current -= 1;
@@ -6703,9 +7147,9 @@
6703 7147 panelCountRef.current -= 1;
6704 7148 scheduleValidation();
6705 7149 };
6706 7150 }, [scheduleValidation]);
6707 - const contextValue = (0, import_element21.useMemo)(
7151 + const contextValue = (0, import_element22.useMemo)(
6708 7152 () => ({
6709 7153 registerTab,
6710 7154 registerPanel
6711 7155 }),
@@ -6721,10 +7165,10 @@
6721 7165 var TabsValidationProvider = VALIDATION_ENABLED ? TabsValidationProviderDev : TabsValidationProviderProd;
6722 7166
6723 7167 // packages/ui/build-module/tabs/panel.mjs
6724 7168 var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
6725 - var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
6726 - function getRuntime15() {
7169 + var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
7170 + function getRuntime16() {
6727 7171 const globalScope = globalThis;
6728 7172 if (globalScope.__wpStyleRuntime) {
6729 7173 return globalScope.__wpStyleRuntime;
6730 7174 }
@@ -6733,30 +7177,30 @@
6733 7177 styles: /* @__PURE__ */ new Map(),
6734 7178 injectedStyles: /* @__PURE__ */ new WeakMap()
6735 7179 };
6736 7180 if (typeof document !== "undefined") {
6737 - registerDocument15(document);
7181 + registerDocument16(document);
6738 7182 }
6739 7183 return globalScope.__wpStyleRuntime;
6740 7184 }
6741 - function documentContainsStyleHash15(targetDocument, hash) {
7185 + function documentContainsStyleHash16(targetDocument, hash) {
6742 7186 if (!targetDocument.head) {
6743 7187 return false;
6744 7188 }
6745 7189 for (const style of targetDocument.head.querySelectorAll(
6746 - `style[${STYLE_HASH_ATTRIBUTE15}]`
7190 + `style[${STYLE_HASH_ATTRIBUTE16}]`
6747 7191 )) {
6748 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
7192 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
6749 7193 return true;
6750 7194 }
6751 7195 }
6752 7196 return false;
6753 7197 }
6754 - function injectStyle15(targetDocument, hash, css) {
7198 + function injectStyle16(targetDocument, hash, css) {
6755 7199 if (!targetDocument.head) {
6756 7200 return;
6757 7201 }
6758 - const runtime = getRuntime15();
7202 + const runtime = getRuntime16();
6759 7203 let injectedStyles = runtime.injectedStyles.get(targetDocument);
6760 7204 if (!injectedStyles) {
6761 7205 injectedStyles = /* @__PURE__ */ new Set();
6762 7206 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -6763,26 +7207,26 @@
6763 7207 }
6764 7208 if (injectedStyles.has(hash)) {
6765 7209 return;
6766 7210 }
6767 - if (documentContainsStyleHash15(targetDocument, hash)) {
7211 + if (documentContainsStyleHash16(targetDocument, hash)) {
6768 7212 injectedStyles.add(hash);
6769 7213 return;
6770 7214 }
6771 7215 const style = targetDocument.createElement("style");
6772 - style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
7216 + style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
6773 7217 style.appendChild(targetDocument.createTextNode(css));
6774 7218 targetDocument.head.appendChild(style);
6775 7219 injectedStyles.add(hash);
6776 7220 }
6777 - function registerDocument15(targetDocument) {
6778 - const runtime = getRuntime15();
7221 + function registerDocument16(targetDocument) {
7222 + const runtime = getRuntime16();
6779 7223 runtime.documents.set(
6780 7224 targetDocument,
6781 7225 (runtime.documents.get(targetDocument) ?? 0) + 1
6782 7226 );
6783 7227 for (const [hash, css] of runtime.styles) {
6784 - injectStyle15(targetDocument, hash, css);
7228 + injectStyle16(targetDocument, hash, css);
6785 7229 }
6786 7230 return () => {
6787 7231 const count = runtime.documents.get(targetDocument);
6788 7232 if (count === void 0) {
@@ -6794,24 +7238,24 @@
6794 7238 }
6795 7239 runtime.documents.set(targetDocument, count - 1);
6796 7240 };
6797 7241 }
6798 - function registerStyle15(hash, css) {
6799 - const runtime = getRuntime15();
7242 + function registerStyle16(hash, css) {
7243 + const runtime = getRuntime16();
6800 7244 runtime.styles.set(hash, css);
6801 7245 for (const targetDocument of runtime.documents.keys()) {
6802 - injectStyle15(targetDocument, hash, css);
7246 + injectStyle16(targetDocument, hash, css);
6803 7247 }
6804 7248 }
6805 7249 if (typeof process === "undefined" || true) {
6806 - registerStyle15("af6d9984a6", "._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");
7250 + registerStyle16("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
6807 7251 }
6808 - var global_css_defense_default6 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
7252 + var global_css_defense_default6 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
6809 7253 if (typeof process === "undefined" || true) {
6810 - registerStyle15("96553466c8", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._64de9947bf305b7a__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
7254 + registerStyle16("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
6811 7255 }
6812 - var focus_module_default3 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-within-visible": "_64de9947bf305b7a__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
6813 - var Panel = (0, import_element22.forwardRef)(
7256 + var focus_module_default3 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
7257 + var Panel = (0, import_element23.forwardRef)(
6814 7258 function TabPanel({ className, ...otherProps }, forwardedRef) {
6815 7259 useRegisterPanel();
6816 7260 return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
6817 7261 index_parts_exports2.Panel,
@@ -6828,11 +7272,11 @@
6828 7272 }
6829 7273 );
6830 7274
6831 7275 // packages/ui/build-module/tabs/root.mjs
6832 - var import_element23 = __toESM(require_element(), 1);
7276 + var import_element24 = __toESM(require_element(), 1);
6833 7277 var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
6834 - var Root3 = (0, import_element23.forwardRef)(
7278 + var Root3 = (0, import_element24.forwardRef)(
6835 7279 function TabsRoot3({ ...otherProps }, forwardedRef) {
6836 7280 return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TabsValidationProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(index_parts_exports2.Root, { ref: forwardedRef, ...otherProps }) }) });
6837 7281 }
6838 7282 );
@@ -6837,12 +7281,12 @@
6837 7281 }
6838 7282 );
6839 7283
6840 7284 // packages/ui/build-module/tabs/tab.mjs
6841 - var import_element24 = __toESM(require_element(), 1);
7285 + var import_element25 = __toESM(require_element(), 1);
6842 7286 var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
6843 - var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
6844 - function getRuntime16() {
7287 + var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
7288 + function getRuntime17() {
6845 7289 const globalScope = globalThis;
6846 7290 if (globalScope.__wpStyleRuntime) {
6847 7291 return globalScope.__wpStyleRuntime;
6848 7292 }
@@ -6851,30 +7295,30 @@
6851 7295 styles: /* @__PURE__ */ new Map(),
6852 7296 injectedStyles: /* @__PURE__ */ new WeakMap()
6853 7297 };
6854 7298 if (typeof document !== "undefined") {
6855 - registerDocument16(document);
7299 + registerDocument17(document);
6856 7300 }
6857 7301 return globalScope.__wpStyleRuntime;
6858 7302 }
6859 - function documentContainsStyleHash16(targetDocument, hash) {
7303 + function documentContainsStyleHash17(targetDocument, hash) {
6860 7304 if (!targetDocument.head) {
6861 7305 return false;
6862 7306 }
6863 7307 for (const style of targetDocument.head.querySelectorAll(
6864 - `style[${STYLE_HASH_ATTRIBUTE16}]`
7308 + `style[${STYLE_HASH_ATTRIBUTE17}]`
6865 7309 )) {
6866 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
7310 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
6867 7311 return true;
6868 7312 }
6869 7313 }
6870 7314 return false;
6871 7315 }
6872 - function injectStyle16(targetDocument, hash, css) {
7316 + function injectStyle17(targetDocument, hash, css) {
6873 7317 if (!targetDocument.head) {
6874 7318 return;
6875 7319 }
6876 - const runtime = getRuntime16();
7320 + const runtime = getRuntime17();
6877 7321 let injectedStyles = runtime.injectedStyles.get(targetDocument);
6878 7322 if (!injectedStyles) {
6879 7323 injectedStyles = /* @__PURE__ */ new Set();
6880 7324 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -6881,26 +7325,26 @@
6881 7325 }
6882 7326 if (injectedStyles.has(hash)) {
6883 7327 return;
6884 7328 }
6885 - if (documentContainsStyleHash16(targetDocument, hash)) {
7329 + if (documentContainsStyleHash17(targetDocument, hash)) {
6886 7330 injectedStyles.add(hash);
6887 7331 return;
6888 7332 }
6889 7333 const style = targetDocument.createElement("style");
6890 - style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
7334 + style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
6891 7335 style.appendChild(targetDocument.createTextNode(css));
6892 7336 targetDocument.head.appendChild(style);
6893 7337 injectedStyles.add(hash);
6894 7338 }
6895 - function registerDocument16(targetDocument) {
6896 - const runtime = getRuntime16();
7339 + function registerDocument17(targetDocument) {
7340 + const runtime = getRuntime17();
6897 7341 runtime.documents.set(
6898 7342 targetDocument,
6899 7343 (runtime.documents.get(targetDocument) ?? 0) + 1
6900 7344 );
6901 7345 for (const [hash, css] of runtime.styles) {
6902 - injectStyle16(targetDocument, hash, css);
7346 + injectStyle17(targetDocument, hash, css);
6903 7347 }
6904 7348 return () => {
6905 7349 const count = runtime.documents.get(targetDocument);
6906 7350 if (count === void 0) {
@@ -6912,20 +7356,20 @@
6912 7356 }
6913 7357 runtime.documents.set(targetDocument, count - 1);
6914 7358 };
6915 7359 }
6916 - function registerStyle16(hash, css) {
6917 - const runtime = getRuntime16();
7360 + function registerStyle17(hash, css) {
7361 + const runtime = getRuntime17();
6918 7362 runtime.styles.set(hash, css);
6919 7363 for (const targetDocument of runtime.documents.keys()) {
6920 - injectStyle16(targetDocument, hash, css);
7364 + injectStyle17(targetDocument, hash, css);
6921 7365 }
6922 7366 }
6923 7367 if (typeof process === "undefined" || true) {
6924 - registerStyle16("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
7368 + registerStyle17("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
6925 7369 }
6926 7370 var style_default11 = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron" };
6927 - var Tab = (0, import_element24.forwardRef)(function Tab2({ className, children, ...otherProps }, forwardedRef) {
7371 + var Tab = (0, import_element25.forwardRef)(function Tab2({ className, children, ...otherProps }, forwardedRef) {
6928 7372 useRegisterTab();
6929 7373 return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
6930 7374 index_parts_exports2.Tab,
6931 7375 {
@@ -6941,9 +7385,9 @@
6941 7385 });
6942 7386
6943 7387 // packages/format-library/build-module/image/index.mjs
6944 7388 var import_i18n7 = __toESM(require_i18n(), 1);
6945 - var import_element25 = __toESM(require_element(), 1);
7389 + var import_element26 = __toESM(require_element(), 1);
6946 7390 var import_rich_text3 = __toESM(require_rich_text(), 1);
6947 7391 var import_block_editor3 = __toESM(require_block_editor(), 1);
6948 7392 var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
6949 7393 var ALLOWED_MEDIA_TYPES = ["image"];
@@ -6970,15 +7414,22 @@
6970 7414 alt: "alt"
6971 7415 },
6972 7416 edit: Edit
6973 7417 };
6974 - function InlineUI({ value, onChange, activeObjectAttributes, contentRef }) {
6975 - const { style, alt } = activeObjectAttributes;
7418 + function InlineUI({
7419 + value,
7420 + onChange,
7421 + activeObjectAttributes,
7422 + contentRef
7423 + }) {
7424 + const style = activeObjectAttributes?.style;
7425 + const alt = activeObjectAttributes?.alt;
6976 7426 const width = style?.replace(/\D/g, "");
6977 - const [editedWidth, setEditedWidth] = (0, import_element25.useState)(width);
6978 - const [editedAlt, setEditedAlt] = (0, import_element25.useState)(alt);
7427 + const [editedWidth, setEditedWidth] = (0, import_element26.useState)(width);
7428 + const [editedAlt, setEditedAlt] = (0, import_element26.useState)(alt);
6979 7429 const hasChanged = editedWidth !== width || editedAlt !== alt;
6980 7430 const popoverAnchor = (0, import_rich_text3.useAnchor)({
7431 + // eslint-disable-next-line react-hooks/refs
6981 7432 editableContentElement: contentRef.current,
6982 7433 settings: image
6983 7434 });
6984 7435 return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
@@ -6997,9 +7448,9 @@
6997 7448 type: name3,
6998 7449 attributes: {
6999 7450 ...activeObjectAttributes,
7000 7451 style: editedWidth ? `width: ${editedWidth}px;` : "",
7001 - alt: editedAlt
7452 + alt: editedAlt ?? ""
7002 7453 }
7003 7454 };
7004 7455 onChange({
7005 7456 ...value,
@@ -7022,9 +7473,9 @@
7022 7473 /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7023 7474 import_components.TextareaControl,
7024 7475 {
7025 7476 label: (0, import_i18n7.__)("Alternative text"),
7026 - value: editedAlt,
7477 + value: editedAlt ?? "",
7027 7478 onChange: (newAlt) => {
7028 7479 setEditedAlt(newAlt);
7029 7480 },
7030 7481 help: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
@@ -7078,9 +7529,14 @@
7078 7529 import_block_editor3.MediaUpload,
7079 7530 {
7080 7531 allowedTypes: ALLOWED_MEDIA_TYPES,
7081 7532 value: getCurrentImageId(activeObjectAttributes),
7082 - onSelect: ({ id, url, alt, width: imgWidth }) => {
7533 + onSelect: ({
7534 + id,
7535 + url,
7536 + alt,
7537 + width: imgWidth
7538 + }) => {
7083 7539 onChange(
7084 7540 (0, import_rich_text3.insertObject)(value, {
7085 7541 type: name3,
7086 7542 attributes: {
@@ -7130,14 +7586,20 @@
7130 7586 name: name4,
7131 7587 title: title4,
7132 7588 tagName: "em",
7133 7589 className: null,
7134 - edit({ isActive, value, onChange, onFocus, isVisible = true }) {
7590 + edit({
7591 + isActive,
7592 + value,
7593 + onChange,
7594 + onFocus,
7595 + isVisible = true
7596 + }) {
7135 7597 function onToggle() {
7136 7598 onChange((0, import_rich_text4.toggleFormat)(value, { type: name4, title: title4 }));
7137 7599 }
7138 7600 function onClick() {
7139 - onChange((0, import_rich_text4.toggleFormat)(value, { type: name4 }));
7601 + onChange((0, import_rich_text4.toggleFormat)(value, { type: name4, title: title4 }));
7140 7602 onFocus();
7141 7603 }
7142 7604 return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
7143 7605 /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
@@ -7172,9 +7634,9 @@
7172 7634 };
7173 7635
7174 7636 // packages/format-library/build-module/link/index.mjs
7175 7637 var import_i18n11 = __toESM(require_i18n(), 1);
7176 - var import_element28 = __toESM(require_element(), 1);
7638 + var import_element29 = __toESM(require_element(), 1);
7177 7639 var import_rich_text6 = __toESM(require_rich_text(), 1);
7178 7640 var import_url3 = __toESM(require_url(), 1);
7179 7641 var import_block_editor6 = __toESM(require_block_editor(), 1);
7180 7642 var import_html_entities = __toESM(require_html_entities(), 1);
@@ -7180,9 +7642,9 @@
7180 7642 var import_html_entities = __toESM(require_html_entities(), 1);
7181 7643 var import_a11y2 = __toESM(require_a11y(), 1);
7182 7644
7183 7645 // packages/format-library/build-module/link/inline.mjs
7184 - var import_element27 = __toESM(require_element(), 1);
7646 + var import_element28 = __toESM(require_element(), 1);
7185 7647 var import_i18n10 = __toESM(require_i18n(), 1);
7186 7648 var import_a11y = __toESM(require_a11y(), 1);
7187 7649 var import_components3 = __toESM(require_components(), 1);
7188 7650 var import_url2 = __toESM(require_url(), 1);
@@ -7201,9 +7663,9 @@
7201 7663 return false;
7202 7664 }
7203 7665 if (/^\S+:/.test(trimmedHref)) {
7204 7666 const protocol = (0, import_url.getProtocol)(trimmedHref);
7205 - if (!(0, import_url.isValidProtocol)(protocol)) {
7667 + if (!protocol || !(0, import_url.isValidProtocol)(protocol)) {
7206 7668 return false;
7207 7669 }
7208 7670 if (protocol.startsWith("http") && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) {
7209 7671 return false;
@@ -7208,9 +7670,9 @@
7208 7670 if (protocol.startsWith("http") && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) {
7209 7671 return false;
7210 7672 }
7211 7673 const authority = (0, import_url.getAuthority)(trimmedHref);
7212 - if (!(0, import_url.isValidAuthority)(authority)) {
7674 + if (!authority || !(0, import_url.isValidAuthority)(authority)) {
7213 7675 return false;
7214 7676 }
7215 7677 const path = (0, import_url.getPath)(trimmedHref);
7216 7678 if (path && !(0, import_url.isValidPath)(path)) {
@@ -7295,12 +7757,11 @@
7295 7757 initialIndex = endIndex - 1;
7296 7758 } else {
7297 7759 return EMPTY_BOUNDARIES;
7298 7760 }
7299 - const index = newFormats[initialIndex].indexOf(targetFormat);
7300 - const walkingArgs = [newFormats, initialIndex, targetFormat, index];
7301 - startIndex = walkToStart(...walkingArgs);
7302 - endIndex = walkToEnd(...walkingArgs);
7761 + const index2 = newFormats[initialIndex].indexOf(targetFormat);
7762 + startIndex = walkToStart(newFormats, initialIndex, targetFormat, index2);
7763 + endIndex = walkToEnd(newFormats, initialIndex, targetFormat, index2);
7303 7764 startIndex = startIndex < 0 ? 0 : startIndex;
7304 7765 return {
7305 7766 start: startIndex,
7306 7767 end: endIndex + 1
@@ -7306,9 +7767,9 @@
7306 7767 end: endIndex + 1
7307 7768 };
7308 7769 }
7309 7770 function walkToBoundary(formats, initialIndex, targetFormatRef, formatIndex, direction) {
7310 - let index = initialIndex;
7771 + let index2 = initialIndex;
7311 7772 const directions = {
7312 7773 forwards: 1,
7313 7774 backwards: -1
7314 7775 };
@@ -7313,28 +7774,31 @@
7313 7774 backwards: -1
7314 7775 };
7315 7776 const directionIncrement = directions[direction] || 1;
7316 7777 const inverseDirectionIncrement = directionIncrement * -1;
7317 - while (formats[index] && formats[index][formatIndex] === targetFormatRef) {
7318 - index = index + directionIncrement;
7778 + while (formats[index2] && formats[index2][formatIndex] === targetFormatRef) {
7779 + index2 = index2 + directionIncrement;
7319 7780 }
7320 - index = index + inverseDirectionIncrement;
7321 - return index;
7781 + index2 = index2 + inverseDirectionIncrement;
7782 + return index2;
7322 7783 }
7323 - var partialRight = (fn, ...partialArgs) => (...args) => fn(...args, ...partialArgs);
7324 - var walkToStart = partialRight(walkToBoundary, "backwards");
7325 - var walkToEnd = partialRight(walkToBoundary, "forwards");
7784 + var walkToStart = (...args) => walkToBoundary(...args, "backwards");
7785 + var walkToEnd = (...args) => walkToBoundary(...args, "forwards");
7326 7786
7327 7787 // packages/format-library/build-module/link/css-classes-setting.mjs
7328 - var import_element26 = __toESM(require_element(), 1);
7329 - var import_compose3 = __toESM(require_compose(), 1);
7788 + var import_element27 = __toESM(require_element(), 1);
7789 + var import_compose4 = __toESM(require_compose(), 1);
7330 7790 var import_i18n9 = __toESM(require_i18n(), 1);
7331 7791 var import_components2 = __toESM(require_components(), 1);
7332 7792 var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
7333 - var CSSClassesSettingComponent = ({ setting, value, onChange }) => {
7334 - const hasValue = value ? value?.cssClasses?.length > 0 : false;
7335 - const [isSettingActive, setIsSettingActive] = (0, import_element26.useState)(hasValue);
7336 - const instanceId = (0, import_compose3.useInstanceId)(CSSClassesSettingComponent);
7793 + var CSSClassesSettingComponent = ({
7794 + setting,
7795 + value,
7796 + onChange
7797 + }) => {
7798 + const hasValue = !!value?.cssClasses?.length;
7799 + const [isSettingActive, setIsSettingActive] = (0, import_element27.useState)(hasValue);
7800 + const instanceId = (0, import_compose4.useInstanceId)(CSSClassesSettingComponent);
7337 7801 const controlledRegionId = `css-classes-setting-${instanceId}`;
7338 7802 const handleSettingChange = (newValue) => {
7339 7803 const sanitizedValue = typeof newValue === "string" ? newValue.replace(/,/g, " ").replace(/\s+/g, " ").trim() : newValue;
7340 7804 onChange({
@@ -7392,18 +7856,16 @@
7392 7856 },
7393 7857 {
7394 7858 id: "cssClasses",
7395 7859 title: (0, import_i18n10.__)("Additional CSS class(es)"),
7396 - render: (setting, value, onChange) => {
7397 - return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7398 - css_classes_setting_default,
7399 - {
7400 - setting,
7401 - value,
7402 - onChange
7403 - }
7404 - );
7405 - }
7860 + render: (setting, value, onChange) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7861 + css_classes_setting_default,
7862 + {
7863 + setting,
7864 + value,
7865 + onChange
7866 + }
7867 + )
7406 7868 }
7407 7869 ];
7408 7870 function InlineLinkUI({
7409 7871 isActive,
@@ -7429,9 +7891,9 @@
7429 7891 };
7430 7892 },
7431 7893 []
7432 7894 );
7433 - const linkValue = (0, import_element27.useMemo)(
7895 + const linkValue = (0, import_element28.useMemo)(
7434 7896 () => ({
7435 7897 url: activeAttributes.url,
7436 7898 type: activeAttributes.type,
7437 7899 id: activeAttributes.id,
@@ -7462,9 +7924,9 @@
7462 7924 nextValue = {
7463 7925 ...linkValue,
7464 7926 ...nextValue
7465 7927 };
7466 - const newUrl = (0, import_url2.prependHTTPS)(nextValue.url);
7928 + const newUrl = (0, import_url2.prependHTTPS)(nextValue?.url ?? "");
7467 7929 const linkFormat = createLinkFormat({
7468 7930 url: newUrl,
7469 7931 type: nextValue.type,
7470 7932 id: nextValue.id !== void 0 && nextValue.id !== null ? String(nextValue.id) : void 0,
@@ -7505,13 +7967,13 @@
7505 7967 newValue = (0, import_rich_text5.applyFormat)(newValue, linkFormat, 0, newText.length);
7506 7968 const boundary = getFormatBoundary(value, {
7507 7969 type: "core/link"
7508 7970 });
7509 - const [valBefore, valAfter] = (0, import_rich_text5.split)(
7510 - value,
7511 - boundary.start,
7512 - boundary.start
7513 - );
7971 + const splitValue = (0, import_rich_text5.split)(value, boundary.start, boundary.start);
7972 + if (!splitValue) {
7973 + return;
7974 + }
7975 + const [valBefore, valAfter] = splitValue;
7514 7976 const newValAfter = (0, import_rich_text5.replace)(valAfter, richTextText, newValue);
7515 7977 newValue = (0, import_rich_text5.concat)(valBefore, newValAfter);
7516 7978 }
7517 7979 onChange(newValue);
@@ -7530,14 +7992,13 @@
7530 7992 } else {
7531 7993 (0, import_a11y.speak)((0, import_i18n10.__)("Link inserted."), "assertive");
7532 7994 }
7533 7995 }
7996 + const anchorSettings = { ...link, isActive };
7534 7997 const popoverAnchor = (0, import_rich_text5.useAnchor)({
7998 + // eslint-disable-next-line react-hooks/refs
7535 7999 editableContentElement: contentRef.current,
7536 - settings: {
7537 - ...link,
7538 - isActive
7539 - }
8000 + settings: anchorSettings
7540 8001 });
7541 8002 async function handleCreate(pageTitle) {
7542 8003 const page = await createPageEntity({
7543 8004 title: pageTitle,
@@ -7551,9 +8012,9 @@
7551 8012 kind: "post-type"
7552 8013 };
7553 8014 }
7554 8015 function createButtonText(searchTerm) {
7555 - return (0, import_element27.createInterpolateElement)(
8016 + return (0, import_element28.createInterpolateElement)(
7556 8017 (0, import_i18n10.sprintf)(
7557 8018 /* translators: %s: search term. */
7558 8019 (0, import_i18n10.__)("Create page: <mark>%s</mark>"),
7559 8020 searchTerm
@@ -7605,10 +8066,10 @@
7605 8066 if (isActive) {
7606 8067 const boundary = getFormatBoundary(value, {
7607 8068 type: "core/link"
7608 8069 });
7609 - textStart = boundary.start;
7610 - textEnd = boundary.end;
8070 + textStart = boundary.start ?? value.start;
8071 + textEnd = boundary.end ?? value.end;
7611 8072 }
7612 8073 return (0, import_rich_text5.slice)(value, textStart, textEnd);
7613 8074 }
7614 8075 var inline_default = InlineLinkUI;
@@ -7625,22 +8086,24 @@
7625 8086 onFocus,
7626 8087 contentRef,
7627 8088 isVisible = true
7628 8089 }) {
7629 - const [addingLink, setAddingLink] = (0, import_element28.useState)(false);
7630 - const [openedBy, setOpenedBy] = (0, import_element28.useState)(null);
7631 - (0, import_element28.useEffect)(() => {
8090 + const [addingLink, setAddingLink] = (0, import_element29.useState)(false);
8091 + const [openedBy, setOpenedBy] = (0, import_element29.useState)(null);
8092 + (0, import_element29.useEffect)(() => {
7632 8093 if (!isActive) {
7633 8094 setAddingLink(false);
7634 8095 }
7635 8096 }, [isActive]);
7636 - (0, import_element28.useLayoutEffect)(() => {
8097 + (0, import_element29.useLayoutEffect)(() => {
7637 8098 const editableContentElement = contentRef.current;
7638 8099 if (!editableContentElement) {
7639 8100 return;
7640 8101 }
7641 8102 function handleClick(event) {
7642 - const link2 = event.target.closest("[contenteditable] a");
8103 + const link2 = event.target.closest(
8104 + "[contenteditable] a"
8105 + );
7643 8106 if (!link2 || // other formats (e.g. bold) may be nested within the link.
7644 8107 !isActive) {
7645 8108 return;
7646 8109 }
@@ -7886,14 +8349,14 @@
7886 8349 };
7887 8350
7888 8351 // packages/format-library/build-module/text-color/index.mjs
7889 8352 var import_i18n15 = __toESM(require_i18n(), 1);
7890 - var import_element30 = __toESM(require_element(), 1);
8353 + var import_element31 = __toESM(require_element(), 1);
7891 8354 var import_block_editor10 = __toESM(require_block_editor(), 1);
7892 8355 var import_rich_text10 = __toESM(require_rich_text(), 1);
7893 8356
7894 8357 // packages/format-library/build-module/text-color/inline.mjs
7895 - var import_element29 = __toESM(require_element(), 1);
8358 + var import_element30 = __toESM(require_element(), 1);
7896 8359 var import_data2 = __toESM(require_data(), 1);
7897 8360 var import_rich_text9 = __toESM(require_rich_text(), 1);
7898 8361 var import_block_editor9 = __toESM(require_block_editor(), 1);
7899 8362 var import_components4 = __toESM(require_components(), 1);
@@ -7903,20 +8366,23 @@
7903 8366 { name: "color", title: (0, import_i18n14.__)("Text") },
7904 8367 { name: "backgroundColor", title: (0, import_i18n14.__)("Background") }
7905 8368 ];
7906 8369 function parseCSS(css = "") {
7907 - return css.split(";").reduce((accumulator, rule) => {
7908 - if (rule) {
7909 - const [property, value] = rule.split(":");
7910 - if (property === "color") {
7911 - accumulator.color = value;
8370 + return css.split(";").reduce(
8371 + (accumulator, rule) => {
8372 + if (rule) {
8373 + const [property, value] = rule.split(":");
8374 + if (property === "color") {
8375 + accumulator.color = value;
8376 + }
8377 + if (property === "background-color" && value !== transparentValue) {
8378 + accumulator.backgroundColor = value;
8379 + }
7912 8380 }
7913 - if (property === "background-color" && value !== transparentValue) {
7914 - accumulator.backgroundColor = value;
7915 - }
7916 - }
7917 - return accumulator;
7918 - }, {});
8381 + return accumulator;
8382 + },
8383 + {}
8384 + );
7919 8385 }
7920 8386 function parseClassName(className = "", colorSettings) {
7921 8387 return className.split(" ").reduce((accumulator, name16) => {
7922 8388 if (name16.startsWith("has-") && name16.endsWith("-color")) {
@@ -7935,10 +8401,10 @@
7935 8401 if (!activeColorFormat) {
7936 8402 return {};
7937 8403 }
7938 8404 return {
7939 - ...parseCSS(activeColorFormat.attributes.style),
7940 - ...parseClassName(activeColorFormat.attributes.class, colorSettings)
8405 + ...parseCSS(activeColorFormat.attributes?.style),
8406 + ...parseClassName(activeColorFormat.attributes?.class, colorSettings)
7941 8407 };
7942 8408 }
7943 8409 function setColors(value, name16, colorSettings, colors) {
7944 8410 const { color, backgroundColor } = {
@@ -7957,10 +8423,16 @@
7957 8423 styles.push(["background-color", transparentValue].join(":"));
7958 8424 }
7959 8425 if (color) {
7960 8426 const colorObject = (0, import_block_editor9.getColorObjectByColorValue)(colorSettings, color);
7961 - if (colorObject) {
7962 - classNames.push((0, import_block_editor9.getColorClassName)("color", colorObject.slug));
8427 + if (colorObject && colorObject.slug) {
8428 + const colorClassName = (0, import_block_editor9.getColorClassName)(
8429 + "color",
8430 + colorObject.slug
8431 + );
8432 + if (colorClassName) {
8433 + classNames.push(colorClassName);
8434 + }
7963 8435 } else {
7964 8436 styles.push(["color", color].join(":"));
7965 8437 }
7966 8438 }
@@ -7976,9 +8448,9 @@
7976 8448 const colors = (0, import_data2.useSelect)((select) => {
7977 8449 const { getSettings } = select(import_block_editor9.store);
7978 8450 return getSettings().colors ?? [];
7979 8451 }, []);
7980 - const activeColors = (0, import_element29.useMemo)(
8452 + const activeColors = (0, import_element30.useMemo)(
7981 8453 () => getActiveColors(value, name16, colors),
7982 8454 [name16, value, colors]
7983 8455 );
7984 8456 return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
@@ -8002,11 +8474,13 @@
8002 8474 onClose,
8003 8475 contentRef,
8004 8476 isActive
8005 8477 }) {
8478 + const anchorSettings = { ...textColor, isActive };
8006 8479 const popoverAnchor = (0, import_rich_text9.useAnchor)({
8480 + // eslint-disable-next-line react-hooks/refs
8007 8481 editableContentElement: contentRef.current,
8008 - settings: { ...textColor, isActive }
8482 + settings: anchorSettings
8009 8483 });
8010 8484 return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
8011 8485 import_components4.Popover,
8012 8486 {
@@ -8041,14 +8515,14 @@
8041 8515 var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
8042 8516 var transparentValue = "rgba(0, 0, 0, 0)";
8043 8517 var name8 = "core/text-color";
8044 8518 var title8 = (0, import_i18n15.__)("Highlight");
8045 - var EMPTY_ARRAY3 = [];
8519 + var EMPTY_ARRAY2 = [];
8046 8520 function getComputedStyleProperty(element, property) {
8047 8521 const { ownerDocument: ownerDocument2 } = element;
8048 8522 const { defaultView } = ownerDocument2;
8049 - const style = defaultView.getComputedStyle(element);
8050 - const value = style.getPropertyValue(property);
8523 + const style = defaultView?.getComputedStyle(element);
8524 + const value = style?.getPropertyValue(property);
8051 8525 if (property === "background-color" && value === transparentValue && element.parentElement) {
8052 8526 return getComputedStyleProperty(element.parentElement, property);
8053 8527 }
8054 8528 return value;
@@ -8053,9 +8527,9 @@
8053 8527 }
8054 8528 return value;
8055 8529 }
8056 8530 function fillComputedColors(element, { color, backgroundColor }) {
8057 - if (!color && !backgroundColor) {
8531 + if (!element || !color && !backgroundColor) {
8058 8532 return;
8059 8533 }
8060 8534 return {
8061 8535 color: color || getComputedStyleProperty(element, "color"),
@@ -8068,14 +8542,14 @@
8068 8542 isActive,
8069 8543 activeAttributes,
8070 8544 contentRef
8071 8545 }) {
8072 - const [allowCustomControl, colors = EMPTY_ARRAY3] = (0, import_block_editor10.useSettings)(
8546 + const [allowCustomControl, colors = EMPTY_ARRAY2] = (0, import_block_editor10.useSettings)(
8073 8547 "color.custom",
8074 8548 "color.palette"
8075 8549 );
8076 - const [isAddingColor, setIsAddingColor] = (0, import_element30.useState)(false);
8077 - const colorIndicatorStyle = (0, import_element30.useMemo)(
8550 + const [isAddingColor, setIsAddingColor] = (0, import_element31.useState)(false);
8551 + const colorIndicatorStyle = (0, import_element31.useMemo)(
8078 8552 () => fillComputedColors(
8079 8553 contentRef.current,
8080 8554 getActiveColors(value, name8, colors)
8081 8555 ),
@@ -8107,9 +8581,8 @@
8107 8581 InlineColorUI,
8108 8582 {
8109 8583 name: name8,
8110 8584 onClose: () => setIsAddingColor(false),
8111 - activeAttributes,
8112 8585 value,
8113 8586 onChange,
8114 8587 contentRef,
8115 8588 isActive
@@ -8273,9 +8746,9 @@
8273 8746 // packages/format-library/build-module/language/index.mjs
8274 8747 var import_i18n20 = __toESM(require_i18n(), 1);
8275 8748 var import_block_editor15 = __toESM(require_block_editor(), 1);
8276 8749 var import_components5 = __toESM(require_components(), 1);
8277 - var import_element31 = __toESM(require_element(), 1);
8750 + var import_element32 = __toESM(require_element(), 1);
8278 8751 var import_rich_text15 = __toESM(require_rich_text(), 1);
8279 8752 var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
8280 8753 var name13 = "core/language";
8281 8754 var title13 = (0, import_i18n20.__)("Language");
@@ -8290,9 +8763,9 @@
8290 8763 },
8291 8764 edit: Edit3
8292 8765 };
8293 8766 function Edit3({ isActive, value, onChange, contentRef }) {
8294 - const [isPopoverVisible, setIsPopoverVisible] = (0, import_element31.useState)(false);
8767 + const [isPopoverVisible, setIsPopoverVisible] = (0, import_element32.useState)(false);
8295 8768 const togglePopover = () => {
8296 8769 setIsPopoverVisible((state) => !state);
8297 8770 };
8298 8771 return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
@@ -8323,15 +8796,21 @@
8323 8796 }
8324 8797 )
8325 8798 ] });
8326 8799 }
8327 - function InlineLanguageUI({ value, contentRef, onChange, onClose }) {
8800 + function InlineLanguageUI({
8801 + value,
8802 + contentRef,
8803 + onChange,
8804 + onClose
8805 + }) {
8328 8806 const popoverAnchor = (0, import_rich_text15.useAnchor)({
8807 + // eslint-disable-next-line react-hooks/refs
8329 8808 editableContentElement: contentRef.current,
8330 8809 settings: language
8331 8810 });
8332 - const [lang, setLang] = (0, import_element31.useState)("");
8333 - const [dir, setDir] = (0, import_element31.useState)("ltr");
8811 + const [lang, setLang] = (0, import_element32.useState)("");
8812 + const [dir, setDir] = (0, import_element32.useState)("ltr");
8334 8813 return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
8335 8814 import_components5.Popover,
8336 8815 {
8337 8816 className: "block-editor-format-toolbar__language-popover",
@@ -8404,9 +8883,9 @@
8404 8883 }
8405 8884
8406 8885 // packages/format-library/build-module/math/index.mjs
8407 8886 var import_i18n21 = __toESM(require_i18n(), 1);
8408 - var import_element32 = __toESM(require_element(), 1);
8887 + var import_element33 = __toESM(require_element(), 1);
8409 8888 var import_rich_text16 = __toESM(require_rich_text(), 1);
8410 8889 var import_block_editor16 = __toESM(require_block_editor(), 1);
8411 8890 var import_components6 = __toESM(require_components(), 1);
8412 8891 var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
@@ -8418,14 +8897,15 @@
8418 8897 activeAttributes,
8419 8898 contentRef,
8420 8899 latexToMathML
8421 8900 }) {
8422 - const [latex, setLatex] = (0, import_element32.useState)(
8901 + const [latex, setLatex] = (0, import_element33.useState)(
8423 8902 activeAttributes?.["data-latex"] || ""
8424 8903 );
8425 - const [error2, setError] = (0, import_element32.useState)(null);
8426 - const formRef = (0, import_element32.useRef)();
8904 + const [error2, setError] = (0, import_element33.useState)(null);
8905 + const formRef = (0, import_element33.useRef)(null);
8427 8906 const popoverAnchor = (0, import_rich_text16.useAnchor)({
8907 + // eslint-disable-next-line react-hooks/refs
8428 8908 editableContentElement: contentRef.current,
8429 8909 settings: math
8430 8910 });
8431 8911 const handleLatexChange = (newLatex) => {
@@ -8435,9 +8915,11 @@
8435 8915 try {
8436 8916 mathML = latexToMathML(newLatex, { displayMode: false });
8437 8917 setError(null);
8438 8918 } catch (err) {
8439 - setError(err.message);
8919 + setError(
8920 + err instanceof Error ? err.message : (0, import_i18n21.__)("Could not parse the LaTeX math syntax.")
8921 + );
8440 8922 }
8441 8923 } else {
8442 8924 setError(null);
8443 8925 }
@@ -8462,27 +8944,39 @@
8462 8944 focusOnMount: false,
8463 8945 anchor: popoverAnchor,
8464 8946 onFocusOutside: () => formRef.current?.reportValidity(),
8465 8947 className: "block-editor-format-toolbar__math-popover",
8466 - children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
8948 + children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
8467 8949 "form",
8468 8950 {
8469 8951 ref: formRef,
8470 - style: { minWidth: "300px", padding: "4px" },
8952 + style: { minWidth: "300px", padding: "16px" },
8471 8953 onSubmit: (event) => event.preventDefault(),
8472 - children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
8473 - ValidatedInputControl,
8474 - {
8475 - hideLabelFromVision: true,
8476 - label: (0, import_i18n21.__)("LaTeX math syntax"),
8477 - value: latex,
8478 - customValidity: error2 ? { type: "invalid", message: error2 } : void 0,
8479 - onValueChange: handleLatexChange,
8480 - placeholder: (0, import_i18n21.__)("e.g., x^2, \\frac{a}{b}"),
8481 - autoComplete: "off",
8482 - className: "block-editor-format-toolbar__math-input"
8483 - }
8484 - )
8954 + children: [
8955 + /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
8956 + ValidatedInputControl,
8957 + {
8958 + label: (0, import_i18n21.__)("LaTeX math syntax"),
8959 + value: latex,
8960 + customValidity: error2 ? { type: "invalid", message: error2 } : void 0,
8961 + onValueChange: handleLatexChange,
8962 + placeholder: (0, import_i18n21.__)("e.g., x^2, \\frac{a}{b}, \\sqrt{x}"),
8963 + autoComplete: "off",
8964 + className: "block-editor-format-toolbar__math-input"
8965 + }
8966 + ),
8967 + /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
8968 + Link,
8969 + {
8970 + openInNewTab: true,
8971 + className: "block-editor-format-toolbar__math-learn-more",
8972 + href: (0, import_i18n21.__)(
8973 + "https://wordpress.org/documentation/article/math-block/"
8974 + ),
8975 + children: (0, import_i18n21.__)("Learn more about LaTeX syntax")
8976 + }
8977 + )
8978 + ]
8485 8979 }
8486 8980 )
8487 8981 }
8488 8982 );
@@ -8494,10 +8988,10 @@
8494 8988 isObjectActive,
8495 8989 activeObjectAttributes,
8496 8990 contentRef
8497 8991 }) {
8498 - const [latexToMathML, setLatexToMathML] = (0, import_element32.useState)();
8499 - (0, import_element32.useEffect)(() => {
8992 + const [latexToMathML, setLatexToMathML] = (0, import_element33.useState)();
8993 + (0, import_element33.useEffect)(() => {
8500 8994 import("@wordpress/latex-to-mathml").then((module) => {
8501 8995 setLatexToMathML(() => module.default);
8502 8996 });
8503 8997 }, []);
@@ -8565,28 +9059,60 @@
8565 9059 // packages/format-library/build-module/non-breaking-space/index.mjs
8566 9060 var import_i18n22 = __toESM(require_i18n(), 1);
8567 9061 var import_rich_text17 = __toESM(require_rich_text(), 1);
8568 9062 var import_block_editor17 = __toESM(require_block_editor(), 1);
9063 + var import_components7 = __toESM(require_components(), 1);
8569 9064 var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
8570 9065 var name15 = "core/non-breaking-space";
8571 9066 var title15 = (0, import_i18n22.__)("Non breaking space");
9067 + function PopoverAnchor({ contentRef }) {
9068 + const popoverAnchor = (0, import_rich_text17.useAnchor)({
9069 + // eslint-disable-next-line react-hooks/refs
9070 + editableContentElement: contentRef.current,
9071 + settings: nonBreakingSpace
9072 + });
9073 + return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components7.Popover, { anchor: popoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { style: { whiteSpace: "nowrap", padding: "4px" }, children: (0, import_i18n22.__)("Non-breaking space") }) });
9074 + }
8572 9075 var nonBreakingSpace = {
8573 9076 name: name15,
8574 9077 title: title15,
8575 - tagName: "nbsp",
8576 - className: null,
8577 - edit({ value, onChange }) {
9078 + tagName: "span",
9079 + className: "non-breaking-space",
9080 + edit({ value, onChange, contentRef }) {
8578 9081 function addNonBreakingSpace() {
8579 9082 onChange((0, import_rich_text17.insert)(value, "\xA0"));
8580 9083 }
8581 - return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
8582 - import_block_editor17.RichTextShortcut,
8583 - {
8584 - type: "primaryShift",
8585 - character: " ",
8586 - onUse: addNonBreakingSpace
8587 - }
8588 - );
9084 + const selectedValue = value.start && value.end ? value.text.slice(value.start, value.end) : null;
9085 + return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
9086 + /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
9087 + import_block_editor17.RichTextShortcut,
9088 + {
9089 + type: "primaryShift",
9090 + character: " ",
9091 + onUse: addNonBreakingSpace
9092 + }
9093 + ),
9094 + selectedValue === "\xA0" && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PopoverAnchor, { contentRef })
9095 + ] });
9096 + },
9097 + __experimentalCreatePrepareEditableTree() {
9098 + return (formats, text) => {
9099 + const NBSP = "\xA0";
9100 + let record = { formats, text };
9101 + let index2 = -1;
9102 + do {
9103 + index2 = text.indexOf(NBSP, index2 + 1);
9104 + if (index2 !== -1) {
9105 + record = (0, import_rich_text17.applyFormat)(
9106 + record,
9107 + { type: name15 },
9108 + index2,
9109 + index2 + 1
9110 + );
9111 + }
9112 + } while (index2 !== -1);
9113 + return record.formats;
9114 + };
8589 9115 }
8590 9116 };
8591 9117
8592 9118 // packages/format-library/build-module/default-formats.mjs