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/routes/styles/content.js +23137 -230 23.6.2 → trunk View file →
@@ -3,11 +3,21 @@
3 3 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4 4 var __getOwnPropNames = Object.getOwnPropertyNames;
5 5 var __getProtoOf = Object.getPrototypeOf;
6 6 var __hasOwnProp = Object.prototype.hasOwnProperty;
7 -var __commonJS = (cb, mod) => function __require() {
7 +var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
8 + get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9 +}) : x2)(function(x2) {
10 + if (typeof require !== "undefined") return require.apply(this, arguments);
11 + throw Error('Dynamic require of "' + x2 + '" is not supported');
12 +});
13 +var __commonJS = (cb, mod) => function __require4() {
8 14 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9 15 };
16 +var __export = (target, all) => {
17 + for (var name2 in all)
18 + __defProp(target, name2, { get: all[name2], enumerable: true });
19 +};
10 20 var __copyProps = (to, from, except, desc) => {
11 21 if (from && typeof from === "object" || typeof from === "function") {
12 22 for (let key of __getOwnPropNames(from))
13 23 if (!__hasOwnProp.call(to, key) && key !== except)
@@ -51,15 +61,170 @@
51 61 module.exports = window.ReactJSXRuntime;
52 62 }
53 63 });
54 64
55 -// package-external:@wordpress/primitives
56 -var require_primitives = __commonJS({
57 - "package-external:@wordpress/primitives"(exports, module) {
58 - module.exports = window.wp.primitives;
65 +// vendor-external:react-dom
66 +var require_react_dom = __commonJS({
67 + "vendor-external:react-dom"(exports, module) {
68 + module.exports = window.ReactDOM;
59 69 }
60 70 });
61 71
72 +// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
73 +var require_use_sync_external_store_shim_development = __commonJS({
74 + "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
75 + "use strict";
76 + (function() {
77 + function is(x2, y2) {
78 + return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
79 + }
80 + function useSyncExternalStore$2(subscribe, getSnapshot) {
81 + didWarnOld18Alpha || void 0 === React48.startTransition || (didWarnOld18Alpha = true, console.error(
82 + "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."
83 + ));
84 + var value = getSnapshot();
85 + if (!didWarnUncachedGetSnapshot) {
86 + var cachedValue = getSnapshot();
87 + objectIs(value, cachedValue) || (console.error(
88 + "The result of getSnapshot should be cached to avoid an infinite loop"
89 + ), didWarnUncachedGetSnapshot = true);
90 + }
91 + cachedValue = useState30({
92 + inst: { value, getSnapshot }
93 + });
94 + var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
95 + useLayoutEffect5(
96 + function() {
97 + inst.value = value;
98 + inst.getSnapshot = getSnapshot;
99 + checkIfSnapshotChanged(inst) && forceUpdate({ inst });
100 + },
101 + [subscribe, value, getSnapshot]
102 + );
103 + useEffect22(
104 + function() {
105 + checkIfSnapshotChanged(inst) && forceUpdate({ inst });
106 + return subscribe(function() {
107 + checkIfSnapshotChanged(inst) && forceUpdate({ inst });
108 + });
109 + },
110 + [subscribe]
111 + );
112 + useDebugValue2(value);
113 + return value;
114 + }
115 + function checkIfSnapshotChanged(inst) {
116 + var latestGetSnapshot = inst.getSnapshot;
117 + inst = inst.value;
118 + try {
119 + var nextValue = latestGetSnapshot();
120 + return !objectIs(inst, nextValue);
121 + } catch (error) {
122 + return true;
123 + }
124 + }
125 + function useSyncExternalStore$1(subscribe, getSnapshot) {
126 + return getSnapshot();
127 + }
128 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
129 + var React48 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState30 = React48.useState, useEffect22 = React48.useEffect, useLayoutEffect5 = React48.useLayoutEffect, useDebugValue2 = React48.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
130 + exports.useSyncExternalStore = void 0 !== React48.useSyncExternalStore ? React48.useSyncExternalStore : shim;
131 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
132 + })();
133 + }
134 +});
135 +
136 +// node_modules/use-sync-external-store/shim/index.js
137 +var require_shim = __commonJS({
138 + "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
139 + "use strict";
140 + if (false) {
141 + module.exports = null;
142 + } else {
143 + module.exports = require_use_sync_external_store_shim_development();
144 + }
145 + }
146 +});
147 +
148 +// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
149 +var require_with_selector_development = __commonJS({
150 + "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
151 + "use strict";
152 + (function() {
153 + function is(x2, y2) {
154 + return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
155 + }
156 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
157 + var React48 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef23 = React48.useRef, useEffect22 = React48.useEffect, useMemo34 = React48.useMemo, useDebugValue2 = React48.useDebugValue;
158 + exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
159 + var instRef = useRef23(null);
160 + if (null === instRef.current) {
161 + var inst = { hasValue: false, value: null };
162 + instRef.current = inst;
163 + } else inst = instRef.current;
164 + instRef = useMemo34(
165 + function() {
166 + function memoizedSelector(nextSnapshot) {
167 + if (!hasMemo) {
168 + hasMemo = true;
169 + memoizedSnapshot = nextSnapshot;
170 + nextSnapshot = selector(nextSnapshot);
171 + if (void 0 !== isEqual && inst.hasValue) {
172 + var currentSelection = inst.value;
173 + if (isEqual(currentSelection, nextSnapshot))
174 + return memoizedSelection = currentSelection;
175 + }
176 + return memoizedSelection = nextSnapshot;
177 + }
178 + currentSelection = memoizedSelection;
179 + if (objectIs(memoizedSnapshot, nextSnapshot))
180 + return currentSelection;
181 + var nextSelection = selector(nextSnapshot);
182 + if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
183 + return memoizedSnapshot = nextSnapshot, currentSelection;
184 + memoizedSnapshot = nextSnapshot;
185 + return memoizedSelection = nextSelection;
186 + }
187 + var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
188 + return [
189 + function() {
190 + return memoizedSelector(getSnapshot());
191 + },
192 + null === maybeGetServerSnapshot ? void 0 : function() {
193 + return memoizedSelector(maybeGetServerSnapshot());
194 + }
195 + ];
196 + },
197 + [getSnapshot, getServerSnapshot, selector, isEqual]
198 + );
199 + var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
200 + useEffect22(
201 + function() {
202 + inst.hasValue = true;
203 + inst.value = value;
204 + },
205 + [value]
206 + );
207 + useDebugValue2(value);
208 + return value;
209 + };
210 + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
211 + })();
212 + }
213 +});
214 +
215 +// node_modules/use-sync-external-store/shim/with-selector.js
216 +var require_with_selector = __commonJS({
217 + "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
218 + "use strict";
219 + if (false) {
220 + module.exports = null;
221 + } else {
222 + module.exports = require_with_selector_development();
223 + }
224 + }
225 +});
226 +
62 227 // package-external:@wordpress/compose
63 228 var require_compose = __commonJS({
64 229 "package-external:@wordpress/compose"(exports, module) {
65 230 module.exports = window.wp.compose;
@@ -65,8 +230,15 @@
65 230 module.exports = window.wp.compose;
66 231 }
67 232 });
68 233
234 +// package-external:@wordpress/theme
235 +var require_theme = __commonJS({
236 + "package-external:@wordpress/theme"(exports, module) {
237 + module.exports = window.wp.theme;
238 + }
239 +});
240 +
69 241 // package-external:@wordpress/private-apis
70 242 var require_private_apis = __commonJS({
71 243 "package-external:@wordpress/private-apis"(exports, module) {
72 244 module.exports = window.wp.privateApis;
@@ -72,8 +244,15 @@
72 244 module.exports = window.wp.privateApis;
73 245 }
74 246 });
75 247
248 +// package-external:@wordpress/primitives
249 +var require_primitives = __commonJS({
250 + "package-external:@wordpress/primitives"(exports, module) {
251 + module.exports = window.wp.primitives;
252 + }
253 +});
254 +
76 255 // package-external:@wordpress/components
77 256 var require_components = __commonJS({
78 257 "package-external:@wordpress/components"(exports, module) {
79 258 module.exports = window.wp.components;
@@ -100,8 +279,223 @@
100 279 module.exports = window.wp.coreData;
101 280 }
102 281 });
103 282
283 +// package-external:@wordpress/html-entities
284 +var require_html_entities = __commonJS({
285 + "package-external:@wordpress/html-entities"(exports, module) {
286 + module.exports = window.wp.htmlEntities;
287 + }
288 +});
289 +
290 +// package-external:@wordpress/api-fetch
291 +var require_api_fetch = __commonJS({
292 + "package-external:@wordpress/api-fetch"(exports, module) {
293 + module.exports = window.wp.apiFetch;
294 + }
295 +});
296 +
297 +// package-external:@wordpress/url
298 +var require_url = __commonJS({
299 + "package-external:@wordpress/url"(exports, module) {
300 + module.exports = window.wp.url;
301 + }
302 +});
303 +
304 +// package-external:@wordpress/blocks
305 +var require_blocks = __commonJS({
306 + "package-external:@wordpress/blocks"(exports, module) {
307 + module.exports = window.wp.blocks;
308 + }
309 +});
310 +
311 +// package-external:@wordpress/block-editor
312 +var require_block_editor = __commonJS({
313 + "package-external:@wordpress/block-editor"(exports, module) {
314 + module.exports = window.wp.blockEditor;
315 + }
316 +});
317 +
318 +// package-external:@wordpress/style-engine
319 +var require_style_engine = __commonJS({
320 + "package-external:@wordpress/style-engine"(exports, module) {
321 + module.exports = window.wp.styleEngine;
322 + }
323 +});
324 +
325 +// node_modules/fast-deep-equal/es6/index.js
326 +var require_es6 = __commonJS({
327 + "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
328 + "use strict";
329 + module.exports = function equal(a, b) {
330 + if (a === b) return true;
331 + if (a && b && typeof a == "object" && typeof b == "object") {
332 + if (a.constructor !== b.constructor) return false;
333 + var length, i, keys;
334 + if (Array.isArray(a)) {
335 + length = a.length;
336 + if (length != b.length) return false;
337 + for (i = length; i-- !== 0; )
338 + if (!equal(a[i], b[i])) return false;
339 + return true;
340 + }
341 + if (a instanceof Map && b instanceof Map) {
342 + if (a.size !== b.size) return false;
343 + for (i of a.entries())
344 + if (!b.has(i[0])) return false;
345 + for (i of a.entries())
346 + if (!equal(i[1], b.get(i[0]))) return false;
347 + return true;
348 + }
349 + if (a instanceof Set && b instanceof Set) {
350 + if (a.size !== b.size) return false;
351 + for (i of a.entries())
352 + if (!b.has(i[0])) return false;
353 + return true;
354 + }
355 + if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
356 + length = a.length;
357 + if (length != b.length) return false;
358 + for (i = length; i-- !== 0; )
359 + if (a[i] !== b[i]) return false;
360 + return true;
361 + }
362 + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
363 + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
364 + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
365 + keys = Object.keys(a);
366 + length = keys.length;
367 + if (length !== Object.keys(b).length) return false;
368 + for (i = length; i-- !== 0; )
369 + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
370 + for (i = length; i-- !== 0; ) {
371 + var key = keys[i];
372 + if (!equal(a[key], b[key])) return false;
373 + }
374 + return true;
375 + }
376 + return a !== a && b !== b;
377 + };
378 + }
379 +});
380 +
381 +// node_modules/deepmerge/dist/cjs.js
382 +var require_cjs = __commonJS({
383 + "node_modules/deepmerge/dist/cjs.js"(exports, module) {
384 + "use strict";
385 + var isMergeableObject = function isMergeableObject2(value) {
386 + return isNonNullObject(value) && !isSpecial(value);
387 + };
388 + function isNonNullObject(value) {
389 + return !!value && typeof value === "object";
390 + }
391 + function isSpecial(value) {
392 + var stringValue = Object.prototype.toString.call(value);
393 + return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
394 + }
395 + var canUseSymbol = typeof Symbol === "function" && Symbol.for;
396 + var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
397 + function isReactElement(value) {
398 + return value.$$typeof === REACT_ELEMENT_TYPE;
399 + }
400 + function emptyTarget(val) {
401 + return Array.isArray(val) ? [] : {};
402 + }
403 + function cloneUnlessOtherwiseSpecified(value, options) {
404 + return options.clone !== false && options.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options) : value;
405 + }
406 + function defaultArrayMerge(target, source, options) {
407 + return target.concat(source).map(function(element) {
408 + return cloneUnlessOtherwiseSpecified(element, options);
409 + });
410 + }
411 + function getMergeFunction(key, options) {
412 + if (!options.customMerge) {
413 + return deepmerge2;
414 + }
415 + var customMerge = options.customMerge(key);
416 + return typeof customMerge === "function" ? customMerge : deepmerge2;
417 + }
418 + function getEnumerableOwnPropertySymbols(target) {
419 + return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
420 + return Object.propertyIsEnumerable.call(target, symbol);
421 + }) : [];
422 + }
423 + function getKeys(target) {
424 + return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
425 + }
426 + function propertyIsOnObject(object, property) {
427 + try {
428 + return property in object;
429 + } catch (_) {
430 + return false;
431 + }
432 + }
433 + function propertyIsUnsafe(target, key) {
434 + return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
435 + }
436 + function mergeObject(target, source, options) {
437 + var destination = {};
438 + if (options.isMergeableObject(target)) {
439 + getKeys(target).forEach(function(key) {
440 + destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
441 + });
442 + }
443 + getKeys(source).forEach(function(key) {
444 + if (propertyIsUnsafe(target, key)) {
445 + return;
446 + }
447 + if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
448 + destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
449 + } else {
450 + destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
451 + }
452 + });
453 + return destination;
454 + }
455 + function deepmerge2(target, source, options) {
456 + options = options || {};
457 + options.arrayMerge = options.arrayMerge || defaultArrayMerge;
458 + options.isMergeableObject = options.isMergeableObject || isMergeableObject;
459 + options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
460 + var sourceIsArray = Array.isArray(source);
461 + var targetIsArray = Array.isArray(target);
462 + var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
463 + if (!sourceAndTargetTypesMatch) {
464 + return cloneUnlessOtherwiseSpecified(source, options);
465 + } else if (sourceIsArray) {
466 + return options.arrayMerge(target, source, options);
467 + } else {
468 + return mergeObject(target, source, options);
469 + }
470 + }
471 + deepmerge2.all = function deepmergeAll(array, options) {
472 + if (!Array.isArray(array)) {
473 + throw new Error("first argument should be an array");
474 + }
475 + return array.reduce(function(prev, next) {
476 + return deepmerge2(prev, next, options);
477 + }, {});
478 + };
479 + var deepmerge_1 = deepmerge2;
480 + module.exports = deepmerge_1;
481 + }
482 +});
483 +
484 +// package-external:@wordpress/keycodes
485 +var require_keycodes = __commonJS({
486 + "package-external:@wordpress/keycodes"(exports, module) {
487 + module.exports = window.wp.keycodes;
488 + }
489 +});
490 +
491 +// package-external:@wordpress/date
492 +var require_date = __commonJS({
493 + "package-external:@wordpress/date"(exports, module) {
494 + module.exports = window.wp.date;
495 + }
496 +});
497 +
104 498 // routes/styles/stage.tsx
105 499 import { useNavigate, useSearch } from "@wordpress/route";
106 500
107 501 // node_modules/clsx/dist/clsx.mjs
@@ -119,8 +513,37 @@
119 513 return n;
120 514 }
121 515 var clsx_default = clsx;
122 516
517 +// node_modules/@base-ui/utils/createLogOnce.mjs
518 +var loggedMessages;
519 +if (true) {
520 + loggedMessages = /* @__PURE__ */ new Set();
521 +}
522 +function createLogOnce(severity, prefix) {
523 + return function logOnce(...messages) {
524 + if (true) {
525 + const message = messages.join(" ");
526 + const output = prefix ? `${prefix}: ${message}` : message;
527 + const key = `${severity}:${output}`;
528 + if (!loggedMessages.has(key)) {
529 + loggedMessages.add(key);
530 + if (severity === "warn") {
531 + console.warn(output);
532 + } else {
533 + console.error(output);
534 + }
535 + }
536 + }
537 + };
538 +}
539 +
540 +// node_modules/@base-ui/utils/safeReact.mjs
541 +var React = __toESM(require_react(), 1);
542 +var SafeReact = {
543 + ...React
544 +};
545 +
123 546 // node_modules/@base-ui/utils/useRefWithInit.mjs
124 547 var React2 = __toESM(require_react(), 1);
125 548 var UNINITIALIZED = {};
126 549 function useRefWithInit(init, initArg) {
@@ -130,31 +553,64 @@
130 553 }
131 554 return ref;
132 555 }
133 556
134 -// node_modules/@base-ui/utils/warn.mjs
135 -var set;
136 -if (true) {
137 - set = /* @__PURE__ */ new Set();
557 +// node_modules/@base-ui/utils/useStableCallback.mjs
558 +var useInsertionEffect = SafeReact.useInsertionEffect;
559 +var useSafeInsertionEffect = (
560 + // React 17 doesn't have useInsertionEffect.
561 + useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
562 + useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
563 +);
564 +function useStableCallback(callback) {
565 + const stable = useRefWithInit(createStableCallback).current;
566 + stable.next = callback;
567 + useSafeInsertionEffect(stable.effect);
568 + return stable.trampoline;
138 569 }
139 -function warn(...messages) {
570 +function createStableCallback() {
571 + const stable = {
572 + next: void 0,
573 + callback: assertNotCalled,
574 + trampoline: (...args) => stable.callback?.(...args),
575 + effect: () => {
576 + stable.callback = stable.next;
577 + }
578 + };
579 + return stable;
580 +}
581 +function assertNotCalled() {
140 582 if (true) {
141 - const messageKey = messages.join(" ");
142 - if (!set.has(messageKey)) {
143 - set.add(messageKey);
144 - console.warn(`Base UI: ${messageKey}`);
145 - }
583 + throw (
584 + /* minify-error-disabled */
585 + new Error("Base UI: Cannot call an event handler while rendering.")
586 + );
146 587 }
147 588 }
148 589
590 +// node_modules/@base-ui/utils/warn.mjs
591 +var warn = createLogOnce("warn", "Base UI");
592 +
593 +// node_modules/@base-ui/utils/empty.mjs
594 +function NOOP() {
595 +}
596 +var EMPTY_ARRAY = Object.freeze([]);
597 +var EMPTY_OBJECT = Object.freeze({});
598 +
599 +// node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
600 +var React3 = __toESM(require_react(), 1);
601 +var noop = () => {
602 +};
603 +var useIsoLayoutEffect = typeof document !== "undefined" ? React3.useLayoutEffect : noop;
604 +
149 605 // node_modules/@base-ui/react/internals/useRenderElement.mjs
150 -var React5 = __toESM(require_react(), 1);
606 +var React6 = __toESM(require_react(), 1);
151 607
152 608 // node_modules/@base-ui/utils/useMergedRefs.mjs
153 -function useMergedRefs(a, b, c, d) {
609 +function useMergedRefs(a, b, c2, d) {
154 610 const forkRef = useRefWithInit(createForkRef).current;
155 - if (didChange(forkRef, a, b, c, d)) {
156 - update(forkRef, [a, b, c, d]);
611 + if (didChange(forkRef, a, b, c2, d)) {
612 + update(forkRef, [a, b, c2, d]);
157 613 }
158 614 return forkRef.callback;
159 615 }
160 616 function useMergedRefsN(refs) {
@@ -170,13 +626,13 @@
170 626 cleanup: null,
171 627 refs: []
172 628 };
173 629 }
174 -function didChange(forkRef, a, b, c, d) {
175 - return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
630 +function didChange(forkRef, a, b, c2, d) {
631 + return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c2 || forkRef.refs[3] !== d;
176 632 }
177 633 function didChangeN(forkRef, newRefs) {
178 - return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
634 + return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
179 635 }
180 636 function update(forkRef, refs) {
181 637 forkRef.refs = refs;
182 638 if (refs.every((ref) => ref == null)) {
@@ -221,9 +677,9 @@
221 677 const cleanupCallback = cleanupCallbacks[i];
222 678 if (typeof cleanupCallback === "function") {
223 679 cleanupCallback();
224 680 } else {
225 - ref(null);
681 + void ref(null);
226 682 }
227 683 break;
228 684 }
229 685 case "object": {
@@ -238,13 +694,13 @@
238 694 };
239 695 }
240 696
241 697 // node_modules/@base-ui/utils/getReactElementRef.mjs
242 -var React4 = __toESM(require_react(), 1);
698 +var React5 = __toESM(require_react(), 1);
243 699
244 700 // node_modules/@base-ui/utils/reactVersion.mjs
245 -var React3 = __toESM(require_react(), 1);
246 -var majorVersion = parseInt(React3.version, 10);
701 +var React4 = __toESM(require_react(), 1);
702 +var majorVersion = parseInt(React4.version, 10);
247 703 function isReactVersionAtLeast(reactVersionToCheck) {
248 704 return majorVersion >= reactVersionToCheck;
249 705 }
250 706
@@ -249,9 +705,9 @@
249 705 }
250 706
251 707 // node_modules/@base-ui/utils/getReactElementRef.mjs
252 708 function getReactElementRef(element) {
253 - if (!/* @__PURE__ */ React4.isValidElement(element)) {
709 + if (!/* @__PURE__ */ React5.isValidElement(element)) {
254 710 return null;
255 711 }
256 712 const reactElement = element;
257 713 const propsWithRef = reactElement.props;
@@ -274,12 +730,8 @@
274 730 }
275 731 return void 0;
276 732 }
277 733
278 -// node_modules/@base-ui/utils/empty.mjs
279 -var EMPTY_ARRAY = Object.freeze([]);
280 -var EMPTY_OBJECT = Object.freeze({});
281 -
282 734 // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
283 735 function getStateAttributesProps(state, customMapping) {
284 736 const props = {};
285 737 for (const key in state) {
@@ -311,10 +763,10 @@
311 763 }
312 764
313 765 // node_modules/@base-ui/react/merge-props/mergeProps.mjs
314 766 var EMPTY_PROPS = {};
315 -function mergeProps(a, b, c, d, e) {
316 - if (!c && !d && !e && !a) {
767 +function mergeProps(a, b, c2, d, e) {
768 + if (!c2 && !d && !e && !a) {
317 769 return createInitialMergedProps(b);
318 770 }
319 771 let merged = createInitialMergedProps(a);
320 772 if (b) {
@@ -319,10 +771,10 @@
319 771 let merged = createInitialMergedProps(a);
320 772 if (b) {
321 773 merged = mergeInto(merged, b);
322 774 }
323 - if (c) {
324 - merged = mergeInto(merged, c);
775 + if (c2) {
776 + merged = mergeInto(merged, c2);
325 777 }
326 778 if (d) {
327 779 merged = mergeInto(merged, d);
328 780 }
@@ -467,10 +919,13 @@
467 919
468 920 // node_modules/@base-ui/react/internals/useRenderElement.mjs
469 921 var import_react = __toESM(require_react(), 1);
470 922 function useRenderElement(element, componentProps, params = {}) {
471 - const renderProp = componentProps.render;
472 - const outProps = useRenderElementProps(componentProps, params);
923 + let renderProp = componentProps.render;
924 + if (params.enabled !== false) {
925 + renderProp = unwrapLazyRenderProp(renderProp);
926 + }
927 + const outProps = useRenderElementProps(componentProps, params, renderProp);
473 928 if (params.enabled === false) {
474 929 return null;
475 930 }
476 931 const state = params.state ?? EMPTY_OBJECT;
@@ -475,13 +930,12 @@
475 930 }
476 931 const state = params.state ?? EMPTY_OBJECT;
477 932 return evaluateRenderProp(element, renderProp, outProps, state);
478 933 }
479 -function useRenderElementProps(componentProps, params = {}) {
934 +function useRenderElementProps(componentProps, params, renderProp) {
480 935 const {
481 936 className: classNameProp,
482 - style: styleProp,
483 - render: renderProp
937 + style: styleProp
484 938 } = componentProps;
485 939 const {
486 940 state = EMPTY_OBJECT,
487 941 ref,
@@ -495,9 +949,9 @@
495 949 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
496 950 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
497 951 if (typeof document !== "undefined") {
498 952 if (!enabled) {
499 - useMergedRefs(null, null);
953 + void useMergedRefs(null, null);
500 954 } else if (Array.isArray(ref)) {
501 955 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
502 956 } else {
503 957 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
@@ -522,8 +976,15 @@
522 976 }
523 977 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
524 978 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
525 979 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
980 +function unwrapLazyRenderProp(render) {
981 + if (render?.$$typeof !== REACT_LAZY_TYPE) {
982 + return render;
983 + }
984 + const unwrapped = React6.Children.toArray(render)[0];
985 + return /* @__PURE__ */ React6.isValidElement(unwrapped) ? unwrapped : render;
986 +}
526 987 function evaluateRenderProp(element, render, props, state) {
527 988 if (render) {
528 989 if (typeof render === "function") {
529 990 if (true) {
@@ -532,19 +993,14 @@
532 993 return render(props, state);
533 994 }
534 995 const mergedProps = mergeProps(props, render.props);
535 996 mergedProps.ref = props.ref;
536 - let newElement = render;
537 - if (newElement?.$$typeof === REACT_LAZY_TYPE) {
538 - const children = React5.Children.toArray(render);
539 - newElement = children[0];
540 - }
541 997 if (true) {
542 - if (!/* @__PURE__ */ React5.isValidElement(newElement)) {
998 + if (!/* @__PURE__ */ React6.isValidElement(render)) {
543 999 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"));
544 1000 }
545 1001 }
546 - return /* @__PURE__ */ React5.cloneElement(newElement, mergedProps);
1002 + return /* @__PURE__ */ React6.cloneElement(render, mergedProps);
547 1003 }
548 1004 if (element) {
549 1005 if (typeof element === "string") {
550 1006 return renderTag(element, props);
@@ -579,11 +1035,7726 @@
579 1035 ...props,
580 1036 key: props.key
581 1037 });
582 1038 }
583 - return /* @__PURE__ */ React5.createElement(Tag, props);
1039 + return /* @__PURE__ */ React6.createElement(Tag, props);
584 1040 }
585 1041
1042 +// node_modules/@base-ui/utils/useId.mjs
1043 +var React7 = __toESM(require_react(), 1);
1044 +var globalId = 0;
1045 +function useGlobalId(idOverride, prefix = "mui") {
1046 + const [defaultId, setDefaultId] = React7.useState(idOverride);
1047 + const id = idOverride || defaultId;
1048 + React7.useEffect(() => {
1049 + if (defaultId == null) {
1050 + globalId += 1;
1051 + setDefaultId(`${prefix}-${globalId}`);
1052 + }
1053 + }, [defaultId, prefix]);
1054 + return id;
1055 +}
1056 +var maybeReactUseId = SafeReact.useId;
1057 +function useId(idOverride, prefix) {
1058 + if (maybeReactUseId !== void 0) {
1059 + const reactId = maybeReactUseId();
1060 + return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
1061 + }
1062 + return useGlobalId(idOverride, prefix);
1063 +}
1064 +
1065 +// node_modules/@base-ui/react/internals/useBaseUiId.mjs
1066 +function useBaseUiId(idOverride) {
1067 + return useId(idOverride, "base-ui");
1068 +}
1069 +
1070 +// node_modules/@base-ui/react/internals/reason-parts.mjs
1071 +var reason_parts_exports = {};
1072 +__export(reason_parts_exports, {
1073 + cancelOpen: () => cancelOpen,
1074 + chipRemovePress: () => chipRemovePress,
1075 + clearPress: () => clearPress,
1076 + closePress: () => closePress,
1077 + closeWatcher: () => closeWatcher,
1078 + decrementPress: () => decrementPress,
1079 + disabled: () => disabled,
1080 + drag: () => drag,
1081 + escapeKey: () => escapeKey,
1082 + focusOut: () => focusOut,
1083 + imperativeAction: () => imperativeAction,
1084 + incrementPress: () => incrementPress,
1085 + initial: () => initial,
1086 + inputBlur: () => inputBlur,
1087 + inputChange: () => inputChange,
1088 + inputClear: () => inputClear,
1089 + inputPaste: () => inputPaste,
1090 + inputPress: () => inputPress,
1091 + itemPress: () => itemPress,
1092 + keyboard: () => keyboard,
1093 + linkPress: () => linkPress,
1094 + listNavigation: () => listNavigation,
1095 + missing: () => missing,
1096 + none: () => none,
1097 + outsidePress: () => outsidePress,
1098 + pointer: () => pointer,
1099 + scrub: () => scrub,
1100 + siblingOpen: () => siblingOpen,
1101 + swipe: () => swipe,
1102 + trackPress: () => trackPress,
1103 + triggerFocus: () => triggerFocus,
1104 + triggerHover: () => triggerHover,
1105 + triggerPress: () => triggerPress,
1106 + wheel: () => wheel,
1107 + windowResize: () => windowResize
1108 +});
1109 +var none = "none";
1110 +var triggerPress = "trigger-press";
1111 +var triggerHover = "trigger-hover";
1112 +var triggerFocus = "trigger-focus";
1113 +var outsidePress = "outside-press";
1114 +var itemPress = "item-press";
1115 +var closePress = "close-press";
1116 +var linkPress = "link-press";
1117 +var clearPress = "clear-press";
1118 +var chipRemovePress = "chip-remove-press";
1119 +var trackPress = "track-press";
1120 +var incrementPress = "increment-press";
1121 +var decrementPress = "decrement-press";
1122 +var inputChange = "input-change";
1123 +var inputClear = "input-clear";
1124 +var inputBlur = "input-blur";
1125 +var inputPaste = "input-paste";
1126 +var inputPress = "input-press";
1127 +var focusOut = "focus-out";
1128 +var escapeKey = "escape-key";
1129 +var closeWatcher = "close-watcher";
1130 +var listNavigation = "list-navigation";
1131 +var keyboard = "keyboard";
1132 +var pointer = "pointer";
1133 +var drag = "drag";
1134 +var wheel = "wheel";
1135 +var scrub = "scrub";
1136 +var cancelOpen = "cancel-open";
1137 +var siblingOpen = "sibling-open";
1138 +var disabled = "disabled";
1139 +var missing = "missing";
1140 +var initial = "initial";
1141 +var imperativeAction = "imperative-action";
1142 +var swipe = "swipe";
1143 +var windowResize = "window-resize";
1144 +
1145 +// node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
1146 +function createChangeEventDetails(reason, event, trigger, customProperties) {
1147 + let canceled = false;
1148 + let allowPropagation = false;
1149 + const custom = customProperties ?? EMPTY_OBJECT;
1150 + const details = {
1151 + reason,
1152 + event: event ?? new Event("base-ui"),
1153 + cancel() {
1154 + canceled = true;
1155 + },
1156 + allowPropagation() {
1157 + allowPropagation = true;
1158 + },
1159 + get isCanceled() {
1160 + return canceled;
1161 + },
1162 + get isPropagationAllowed() {
1163 + return allowPropagation;
1164 + },
1165 + trigger,
1166 + ...custom
1167 + };
1168 + return details;
1169 +}
1170 +
1171 +// node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1172 +var React9 = __toESM(require_react(), 1);
1173 +
1174 +// node_modules/@base-ui/utils/useOnMount.mjs
1175 +var React8 = __toESM(require_react(), 1);
1176 +function useOnMount(fn) {
1177 + React8.useEffect(fn, EMPTY_ARRAY);
1178 +}
1179 +
1180 +// node_modules/@base-ui/utils/useAnimationFrame.mjs
1181 +var EMPTY = null;
1182 +var LAST_RAF = globalThis.requestAnimationFrame;
1183 +var Scheduler = class {
1184 + /* This implementation uses an array as a backing data-structure for frame callbacks.
1185 + * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
1186 + * never calls the native `cancelAnimationFrame` if there are no frames left. This can
1187 + * be much more efficient if there is a call pattern that alterns as
1188 + * "request-cancel-request-cancel-…".
1189 + * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
1190 + * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
1191 + callbacks = [];
1192 + callbacksCount = 0;
1193 + nextId = 1;
1194 + startId = 1;
1195 + isScheduled = false;
1196 + tick = (timestamp) => {
1197 + this.isScheduled = false;
1198 + const currentCallbacks = this.callbacks;
1199 + const currentCallbacksCount = this.callbacksCount;
1200 + this.callbacks = [];
1201 + this.callbacksCount = 0;
1202 + this.startId = this.nextId;
1203 + if (currentCallbacksCount > 0) {
1204 + for (let i = 0; i < currentCallbacks.length; i += 1) {
1205 + currentCallbacks[i]?.(timestamp);
1206 + }
1207 + }
1208 + };
1209 + request(fn) {
1210 + const id = this.nextId;
1211 + this.nextId += 1;
1212 + this.callbacks.push(fn);
1213 + this.callbacksCount += 1;
1214 + const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
1215 + if (!this.isScheduled || didRAFChange) {
1216 + requestAnimationFrame(this.tick);
1217 + this.isScheduled = true;
1218 + }
1219 + return id;
1220 + }
1221 + cancel(id) {
1222 + const index2 = id - this.startId;
1223 + if (index2 < 0 || index2 >= this.callbacks.length) {
1224 + return;
1225 + }
1226 + if (this.callbacks[index2] === null) {
1227 + return;
1228 + }
1229 + this.callbacks[index2] = null;
1230 + this.callbacksCount -= 1;
1231 + }
1232 +};
1233 +var scheduler = new Scheduler();
1234 +var AnimationFrame = class _AnimationFrame {
1235 + static create() {
1236 + return new _AnimationFrame();
1237 + }
1238 + static request(fn) {
1239 + return scheduler.request(fn);
1240 + }
1241 + static cancel(id) {
1242 + return scheduler.cancel(id);
1243 + }
1244 + currentId = EMPTY;
1245 + /**
1246 + * Executes `fn` after `delay`, clearing any previously scheduled call.
1247 + */
1248 + request(fn) {
1249 + this.cancel();
1250 + this.currentId = scheduler.request(() => {
1251 + this.currentId = EMPTY;
1252 + fn();
1253 + });
1254 + }
1255 + cancel = () => {
1256 + if (this.currentId !== EMPTY) {
1257 + scheduler.cancel(this.currentId);
1258 + this.currentId = EMPTY;
1259 + }
1260 + };
1261 + disposeEffect = () => {
1262 + return this.cancel;
1263 + };
1264 +};
1265 +function useAnimationFrame() {
1266 + const timeout = useRefWithInit(AnimationFrame.create).current;
1267 + useOnMount(timeout.disposeEffect);
1268 + return timeout;
1269 +}
1270 +
1271 +// node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1272 +function useTransitionStatus(open2, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
1273 + const [transitionStatus, setTransitionStatus] = React9.useState(open2 && enableIdleState ? "idle" : void 0);
1274 + const [mounted, setMounted] = React9.useState(open2 && !animateInitialOpen);
1275 + if (open2 && !mounted) {
1276 + setMounted(true);
1277 + setTransitionStatus("starting");
1278 + }
1279 + if (!open2 && mounted && transitionStatus !== "ending" && !deferEndingState) {
1280 + setTransitionStatus("ending");
1281 + }
1282 + if (!open2 && !mounted && transitionStatus === "ending") {
1283 + setTransitionStatus(void 0);
1284 + }
1285 + useIsoLayoutEffect(() => {
1286 + if (!open2 && mounted && transitionStatus !== "ending" && deferEndingState) {
1287 + const frame = AnimationFrame.request(() => {
1288 + setTransitionStatus("ending");
1289 + });
1290 + return () => {
1291 + AnimationFrame.cancel(frame);
1292 + };
1293 + }
1294 + return void 0;
1295 + }, [open2, mounted, transitionStatus, deferEndingState]);
1296 + useIsoLayoutEffect(() => {
1297 + if (!open2 || enableIdleState) {
1298 + return void 0;
1299 + }
1300 + const frame = AnimationFrame.request(() => {
1301 + setTransitionStatus(void 0);
1302 + });
1303 + return () => {
1304 + AnimationFrame.cancel(frame);
1305 + };
1306 + }, [enableIdleState, open2]);
1307 + useIsoLayoutEffect(() => {
1308 + if (!open2 || !enableIdleState) {
1309 + return void 0;
1310 + }
1311 + if (open2 && mounted && transitionStatus !== "idle") {
1312 + setTransitionStatus("starting");
1313 + }
1314 + const frame = AnimationFrame.request(() => {
1315 + setTransitionStatus("idle");
1316 + });
1317 + return () => {
1318 + AnimationFrame.cancel(frame);
1319 + };
1320 + }, [enableIdleState, open2, mounted, transitionStatus]);
1321 + return {
1322 + mounted,
1323 + setMounted,
1324 + transitionStatus
1325 + };
1326 +}
1327 +
1328 +// node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
1329 +var startingStyle = "data-starting-style";
1330 +var endingStyle = "data-ending-style";
1331 +
1332 +// node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1333 +var STARTING_HOOK = {
1334 + [startingStyle]: ""
1335 +};
1336 +var ENDING_HOOK = {
1337 + [endingStyle]: ""
1338 +};
1339 +var transitionStatusMapping = {
1340 + transitionStatus(value) {
1341 + if (value === "starting") {
1342 + return STARTING_HOOK;
1343 + }
1344 + if (value === "ending") {
1345 + return ENDING_HOOK;
1346 + }
1347 + return null;
1348 + }
1349 +};
1350 +
1351 +// node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1352 +function hasWindow() {
1353 + return typeof window !== "undefined";
1354 +}
1355 +function getNodeName(node) {
1356 + if (isNode(node)) {
1357 + return (node.nodeName || "").toLowerCase();
1358 + }
1359 + return "#document";
1360 +}
1361 +function getWindow(node) {
1362 + var _node$ownerDocument;
1363 + return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1364 +}
1365 +function getDocumentElement(node) {
1366 + var _ref;
1367 + return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1368 +}
1369 +function isNode(value) {
1370 + if (!hasWindow()) {
1371 + return false;
1372 + }
1373 + return value instanceof Node || value instanceof getWindow(value).Node;
1374 +}
1375 +function isElement(value) {
1376 + if (!hasWindow()) {
1377 + return false;
1378 + }
1379 + return value instanceof Element || value instanceof getWindow(value).Element;
1380 +}
1381 +function isHTMLElement(value) {
1382 + if (!hasWindow()) {
1383 + return false;
1384 + }
1385 + return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1386 +}
1387 +function isShadowRoot(value) {
1388 + if (!hasWindow() || typeof ShadowRoot === "undefined") {
1389 + return false;
1390 + }
1391 + return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1392 +}
1393 +function isOverflowElement(element) {
1394 + const {
1395 + overflow,
1396 + overflowX,
1397 + overflowY,
1398 + display
1399 + } = getComputedStyle2(element);
1400 + return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1401 +}
1402 +function isTableElement(element) {
1403 + return /^(table|td|th)$/.test(getNodeName(element));
1404 +}
1405 +function isTopLayer(element) {
1406 + try {
1407 + if (element.matches(":popover-open")) {
1408 + return true;
1409 + }
1410 + } catch (_e) {
1411 + }
1412 + try {
1413 + return element.matches(":modal");
1414 + } catch (_e) {
1415 + return false;
1416 + }
1417 +}
1418 +var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1419 +var containRe = /paint|layout|strict|content/;
1420 +var isNotNone = (value) => !!value && value !== "none";
1421 +var isWebKitValue;
1422 +function isContainingBlock(elementOrCss) {
1423 + const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1424 + return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
1425 +}
1426 +function getContainingBlock(element) {
1427 + let currentNode = getParentNode(element);
1428 + while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1429 + if (isContainingBlock(currentNode)) {
1430 + return currentNode;
1431 + } else if (isTopLayer(currentNode)) {
1432 + return null;
1433 + }
1434 + currentNode = getParentNode(currentNode);
1435 + }
1436 + return null;
1437 +}
1438 +function isWebKit() {
1439 + if (isWebKitValue == null) {
1440 + isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1441 + }
1442 + return isWebKitValue;
1443 +}
1444 +function isLastTraversableNode(node) {
1445 + return /^(html|body|#document)$/.test(getNodeName(node));
1446 +}
1447 +function getComputedStyle2(element) {
1448 + return getWindow(element).getComputedStyle(element);
1449 +}
1450 +function getNodeScroll(element) {
1451 + if (isElement(element)) {
1452 + return {
1453 + scrollLeft: element.scrollLeft,
1454 + scrollTop: element.scrollTop
1455 + };
1456 + }
1457 + return {
1458 + scrollLeft: element.scrollX,
1459 + scrollTop: element.scrollY
1460 + };
1461 +}
1462 +function getParentNode(node) {
1463 + if (getNodeName(node) === "html") {
1464 + return node;
1465 + }
1466 + const result = (
1467 + // Step into the shadow DOM of the parent of a slotted node.
1468 + node.assignedSlot || // DOM Element detected.
1469 + node.parentNode || // ShadowRoot detected.
1470 + isShadowRoot(node) && node.host || // Fallback.
1471 + getDocumentElement(node)
1472 + );
1473 + return isShadowRoot(result) ? result.host : result;
1474 +}
1475 +function getNearestOverflowAncestor(node) {
1476 + const parentNode = getParentNode(node);
1477 + if (isLastTraversableNode(parentNode)) {
1478 + return (node.ownerDocument || node).body;
1479 + }
1480 + if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1481 + return parentNode;
1482 + }
1483 + return getNearestOverflowAncestor(parentNode);
1484 +}
1485 +function getOverflowAncestors(node, list, traverseIframes) {
1486 + var _node$ownerDocument2;
1487 + if (list === void 0) {
1488 + list = [];
1489 + }
1490 + if (traverseIframes === void 0) {
1491 + traverseIframes = true;
1492 + }
1493 + const scrollableAncestor = getNearestOverflowAncestor(node);
1494 + const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1495 + const win = getWindow(scrollableAncestor);
1496 + if (isBody) {
1497 + const frameElement = getFrameElement(win);
1498 + return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1499 + } else {
1500 + return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1501 + }
1502 +}
1503 +function getFrameElement(win) {
1504 + return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1505 +}
1506 +
1507 +// node_modules/@base-ui/utils/owner.mjs
1508 +function ownerDocument(node) {
1509 + return node?.ownerDocument || document;
1510 +}
1511 +
1512 +// node_modules/@base-ui/utils/addEventListener.mjs
1513 +function addEventListener(target, type, listener, options) {
1514 + target.addEventListener(type, listener, options);
1515 + return () => {
1516 + target.removeEventListener(type, listener, options);
1517 + };
1518 +}
1519 +
1520 +// node_modules/@base-ui/utils/useValueAsRef.mjs
1521 +function useValueAsRef(value) {
1522 + const latest = useRefWithInit(createLatestRef, value).current;
1523 + latest.next = value;
1524 + useIsoLayoutEffect(latest.effect);
1525 + return latest;
1526 +}
1527 +function createLatestRef(value) {
1528 + const latest = {
1529 + current: value,
1530 + next: value,
1531 + effect: () => {
1532 + latest.current = latest.next;
1533 + }
1534 + };
1535 + return latest;
1536 +}
1537 +
1538 +// node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1539 +var React10 = __toESM(require_react(), 1);
1540 +
1541 +// node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1542 +var ReactDOM = __toESM(require_react_dom(), 1);
1543 +
1544 +// node_modules/@base-ui/react/utils/resolveRef.mjs
1545 +function resolveRef(maybeRef) {
1546 + if (maybeRef == null) {
1547 + return maybeRef;
1548 + }
1549 + return "current" in maybeRef ? maybeRef.current : maybeRef;
1550 +}
1551 +
1552 +// node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1553 +var pendingCallbacks = null;
1554 +function flushBeforePaint(fn) {
1555 + if (!pendingCallbacks) {
1556 + const callbacks = [];
1557 + pendingCallbacks = callbacks;
1558 + queueMicrotask(() => {
1559 + pendingCallbacks = null;
1560 + ReactDOM.flushSync(() => {
1561 + for (const callback of callbacks) {
1562 + callback();
1563 + }
1564 + });
1565 + });
1566 + }
1567 + pendingCallbacks.push(fn);
1568 +}
1569 +function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
1570 + const frame = useAnimationFrame();
1571 + return useStableCallback((fnToExecute, signal = null) => {
1572 + frame.cancel();
1573 + const element = resolveRef(elementOrRef);
1574 + if (element == null) {
1575 + return;
1576 + }
1577 + const resolvedElement = element;
1578 + const done = () => {
1579 + if (!batch) {
1580 + ReactDOM.flushSync(fnToExecute);
1581 + return;
1582 + }
1583 + flushBeforePaint(() => {
1584 + if (!signal?.aborted) {
1585 + fnToExecute();
1586 + }
1587 + });
1588 + };
1589 + if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1590 + fnToExecute();
1591 + return;
1592 + }
1593 + function exec() {
1594 + Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1595 + if (!signal?.aborted) {
1596 + done();
1597 + }
1598 + }, () => {
1599 + if (signal?.aborted) {
1600 + return;
1601 + }
1602 + const currentAnimations = resolvedElement.getAnimations();
1603 + if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1604 + exec();
1605 + return;
1606 + }
1607 + done();
1608 + });
1609 + }
1610 + if (waitForStartingStyleRemoved) {
1611 + const startingStyleAttribute = startingStyle;
1612 + if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1613 + frame.request(exec);
1614 + return;
1615 + }
1616 + const attributeObserver = new MutationObserver(() => {
1617 + if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1618 + attributeObserver.disconnect();
1619 + exec();
1620 + }
1621 + });
1622 + attributeObserver.observe(resolvedElement, {
1623 + attributes: true,
1624 + attributeFilter: [startingStyleAttribute]
1625 + });
1626 + signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1627 + once: true
1628 + });
1629 + return;
1630 + }
1631 + frame.request(exec);
1632 + });
1633 +}
1634 +
1635 +// node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1636 +function useOpenChangeComplete(parameters) {
1637 + const {
1638 + enabled = true,
1639 + open: open2,
1640 + ref,
1641 + batch = false,
1642 + onComplete: onCompleteParam
1643 + } = parameters;
1644 + const onComplete = useStableCallback(onCompleteParam);
1645 + const runOnceAnimationsFinish = useAnimationsFinished(ref, open2, batch);
1646 + React10.useEffect(() => {
1647 + if (!enabled) {
1648 + return void 0;
1649 + }
1650 + const abortController = new AbortController();
1651 + runOnceAnimationsFinish(onComplete, abortController.signal);
1652 + return () => {
1653 + abortController.abort();
1654 + };
1655 + }, [enabled, open2, onComplete, runOnceAnimationsFinish]);
1656 +}
1657 +
1658 +// node_modules/@base-ui/utils/platform/parts.mjs
1659 +var parts_exports = {};
1660 +__export(parts_exports, {
1661 + engine: () => engine_exports,
1662 + env: () => env_exports,
1663 + mediaQuery: () => media_query_exports,
1664 + os: () => os_exports,
1665 + screenReader: () => screen_reader_exports
1666 +});
1667 +
1668 +// node_modules/@base-ui/utils/platform/os.mjs
1669 +var os_exports = {};
1670 +__export(os_exports, {
1671 + android: () => android,
1672 + apple: () => apple,
1673 + ios: () => ios,
1674 + linux: () => linux,
1675 + mac: () => mac,
1676 + windows: () => windows
1677 +});
1678 +
1679 +// node_modules/@base-ui/utils/platform/shared.mjs
1680 +function readRawData() {
1681 + if (typeof navigator === "undefined") {
1682 + return {
1683 + userAgent: "",
1684 + platform: "",
1685 + maxTouchPoints: 0
1686 + };
1687 + }
1688 + if (true) {
1689 + const uaData = navigator.userAgentData;
1690 + if (uaData && Array.isArray(uaData.brands)) {
1691 + return {
1692 + userAgent: uaData.brands.map(({
1693 + brand,
1694 + version: version2
1695 + }) => `${brand}/${version2}`).join(" "),
1696 + platform: uaData.platform ?? navigator.platform ?? "",
1697 + maxTouchPoints: navigator.maxTouchPoints ?? 0
1698 + };
1699 + }
1700 + }
1701 + return {
1702 + userAgent: navigator.userAgent,
1703 + platform: navigator.platform ?? "",
1704 + maxTouchPoints: navigator.maxTouchPoints ?? 0
1705 + };
1706 +}
1707 +var {
1708 + userAgent,
1709 + platform,
1710 + maxTouchPoints
1711 +} = readRawData();
1712 +var lowerUserAgent = userAgent.toLowerCase();
1713 +var lowerPlatform = platform.toLowerCase();
1714 +
1715 +// node_modules/@base-ui/utils/platform/os.mjs
1716 +var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
1717 +var ANDROID_STRING = "android";
1718 +var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
1719 +var mac = !ios && lowerPlatform.startsWith("mac");
1720 +var windows = lowerPlatform.startsWith("win");
1721 +var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
1722 +var apple = mac || ios;
1723 +
1724 +// node_modules/@base-ui/utils/platform/engine.mjs
1725 +var engine_exports = {};
1726 +__export(engine_exports, {
1727 + blink: () => blink,
1728 + gecko: () => gecko,
1729 + webkit: () => webkit
1730 +});
1731 +var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
1732 +var gecko = !webkit && lowerUserAgent.includes("firefox");
1733 +var blink = !webkit && lowerUserAgent.includes("chrom");
1734 +
1735 +// node_modules/@base-ui/utils/platform/screen-reader.mjs
1736 +var screen_reader_exports = {};
1737 +__export(screen_reader_exports, {
1738 + voiceOver: () => voiceOver
1739 +});
1740 +var voiceOver = apple;
1741 +
1742 +// node_modules/@base-ui/utils/platform/env.mjs
1743 +var env_exports = {};
1744 +__export(env_exports, {
1745 + jsdom: () => jsdom
1746 +});
1747 +var jsdom = /jsdom|happydom/.test(lowerUserAgent);
1748 +
1749 +// node_modules/@base-ui/utils/platform/media-query.mjs
1750 +var media_query_exports = {};
1751 +__export(media_query_exports, {
1752 + iOS: () => iOS
1753 +});
1754 +var iOS = "@supports (-webkit-touch-callout: none)";
1755 +
1756 +// node_modules/@base-ui/utils/useTimeout.mjs
1757 +var EMPTY2 = 0;
1758 +var Timeout = class _Timeout {
1759 + static create() {
1760 + return new _Timeout();
1761 + }
1762 + currentId = EMPTY2;
1763 + /**
1764 + * Executes `fn` after `delay`, clearing any previously scheduled call.
1765 + */
1766 + start(delay, fn) {
1767 + this.clear();
1768 + this.currentId = setTimeout(() => {
1769 + this.currentId = EMPTY2;
1770 + fn();
1771 + }, delay);
1772 + }
1773 + isStarted() {
1774 + return this.currentId !== EMPTY2;
1775 + }
1776 + clear = () => {
1777 + if (this.currentId !== EMPTY2) {
1778 + clearTimeout(this.currentId);
1779 + this.currentId = EMPTY2;
1780 + }
1781 + };
1782 + disposeEffect = () => {
1783 + return this.clear;
1784 + };
1785 +};
1786 +function useTimeout() {
1787 + const timeout = useRefWithInit(Timeout.create).current;
1788 + useOnMount(timeout.disposeEffect);
1789 + return timeout;
1790 +}
1791 +
1792 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1793 +var React11 = __toESM(require_react(), 1);
1794 +
1795 +// node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
1796 +function isReactEvent(event) {
1797 + return "nativeEvent" in event;
1798 +}
1799 +function isVirtualClick(event) {
1800 + if (event.pointerType === "" && event.isTrusted) {
1801 + return true;
1802 + }
1803 + if (parts_exports.os.android && event.pointerType) {
1804 + return event.type === "click" && event.buttons === 1;
1805 + }
1806 + return event.detail === 0 && !event.pointerType;
1807 +}
1808 +function isMouseLikePointerType(pointerType, strict) {
1809 + const values = ["mouse", "pen"];
1810 + if (!strict) {
1811 + values.push("", void 0);
1812 + }
1813 + return values.includes(pointerType);
1814 +}
1815 +function isClickLikeEvent(event) {
1816 + const type = event.type;
1817 + return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
1818 +}
1819 +
1820 +// node_modules/@base-ui/utils/shadowDom.mjs
1821 +function activeElement(doc) {
1822 + let element = doc.activeElement;
1823 + while (element?.shadowRoot?.activeElement != null) {
1824 + element = element.shadowRoot.activeElement;
1825 + }
1826 + return element;
1827 +}
1828 +function contains(parent, child) {
1829 + if (!parent || !child) {
1830 + return false;
1831 + }
1832 + const rootNode = child.getRootNode?.();
1833 + if (parent.contains(child)) {
1834 + return true;
1835 + }
1836 + if (rootNode && isShadowRoot(rootNode)) {
1837 + let next = child;
1838 + while (next) {
1839 + if (parent === next) {
1840 + return true;
1841 + }
1842 + next = next.parentNode || next.host;
1843 + }
1844 + }
1845 + return false;
1846 +}
1847 +function getTarget(event) {
1848 + if ("composedPath" in event) {
1849 + return event.composedPath()[0] ?? event.target;
1850 + }
1851 + return event.target;
1852 +}
1853 +
1854 +// node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
1855 +var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
1856 +var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
1857 +
1858 +// node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
1859 +var open = "data-open";
1860 +var closed = "data-closed";
1861 +var anchorHidden = "data-anchor-hidden";
1862 +
1863 +// node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
1864 +var CommonTriggerDataAttributes_exports = {};
1865 +__export(CommonTriggerDataAttributes_exports, {
1866 + popupOpen: () => popupOpen,
1867 + pressed: () => pressed
1868 +});
1869 +var popupOpen = "data-popup-open";
1870 +var pressed = "data-pressed";
1871 +
1872 +// node_modules/@base-ui/react/utils/popupStateMapping.mjs
1873 +var TRIGGER_HOOK = {
1874 + [popupOpen]: ""
1875 +};
1876 +var PRESSABLE_TRIGGER_HOOK = {
1877 + [popupOpen]: "",
1878 + [pressed]: ""
1879 +};
1880 +var POPUP_OPEN_HOOK = {
1881 + [open]: ""
1882 +};
1883 +var POPUP_CLOSED_HOOK = {
1884 + [closed]: ""
1885 +};
1886 +var ANCHOR_HIDDEN_HOOK = {
1887 + [anchorHidden]: ""
1888 +};
1889 +var triggerOpenStateMapping = {
1890 + open(value) {
1891 + if (value) {
1892 + return TRIGGER_HOOK;
1893 + }
1894 + return null;
1895 + }
1896 +};
1897 +var popupStateMapping = {
1898 + open(value) {
1899 + if (value) {
1900 + return POPUP_OPEN_HOOK;
1901 + }
1902 + return POPUP_CLOSED_HOOK;
1903 + },
1904 + anchorHidden(value) {
1905 + if (value) {
1906 + return ANCHOR_HIDDEN_HOOK;
1907 + }
1908 + return null;
1909 + }
1910 +};
1911 +var popupTransitionStateMapping = {
1912 + ...popupStateMapping,
1913 + ...transitionStatusMapping
1914 +};
1915 +
1916 +// node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs
1917 +var popupOpen2 = CommonTriggerDataAttributes_exports.popupOpen;
1918 +var triggerDisabled = "data-trigger-disabled";
1919 +
1920 +// node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
1921 +function isTargetInsideEnabledTrigger(target, triggerElements) {
1922 + if (!isElement(target)) {
1923 + return false;
1924 + }
1925 + const targetElement = target;
1926 + if (triggerElements.hasElement(targetElement)) {
1927 + return !targetElement.hasAttribute(triggerDisabled);
1928 + }
1929 + for (const [, trigger] of triggerElements.entries()) {
1930 + if (contains(trigger, targetElement)) {
1931 + return !trigger.hasAttribute(triggerDisabled);
1932 + }
1933 + }
1934 + return false;
1935 +}
1936 +function isEventTargetWithin(event, node) {
1937 + if (node == null) {
1938 + return false;
1939 + }
1940 + if ("composedPath" in event) {
1941 + return event.composedPath().includes(node);
1942 + }
1943 + const eventAgain = event;
1944 + return eventAgain.target != null && node.contains(eventAgain.target);
1945 +}
1946 +function isRootElement(element) {
1947 + return element.matches("html,body");
1948 +}
1949 +function isTypeableElement(element) {
1950 + return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
1951 +}
1952 +function isInteractiveElement(element) {
1953 + return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${TYPEABLE_SELECTOR}`) != null;
1954 +}
1955 +function matchesFocusVisible(element) {
1956 + if (!element || parts_exports.env.jsdom) {
1957 + return true;
1958 + }
1959 + try {
1960 + return element.matches(":focus-visible");
1961 + } catch (_e) {
1962 + return true;
1963 + }
1964 +}
1965 +
1966 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
1967 +function resolveValue(value, pointerType) {
1968 + if (pointerType != null && !isMouseLikePointerType(pointerType)) {
1969 + return 0;
1970 + }
1971 + if (typeof value === "function") {
1972 + return value();
1973 + }
1974 + return value;
1975 +}
1976 +function getDelay(value, prop, pointerType) {
1977 + const result = resolveValue(value, pointerType);
1978 + if (typeof result === "number") {
1979 + return result;
1980 + }
1981 + return result?.[prop];
1982 +}
1983 +function getRestMs(value) {
1984 + if (typeof value === "function") {
1985 + return value();
1986 + }
1987 + return value;
1988 +}
1989 +function isClickLikeOpenEvent(openEventType, interactedInside) {
1990 + return interactedInside || openEventType === "click" || openEventType === "mousedown";
1991 +}
1992 +function isHoverOpenEvent(openEventType) {
1993 + return openEventType?.includes("mouse") && openEventType !== "mousedown";
1994 +}
1995 +
1996 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1997 +var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1998 +var FloatingDelayGroupContext = /* @__PURE__ */ React11.createContext({
1999 + hasProvider: false,
2000 + timeoutMs: 0,
2001 + delayRef: {
2002 + current: 0
2003 + },
2004 + initialDelayRef: {
2005 + current: 0
2006 + },
2007 + timeout: new Timeout(),
2008 + currentIdRef: {
2009 + current: null
2010 + },
2011 + currentContextRef: {
2012 + current: null
2013 + }
2014 +});
2015 +if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
2016 +function resetDelayRef(delayRef, initialDelayRef) {
2017 + delayRef.current = initialDelayRef.current;
2018 +}
2019 +function FloatingDelayGroup(props) {
2020 + const {
2021 + children,
2022 + delay,
2023 + timeoutMs = 0
2024 + } = props;
2025 + const delayRef = React11.useRef(delay);
2026 + const initialDelayRef = React11.useRef(delay);
2027 + const currentIdRef = React11.useRef(null);
2028 + const currentContextRef = React11.useRef(null);
2029 + const timeout = useTimeout();
2030 + useIsoLayoutEffect(() => {
2031 + initialDelayRef.current = delay;
2032 + if (!currentIdRef.current) {
2033 + delayRef.current = delay;
2034 + return;
2035 + }
2036 + delayRef.current = {
2037 + open: getDelay(delayRef.current, "open"),
2038 + close: getDelay(delay, "close")
2039 + };
2040 + }, [delay, currentIdRef, delayRef, initialDelayRef]);
2041 + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingDelayGroupContext.Provider, {
2042 + value: React11.useMemo(() => ({
2043 + hasProvider: true,
2044 + delayRef,
2045 + initialDelayRef,
2046 + currentIdRef,
2047 + timeoutMs,
2048 + currentContextRef,
2049 + timeout
2050 + }), [timeoutMs, timeout]),
2051 + children
2052 + });
2053 +}
2054 +function useDelayGroup(context, options = {
2055 + open: false
2056 +}) {
2057 + const {
2058 + open: open2
2059 + } = options;
2060 + const store = "rootStore" in context ? context.rootStore : context;
2061 + const floatingId = store.useState("floatingId");
2062 + const groupContext = React11.useContext(FloatingDelayGroupContext);
2063 + const {
2064 + currentIdRef,
2065 + delayRef,
2066 + timeoutMs,
2067 + initialDelayRef,
2068 + currentContextRef,
2069 + hasProvider,
2070 + timeout
2071 + } = groupContext;
2072 + const [isInstantPhase, setIsInstantPhase] = React11.useState(false);
2073 + const openRef = React11.useRef(open2);
2074 + useIsoLayoutEffect(() => {
2075 + openRef.current = open2;
2076 + }, [open2]);
2077 + useIsoLayoutEffect(() => {
2078 + function unset() {
2079 + currentContextRef.current?.setIsInstantPhase(false);
2080 + currentIdRef.current = null;
2081 + currentContextRef.current = null;
2082 + delayRef.current = initialDelayRef.current;
2083 + timeout.clear();
2084 + }
2085 + if (!currentIdRef.current) {
2086 + return void 0;
2087 + }
2088 + if (!open2 && currentIdRef.current === floatingId) {
2089 + setIsInstantPhase(false);
2090 + if (timeoutMs) {
2091 + const closingId = floatingId;
2092 + timeout.start(timeoutMs, () => {
2093 + if (store.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
2094 + return;
2095 + }
2096 + unset();
2097 + });
2098 + return () => {
2099 + if (openRef.current || currentIdRef.current !== closingId) {
2100 + timeout.clear();
2101 + }
2102 + };
2103 + }
2104 + unset();
2105 + }
2106 + return void 0;
2107 + }, [open2, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store]);
2108 + useIsoLayoutEffect(() => {
2109 + if (!open2) {
2110 + return;
2111 + }
2112 + const prevContext = currentContextRef.current;
2113 + const prevId = currentIdRef.current;
2114 + timeout.clear();
2115 + currentContextRef.current = {
2116 + onOpenChange: store.setOpen,
2117 + setIsInstantPhase
2118 + };
2119 + currentIdRef.current = floatingId;
2120 + delayRef.current = {
2121 + open: 0,
2122 + close: getDelay(initialDelayRef.current, "close")
2123 + };
2124 + if (prevId !== null && prevId !== floatingId) {
2125 + setIsInstantPhase(true);
2126 + prevContext?.setIsInstantPhase(true);
2127 + prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
2128 + } else {
2129 + setIsInstantPhase(false);
2130 + prevContext?.setIsInstantPhase(false);
2131 + }
2132 + }, [open2, floatingId, store, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
2133 + useIsoLayoutEffect(() => {
2134 + return () => {
2135 + if (currentIdRef.current === floatingId) {
2136 + currentContextRef.current = null;
2137 + if (!openRef.current) {
2138 + return;
2139 + }
2140 + currentIdRef.current = null;
2141 + resetDelayRef(delayRef, initialDelayRef);
2142 + timeout.clear();
2143 + }
2144 + };
2145 + }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
2146 + return React11.useMemo(() => ({
2147 + activeIdRef: currentIdRef,
2148 + hasProvider,
2149 + delayRef,
2150 + isInstantPhase
2151 + }), [currentIdRef, hasProvider, delayRef, isInstantPhase]);
2152 +}
2153 +
2154 +// node_modules/@base-ui/utils/mergeCleanups.mjs
2155 +function mergeCleanups(...cleanups) {
2156 + return () => {
2157 + for (let i = 0; i < cleanups.length; i += 1) {
2158 + const cleanup = cleanups[i];
2159 + if (cleanup) {
2160 + cleanup();
2161 + }
2162 + }
2163 + };
2164 +}
2165 +
2166 +// node_modules/@base-ui/react/utils/FocusGuard.mjs
2167 +var React12 = __toESM(require_react(), 1);
2168 +
2169 +// node_modules/@base-ui/utils/visuallyHidden.mjs
2170 +var visuallyHiddenBase = {
2171 + clipPath: "inset(50%)",
2172 + overflow: "hidden",
2173 + whiteSpace: "nowrap",
2174 + border: 0,
2175 + padding: 0,
2176 + width: 1,
2177 + height: 1,
2178 + margin: -1
2179 +};
2180 +var visuallyHidden = {
2181 + ...visuallyHiddenBase,
2182 + position: "fixed",
2183 + top: 0,
2184 + left: 0
2185 +};
2186 +var visuallyHiddenInput = {
2187 + ...visuallyHiddenBase,
2188 + position: "absolute"
2189 +};
2190 +
2191 +// node_modules/@base-ui/react/utils/FocusGuard.mjs
2192 +var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
2193 +var FocusGuard = /* @__PURE__ */ React12.forwardRef(function FocusGuard2(props, ref) {
2194 + const [role, setRole] = React12.useState();
2195 + useIsoLayoutEffect(() => {
2196 + if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
2197 + setRole("button");
2198 + }
2199 + }, []);
2200 + const restProps = {
2201 + tabIndex: 0,
2202 + // Role is only for VoiceOver
2203 + role
2204 + };
2205 + return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
2206 + ...props,
2207 + ref,
2208 + style: visuallyHidden,
2209 + "aria-hidden": role ? void 0 : true,
2210 + ...restProps,
2211 + "data-base-ui-focus-guard": ""
2212 + });
2213 +});
2214 +if (true) FocusGuard.displayName = "FocusGuard";
2215 +
2216 +// node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2217 +var min = Math.min;
2218 +var max = Math.max;
2219 +var round = Math.round;
2220 +var floor = Math.floor;
2221 +var createCoords = (v2) => ({
2222 + x: v2,
2223 + y: v2
2224 +});
2225 +var oppositeSideMap = {
2226 + left: "right",
2227 + right: "left",
2228 + bottom: "top",
2229 + top: "bottom"
2230 +};
2231 +function clamp(start, value, end) {
2232 + return max(start, min(value, end));
2233 +}
2234 +function evaluate(value, param) {
2235 + return typeof value === "function" ? value(param) : value;
2236 +}
2237 +function getSide(placement) {
2238 + return placement.split("-")[0];
2239 +}
2240 +function getAlignment(placement) {
2241 + return placement.split("-")[1];
2242 +}
2243 +function getOppositeAxis(axis) {
2244 + return axis === "x" ? "y" : "x";
2245 +}
2246 +function getAxisLength(axis) {
2247 + return axis === "y" ? "height" : "width";
2248 +}
2249 +function getSideAxis(placement) {
2250 + const firstChar = placement[0];
2251 + return firstChar === "t" || firstChar === "b" ? "y" : "x";
2252 +}
2253 +function getAlignmentAxis(placement) {
2254 + return getOppositeAxis(getSideAxis(placement));
2255 +}
2256 +function getAlignmentSides(placement, rects, rtl) {
2257 + if (rtl === void 0) {
2258 + rtl = false;
2259 + }
2260 + const alignment = getAlignment(placement);
2261 + const alignmentAxis = getAlignmentAxis(placement);
2262 + const length = getAxisLength(alignmentAxis);
2263 + let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2264 + if (rects.reference[length] > rects.floating[length]) {
2265 + mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2266 + }
2267 + return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2268 +}
2269 +function getExpandedPlacements(placement) {
2270 + const oppositePlacement = getOppositePlacement(placement);
2271 + return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2272 +}
2273 +function getOppositeAlignmentPlacement(placement) {
2274 + return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
2275 +}
2276 +var lrPlacement = ["left", "right"];
2277 +var rlPlacement = ["right", "left"];
2278 +var tbPlacement = ["top", "bottom"];
2279 +var btPlacement = ["bottom", "top"];
2280 +function getSideList(side, isStart, rtl) {
2281 + switch (side) {
2282 + case "top":
2283 + case "bottom":
2284 + if (rtl) return isStart ? rlPlacement : lrPlacement;
2285 + return isStart ? lrPlacement : rlPlacement;
2286 + case "left":
2287 + case "right":
2288 + return isStart ? tbPlacement : btPlacement;
2289 + default:
2290 + return [];
2291 + }
2292 +}
2293 +function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2294 + const alignment = getAlignment(placement);
2295 + let list = getSideList(getSide(placement), direction === "start", rtl);
2296 + if (alignment) {
2297 + list = list.map((side) => side + "-" + alignment);
2298 + if (flipAlignment) {
2299 + list = list.concat(list.map(getOppositeAlignmentPlacement));
2300 + }
2301 + }
2302 + return list;
2303 +}
2304 +function getOppositePlacement(placement) {
2305 + const side = getSide(placement);
2306 + return oppositeSideMap[side] + placement.slice(side.length);
2307 +}
2308 +function expandPaddingObject(padding) {
2309 + var _padding$top, _padding$right, _padding$bottom, _padding$left;
2310 + return {
2311 + top: (_padding$top = padding.top) != null ? _padding$top : 0,
2312 + right: (_padding$right = padding.right) != null ? _padding$right : 0,
2313 + bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
2314 + left: (_padding$left = padding.left) != null ? _padding$left : 0
2315 + };
2316 +}
2317 +function getPaddingObject(padding) {
2318 + return typeof padding !== "number" ? expandPaddingObject(padding) : {
2319 + top: padding,
2320 + right: padding,
2321 + bottom: padding,
2322 + left: padding
2323 + };
2324 +}
2325 +function rectToClientRect(rect) {
2326 + const {
2327 + x: x2,
2328 + y: y2,
2329 + width,
2330 + height
2331 + } = rect;
2332 + return {
2333 + width,
2334 + height,
2335 + top: y2,
2336 + left: x2,
2337 + right: x2 + width,
2338 + bottom: y2 + height,
2339 + x: x2,
2340 + y: y2
2341 + };
2342 +}
2343 +
2344 +// node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2345 +function isHiddenByStyles(styles) {
2346 + return styles.visibility === "hidden" || styles.visibility === "collapse";
2347 +}
2348 +function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
2349 + if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
2350 + return false;
2351 + }
2352 + if (typeof element.checkVisibility === "function") {
2353 + return element.checkVisibility();
2354 + }
2355 + return styles.display !== "none" && styles.display !== "contents";
2356 +}
2357 +
2358 +// node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
2359 +var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
2360 +function getParentElement(element) {
2361 + const assignedSlot = element.assignedSlot;
2362 + if (assignedSlot) {
2363 + return assignedSlot;
2364 + }
2365 + if (element.parentElement) {
2366 + return element.parentElement;
2367 + }
2368 + const rootNode = element.getRootNode();
2369 + return isShadowRoot(rootNode) ? rootNode.host : null;
2370 +}
2371 +function getDetailsSummary(details) {
2372 + for (const child of Array.from(details.children)) {
2373 + if (getNodeName(child) === "summary") {
2374 + return child;
2375 + }
2376 + }
2377 + return null;
2378 +}
2379 +function isWithinOpenDetailsSummary(element, details) {
2380 + const summary = getDetailsSummary(details);
2381 + return !!summary && (element === summary || contains(summary, element));
2382 +}
2383 +function isFocusableCandidate(element) {
2384 + const nodeName = element ? getNodeName(element) : "";
2385 + return element != null && element.matches(CANDIDATE_SELECTOR) && (nodeName !== "summary" || element.parentElement != null && getNodeName(element.parentElement) === "details" && getDetailsSummary(element.parentElement) === element) && (nodeName !== "details" || getDetailsSummary(element) == null) && (nodeName !== "input" || element.type !== "hidden");
2386 +}
2387 +function isFocusableElement(element) {
2388 + if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
2389 + return false;
2390 + }
2391 + for (let current = element; current; current = getParentElement(current)) {
2392 + const isAncestor = current !== element;
2393 + const isSlot = getNodeName(current) === "slot";
2394 + if (current.hasAttribute("inert")) {
2395 + return false;
2396 + }
2397 + if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
2398 + return false;
2399 + }
2400 + }
2401 + return true;
2402 +}
2403 +function isVisibleInTabbableTree(element, isAncestor) {
2404 + const styles = getComputedStyle2(element);
2405 + if (!isAncestor) {
2406 + return isElementVisible(element, styles);
2407 + }
2408 + return styles.display !== "none";
2409 +}
2410 +function getTabIndex(element) {
2411 + const tabIndex = element.tabIndex;
2412 + if (tabIndex < 0) {
2413 + const nodeName = getNodeName(element);
2414 + if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
2415 + return 0;
2416 + }
2417 + }
2418 + return tabIndex;
2419 +}
2420 +function getNamedRadioInput(element) {
2421 + if (getNodeName(element) !== "input") {
2422 + return null;
2423 + }
2424 + const input = element;
2425 + return input.type === "radio" && input.name !== "" ? input : null;
2426 +}
2427 +function isTabbableRadio(element, candidates) {
2428 + const input = getNamedRadioInput(element);
2429 + if (!input) {
2430 + return true;
2431 + }
2432 + const checkedRadio = candidates.find((candidate) => {
2433 + const radio = getNamedRadioInput(candidate);
2434 + return radio?.name === input.name && radio.form === input.form && radio.checked;
2435 + });
2436 + if (checkedRadio) {
2437 + return checkedRadio === input;
2438 + }
2439 + return candidates.find((candidate) => {
2440 + const radio = getNamedRadioInput(candidate);
2441 + return radio?.name === input.name && radio.form === input.form;
2442 + }) === input;
2443 +}
2444 +function getComposedChildren(container) {
2445 + if (isHTMLElement(container) && getNodeName(container) === "slot") {
2446 + const assignedElements = container.assignedElements({
2447 + flatten: true
2448 + });
2449 + if (assignedElements.length > 0) {
2450 + return assignedElements;
2451 + }
2452 + }
2453 + if (isHTMLElement(container) && container.shadowRoot) {
2454 + return Array.from(container.shadowRoot.children);
2455 + }
2456 + return Array.from(container.children);
2457 +}
2458 +function appendCandidates(container, list) {
2459 + getComposedChildren(container).forEach((child) => {
2460 + if (isFocusableCandidate(child)) {
2461 + list.push(child);
2462 + }
2463 + appendCandidates(child, list);
2464 + });
2465 +}
2466 +function appendMatchingElements(container, selector, list) {
2467 + getComposedChildren(container).forEach((child) => {
2468 + if (isHTMLElement(child) && child.matches(selector)) {
2469 + list.push(child);
2470 + }
2471 + appendMatchingElements(child, selector, list);
2472 + });
2473 +}
2474 +function focusable(container) {
2475 + const candidates = [];
2476 + appendCandidates(container, candidates);
2477 + return candidates.filter(isFocusableElement);
2478 +}
2479 +function tabbable(container) {
2480 + const candidates = focusable(container);
2481 + return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
2482 +}
2483 +function getTabbableIn(container, dir) {
2484 + const list = tabbable(container);
2485 + const len = list.length;
2486 + if (len === 0) {
2487 + return void 0;
2488 + }
2489 + const active = activeElement(ownerDocument(container));
2490 + const index2 = list.indexOf(active);
2491 + const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
2492 + return list[nextIndex];
2493 +}
2494 +function getNextTabbable(referenceElement) {
2495 + return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
2496 +}
2497 +function getPreviousTabbable(referenceElement) {
2498 + return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
2499 +}
2500 +function isOutsideEvent(event, container) {
2501 + const containerElement = container || event.currentTarget;
2502 + const relatedTarget = event.relatedTarget;
2503 + return !relatedTarget || !contains(containerElement, relatedTarget);
2504 +}
2505 +function disableFocusInside(container) {
2506 + const tabbableElements = tabbable(container);
2507 + tabbableElements.forEach((element) => {
2508 + element.dataset.tabindex = element.getAttribute("tabindex") || "";
2509 + element.setAttribute("tabindex", "-1");
2510 + });
2511 +}
2512 +function enableFocusInside(container) {
2513 + const elements2 = [];
2514 + appendMatchingElements(container, "[data-tabindex]", elements2);
2515 + elements2.forEach((element) => {
2516 + const tabindex = element.dataset.tabindex;
2517 + delete element.dataset.tabindex;
2518 + if (tabindex) {
2519 + element.setAttribute("tabindex", tabindex);
2520 + } else {
2521 + element.removeAttribute("tabindex");
2522 + }
2523 + });
2524 +}
2525 +
2526 +// node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
2527 +function getNodeChildren(nodes, id, onlyOpenChildren = true) {
2528 + const directChildren = nodes.filter((node) => node.parentId === id);
2529 + return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
2530 +}
2531 +
2532 +// node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
2533 +function createAttribute(name2) {
2534 + return `data-base-ui-${name2}`;
2535 +}
2536 +
2537 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2538 +var React13 = __toESM(require_react(), 1);
2539 +var ReactDOM2 = __toESM(require_react_dom(), 1);
2540 +
2541 +// node_modules/@base-ui/react/internals/constants.mjs
2542 +var DISABLED_TRANSITIONS_STYLE = {
2543 + style: {
2544 + transition: "none"
2545 + }
2546 +};
2547 +var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
2548 +var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
2549 +var BASE_UI_SWIPE_IGNORE_SELECTOR = `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
2550 +var LEGACY_SWIPE_IGNORE_SELECTOR = `[${LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
2551 +var POPUP_COLLISION_AVOIDANCE = {
2552 + fallbackAxisSide: "end"
2553 +};
2554 +var ownerVisuallyHidden = {
2555 + clipPath: "inset(50%)",
2556 + position: "fixed",
2557 + top: 0,
2558 + left: 0
2559 +};
2560 +
2561 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2562 +var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
2563 +var PortalContext = /* @__PURE__ */ React13.createContext(null);
2564 +if (true) PortalContext.displayName = "PortalContext";
2565 +var usePortalContext = () => React13.useContext(PortalContext);
2566 +var attr = createAttribute("portal");
2567 +function useFloatingPortalNode(props = {}) {
2568 + const {
2569 + ref,
2570 + container: containerProp,
2571 + componentProps = EMPTY_OBJECT,
2572 + elementProps
2573 + } = props;
2574 + const uniqueId = useId();
2575 + const portalContext = usePortalContext();
2576 + const parentPortalNode = portalContext?.portalNode;
2577 + const [containerElement, setContainerElement] = React13.useState(null);
2578 + const [portalNode, setPortalNode] = React13.useState(null);
2579 + const setPortalNodeRef = useStableCallback((node) => {
2580 + if (node !== null) {
2581 + setPortalNode(node);
2582 + }
2583 + });
2584 + const containerRef = React13.useRef(null);
2585 + useIsoLayoutEffect(() => {
2586 + if (containerProp === null) {
2587 + if (containerRef.current) {
2588 + containerRef.current = null;
2589 + setPortalNode(null);
2590 + setContainerElement(null);
2591 + }
2592 + return;
2593 + }
2594 + const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
2595 + if (resolvedContainer == null) {
2596 + if (containerRef.current) {
2597 + containerRef.current = null;
2598 + setPortalNode(null);
2599 + setContainerElement(null);
2600 + }
2601 + return;
2602 + }
2603 + if (containerRef.current !== resolvedContainer) {
2604 + containerRef.current = resolvedContainer;
2605 + setPortalNode(null);
2606 + setContainerElement(resolvedContainer);
2607 + }
2608 + }, [containerProp, parentPortalNode]);
2609 + const portalElement = useRenderElement("div", componentProps, {
2610 + ref: [ref, setPortalNodeRef],
2611 + props: [{
2612 + id: uniqueId,
2613 + [attr]: ""
2614 + }, elementProps]
2615 + });
2616 + const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
2617 + return {
2618 + node: portalNode,
2619 + // `id` and `render` props can override or remove the generated ID. Use the exact
2620 + // rendered value so `aria-owns` never points at an ID absent from the DOM.
2621 + nodeId: /* @__PURE__ */ React13.isValidElement(portalElement) ? portalElement.props.id : void 0,
2622 + subtree: portalSubtree
2623 + };
2624 +}
2625 +var FloatingPortal = /* @__PURE__ */ React13.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
2626 + const {
2627 + render,
2628 + className,
2629 + style,
2630 + children,
2631 + container,
2632 + portalOwnerRole,
2633 + ...elementProps
2634 + } = componentProps;
2635 + const {
2636 + node: portalNode,
2637 + nodeId: portalNodeId,
2638 + subtree: portalSubtree
2639 + } = useFloatingPortalNode({
2640 + container,
2641 + ref: forwardedRef,
2642 + componentProps,
2643 + elementProps
2644 + });
2645 + const beforeOutsideRef = React13.useRef(null);
2646 + const afterOutsideRef = React13.useRef(null);
2647 + const beforeInsideRef = React13.useRef(null);
2648 + const afterInsideRef = React13.useRef(null);
2649 + const [focusManagerState, setFocusManagerState] = React13.useState(null);
2650 + const focusInsideDisabledRef = React13.useRef(false);
2651 + const modal = focusManagerState?.modal;
2652 + const open2 = focusManagerState?.open;
2653 + const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
2654 + React13.useEffect(() => {
2655 + if (!portalNode || modal) {
2656 + return void 0;
2657 + }
2658 + function onFocus(event) {
2659 + if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
2660 + if (event.type === "focusin") {
2661 + if (focusInsideDisabledRef.current) {
2662 + enableFocusInside(portalNode);
2663 + focusInsideDisabledRef.current = false;
2664 + }
2665 + } else {
2666 + disableFocusInside(portalNode);
2667 + focusInsideDisabledRef.current = true;
2668 + }
2669 + }
2670 + }
2671 + return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
2672 + }, [portalNode, modal]);
2673 + useIsoLayoutEffect(() => {
2674 + if (!portalNode || open2 !== true || !focusInsideDisabledRef.current) {
2675 + return;
2676 + }
2677 + enableFocusInside(portalNode);
2678 + focusInsideDisabledRef.current = false;
2679 + }, [open2, portalNode]);
2680 + const portalContextValue = React13.useMemo(() => ({
2681 + beforeOutsideRef,
2682 + afterOutsideRef,
2683 + beforeInsideRef,
2684 + afterInsideRef,
2685 + portalNode,
2686 + setFocusManagerState
2687 + }), [portalNode]);
2688 + return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React13.Fragment, {
2689 + children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PortalContext.Provider, {
2690 + value: portalContextValue,
2691 + children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2692 + "data-type": "outside",
2693 + ref: beforeOutsideRef,
2694 + onFocus: (event) => {
2695 + if (isOutsideEvent(event, portalNode)) {
2696 + beforeInsideRef.current?.focus();
2697 + } else {
2698 + const domReference = focusManagerState ? focusManagerState.domReference : null;
2699 + const prevTabbable = getPreviousTabbable(domReference);
2700 + prevTabbable?.focus();
2701 + }
2702 + }
2703 + }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
2704 + role: portalOwnerRole,
2705 + "aria-owns": portalNodeId,
2706 + style: ownerVisuallyHidden
2707 + }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2708 + "data-type": "outside",
2709 + ref: afterOutsideRef,
2710 + onFocus: (event) => {
2711 + if (isOutsideEvent(event, portalNode)) {
2712 + afterInsideRef.current?.focus();
2713 + } else {
2714 + const domReference = focusManagerState ? focusManagerState.domReference : null;
2715 + const nextTabbable = getNextTabbable(domReference);
2716 + nextTabbable?.focus();
2717 + if (focusManagerState?.closeOnFocusOut) {
2718 + focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
2719 + }
2720 + }
2721 + }
2722 + })]
2723 + })]
2724 + });
2725 +});
2726 +if (true) FloatingPortal.displayName = "FloatingPortal";
2727 +
2728 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2729 +var React14 = __toESM(require_react(), 1);
2730 +
2731 +// node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
2732 +function createEventEmitter() {
2733 + const map = /* @__PURE__ */ new Map();
2734 + return {
2735 + emit(event, data) {
2736 + map.get(event)?.forEach((listener) => listener(data));
2737 + },
2738 + on(event, listener) {
2739 + if (!map.has(event)) {
2740 + map.set(event, /* @__PURE__ */ new Set());
2741 + }
2742 + map.get(event).add(listener);
2743 + },
2744 + off(event, listener) {
2745 + map.get(event)?.delete(listener);
2746 + }
2747 + };
2748 +}
2749 +
2750 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2751 +var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2752 +var FloatingNodeContext = /* @__PURE__ */ React14.createContext(null);
2753 +if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
2754 +var FloatingTreeContext = /* @__PURE__ */ React14.createContext(null);
2755 +if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
2756 +var useFloatingParentNodeId = () => React14.useContext(FloatingNodeContext)?.id || null;
2757 +var useFloatingTree = (externalTree) => {
2758 + const contextTree = React14.useContext(FloatingTreeContext);
2759 + return externalTree ?? contextTree;
2760 +};
2761 +
2762 +// node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
2763 +var React15 = __toESM(require_react(), 1);
2764 +function createVirtualElement(domElement, data) {
2765 + let offsetX = null;
2766 + let offsetY = null;
2767 + let isAutoUpdateEvent = false;
2768 + return {
2769 + contextElement: domElement || void 0,
2770 + getBoundingClientRect() {
2771 + const domRect = domElement?.getBoundingClientRect() || {
2772 + width: 0,
2773 + height: 0,
2774 + x: 0,
2775 + y: 0
2776 + };
2777 + const isXAxis = data.axis === "x" || data.axis === "both";
2778 + const isYAxis = data.axis === "y" || data.axis === "both";
2779 + const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
2780 + let width = domRect.width;
2781 + let height = domRect.height;
2782 + let x2 = domRect.x;
2783 + let y2 = domRect.y;
2784 + if (offsetX == null && data.x && isXAxis) {
2785 + offsetX = domRect.x - data.x;
2786 + }
2787 + if (offsetY == null && data.y && isYAxis) {
2788 + offsetY = domRect.y - data.y;
2789 + }
2790 + x2 -= offsetX || 0;
2791 + y2 -= offsetY || 0;
2792 + width = 0;
2793 + height = 0;
2794 + if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
2795 + width = data.axis === "y" ? domRect.width : 0;
2796 + height = data.axis === "x" ? domRect.height : 0;
2797 + x2 = isXAxis && data.x != null ? data.x : x2;
2798 + y2 = isYAxis && data.y != null ? data.y : y2;
2799 + } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
2800 + height = data.axis === "x" ? domRect.height : height;
2801 + width = data.axis === "y" ? domRect.width : width;
2802 + }
2803 + isAutoUpdateEvent = true;
2804 + return {
2805 + width,
2806 + height,
2807 + x: x2,
2808 + y: y2,
2809 + top: y2,
2810 + right: x2 + width,
2811 + bottom: y2 + height,
2812 + left: x2
2813 + };
2814 + }
2815 + };
2816 +}
2817 +function isMouseBasedEvent(event) {
2818 + return event != null && event.clientX != null;
2819 +}
2820 +function useClientPoint(context, props = {}) {
2821 + const {
2822 + enabled = true,
2823 + axis = "both"
2824 + } = props;
2825 + const store = "rootStore" in context ? context.rootStore : context;
2826 + const open2 = store.useState("open");
2827 + const floating = store.useState("floatingElement");
2828 + const domReference = store.useState("domReferenceElement");
2829 + const dataRef = store.context.dataRef;
2830 + const initialRef = React15.useRef(false);
2831 + const cleanupListenerRef = React15.useRef(null);
2832 + const [pointerType, setPointerType] = React15.useState();
2833 + const [reactive, setReactive] = React15.useState([]);
2834 + const resetReference = useStableCallback((reference2) => {
2835 + store.set("positionReference", reference2);
2836 + });
2837 + const setReference = useStableCallback((newX, newY, referenceElement) => {
2838 + if (initialRef.current) {
2839 + return;
2840 + }
2841 + if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
2842 + return;
2843 + }
2844 + store.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
2845 + x: newX,
2846 + y: newY,
2847 + axis,
2848 + dataRef,
2849 + pointerType
2850 + }));
2851 + });
2852 + const handleReferenceEnterOrMove = useStableCallback((event) => {
2853 + if (!open2) {
2854 + setReference(event.clientX, event.clientY, event.currentTarget);
2855 + } else if (!cleanupListenerRef.current) {
2856 + setReference(event.clientX, event.clientY, event.currentTarget);
2857 + setReactive([]);
2858 + }
2859 + });
2860 + const openCheck = isMouseLikePointerType(pointerType) ? floating : open2;
2861 + React15.useEffect(() => {
2862 + if (!enabled) {
2863 + resetReference(domReference);
2864 + return void 0;
2865 + }
2866 + if (!openCheck) {
2867 + return void 0;
2868 + }
2869 + function cleanupListener() {
2870 + cleanupListenerRef.current?.();
2871 + cleanupListenerRef.current = null;
2872 + }
2873 + const win = getWindow(floating);
2874 + function handleMouseMove(event) {
2875 + const target = getTarget(event);
2876 + if (!contains(floating, target)) {
2877 + setReference(event.clientX, event.clientY);
2878 + } else {
2879 + cleanupListener();
2880 + }
2881 + }
2882 + if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
2883 + cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
2884 + } else {
2885 + resetReference(domReference);
2886 + }
2887 + return cleanupListener;
2888 + }, [openCheck, enabled, floating, dataRef, domReference, store, setReference, resetReference, reactive]);
2889 + React15.useEffect(() => () => {
2890 + store.set("positionReference", null);
2891 + }, [store]);
2892 + React15.useEffect(() => {
2893 + if (enabled && !floating) {
2894 + initialRef.current = false;
2895 + }
2896 + }, [enabled, floating]);
2897 + React15.useEffect(() => {
2898 + if (!enabled && open2) {
2899 + initialRef.current = true;
2900 + }
2901 + }, [enabled, open2]);
2902 + const reference = React15.useMemo(() => {
2903 + function setPointerTypeRef(event) {
2904 + setPointerType(event.pointerType);
2905 + }
2906 + return {
2907 + onPointerDown: setPointerTypeRef,
2908 + onPointerEnter: setPointerTypeRef,
2909 + onMouseMove: handleReferenceEnterOrMove,
2910 + onMouseEnter: handleReferenceEnterOrMove
2911 + };
2912 + }, [handleReferenceEnterOrMove]);
2913 + return React15.useMemo(() => enabled ? {
2914 + reference,
2915 + trigger: reference
2916 + } : {}, [enabled, reference]);
2917 +}
2918 +
2919 +// node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
2920 +var React16 = __toESM(require_react(), 1);
2921 +function alwaysFalse() {
2922 + return false;
2923 +}
2924 +function normalizeProp(normalizable) {
2925 + return {
2926 + escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
2927 + outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
2928 + };
2929 +}
2930 +function useDismiss(context, props = {}) {
2931 + const {
2932 + enabled = true,
2933 + escapeKey: escapeKey2 = true,
2934 + outsidePress: outsidePressProp = true,
2935 + outsidePressEvent = "sloppy",
2936 + referencePress = alwaysFalse,
2937 + bubbles,
2938 + externalTree
2939 + } = props;
2940 + const store = "rootStore" in context ? context.rootStore : context;
2941 + const open2 = store.useState("open");
2942 + const floatingElement = store.useState("floatingElement");
2943 + const {
2944 + dataRef,
2945 + events
2946 + } = store.context;
2947 + const tree = useFloatingTree(externalTree);
2948 + const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
2949 + const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
2950 + const outsidePressEnabled = outsidePress2 !== false;
2951 + const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
2952 + const {
2953 + escapeKey: escapeKeyBubbles,
2954 + outsidePress: outsidePressBubbles
2955 + } = normalizeProp(bubbles);
2956 + const pressStartedInsideRef = React16.useRef(false);
2957 + const pressStartPreventedRef = React16.useRef(false);
2958 + const suppressNextOutsideClickRef = React16.useRef(false);
2959 + const sawPressWhileOpenRef = React16.useRef(false);
2960 + const isComposingRef = React16.useRef(false);
2961 + const currentPointerTypeRef = React16.useRef("");
2962 + const touchStateRef = React16.useRef(null);
2963 + const cancelDismissOnEndTimeout = useTimeout();
2964 + const clearInsideReactTreeTimeout = useTimeout();
2965 + const clearInsideReactTree = useStableCallback(() => {
2966 + clearInsideReactTreeTimeout.clear();
2967 + dataRef.current.insideReactTree = false;
2968 + });
2969 + const hasBlockingChild = useStableCallback((bubbleKey) => {
2970 + const nodeId = dataRef.current.floatingContext?.nodeId;
2971 + const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
2972 + return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
2973 + });
2974 + const isEventWithinOwnElements = useStableCallback((event) => {
2975 + return isEventTargetWithin(event, store.select("floatingElement")) || isEventTargetWithin(event, store.select("domReferenceElement"));
2976 + });
2977 + const closeOnReferencePress = useStableCallback((event) => {
2978 + if (!referencePress()) {
2979 + return;
2980 + }
2981 + store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
2982 + });
2983 + const closeOnEscapeKeyDown = useStableCallback((event) => {
2984 + if (!open2 || !enabled || !escapeKey2 || event.key !== "Escape") {
2985 + return;
2986 + }
2987 + if (isComposingRef.current) {
2988 + return;
2989 + }
2990 + if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
2991 + return;
2992 + }
2993 + const native = isReactEvent(event) ? event.nativeEvent : event;
2994 + const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
2995 + store.setOpen(false, eventDetails);
2996 + if (!eventDetails.isCanceled) {
2997 + event.preventDefault();
2998 + }
2999 + if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
3000 + event.stopPropagation();
3001 + }
3002 + });
3003 + const markInsideReactTree = useStableCallback(() => {
3004 + dataRef.current.insideReactTree = true;
3005 + clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
3006 + });
3007 + const markPressStartedInsideReactTree = useStableCallback((event) => {
3008 + if (!open2 || !enabled || event.button !== 0) {
3009 + return;
3010 + }
3011 + const target = getTarget(event.nativeEvent);
3012 + if (!contains(store.select("floatingElement"), target)) {
3013 + return;
3014 + }
3015 + if (!pressStartedInsideRef.current) {
3016 + pressStartedInsideRef.current = true;
3017 + pressStartPreventedRef.current = false;
3018 + }
3019 + });
3020 + const markInsidePressStartPrevented = useStableCallback((event) => {
3021 + if (!open2 || !enabled) {
3022 + return;
3023 + }
3024 + if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
3025 + return;
3026 + }
3027 + if (pressStartedInsideRef.current) {
3028 + pressStartPreventedRef.current = true;
3029 + }
3030 + });
3031 + React16.useEffect(() => {
3032 + function handleOpenChange(details) {
3033 + if (!details.open) {
3034 + sawPressWhileOpenRef.current = false;
3035 + }
3036 + }
3037 + events.on("openchange", handleOpenChange);
3038 + return () => {
3039 + events.off("openchange", handleOpenChange);
3040 + };
3041 + }, [events]);
3042 + React16.useEffect(() => {
3043 + if (!open2 || !enabled) {
3044 + if (!open2) {
3045 + sawPressWhileOpenRef.current = false;
3046 + }
3047 + return clearInsideReactTree;
3048 + }
3049 + dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
3050 + dataRef.current.__outsidePressBubbles = outsidePressBubbles;
3051 + const compositionTimeout = new Timeout();
3052 + const preventedPressSuppressionTimeout = new Timeout();
3053 + const doc = ownerDocument(floatingElement);
3054 + function handleCompositionStart() {
3055 + compositionTimeout.clear();
3056 + isComposingRef.current = true;
3057 + }
3058 + function handleCompositionEnd() {
3059 + compositionTimeout.start(
3060 + // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
3061 + // Only apply to WebKit for the test to remain 0ms.
3062 + parts_exports.engine.webkit ? 5 : 0,
3063 + () => {
3064 + isComposingRef.current = false;
3065 + }
3066 + );
3067 + }
3068 + function suppressImmediateOutsideClickAfterPreventedStart() {
3069 + suppressNextOutsideClickRef.current = true;
3070 + preventedPressSuppressionTimeout.start(0, () => {
3071 + suppressNextOutsideClickRef.current = false;
3072 + });
3073 + }
3074 + function resetPressStartState() {
3075 + pressStartedInsideRef.current = false;
3076 + pressStartPreventedRef.current = false;
3077 + }
3078 + function getOutsidePressEvent() {
3079 + const type = currentPointerTypeRef.current;
3080 + const computedType = type === "pen" || !type ? "mouse" : type;
3081 + const outsidePressEventValue = getOutsidePressEventProp();
3082 + const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
3083 + if (typeof resolved === "string") {
3084 + return resolved;
3085 + }
3086 + return resolved[computedType];
3087 + }
3088 + function shouldIgnoreEvent(event) {
3089 + const computedOutsidePressEvent = getOutsidePressEvent();
3090 + return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
3091 + }
3092 + function isEventWithinFloatingTree(event) {
3093 + const nodeId = dataRef.current.floatingContext?.nodeId;
3094 + const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
3095 + return isEventWithinOwnElements(event) || targetIsInsideChildren;
3096 + }
3097 + function closeOnPressOutside(event) {
3098 + if (shouldIgnoreEvent(event)) {
3099 + if (event.type !== "click" && !isEventWithinOwnElements(event)) {
3100 + preventedPressSuppressionTimeout.clear();
3101 + suppressNextOutsideClickRef.current = false;
3102 + }
3103 + clearInsideReactTree();
3104 + return;
3105 + }
3106 + if (dataRef.current.insideReactTree) {
3107 + clearInsideReactTree();
3108 + return;
3109 + }
3110 + const target = getTarget(event);
3111 + const inertSelector = `[${createAttribute("inert")}]`;
3112 + const targetRoot = isElement(target) ? target.getRootNode() : null;
3113 + const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store.select("floatingElement"))).querySelectorAll(inertSelector));
3114 + const triggers = store.context.triggerElements;
3115 + if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
3116 + return;
3117 + }
3118 + let targetRootAncestor = isElement(target) ? target : null;
3119 + while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
3120 + const nextParent = getParentNode(targetRootAncestor);
3121 + if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
3122 + break;
3123 + }
3124 + targetRootAncestor = nextParent;
3125 + }
3126 + if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
3127 + !contains(target, store.select("floatingElement")) && // If the target root element contains none of the markers, then the
3128 + // element was injected after the floating element rendered.
3129 + markers.every((marker) => !contains(targetRootAncestor, marker))) {
3130 + return;
3131 + }
3132 + if (isHTMLElement(target) && !("touches" in event)) {
3133 + const lastTraversableNode = isLastTraversableNode(target);
3134 + const style = getComputedStyle2(target);
3135 + const scrollRe = /auto|scroll/;
3136 + const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
3137 + const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
3138 + const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
3139 + const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
3140 + const isRTL12 = style.direction === "rtl";
3141 + const pressedVerticalScrollbar = canScrollY && (isRTL12 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
3142 + const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
3143 + if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
3144 + return;
3145 + }
3146 + }
3147 + if (isEventWithinFloatingTree(event)) {
3148 + return;
3149 + }
3150 + if (getOutsidePressEvent() === "intentional") {
3151 + if (event.detail !== 0 && !isVirtualClick(event) && !sawPressWhileOpenRef.current) {
3152 + return;
3153 + }
3154 + if (suppressNextOutsideClickRef.current) {
3155 + preventedPressSuppressionTimeout.clear();
3156 + suppressNextOutsideClickRef.current = false;
3157 + return;
3158 + }
3159 + }
3160 + if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3161 + return;
3162 + }
3163 + if (hasBlockingChild("__outsidePressBubbles")) {
3164 + return;
3165 + }
3166 + store.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
3167 + clearInsideReactTree();
3168 + }
3169 + function handlePointerDown(event) {
3170 + if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) {
3171 + return;
3172 + }
3173 + closeOnPressOutside(event);
3174 + }
3175 + function handleTouchStart(event) {
3176 + if (getOutsidePressEvent() !== "sloppy" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) {
3177 + return;
3178 + }
3179 + const touch = event.touches[0];
3180 + if (touch) {
3181 + touchStateRef.current = {
3182 + startTime: Date.now(),
3183 + startX: touch.clientX,
3184 + startY: touch.clientY,
3185 + dismissOnTouchEnd: false,
3186 + dismissOnMouseDown: true
3187 + };
3188 + cancelDismissOnEndTimeout.start(1e3, () => {
3189 + if (touchStateRef.current) {
3190 + touchStateRef.current.dismissOnTouchEnd = false;
3191 + touchStateRef.current.dismissOnMouseDown = false;
3192 + }
3193 + });
3194 + }
3195 + }
3196 + function addTargetEventListenerOnce(event, listener) {
3197 + const target = getTarget(event);
3198 + if (!target) {
3199 + return;
3200 + }
3201 + const unsubscribe2 = addEventListener(target, event.type, () => {
3202 + listener(event);
3203 + unsubscribe2();
3204 + });
3205 + }
3206 + function handleTouchStartCapture(event) {
3207 + currentPointerTypeRef.current = "touch";
3208 + addTargetEventListenerOnce(event, handleTouchStart);
3209 + }
3210 + function closeOnPressOutsideCapture(event) {
3211 + cancelDismissOnEndTimeout.clear();
3212 + if (event.type === "pointerdown") {
3213 + if (event.button === 0) {
3214 + sawPressWhileOpenRef.current = true;
3215 + }
3216 + currentPointerTypeRef.current = event.pointerType;
3217 + }
3218 + if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
3219 + return;
3220 + }
3221 + addTargetEventListenerOnce(event, (targetEvent) => {
3222 + if (targetEvent.type === "pointerdown") {
3223 + handlePointerDown(targetEvent);
3224 + } else {
3225 + closeOnPressOutside(targetEvent);
3226 + }
3227 + });
3228 + }
3229 + function handlePressEndCapture(event) {
3230 + if (event.type === "pointercancel") {
3231 + sawPressWhileOpenRef.current = false;
3232 + }
3233 + if (!pressStartedInsideRef.current) {
3234 + return;
3235 + }
3236 + const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
3237 + resetPressStartState();
3238 + if (getOutsidePressEvent() !== "intentional") {
3239 + return;
3240 + }
3241 + if (event.type === "pointercancel") {
3242 + if (pressStartedInsideDefaultPrevented) {
3243 + suppressImmediateOutsideClickAfterPreventedStart();
3244 + }
3245 + return;
3246 + }
3247 + if (isEventWithinFloatingTree(event)) {
3248 + return;
3249 + }
3250 + if (pressStartedInsideDefaultPrevented) {
3251 + suppressImmediateOutsideClickAfterPreventedStart();
3252 + return;
3253 + }
3254 + if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3255 + return;
3256 + }
3257 + preventedPressSuppressionTimeout.clear();
3258 + suppressNextOutsideClickRef.current = true;
3259 + clearInsideReactTree();
3260 + }
3261 + function handleTouchMove(event) {
3262 + if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3263 + return;
3264 + }
3265 + const touch = event.touches[0];
3266 + if (!touch) {
3267 + return;
3268 + }
3269 + const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
3270 + const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
3271 + const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
3272 + if (distance > 5) {
3273 + touchStateRef.current.dismissOnTouchEnd = true;
3274 + }
3275 + if (distance > 10) {
3276 + closeOnPressOutside(event);
3277 + cancelDismissOnEndTimeout.clear();
3278 + touchStateRef.current = null;
3279 + }
3280 + }
3281 + function handleTouchMoveCapture(event) {
3282 + addTargetEventListenerOnce(event, handleTouchMove);
3283 + }
3284 + function handleTouchEnd(event) {
3285 + if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3286 + return;
3287 + }
3288 + if (touchStateRef.current.dismissOnTouchEnd) {
3289 + closeOnPressOutside(event);
3290 + }
3291 + cancelDismissOnEndTimeout.clear();
3292 + touchStateRef.current = null;
3293 + }
3294 + function handleTouchEndCapture(event) {
3295 + addTargetEventListenerOnce(event, handleTouchEnd);
3296 + }
3297 + const unsubscribe = mergeCleanups(escapeKey2 && mergeCleanups(addEventListener(doc, "keydown", closeOnEscapeKeyDown), addEventListener(doc, "compositionstart", handleCompositionStart), addEventListener(doc, "compositionend", handleCompositionEnd)), outsidePressEnabled && mergeCleanups(addEventListener(doc, "click", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerdown", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerup", handlePressEndCapture, true), addEventListener(doc, "pointercancel", handlePressEndCapture, true), addEventListener(doc, "mousedown", closeOnPressOutsideCapture, true), addEventListener(doc, "mouseup", handlePressEndCapture, true), addEventListener(doc, "touchstart", handleTouchStartCapture, {
3298 + capture: true,
3299 + passive: true
3300 + }), addEventListener(doc, "touchmove", handleTouchMoveCapture, {
3301 + capture: true,
3302 + passive: true
3303 + }), addEventListener(doc, "touchend", handleTouchEndCapture, {
3304 + capture: true,
3305 + passive: true
3306 + })));
3307 + return () => {
3308 + unsubscribe();
3309 + compositionTimeout.clear();
3310 + preventedPressSuppressionTimeout.clear();
3311 + resetPressStartState();
3312 + suppressNextOutsideClickRef.current = false;
3313 + clearInsideReactTree();
3314 + };
3315 + }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open2, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store, cancelDismissOnEndTimeout]);
3316 + const reference = React16.useMemo(() => ({
3317 + onKeyDown: closeOnEscapeKeyDown,
3318 + onPointerDown: closeOnReferencePress,
3319 + onClick: closeOnReferencePress
3320 + }), [closeOnEscapeKeyDown, closeOnReferencePress]);
3321 + const floating = React16.useMemo(() => ({
3322 + onKeyDown: closeOnEscapeKeyDown,
3323 + // `onMouseDown` may be blocked if `event.preventDefault()` is called in
3324 + // `onPointerDown`, such as with <NumberField.ScrubArea>.
3325 + // See https://github.com/mui/base-ui/pull/3379
3326 + onPointerDown: markInsidePressStartPrevented,
3327 + onMouseDown: markInsidePressStartPrevented,
3328 + onClickCapture: markInsideReactTree,
3329 + onMouseDownCapture(event) {
3330 + markInsideReactTree();
3331 + markPressStartedInsideReactTree(event);
3332 + },
3333 + onPointerDownCapture(event) {
3334 + markInsideReactTree();
3335 + markPressStartedInsideReactTree(event);
3336 + },
3337 + onMouseUpCapture: markInsideReactTree,
3338 + onTouchEndCapture: markInsideReactTree,
3339 + onTouchMoveCapture: markInsideReactTree
3340 + }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
3341 + return React16.useMemo(() => enabled ? {
3342 + reference,
3343 + floating,
3344 + trigger: reference
3345 + } : {}, [enabled, reference, floating]);
3346 +}
3347 +
3348 +// node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
3349 +var React24 = __toESM(require_react(), 1);
3350 +
3351 +// node_modules/@floating-ui/core/dist/floating-ui.core.mjs
3352 +function computeCoordsFromPlacement(_ref, placement, rtl) {
3353 + let {
3354 + reference,
3355 + floating
3356 + } = _ref;
3357 + const sideAxis = getSideAxis(placement);
3358 + const alignmentAxis = getAlignmentAxis(placement);
3359 + const alignLength = getAxisLength(alignmentAxis);
3360 + const side = getSide(placement);
3361 + const isVertical = sideAxis === "y";
3362 + const commonX = reference.x + reference.width / 2 - floating.width / 2;
3363 + const commonY = reference.y + reference.height / 2 - floating.height / 2;
3364 + const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
3365 + let coords;
3366 + switch (side) {
3367 + case "top":
3368 + coords = {
3369 + x: commonX,
3370 + y: reference.y - floating.height
3371 + };
3372 + break;
3373 + case "bottom":
3374 + coords = {
3375 + x: commonX,
3376 + y: reference.y + reference.height
3377 + };
3378 + break;
3379 + case "right":
3380 + coords = {
3381 + x: reference.x + reference.width,
3382 + y: commonY
3383 + };
3384 + break;
3385 + case "left":
3386 + coords = {
3387 + x: reference.x - floating.width,
3388 + y: commonY
3389 + };
3390 + break;
3391 + default:
3392 + coords = {
3393 + x: reference.x,
3394 + y: reference.y
3395 + };
3396 + }
3397 + const alignment = getAlignment(placement);
3398 + if (alignment) {
3399 + coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
3400 + }
3401 + return coords;
3402 +}
3403 +async function detectOverflow(state, options) {
3404 + var _await$platform$isEle;
3405 + if (options === void 0) {
3406 + options = {};
3407 + }
3408 + const {
3409 + x: x2,
3410 + y: y2,
3411 + platform: platform3,
3412 + rects,
3413 + elements: elements2,
3414 + strategy
3415 + } = state;
3416 + const {
3417 + boundary = "clippingAncestors",
3418 + rootBoundary = "viewport",
3419 + elementContext = "floating",
3420 + altBoundary = false,
3421 + padding = 0
3422 + } = evaluate(options, state);
3423 + const paddingObject = getPaddingObject(padding);
3424 + const altContext = elementContext === "floating" ? "reference" : "floating";
3425 + const element = elements2[altBoundary ? altContext : elementContext];
3426 + const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
3427 + element: ((_await$platform$isEle = await (platform3.isElement == null ? void 0 : platform3.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform3.getDocumentElement == null ? void 0 : platform3.getDocumentElement(elements2.floating)),
3428 + boundary,
3429 + rootBoundary,
3430 + strategy
3431 + }));
3432 + const rect = elementContext === "floating" ? {
3433 + x: x2,
3434 + y: y2,
3435 + width: rects.floating.width,
3436 + height: rects.floating.height
3437 + } : rects.reference;
3438 + const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements2.floating));
3439 + const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
3440 + x: 1,
3441 + y: 1
3442 + };
3443 + const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
3444 + elements: elements2,
3445 + rect,
3446 + offsetParent,
3447 + strategy
3448 + }) : rect);
3449 + return {
3450 + top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3451 + bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3452 + left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3453 + right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3454 + };
3455 +}
3456 +var MAX_RESET_COUNT = 50;
3457 +var computePosition = async (reference, floating, config) => {
3458 + const {
3459 + placement = "bottom",
3460 + strategy = "absolute",
3461 + middleware = [],
3462 + platform: platform3
3463 + } = config;
3464 + const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
3465 + ...platform3,
3466 + detectOverflow
3467 + };
3468 + const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
3469 + let rects = await platform3.getElementRects({
3470 + reference,
3471 + floating,
3472 + strategy
3473 + });
3474 + let {
3475 + x: x2,
3476 + y: y2
3477 + } = computeCoordsFromPlacement(rects, placement, rtl);
3478 + let statefulPlacement = placement;
3479 + let resetCount = 0;
3480 + const middlewareData = {};
3481 + for (let i = 0; i < middleware.length; i++) {
3482 + const currentMiddleware = middleware[i];
3483 + if (!currentMiddleware) {
3484 + continue;
3485 + }
3486 + const {
3487 + name: name2,
3488 + fn
3489 + } = currentMiddleware;
3490 + const {
3491 + x: nextX,
3492 + y: nextY,
3493 + data,
3494 + reset
3495 + } = await fn({
3496 + x: x2,
3497 + y: y2,
3498 + initialPlacement: placement,
3499 + placement: statefulPlacement,
3500 + strategy,
3501 + middlewareData,
3502 + rects,
3503 + platform: platformWithDetectOverflow,
3504 + elements: {
3505 + reference,
3506 + floating
3507 + }
3508 + });
3509 + x2 = nextX != null ? nextX : x2;
3510 + y2 = nextY != null ? nextY : y2;
3511 + middlewareData[name2] = {
3512 + ...middlewareData[name2],
3513 + ...data
3514 + };
3515 + if (reset && resetCount < MAX_RESET_COUNT) {
3516 + resetCount++;
3517 + if (typeof reset === "object") {
3518 + if (reset.placement) {
3519 + statefulPlacement = reset.placement;
3520 + }
3521 + if (reset.rects) {
3522 + rects = reset.rects === true ? await platform3.getElementRects({
3523 + reference,
3524 + floating,
3525 + strategy
3526 + }) : reset.rects;
3527 + }
3528 + ({
3529 + x: x2,
3530 + y: y2
3531 + } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
3532 + }
3533 + i = -1;
3534 + }
3535 + }
3536 + return {
3537 + x: x2,
3538 + y: y2,
3539 + placement: statefulPlacement,
3540 + strategy,
3541 + middlewareData
3542 + };
3543 +};
3544 +var flip = function(options) {
3545 + if (options === void 0) {
3546 + options = {};
3547 + }
3548 + return {
3549 + name: "flip",
3550 + options,
3551 + async fn(state) {
3552 + var _middlewareData$arrow, _middlewareData$flip;
3553 + const {
3554 + placement,
3555 + middlewareData,
3556 + rects,
3557 + initialPlacement,
3558 + platform: platform3,
3559 + elements: elements2
3560 + } = state;
3561 + const {
3562 + mainAxis: checkMainAxis = true,
3563 + crossAxis: checkCrossAxis = true,
3564 + fallbackPlacements: specifiedFallbackPlacements,
3565 + fallbackStrategy = "bestFit",
3566 + fallbackAxisSideDirection = "none",
3567 + flipAlignment = true,
3568 + ...detectOverflowOptions
3569 + } = evaluate(options, state);
3570 + if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3571 + return {};
3572 + }
3573 + const side = getSide(placement);
3574 + const initialSideAxis = getSideAxis(initialPlacement);
3575 + const isBasePlacement = getSide(initialPlacement) === initialPlacement;
3576 + const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements2.floating));
3577 + const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
3578 + const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3579 + if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
3580 + fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3581 + }
3582 + const placements2 = [initialPlacement, ...fallbackPlacements];
3583 + const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3584 + const overflows = [];
3585 + let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3586 + if (checkMainAxis) {
3587 + overflows.push(overflow[side]);
3588 + }
3589 + if (checkCrossAxis) {
3590 + const sides2 = getAlignmentSides(placement, rects, rtl);
3591 + overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
3592 + }
3593 + overflowsData = [...overflowsData, {
3594 + placement,
3595 + overflows
3596 + }];
3597 + if (!overflows.every((side2) => side2 <= 0)) {
3598 + var _middlewareData$flip2, _overflowsData$filter;
3599 + const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
3600 + const nextPlacement = placements2[nextIndex];
3601 + if (nextPlacement) {
3602 + const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
3603 + if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
3604 + // overflows the main axis.
3605 + overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
3606 + return {
3607 + data: {
3608 + index: nextIndex,
3609 + overflows: overflowsData
3610 + },
3611 + reset: {
3612 + placement: nextPlacement
3613 + }
3614 + };
3615 + }
3616 + }
3617 + let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
3618 + if (!resetPlacement) {
3619 + switch (fallbackStrategy) {
3620 + case "bestFit": {
3621 + var _overflowsData$filter2;
3622 + const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
3623 + if (hasFallbackAxisSideDirection) {
3624 + const currentSideAxis = getSideAxis(d.placement);
3625 + return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
3626 + // reading directions favoring greater width.
3627 + currentSideAxis === "y";
3628 + }
3629 + return true;
3630 + }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
3631 + if (placement2) {
3632 + resetPlacement = placement2;
3633 + }
3634 + break;
3635 + }
3636 + case "initialPlacement":
3637 + resetPlacement = initialPlacement;
3638 + break;
3639 + }
3640 + }
3641 + if (placement !== resetPlacement) {
3642 + return {
3643 + reset: {
3644 + placement: resetPlacement
3645 + }
3646 + };
3647 + }
3648 + }
3649 + return {};
3650 + }
3651 + };
3652 +};
3653 +var originSides = /* @__PURE__ */ new Set(["left", "top"]);
3654 +async function convertValueToCoords(state, options) {
3655 + const {
3656 + placement,
3657 + platform: platform3,
3658 + elements: elements2
3659 + } = state;
3660 + const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements2.floating));
3661 + const side = getSide(placement);
3662 + const alignment = getAlignment(placement);
3663 + const isVertical = getSideAxis(placement) === "y";
3664 + const mainAxisMulti = originSides.has(side) ? -1 : 1;
3665 + const crossAxisMulti = rtl && isVertical ? -1 : 1;
3666 + const rawValue = evaluate(options, state);
3667 + let {
3668 + mainAxis,
3669 + crossAxis,
3670 + alignmentAxis
3671 + } = typeof rawValue === "number" ? {
3672 + mainAxis: rawValue,
3673 + crossAxis: 0,
3674 + alignmentAxis: null
3675 + } : {
3676 + mainAxis: rawValue.mainAxis || 0,
3677 + crossAxis: rawValue.crossAxis || 0,
3678 + alignmentAxis: rawValue.alignmentAxis
3679 + };
3680 + if (alignment && typeof alignmentAxis === "number") {
3681 + crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
3682 + }
3683 + return isVertical ? {
3684 + x: crossAxis * crossAxisMulti,
3685 + y: mainAxis * mainAxisMulti
3686 + } : {
3687 + x: mainAxis * mainAxisMulti,
3688 + y: crossAxis * crossAxisMulti
3689 + };
3690 +}
3691 +var offset = function(options) {
3692 + if (options === void 0) {
3693 + options = 0;
3694 + }
3695 + return {
3696 + name: "offset",
3697 + options,
3698 + async fn(state) {
3699 + var _middlewareData$offse, _middlewareData$arrow;
3700 + const {
3701 + x: x2,
3702 + y: y2,
3703 + placement,
3704 + middlewareData
3705 + } = state;
3706 + const diffCoords = await convertValueToCoords(state, options);
3707 + if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3708 + return {};
3709 + }
3710 + return {
3711 + x: x2 + diffCoords.x,
3712 + y: y2 + diffCoords.y,
3713 + data: {
3714 + ...diffCoords,
3715 + placement
3716 + }
3717 + };
3718 + }
3719 + };
3720 +};
3721 +var shift = function(options) {
3722 + if (options === void 0) {
3723 + options = {};
3724 + }
3725 + return {
3726 + name: "shift",
3727 + options,
3728 + async fn(state) {
3729 + const {
3730 + x: x2,
3731 + y: y2,
3732 + placement,
3733 + platform: platform3
3734 + } = state;
3735 + const {
3736 + mainAxis: checkMainAxis = true,
3737 + crossAxis: checkCrossAxis = false,
3738 + limiter = {
3739 + fn: (_ref) => {
3740 + let {
3741 + x: x3,
3742 + y: y3
3743 + } = _ref;
3744 + return {
3745 + x: x3,
3746 + y: y3
3747 + };
3748 + }
3749 + },
3750 + ...detectOverflowOptions
3751 + } = evaluate(options, state);
3752 + const coords = {
3753 + x: x2,
3754 + y: y2
3755 + };
3756 + const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3757 + const crossAxis = getSideAxis(placement);
3758 + const mainAxis = getOppositeAxis(crossAxis);
3759 + let mainAxisCoord = coords[mainAxis];
3760 + let crossAxisCoord = coords[crossAxis];
3761 + const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
3762 + if (checkMainAxis) {
3763 + mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
3764 + }
3765 + if (checkCrossAxis) {
3766 + crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
3767 + }
3768 + const limitedCoords = limiter.fn({
3769 + ...state,
3770 + [mainAxis]: mainAxisCoord,
3771 + [crossAxis]: crossAxisCoord
3772 + });
3773 + return {
3774 + ...limitedCoords,
3775 + data: {
3776 + x: limitedCoords.x - x2,
3777 + y: limitedCoords.y - y2,
3778 + enabled: {
3779 + [mainAxis]: checkMainAxis,
3780 + [crossAxis]: checkCrossAxis
3781 + }
3782 + }
3783 + };
3784 + }
3785 + };
3786 +};
3787 +var limitShift = function(options) {
3788 + if (options === void 0) {
3789 + options = {};
3790 + }
3791 + return {
3792 + options,
3793 + fn(state) {
3794 + var _rawOffset$mainAxis, _rawOffset$crossAxis;
3795 + const {
3796 + x: x2,
3797 + y: y2,
3798 + placement,
3799 + rects,
3800 + middlewareData
3801 + } = state;
3802 + const {
3803 + offset: offset4 = 0,
3804 + mainAxis: checkMainAxis = true,
3805 + crossAxis: checkCrossAxis = true
3806 + } = evaluate(options, state);
3807 + const coords = {
3808 + x: x2,
3809 + y: y2
3810 + };
3811 + const crossAxis = getSideAxis(placement);
3812 + const mainAxis = getOppositeAxis(crossAxis);
3813 + let mainAxisCoord = coords[mainAxis];
3814 + let crossAxisCoord = coords[crossAxis];
3815 + const rawOffset = evaluate(offset4, state);
3816 + const computedOffset = typeof rawOffset === "number" ? {
3817 + mainAxis: rawOffset,
3818 + crossAxis: 0
3819 + } : {
3820 + mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
3821 + crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
3822 + };
3823 + if (checkMainAxis) {
3824 + const len = mainAxis === "y" ? "height" : "width";
3825 + const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
3826 + const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
3827 + if (mainAxisCoord < limitMin) {
3828 + mainAxisCoord = limitMin;
3829 + } else if (mainAxisCoord > limitMax) {
3830 + mainAxisCoord = limitMax;
3831 + }
3832 + }
3833 + if (checkCrossAxis) {
3834 + var _middlewareData$offse, _middlewareData$offse2;
3835 + const len = mainAxis === "y" ? "width" : "height";
3836 + const isOriginSide = originSides.has(getSide(placement));
3837 + const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
3838 + const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
3839 + if (crossAxisCoord < limitMin) {
3840 + crossAxisCoord = limitMin;
3841 + } else if (crossAxisCoord > limitMax) {
3842 + crossAxisCoord = limitMax;
3843 + }
3844 + }
3845 + return {
3846 + [mainAxis]: mainAxisCoord,
3847 + [crossAxis]: crossAxisCoord
3848 + };
3849 + }
3850 + };
3851 +};
3852 +var size = function(options) {
3853 + if (options === void 0) {
3854 + options = {};
3855 + }
3856 + return {
3857 + name: "size",
3858 + options,
3859 + async fn(state) {
3860 + const {
3861 + placement,
3862 + rects,
3863 + platform: platform3,
3864 + elements: elements2
3865 + } = state;
3866 + const {
3867 + apply = () => {
3868 + },
3869 + ...detectOverflowOptions
3870 + } = evaluate(options, state);
3871 + const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3872 + const side = getSide(placement);
3873 + const alignment = getAlignment(placement);
3874 + const isYAxis = getSideAxis(placement) === "y";
3875 + const {
3876 + width,
3877 + height
3878 + } = rects.floating;
3879 + let heightSide;
3880 + let widthSide;
3881 + if (side === "top" || side === "bottom") {
3882 + heightSide = side;
3883 + widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements2.floating)) ? "start" : "end") ? "left" : "right";
3884 + } else {
3885 + widthSide = side;
3886 + heightSide = alignment === "end" ? "top" : "bottom";
3887 + }
3888 + const maximumClippingHeight = height - overflow.top - overflow.bottom;
3889 + const maximumClippingWidth = width - overflow.left - overflow.right;
3890 + const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
3891 + const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
3892 + const shiftData = state.middlewareData.shift;
3893 + const noShift = !shiftData;
3894 + let availableHeight2 = overflowAvailableHeight;
3895 + let availableWidth2 = overflowAvailableWidth;
3896 + if (shiftData != null && shiftData.enabled.x) {
3897 + availableWidth2 = maximumClippingWidth;
3898 + }
3899 + if (shiftData != null && shiftData.enabled.y) {
3900 + availableHeight2 = maximumClippingHeight;
3901 + }
3902 + if (noShift && !alignment) {
3903 + if (isYAxis) {
3904 + availableWidth2 = width - 2 * max(overflow.left, overflow.right);
3905 + } else {
3906 + availableHeight2 = height - 2 * max(overflow.top, overflow.bottom);
3907 + }
3908 + }
3909 + await apply({
3910 + ...state,
3911 + availableWidth: availableWidth2,
3912 + availableHeight: availableHeight2
3913 + });
3914 + const nextDimensions = await platform3.getDimensions(elements2.floating);
3915 + if (width !== nextDimensions.width || height !== nextDimensions.height) {
3916 + return {
3917 + reset: {
3918 + rects: true
3919 + }
3920 + };
3921 + }
3922 + return {};
3923 + }
3924 + };
3925 +};
3926 +
3927 +// node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
3928 +function getCssDimensions(element) {
3929 + const css = getComputedStyle2(element);
3930 + let width = parseFloat(css.width) || 0;
3931 + let height = parseFloat(css.height) || 0;
3932 + const hasOffset = isHTMLElement(element);
3933 + const offsetWidth = hasOffset ? element.offsetWidth : width;
3934 + const offsetHeight = hasOffset ? element.offsetHeight : height;
3935 + const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
3936 + if (shouldFallback) {
3937 + width = offsetWidth;
3938 + height = offsetHeight;
3939 + }
3940 + return {
3941 + width,
3942 + height,
3943 + $: shouldFallback
3944 + };
3945 +}
3946 +function unwrapElement(element) {
3947 + return !isElement(element) ? element.contextElement : element;
3948 +}
3949 +function getScale(element) {
3950 + const domElement = unwrapElement(element);
3951 + if (!isHTMLElement(domElement)) {
3952 + return createCoords(1);
3953 + }
3954 + const rect = domElement.getBoundingClientRect();
3955 + const {
3956 + width,
3957 + height,
3958 + $: $2
3959 + } = getCssDimensions(domElement);
3960 + let x2 = ($2 ? round(rect.width) : rect.width) / width;
3961 + let y2 = ($2 ? round(rect.height) : rect.height) / height;
3962 + if (!x2 || !Number.isFinite(x2)) {
3963 + x2 = 1;
3964 + }
3965 + if (!y2 || !Number.isFinite(y2)) {
3966 + y2 = 1;
3967 + }
3968 + return {
3969 + x: x2,
3970 + y: y2
3971 + };
3972 +}
3973 +var noOffsets = /* @__PURE__ */ createCoords(0);
3974 +function getVisualOffsets(element) {
3975 + const win = getWindow(element);
3976 + if (!isWebKit() || !win.visualViewport) {
3977 + return noOffsets;
3978 + }
3979 + return {
3980 + x: win.visualViewport.offsetLeft,
3981 + y: win.visualViewport.offsetTop
3982 + };
3983 +}
3984 +function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
3985 + if (isFixed === void 0) {
3986 + isFixed = false;
3987 + }
3988 + return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
3989 +}
3990 +function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
3991 + if (includeScale === void 0) {
3992 + includeScale = false;
3993 + }
3994 + if (isFixedStrategy === void 0) {
3995 + isFixedStrategy = false;
3996 + }
3997 + const clientRect = element.getBoundingClientRect();
3998 + const domElement = unwrapElement(element);
3999 + let scale = createCoords(1);
4000 + if (includeScale) {
4001 + if (offsetParent) {
4002 + if (isElement(offsetParent)) {
4003 + scale = getScale(offsetParent);
4004 + }
4005 + } else {
4006 + scale = getScale(element);
4007 + }
4008 + }
4009 + const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
4010 + let x2 = (clientRect.left + visualOffsets.x) / scale.x;
4011 + let y2 = (clientRect.top + visualOffsets.y) / scale.y;
4012 + let width = clientRect.width / scale.x;
4013 + let height = clientRect.height / scale.y;
4014 + if (domElement && offsetParent) {
4015 + const win = getWindow(domElement);
4016 + const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
4017 + let currentWin = win;
4018 + let currentIFrame = getFrameElement(currentWin);
4019 + while (currentIFrame && offsetWin !== currentWin) {
4020 + const iframeScale = getScale(currentIFrame);
4021 + const iframeRect = currentIFrame.getBoundingClientRect();
4022 + const css = getComputedStyle2(currentIFrame);
4023 + const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
4024 + const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
4025 + x2 *= iframeScale.x;
4026 + y2 *= iframeScale.y;
4027 + width *= iframeScale.x;
4028 + height *= iframeScale.y;
4029 + x2 += left;
4030 + y2 += top;
4031 + currentWin = getWindow(currentIFrame);
4032 + currentIFrame = getFrameElement(currentWin);
4033 + }
4034 + }
4035 + return rectToClientRect({
4036 + width,
4037 + height,
4038 + x: x2,
4039 + y: y2
4040 + });
4041 +}
4042 +function getWindowScrollBarX(element, rect) {
4043 + const leftScroll = getNodeScroll(element).scrollLeft;
4044 + if (!rect) {
4045 + return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
4046 + }
4047 + return rect.left + leftScroll;
4048 +}
4049 +function getHTMLOffset(documentElement, scroll) {
4050 + const htmlRect = documentElement.getBoundingClientRect();
4051 + const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
4052 + const y2 = htmlRect.top + scroll.scrollTop;
4053 + return {
4054 + x: x2,
4055 + y: y2
4056 + };
4057 +}
4058 +function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
4059 + let {
4060 + elements: elements2,
4061 + rect,
4062 + offsetParent,
4063 + strategy
4064 + } = _ref;
4065 + const isFixed = strategy === "fixed";
4066 + const documentElement = getDocumentElement(offsetParent);
4067 + const topLayer = elements2 ? isTopLayer(elements2.floating) : false;
4068 + if (offsetParent === documentElement || topLayer && isFixed) {
4069 + return rect;
4070 + }
4071 + let scroll = {
4072 + scrollLeft: 0,
4073 + scrollTop: 0
4074 + };
4075 + let scale = createCoords(1);
4076 + const offsets = createCoords(0);
4077 + const isOffsetParentAnElement = isHTMLElement(offsetParent);
4078 + if (isOffsetParentAnElement || !isFixed) {
4079 + if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4080 + scroll = getNodeScroll(offsetParent);
4081 + }
4082 + if (isOffsetParentAnElement) {
4083 + const offsetRect = getBoundingClientRect(offsetParent);
4084 + scale = getScale(offsetParent);
4085 + offsets.x = offsetRect.x + offsetParent.clientLeft;
4086 + offsets.y = offsetRect.y + offsetParent.clientTop;
4087 + }
4088 + }
4089 + const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4090 + return {
4091 + width: rect.width * scale.x,
4092 + height: rect.height * scale.y,
4093 + x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
4094 + y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
4095 + };
4096 +}
4097 +function getClientRects(element) {
4098 + return element.getClientRects ? Array.from(element.getClientRects()) : [];
4099 +}
4100 +function getDocumentRect(html) {
4101 + const scroll = getNodeScroll(html);
4102 + const body = html.ownerDocument.body;
4103 + const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
4104 + const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
4105 + let x2 = -scroll.scrollLeft + getWindowScrollBarX(html);
4106 + const y2 = -scroll.scrollTop;
4107 + if (getComputedStyle2(body).direction === "rtl") {
4108 + x2 += max(html.clientWidth, body.clientWidth) - width;
4109 + }
4110 + return {
4111 + width,
4112 + height,
4113 + x: x2,
4114 + y: y2
4115 + };
4116 +}
4117 +var SCROLLBAR_MAX = 25;
4118 +function getViewportRect(element, strategy, rootBoundary) {
4119 + if (rootBoundary === void 0) {
4120 + rootBoundary = "viewport";
4121 + }
4122 + const isLayoutViewport = rootBoundary === "layoutViewport";
4123 + const win = getWindow(element);
4124 + const html = getDocumentElement(element);
4125 + const visualViewport = win.visualViewport;
4126 + let width = html.clientWidth;
4127 + let height = html.clientHeight;
4128 + let x2 = 0;
4129 + let y2 = 0;
4130 + if (visualViewport) {
4131 + const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
4132 + if (isLayoutViewport) {
4133 + if (!layoutRelativeClientCoords) {
4134 + x2 = -visualViewport.offsetLeft;
4135 + y2 = -visualViewport.offsetTop;
4136 + }
4137 + } else {
4138 + width = visualViewport.width;
4139 + height = visualViewport.height;
4140 + if (layoutRelativeClientCoords) {
4141 + x2 = visualViewport.offsetLeft;
4142 + y2 = visualViewport.offsetTop;
4143 + }
4144 + }
4145 + }
4146 + const windowScrollbarX = getWindowScrollBarX(html);
4147 + if (windowScrollbarX <= 0) {
4148 + const doc = html.ownerDocument;
4149 + const body = doc.body;
4150 + const bodyStyles = getComputedStyle(body);
4151 + const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
4152 + const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
4153 + const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
4154 + if (gutter <= SCROLLBAR_MAX) {
4155 + width -= gutter;
4156 + }
4157 + }
4158 + return {
4159 + width,
4160 + height,
4161 + x: x2,
4162 + y: y2
4163 + };
4164 +}
4165 +function getInnerBoundingClientRect(element, strategy) {
4166 + const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
4167 + const top = clientRect.top + element.clientTop;
4168 + const left = clientRect.left + element.clientLeft;
4169 + const scale = getScale(element);
4170 + const width = element.clientWidth * scale.x;
4171 + const height = element.clientHeight * scale.y;
4172 + const x2 = left * scale.x;
4173 + const y2 = top * scale.y;
4174 + return {
4175 + width,
4176 + height,
4177 + x: x2,
4178 + y: y2
4179 + };
4180 +}
4181 +function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
4182 + let rect;
4183 + if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
4184 + rect = getViewportRect(element, strategy, clippingAncestor);
4185 + } else if (clippingAncestor === "document") {
4186 + rect = getDocumentRect(getDocumentElement(element));
4187 + } else if (isElement(clippingAncestor)) {
4188 + rect = getInnerBoundingClientRect(clippingAncestor, strategy);
4189 + } else {
4190 + const visualOffsets = getVisualOffsets(element);
4191 + rect = {
4192 + x: clippingAncestor.x - visualOffsets.x,
4193 + y: clippingAncestor.y - visualOffsets.y,
4194 + width: clippingAncestor.width,
4195 + height: clippingAncestor.height
4196 + };
4197 + }
4198 + return rectToClientRect(rect);
4199 +}
4200 +function getClippingElementAncestors(element, cache) {
4201 + const cachedResult = cache.get(element);
4202 + if (cachedResult) {
4203 + return cachedResult;
4204 + }
4205 + let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
4206 + let lastKeptComputedStyle = null;
4207 + const elementIsFixed = getComputedStyle2(element).position === "fixed";
4208 + let currentNode = elementIsFixed ? getParentNode(element) : element;
4209 + while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
4210 + const computedStyle = getComputedStyle2(currentNode);
4211 + const currentNodeIsContaining = isContainingBlock(currentNode);
4212 + const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
4213 + const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
4214 + if (shouldDropCurrentNode) {
4215 + result = result.filter((ancestor) => ancestor !== currentNode);
4216 + } else {
4217 + lastKeptComputedStyle = computedStyle;
4218 + }
4219 + currentNode = getParentNode(currentNode);
4220 + }
4221 + cache.set(element, result);
4222 + return result;
4223 +}
4224 +function getClippingRect(_ref) {
4225 + let {
4226 + element,
4227 + boundary,
4228 + rootBoundary,
4229 + strategy
4230 + } = _ref;
4231 + const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4232 + const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4233 + const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4234 + let top = firstRect.top;
4235 + let right = firstRect.right;
4236 + let bottom = firstRect.bottom;
4237 + let left = firstRect.left;
4238 + for (let i = 1; i < clippingAncestors.length; i++) {
4239 + const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
4240 + top = max(rect.top, top);
4241 + right = min(rect.right, right);
4242 + bottom = min(rect.bottom, bottom);
4243 + left = max(rect.left, left);
4244 + }
4245 + return {
4246 + width: right - left,
4247 + height: bottom - top,
4248 + x: left,
4249 + y: top
4250 + };
4251 +}
4252 +function getDimensions(element) {
4253 + const {
4254 + width,
4255 + height
4256 + } = getCssDimensions(element);
4257 + return {
4258 + width,
4259 + height
4260 + };
4261 +}
4262 +function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
4263 + const isOffsetParentAnElement = isHTMLElement(offsetParent);
4264 + const documentElement = getDocumentElement(offsetParent);
4265 + const isFixed = strategy === "fixed";
4266 + const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
4267 + let scroll = {
4268 + scrollLeft: 0,
4269 + scrollTop: 0
4270 + };
4271 + const offsets = createCoords(0);
4272 + if (isOffsetParentAnElement || !isFixed) {
4273 + if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4274 + scroll = getNodeScroll(offsetParent);
4275 + }
4276 + if (isOffsetParentAnElement) {
4277 + const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
4278 + offsets.x = offsetRect.x + offsetParent.clientLeft;
4279 + offsets.y = offsetRect.y + offsetParent.clientTop;
4280 + }
4281 + }
4282 + if (!isOffsetParentAnElement && documentElement) {
4283 + offsets.x = getWindowScrollBarX(documentElement);
4284 + }
4285 + const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4286 + const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
4287 + const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
4288 + return {
4289 + x: x2,
4290 + y: y2,
4291 + width: rect.width,
4292 + height: rect.height
4293 + };
4294 +}
4295 +function isStaticPositioned(element) {
4296 + return getComputedStyle2(element).position === "static";
4297 +}
4298 +function getTrueOffsetParent(element, polyfill) {
4299 + if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
4300 + return null;
4301 + }
4302 + if (polyfill) {
4303 + return polyfill(element);
4304 + }
4305 + let rawOffsetParent = element.offsetParent;
4306 + if (getDocumentElement(element) === rawOffsetParent) {
4307 + rawOffsetParent = rawOffsetParent.ownerDocument.body;
4308 + }
4309 + return rawOffsetParent;
4310 +}
4311 +function getOffsetParent(element, polyfill) {
4312 + const win = getWindow(element);
4313 + if (isTopLayer(element)) {
4314 + return win;
4315 + }
4316 + if (!isHTMLElement(element)) {
4317 + let svgOffsetParent = getParentNode(element);
4318 + while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
4319 + if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
4320 + return svgOffsetParent;
4321 + }
4322 + svgOffsetParent = getParentNode(svgOffsetParent);
4323 + }
4324 + return win;
4325 + }
4326 + let offsetParent = getTrueOffsetParent(element, polyfill);
4327 + while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
4328 + offsetParent = getTrueOffsetParent(offsetParent, polyfill);
4329 + }
4330 + if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
4331 + return win;
4332 + }
4333 + return offsetParent || getContainingBlock(element) || win;
4334 +}
4335 +var getElementRects = async function(data) {
4336 + const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
4337 + const getDimensionsFn = this.getDimensions;
4338 + const floatingDimensions = await getDimensionsFn(data.floating);
4339 + return {
4340 + reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
4341 + floating: {
4342 + x: 0,
4343 + y: 0,
4344 + width: floatingDimensions.width,
4345 + height: floatingDimensions.height
4346 + }
4347 + };
4348 +};
4349 +function isRTL(element) {
4350 + return getComputedStyle2(element).direction === "rtl";
4351 +}
4352 +var platform2 = {
4353 + convertOffsetParentRelativeRectToViewportRelativeRect,
4354 + getDocumentElement,
4355 + getClippingRect,
4356 + getOffsetParent,
4357 + getElementRects,
4358 + getClientRects,
4359 + getDimensions,
4360 + getScale,
4361 + isElement,
4362 + isRTL
4363 +};
4364 +function rectsAreEqual(a, b) {
4365 + return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
4366 +}
4367 +function observeMove(element, onMove, ancestorResize) {
4368 + let io = null;
4369 + let timeoutId;
4370 + const root = getDocumentElement(element);
4371 + function cleanup() {
4372 + var _io;
4373 + clearTimeout(timeoutId);
4374 + (_io = io) == null || _io.disconnect();
4375 + io = null;
4376 + }
4377 + function refresh(skip, threshold) {
4378 + if (skip === void 0) {
4379 + skip = false;
4380 + }
4381 + if (threshold === void 0) {
4382 + threshold = 1;
4383 + }
4384 + cleanup();
4385 + const elementRectForRootMargin = element.getBoundingClientRect();
4386 + const {
4387 + left,
4388 + top,
4389 + width,
4390 + height
4391 + } = elementRectForRootMargin;
4392 + if (!skip) {
4393 + onMove();
4394 + }
4395 + if (!width || !height) {
4396 + return;
4397 + }
4398 + const insetTop = floor(top);
4399 + const insetRight = floor(root.clientWidth - (left + width));
4400 + const insetBottom = floor(root.clientHeight - (top + height));
4401 + const insetLeft = floor(left);
4402 + const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
4403 + const options = {
4404 + rootMargin,
4405 + threshold: max(0, min(1, threshold)) || 1
4406 + };
4407 + let isFirstUpdate = true;
4408 + function handleObserve(entries) {
4409 + const ratio = entries[0].intersectionRatio;
4410 + if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
4411 + return refresh();
4412 + }
4413 + if (ratio !== threshold) {
4414 + if (!isFirstUpdate) {
4415 + return refresh();
4416 + }
4417 + if (!ratio) {
4418 + timeoutId = setTimeout(() => {
4419 + refresh(false, 1e-7);
4420 + }, 1e3);
4421 + } else {
4422 + refresh(false, ratio);
4423 + }
4424 + }
4425 + isFirstUpdate = false;
4426 + }
4427 + try {
4428 + io = new IntersectionObserver(handleObserve, {
4429 + ...options,
4430 + // Handle <iframe>s
4431 + root: root.ownerDocument
4432 + });
4433 + } catch (_e) {
4434 + io = new IntersectionObserver(handleObserve, options);
4435 + }
4436 + io.observe(element);
4437 + }
4438 + const win = getWindow(element);
4439 + const handleResize = () => refresh(ancestorResize);
4440 + win.addEventListener("resize", handleResize);
4441 + refresh(true);
4442 + return () => {
4443 + win.removeEventListener("resize", handleResize);
4444 + cleanup();
4445 + };
4446 +}
4447 +function autoUpdate(reference, floating, update2, options) {
4448 + if (options === void 0) {
4449 + options = {};
4450 + }
4451 + const {
4452 + ancestorScroll = true,
4453 + ancestorResize = true,
4454 + elementResize = typeof ResizeObserver === "function",
4455 + layoutShift = typeof IntersectionObserver === "function",
4456 + animationFrame = false
4457 + } = options;
4458 + const referenceEl = unwrapElement(reference);
4459 + const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
4460 + ancestors.forEach((ancestor) => {
4461 + ancestorScroll && ancestor.addEventListener("scroll", update2);
4462 + ancestorResize && ancestor.addEventListener("resize", update2);
4463 + });
4464 + const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
4465 + let reobserveFrame = -1;
4466 + let resizeObserver = null;
4467 + if (elementResize) {
4468 + resizeObserver = new ResizeObserver((_ref) => {
4469 + let [firstEntry] = _ref;
4470 + if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4471 + resizeObserver.unobserve(floating);
4472 + cancelAnimationFrame(reobserveFrame);
4473 + reobserveFrame = requestAnimationFrame(() => {
4474 + var _resizeObserver;
4475 + (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
4476 + });
4477 + }
4478 + update2();
4479 + });
4480 + if (referenceEl && !animationFrame) {
4481 + resizeObserver.observe(referenceEl);
4482 + }
4483 + if (floating) {
4484 + resizeObserver.observe(floating);
4485 + }
4486 + }
4487 + let frameId;
4488 + let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
4489 + if (animationFrame) {
4490 + frameLoop();
4491 + }
4492 + function frameLoop() {
4493 + const nextRefRect = getBoundingClientRect(reference);
4494 + if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
4495 + update2();
4496 + }
4497 + prevRefRect = nextRefRect;
4498 + frameId = requestAnimationFrame(frameLoop);
4499 + }
4500 + update2();
4501 + return () => {
4502 + var _resizeObserver2;
4503 + ancestors.forEach((ancestor) => {
4504 + ancestorScroll && ancestor.removeEventListener("scroll", update2);
4505 + ancestorResize && ancestor.removeEventListener("resize", update2);
4506 + });
4507 + cleanupIo == null || cleanupIo();
4508 + (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
4509 + resizeObserver = null;
4510 + if (animationFrame) {
4511 + cancelAnimationFrame(frameId);
4512 + }
4513 + };
4514 +}
4515 +var offset2 = offset;
4516 +var shift2 = shift;
4517 +var flip2 = flip;
4518 +var size2 = size;
4519 +var limitShift2 = limitShift;
4520 +var computePosition2 = (reference, floating, options) => {
4521 + const cache = /* @__PURE__ */ new Map();
4522 + const mergedOptions = options != null ? options : {};
4523 + const platformWithCache = {
4524 + ...platform2,
4525 + ...mergedOptions.platform,
4526 + _c: cache
4527 + };
4528 + return computePosition(reference, floating, {
4529 + ...mergedOptions,
4530 + platform: platformWithCache
4531 + });
4532 +};
4533 +
4534 +// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
4535 +var React17 = __toESM(require_react(), 1);
4536 +var import_react2 = __toESM(require_react(), 1);
4537 +var ReactDOM3 = __toESM(require_react_dom(), 1);
4538 +var isClient = typeof document !== "undefined";
4539 +var noop2 = function noop3() {
4540 +};
4541 +var index = isClient ? import_react2.useLayoutEffect : noop2;
4542 +function deepEqual(a, b) {
4543 + if (a === b) {
4544 + return true;
4545 + }
4546 + if (typeof a !== typeof b) {
4547 + return false;
4548 + }
4549 + if (typeof a === "function" && a.toString() === b.toString()) {
4550 + return true;
4551 + }
4552 + let length;
4553 + let i;
4554 + let keys;
4555 + if (a && b && typeof a === "object") {
4556 + if (Array.isArray(a)) {
4557 + length = a.length;
4558 + if (length !== b.length) return false;
4559 + for (i = length; i-- !== 0; ) {
4560 + if (!deepEqual(a[i], b[i])) {
4561 + return false;
4562 + }
4563 + }
4564 + return true;
4565 + }
4566 + keys = Object.keys(a);
4567 + length = keys.length;
4568 + if (length !== Object.keys(b).length) {
4569 + return false;
4570 + }
4571 + for (i = length; i-- !== 0; ) {
4572 + if (!{}.hasOwnProperty.call(b, keys[i])) {
4573 + return false;
4574 + }
4575 + }
4576 + for (i = length; i-- !== 0; ) {
4577 + const key = keys[i];
4578 + if (key === "_owner" && a.$$typeof) {
4579 + continue;
4580 + }
4581 + if (!deepEqual(a[key], b[key])) {
4582 + return false;
4583 + }
4584 + }
4585 + return true;
4586 + }
4587 + return a !== a && b !== b;
4588 +}
4589 +function getDPR(element) {
4590 + if (typeof window === "undefined") {
4591 + return 1;
4592 + }
4593 + const win = element.ownerDocument.defaultView || window;
4594 + return win.devicePixelRatio || 1;
4595 +}
4596 +function roundByDPR(element, value) {
4597 + const dpr = getDPR(element);
4598 + return Math.round(value * dpr) / dpr;
4599 +}
4600 +function useLatestRef(value) {
4601 + const ref = React17.useRef(value);
4602 + index(() => {
4603 + ref.current = value;
4604 + });
4605 + return ref;
4606 +}
4607 +function useFloating(options) {
4608 + if (options === void 0) {
4609 + options = {};
4610 + }
4611 + const {
4612 + placement = "bottom",
4613 + strategy = "absolute",
4614 + middleware = [],
4615 + platform: platform3,
4616 + elements: {
4617 + reference: externalReference,
4618 + floating: externalFloating
4619 + } = {},
4620 + transform = true,
4621 + whileElementsMounted,
4622 + open: open2
4623 + } = options;
4624 + const [data, setData] = React17.useState({
4625 + x: 0,
4626 + y: 0,
4627 + strategy,
4628 + placement,
4629 + middlewareData: {},
4630 + isPositioned: false
4631 + });
4632 + const [latestMiddleware, setLatestMiddleware] = React17.useState(middleware);
4633 + if (!deepEqual(latestMiddleware, middleware)) {
4634 + setLatestMiddleware(middleware);
4635 + }
4636 + const [_reference, _setReference] = React17.useState(null);
4637 + const [_floating, _setFloating] = React17.useState(null);
4638 + const setReference = React17.useCallback((node) => {
4639 + if (node !== referenceRef.current) {
4640 + referenceRef.current = node;
4641 + _setReference(node);
4642 + }
4643 + }, []);
4644 + const setFloating = React17.useCallback((node) => {
4645 + if (node !== floatingRef.current) {
4646 + floatingRef.current = node;
4647 + _setFloating(node);
4648 + }
4649 + }, []);
4650 + const referenceEl = externalReference || _reference;
4651 + const floatingEl = externalFloating || _floating;
4652 + const referenceRef = React17.useRef(null);
4653 + const floatingRef = React17.useRef(null);
4654 + const dataRef = React17.useRef(data);
4655 + const hasWhileElementsMounted = whileElementsMounted != null;
4656 + const whileElementsMountedRef = useLatestRef(whileElementsMounted);
4657 + const platformRef = useLatestRef(platform3);
4658 + const openRef = useLatestRef(open2);
4659 + const update2 = React17.useCallback(() => {
4660 + if (!referenceRef.current || !floatingRef.current) {
4661 + return;
4662 + }
4663 + const config = {
4664 + placement,
4665 + strategy,
4666 + middleware: latestMiddleware
4667 + };
4668 + if (platformRef.current) {
4669 + config.platform = platformRef.current;
4670 + }
4671 + computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
4672 + const fullData = {
4673 + ...data2,
4674 + // The floating element's position may be recomputed while it's closed
4675 + // but still mounted (such as when transitioning out). To ensure
4676 + // `isPositioned` will be `false` initially on the next open, avoid
4677 + // setting it to `true` when `open === false` (must be specified).
4678 + isPositioned: openRef.current !== false
4679 + };
4680 + if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
4681 + dataRef.current = fullData;
4682 + ReactDOM3.flushSync(() => {
4683 + setData(fullData);
4684 + });
4685 + }
4686 + });
4687 + }, [latestMiddleware, placement, strategy, platformRef, openRef]);
4688 + index(() => {
4689 + if (open2 === false && dataRef.current.isPositioned) {
4690 + dataRef.current.isPositioned = false;
4691 + setData((data2) => ({
4692 + ...data2,
4693 + isPositioned: false
4694 + }));
4695 + }
4696 + }, [open2]);
4697 + const isMountedRef = React17.useRef(false);
4698 + index(() => {
4699 + isMountedRef.current = true;
4700 + return () => {
4701 + isMountedRef.current = false;
4702 + };
4703 + }, []);
4704 + index(() => {
4705 + if (referenceEl) referenceRef.current = referenceEl;
4706 + if (floatingEl) floatingRef.current = floatingEl;
4707 + if (referenceEl && floatingEl) {
4708 + if (whileElementsMountedRef.current) {
4709 + return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
4710 + }
4711 + update2();
4712 + }
4713 + }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
4714 + const refs = React17.useMemo(() => ({
4715 + reference: referenceRef,
4716 + floating: floatingRef,
4717 + setReference,
4718 + setFloating
4719 + }), [setReference, setFloating]);
4720 + const elements2 = React17.useMemo(() => ({
4721 + reference: referenceEl,
4722 + floating: floatingEl
4723 + }), [referenceEl, floatingEl]);
4724 + const floatingStyles = React17.useMemo(() => {
4725 + const initialStyles = {
4726 + position: strategy,
4727 + left: 0,
4728 + top: 0
4729 + };
4730 + if (!elements2.floating) {
4731 + return initialStyles;
4732 + }
4733 + const x2 = roundByDPR(elements2.floating, data.x);
4734 + const y2 = roundByDPR(elements2.floating, data.y);
4735 + if (transform) {
4736 + return {
4737 + ...initialStyles,
4738 + transform: "translate(" + x2 + "px, " + y2 + "px)",
4739 + ...getDPR(elements2.floating) >= 1.5 && {
4740 + willChange: "transform"
4741 + }
4742 + };
4743 + }
4744 + return {
4745 + position: strategy,
4746 + left: x2,
4747 + top: y2
4748 + };
4749 + }, [strategy, transform, elements2.floating, data.x, data.y]);
4750 + return React17.useMemo(() => ({
4751 + ...data,
4752 + update: update2,
4753 + refs,
4754 + elements: elements2,
4755 + floatingStyles
4756 + }), [data, update2, refs, elements2, floatingStyles]);
4757 +}
4758 +var offset3 = (options, deps) => {
4759 + const result = offset2(options);
4760 + return {
4761 + name: result.name,
4762 + fn: result.fn,
4763 + options: [options, deps]
4764 + };
4765 +};
4766 +var shift3 = (options, deps) => {
4767 + const result = shift2(options);
4768 + return {
4769 + name: result.name,
4770 + fn: result.fn,
4771 + options: [options, deps]
4772 + };
4773 +};
4774 +var limitShift3 = (options, deps) => {
4775 + const result = limitShift2(options);
4776 + return {
4777 + fn: result.fn,
4778 + options: [options, deps]
4779 + };
4780 +};
4781 +var flip3 = (options, deps) => {
4782 + const result = flip2(options);
4783 + return {
4784 + name: result.name,
4785 + fn: result.fn,
4786 + options: [options, deps]
4787 + };
4788 +};
4789 +var size3 = (options, deps) => {
4790 + const result = size2(options);
4791 + return {
4792 + name: result.name,
4793 + fn: result.fn,
4794 + options: [options, deps]
4795 + };
4796 +};
4797 +
4798 +// node_modules/@base-ui/react/utils/popups/popupHandle.mjs
4799 +var BasePopupHandle = class {
4800 + /**
4801 + * Stores of every root currently using this handle, in attach order. A handle is meant to be used
4802 + * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
4803 + * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
4804 + * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
4805 + */
4806 + attachedStores = [];
4807 + /**
4808 + * Store of the root that currently controls the handle: the most recently attached one still
4809 + * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
4810 + */
4811 + attachedStoreValue = null;
4812 + /**
4813 + * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
4814 + */
4815 + storeListeners = /* @__PURE__ */ new Set();
4816 + /**
4817 + * Creates a handle backed by the store used while no root is attached.
4818 + *
4819 + * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
4820 + * so they can render and register without a mounted root. Triggers register into whichever store
4821 + * `store` currently resolves to, so while detached they live in this store's trigger map and
4822 + * migrate themselves to the root's store (and back) as it attaches/detaches.
4823 + * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
4824 + * `MenuHandle.open()` in warning text.
4825 + * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
4826 + * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
4827 + * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
4828 + */
4829 + constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
4830 + this.fallbackStore = fallbackStore;
4831 + this.componentName = componentName;
4832 + this.throwOnMissingTrigger = throwOnMissingTrigger;
4833 + }
4834 + get attachedStore() {
4835 + return this.attachedStoreValue;
4836 + }
4837 + /**
4838 + * Store that detached triggers read from: the attached root's store, or an inert fallback store
4839 + * used while no root is attached.
4840 + * @internal
4841 + */
4842 + get store() {
4843 + return this.attachedStoreValue ?? this.fallbackStore;
4844 + }
4845 + /**
4846 + * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
4847 + * the handle during render because a handle can be shared by concurrent server-rendered requests.
4848 + * @internal
4849 + */
4850 + get serverStore() {
4851 + return this.fallbackStore;
4852 + }
4853 + /**
4854 + * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
4855 + * when a root attaches or detaches. Returns a function that removes the listener.
4856 + * @internal
4857 + */
4858 + subscribeStore(listener) {
4859 + this.storeListeners.add(listener);
4860 + return () => {
4861 + this.storeListeners.delete(listener);
4862 + };
4863 + }
4864 + /**
4865 + * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
4866 + * re-register into it (their registration effect migrates them when the store pointer changes).
4867 + * Returns a cleanup function that detaches the store again.
4868 + * @internal
4869 + */
4870 + attachStore(newStore) {
4871 + this.attachedStores.push(newStore);
4872 + this.setActiveStore(newStore);
4873 + if (true) {
4874 + if (this.attachedStores.length > 1) {
4875 + const dev = this;
4876 + (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
4877 + if (this.attachedStores.length > 1) {
4878 + console.warn("Base UI: A handle is attached to more than one mounted root at the same time. The most recently mounted root takes over and the previous one stops being controlled by the handle. A handle should be used by a single root that stays mounted for the lifetime of the handle.");
4879 + }
4880 + });
4881 + }
4882 + }
4883 + return () => {
4884 + const index2 = this.attachedStores.lastIndexOf(newStore);
4885 + if (index2 !== -1) {
4886 + this.attachedStores.splice(index2, 1);
4887 + }
4888 + this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
4889 + };
4890 + }
4891 + /**
4892 + * Sets the store that currently controls the handle and notifies subscribers when it changes, so
4893 + * detached triggers re-render and migrate their registration to the new store.
4894 + */
4895 + setActiveStore(store) {
4896 + if (this.attachedStoreValue !== store) {
4897 + this.attachedStoreValue = store;
4898 + this.storeListeners.forEach((listener) => {
4899 + listener();
4900 + });
4901 + }
4902 + }
4903 + /**
4904 + * Opens the attached root's store and associates it with the trigger with the given id, or a
4905 + * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
4906 + * `open()` method, which only narrows the parameter type.
4907 + *
4908 + * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
4909 + * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
4910 + *
4911 + * This method should only be called in an event handler or an effect (not during rendering).
4912 + *
4913 + * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
4914 + * without associating any trigger.
4915 + */
4916 + openByTrigger(triggerId) {
4917 + const attachedStore = this.attachedStore;
4918 + if (attachedStore === null) {
4919 + if (true) {
4920 + console.warn(`Base UI: ${this.componentName}Handle.open() was called while no root using this handle is mounted. The call was ignored; mount a root with this handle before opening it imperatively.`);
4921 + }
4922 + return;
4923 + }
4924 + let triggerElement;
4925 + if (triggerId) {
4926 + for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) {
4927 + triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId);
4928 + }
4929 + triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
4930 + }
4931 + if (triggerId && !triggerElement) {
4932 + if (this.throwOnMissingTrigger) {
4933 + throw new Error(true ? `Base UI: ${this.componentName}Handle.open() was called with the trigger id "${triggerId}", but no matching trigger is registered with this handle. An anchored popup cannot open without a trigger to anchor to. Pass the id of a mounted ${this.componentName}.Trigger that has this handle set on its "handle" prop.` : formatErrorMessage_default(99, this.componentName, triggerId, this.componentName));
4934 + }
4935 + if (true) {
4936 + console.warn(`Base UI: ${this.componentName}Handle.open: No trigger found with id "${triggerId}". The popup will open, but the trigger will not be associated with it.`);
4937 + }
4938 + }
4939 + attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
4940 + }
4941 + /**
4942 + * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
4943 + * while no root is attached. Shared by every concrete handle's public `close()` method.
4944 + *
4945 + * This method should only be called in an event handler or an effect (not during rendering).
4946 + */
4947 + closePopup() {
4948 + const attachedStore = this.attachedStore;
4949 + if (attachedStore === null) {
4950 + if (true) {
4951 + console.warn(`Base UI: ${this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
4952 + }
4953 + return;
4954 + }
4955 + attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
4956 + }
4957 +};
4958 +
4959 +// node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
4960 +var React22 = __toESM(require_react(), 1);
4961 +var ReactDOM4 = __toESM(require_react_dom(), 1);
4962 +
4963 +// node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
4964 +var React21 = __toESM(require_react(), 1);
4965 +
4966 +// node_modules/@base-ui/utils/store/useStore.mjs
4967 +var React19 = __toESM(require_react(), 1);
4968 +var import_shim = __toESM(require_shim(), 1);
4969 +var import_with_selector = __toESM(require_with_selector(), 1);
4970 +
4971 +// node_modules/@base-ui/utils/fastHooks.mjs
4972 +var React18 = __toESM(require_react(), 1);
4973 +var hooks = [];
4974 +var currentInstance = void 0;
4975 +function getInstance() {
4976 + return currentInstance;
4977 +}
4978 +function register(hook) {
4979 + hooks.push(hook);
4980 +}
4981 +function fastComponent(fn) {
4982 + const FastComponent = (props, forwardedRef) => {
4983 + const instance = useRefWithInit(createInstance).current;
4984 + let result;
4985 + try {
4986 + currentInstance = instance;
4987 + for (const hook of hooks) {
4988 + hook.before(instance);
4989 + }
4990 + result = fn(props, forwardedRef);
4991 + for (const hook of hooks) {
4992 + hook.after(instance);
4993 + }
4994 + instance.didInitialize = true;
4995 + } finally {
4996 + currentInstance = void 0;
4997 + }
4998 + return result;
4999 + };
5000 + FastComponent.displayName = fn.displayName || fn.name;
5001 + return FastComponent;
5002 +}
5003 +function fastComponentRef(fn) {
5004 + return /* @__PURE__ */ React18.forwardRef(fastComponent(fn));
5005 +}
5006 +function createInstance() {
5007 + return {
5008 + didInitialize: false
5009 + };
5010 +}
5011 +
5012 +// node_modules/@base-ui/utils/store/useStore.mjs
5013 +var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
5014 +var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
5015 +function useStore(store, selector, a1, a2, a3) {
5016 + return useStoreImplementation(store, selector, a1, a2, a3);
5017 +}
5018 +function useStoreR19(store, selector, a1, a2, a3) {
5019 + const getSelection = React19.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [store, selector, a1, a2, a3]);
5020 + return (0, import_shim.useSyncExternalStore)(store.subscribe, getSelection, getSelection);
5021 +}
5022 +register({
5023 + before(instance) {
5024 + instance.syncIndex = 0;
5025 + if (!instance.didInitialize) {
5026 + instance.syncTick = 1;
5027 + instance.syncHooks = [];
5028 + instance.didChangeStore = true;
5029 + instance.getSnapshot = () => {
5030 + let didChange2 = false;
5031 + for (let i = 0; i < instance.syncHooks.length; i += 1) {
5032 + const hook = instance.syncHooks[i];
5033 + const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
5034 + if (!Object.is(hook.value, value)) {
5035 + didChange2 = true;
5036 + hook.value = value;
5037 + }
5038 + }
5039 + if (didChange2) {
5040 + instance.syncTick += 1;
5041 + }
5042 + return instance.syncTick;
5043 + };
5044 + }
5045 + },
5046 + after(instance) {
5047 + if (instance.syncHooks.length > 0) {
5048 + if (instance.didChangeStore) {
5049 + instance.didChangeStore = false;
5050 + instance.subscribe = (onStoreChange) => {
5051 + const stores = /* @__PURE__ */ new Set();
5052 + for (const hook of instance.syncHooks) {
5053 + stores.add(hook.store);
5054 + }
5055 + const unsubscribes = [];
5056 + for (const store of stores) {
5057 + unsubscribes.push(store.subscribe(onStoreChange));
5058 + }
5059 + return () => {
5060 + for (const unsubscribe of unsubscribes) {
5061 + unsubscribe();
5062 + }
5063 + };
5064 + };
5065 + }
5066 + (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
5067 + }
5068 + }
5069 +});
5070 +function useStoreFast(store, selector, a1, a2, a3) {
5071 + const instance = getInstance();
5072 + if (!instance) {
5073 + return useStoreR19(store, selector, a1, a2, a3);
5074 + }
5075 + const index2 = instance.syncIndex;
5076 + instance.syncIndex += 1;
5077 + let hook;
5078 + if (!instance.didInitialize) {
5079 + hook = {
5080 + store,
5081 + selector,
5082 + a1,
5083 + a2,
5084 + a3,
5085 + value: selector(store.getSnapshot(), a1, a2, a3)
5086 + };
5087 + instance.syncHooks.push(hook);
5088 + } else {
5089 + hook = instance.syncHooks[index2];
5090 + if (hook.store !== store || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
5091 + if (hook.store !== store) {
5092 + instance.didChangeStore = true;
5093 + }
5094 + hook.store = store;
5095 + hook.selector = selector;
5096 + hook.a1 = a1;
5097 + hook.a2 = a2;
5098 + hook.a3 = a3;
5099 + hook.value = selector(store.getSnapshot(), a1, a2, a3);
5100 + }
5101 + }
5102 + return hook.value;
5103 +}
5104 +function useStoreLegacy(store, selector, a1, a2, a3) {
5105 + return (0, import_with_selector.useSyncExternalStoreWithSelector)(store.subscribe, store.getSnapshot, store.getSnapshot, (state) => selector(state, a1, a2, a3));
5106 +}
5107 +
5108 +// node_modules/@base-ui/utils/store/Store.mjs
5109 +var Store = class {
5110 + /**
5111 + * Creates a store with the given initial state, constructing the class it is called on.
5112 + * Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that
5113 + * class but degrades the inferred instance type to `Store`; use `new` there instead.
5114 + */
5115 + static create(state) {
5116 + return new this(state);
5117 + }
5118 + /**
5119 + * The current state of the store.
5120 + * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
5121 + * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
5122 + * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
5123 + *
5124 + * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
5125 + */
5126 + // Internal state to handle recursive `setState()` calls
5127 + constructor(state) {
5128 + this.state = state;
5129 + this.listeners = /* @__PURE__ */ new Set();
5130 + this.updateTick = 0;
5131 + }
5132 + /**
5133 + * Registers a listener that will be called whenever the store's state changes.
5134 + *
5135 + * @param fn The listener function to be called on state changes.
5136 + * @returns A function to unsubscribe the listener.
5137 + */
5138 + subscribe = (fn) => {
5139 + this.listeners.add(fn);
5140 + return () => {
5141 + this.listeners.delete(fn);
5142 + };
5143 + };
5144 + /**
5145 + * Returns the current state of the store.
5146 + */
5147 + getSnapshot = () => {
5148 + return this.state;
5149 + };
5150 + /**
5151 + * Updates the entire store's state and notifies all registered listeners.
5152 + *
5153 + * @param newState The new state to set for the store.
5154 + */
5155 + setState(newState) {
5156 + if (this.state === newState) {
5157 + return;
5158 + }
5159 + this.state = newState;
5160 + this.updateTick += 1;
5161 + const currentTick = this.updateTick;
5162 + for (const listener of this.listeners) {
5163 + if (currentTick !== this.updateTick) {
5164 + return;
5165 + }
5166 + listener(newState);
5167 + }
5168 + }
5169 + /**
5170 + * Merges the provided changes into the current state and notifies listeners if there are changes.
5171 + * Each value must match its state key. Pass an exact known subset rather than a broad
5172 + * `Partial<State>`, which may contain `undefined` for required state fields.
5173 + *
5174 + * @param changes An object containing the changes to apply to the current state.
5175 + */
5176 + update(changes) {
5177 + for (const key in changes) {
5178 + if (!Object.is(this.state[key], changes[key])) {
5179 + this.setState({
5180 + ...this.state,
5181 + ...changes
5182 + });
5183 + return;
5184 + }
5185 + }
5186 + }
5187 + /**
5188 + * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
5189 + *
5190 + * @param key The key in the store's state to update.
5191 + * @param value The new value to set for the specified key.
5192 + */
5193 + set(key, value) {
5194 + if (!Object.is(this.state[key], value)) {
5195 + this.setState({
5196 + ...this.state,
5197 + [key]: value
5198 + });
5199 + }
5200 + }
5201 + /**
5202 + * Gives the state a new reference and updates all registered listeners.
5203 + */
5204 + notifyAll() {
5205 + const newState = {
5206 + ...this.state
5207 + };
5208 + this.setState(newState);
5209 + }
5210 + use(selector, a1, a2, a3) {
5211 + return useStore(this, selector, a1, a2, a3);
5212 + }
5213 +};
5214 +
5215 +// node_modules/@base-ui/utils/store/ReactStore.mjs
5216 +var React20 = __toESM(require_react(), 1);
5217 +var ReactStore = class extends Store {
5218 + /**
5219 + * Creates a new ReactStore instance.
5220 + *
5221 + * @param state Initial state of the store.
5222 + * @param context Non-reactive context values.
5223 + * @param selectors Optional selectors for use with `useState`.
5224 + */
5225 + constructor(state, context = {}, selectors3) {
5226 + super(state);
5227 + this.context = context;
5228 + this.selectors = selectors3;
5229 + }
5230 + /**
5231 + * Non-reactive values such as refs, callbacks, etc.
5232 + */
5233 + /**
5234 + * Synchronizes a single external value into the store.
5235 + *
5236 + * Note that the while the value in `state` is updated immediately, the value returned
5237 + * by `useState` is updated before the next render (similarly to React's `useState`).
5238 + */
5239 + useSyncedValue(key, value) {
5240 + React20.useDebugValue(key);
5241 + const store = this;
5242 + useIsoLayoutEffect(() => {
5243 + if (store.state[key] !== value) {
5244 + store.set(key, value);
5245 + }
5246 + }, [store, key, value]);
5247 + }
5248 + /**
5249 + * Synchronizes a single external value into the store and
5250 + * cleans it up (sets to `undefined`) on unmount.
5251 + *
5252 + * Note that the while the value in `state` is updated immediately, the value returned
5253 + * by `useState` is updated before the next render (similarly to React's `useState`).
5254 + */
5255 + useSyncedValueWithCleanup(key, value) {
5256 + const store = this;
5257 + useIsoLayoutEffect(() => {
5258 + if (store.state[key] !== value) {
5259 + store.set(key, value);
5260 + }
5261 + return () => {
5262 + store.set(key, void 0);
5263 + };
5264 + }, [store, key, value]);
5265 + }
5266 + /**
5267 + * Synchronizes multiple external values into the store.
5268 + * Each value must match its state key. Pass an exact known subset rather than a broad
5269 + * `Partial<State>`, which may contain `undefined` for required state fields.
5270 + *
5271 + * Note that the while the values in `state` are updated immediately, the values returned
5272 + * by `useState` are updated before the next render (similarly to React's `useState`).
5273 + *
5274 + * @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted.
5275 + */
5276 + useSyncedValues(statePart) {
5277 + const store = this;
5278 + if (true) {
5279 + React20.useDebugValue(statePart, (p3) => Object.keys(p3));
5280 + const keys = React20.useRef(Object.keys(statePart)).current;
5281 + const nextKeys = Object.keys(statePart);
5282 + if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
5283 + console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
5284 + }
5285 + }
5286 + const dependencies = Object.values(statePart);
5287 + useIsoLayoutEffect(() => {
5288 + store.update(statePart);
5289 + }, [store, ...dependencies]);
5290 + }
5291 + /**
5292 + * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
5293 + * is non-undefined, the store's state at `key` is updated to match `controlled`.
5294 + */
5295 + useControlledProp(key, controlled) {
5296 + React20.useDebugValue(key);
5297 + const store = this;
5298 + const isControlled = controlled !== void 0;
5299 + useIsoLayoutEffect(() => {
5300 + if (isControlled && !Object.is(store.state[key], controlled)) {
5301 + store.setState({
5302 + ...store.state,
5303 + [key]: controlled
5304 + });
5305 + }
5306 + }, [store, key, controlled, isControlled]);
5307 + if (true) {
5308 + const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
5309 + if (!cache.has(key)) {
5310 + cache.set(key, isControlled);
5311 + }
5312 + const previouslyControlled = cache.get(key);
5313 + if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
5314 + console.error(`A component is changing the ${isControlled ? "" : "un"}controlled state of ${key.toString()} to be ${isControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
5315 + }
5316 + }
5317 + }
5318 + /** Gets the current value from the store using a selector with the provided key.
5319 + *
5320 + * @param key Key of the selector to use.
5321 + */
5322 + select(key, a1, a2, a3) {
5323 + const selector = this.selectors[key];
5324 + return selector(this.state, a1, a2, a3);
5325 + }
5326 + /**
5327 + * Returns a value from the store's state using a selector function.
5328 + * Used to subscribe to specific parts of the state.
5329 + * This methods causes a rerender whenever the selected state changes.
5330 + *
5331 + * @param key Key of the selector to use.
5332 + */
5333 + useState(key, a1, a2, a3) {
5334 + React20.useDebugValue(key);
5335 + return useStore(this, this.selectors[key], a1, a2, a3);
5336 + }
5337 + /**
5338 + * Wraps a function with `useStableCallback` to ensure it has a stable reference
5339 + * and assigns it to the context.
5340 + *
5341 + * @param key Key of the event callback. Must be a function in the context.
5342 + * @param fn Function to assign.
5343 + */
5344 + useContextCallback(key, fn) {
5345 + React20.useDebugValue(key);
5346 + const stableFunction = useStableCallback(fn ?? NOOP);
5347 + this.context[key] = stableFunction;
5348 + }
5349 + /**
5350 + * Returns a stable setter function for a specific key in the store's state.
5351 + * It's commonly used to pass as a ref callback to React elements.
5352 + *
5353 + * @param key Key of the state to set.
5354 + */
5355 + useStateSetter(key) {
5356 + const ref = React20.useRef(void 0);
5357 + if (ref.current === void 0) {
5358 + ref.current = (value) => {
5359 + this.set(key, value);
5360 + };
5361 + }
5362 + return ref.current;
5363 + }
5364 + /**
5365 + * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
5366 + *
5367 + * @param key Key of the selector to observe.
5368 + * @param listener Listener function called when the selector result changes.
5369 + */
5370 + observe(selector, listener) {
5371 + let selectFn;
5372 + if (typeof selector === "function") {
5373 + selectFn = selector;
5374 + } else {
5375 + selectFn = this.selectors[selector];
5376 + }
5377 + let prevValue = selectFn(this.state);
5378 + listener(prevValue, prevValue, this);
5379 + return this.subscribe((nextState) => {
5380 + const nextValue = selectFn(nextState);
5381 + if (!Object.is(prevValue, nextValue)) {
5382 + const oldValue = prevValue;
5383 + prevValue = nextValue;
5384 + listener(nextValue, oldValue, this);
5385 + }
5386 + });
5387 + }
5388 +};
5389 +
5390 +// node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
5391 +var selectors = {
5392 + open: (state) => state.open,
5393 + transitionStatus: (state) => state.transitionStatus,
5394 + domReferenceElement: (state) => state.domReferenceElement,
5395 + referenceElement: (state) => state.positionReference ?? state.referenceElement,
5396 + floatingElement: (state) => state.floatingElement,
5397 + floatingId: (state) => state.floatingId
5398 +};
5399 +var FloatingRootStore = class extends ReactStore {
5400 + constructor(options) {
5401 + const {
5402 + syncOnly,
5403 + nested,
5404 + onOpenChange,
5405 + triggerElements,
5406 + ...initialState
5407 + } = options;
5408 + super({
5409 + ...initialState,
5410 + positionReference: initialState.referenceElement,
5411 + domReferenceElement: initialState.referenceElement
5412 + }, {
5413 + onOpenChange,
5414 + dataRef: {
5415 + current: {}
5416 + },
5417 + events: createEventEmitter(),
5418 + nested,
5419 + triggerElements
5420 + }, selectors);
5421 + this.syncOnly = syncOnly;
5422 + }
5423 + /**
5424 + * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
5425 + */
5426 + syncOpenEvent = (newOpen, event) => {
5427 + if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
5428 + // click events to upgrade a hover-open.
5429 + event != null && isClickLikeEvent(event)) {
5430 + this.context.dataRef.current.openEvent = newOpen ? event : void 0;
5431 + }
5432 + };
5433 + /**
5434 + * Runs the root-owned side effects for an open state change.
5435 + */
5436 + dispatchOpenChange = (newOpen, eventDetails) => {
5437 + this.syncOpenEvent(newOpen, eventDetails.event);
5438 + const details = {
5439 + open: newOpen,
5440 + reason: eventDetails.reason,
5441 + nativeEvent: eventDetails.event,
5442 + nested: this.context.nested,
5443 + triggerElement: eventDetails.trigger
5444 + };
5445 + this.context.events.emit("openchange", details);
5446 + };
5447 + /**
5448 + * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
5449 + *
5450 + * @param newOpen The new open state.
5451 + * @param eventDetails Details about the event that triggered the open state change.
5452 + */
5453 + setOpen = (newOpen, eventDetails) => {
5454 + if (this.syncOnly) {
5455 + this.context.onOpenChange?.(newOpen, eventDetails);
5456 + return;
5457 + }
5458 + this.dispatchOpenChange(newOpen, eventDetails);
5459 + this.context.onOpenChange?.(newOpen, eventDetails);
5460 + };
5461 +};
5462 +
5463 +// node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
5464 +function useSyncedFloatingRootContext(options) {
5465 + const {
5466 + popupStore,
5467 + treatPopupAsFloatingElement = false,
5468 + floatingRootContext: floatingRootContextProp,
5469 + floatingId,
5470 + nested,
5471 + onOpenChange
5472 + } = options;
5473 + const open2 = popupStore.useState("open");
5474 + const referenceElement = popupStore.useState("activeTriggerElement");
5475 + const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
5476 + const triggerElements = popupStore.context.triggerElements;
5477 + const handleOpenChange = onOpenChange;
5478 + const internalStoreRef = React21.useRef(null);
5479 + if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
5480 + internalStoreRef.current = new FloatingRootStore({
5481 + open: open2,
5482 + transitionStatus: void 0,
5483 + referenceElement,
5484 + floatingElement,
5485 + triggerElements,
5486 + onOpenChange: handleOpenChange,
5487 + floatingId,
5488 + syncOnly: true,
5489 + nested
5490 + });
5491 + }
5492 + const store = floatingRootContextProp ?? internalStoreRef.current;
5493 + popupStore.useSyncedValue("floatingId", floatingId);
5494 + useIsoLayoutEffect(() => {
5495 + const valuesToSync = {
5496 + open: open2,
5497 + floatingId,
5498 + referenceElement,
5499 + floatingElement
5500 + };
5501 + if (isElement(referenceElement)) {
5502 + valuesToSync.domReferenceElement = referenceElement;
5503 + }
5504 + if (store.state.positionReference === store.state.referenceElement) {
5505 + valuesToSync.positionReference = referenceElement;
5506 + }
5507 + store.update(valuesToSync);
5508 + }, [open2, floatingId, referenceElement, floatingElement, store]);
5509 + store.context.onOpenChange = handleOpenChange;
5510 + store.context.nested = nested;
5511 + return store;
5512 +}
5513 +
5514 +// node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
5515 +var FOCUSABLE_POPUP_PROPS = {
5516 + tabIndex: -1,
5517 + [FOCUSABLE_ATTRIBUTE]: ""
5518 +};
5519 +function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
5520 + const floatingId = useId();
5521 + const nested = useFloatingParentNodeId() != null;
5522 + const store = useRefWithInit(() => createStore(floatingId, nested)).current;
5523 + useSyncedFloatingRootContext({
5524 + popupStore: store,
5525 + treatPopupAsFloatingElement,
5526 + floatingRootContext: store.state.floatingRootContext,
5527 + floatingId,
5528 + nested,
5529 + onOpenChange: store.setOpen
5530 + });
5531 + return store;
5532 +}
5533 +function PopupHandleAttachment({
5534 + handle,
5535 + store
5536 +}) {
5537 + useIsoLayoutEffect(() => {
5538 + return handle.attachStore(store);
5539 + }, [handle, store]);
5540 + return null;
5541 +}
5542 +function syncTriggerCount(store) {
5543 + const triggerCount = store.context.triggerElements.size;
5544 + if (store.select("open") && store.state.triggerCount !== triggerCount) {
5545 + store.set("triggerCount", triggerCount);
5546 + }
5547 +}
5548 +function useTriggerRegistration(id, store) {
5549 + const registrationRef = React22.useRef(null);
5550 + return useStableCallback((element) => {
5551 + const registration = registrationRef.current;
5552 + if (registration !== null) {
5553 + if (registration.element === element && registration.store === store && registration.id === id) {
5554 + return;
5555 + }
5556 + registrationRef.current = null;
5557 + const registeredStore = registration.store;
5558 + if (registeredStore.context.triggerElements.getById(registration.id) === registration.element) {
5559 + registeredStore.context.triggerElements.delete(registration.id);
5560 + syncTriggerCount(registeredStore);
5561 + }
5562 + }
5563 + if (element !== null && id !== void 0) {
5564 + registrationRef.current = {
5565 + store,
5566 + id,
5567 + element
5568 + };
5569 + store.context.triggerElements.add(id, element);
5570 + syncTriggerCount(store);
5571 + }
5572 + });
5573 +}
5574 +function createPopupOpenState(state, open2, trigger, preventUnmountOnClose = false) {
5575 + let preventUnmountingOnClose = state.preventUnmountingOnClose;
5576 + if (open2) {
5577 + preventUnmountingOnClose = false;
5578 + } else if (preventUnmountOnClose) {
5579 + preventUnmountingOnClose = true;
5580 + }
5581 + const triggerId = trigger?.id ?? null;
5582 + let activeTriggerId = state.activeTriggerId;
5583 + let activeTriggerElement = state.activeTriggerElement;
5584 + if (triggerId || open2) {
5585 + activeTriggerId = triggerId;
5586 + activeTriggerElement = trigger ?? null;
5587 + }
5588 + return {
5589 + open: open2,
5590 + preventUnmountingOnClose,
5591 + activeTriggerId,
5592 + activeTriggerElement
5593 + };
5594 +}
5595 +function attachPreventUnmountOnClose(eventDetails) {
5596 + let preventUnmountOnClose = false;
5597 + eventDetails.preventUnmountOnClose = () => {
5598 + preventUnmountOnClose = true;
5599 + };
5600 + return () => preventUnmountOnClose;
5601 +}
5602 +function applyPopupOpenChange(store, nextOpen, eventDetails, options = {}) {
5603 + const reason = eventDetails.reason;
5604 + const isHover = reason === reason_parts_exports.triggerHover;
5605 + const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
5606 + const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
5607 + const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
5608 + store.context.onOpenChange?.(nextOpen, eventDetails);
5609 + if (eventDetails.isCanceled) {
5610 + return;
5611 + }
5612 + options.onBeforeDispatch?.();
5613 + store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
5614 + const changeState = () => {
5615 + const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
5616 + const updatedState = {
5617 + ...options.extraState,
5618 + ...popupOpenState
5619 + };
5620 + if (isFocusOpen) {
5621 + updatedState.instantType = "focus";
5622 + } else if (isDismissClose) {
5623 + updatedState.instantType = "dismiss";
5624 + } else if (isHover) {
5625 + updatedState.instantType = void 0;
5626 + }
5627 + store.update(updatedState);
5628 + };
5629 + if (isHover) {
5630 + ReactDOM4.flushSync(changeState);
5631 + } else {
5632 + changeState();
5633 + }
5634 +}
5635 +function useTriggerDataForwarding(triggerId, triggerElementRef, store, stateUpdates) {
5636 + const isMountedByThisTrigger = store.useState("isMountedByTrigger", triggerId);
5637 + const baseRegisterTrigger = useTriggerRegistration(triggerId, store);
5638 + const applyTriggerData = useStableCallback((element) => {
5639 + const open2 = store.select("open");
5640 + const activeTriggerId = store.select("activeTriggerId");
5641 + if (activeTriggerId === triggerId) {
5642 + const changes = {
5643 + activeTriggerElement: element,
5644 + ...open2 ? stateUpdates : null
5645 + };
5646 + store.update(changes);
5647 + return;
5648 + }
5649 + if (activeTriggerId == null && open2) {
5650 + const changes = {
5651 + activeTriggerId: triggerId ?? null,
5652 + activeTriggerElement: element,
5653 + ...stateUpdates
5654 + };
5655 + store.update(changes);
5656 + }
5657 + });
5658 + const registerTrigger = useStableCallback((element) => {
5659 + baseRegisterTrigger(element);
5660 + if (element) {
5661 + applyTriggerData(element);
5662 + }
5663 + });
5664 + useIsoLayoutEffect(() => {
5665 + registerTrigger(triggerElementRef.current);
5666 + return () => registerTrigger(null);
5667 + }, [registerTrigger, triggerElementRef, store, triggerId]);
5668 + useIsoLayoutEffect(() => {
5669 + if (isMountedByThisTrigger) {
5670 + const changes = {
5671 + activeTriggerElement: triggerElementRef.current,
5672 + ...stateUpdates
5673 + };
5674 + store.update(changes);
5675 + }
5676 + }, [isMountedByThisTrigger, store, triggerElementRef, ...Object.values(stateUpdates)]);
5677 + return {
5678 + registerTrigger,
5679 + isMountedByThisTrigger
5680 + };
5681 +}
5682 +function useImplicitActiveTrigger(store, options = {}) {
5683 + const {
5684 + closeOnActiveTriggerUnmount = false
5685 + } = options;
5686 + const resolvedActiveTriggerIdRef = React22.useRef(null);
5687 + const open2 = store.useState("open");
5688 + const reactiveTriggerCount = store.useState("triggerCount");
5689 + const activeTriggerId = store.useState("activeTriggerId");
5690 + const reactiveActiveTriggerElement = store.useState("activeTriggerElement");
5691 + useIsoLayoutEffect(() => {
5692 + if (!open2) {
5693 + resolvedActiveTriggerIdRef.current = null;
5694 + if (store.state.triggerCount !== 0) {
5695 + store.set("triggerCount", 0);
5696 + }
5697 + return;
5698 + }
5699 + const triggerCount = store.context.triggerElements.size;
5700 + const stateUpdates = {};
5701 + if (store.state.triggerCount !== triggerCount) {
5702 + stateUpdates.triggerCount = triggerCount;
5703 + }
5704 + const currentActiveTriggerId = store.select("activeTriggerId");
5705 + let lostActiveTriggerId = null;
5706 + if (currentActiveTriggerId) {
5707 + const activeTriggerElement = store.context.triggerElements.getById(currentActiveTriggerId);
5708 + if (!activeTriggerElement) {
5709 + for (const [triggerId, triggerElement] of store.context.triggerElements.entries()) {
5710 + if (triggerElement === store.state.activeTriggerElement) {
5711 + stateUpdates.activeTriggerId = triggerId;
5712 + stateUpdates.activeTriggerElement = triggerElement;
5713 + resolvedActiveTriggerIdRef.current = triggerId;
5714 + break;
5715 + }
5716 + }
5717 + if (stateUpdates.activeTriggerId === void 0) {
5718 + if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
5719 + lostActiveTriggerId = currentActiveTriggerId;
5720 + } else {
5721 + resolvedActiveTriggerIdRef.current = null;
5722 + }
5723 + }
5724 + } else {
5725 + resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
5726 + if (activeTriggerElement !== store.state.activeTriggerElement) {
5727 + stateUpdates.activeTriggerElement = activeTriggerElement;
5728 + }
5729 + }
5730 + } else {
5731 + resolvedActiveTriggerIdRef.current = null;
5732 + }
5733 + if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {
5734 + const iteratorResult = store.context.triggerElements.entries().next();
5735 + if (!iteratorResult.done) {
5736 + const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
5737 + stateUpdates.activeTriggerId = implicitTriggerId;
5738 + stateUpdates.activeTriggerElement = implicitTriggerElement;
5739 + resolvedActiveTriggerIdRef.current = implicitTriggerId;
5740 + }
5741 + }
5742 + if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
5743 + store.update(stateUpdates);
5744 + }
5745 + if (lostActiveTriggerId) {
5746 + if (closeOnActiveTriggerUnmount) {
5747 + queueMicrotask(() => {
5748 + if (store.select("open") && store.select("activeTriggerId") === lostActiveTriggerId && !store.context.triggerElements.getById(lostActiveTriggerId)) {
5749 + const eventDetails = createChangeEventDetails(reason_parts_exports.none);
5750 + store.setOpen(false, eventDetails);
5751 + if (!eventDetails.isCanceled) {
5752 + store.update({
5753 + activeTriggerId: null,
5754 + activeTriggerElement: null
5755 + });
5756 + }
5757 + }
5758 + });
5759 + }
5760 + }
5761 + }, [open2, store, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
5762 +}
5763 +function useOpenStateTransitions(open2, store, onUnmount, animateInitialOpen) {
5764 + const {
5765 + mounted,
5766 + setMounted,
5767 + transitionStatus
5768 + } = useTransitionStatus(open2, false, false, animateInitialOpen);
5769 + const preventUnmountingOnClose = store.useState("preventUnmountingOnClose");
5770 + const syncedPreventUnmountingOnClose = open2 ? false : preventUnmountingOnClose;
5771 + store.useSyncedValues({
5772 + mounted,
5773 + transitionStatus,
5774 + preventUnmountingOnClose: syncedPreventUnmountingOnClose
5775 + });
5776 + const forceUnmount = useStableCallback(() => {
5777 + setMounted(false);
5778 + store.update({
5779 + activeTriggerId: null,
5780 + activeTriggerElement: null,
5781 + mounted: false,
5782 + preventUnmountingOnClose: false
5783 + });
5784 + onUnmount?.();
5785 + store.context.onOpenChangeComplete?.(false);
5786 + });
5787 + useOpenChangeComplete({
5788 + enabled: mounted && !open2 && !syncedPreventUnmountingOnClose,
5789 + open: open2,
5790 + ref: store.context.popupRef,
5791 + onComplete() {
5792 + if (!open2) {
5793 + forceUnmount();
5794 + }
5795 + }
5796 + });
5797 + return {
5798 + forceUnmount,
5799 + transitionStatus
5800 + };
5801 +}
5802 +function usePopupInteractionProps(store, statePart) {
5803 + store.useSyncedValues(statePart);
5804 + useIsoLayoutEffect(() => () => {
5805 + store.update({
5806 + activeTriggerProps: EMPTY_OBJECT,
5807 + inactiveTriggerProps: EMPTY_OBJECT,
5808 + popupProps: EMPTY_OBJECT
5809 + });
5810 + }, [store]);
5811 +}
5812 +
5813 +// node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
5814 +var devElementIdsByMap;
5815 +function getDevElementIds(map) {
5816 + devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
5817 + let elementIds = devElementIdsByMap.get(map);
5818 + if (!elementIds) {
5819 + elementIds = /* @__PURE__ */ new WeakMap();
5820 + devElementIdsByMap.set(map, elementIds);
5821 + }
5822 + return elementIds;
5823 +}
5824 +var PopupTriggerMap = class {
5825 + constructor() {
5826 + this.idMap = /* @__PURE__ */ new Map();
5827 + }
5828 + /**
5829 + * Adds a trigger element with the given ID.
5830 + *
5831 + * Note: The provided element is assumed to not be registered under multiple IDs.
5832 + */
5833 + add(id, element) {
5834 + if (true) {
5835 + const elementIds = getDevElementIds(this);
5836 + const existingId = elementIds.get(element);
5837 + if (existingId !== void 0 && existingId !== id) {
5838 + throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
5839 + }
5840 + const previousElement = this.idMap.get(id);
5841 + if (previousElement !== void 0 && previousElement !== element) {
5842 + elementIds.delete(previousElement);
5843 + }
5844 + elementIds.set(element, id);
5845 + }
5846 + this.idMap.set(id, element);
5847 + }
5848 + /**
5849 + * Removes the trigger element with the given ID.
5850 + */
5851 + delete(id) {
5852 + if (true) {
5853 + const element = this.idMap.get(id);
5854 + if (element !== void 0) {
5855 + devElementIdsByMap?.get(this)?.delete(element);
5856 + }
5857 + }
5858 + this.idMap.delete(id);
5859 + }
5860 + /**
5861 + * Whether the given element is registered as a trigger.
5862 + */
5863 + hasElement(element) {
5864 + for (const registered of this.idMap.values()) {
5865 + if (registered === element) {
5866 + return true;
5867 + }
5868 + }
5869 + return false;
5870 + }
5871 + /**
5872 + * Whether there is a registered trigger element matching the given predicate.
5873 + */
5874 + hasMatchingElement(predicate) {
5875 + for (const element of this.idMap.values()) {
5876 + if (predicate(element)) {
5877 + return true;
5878 + }
5879 + }
5880 + return false;
5881 + }
5882 + /**
5883 + * Returns the trigger element associated with the given ID, or undefined if no such element exists.
5884 + */
5885 + getById(id) {
5886 + return this.idMap.get(id);
5887 + }
5888 + /**
5889 + * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
5890 + */
5891 + entries() {
5892 + return this.idMap.entries();
5893 + }
5894 + /**
5895 + * Returns an iterable of all registered trigger elements.
5896 + */
5897 + elements() {
5898 + return this.idMap.values();
5899 + }
5900 + /**
5901 + * Returns the number of registered trigger elements.
5902 + */
5903 + get size() {
5904 + return this.idMap.size;
5905 + }
5906 +};
5907 +
5908 +// node_modules/@base-ui/react/utils/popups/store.mjs
5909 +function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {
5910 + return {
5911 + open: false,
5912 + openProp: void 0,
5913 + mounted: false,
5914 + transitionStatus: void 0,
5915 + floatingRootContext: new FloatingRootStore({
5916 + open: false,
5917 + transitionStatus: void 0,
5918 + floatingElement: null,
5919 + referenceElement: null,
5920 + triggerElements,
5921 + floatingId,
5922 + syncOnly: true,
5923 + nested,
5924 + onOpenChange: void 0
5925 + }),
5926 + floatingId,
5927 + triggerCount: 0,
5928 + preventUnmountingOnClose: false,
5929 + payload: void 0,
5930 + activeTriggerId: null,
5931 + activeTriggerElement: null,
5932 + triggerIdProp: void 0,
5933 + popupElement: null,
5934 + positionerElement: null,
5935 + activeTriggerProps: EMPTY_OBJECT,
5936 + inactiveTriggerProps: EMPTY_OBJECT,
5937 + popupProps: EMPTY_OBJECT
5938 + };
5939 +}
5940 +var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
5941 +var openSelector = (state) => state.openProp ?? state.open;
5942 +var popupIdSelector = (state) => {
5943 + const popupId = state.popupElement?.id ?? state.floatingId;
5944 + return popupId || void 0;
5945 +};
5946 +function triggerOwnsOpenPopup(state, triggerId) {
5947 + return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
5948 +}
5949 +function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
5950 + if (triggerOwnsOpenPopup(state, triggerId)) {
5951 + return true;
5952 + }
5953 + return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
5954 +}
5955 +var popupStoreSelectors = {
5956 + open: openSelector,
5957 + mounted: (state) => state.mounted,
5958 + transitionStatus: (state) => state.transitionStatus,
5959 + floatingRootContext: (state) => state.floatingRootContext,
5960 + triggerCount: (state) => state.triggerCount,
5961 + preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
5962 + payload: (state) => state.payload,
5963 + activeTriggerId: activeTriggerIdSelector,
5964 + activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
5965 + popupId: popupIdSelector,
5966 + /**
5967 + * Whether the trigger with the given ID was used to open the popup.
5968 + */
5969 + isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
5970 + /**
5971 + * Whether the popup is open and was activated by a trigger with the given ID.
5972 + */
5973 + isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
5974 + /**
5975 + * Whether the popup is mounted and was activated by a trigger with the given ID.
5976 + */
5977 + isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
5978 + triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
5979 + /**
5980 + * Popup id for the trigger that currently owns the open popup.
5981 + */
5982 + triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
5983 + popupProps: (state) => state.popupProps,
5984 + popupElement: (state) => state.popupElement,
5985 + positionerElement: (state) => state.positionerElement
5986 +};
5987 +
5988 +// node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
5989 +var React23 = __toESM(require_react(), 1);
5990 +var import_shim2 = __toESM(require_shim(), 1);
5991 +function usePopupHandleStore(handle) {
5992 + const subscribe = React23.useCallback((listener) => {
5993 + if (handle === void 0) {
5994 + return NOOP;
5995 + }
5996 + return handle.subscribeStore(listener);
5997 + }, [handle]);
5998 + const getSnapshot = React23.useCallback(() => {
5999 + return handle === void 0 ? void 0 : handle.store;
6000 + }, [handle]);
6001 + return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
6002 +}
6003 +
6004 +// node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
6005 +function useBaseUIFloating(options) {
6006 + return useFloatingWithStore(options, options.rootContext);
6007 +}
6008 +function useFloatingWithStore(options, store) {
6009 + const {
6010 + nodeId,
6011 + externalTree
6012 + } = options;
6013 + const referenceElement = store.useState("referenceElement");
6014 + const floatingElement = store.useState("floatingElement");
6015 + const domReferenceElement = store.useState("domReferenceElement");
6016 + const open2 = store.useState("open");
6017 + const floatingId = store.useState("floatingId");
6018 + const [positionReference, setPositionReferenceRaw] = React24.useState(null);
6019 + const [localDomReference, setLocalDomReference] = React24.useState(void 0);
6020 + const [localFloatingElement, setLocalFloatingElement] = React24.useState(void 0);
6021 + const domReferenceRef = React24.useRef(null);
6022 + const tree = useFloatingTree(externalTree);
6023 + const storeElements = React24.useMemo(() => ({
6024 + reference: referenceElement,
6025 + floating: floatingElement,
6026 + domReference: domReferenceElement
6027 + }), [referenceElement, floatingElement, domReferenceElement]);
6028 + const position = useFloating({
6029 + ...options,
6030 + elements: {
6031 + ...storeElements,
6032 + ...positionReference && {
6033 + reference: positionReference
6034 + }
6035 + }
6036 + });
6037 + const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
6038 + const syncedFloatingElement = localFloatingElement === void 0 ? store.state.floatingElement : localFloatingElement;
6039 + store.useSyncedValue("referenceElement", localDomReference ?? null);
6040 + store.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
6041 + store.useSyncedValue("floatingElement", syncedFloatingElement);
6042 + const setPositionReference = React24.useCallback((node) => {
6043 + const computedPositionReference = isElement(node) ? {
6044 + getBoundingClientRect: () => node.getBoundingClientRect(),
6045 + getClientRects: () => node.getClientRects(),
6046 + contextElement: node
6047 + } : node;
6048 + setPositionReferenceRaw(computedPositionReference);
6049 + position.refs.setReference(computedPositionReference);
6050 + }, [position.refs]);
6051 + const setReference = React24.useCallback((node) => {
6052 + if (isElement(node) || node === null) {
6053 + domReferenceRef.current = node;
6054 + setLocalDomReference(node);
6055 + }
6056 + if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
6057 + // `null` to support `positionReference` + an unstable `reference`
6058 + // callback ref.
6059 + node !== null && !isElement(node)) {
6060 + position.refs.setReference(node);
6061 + }
6062 + }, [position.refs, setLocalDomReference]);
6063 + const setFloating = React24.useCallback((node) => {
6064 + setLocalFloatingElement(node);
6065 + position.refs.setFloating(node);
6066 + }, [position.refs]);
6067 + const refs = React24.useMemo(() => ({
6068 + ...position.refs,
6069 + setReference,
6070 + setFloating,
6071 + setPositionReference,
6072 + domReference: domReferenceRef
6073 + }), [position.refs, setReference, setFloating, setPositionReference]);
6074 + const elements2 = React24.useMemo(() => ({
6075 + ...position.elements,
6076 + domReference: domReferenceElement
6077 + }), [position.elements, domReferenceElement]);
6078 + const context = React24.useMemo(() => ({
6079 + ...position,
6080 + dataRef: store.context.dataRef,
6081 + open: open2,
6082 + onOpenChange: store.setOpen,
6083 + events: store.context.events,
6084 + floatingId,
6085 + refs,
6086 + elements: elements2,
6087 + nodeId,
6088 + rootStore: store
6089 + }), [position, refs, elements2, nodeId, store, open2, floatingId]);
6090 + useIsoLayoutEffect(() => {
6091 + if (domReferenceElement) {
6092 + domReferenceRef.current = domReferenceElement;
6093 + }
6094 + }, [domReferenceElement]);
6095 + useIsoLayoutEffect(() => {
6096 + store.context.dataRef.current.floatingContext = context;
6097 + const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
6098 + if (node) {
6099 + node.context = context;
6100 + }
6101 + });
6102 + return React24.useMemo(() => ({
6103 + ...position,
6104 + context,
6105 + refs,
6106 + elements: elements2,
6107 + rootStore: store
6108 + }), [position, refs, elements2, context, store]);
6109 +}
6110 +
6111 +// node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
6112 +var React25 = __toESM(require_react(), 1);
6113 +var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
6114 +function useFocus(context, props = {}) {
6115 + const {
6116 + enabled = true,
6117 + delay
6118 + } = props;
6119 + const store = "rootStore" in context ? context.rootStore : context;
6120 + const {
6121 + events,
6122 + dataRef
6123 + } = store.context;
6124 + const blockFocusRef = React25.useRef(false);
6125 + const blockedReferenceRef = React25.useRef(null);
6126 + const keyboardModalityRef = React25.useRef(true);
6127 + const timeout = useTimeout();
6128 + React25.useEffect(() => {
6129 + const domReference = store.select("domReferenceElement");
6130 + if (!enabled) {
6131 + return void 0;
6132 + }
6133 + const win = getWindow(domReference);
6134 + function onBlur() {
6135 + const currentDomReference = store.select("domReferenceElement");
6136 + if (!store.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
6137 + blockFocusRef.current = true;
6138 + blockedReferenceRef.current = currentDomReference;
6139 + }
6140 + }
6141 + function onKeyDown() {
6142 + keyboardModalityRef.current = true;
6143 + }
6144 + function onPointerDown() {
6145 + keyboardModalityRef.current = false;
6146 + }
6147 + return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
6148 + }, [store, enabled]);
6149 + React25.useEffect(() => {
6150 + if (!enabled) {
6151 + return void 0;
6152 + }
6153 + function onOpenChangeLocal(details) {
6154 + if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
6155 + const referenceElement = store.select("domReferenceElement");
6156 + if (isElement(referenceElement)) {
6157 + blockedReferenceRef.current = referenceElement;
6158 + blockFocusRef.current = true;
6159 + }
6160 + }
6161 + }
6162 + events.on("openchange", onOpenChangeLocal);
6163 + return () => {
6164 + events.off("openchange", onOpenChangeLocal);
6165 + };
6166 + }, [events, enabled, store]);
6167 + const reference = React25.useMemo(() => {
6168 + function resetBlockedFocus() {
6169 + blockFocusRef.current = false;
6170 + blockedReferenceRef.current = null;
6171 + }
6172 + return {
6173 + onMouseLeave() {
6174 + resetBlockedFocus();
6175 + },
6176 + onFocus(event) {
6177 + const focusTarget = event.currentTarget;
6178 + if (blockFocusRef.current) {
6179 + if (blockedReferenceRef.current === focusTarget) {
6180 + return;
6181 + }
6182 + resetBlockedFocus();
6183 + }
6184 + const target = getTarget(event.nativeEvent);
6185 + if (isElement(target)) {
6186 + if (isMacSafari && !event.relatedTarget) {
6187 + if (!keyboardModalityRef.current && !isTypeableElement(target)) {
6188 + return;
6189 + }
6190 + } else if (!matchesFocusVisible(target)) {
6191 + return;
6192 + }
6193 + }
6194 + const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements);
6195 + const {
6196 + nativeEvent,
6197 + currentTarget
6198 + } = event;
6199 + const delayValue = typeof delay === "function" ? delay() : delay;
6200 + if (store.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
6201 + store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6202 + return;
6203 + }
6204 + timeout.start(delayValue, () => {
6205 + if (blockFocusRef.current) {
6206 + return;
6207 + }
6208 + store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6209 + });
6210 + },
6211 + onBlur(event) {
6212 + resetBlockedFocus();
6213 + const relatedTarget = event.relatedTarget;
6214 + const nativeEvent = event.nativeEvent;
6215 + const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
6216 + timeout.start(0, () => {
6217 + const domReference = store.select("domReferenceElement");
6218 + const activeEl = activeElement(ownerDocument(domReference));
6219 + if (!relatedTarget && activeEl === domReference) {
6220 + return;
6221 + }
6222 + if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
6223 + return;
6224 + }
6225 + const nextFocusedElement = relatedTarget ?? activeEl;
6226 + if (isTargetInsideEnabledTrigger(nextFocusedElement, store.context.triggerElements)) {
6227 + return;
6228 + }
6229 + store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
6230 + });
6231 + }
6232 + };
6233 + }, [dataRef, delay, store, timeout]);
6234 + return React25.useMemo(() => enabled ? {
6235 + reference,
6236 + trigger: reference
6237 + } : {}, [enabled, reference]);
6238 +}
6239 +
6240 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6241 +var React26 = __toESM(require_react(), 1);
6242 +
6243 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
6244 +var HoverInteraction = class _HoverInteraction {
6245 + constructor() {
6246 + this.pointerType = void 0;
6247 + this.interactedInside = false;
6248 + this.handler = void 0;
6249 + this.blockMouseMove = true;
6250 + this.performedPointerEventsMutation = false;
6251 + this.pointerEventsScopeElement = null;
6252 + this.pointerEventsReferenceElement = null;
6253 + this.pointerEventsFloatingElement = null;
6254 + this.restTimeoutPending = false;
6255 + this.openChangeTimeout = new Timeout();
6256 + this.restTimeout = new Timeout();
6257 + this.handleCloseOptions = void 0;
6258 + }
6259 + static create() {
6260 + return new _HoverInteraction();
6261 + }
6262 + dispose = () => {
6263 + this.openChangeTimeout.clear();
6264 + this.restTimeout.clear();
6265 + };
6266 + disposeEffect = () => {
6267 + return this.dispose;
6268 + };
6269 +};
6270 +var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
6271 +function clearSafePolygonPointerEventsMutation(instance) {
6272 + if (!instance.performedPointerEventsMutation) {
6273 + return;
6274 + }
6275 + const scopeElement = instance.pointerEventsScopeElement;
6276 + if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
6277 + instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
6278 + instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
6279 + instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
6280 + pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
6281 + }
6282 + instance.performedPointerEventsMutation = false;
6283 + instance.pointerEventsScopeElement = null;
6284 + instance.pointerEventsReferenceElement = null;
6285 + instance.pointerEventsFloatingElement = null;
6286 +}
6287 +function applySafePolygonPointerEventsMutation(instance, options) {
6288 + const {
6289 + scopeElement,
6290 + referenceElement,
6291 + floatingElement
6292 + } = options;
6293 + const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
6294 + if (existingOwner && existingOwner !== instance) {
6295 + clearSafePolygonPointerEventsMutation(existingOwner);
6296 + }
6297 + clearSafePolygonPointerEventsMutation(instance);
6298 + instance.performedPointerEventsMutation = true;
6299 + instance.pointerEventsScopeElement = scopeElement;
6300 + instance.pointerEventsReferenceElement = referenceElement;
6301 + instance.pointerEventsFloatingElement = floatingElement;
6302 + pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
6303 + scopeElement.style.pointerEvents = "none";
6304 + referenceElement.style.pointerEvents = "auto";
6305 + floatingElement.style.pointerEvents = "auto";
6306 +}
6307 +function useHoverInteractionSharedState(store) {
6308 + const data = store.context.dataRef.current;
6309 + const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
6310 + if (!data.hoverInteractionState) {
6311 + data.hoverInteractionState = instance;
6312 + }
6313 + useOnMount(data.hoverInteractionState.disposeEffect);
6314 + return data.hoverInteractionState;
6315 +}
6316 +
6317 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6318 +function useHoverFloatingInteraction(context, parameters = {}) {
6319 + const {
6320 + enabled = true,
6321 + closeDelay: closeDelayProp = 0,
6322 + nodeId: nodeIdProp
6323 + } = parameters;
6324 + const store = "rootStore" in context ? context.rootStore : context;
6325 + const open2 = store.useState("open");
6326 + const floatingElement = store.useState("floatingElement");
6327 + const domReferenceElement = store.useState("domReferenceElement");
6328 + const {
6329 + dataRef
6330 + } = store.context;
6331 + const tree = useFloatingTree();
6332 + const parentId = useFloatingParentNodeId();
6333 + const instance = useHoverInteractionSharedState(store);
6334 + const childClosedTimeout = useTimeout();
6335 + const isClickLikeOpenEvent2 = useStableCallback(() => {
6336 + return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6337 + });
6338 + const isHoverOpen = useStableCallback(() => {
6339 + return isHoverOpenEvent(dataRef.current.openEvent?.type);
6340 + });
6341 + const clearPointerEvents = useStableCallback(() => {
6342 + clearSafePolygonPointerEventsMutation(instance);
6343 + });
6344 + useIsoLayoutEffect(() => {
6345 + if (!open2) {
6346 + instance.pointerType = void 0;
6347 + instance.restTimeoutPending = false;
6348 + instance.interactedInside = false;
6349 + clearPointerEvents();
6350 + }
6351 + }, [open2, instance, clearPointerEvents]);
6352 + React26.useEffect(() => {
6353 + return clearPointerEvents;
6354 + }, [clearPointerEvents]);
6355 + useIsoLayoutEffect(() => {
6356 + if (!enabled) {
6357 + return void 0;
6358 + }
6359 + if (open2 && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
6360 + const ref = domReferenceElement;
6361 + const floatingEl = floatingElement;
6362 + const doc = ownerDocument(floatingElement);
6363 + const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
6364 + if (parentFloating) {
6365 + parentFloating.style.pointerEvents = "";
6366 + }
6367 + const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
6368 + const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
6369 + const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
6370 + applySafePolygonPointerEventsMutation(instance, {
6371 + scopeElement,
6372 + referenceElement: ref,
6373 + floatingElement: floatingEl
6374 + });
6375 + return () => {
6376 + clearPointerEvents();
6377 + };
6378 + }
6379 + return void 0;
6380 + }, [enabled, open2, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
6381 + React26.useEffect(() => {
6382 + if (!enabled) {
6383 + return void 0;
6384 + }
6385 + function hasParentChildren() {
6386 + return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
6387 + }
6388 + function closeWithDelay(event) {
6389 + const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
6390 + const close = () => {
6391 + store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6392 + tree?.events.emit("floating.closed", event);
6393 + };
6394 + if (closeDelay) {
6395 + instance.openChangeTimeout.start(closeDelay, close);
6396 + } else {
6397 + instance.openChangeTimeout.clear();
6398 + close();
6399 + }
6400 + }
6401 + function handleInteractInside(event) {
6402 + const target = getTarget(event);
6403 + if (!isInteractiveElement(target)) {
6404 + instance.interactedInside = false;
6405 + return;
6406 + }
6407 + instance.interactedInside = target?.closest("[aria-haspopup]") != null;
6408 + }
6409 + function onFloatingMouseEnter() {
6410 + instance.openChangeTimeout.clear();
6411 + childClosedTimeout.clear();
6412 + tree?.events.off("floating.closed", onNodeClosed);
6413 + clearPointerEvents();
6414 + }
6415 + function onFloatingMouseLeave(event) {
6416 + if (hasParentChildren() && tree) {
6417 + tree.events.on("floating.closed", onNodeClosed);
6418 + return;
6419 + }
6420 + if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {
6421 + return;
6422 + }
6423 + const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
6424 + const relatedTarget = event.relatedTarget;
6425 + const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
6426 + if (isMovingIntoDescendantFloating) {
6427 + return;
6428 + }
6429 + if (instance.handler) {
6430 + instance.handler(event);
6431 + return;
6432 + }
6433 + clearPointerEvents();
6434 + if (isHoverOpen() && !isClickLikeOpenEvent2()) {
6435 + closeWithDelay(event);
6436 + }
6437 + }
6438 + function onNodeClosed(event) {
6439 + if (!tree || !parentId || hasParentChildren()) {
6440 + return;
6441 + }
6442 + childClosedTimeout.start(0, () => {
6443 + tree.events.off("floating.closed", onNodeClosed);
6444 + store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6445 + tree.events.emit("floating.closed", event);
6446 + });
6447 + }
6448 + const floating = floatingElement;
6449 + return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
6450 + tree?.events.off("floating.closed", onNodeClosed);
6451 + });
6452 + }, [enabled, floatingElement, store, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
6453 +}
6454 +
6455 +// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
6456 +var React27 = __toESM(require_react(), 1);
6457 +var ReactDOM5 = __toESM(require_react_dom(), 1);
6458 +var EMPTY_REF = {
6459 + current: null
6460 +};
6461 +function useHoverReferenceInteraction(context, props = {}) {
6462 + const {
6463 + enabled = true,
6464 + delay = 0,
6465 + handleClose = null,
6466 + mouseOnly = false,
6467 + restMs = 0,
6468 + move = true,
6469 + triggerElementRef = EMPTY_REF,
6470 + externalTree,
6471 + isActiveTrigger = true,
6472 + getHandleCloseContext,
6473 + isClosing,
6474 + shouldOpen: shouldOpenProp,
6475 + guardStaleOpen = false
6476 + } = props;
6477 + const store = "rootStore" in context ? context.rootStore : context;
6478 + const {
6479 + dataRef,
6480 + events
6481 + } = store.context;
6482 + const tree = useFloatingTree(externalTree);
6483 + const instance = useHoverInteractionSharedState(store);
6484 + const isHoverCloseActiveRef = React27.useRef(false);
6485 + const handleCloseRef = useValueAsRef(handleClose);
6486 + const delayRef = useValueAsRef(delay);
6487 + const restMsRef = useValueAsRef(restMs);
6488 + const enabledRef = useValueAsRef(enabled);
6489 + const shouldOpenRef = useValueAsRef(shouldOpenProp);
6490 + const isClosingRef = useValueAsRef(isClosing);
6491 + const isClickLikeOpenEvent2 = useStableCallback(() => {
6492 + return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6493 + });
6494 + const checkShouldOpen = useStableCallback(() => {
6495 + return shouldOpenRef.current?.() !== false;
6496 + });
6497 + const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
6498 + const allTriggers = store.context.triggerElements;
6499 + if (allTriggers.hasElement(currentTarget)) {
6500 + return !currentDomReference || !contains(currentDomReference, currentTarget);
6501 + }
6502 + if (!isElement(target)) {
6503 + return false;
6504 + }
6505 + const targetElement = target;
6506 + return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
6507 + });
6508 + const cleanupMouseMoveHandler = useStableCallback(() => {
6509 + if (!instance.handler) {
6510 + return;
6511 + }
6512 + const doc = ownerDocument(store.select("domReferenceElement"));
6513 + doc.removeEventListener("mousemove", instance.handler);
6514 + instance.handler = void 0;
6515 + });
6516 + const clearPointerEvents = useStableCallback(() => {
6517 + clearSafePolygonPointerEventsMutation(instance);
6518 + });
6519 + if (isActiveTrigger) {
6520 + instance.handleCloseOptions = handleClose?.__options;
6521 + }
6522 + React27.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
6523 + React27.useEffect(() => {
6524 + if (!enabled) {
6525 + return void 0;
6526 + }
6527 + function onOpenChangeLocal(details) {
6528 + if (!details.open) {
6529 + isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
6530 + cleanupMouseMoveHandler();
6531 + instance.openChangeTimeout.clear();
6532 + instance.restTimeout.clear();
6533 + instance.blockMouseMove = true;
6534 + instance.restTimeoutPending = false;
6535 + } else {
6536 + isHoverCloseActiveRef.current = false;
6537 + }
6538 + }
6539 + events.on("openchange", onOpenChangeLocal);
6540 + return () => {
6541 + events.off("openchange", onOpenChangeLocal);
6542 + };
6543 + }, [enabled, events, instance, cleanupMouseMoveHandler]);
6544 + React27.useEffect(() => {
6545 + if (!enabled) {
6546 + return void 0;
6547 + }
6548 + function closeWithDelay(event, runElseBranch = true) {
6549 + const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
6550 + if (closeDelay) {
6551 + instance.openChangeTimeout.start(closeDelay, () => {
6552 + store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6553 + tree?.events.emit("floating.closed", event);
6554 + });
6555 + } else if (runElseBranch) {
6556 + instance.openChangeTimeout.clear();
6557 + store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6558 + tree?.events.emit("floating.closed", event);
6559 + }
6560 + }
6561 + const trigger = triggerElementRef.current ?? (isActiveTrigger ? store.select("domReferenceElement") : null);
6562 + if (!isElement(trigger)) {
6563 + return void 0;
6564 + }
6565 + function onMouseEnter(event) {
6566 + instance.openChangeTimeout.clear();
6567 + instance.blockMouseMove = false;
6568 + if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6569 + return;
6570 + }
6571 + const restMsValue = getRestMs(restMsRef.current);
6572 + const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
6573 + const eventTarget = getTarget(event);
6574 + const currentTarget = event.currentTarget ?? null;
6575 + const currentDomReference = store.select("domReferenceElement");
6576 + let triggerNode = currentTarget;
6577 + if (isElement(eventTarget) && !store.context.triggerElements.hasElement(eventTarget)) {
6578 + for (const triggerElement of store.context.triggerElements.elements()) {
6579 + if (contains(triggerElement, eventTarget)) {
6580 + triggerNode = triggerElement;
6581 + break;
6582 + }
6583 + }
6584 + }
6585 + if (isElement(currentTarget) && isElement(currentDomReference) && !store.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
6586 + triggerNode = currentDomReference;
6587 + }
6588 + const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
6589 + const isOpen = store.select("open");
6590 + const isInClosingTransition = isClosingRef.current?.() ?? store.select("transitionStatus") === "ending";
6591 + const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
6592 + const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
6593 + const isRestOnlyDelay = restMsValue > 0 && !openDelay;
6594 + const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
6595 + const shouldOpen = !isOpen || isOverInactive;
6596 + if (shouldOpenImmediately) {
6597 + if (checkShouldOpen()) {
6598 + store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6599 + }
6600 + return;
6601 + }
6602 + if (isRestOnlyDelay) {
6603 + return;
6604 + }
6605 + if (openDelay) {
6606 + instance.openChangeTimeout.start(openDelay, () => {
6607 + if (shouldOpen && checkShouldOpen()) {
6608 + store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6609 + }
6610 + });
6611 + } else if (shouldOpen) {
6612 + if (checkShouldOpen()) {
6613 + store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6614 + }
6615 + }
6616 + }
6617 + function onMouseLeave(event) {
6618 + if (isClickLikeOpenEvent2()) {
6619 + clearPointerEvents();
6620 + return;
6621 + }
6622 + cleanupMouseMoveHandler();
6623 + const domReferenceElement = store.select("domReferenceElement");
6624 + const doc = ownerDocument(domReferenceElement);
6625 + instance.restTimeout.clear();
6626 + instance.restTimeoutPending = false;
6627 + const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
6628 + if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {
6629 + return;
6630 + }
6631 + if (handleCloseRef.current && handleCloseContextBase) {
6632 + if (!store.select("open")) {
6633 + instance.openChangeTimeout.clear();
6634 + }
6635 + const currentTrigger = triggerElementRef.current;
6636 + instance.handler = handleCloseRef.current({
6637 + ...handleCloseContextBase,
6638 + tree,
6639 + x: event.clientX,
6640 + y: event.clientY,
6641 + onClose() {
6642 + clearPointerEvents();
6643 + cleanupMouseMoveHandler();
6644 + if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store.select("domReferenceElement")) {
6645 + closeWithDelay(event, true);
6646 + }
6647 + }
6648 + });
6649 + doc.addEventListener("mousemove", instance.handler);
6650 + instance.handler(event);
6651 + return;
6652 + }
6653 + const shouldClose = instance.pointerType === "touch" ? !contains(store.select("floatingElement"), event.relatedTarget) : true;
6654 + if (shouldClose) {
6655 + closeWithDelay(event);
6656 + }
6657 + }
6658 + function onMouseOut(event) {
6659 + if (contains(trigger, event.relatedTarget)) {
6660 + return;
6661 + }
6662 + instance.openChangeTimeout.clear();
6663 + instance.restTimeout.clear();
6664 + instance.restTimeoutPending = false;
6665 + }
6666 + const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
6667 + if (move) {
6668 + return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
6669 + once: true
6670 + }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6671 + }
6672 + return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6673 + }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
6674 + return React27.useMemo(() => {
6675 + if (!enabled) {
6676 + return void 0;
6677 + }
6678 + function setPointerRef(event) {
6679 + instance.pointerType = event.pointerType;
6680 + }
6681 + return {
6682 + onPointerDown: setPointerRef,
6683 + onPointerEnter: setPointerRef,
6684 + onMouseMove(event) {
6685 + const {
6686 + nativeEvent
6687 + } = event;
6688 + const trigger = event.currentTarget;
6689 + const currentDomReference = store.select("domReferenceElement");
6690 + const currentOpen = store.select("open");
6691 + const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
6692 + if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6693 + return;
6694 + }
6695 + if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
6696 + const floatingElement = store.select("floatingElement");
6697 + if (floatingElement) {
6698 + const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
6699 + applySafePolygonPointerEventsMutation(instance, {
6700 + scopeElement,
6701 + referenceElement: trigger,
6702 + floatingElement
6703 + });
6704 + }
6705 + }
6706 + const restMsValue = getRestMs(restMsRef.current);
6707 + if (currentOpen && !isOverInactive || restMsValue === 0) {
6708 + return;
6709 + }
6710 + if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
6711 + return;
6712 + }
6713 + instance.restTimeout.clear();
6714 + function handleMouseMove() {
6715 + instance.restTimeoutPending = false;
6716 + if (isClickLikeOpenEvent2()) {
6717 + return;
6718 + }
6719 + const latestOpen = store.select("open");
6720 + if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
6721 + store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
6722 + }
6723 + }
6724 + if (instance.pointerType === "touch") {
6725 + ReactDOM5.flushSync(() => {
6726 + handleMouseMove();
6727 + });
6728 + } else if (isOverInactive && currentOpen) {
6729 + handleMouseMove();
6730 + } else {
6731 + instance.restTimeoutPending = true;
6732 + instance.restTimeout.start(restMsValue, handleMouseMove);
6733 + }
6734 + }
6735 + };
6736 + }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store, restMsRef, checkShouldOpen]);
6737 +}
6738 +
6739 +// node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
6740 +var CURSOR_SPEED_THRESHOLD = 0.1;
6741 +var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
6742 +var POLYGON_BUFFER = 0.5;
6743 +function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
6744 + return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
6745 +}
6746 +function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
6747 + let isInsideValue = false;
6748 + if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
6749 + isInsideValue = !isInsideValue;
6750 + }
6751 + if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
6752 + isInsideValue = !isInsideValue;
6753 + }
6754 + if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
6755 + isInsideValue = !isInsideValue;
6756 + }
6757 + if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
6758 + isInsideValue = !isInsideValue;
6759 + }
6760 + return isInsideValue;
6761 +}
6762 +function isInsideRect(pointX, pointY, rect) {
6763 + return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
6764 +}
6765 +function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
6766 + const minX = Math.min(x1, x2);
6767 + const maxX = Math.max(x1, x2);
6768 + const minY = Math.min(y1, y2);
6769 + const maxY = Math.max(y1, y2);
6770 + return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
6771 +}
6772 +function safePolygon(options = {}) {
6773 + const {
6774 + blockPointerEvents = false
6775 + } = options;
6776 + const timeout = new Timeout();
6777 + const fn = ({
6778 + x: x2,
6779 + y: y2,
6780 + placement,
6781 + elements: elements2,
6782 + onClose,
6783 + nodeId,
6784 + tree
6785 + }) => {
6786 + const side = placement?.split("-")[0];
6787 + let hasLanded = false;
6788 + let lastX = null;
6789 + let lastY = null;
6790 + let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
6791 + function isCursorMovingSlowly(nextX, nextY) {
6792 + const currentTime = performance.now();
6793 + const elapsedTime = currentTime - lastCursorTime;
6794 + if (lastX === null || lastY === null || elapsedTime === 0) {
6795 + lastX = nextX;
6796 + lastY = nextY;
6797 + lastCursorTime = currentTime;
6798 + return false;
6799 + }
6800 + const deltaX = nextX - lastX;
6801 + const deltaY = nextY - lastY;
6802 + const distanceSquared = deltaX * deltaX + deltaY * deltaY;
6803 + const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
6804 + lastX = nextX;
6805 + lastY = nextY;
6806 + lastCursorTime = currentTime;
6807 + return distanceSquared < thresholdSquared;
6808 + }
6809 + function close() {
6810 + timeout.clear();
6811 + onClose();
6812 + }
6813 + return function onMouseMove(event) {
6814 + timeout.clear();
6815 + const domReference = elements2.domReference;
6816 + const floating = elements2.floating;
6817 + if (!domReference || !floating || side == null || x2 == null || y2 == null) {
6818 + return void 0;
6819 + }
6820 + const {
6821 + clientX,
6822 + clientY
6823 + } = event;
6824 + const target = getTarget(event);
6825 + const isLeave = event.type === "mouseleave";
6826 + const isOverFloatingEl = contains(floating, target);
6827 + const isOverReferenceEl = contains(domReference, target);
6828 + if (isOverFloatingEl) {
6829 + hasLanded = true;
6830 + if (!isLeave) {
6831 + return void 0;
6832 + }
6833 + }
6834 + if (isOverReferenceEl) {
6835 + hasLanded = false;
6836 + if (!isLeave) {
6837 + hasLanded = true;
6838 + return void 0;
6839 + }
6840 + }
6841 + if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
6842 + return void 0;
6843 + }
6844 + function hasOpenChildNode() {
6845 + return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
6846 + }
6847 + function closeIfNoOpenChild() {
6848 + if (!hasOpenChildNode()) {
6849 + close();
6850 + }
6851 + }
6852 + if (hasOpenChildNode()) {
6853 + return void 0;
6854 + }
6855 + const refRect = domReference.getBoundingClientRect();
6856 + const rect = floating.getBoundingClientRect();
6857 + const cursorLeaveFromRight = x2 > rect.right - rect.width / 2;
6858 + const cursorLeaveFromBottom = y2 > rect.bottom - rect.height / 2;
6859 + const isFloatingWider = rect.width > refRect.width;
6860 + const isFloatingTaller = rect.height > refRect.height;
6861 + const left = (isFloatingWider ? refRect : rect).left;
6862 + const right = (isFloatingWider ? refRect : rect).right;
6863 + const top = (isFloatingTaller ? refRect : rect).top;
6864 + const bottom = (isFloatingTaller ? refRect : rect).bottom;
6865 + if (side === "top" && y2 >= refRect.bottom - 1 || side === "bottom" && y2 <= refRect.top + 1 || side === "left" && x2 >= refRect.right - 1 || side === "right" && x2 <= refRect.left + 1) {
6866 + closeIfNoOpenChild();
6867 + return void 0;
6868 + }
6869 + let isInsideTroughRect = false;
6870 + switch (side) {
6871 + case "top":
6872 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
6873 + break;
6874 + case "bottom":
6875 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
6876 + break;
6877 + case "left":
6878 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
6879 + break;
6880 + case "right":
6881 + isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
6882 + break;
6883 + default:
6884 + }
6885 + if (isInsideTroughRect) {
6886 + return void 0;
6887 + }
6888 + if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
6889 + closeIfNoOpenChild();
6890 + return void 0;
6891 + }
6892 + if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
6893 + closeIfNoOpenChild();
6894 + return void 0;
6895 + }
6896 + let isInsidePolygon = false;
6897 + switch (side) {
6898 + case "top": {
6899 + const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6900 + const cursorPointOneX = isFloatingWider ? x2 + cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6901 + const cursorPointTwoX = isFloatingWider ? x2 - cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6902 + const cursorPointY = y2 + POLYGON_BUFFER + 1;
6903 + const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
6904 + const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
6905 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6906 + break;
6907 + }
6908 + case "bottom": {
6909 + const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6910 + const cursorPointOneX = isFloatingWider ? x2 + cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6911 + const cursorPointTwoX = isFloatingWider ? x2 - cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6912 + const cursorPointY = y2 - POLYGON_BUFFER;
6913 + const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
6914 + const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
6915 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6916 + break;
6917 + }
6918 + case "left": {
6919 + const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6920 + const cursorPointOneY = isFloatingTaller ? y2 + cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6921 + const cursorPointTwoY = isFloatingTaller ? y2 - cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6922 + const cursorPointX = x2 + POLYGON_BUFFER + 1;
6923 + const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
6924 + const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
6925 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
6926 + break;
6927 + }
6928 + case "right": {
6929 + const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6930 + const cursorPointOneY = isFloatingTaller ? y2 + cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6931 + const cursorPointTwoY = isFloatingTaller ? y2 - cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6932 + const cursorPointX = x2 - POLYGON_BUFFER;
6933 + const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
6934 + const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
6935 + isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
6936 + break;
6937 + }
6938 + default:
6939 + }
6940 + if (!isInsidePolygon) {
6941 + closeIfNoOpenChild();
6942 + } else if (!hasLanded) {
6943 + timeout.start(40, closeIfNoOpenChild);
6944 + }
6945 + return void 0;
6946 + };
6947 + };
6948 + fn.__options = {
6949 + ...options,
6950 + blockPointerEvents
6951 + };
6952 + return fn;
6953 +}
6954 +
6955 +// node_modules/@base-ui/react/utils/NullStore.mjs
6956 +var NullStore = class extends ReactStore {
6957 + // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
6958 + // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
6959 + // inert even if a future base-class change stops routing a mutator through `setState`.
6960 + setState(_newState) {
6961 + }
6962 + update(_changes) {
6963 + }
6964 + set(_key, _value) {
6965 + }
6966 + notifyAll() {
6967 + }
6968 +};
6969 +
6970 +// node_modules/@base-ui/utils/inertValue.mjs
6971 +function inertValue(value) {
6972 + if (isReactVersionAtLeast(19)) {
6973 + return value;
6974 + }
6975 + return value ? "true" : void 0;
6976 +}
6977 +
6978 +// node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
6979 +var React28 = __toESM(require_react(), 1);
6980 +var DirectionContext = /* @__PURE__ */ React28.createContext(void 0);
6981 +if (true) DirectionContext.displayName = "DirectionContext";
6982 +function useDirection() {
6983 + const context = React28.useContext(DirectionContext);
6984 + return context?.direction ?? "ltr";
6985 +}
6986 +
6987 +// node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6988 +var React29 = __toESM(require_react(), 1);
6989 +
6990 +// node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
6991 +var baseArrow = (options) => ({
6992 + name: "arrow",
6993 + options,
6994 + async fn(state) {
6995 + const {
6996 + x: x2,
6997 + y: y2,
6998 + placement,
6999 + rects,
7000 + platform: platform3,
7001 + elements: elements2,
7002 + middlewareData
7003 + } = state;
7004 + const {
7005 + element,
7006 + padding = 0,
7007 + offsetParent = "real"
7008 + } = evaluate(options, state) || {};
7009 + if (element == null) {
7010 + return {};
7011 + }
7012 + const paddingObject = getPaddingObject(padding);
7013 + const coords = {
7014 + x: x2,
7015 + y: y2
7016 + };
7017 + const axis = getAlignmentAxis(placement);
7018 + const length = getAxisLength(axis);
7019 + const arrowDimensions = await platform3.getDimensions(element);
7020 + const isYAxis = axis === "y";
7021 + const minProp = isYAxis ? "top" : "left";
7022 + const maxProp = isYAxis ? "bottom" : "right";
7023 + const clientProp = isYAxis ? "clientHeight" : "clientWidth";
7024 + const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
7025 + const startDiff = coords[axis] - rects.reference[axis];
7026 + const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements2.floating;
7027 + let clientSize = elements2.floating[clientProp] || rects.floating[length];
7028 + if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
7029 + clientSize = elements2.floating[clientProp] || rects.floating[length];
7030 + }
7031 + const centerToReference = endDiff / 2 - startDiff / 2;
7032 + const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
7033 + const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
7034 + const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
7035 + const min2 = minPadding;
7036 + const max2 = clientSize - arrowDimensions[length] - maxPadding;
7037 + const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
7038 + const offset4 = clamp(min2, center, max2);
7039 + const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
7040 + const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
7041 + return {
7042 + [axis]: coords[axis] + alignmentOffset,
7043 + data: {
7044 + [axis]: offset4,
7045 + centerOffset: center - offset4 - alignmentOffset,
7046 + ...shouldAddOffset && {
7047 + alignmentOffset
7048 + }
7049 + },
7050 + reset: shouldAddOffset
7051 + };
7052 + }
7053 +});
7054 +var arrow4 = (options, deps) => {
7055 + const {
7056 + name: name2,
7057 + fn
7058 + } = baseArrow(options);
7059 + return {
7060 + name: name2,
7061 + fn,
7062 + options: [options, deps]
7063 + };
7064 +};
7065 +
7066 +// node_modules/@base-ui/react/utils/hideMiddleware.mjs
7067 +var hide4 = {
7068 + name: "hide",
7069 + async fn(state) {
7070 + const {
7071 + width,
7072 + height,
7073 + x: x2,
7074 + y: y2
7075 + } = state.rects.reference;
7076 + const anchorHidden2 = width === 0 && height === 0 && x2 === 0 && y2 === 0;
7077 + const overflow = await state.platform.detectOverflow(state, {
7078 + elementContext: "reference"
7079 + });
7080 + const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
7081 + return {
7082 + data: {
7083 + referenceHidden: referenceHidden || anchorHidden2
7084 + }
7085 + };
7086 + }
7087 +};
7088 +
7089 +// node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
7090 +var DEFAULT_SIDES = {
7091 + sideX: "left",
7092 + sideY: "top"
7093 +};
7094 +
7095 +// node_modules/@base-ui/react/utils/CommonPositionerCssVars.mjs
7096 +var availableWidth = "--available-width";
7097 +var availableHeight = "--available-height";
7098 +var anchorWidth = "--anchor-width";
7099 +var anchorHeight = "--anchor-height";
7100 +var transformOrigin = "--transform-origin";
7101 +var positionerWidth = "--positioner-width";
7102 +var positionerHeight = "--positioner-height";
7103 +
7104 +// node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
7105 +var AVAILABLE_WIDTH_VAR = availableWidth;
7106 +var AVAILABLE_HEIGHT_VAR = availableHeight;
7107 +function getLogicalSide(sideParam, renderedSide, isRtl) {
7108 + const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
7109 + const logicalRight = isRtl ? "inline-start" : "inline-end";
7110 + const logicalLeft = isRtl ? "inline-end" : "inline-start";
7111 + return {
7112 + top: "top",
7113 + right: isLogicalSideParam ? logicalRight : "right",
7114 + bottom: "bottom",
7115 + left: isLogicalSideParam ? logicalLeft : "left"
7116 + }[renderedSide];
7117 +}
7118 +function getOffsetData(state, sideParam, isRtl) {
7119 + const {
7120 + rects,
7121 + placement
7122 + } = state;
7123 + const data = {
7124 + side: getLogicalSide(sideParam, getSide(placement), isRtl),
7125 + align: getAlignment(placement) || "center",
7126 + anchor: {
7127 + width: rects.reference.width,
7128 + height: rects.reference.height
7129 + },
7130 + positioner: {
7131 + width: rects.floating.width,
7132 + height: rects.floating.height
7133 + }
7134 + };
7135 + return data;
7136 +}
7137 +function useAnchorPositioning(params) {
7138 + return useAnchorPositioningWithHook(params, useBaseUIFloating);
7139 +}
7140 +function useAnchorPositioningWithHook(params, useFloatingHook) {
7141 + const {
7142 + // Public parameters
7143 + anchor,
7144 + positionMethod = "absolute",
7145 + side: sideParam = "bottom",
7146 + sideOffset = 0,
7147 + align = "center",
7148 + alignOffset = 0,
7149 + collisionBoundary,
7150 + collisionPadding: collisionPaddingParam = 5,
7151 + sticky = false,
7152 + arrowPadding = 5,
7153 + disableAnchorTracking = false,
7154 + inline: inlineMiddleware,
7155 + // Private parameters
7156 + keepMounted = false,
7157 + floatingRootContext,
7158 + mounted,
7159 + collisionAvoidance,
7160 + shift: shift4,
7161 + nodeId,
7162 + adaptiveOrigin: adaptiveOrigin2,
7163 + lazyFlip = false,
7164 + externalTree
7165 + } = params;
7166 + const [mountSide, setMountSide] = React29.useState(null);
7167 + if (!mounted && mountSide !== null) {
7168 + setMountSide(null);
7169 + }
7170 + const collisionAvoidanceSide = collisionAvoidance.side || "flip";
7171 + const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
7172 + const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
7173 + const shiftCrossAxis = shift4?.crossAxis ?? false;
7174 + const shiftRootBoundary = shift4?.rootBoundary;
7175 + const anchorFn = typeof anchor === "function" ? anchor : void 0;
7176 + const anchorFnCallback = useStableCallback(anchorFn);
7177 + const anchorDep = anchorFn ? anchorFnCallback : anchor;
7178 + const anchorValueRef = useValueAsRef(anchor);
7179 + const mountedRef = useValueAsRef(mounted);
7180 + const direction = useDirection();
7181 + const isRtl = direction === "rtl";
7182 + const side = mountSide || {
7183 + top: "top",
7184 + right: "right",
7185 + bottom: "bottom",
7186 + left: "left",
7187 + "inline-end": isRtl ? "left" : "right",
7188 + "inline-start": isRtl ? "right" : "left"
7189 + }[sideParam];
7190 + const placement = align === "center" ? side : `${side}-${align}`;
7191 + let collisionPadding = collisionPaddingParam;
7192 + if (typeof collisionPadding === "number") {
7193 + collisionPadding = {
7194 + top: collisionPadding,
7195 + right: collisionPadding,
7196 + bottom: collisionPadding,
7197 + left: collisionPadding
7198 + };
7199 + } else if (collisionPadding) {
7200 + collisionPadding = {
7201 + top: collisionPadding.top || 0,
7202 + right: collisionPadding.right || 0,
7203 + bottom: collisionPadding.bottom || 0,
7204 + left: collisionPadding.left || 0
7205 + };
7206 + }
7207 + const bias = 1;
7208 + const biasTop = sideParam === "bottom" ? bias : 0;
7209 + const biasBottom = sideParam === "top" ? bias : 0;
7210 + const biasLeft = sideParam === "right" ? bias : 0;
7211 + const biasRight = sideParam === "left" ? bias : 0;
7212 + const commonCollisionProps = {
7213 + boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
7214 + padding: collisionPadding
7215 + };
7216 + const arrowRef = React29.useRef(null);
7217 + const sideOffsetRef = useValueAsRef(sideOffset);
7218 + const alignOffsetRef = useValueAsRef(alignOffset);
7219 + const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
7220 + const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
7221 + const middleware = [];
7222 + if (inlineMiddleware) {
7223 + middleware.push(inlineMiddleware);
7224 + }
7225 + middleware.push(offset3((state) => {
7226 + const data = getOffsetData(state, sideParam, isRtl);
7227 + const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
7228 + const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
7229 + return {
7230 + mainAxis: sideAxis,
7231 + crossAxis: alignAxis,
7232 + alignmentAxis: alignAxis
7233 + };
7234 + }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
7235 + const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
7236 + const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
7237 + const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
7238 + ...commonCollisionProps,
7239 + // Ensure the popup flips if it's been limited by its --available-height and it resizes.
7240 + // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
7241 + padding: {
7242 + top: collisionPadding.top + bias + biasTop,
7243 + right: collisionPadding.right + bias + biasRight,
7244 + bottom: collisionPadding.bottom + bias + biasBottom,
7245 + left: collisionPadding.left + bias + biasLeft
7246 + },
7247 + mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
7248 + crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
7249 + fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
7250 + });
7251 + const shiftMiddleware = shiftDisabled ? null : shift3({
7252 + ...commonCollisionProps,
7253 + // Use the Layout Viewport to avoid shifting around when pinch-zooming.
7254 + rootBoundary: shiftRootBoundary,
7255 + mainAxis: collisionAvoidanceAlign !== "none",
7256 + crossAxis: crossAxisShiftEnabled,
7257 + limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
7258 + if (!arrowRef.current) {
7259 + return {};
7260 + }
7261 + const {
7262 + width,
7263 + height
7264 + } = arrowRef.current.getBoundingClientRect();
7265 + const sideAxis = getSideAxis(getSide(limitData.placement));
7266 + const arrowSize = sideAxis === "y" ? width : height;
7267 + const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
7268 + return {
7269 + offset: arrowSize / 2 + offsetAmount / 2
7270 + };
7271 + })
7272 + }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
7273 + if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
7274 + middleware.push(shiftMiddleware, flipMiddleware);
7275 + } else {
7276 + middleware.push(flipMiddleware, shiftMiddleware);
7277 + }
7278 + middleware.push(size3({
7279 + ...commonCollisionProps,
7280 + apply({
7281 + elements: {
7282 + floating
7283 + },
7284 + availableWidth: availableWidth2,
7285 + availableHeight: availableHeight2,
7286 + rects
7287 + }) {
7288 + if (!mountedRef.current) {
7289 + return;
7290 + }
7291 + const floatingStyle = floating.style;
7292 + floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `${availableWidth2}px`);
7293 + floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `${availableHeight2}px`);
7294 + const dpr = getWindow(floating).devicePixelRatio || 1;
7295 + const {
7296 + x: x3,
7297 + y: y3,
7298 + width,
7299 + height
7300 + } = rects.reference;
7301 + const anchorWidth2 = (Math.round((x3 + width) * dpr) - Math.round(x3 * dpr)) / dpr;
7302 + const anchorHeight2 = (Math.round((y3 + height) * dpr) - Math.round(y3 * dpr)) / dpr;
7303 + floatingStyle.setProperty(anchorWidth, `${anchorWidth2}px`);
7304 + floatingStyle.setProperty(anchorHeight, `${anchorHeight2}px`);
7305 + }
7306 + }), arrow4((state) => ({
7307 + // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
7308 + // we'll create a fake element.
7309 + element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
7310 + // No padding for the fake arrow: it would displace aligned popups on narrow anchors.
7311 + padding: arrowRef.current ? arrowPadding : 0,
7312 + offsetParent: "floating"
7313 + }), [arrowPadding]), {
7314 + name: "transformOrigin",
7315 + fn(state) {
7316 + const {
7317 + elements: {
7318 + floating
7319 + },
7320 + middlewareData: middlewareData2,
7321 + placement: renderedPlacement2,
7322 + platform: platform3,
7323 + rects,
7324 + y: y3
7325 + } = state;
7326 + const renderedSide2 = getSide(renderedPlacement2);
7327 + const renderedAlign2 = getAlignment(renderedPlacement2);
7328 + const isVertical = getSideAxis(renderedSide2) === "y";
7329 + const arrowEl = arrowRef.current;
7330 + const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
7331 + let crossOrigin;
7332 + if (!arrowEl && renderedAlign2 && Math.abs(isVertical ? middlewareData2.shift?.x || 0 : middlewareData2.shift?.y || 0) <= 1) {
7333 + crossOrigin = renderedAlign2 === "start" === (isVertical && platform3.isRTL?.(floating) === true) ? "100%" : "0%";
7334 + } else {
7335 + const arrowOffset = isVertical ? middlewareData2.arrow?.x || 0 : middlewareData2.arrow?.y || 0;
7336 + const arrowSize = isVertical ? arrowEl?.clientWidth || 0 : arrowEl?.clientHeight || 0;
7337 + crossOrigin = `${arrowOffset + arrowSize / 2}px`;
7338 + }
7339 + let sideOrigin = renderedSide2 === "top" || renderedSide2 === "left" ? `calc(100% + ${sideOffsetValue}px)` : `${-sideOffsetValue}px`;
7340 + if (crossAxisShiftEnabled && isVertical && Math.abs(middlewareData2.shift?.y || 0) > sideOffsetValue) {
7341 + sideOrigin = `${rects.reference.y + rects.reference.height / 2 - y3}px`;
7342 + }
7343 + floating.style.setProperty(transformOrigin, isVertical ? `${crossOrigin} ${sideOrigin}` : `${sideOrigin} ${crossOrigin}`);
7344 + return {};
7345 + }
7346 + }, hide4, adaptiveOrigin2);
7347 + useIsoLayoutEffect(() => {
7348 + if (!mounted && floatingRootContext) {
7349 + floatingRootContext.update({
7350 + referenceElement: null,
7351 + floatingElement: null,
7352 + domReferenceElement: null,
7353 + positionReference: null
7354 + });
7355 + }
7356 + }, [mounted, floatingRootContext]);
7357 + const autoUpdateOptions = React29.useMemo(() => ({
7358 + ancestorScroll: !disableAnchorTracking,
7359 + elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
7360 + layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
7361 + }), [disableAnchorTracking]);
7362 + const {
7363 + refs,
7364 + elements: elements2,
7365 + x: x2,
7366 + y: y2,
7367 + middlewareData,
7368 + update: update2,
7369 + placement: renderedPlacement,
7370 + context,
7371 + isPositioned,
7372 + floatingStyles: originalFloatingStyles
7373 + } = useFloatingHook({
7374 + rootContext: floatingRootContext,
7375 + open: keepMounted ? mounted : void 0,
7376 + placement,
7377 + middleware,
7378 + strategy: positionMethod,
7379 + whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
7380 + nodeId,
7381 + externalTree
7382 + });
7383 + const {
7384 + sideX,
7385 + sideY
7386 + } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
7387 + const resolvedPosition = isPositioned ? positionMethod : "fixed";
7388 + const floatingStyles = React29.useMemo(() => {
7389 + let base;
7390 + if (!isPositioned) {
7391 + base = {
7392 + position: resolvedPosition,
7393 + top: 0,
7394 + left: 0
7395 + };
7396 + } else if (adaptiveOrigin2) {
7397 + base = {
7398 + position: resolvedPosition,
7399 + [sideX]: x2,
7400 + [sideY]: y2
7401 + };
7402 + } else {
7403 + base = {
7404 + ...originalFloatingStyles,
7405 + position: resolvedPosition
7406 + };
7407 + }
7408 + base[AVAILABLE_WIDTH_VAR] = "100vw";
7409 + base[AVAILABLE_HEIGHT_VAR] = "100vh";
7410 + if (!isPositioned) {
7411 + base.opacity = 0;
7412 + }
7413 + return base;
7414 + }, [adaptiveOrigin2, resolvedPosition, sideX, x2, sideY, y2, originalFloatingStyles, isPositioned]);
7415 + const registeredPositionReferenceRef = React29.useRef(null);
7416 + useIsoLayoutEffect(() => {
7417 + if (!mounted) {
7418 + return;
7419 + }
7420 + const anchorValue = anchorValueRef.current;
7421 + const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
7422 + const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
7423 + const finalAnchor = unwrappedElement || null;
7424 + if (finalAnchor !== registeredPositionReferenceRef.current) {
7425 + refs.setPositionReference(finalAnchor);
7426 + registeredPositionReferenceRef.current = finalAnchor;
7427 + }
7428 + }, [mounted, refs, anchorDep, anchorValueRef]);
7429 + React29.useEffect(() => {
7430 + if (!mounted) {
7431 + return;
7432 + }
7433 + const anchorValue = anchorValueRef.current;
7434 + if (typeof anchorValue === "function") {
7435 + return;
7436 + }
7437 + if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7438 + refs.setPositionReference(anchorValue.current);
7439 + registeredPositionReferenceRef.current = anchorValue.current;
7440 + }
7441 + }, [mounted, refs, anchorDep, anchorValueRef]);
7442 + React29.useEffect(() => {
7443 + if (keepMounted && mounted && elements2.reference && elements2.floating) {
7444 + return autoUpdate(elements2.reference, elements2.floating, update2, autoUpdateOptions);
7445 + }
7446 + return void 0;
7447 + }, [keepMounted, mounted, elements2, update2, autoUpdateOptions]);
7448 + const renderedSide = getSide(renderedPlacement);
7449 + const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7450 + const renderedAlign = getAlignment(renderedPlacement) || "center";
7451 + const anchorHidden2 = Boolean(middlewareData.hide?.referenceHidden);
7452 + useIsoLayoutEffect(() => {
7453 + if (lazyFlip && mounted && isPositioned && renderedSide !== side) {
7454 + setMountSide(renderedSide);
7455 + }
7456 + }, [lazyFlip, mounted, isPositioned, renderedSide, side]);
7457 + const arrowStyles = React29.useMemo(() => ({
7458 + position: "absolute",
7459 + top: middlewareData.arrow?.y,
7460 + left: middlewareData.arrow?.x
7461 + }), [middlewareData.arrow]);
7462 + const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7463 + return React29.useMemo(() => ({
7464 + positionerStyles: floatingStyles,
7465 + arrowStyles,
7466 + arrowRef,
7467 + arrowUncentered,
7468 + side: logicalRenderedSide,
7469 + align: renderedAlign,
7470 + physicalSide: renderedSide,
7471 + anchorHidden: anchorHidden2,
7472 + refs,
7473 + context,
7474 + isPositioned,
7475 + update: update2
7476 + }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden2, refs, context, isPositioned, update2]);
7477 +}
7478 +function isRef(param) {
7479 + return param != null && "current" in param;
7480 +}
7481 +
7482 +// node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
7483 +function getDisabledMountTransitionStyles(transitionStatus) {
7484 + return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7485 +}
7486 +
7487 +// node_modules/@base-ui/react/utils/usePositioner.mjs
7488 +function usePositioner(componentProps, state, {
7489 + styles,
7490 + transitionStatus,
7491 + props,
7492 + refs,
7493 + hidden,
7494 + inert = false
7495 +}) {
7496 + const style = {
7497 + ...styles
7498 + };
7499 + if (inert) {
7500 + style.pointerEvents = "none";
7501 + }
7502 + return useRenderElement("div", componentProps, {
7503 + state,
7504 + ref: refs,
7505 + props: [{
7506 + role: "presentation",
7507 + hidden,
7508 + style
7509 + }, getDisabledMountTransitionStyles(transitionStatus), props],
7510 + stateAttributesMapping: popupStateMapping
7511 + });
7512 +}
7513 +
7514 +// node_modules/@base-ui/react/utils/usePopupViewport.mjs
7515 +var React33 = __toESM(require_react(), 1);
7516 +var ReactDOM6 = __toESM(require_react_dom(), 1);
7517 +
7518 +// node_modules/@base-ui/utils/usePreviousValue.mjs
7519 +var React30 = __toESM(require_react(), 1);
7520 +function usePreviousValue(value) {
7521 + const [state, setState] = React30.useState({
7522 + current: value,
7523 + previous: null
7524 + });
7525 + if (!Object.is(value, state.current)) {
7526 + setState({
7527 + current: value,
7528 + previous: state.current
7529 + });
7530 + }
7531 + return state.previous;
7532 +}
7533 +
7534 +// node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7535 +var React31 = __toESM(require_react(), 1);
7536 +
7537 +// node_modules/@base-ui/react/utils/getCssDimensions.mjs
7538 +function getCssDimensions2(element) {
7539 + const css = getComputedStyle2(element);
7540 + let width = parseFloat(css.width) || 0;
7541 + let height = parseFloat(css.height) || 0;
7542 + const hasOffset = isHTMLElement(element);
7543 + const offsetWidth = hasOffset ? element.offsetWidth : width;
7544 + const offsetHeight = hasOffset ? element.offsetHeight : height;
7545 + const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
7546 + if (shouldFallback) {
7547 + width = offsetWidth;
7548 + height = offsetHeight;
7549 + }
7550 + return {
7551 + width,
7552 + height
7553 + };
7554 +}
7555 +
7556 +// node_modules/@base-ui/react/utils/CommonPopupCssVars.mjs
7557 +var popupWidth = "--popup-width";
7558 +var popupHeight = "--popup-height";
7559 +
7560 +// node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7561 +function usePopupAutoResize(parameters) {
7562 + const {
7563 + popupElement,
7564 + positionerElement,
7565 + content,
7566 + mounted,
7567 + onMeasureLayout: onMeasureLayoutParam,
7568 + onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
7569 + side,
7570 + direction
7571 + } = parameters;
7572 + const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
7573 + const animationFrame = useAnimationFrame();
7574 + const committedDimensionsRef = React31.useRef(null);
7575 + const isInitialRenderRef = React31.useRef(true);
7576 + const restoreAnchoringStylesRef = React31.useRef(NOOP);
7577 + const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
7578 + const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
7579 + const anchoringStyles = React31.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
7580 + useIsoLayoutEffect(() => {
7581 + if (!mounted) {
7582 + restoreAnchoringStylesRef.current = NOOP;
7583 + isInitialRenderRef.current = true;
7584 + committedDimensionsRef.current = null;
7585 + return void 0;
7586 + }
7587 + if (!popupElement || !positionerElement) {
7588 + return void 0;
7589 + }
7590 + restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
7591 + setPopupCssSize(popupElement, "auto");
7592 + const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
7593 + const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
7594 + const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
7595 + const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
7596 + [availableWidth]: "max-content",
7597 + [availableHeight]: "max-content"
7598 + });
7599 + function restoreMeasurementOverrides() {
7600 + restorePopupPosition();
7601 + restorePopupTransform();
7602 + restorePositionerAvailableSize();
7603 + }
7604 + function restoreMeasurementOverridesIncludingScale() {
7605 + restoreMeasurementOverrides();
7606 + restorePopupScale();
7607 + }
7608 + onMeasureLayout?.();
7609 + if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
7610 + setPositionerCssSize(positionerElement, "max-content");
7611 + const dimensions = getCssDimensions2(popupElement);
7612 + committedDimensionsRef.current = dimensions;
7613 + setPositionerCssSize(positionerElement, dimensions);
7614 + restoreMeasurementOverridesIncludingScale();
7615 + onMeasureLayoutComplete?.(null, dimensions);
7616 + isInitialRenderRef.current = false;
7617 + return () => {
7618 + restoreAnchoringStylesRef.current();
7619 + restoreAnchoringStylesRef.current = NOOP;
7620 + };
7621 + }
7622 + setPositionerCssSize(positionerElement, "max-content");
7623 + const previousDimensions = committedDimensionsRef.current;
7624 + const newDimensions = getCssDimensions2(popupElement);
7625 + committedDimensionsRef.current = newDimensions;
7626 + setPopupCssSize(popupElement, previousDimensions);
7627 + restoreMeasurementOverridesIncludingScale();
7628 + onMeasureLayoutComplete?.(previousDimensions, newDimensions);
7629 + setPositionerCssSize(positionerElement, newDimensions);
7630 + const abortController = new AbortController();
7631 + animationFrame.request(() => {
7632 + setPopupCssSize(popupElement, newDimensions);
7633 + runOnceAnimationsFinish(() => {
7634 + popupElement.style.setProperty(popupWidth, "auto");
7635 + popupElement.style.setProperty(popupHeight, "auto");
7636 + }, abortController.signal);
7637 + });
7638 + return () => {
7639 + abortController.abort();
7640 + animationFrame.cancel();
7641 + restoreAnchoringStylesRef.current();
7642 + restoreAnchoringStylesRef.current = NOOP;
7643 + };
7644 + }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
7645 +}
7646 +function getPopupAnchoringStyles(side, direction) {
7647 + const isPhysicalTop = side === "top";
7648 + const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
7649 + if (!isPhysicalTop && !isPhysicalLeft) {
7650 + return EMPTY_OBJECT;
7651 + }
7652 + return {
7653 + position: "absolute",
7654 + [isPhysicalTop ? "bottom" : "top"]: "0",
7655 + [isPhysicalLeft ? "right" : "left"]: "0"
7656 + };
7657 +}
7658 +function overrideElementStyle(element, property, value) {
7659 + const originalValue = element.style.getPropertyValue(property);
7660 + element.style.setProperty(property, value);
7661 + return () => {
7662 + element.style.setProperty(property, originalValue);
7663 + };
7664 +}
7665 +function applyElementStyles(element, styles) {
7666 + const restorers = [];
7667 + for (const [key, value] of Object.entries(styles)) {
7668 + restorers.push(overrideElementStyle(element, key, value));
7669 + }
7670 + return restorers.length ? () => {
7671 + restorers.forEach((restore) => restore());
7672 + } : NOOP;
7673 +}
7674 +function setPopupCssSize(popupElement, size4) {
7675 + const width = size4 === "auto" ? "auto" : `${size4.width}px`;
7676 + const height = size4 === "auto" ? "auto" : `${size4.height}px`;
7677 + popupElement.style.setProperty(popupWidth, width);
7678 + popupElement.style.setProperty(popupHeight, height);
7679 +}
7680 +function setPositionerCssSize(positionerElement, size4) {
7681 + const width = size4 === "max-content" ? "max-content" : `${size4.width}px`;
7682 + const height = size4 === "max-content" ? "max-content" : `${size4.height}px`;
7683 + positionerElement.style.setProperty(positionerWidth, width);
7684 + positionerElement.style.setProperty(positionerHeight, height);
7685 +}
7686 +
7687 +// node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
7688 +var React32 = __toESM(require_react(), 1);
7689 +var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
7690 +var DirectionProvider = function DirectionProvider2(props) {
7691 + const {
7692 + direction = "ltr"
7693 + } = props;
7694 + const contextValue = React32.useMemo(() => ({
7695 + direction
7696 + }), [direction]);
7697 + return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DirectionContext.Provider, {
7698 + value: contextValue,
7699 + children: props.children
7700 + });
7701 +};
7702 +if (true) DirectionProvider.displayName = "DirectionProvider";
7703 +
7704 +// node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
7705 +var adaptiveOrigin = {
7706 + name: "adaptiveOrigin",
7707 + async fn(state) {
7708 + const {
7709 + x: rawX,
7710 + y: rawY,
7711 + rects: {
7712 + floating: floatRect
7713 + },
7714 + elements: {
7715 + floating
7716 + },
7717 + platform: platform3,
7718 + strategy,
7719 + placement
7720 + } = state;
7721 + const win = getWindow(floating);
7722 + const styles = win.getComputedStyle(floating);
7723 + const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
7724 + if (!hasTransition) {
7725 + return {
7726 + x: rawX,
7727 + y: rawY,
7728 + data: DEFAULT_SIDES
7729 + };
7730 + }
7731 + const offsetParent = await platform3.getOffsetParent?.(floating);
7732 + let offsetDimensions = {
7733 + width: 0,
7734 + height: 0
7735 + };
7736 + if (strategy === "fixed" && win?.visualViewport) {
7737 + offsetDimensions = {
7738 + width: win.visualViewport.width,
7739 + height: win.visualViewport.height
7740 + };
7741 + } else if (offsetParent === win) {
7742 + const doc = ownerDocument(floating);
7743 + offsetDimensions = {
7744 + width: doc.documentElement.clientWidth,
7745 + height: doc.documentElement.clientHeight
7746 + };
7747 + } else if (await platform3.isElement?.(offsetParent)) {
7748 + offsetDimensions = await platform3.getDimensions(offsetParent);
7749 + }
7750 + const currentSide = getSide(placement);
7751 + let x2 = rawX;
7752 + let y2 = rawY;
7753 + if (currentSide === "left") {
7754 + x2 = offsetDimensions.width - (rawX + floatRect.width);
7755 + }
7756 + if (currentSide === "top") {
7757 + y2 = offsetDimensions.height - (rawY + floatRect.height);
7758 + }
7759 + const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
7760 + const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
7761 + return {
7762 + x: x2,
7763 + y: y2,
7764 + data: {
7765 + sideX,
7766 + sideY
7767 + }
7768 + };
7769 + }
7770 +};
7771 +
7772 +// node_modules/@base-ui/react/utils/CommonViewportDataAttributes.mjs
7773 +var activationDirection = "data-activation-direction";
7774 +
7775 +// node_modules/@base-ui/react/utils/usePopupViewport.mjs
7776 +var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
7777 +var popupViewportStateMapping = {
7778 + activationDirection: (value) => value ? {
7779 + [activationDirection]: value
7780 + } : null
7781 +};
7782 +function usePopupViewport(parameters) {
7783 + const {
7784 + store,
7785 + side,
7786 + children
7787 + } = parameters;
7788 + const direction = useDirection();
7789 + const activeTrigger = store.useState("activeTriggerElement");
7790 + const activeTriggerId = store.useState("activeTriggerId");
7791 + const open2 = store.useState("open");
7792 + const payload = store.useState("payload");
7793 + const mounted = store.useState("mounted");
7794 + const popupElement = store.useState("popupElement");
7795 + const positionerElement = store.useState("positionerElement");
7796 + const previousActiveTrigger = usePreviousValue(open2 ? activeTrigger : null);
7797 + const currentContentKey = usePopupContentKey(activeTriggerId, payload);
7798 + const capturedNodeRef = React33.useRef(null);
7799 + const [previousContentNode, setPreviousContentNode] = React33.useState(null);
7800 + const [newTriggerOffset, setNewTriggerOffset] = React33.useState(null);
7801 + const currentContainerRef = React33.useRef(null);
7802 + const previousContainerRef = React33.useRef(null);
7803 + const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
7804 + const cleanupFrame = useAnimationFrame();
7805 + const cleanupControllerRef = React33.useRef(null);
7806 + const [previousContentDimensions, setPreviousContentDimensions] = React33.useState(null);
7807 + const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React33.useState(false);
7808 + useIsoLayoutEffect(() => {
7809 + store.set("adaptiveOrigin", adaptiveOrigin);
7810 + return () => {
7811 + store.set("adaptiveOrigin", void 0);
7812 + };
7813 + }, [store]);
7814 + const handleMeasureLayout = useStableCallback(() => {
7815 + currentContainerRef.current?.style.setProperty("animation", "none");
7816 + currentContainerRef.current?.style.setProperty("transition", "none");
7817 + previousContainerRef.current?.style.setProperty("display", "none");
7818 + });
7819 + const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
7820 + currentContainerRef.current?.style.removeProperty("animation");
7821 + currentContainerRef.current?.style.removeProperty("transition");
7822 + previousContainerRef.current?.style.removeProperty("display");
7823 + if (previousDimensions) {
7824 + setPreviousContentDimensions(previousDimensions);
7825 + }
7826 + });
7827 + const armViewportCleanup = useStableCallback(() => {
7828 + cleanupControllerRef.current?.abort();
7829 + const controller = new AbortController();
7830 + cleanupControllerRef.current = controller;
7831 + onAnimationsFinished(() => {
7832 + setPreviousContentNode(null);
7833 + setPreviousContentDimensions(null);
7834 + capturedNodeRef.current = null;
7835 + }, controller.signal);
7836 + });
7837 + const lastHandledTriggerRef = React33.useRef(null);
7838 + useIsoLayoutEffect(() => {
7839 + if (!open2 || !mounted) {
7840 + lastHandledTriggerRef.current = null;
7841 + }
7842 + }, [open2, mounted]);
7843 + useIsoLayoutEffect(() => {
7844 + if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
7845 + setPreviousContentNode(capturedNodeRef.current);
7846 + setShowStartingStyleAttribute(true);
7847 + const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
7848 + setNewTriggerOffset(offset4);
7849 + lastHandledTriggerRef.current = activeTrigger;
7850 + }
7851 + }, [activeTrigger, previousActiveTrigger]);
7852 + useIsoLayoutEffect(() => {
7853 + if (previousContentNode == null) {
7854 + return;
7855 + }
7856 + cleanupControllerRef.current?.abort();
7857 + setShowStartingStyleAttribute(true);
7858 + cleanupFrame.request(() => {
7859 + ReactDOM6.flushSync(() => {
7860 + setShowStartingStyleAttribute(false);
7861 + });
7862 + armViewportCleanup();
7863 + });
7864 + }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
7865 + useIsoLayoutEffect(() => {
7866 + const source = currentContainerRef.current;
7867 + if (!source) {
7868 + return;
7869 + }
7870 + const wrapper = ownerDocument(source).createElement("div");
7871 + for (const child of Array.from(source.childNodes)) {
7872 + wrapper.appendChild(child.cloneNode(true));
7873 + }
7874 + capturedNodeRef.current = wrapper;
7875 + });
7876 + const isTransitioning = previousContentNode != null;
7877 + let childrenToRender;
7878 + if (!isTransitioning) {
7879 + childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7880 + "data-current": true,
7881 + ref: currentContainerRef,
7882 + children
7883 + }, currentContentKey);
7884 + } else {
7885 + childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(React33.Fragment, {
7886 + children: [/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7887 + "data-previous": true,
7888 + inert: inertValue(true),
7889 + ref: previousContainerRef,
7890 + style: {
7891 + ...previousContentDimensions ? {
7892 + [popupWidth]: `${previousContentDimensions.width}px`,
7893 + [popupHeight]: `${previousContentDimensions.height}px`
7894 + } : null,
7895 + position: "absolute"
7896 + },
7897 + "data-ending-style": showStartingStyleAttribute ? void 0 : ""
7898 + }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7899 + "data-current": true,
7900 + ref: currentContainerRef,
7901 + "data-starting-style": showStartingStyleAttribute ? "" : void 0,
7902 + children
7903 + }, currentContentKey)]
7904 + });
7905 + }
7906 + useIsoLayoutEffect(() => {
7907 + const container = previousContainerRef.current;
7908 + if (!container || !previousContentNode) {
7909 + return;
7910 + }
7911 + container.replaceChildren(...Array.from(previousContentNode.childNodes));
7912 + }, [previousContentNode]);
7913 + usePopupAutoResize({
7914 + popupElement,
7915 + positionerElement,
7916 + mounted,
7917 + content: payload,
7918 + onMeasureLayout: handleMeasureLayout,
7919 + onMeasureLayoutComplete: handleMeasureLayoutComplete,
7920 + side,
7921 + direction
7922 + });
7923 + const state = {
7924 + activationDirection: getActivationDirection(newTriggerOffset),
7925 + transitioning: isTransitioning
7926 + };
7927 + return {
7928 + children: childrenToRender,
7929 + state
7930 + };
7931 +}
7932 +function getActivationDirection(offset4) {
7933 + if (!offset4) {
7934 + return void 0;
7935 + }
7936 + return `${getValueWithTolerance(offset4.horizontal, 5, "right", "left")} ${getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
7937 +}
7938 +function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
7939 + if (value > tolerance) {
7940 + return positiveLabel;
7941 + }
7942 + if (value < -tolerance) {
7943 + return negativeLabel;
7944 + }
7945 + return "";
7946 +}
7947 +function calculateRelativePosition(from, to) {
7948 + const fromRect = from.getBoundingClientRect();
7949 + const toRect = to.getBoundingClientRect();
7950 + const fromCenter = {
7951 + x: fromRect.left + fromRect.width / 2,
7952 + y: fromRect.top + fromRect.height / 2
7953 + };
7954 + const toCenter = {
7955 + x: toRect.left + toRect.width / 2,
7956 + y: toRect.top + toRect.height / 2
7957 + };
7958 + return {
7959 + horizontal: toCenter.x - fromCenter.x,
7960 + vertical: toCenter.y - fromCenter.y
7961 + };
7962 +}
7963 +function usePopupContentKey(activeTriggerId, payload) {
7964 + const [contentKey, setContentKey] = React33.useState(0);
7965 + const previousActiveTriggerIdRef = React33.useRef(activeTriggerId);
7966 + const previousPayloadRef = React33.useRef(payload);
7967 + const pendingPayloadUpdateRef = React33.useRef(false);
7968 + useIsoLayoutEffect(() => {
7969 + const previousActiveTriggerId = previousActiveTriggerIdRef.current;
7970 + const previousPayload = previousPayloadRef.current;
7971 + const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
7972 + const payloadChanged = payload !== previousPayload;
7973 + if (triggerIdChanged) {
7974 + setContentKey((value) => value + 1);
7975 + pendingPayloadUpdateRef.current = !payloadChanged;
7976 + } else if (pendingPayloadUpdateRef.current && payloadChanged) {
7977 + setContentKey((value) => value + 1);
7978 + pendingPayloadUpdateRef.current = false;
7979 + }
7980 + previousActiveTriggerIdRef.current = activeTriggerId;
7981 + previousPayloadRef.current = payload;
7982 + }, [activeTriggerId, payload]);
7983 + return `${activeTriggerId ?? "current"}-${contentKey}`;
7984 +}
7985 +
7986 +// node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
7987 +var React34 = __toESM(require_react(), 1);
7988 +var ReactDOM7 = __toESM(require_react_dom(), 1);
7989 +var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
7990 +var FloatingPortalLite = /* @__PURE__ */ React34.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
7991 + const {
7992 + children,
7993 + container,
7994 + className,
7995 + render,
7996 + style,
7997 + ...elementProps
7998 + } = componentProps;
7999 + const {
8000 + node: portalNode,
8001 + subtree: portalSubtree
8002 + } = useFloatingPortalNode({
8003 + container,
8004 + ref: forwardedRef,
8005 + componentProps,
8006 + elementProps
8007 + });
8008 + if (!portalSubtree && !portalNode) {
8009 + return null;
8010 + }
8011 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(React34.Fragment, {
8012 + children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
8013 + });
8014 +});
8015 +if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
8016 +
8017 +// node_modules/@base-ui/react/tooltip/index.parts.mjs
8018 +var index_parts_exports = {};
8019 +__export(index_parts_exports, {
8020 + Arrow: () => TooltipArrow,
8021 + Handle: () => TooltipHandle,
8022 + Popup: () => TooltipPopup,
8023 + Portal: () => TooltipPortal,
8024 + Positioner: () => TooltipPositioner,
8025 + Provider: () => TooltipProvider,
8026 + Root: () => TooltipRoot,
8027 + Trigger: () => TooltipTrigger,
8028 + Viewport: () => TooltipViewport,
8029 + createHandle: () => createTooltipHandle
8030 +});
8031 +
8032 +// node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
8033 +var React37 = __toESM(require_react(), 1);
8034 +
8035 +// node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
8036 +var React35 = __toESM(require_react(), 1);
8037 +var TooltipRootContext = /* @__PURE__ */ React35.createContext(void 0);
8038 +if (true) TooltipRootContext.displayName = "TooltipRootContext";
8039 +function useTooltipRootContext(optional) {
8040 + const context = React35.useContext(TooltipRootContext);
8041 + if (context === void 0 && !optional) {
8042 + throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
8043 + }
8044 + return context;
8045 +}
8046 +
8047 +// node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
8048 +var React36 = __toESM(require_react(), 1);
8049 +var selectors2 = {
8050 + ...popupStoreSelectors,
8051 + disabled: (state) => state.disabled,
8052 + instantType: (state) => state.instantType,
8053 + isInstantPhase: (state) => state.isInstantPhase,
8054 + trackCursorAxis: (state) => state.trackCursorAxis,
8055 + disableHoverablePopup: (state) => state.disableHoverablePopup,
8056 + lastOpenChangeReason: (state) => state.openChangeReason,
8057 + closeOnClick: (state) => state.closeOnClick,
8058 + closeDelay: (state) => state.closeDelay,
8059 + adaptiveOrigin: (state) => state.adaptiveOrigin
8060 +};
8061 +var TooltipStore = class extends ReactStore {
8062 + constructor(initialState, floatingId, nested) {
8063 + const triggerElements = new PopupTriggerMap();
8064 + super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
8065 + }
8066 + setOpen = (nextOpen, eventDetails) => {
8067 + applyPopupOpenChange(this, nextOpen, eventDetails, {
8068 + extraState: {
8069 + openChangeReason: eventDetails.reason
8070 + }
8071 + });
8072 + };
8073 + // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
8074 + cancelPendingOpen(event) {
8075 + this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
8076 + }
8077 +};
8078 +function createNullTooltipStore() {
8079 + const triggerElements = new PopupTriggerMap();
8080 + const store = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
8081 + return Object.assign(store, {
8082 + setOpen: NOOP,
8083 + cancelPendingOpen: NOOP
8084 + });
8085 +}
8086 +function createInitialState(initialState, triggerElements, floatingId, nested = false) {
8087 + const state = {
8088 + ...createInitialPopupStoreState(triggerElements, floatingId, nested),
8089 + disabled: false,
8090 + instantType: void 0,
8091 + isInstantPhase: false,
8092 + trackCursorAxis: "none",
8093 + disableHoverablePopup: false,
8094 + openChangeReason: null,
8095 + closeOnClick: true,
8096 + closeDelay: 0,
8097 + adaptiveOrigin: void 0,
8098 + ...initialState
8099 + };
8100 + return state;
8101 +}
8102 +function createInitialContext(triggerElements) {
8103 + return {
8104 + popupRef: /* @__PURE__ */ React36.createRef(),
8105 + onOpenChange: void 0,
8106 + onOpenChangeComplete: void 0,
8107 + triggerElements
8108 + };
8109 +}
8110 +
8111 +// node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
8112 +var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
8113 +var TooltipRoot = fastComponent(function TooltipRoot2(props) {
8114 + const {
8115 + disabled: disabled2 = false,
8116 + defaultOpen = false,
8117 + open: openProp,
8118 + disableHoverablePopup = false,
8119 + trackCursorAxis = "none",
8120 + actionsRef,
8121 + onOpenChange,
8122 + onOpenChangeComplete,
8123 + handle,
8124 + triggerId: triggerIdProp,
8125 + defaultTriggerId: defaultTriggerIdProp = null,
8126 + children
8127 + } = props;
8128 + const store = usePopupRootStore((floatingId, nested) => new TooltipStore({
8129 + open: defaultOpen,
8130 + openProp,
8131 + activeTriggerId: defaultTriggerIdProp,
8132 + triggerIdProp
8133 + }, floatingId, nested));
8134 + store.useControlledProp("openProp", openProp);
8135 + store.useControlledProp("triggerIdProp", triggerIdProp);
8136 + store.useContextCallback("onOpenChange", onOpenChange);
8137 + store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
8138 + const openState = store.useState("open");
8139 + const open2 = !disabled2 && openState;
8140 + const activeTriggerId = store.useState("activeTriggerId");
8141 + const mounted = store.useState("mounted");
8142 + const payload = store.useState("payload");
8143 + store.useSyncedValues({
8144 + trackCursorAxis,
8145 + disableHoverablePopup,
8146 + disabled: disabled2
8147 + });
8148 + useImplicitActiveTrigger(store, {
8149 + closeOnActiveTriggerUnmount: true
8150 + });
8151 + const {
8152 + forceUnmount,
8153 + transitionStatus
8154 + } = useOpenStateTransitions(open2, store);
8155 + const isInstantPhase = store.useState("isInstantPhase");
8156 + const instantType = store.useState("instantType");
8157 + const lastOpenChangeReason = store.useState("lastOpenChangeReason");
8158 + const previousInstantTypeRef = React37.useRef(null);
8159 + useIsoLayoutEffect(() => {
8160 + if (openState && disabled2) {
8161 + store.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
8162 + }
8163 + }, [openState, disabled2, store]);
8164 + useIsoLayoutEffect(() => {
8165 + if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
8166 + if (instantType !== "delay") {
8167 + previousInstantTypeRef.current = instantType;
8168 + }
8169 + store.set("instantType", "delay");
8170 + } else if (previousInstantTypeRef.current !== null) {
8171 + store.set("instantType", previousInstantTypeRef.current);
8172 + previousInstantTypeRef.current = null;
8173 + }
8174 + }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store]);
8175 + useIsoLayoutEffect(() => {
8176 + if (open2) {
8177 + if (activeTriggerId == null) {
8178 + store.set("payload", void 0);
8179 + }
8180 + }
8181 + }, [store, activeTriggerId, open2]);
8182 + React37.useImperativeHandle(actionsRef, () => ({
8183 + unmount: forceUnmount,
8184 + close: () => store.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
8185 + }), [forceUnmount, store]);
8186 + const shouldRenderInteractions = open2 || mounted || !disabled2 && trackCursorAxis !== "none";
8187 + return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TooltipRootContext.Provider, {
8188 + value: store,
8189 + children: [handle && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PopupHandleAttachment, {
8190 + handle,
8191 + store
8192 + }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipInteractions, {
8193 + store,
8194 + disabled: disabled2,
8195 + trackCursorAxis
8196 + }), typeof children === "function" ? children({
8197 + payload
8198 + }) : children]
8199 + });
8200 +});
8201 +if (true) TooltipRoot.displayName = "TooltipRoot";
8202 +function TooltipInteractions({
8203 + store,
8204 + disabled: disabled2,
8205 + trackCursorAxis
8206 +}) {
8207 + const floatingRootContext = store.useState("floatingRootContext");
8208 + const dismiss = useDismiss(floatingRootContext, {
8209 + enabled: !disabled2,
8210 + referencePress: () => store.select("closeOnClick")
8211 + });
8212 + const clientPoint = useClientPoint(floatingRootContext, {
8213 + enabled: !disabled2 && trackCursorAxis !== "none",
8214 + axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
8215 + });
8216 + const triggerProps = React37.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
8217 + usePopupInteractionProps(store, {
8218 + activeTriggerProps: triggerProps,
8219 + inactiveTriggerProps: triggerProps,
8220 + popupProps: dismiss.floating ?? EMPTY_OBJECT
8221 + });
8222 + return null;
8223 +}
8224 +
8225 +// node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8226 +var React39 = __toESM(require_react(), 1);
8227 +
8228 +// node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
8229 +var React38 = __toESM(require_react(), 1);
8230 +var TooltipProviderContext = /* @__PURE__ */ React38.createContext(void 0);
8231 +if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
8232 +function useTooltipProviderContext() {
8233 + return React38.useContext(TooltipProviderContext);
8234 +}
8235 +
8236 +// node_modules/@base-ui/react/tooltip/utils/constants.mjs
8237 +var OPEN_DELAY = 600;
8238 +
8239 +// node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8240 +var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
8241 +function getTargetElement(event) {
8242 + if ("composedPath" in event) {
8243 + const path = event.composedPath();
8244 + for (let i = 0; i < path.length; i += 1) {
8245 + const element = path[i];
8246 + if (isElement(element)) {
8247 + return element;
8248 + }
8249 + }
8250 + }
8251 + const target = event.target;
8252 + if (isElement(target)) {
8253 + return target;
8254 + }
8255 + return null;
8256 +}
8257 +function closestEnabledTooltipTrigger(element) {
8258 + let current = element;
8259 + while (current) {
8260 + const trigger = current.closest(`[${TOOLTIP_TRIGGER_IDENTIFIER}]`);
8261 + if (trigger) {
8262 + return trigger;
8263 + }
8264 + const root = current.getRootNode();
8265 + current = "host" in root && isElement(root.host) ? root.host : null;
8266 + }
8267 + return null;
8268 +}
8269 +var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
8270 + const {
8271 + render,
8272 + className,
8273 + style,
8274 + handle,
8275 + payload,
8276 + disabled: disabledProp,
8277 + delay,
8278 + closeOnClick = true,
8279 + closeDelay,
8280 + id: idProp,
8281 + ...elementProps
8282 + } = componentProps;
8283 + const rootContext = useTooltipRootContext(true);
8284 + const handleStore = usePopupHandleStore(handle);
8285 + const store = handleStore ?? rootContext;
8286 + if (!store) {
8287 + throw new Error(true ? "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle." : formatErrorMessage_default(82));
8288 + }
8289 + const thisTriggerId = useBaseUiId(idProp);
8290 + const isTriggerActive = store.useState("isTriggerActive", thisTriggerId);
8291 + const isOpenedByThisTrigger = store.useState("isOpenedByTrigger", thisTriggerId);
8292 + const floatingRootContext = store.useState("floatingRootContext");
8293 + const triggerElementRef = React39.useRef(null);
8294 + const closeDelayWithDefault = closeDelay ?? 0;
8295 + const {
8296 + registerTrigger,
8297 + isMountedByThisTrigger
8298 + } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {
8299 + payload,
8300 + closeOnClick,
8301 + closeDelay: closeDelayWithDefault
8302 + });
8303 + const providerDelay = useTooltipProviderContext();
8304 + const {
8305 + activeIdRef,
8306 + delayRef,
8307 + isInstantPhase,
8308 + hasProvider
8309 + } = useDelayGroup(floatingRootContext, {
8310 + open: isOpenedByThisTrigger
8311 + });
8312 + const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
8313 + store.useSyncedValue("isInstantPhase", isInstantPhase);
8314 + const rootDisabled = store.useState("disabled");
8315 + const disabled2 = disabledProp ?? rootDisabled;
8316 + const disabledRef = useValueAsRef(disabled2);
8317 + const trackCursorAxis = store.useState("trackCursorAxis");
8318 + const disableHoverablePopup = store.useState("disableHoverablePopup");
8319 + const isNestedTriggerHoveredRef = React39.useRef(false);
8320 + const nestedTriggerOpenTimeout = useTimeout();
8321 + const pointerTypeRef = React39.useRef(void 0);
8322 + function getOpenDelay() {
8323 + if (hasProvider && activeIdRef.current != null) {
8324 + return 0;
8325 + }
8326 + return delay ?? providerDelay ?? OPEN_DELAY;
8327 + }
8328 + function isEnabledNestedTriggerTarget(target) {
8329 + const triggerEl = triggerElementRef.current;
8330 + if (!triggerEl || !target) {
8331 + return false;
8332 + }
8333 + const nearestTrigger = closestEnabledTooltipTrigger(target);
8334 + return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
8335 + }
8336 + function detectNestedTriggerHover(target) {
8337 + const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
8338 + isNestedTriggerHoveredRef.current = nestedTriggerHovered;
8339 + if (nestedTriggerHovered) {
8340 + hoverInteraction.openChangeTimeout.clear();
8341 + hoverInteraction.restTimeout.clear();
8342 + hoverInteraction.restTimeoutPending = false;
8343 + nestedTriggerOpenTimeout.clear();
8344 + }
8345 + return nestedTriggerHovered;
8346 + }
8347 + const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
8348 + enabled: !disabled2,
8349 + mouseOnly: true,
8350 + move: false,
8351 + handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
8352 + restMs: getOpenDelay,
8353 + delay() {
8354 + if (closeDelay == null && hasProvider) {
8355 + return {
8356 + close: getDelay(delayRef.current, "close")
8357 + };
8358 + }
8359 + return {
8360 + close: closeDelayWithDefault
8361 + };
8362 + },
8363 + triggerElementRef,
8364 + isActiveTrigger: isTriggerActive,
8365 + isClosing: () => store.select("transitionStatus") === "ending",
8366 + shouldOpen() {
8367 + return !isNestedTriggerHoveredRef.current;
8368 + }
8369 + });
8370 + const focusProps = useFocus(floatingRootContext, {
8371 + enabled: !disabled2
8372 + }).reference;
8373 + const handleNestedTriggerHover = (event) => {
8374 + const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
8375 + const target = getTargetElement(event);
8376 + const nestedTriggerHovered = detectNestedTriggerHover(target);
8377 + const triggerEl = triggerElementRef.current;
8378 + const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
8379 + if (nestedTriggerHovered && store.select("open") && store.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
8380 + store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8381 + return;
8382 + }
8383 + if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
8384 + isMouseLikePointerType(pointerTypeRef.current)) {
8385 + const open2 = () => {
8386 + if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store.select("open")) {
8387 + store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
8388 + }
8389 + };
8390 + const openDelay = getOpenDelay();
8391 + if (openDelay === 0) {
8392 + nestedTriggerOpenTimeout.clear();
8393 + open2();
8394 + } else {
8395 + nestedTriggerOpenTimeout.start(openDelay, open2);
8396 + }
8397 + }
8398 + };
8399 + const rootTriggerProps = store.useState("triggerProps", isMountedByThisTrigger);
8400 + const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
8401 + const state = {
8402 + open: isOpenedByThisTrigger
8403 + };
8404 + const element = useRenderElement("button", componentProps, {
8405 + state,
8406 + ref: [forwardedRef, registerTrigger, triggerElementRef],
8407 + props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
8408 + onMouseOver(event) {
8409 + handleNestedTriggerHover(event.nativeEvent);
8410 + },
8411 + onFocus(event) {
8412 + if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
8413 + event.preventBaseUIHandler();
8414 + }
8415 + },
8416 + onMouseLeave() {
8417 + isNestedTriggerHoveredRef.current = false;
8418 + nestedTriggerOpenTimeout.clear();
8419 + pointerTypeRef.current = void 0;
8420 + },
8421 + onPointerEnter(event) {
8422 + pointerTypeRef.current = event.pointerType;
8423 + },
8424 + onPointerDown(event) {
8425 + pointerTypeRef.current = event.pointerType;
8426 + store.set("closeOnClick", closeOnClick);
8427 + if (closeOnClick && !store.select("open")) {
8428 + store.cancelPendingOpen(event.nativeEvent);
8429 + }
8430 + },
8431 + onClick(event) {
8432 + if (closeOnClick && !store.select("open")) {
8433 + store.cancelPendingOpen(event.nativeEvent);
8434 + }
8435 + },
8436 + id: thisTriggerId,
8437 + [triggerDisabled]: disabled2 ? "" : void 0,
8438 + [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
8439 + }, elementProps],
8440 + stateAttributesMapping: triggerOpenStateMapping
8441 + });
8442 + return element;
8443 +});
8444 +if (true) TooltipTrigger.displayName = "TooltipTrigger";
8445 +
8446 +// node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8447 +var React41 = __toESM(require_react(), 1);
8448 +
8449 +// node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
8450 +var React40 = __toESM(require_react(), 1);
8451 +var TooltipPortalContext = /* @__PURE__ */ React40.createContext(void 0);
8452 +if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
8453 +function useTooltipPortalContext() {
8454 + const value = React40.useContext(TooltipPortalContext);
8455 + if (value === void 0) {
8456 + throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
8457 + }
8458 + return value;
8459 +}
8460 +
8461 +// node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8462 +var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
8463 +var TooltipPortal = /* @__PURE__ */ React41.forwardRef(function TooltipPortal2(props, forwardedRef) {
8464 + const {
8465 + keepMounted = false,
8466 + ...portalProps
8467 + } = props;
8468 + const store = useTooltipRootContext();
8469 + const mounted = store.useState("mounted");
8470 + const shouldRender = mounted || keepMounted;
8471 + if (!shouldRender) {
8472 + return null;
8473 + }
8474 + return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipPortalContext.Provider, {
8475 + value: keepMounted,
8476 + children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FloatingPortalLite, {
8477 + ref: forwardedRef,
8478 + ...portalProps
8479 + })
8480 + });
8481 +});
8482 +if (true) TooltipPortal.displayName = "TooltipPortal";
8483 +
8484 +// node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8485 +var React43 = __toESM(require_react(), 1);
8486 +
8487 +// node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
8488 +var React42 = __toESM(require_react(), 1);
8489 +var TooltipPositionerContext = /* @__PURE__ */ React42.createContext(void 0);
8490 +if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
8491 +function useTooltipPositionerContext() {
8492 + const context = React42.useContext(TooltipPositionerContext);
8493 + if (context === void 0) {
8494 + throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
8495 + }
8496 + return context;
8497 +}
8498 +
8499 +// node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8500 +var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
8501 +var TooltipPositioner = /* @__PURE__ */ React43.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
8502 + const {
8503 + render,
8504 + className,
8505 + anchor,
8506 + positionMethod = "absolute",
8507 + side = "top",
8508 + align = "center",
8509 + sideOffset = 0,
8510 + alignOffset = 0,
8511 + collisionBoundary = "clipping-ancestors",
8512 + collisionPadding = 5,
8513 + arrowPadding = 5,
8514 + sticky = false,
8515 + disableAnchorTracking = false,
8516 + collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
8517 + style,
8518 + ...elementProps
8519 + } = componentProps;
8520 + const store = useTooltipRootContext();
8521 + const keepMounted = useTooltipPortalContext();
8522 + const open2 = store.useState("open");
8523 + const mounted = store.useState("mounted");
8524 + const trackCursorAxis = store.useState("trackCursorAxis");
8525 + const disableHoverablePopup = store.useState("disableHoverablePopup");
8526 + const floatingRootContext = store.useState("floatingRootContext");
8527 + const instantType = store.useState("instantType");
8528 + const transitionStatus = store.useState("transitionStatus");
8529 + const adaptiveOrigin2 = store.useState("adaptiveOrigin");
8530 + const positioning = useAnchorPositioning({
8531 + anchor,
8532 + positionMethod,
8533 + floatingRootContext,
8534 + mounted,
8535 + side,
8536 + sideOffset,
8537 + align,
8538 + alignOffset,
8539 + collisionBoundary,
8540 + collisionPadding,
8541 + sticky,
8542 + arrowPadding,
8543 + disableAnchorTracking,
8544 + keepMounted,
8545 + collisionAvoidance,
8546 + adaptiveOrigin: adaptiveOrigin2
8547 + });
8548 + const state = React43.useMemo(() => ({
8549 + open: open2,
8550 + side: positioning.side,
8551 + align: positioning.align,
8552 + anchorHidden: positioning.anchorHidden,
8553 + instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
8554 + }), [open2, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
8555 + const element = usePositioner(componentProps, state, {
8556 + styles: positioning.positionerStyles,
8557 + transitionStatus,
8558 + props: elementProps,
8559 + refs: [forwardedRef, store.useStateSetter("positionerElement")],
8560 + hidden: !mounted,
8561 + inert: !open2 || trackCursorAxis === "both" || disableHoverablePopup
8562 + });
8563 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipPositionerContext.Provider, {
8564 + value: positioning,
8565 + children: element
8566 + });
8567 +});
8568 +if (true) TooltipPositioner.displayName = "TooltipPositioner";
8569 +
8570 +// node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
8571 +var React44 = __toESM(require_react(), 1);
8572 +var TooltipPopup = /* @__PURE__ */ React44.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
8573 + const {
8574 + render,
8575 + className,
8576 + style,
8577 + ...elementProps
8578 + } = componentProps;
8579 + const store = useTooltipRootContext();
8580 + const {
8581 + side,
8582 + align
8583 + } = useTooltipPositionerContext();
8584 + const open2 = store.useState("open");
8585 + const instantType = store.useState("instantType");
8586 + const transitionStatus = store.useState("transitionStatus");
8587 + const popupProps = store.useState("popupProps");
8588 + const floatingContext = store.useState("floatingRootContext");
8589 + const disabled2 = store.useState("disabled");
8590 + const closeDelay = store.useState("closeDelay");
8591 + useOpenChangeComplete({
8592 + open: open2,
8593 + ref: store.context.popupRef,
8594 + onComplete() {
8595 + if (open2) {
8596 + store.context.onOpenChangeComplete?.(true);
8597 + }
8598 + }
8599 + });
8600 + useHoverFloatingInteraction(floatingContext, {
8601 + enabled: !disabled2,
8602 + closeDelay
8603 + });
8604 + const setPopupElement = store.useStateSetter("popupElement");
8605 + const state = {
8606 + open: open2,
8607 + side,
8608 + align,
8609 + instant: instantType,
8610 + transitionStatus
8611 + };
8612 + const element = useRenderElement("div", componentProps, {
8613 + state,
8614 + ref: [forwardedRef, store.context.popupRef, setPopupElement],
8615 + props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
8616 + stateAttributesMapping: popupTransitionStateMapping
8617 + });
8618 + return element;
8619 +});
8620 +if (true) TooltipPopup.displayName = "TooltipPopup";
8621 +
8622 +// node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
8623 +var React45 = __toESM(require_react(), 1);
8624 +var TooltipArrow = /* @__PURE__ */ React45.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
8625 + const {
8626 + render,
8627 + className,
8628 + style,
8629 + ...elementProps
8630 + } = componentProps;
8631 + const store = useTooltipRootContext();
8632 + const {
8633 + arrowRef,
8634 + side,
8635 + align,
8636 + arrowUncentered,
8637 + arrowStyles
8638 + } = useTooltipPositionerContext();
8639 + const open2 = store.useState("open");
8640 + const instantType = store.useState("instantType");
8641 + const state = {
8642 + open: open2,
8643 + side,
8644 + align,
8645 + uncentered: arrowUncentered,
8646 + instant: instantType
8647 + };
8648 + const element = useRenderElement("div", componentProps, {
8649 + state,
8650 + ref: [forwardedRef, arrowRef],
8651 + props: [{
8652 + style: arrowStyles,
8653 + "aria-hidden": true
8654 + }, elementProps],
8655 + stateAttributesMapping: popupStateMapping
8656 + });
8657 + return element;
8658 +});
8659 +if (true) TooltipArrow.displayName = "TooltipArrow";
8660 +
8661 +// node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
8662 +var React46 = __toESM(require_react(), 1);
8663 +var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
8664 +var TooltipProvider = function TooltipProvider2(props) {
8665 + const {
8666 + delay,
8667 + closeDelay,
8668 + timeout = 400
8669 + } = props;
8670 + const delayValue = React46.useMemo(() => ({
8671 + open: delay,
8672 + close: closeDelay
8673 + }), [delay, closeDelay]);
8674 + return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipProviderContext.Provider, {
8675 + value: delay,
8676 + children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FloatingDelayGroup, {
8677 + delay: delayValue,
8678 + timeoutMs: timeout,
8679 + children: props.children
8680 + })
8681 + });
8682 +};
8683 +if (true) TooltipProvider.displayName = "TooltipProvider";
8684 +
8685 +// node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
8686 +var React47 = __toESM(require_react(), 1);
8687 +var TooltipViewport = /* @__PURE__ */ React47.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
8688 + const {
8689 + render,
8690 + className,
8691 + style,
8692 + children,
8693 + ...elementProps
8694 + } = componentProps;
8695 + const store = useTooltipRootContext();
8696 + const positioner = useTooltipPositionerContext();
8697 + const instantType = store.useState("instantType");
8698 + const {
8699 + children: childrenToRender,
8700 + state: viewportState
8701 + } = usePopupViewport({
8702 + store,
8703 + side: positioner.side,
8704 + children
8705 + });
8706 + const state = {
8707 + activationDirection: viewportState.activationDirection,
8708 + transitioning: viewportState.transitioning,
8709 + instant: instantType
8710 + };
8711 + return useRenderElement("div", componentProps, {
8712 + state,
8713 + ref: forwardedRef,
8714 + props: [elementProps, {
8715 + children: childrenToRender
8716 + }],
8717 + stateAttributesMapping: popupViewportStateMapping
8718 + });
8719 +});
8720 +if (true) TooltipViewport.displayName = "TooltipViewport";
8721 +
8722 +// node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
8723 +var TooltipHandle = class extends BasePopupHandle {
8724 + constructor() {
8725 + super(createNullTooltipStore(), "Tooltip");
8726 + }
8727 + /**
8728 + * Opens the tooltip and associates it with the trigger with the given id.
8729 + *
8730 + * This method should only be called in an event handler or an effect (not during rendering).
8731 + *
8732 + * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
8733 + * `Tooltip.Trigger` with this handle passed as a prop.
8734 + */
8735 + open(triggerId) {
8736 + this.openByTrigger(triggerId);
8737 + }
8738 + /**
8739 + * Closes the tooltip.
8740 + *
8741 + * This method should only be called in an event handler or an effect (not during rendering).
8742 + */
8743 + close() {
8744 + this.closePopup();
8745 + }
8746 + /**
8747 + * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
8748 + */
8749 + get isOpen() {
8750 + return this.attachedStore?.select("open") ?? false;
8751 + }
8752 +};
8753 +function createTooltipHandle() {
8754 + return new TooltipHandle();
8755 +}
8756 +
586 8757 // node_modules/@base-ui/react/use-render/useRender.mjs
587 8758 function useRender(params) {
588 8759 return useRenderElement(params.defaultTagName ?? "div", params, params);
589 8760 }
@@ -588,9 +8759,9 @@
588 8759 return useRenderElement(params.defaultTagName ?? "div", params, params);
589 8760 }
590 8761
591 8762 // packages/ui/build-module/text/text.mjs
592 -var import_element = __toESM(require_element(), 1);
8763 +var import_element10 = __toESM(require_element(), 1);
593 8764 var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
594 8765 function getRuntime() {
595 8766 const globalScope = globalThis;
596 8767 if (globalScope.__wpStyleRuntime) {
@@ -670,16 +8841,16 @@
670 8841 injectStyle(targetDocument, hash, css);
671 8842 }
672 8843 }
673 8844 if (typeof process === "undefined" || true) {
674 - registerStyle("a495f9d138", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
8845 + registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
675 8846 }
676 8847 var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
677 8848 if (typeof process === "undefined" || true) {
678 - registerStyle("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)}");
8849 + 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)}");
679 8850 }
680 -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" };
681 -var Text = (0, import_element.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
8851 +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" };
8852 +var Text = (0, import_element10.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
682 8853 const element = useRender({
683 8854 render,
684 8855 defaultTagName: "span",
685 8856 ref,
@@ -695,15 +8866,26 @@
695 8866 });
696 8867 return element;
697 8868 });
698 8869
699 -// packages/icons/build-module/library/seen.mjs
700 -var import_primitives = __toESM(require_primitives(), 1);
701 -var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
702 -var seen_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: "M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z" }) });
8870 +// packages/ui/build-module/tooltip/index.mjs
8871 +var tooltip_exports = {};
8872 +__export(tooltip_exports, {
8873 + Popup: () => Popup,
8874 + Portal: () => Portal,
8875 + Positioner: () => Positioner,
8876 + Provider: () => Provider,
8877 + Root: () => Root,
8878 + Trigger: () => Trigger
8879 +});
703 8880
704 -// packages/ui/build-module/stack/stack.mjs
705 -var import_element2 = __toESM(require_element(), 1);
8881 +// packages/ui/build-module/tooltip/popup.mjs
8882 +var import_element14 = __toESM(require_element(), 1);
8883 +
8884 +// packages/ui/build-module/tooltip/portal.mjs
8885 +var import_element11 = __toESM(require_element(), 1);
8886 +
8887 +// packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
706 8888 var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
707 8889 function getRuntime2() {
708 8890 const globalScope = globalThis;
709 8891 if (globalScope.__wpStyleRuntime) {
@@ -783,11 +8965,725 @@
783 8965 injectStyle2(targetDocument, hash, css);
784 8966 }
785 8967 }
786 8968 if (typeof process === "undefined" || true) {
787 - registerStyle2("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
8969 + registerStyle2("be37f31c1e", "._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");
788 8970 }
789 -var style_default2 = { "stack": "_19ce0419607e1896__stack" };
8971 +var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
8972 +var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
8973 +function resolveOwnerDocument() {
8974 + return typeof document === "undefined" ? null : document;
8975 +}
8976 +function isInWordPressEnvironment() {
8977 + let topWp;
8978 + try {
8979 + topWp = window.top?.wp;
8980 + } catch {
8981 + }
8982 + const wp = topWp ?? window.wp;
8983 + return typeof wp?.components === "object" && wp.components !== null;
8984 +}
8985 +var cachedSlot = null;
8986 +function ensureSlotIsAccessible(element) {
8987 + element.setAttribute("aria-hidden", "false");
8988 + return element;
8989 +}
8990 +function createSlot(ownerDocument2) {
8991 + const element = ownerDocument2.createElement("div");
8992 + element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
8993 + if (wp_compat_overlay_slot_default.slot) {
8994 + element.classList.add(wp_compat_overlay_slot_default.slot);
8995 + }
8996 + ownerDocument2.body.appendChild(element);
8997 + return element;
8998 +}
8999 +function getWpCompatOverlaySlot() {
9000 + if (typeof window === "undefined") {
9001 + return void 0;
9002 + }
9003 + if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
9004 + return void 0;
9005 + }
9006 + const ownerDocument2 = resolveOwnerDocument();
9007 + if (!ownerDocument2 || !ownerDocument2.body) {
9008 + return void 0;
9009 + }
9010 + if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
9011 + return ensureSlotIsAccessible(cachedSlot);
9012 + }
9013 + const existing = ownerDocument2.querySelector(
9014 + `[${WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
9015 + );
9016 + if (existing instanceof HTMLDivElement) {
9017 + cachedSlot = ensureSlotIsAccessible(existing);
9018 + return cachedSlot;
9019 + }
9020 + if (cachedSlot?.isConnected) {
9021 + cachedSlot.remove();
9022 + }
9023 + cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
9024 + return cachedSlot;
9025 +}
9026 +
9027 +// packages/ui/build-module/tooltip/portal.mjs
9028 +var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
9029 +var Portal = (0, import_element11.forwardRef)(
9030 + function TooltipPortal3({ container, ...restProps }, ref) {
9031 + return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
9032 + index_parts_exports.Portal,
9033 + {
9034 + container: container ?? getWpCompatOverlaySlot(),
9035 + ...restProps,
9036 + ref
9037 + }
9038 + );
9039 + }
9040 +);
9041 +
9042 +// packages/ui/build-module/tooltip/positioner.mjs
9043 +var import_element12 = __toESM(require_element(), 1);
9044 +var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
9045 +var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
9046 +function getRuntime3() {
9047 + const globalScope = globalThis;
9048 + if (globalScope.__wpStyleRuntime) {
9049 + return globalScope.__wpStyleRuntime;
9050 + }
9051 + globalScope.__wpStyleRuntime = {
9052 + documents: /* @__PURE__ */ new Map(),
9053 + styles: /* @__PURE__ */ new Map(),
9054 + injectedStyles: /* @__PURE__ */ new WeakMap()
9055 + };
9056 + if (typeof document !== "undefined") {
9057 + registerDocument3(document);
9058 + }
9059 + return globalScope.__wpStyleRuntime;
9060 +}
9061 +function documentContainsStyleHash3(targetDocument, hash) {
9062 + if (!targetDocument.head) {
9063 + return false;
9064 + }
9065 + for (const style of targetDocument.head.querySelectorAll(
9066 + `style[${STYLE_HASH_ATTRIBUTE3}]`
9067 + )) {
9068 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
9069 + return true;
9070 + }
9071 + }
9072 + return false;
9073 +}
9074 +function injectStyle3(targetDocument, hash, css) {
9075 + if (!targetDocument.head) {
9076 + return;
9077 + }
9078 + const runtime = getRuntime3();
9079 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9080 + if (!injectedStyles) {
9081 + injectedStyles = /* @__PURE__ */ new Set();
9082 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9083 + }
9084 + if (injectedStyles.has(hash)) {
9085 + return;
9086 + }
9087 + if (documentContainsStyleHash3(targetDocument, hash)) {
9088 + injectedStyles.add(hash);
9089 + return;
9090 + }
9091 + const style = targetDocument.createElement("style");
9092 + style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
9093 + style.appendChild(targetDocument.createTextNode(css));
9094 + targetDocument.head.appendChild(style);
9095 + injectedStyles.add(hash);
9096 +}
9097 +function registerDocument3(targetDocument) {
9098 + const runtime = getRuntime3();
9099 + runtime.documents.set(
9100 + targetDocument,
9101 + (runtime.documents.get(targetDocument) ?? 0) + 1
9102 + );
9103 + for (const [hash, css] of runtime.styles) {
9104 + injectStyle3(targetDocument, hash, css);
9105 + }
9106 + return () => {
9107 + const count = runtime.documents.get(targetDocument);
9108 + if (count === void 0) {
9109 + return;
9110 + }
9111 + if (count <= 1) {
9112 + runtime.documents.delete(targetDocument);
9113 + return;
9114 + }
9115 + runtime.documents.set(targetDocument, count - 1);
9116 + };
9117 +}
9118 +function registerStyle3(hash, css) {
9119 + const runtime = getRuntime3();
9120 + runtime.styles.set(hash, css);
9121 + for (const targetDocument of runtime.documents.keys()) {
9122 + injectStyle3(targetDocument, hash, css);
9123 + }
9124 +}
9125 +if (typeof process === "undefined" || true) {
9126 + registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9127 +}
9128 +var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9129 +if (typeof process === "undefined" || true) {
9130 + registerStyle3("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);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-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
9131 +}
9132 +var style_default2 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9133 +var Positioner = (0, import_element12.forwardRef)(
9134 + function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
9135 + return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
9136 + index_parts_exports.Positioner,
9137 + {
9138 + ref,
9139 + align,
9140 + side,
9141 + sideOffset,
9142 + ...props,
9143 + className: clsx_default(
9144 + resets_default["box-sizing"],
9145 + style_default2.positioner,
9146 + className
9147 + )
9148 + }
9149 + );
9150 + }
9151 +);
9152 +
9153 +// packages/ui/build-module/utils/render-slot-with-children.mjs
9154 +var import_element13 = __toESM(require_element(), 1);
9155 +function renderSlotWithChildren(slot, defaultSlot, children) {
9156 + return (0, import_element13.cloneElement)(slot ?? defaultSlot, { children });
9157 +}
9158 +
9159 +// packages/ui/build-module/utils/theme-provider.mjs
9160 +var theme = __toESM(require_theme(), 1);
9161 +
9162 +// packages/ui/build-module/lock-unlock.mjs
9163 +var import_private_apis = __toESM(require_private_apis(), 1);
9164 +var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
9165 + "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
9166 + "@wordpress/ui"
9167 +);
9168 +
9169 +// packages/ui/build-module/utils/theme-provider.mjs
9170 +function getThemeProvider() {
9171 + const themePackage = theme;
9172 + if (themePackage.ThemeProvider) {
9173 + return themePackage.ThemeProvider;
9174 + }
9175 + if (!themePackage.privateApis) {
9176 + throw new Error(
9177 + "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
9178 + );
9179 + }
9180 + return unlock(
9181 + themePackage.privateApis
9182 + ).ThemeProvider;
9183 +}
9184 +var ThemeProvider = getThemeProvider();
9185 +
9186 +// packages/ui/build-module/tooltip/popup.mjs
9187 +var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
9188 +var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
9189 +function getRuntime4() {
9190 + const globalScope = globalThis;
9191 + if (globalScope.__wpStyleRuntime) {
9192 + return globalScope.__wpStyleRuntime;
9193 + }
9194 + globalScope.__wpStyleRuntime = {
9195 + documents: /* @__PURE__ */ new Map(),
9196 + styles: /* @__PURE__ */ new Map(),
9197 + injectedStyles: /* @__PURE__ */ new WeakMap()
9198 + };
9199 + if (typeof document !== "undefined") {
9200 + registerDocument4(document);
9201 + }
9202 + return globalScope.__wpStyleRuntime;
9203 +}
9204 +function documentContainsStyleHash4(targetDocument, hash) {
9205 + if (!targetDocument.head) {
9206 + return false;
9207 + }
9208 + for (const style of targetDocument.head.querySelectorAll(
9209 + `style[${STYLE_HASH_ATTRIBUTE4}]`
9210 + )) {
9211 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
9212 + return true;
9213 + }
9214 + }
9215 + return false;
9216 +}
9217 +function injectStyle4(targetDocument, hash, css) {
9218 + if (!targetDocument.head) {
9219 + return;
9220 + }
9221 + const runtime = getRuntime4();
9222 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9223 + if (!injectedStyles) {
9224 + injectedStyles = /* @__PURE__ */ new Set();
9225 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9226 + }
9227 + if (injectedStyles.has(hash)) {
9228 + return;
9229 + }
9230 + if (documentContainsStyleHash4(targetDocument, hash)) {
9231 + injectedStyles.add(hash);
9232 + return;
9233 + }
9234 + const style = targetDocument.createElement("style");
9235 + style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
9236 + style.appendChild(targetDocument.createTextNode(css));
9237 + targetDocument.head.appendChild(style);
9238 + injectedStyles.add(hash);
9239 +}
9240 +function registerDocument4(targetDocument) {
9241 + const runtime = getRuntime4();
9242 + runtime.documents.set(
9243 + targetDocument,
9244 + (runtime.documents.get(targetDocument) ?? 0) + 1
9245 + );
9246 + for (const [hash, css] of runtime.styles) {
9247 + injectStyle4(targetDocument, hash, css);
9248 + }
9249 + return () => {
9250 + const count = runtime.documents.get(targetDocument);
9251 + if (count === void 0) {
9252 + return;
9253 + }
9254 + if (count <= 1) {
9255 + runtime.documents.delete(targetDocument);
9256 + return;
9257 + }
9258 + runtime.documents.set(targetDocument, count - 1);
9259 + };
9260 +}
9261 +function registerStyle4(hash, css) {
9262 + const runtime = getRuntime4();
9263 + runtime.styles.set(hash, css);
9264 + for (const targetDocument of runtime.documents.keys()) {
9265 + injectStyle4(targetDocument, hash, css);
9266 + }
9267 +}
9268 +if (typeof process === "undefined" || true) {
9269 + registerStyle4("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);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-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
9270 +}
9271 +var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9272 +var POPUP_COLOR = { background: "#1e1e1e" };
9273 +var Popup = (0, import_element14.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
9274 + const popupContent = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9275 + index_parts_exports.Popup,
9276 + {
9277 + ref,
9278 + className: clsx_default(style_default3.popup, className),
9279 + ...props,
9280 + children
9281 + }
9282 + ) });
9283 + const positionedPopup = renderSlotWithChildren(
9284 + positioner,
9285 + /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Positioner, {}),
9286 + popupContent
9287 + );
9288 + return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Portal, {}), positionedPopup);
9289 +});
9290 +
9291 +// packages/ui/build-module/tooltip/trigger.mjs
9292 +var import_element15 = __toESM(require_element(), 1);
9293 +var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
9294 +var Trigger = (0, import_element15.forwardRef)(
9295 + function TooltipTrigger3(props, ref) {
9296 + return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(index_parts_exports.Trigger, { ref, ...props });
9297 + }
9298 +);
9299 +
9300 +// packages/ui/build-module/utils/direction-provider.mjs
9301 +var import_i18n = __toESM(require_i18n(), 1);
9302 +var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
9303 +function DirectionProvider3({ children }) {
9304 + return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DirectionProvider, { direction: (0, import_i18n.isRTL)() ? "rtl" : "ltr", children });
9305 +}
9306 +
9307 +// packages/ui/build-module/tooltip/root.mjs
9308 +var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
9309 +function Root(props) {
9310 + return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(index_parts_exports.Root, { ...props }) });
9311 +}
9312 +
9313 +// packages/ui/build-module/tooltip/provider.mjs
9314 +var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
9315 +function Provider({ ...props }) {
9316 + return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(index_parts_exports.Provider, { ...props });
9317 +}
9318 +
9319 +// packages/ui/build-module/link/link.mjs
9320 +var import_element16 = __toESM(require_element(), 1);
9321 +var import_i18n2 = __toESM(require_i18n(), 1);
9322 +var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
9323 +var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
9324 +function getRuntime5() {
9325 + const globalScope = globalThis;
9326 + if (globalScope.__wpStyleRuntime) {
9327 + return globalScope.__wpStyleRuntime;
9328 + }
9329 + globalScope.__wpStyleRuntime = {
9330 + documents: /* @__PURE__ */ new Map(),
9331 + styles: /* @__PURE__ */ new Map(),
9332 + injectedStyles: /* @__PURE__ */ new WeakMap()
9333 + };
9334 + if (typeof document !== "undefined") {
9335 + registerDocument5(document);
9336 + }
9337 + return globalScope.__wpStyleRuntime;
9338 +}
9339 +function documentContainsStyleHash5(targetDocument, hash) {
9340 + if (!targetDocument.head) {
9341 + return false;
9342 + }
9343 + for (const style of targetDocument.head.querySelectorAll(
9344 + `style[${STYLE_HASH_ATTRIBUTE5}]`
9345 + )) {
9346 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
9347 + return true;
9348 + }
9349 + }
9350 + return false;
9351 +}
9352 +function injectStyle5(targetDocument, hash, css) {
9353 + if (!targetDocument.head) {
9354 + return;
9355 + }
9356 + const runtime = getRuntime5();
9357 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9358 + if (!injectedStyles) {
9359 + injectedStyles = /* @__PURE__ */ new Set();
9360 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9361 + }
9362 + if (injectedStyles.has(hash)) {
9363 + return;
9364 + }
9365 + if (documentContainsStyleHash5(targetDocument, hash)) {
9366 + injectedStyles.add(hash);
9367 + return;
9368 + }
9369 + const style = targetDocument.createElement("style");
9370 + style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
9371 + style.appendChild(targetDocument.createTextNode(css));
9372 + targetDocument.head.appendChild(style);
9373 + injectedStyles.add(hash);
9374 +}
9375 +function registerDocument5(targetDocument) {
9376 + const runtime = getRuntime5();
9377 + runtime.documents.set(
9378 + targetDocument,
9379 + (runtime.documents.get(targetDocument) ?? 0) + 1
9380 + );
9381 + for (const [hash, css] of runtime.styles) {
9382 + injectStyle5(targetDocument, hash, css);
9383 + }
9384 + return () => {
9385 + const count = runtime.documents.get(targetDocument);
9386 + if (count === void 0) {
9387 + return;
9388 + }
9389 + if (count <= 1) {
9390 + runtime.documents.delete(targetDocument);
9391 + return;
9392 + }
9393 + runtime.documents.set(targetDocument, count - 1);
9394 + };
9395 +}
9396 +function registerStyle5(hash, css) {
9397 + const runtime = getRuntime5();
9398 + runtime.styles.set(hash, css);
9399 + for (const targetDocument of runtime.documents.keys()) {
9400 + injectStyle5(targetDocument, hash, css);
9401 + }
9402 +}
9403 +if (typeof process === "undefined" || true) {
9404 + registerStyle5("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9405 +}
9406 +var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9407 +if (typeof process === "undefined" || true) {
9408 + registerStyle5("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))}}}");
9409 +}
9410 +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" };
9411 +if (typeof process === "undefined" || true) {
9412 + registerStyle5("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"}}}');
9413 +}
9414 +var style_default4 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
9415 +if (typeof process === "undefined" || true) {
9416 + registerStyle5("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)}");
9417 +}
9418 +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" };
9419 +var Link = (0, import_element16.forwardRef)(function Link2({
9420 + children,
9421 + variant = "default",
9422 + tone = "brand",
9423 + openInNewTab = false,
9424 + target,
9425 + render,
9426 + className,
9427 + ...props
9428 +}, ref) {
9429 + const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
9430 + const element = useRender({
9431 + render,
9432 + defaultTagName: "a",
9433 + ref,
9434 + props: mergeProps(props, {
9435 + className: clsx_default(
9436 + global_css_defense_default2.a,
9437 + resets_default2["box-sizing"],
9438 + focus_module_default["outset-ring--focus-except-active"],
9439 + variant !== "unstyled" && style_default4.link,
9440 + variant !== "unstyled" && style_default4[`is-${tone}`],
9441 + variant === "unstyled" && style_default4["is-unstyled"],
9442 + className
9443 + ),
9444 + target: target ?? (openInNewTab ? "_blank" : void 0),
9445 + children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
9446 + children,
9447 + shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9448 + "span",
9449 + {
9450 + className: style_default4["link-icon"],
9451 + role: "img",
9452 + "aria-label": (
9453 + /* translators: accessibility text appended to link text */
9454 + (0, import_i18n2.__)("(opens in a new tab)")
9455 + )
9456 + }
9457 + )
9458 + ] })
9459 + })
9460 + });
9461 + return element;
9462 +});
9463 +
9464 +// packages/icons/build-module/icon/index.mjs
9465 +var import_element17 = __toESM(require_element(), 1);
9466 +var icon_default = (0, import_element17.forwardRef)(
9467 + ({ icon, size: size4 = 24, style, ...props }, ref) => {
9468 + const intrinsicStyle = icon.props.style;
9469 + const mergedStyle = intrinsicStyle || style ? { ...intrinsicStyle, ...style } : void 0;
9470 + return (0, import_element17.cloneElement)(icon, {
9471 + width: size4,
9472 + height: size4,
9473 + ...props,
9474 + // Merge styles so the icon's intrinsic style (e.g. `fill: none` on
9475 + // stroke-based icons) is preserved unless the consumer overrides
9476 + // the same property explicitly.
9477 + ...mergedStyle ? { style: mergedStyle } : {},
9478 + ref
9479 + });
9480 + }
9481 +);
9482 +
9483 +// packages/icons/build-module/library/backup.mjs
9484 +var import_primitives = __toESM(require_primitives(), 1);
9485 +var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
9486 +var backup_default = /* @__PURE__ */ (0, import_jsx_runtime20.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_runtime20.jsx)(import_primitives.Path, { d: "M7.59201 17.7565C8.8135 18.6933 10.3417 19.25 12 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.99593 4.75 12L4.75 14M14.75 14.75L12.25 12.25L12.25 8M2 12L4.75 14L7.5 12", vectorEffect: "non-scaling-stroke" }) });
9487 +
9488 +// packages/icons/build-module/library/seen.mjs
9489 +var import_primitives2 = __toESM(require_primitives(), 1);
9490 +var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9491 +var seen_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
9492 + /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives2.Path, { d: "M20.0645 13C18.5918 10.0366 15.5337 8 12 8C8.46631 8 5.40825 10.0366 3.93555 13", vectorEffect: "non-scaling-stroke" }),
9493 + /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives2.Circle, { cx: "12", cy: "12.5", r: "3", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
9494 +] });
9495 +
9496 +// packages/ui/build-module/visually-hidden/visually-hidden.mjs
9497 +var import_element18 = __toESM(require_element(), 1);
9498 +var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
9499 +function getRuntime6() {
9500 + const globalScope = globalThis;
9501 + if (globalScope.__wpStyleRuntime) {
9502 + return globalScope.__wpStyleRuntime;
9503 + }
9504 + globalScope.__wpStyleRuntime = {
9505 + documents: /* @__PURE__ */ new Map(),
9506 + styles: /* @__PURE__ */ new Map(),
9507 + injectedStyles: /* @__PURE__ */ new WeakMap()
9508 + };
9509 + if (typeof document !== "undefined") {
9510 + registerDocument6(document);
9511 + }
9512 + return globalScope.__wpStyleRuntime;
9513 +}
9514 +function documentContainsStyleHash6(targetDocument, hash) {
9515 + if (!targetDocument.head) {
9516 + return false;
9517 + }
9518 + for (const style of targetDocument.head.querySelectorAll(
9519 + `style[${STYLE_HASH_ATTRIBUTE6}]`
9520 + )) {
9521 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
9522 + return true;
9523 + }
9524 + }
9525 + return false;
9526 +}
9527 +function injectStyle6(targetDocument, hash, css) {
9528 + if (!targetDocument.head) {
9529 + return;
9530 + }
9531 + const runtime = getRuntime6();
9532 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9533 + if (!injectedStyles) {
9534 + injectedStyles = /* @__PURE__ */ new Set();
9535 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9536 + }
9537 + if (injectedStyles.has(hash)) {
9538 + return;
9539 + }
9540 + if (documentContainsStyleHash6(targetDocument, hash)) {
9541 + injectedStyles.add(hash);
9542 + return;
9543 + }
9544 + const style = targetDocument.createElement("style");
9545 + style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
9546 + style.appendChild(targetDocument.createTextNode(css));
9547 + targetDocument.head.appendChild(style);
9548 + injectedStyles.add(hash);
9549 +}
9550 +function registerDocument6(targetDocument) {
9551 + const runtime = getRuntime6();
9552 + runtime.documents.set(
9553 + targetDocument,
9554 + (runtime.documents.get(targetDocument) ?? 0) + 1
9555 + );
9556 + for (const [hash, css] of runtime.styles) {
9557 + injectStyle6(targetDocument, hash, css);
9558 + }
9559 + return () => {
9560 + const count = runtime.documents.get(targetDocument);
9561 + if (count === void 0) {
9562 + return;
9563 + }
9564 + if (count <= 1) {
9565 + runtime.documents.delete(targetDocument);
9566 + return;
9567 + }
9568 + runtime.documents.set(targetDocument, count - 1);
9569 + };
9570 +}
9571 +function registerStyle6(hash, css) {
9572 + const runtime = getRuntime6();
9573 + runtime.styles.set(hash, css);
9574 + for (const targetDocument of runtime.documents.keys()) {
9575 + injectStyle6(targetDocument, hash, css);
9576 + }
9577 +}
9578 +if (typeof process === "undefined" || true) {
9579 + registerStyle6("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}}}");
9580 +}
9581 +var style_default5 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
9582 +var VisuallyHidden = (0, import_element18.forwardRef)(
9583 + function VisuallyHidden2({ render, ...restProps }, ref) {
9584 + const element = useRender({
9585 + render,
9586 + ref,
9587 + props: mergeProps(
9588 + { className: style_default5["visually-hidden"] },
9589 + restProps,
9590 + {
9591 + // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
9592 + "data-visually-hidden": ""
9593 + }
9594 + )
9595 + });
9596 + return element;
9597 + }
9598 +);
9599 +
9600 +// packages/ui/build-module/stack/stack.mjs
9601 +var import_element19 = __toESM(require_element(), 1);
9602 +var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
9603 +function getRuntime7() {
9604 + const globalScope = globalThis;
9605 + if (globalScope.__wpStyleRuntime) {
9606 + return globalScope.__wpStyleRuntime;
9607 + }
9608 + globalScope.__wpStyleRuntime = {
9609 + documents: /* @__PURE__ */ new Map(),
9610 + styles: /* @__PURE__ */ new Map(),
9611 + injectedStyles: /* @__PURE__ */ new WeakMap()
9612 + };
9613 + if (typeof document !== "undefined") {
9614 + registerDocument7(document);
9615 + }
9616 + return globalScope.__wpStyleRuntime;
9617 +}
9618 +function documentContainsStyleHash7(targetDocument, hash) {
9619 + if (!targetDocument.head) {
9620 + return false;
9621 + }
9622 + for (const style of targetDocument.head.querySelectorAll(
9623 + `style[${STYLE_HASH_ATTRIBUTE7}]`
9624 + )) {
9625 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
9626 + return true;
9627 + }
9628 + }
9629 + return false;
9630 +}
9631 +function injectStyle7(targetDocument, hash, css) {
9632 + if (!targetDocument.head) {
9633 + return;
9634 + }
9635 + const runtime = getRuntime7();
9636 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9637 + if (!injectedStyles) {
9638 + injectedStyles = /* @__PURE__ */ new Set();
9639 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9640 + }
9641 + if (injectedStyles.has(hash)) {
9642 + return;
9643 + }
9644 + if (documentContainsStyleHash7(targetDocument, hash)) {
9645 + injectedStyles.add(hash);
9646 + return;
9647 + }
9648 + const style = targetDocument.createElement("style");
9649 + style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
9650 + style.appendChild(targetDocument.createTextNode(css));
9651 + targetDocument.head.appendChild(style);
9652 + injectedStyles.add(hash);
9653 +}
9654 +function registerDocument7(targetDocument) {
9655 + const runtime = getRuntime7();
9656 + runtime.documents.set(
9657 + targetDocument,
9658 + (runtime.documents.get(targetDocument) ?? 0) + 1
9659 + );
9660 + for (const [hash, css] of runtime.styles) {
9661 + injectStyle7(targetDocument, hash, css);
9662 + }
9663 + return () => {
9664 + const count = runtime.documents.get(targetDocument);
9665 + if (count === void 0) {
9666 + return;
9667 + }
9668 + if (count <= 1) {
9669 + runtime.documents.delete(targetDocument);
9670 + return;
9671 + }
9672 + runtime.documents.set(targetDocument, count - 1);
9673 + };
9674 +}
9675 +function registerStyle7(hash, css) {
9676 + const runtime = getRuntime7();
9677 + runtime.styles.set(hash, css);
9678 + for (const targetDocument of runtime.documents.keys()) {
9679 + injectStyle7(targetDocument, hash, css);
9680 + }
9681 +}
9682 +if (typeof process === "undefined" || true) {
9683 + registerStyle7("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
9684 +}
9685 +var style_default6 = { "stack": "_19ce0419607e1896__stack" };
790 9686 var gapTokens = {
791 9687 xs: "var(--wpds-dimension-gap-xs, 4px)",
792 9688 sm: "var(--wpds-dimension-gap-sm, 8px)",
793 9689 md: "var(--wpds-dimension-gap-md, 12px)",
@@ -795,9 +9691,9 @@
795 9691 xl: "var(--wpds-dimension-gap-xl, 24px)",
796 9692 "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
797 9693 "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
798 9694 };
799 -var Stack = (0, import_element2.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
9695 +var Stack = (0, import_element19.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
800 9696 const style = {
801 9697 gap: gap && gapTokens[gap],
802 9698 alignItems: align,
803 9699 justifyContent: justify,
@@ -806,19 +9702,131 @@
806 9702 };
807 9703 const element = useRender({
808 9704 render,
809 9705 ref,
810 - props: mergeProps(props, { style, className: style_default2.stack })
9706 + props: mergeProps(props, { style, className: style_default6.stack })
811 9707 });
812 9708 return element;
813 9709 });
814 9710
9711 +// packages/ui/build-module/skeleton/skeleton.mjs
9712 +var import_element20 = __toESM(require_element(), 1);
9713 +var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
9714 +function getRuntime8() {
9715 + const globalScope = globalThis;
9716 + if (globalScope.__wpStyleRuntime) {
9717 + return globalScope.__wpStyleRuntime;
9718 + }
9719 + globalScope.__wpStyleRuntime = {
9720 + documents: /* @__PURE__ */ new Map(),
9721 + styles: /* @__PURE__ */ new Map(),
9722 + injectedStyles: /* @__PURE__ */ new WeakMap()
9723 + };
9724 + if (typeof document !== "undefined") {
9725 + registerDocument8(document);
9726 + }
9727 + return globalScope.__wpStyleRuntime;
9728 +}
9729 +function documentContainsStyleHash8(targetDocument, hash) {
9730 + if (!targetDocument.head) {
9731 + return false;
9732 + }
9733 + for (const style of targetDocument.head.querySelectorAll(
9734 + `style[${STYLE_HASH_ATTRIBUTE8}]`
9735 + )) {
9736 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
9737 + return true;
9738 + }
9739 + }
9740 + return false;
9741 +}
9742 +function injectStyle8(targetDocument, hash, css) {
9743 + if (!targetDocument.head) {
9744 + return;
9745 + }
9746 + const runtime = getRuntime8();
9747 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9748 + if (!injectedStyles) {
9749 + injectedStyles = /* @__PURE__ */ new Set();
9750 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9751 + }
9752 + if (injectedStyles.has(hash)) {
9753 + return;
9754 + }
9755 + if (documentContainsStyleHash8(targetDocument, hash)) {
9756 + injectedStyles.add(hash);
9757 + return;
9758 + }
9759 + const style = targetDocument.createElement("style");
9760 + style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
9761 + style.appendChild(targetDocument.createTextNode(css));
9762 + targetDocument.head.appendChild(style);
9763 + injectedStyles.add(hash);
9764 +}
9765 +function registerDocument8(targetDocument) {
9766 + const runtime = getRuntime8();
9767 + runtime.documents.set(
9768 + targetDocument,
9769 + (runtime.documents.get(targetDocument) ?? 0) + 1
9770 + );
9771 + for (const [hash, css] of runtime.styles) {
9772 + injectStyle8(targetDocument, hash, css);
9773 + }
9774 + return () => {
9775 + const count = runtime.documents.get(targetDocument);
9776 + if (count === void 0) {
9777 + return;
9778 + }
9779 + if (count <= 1) {
9780 + runtime.documents.delete(targetDocument);
9781 + return;
9782 + }
9783 + runtime.documents.set(targetDocument, count - 1);
9784 + };
9785 +}
9786 +function registerStyle8(hash, css) {
9787 + const runtime = getRuntime8();
9788 + runtime.styles.set(hash, css);
9789 + for (const targetDocument of runtime.documents.keys()) {
9790 + injectStyle8(targetDocument, hash, css);
9791 + }
9792 +}
9793 +if (typeof process === "undefined" || true) {
9794 + registerStyle8("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9795 +}
9796 +var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9797 +if (typeof process === "undefined" || true) {
9798 + registerStyle8("ed2c39ec90", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.b20cc1690085c2f0__skeleton{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);display:block;@media (forced-colors:active){border:var(--wpds-border-width-xs,1px) solid CanvasText}}._9b143194fdb45f93__pulse{@media not (prefers-reduced-motion){animation:e2b9fe0690281bc8__skeleton-pulse 1.5s ease-in-out infinite}}@keyframes e2b9fe0690281bc8__skeleton-pulse{0%,to{opacity:1}50%{opacity:.4}}}}");
9799 +}
9800 +var style_default7 = { "skeleton": "b20cc1690085c2f0__skeleton", "pulse": "_9b143194fdb45f93__pulse", "skeleton-pulse": "e2b9fe0690281bc8__skeleton-pulse" };
9801 +var Skeleton = (0, import_element20.forwardRef)(
9802 + function Skeleton2({ render, ...props }, ref) {
9803 + return useRender({
9804 + render,
9805 + ref,
9806 + props: mergeProps(
9807 + {
9808 + className: clsx_default(
9809 + style_default7.skeleton,
9810 + style_default7.pulse,
9811 + resets_default3["box-sizing"]
9812 + ),
9813 + // Decorative by default; consumers mark the loading
9814 + // region with aria-busy / role="status".
9815 + "aria-hidden": true
9816 + },
9817 + props
9818 + )
9819 + });
9820 + }
9821 +);
9822 +
815 9823 // packages/admin-ui/build-module/navigable-region/index.mjs
816 -var import_element3 = __toESM(require_element(), 1);
817 -var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
818 -var NavigableRegion = (0, import_element3.forwardRef)(
9824 +var import_element21 = __toESM(require_element(), 1);
9825 +var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9826 +var NavigableRegion = (0, import_element21.forwardRef)(
819 9827 ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
820 - return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
9828 + return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
821 9829 Tag,
822 9830 {
823 9831 ref,
824 9832 className: clsx_default("admin-ui-navigable-region", className),
@@ -833,16 +9841,161 @@
833 9841 );
834 9842 NavigableRegion.displayName = "NavigableRegion";
835 9843 var navigable_region_default = NavigableRegion;
836 9844
9845 +// packages/admin-ui/build-module/navigation/index.mjs
9846 +var import_i18n3 = __toESM(require_i18n(), 1);
9847 +var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
9848 +var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
9849 +function getRuntime9() {
9850 + const globalScope = globalThis;
9851 + if (globalScope.__wpStyleRuntime) {
9852 + return globalScope.__wpStyleRuntime;
9853 + }
9854 + globalScope.__wpStyleRuntime = {
9855 + documents: /* @__PURE__ */ new Map(),
9856 + styles: /* @__PURE__ */ new Map(),
9857 + injectedStyles: /* @__PURE__ */ new WeakMap()
9858 + };
9859 + if (typeof document !== "undefined") {
9860 + registerDocument9(document);
9861 + }
9862 + return globalScope.__wpStyleRuntime;
9863 +}
9864 +function documentContainsStyleHash9(targetDocument, hash) {
9865 + if (!targetDocument.head) {
9866 + return false;
9867 + }
9868 + for (const style of targetDocument.head.querySelectorAll(
9869 + `style[${STYLE_HASH_ATTRIBUTE9}]`
9870 + )) {
9871 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
9872 + return true;
9873 + }
9874 + }
9875 + return false;
9876 +}
9877 +function injectStyle9(targetDocument, hash, css) {
9878 + if (!targetDocument.head) {
9879 + return;
9880 + }
9881 + const runtime = getRuntime9();
9882 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
9883 + if (!injectedStyles) {
9884 + injectedStyles = /* @__PURE__ */ new Set();
9885 + runtime.injectedStyles.set(targetDocument, injectedStyles);
9886 + }
9887 + if (injectedStyles.has(hash)) {
9888 + return;
9889 + }
9890 + if (documentContainsStyleHash9(targetDocument, hash)) {
9891 + injectedStyles.add(hash);
9892 + return;
9893 + }
9894 + const style = targetDocument.createElement("style");
9895 + style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
9896 + style.appendChild(targetDocument.createTextNode(css));
9897 + targetDocument.head.appendChild(style);
9898 + injectedStyles.add(hash);
9899 +}
9900 +function registerDocument9(targetDocument) {
9901 + const runtime = getRuntime9();
9902 + runtime.documents.set(
9903 + targetDocument,
9904 + (runtime.documents.get(targetDocument) ?? 0) + 1
9905 + );
9906 + for (const [hash, css] of runtime.styles) {
9907 + injectStyle9(targetDocument, hash, css);
9908 + }
9909 + return () => {
9910 + const count = runtime.documents.get(targetDocument);
9911 + if (count === void 0) {
9912 + return;
9913 + }
9914 + if (count <= 1) {
9915 + runtime.documents.delete(targetDocument);
9916 + return;
9917 + }
9918 + runtime.documents.set(targetDocument, count - 1);
9919 + };
9920 +}
9921 +function registerStyle9(hash, css) {
9922 + const runtime = getRuntime9();
9923 + runtime.styles.set(hash, css);
9924 + for (const targetDocument of runtime.documents.keys()) {
9925 + injectStyle9(targetDocument, hash, css);
9926 + }
9927 +}
9928 +if (typeof process === "undefined" || true) {
9929 + registerStyle9("72ef022400", ".bfb5a2dd8cceebd3__list{--focus-ring-size:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*2);list-style:none;margin:calc(var(--focus-ring-size)*-1);overflow-x:auto;padding:var(--focus-ring-size);scroll-padding:var(--focus-ring-size)}.a4759b4cb2c8bd92__li{flex-shrink:0}._07da506d3f2d9afe__item{align-items:center;color:var(--wpds-color-foreground-interactive-neutral-weak,#707070);display:flex;font-weight:var(--wpds-typography-font-weight-default,400);min-block-size:44px;min-inline-size:44px;text-decoration:none}._07da506d3f2d9afe__item:hover,._07da506d3f2d9afe__item[aria-current=page]{color:var(--wpds-color-foreground-interactive-neutral-weak-active,#1e1e1e)}._07da506d3f2d9afe__item[aria-current=page]{font-weight:var(--wpds-typography-font-weight-emphasis,600)}");
9930 +}
9931 +var style_default8 = { "list": "bfb5a2dd8cceebd3__list", "li": "a4759b4cb2c8bd92__li", "item": "_07da506d3f2d9afe__item" };
9932 +var Navigation = ({
9933 + items,
9934 + currentHref,
9935 + ariaLabel = (0, import_i18n3.__)("Sections"),
9936 + linkComponent,
9937 + className
9938 +}) => {
9939 + if (!items.length) {
9940 + return null;
9941 + }
9942 + const LinkComponent = linkComponent ?? "a";
9943 + if (true) {
9944 + const invalidItem = items.find(
9945 + (item) => typeof item.href !== "string"
9946 + );
9947 + if (invalidItem) {
9948 + throw new Error(
9949 + `Navigation: item "${invalidItem.label}" is missing an \`href\` prop.`
9950 + );
9951 + }
9952 + const duplicate = items.find(
9953 + (item, index2) => items.findIndex((other) => other.href === item.href) !== index2
9954 + );
9955 + if (duplicate) {
9956 + throw new Error(
9957 + `Navigation: duplicate \`href\` "${duplicate.href}". Each item must have a unique \`href\` so a single item receives \`aria-current="page"\`.`
9958 + );
9959 + }
9960 + }
9961 + return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("nav", { "aria-label": ariaLabel, className, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9962 + Stack,
9963 + {
9964 + render: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { role: "list" }),
9965 + direction: "row",
9966 + align: "center",
9967 + gap: "md",
9968 + className: style_default8.list,
9969 + children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("li", { className: style_default8.li, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9970 + Text,
9971 + {
9972 + variant: "body-md",
9973 + className: style_default8.item,
9974 + render: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9975 + Link,
9976 + {
9977 + variant: "unstyled",
9978 + "aria-current": item.href === currentHref ? "page" : void 0,
9979 + render: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(LinkComponent, { href: item.href })
9980 + }
9981 + ),
9982 + children: item.label
9983 + }
9984 + ) }, item.href))
9985 + }
9986 + ) });
9987 +};
9988 +var navigation_default = Navigation;
9989 +
837 9990 // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
838 9991 var import_components = __toESM(require_components(), 1);
839 9992 var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
840 9993
841 9994 // packages/admin-ui/build-module/page/header.mjs
842 -var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
843 -var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
844 -function getRuntime3() {
9995 +var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
9996 +var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
9997 +function getRuntime10() {
845 9998 const globalScope = globalThis;
846 9999 if (globalScope.__wpStyleRuntime) {
847 10000 return globalScope.__wpStyleRuntime;
848 10001 }
@@ -851,30 +10004,30 @@
851 10004 styles: /* @__PURE__ */ new Map(),
852 10005 injectedStyles: /* @__PURE__ */ new WeakMap()
853 10006 };
854 10007 if (typeof document !== "undefined") {
855 - registerDocument3(document);
10008 + registerDocument10(document);
856 10009 }
857 10010 return globalScope.__wpStyleRuntime;
858 10011 }
859 -function documentContainsStyleHash3(targetDocument, hash) {
10012 +function documentContainsStyleHash10(targetDocument, hash) {
860 10013 if (!targetDocument.head) {
861 10014 return false;
862 10015 }
863 10016 for (const style of targetDocument.head.querySelectorAll(
864 - `style[${STYLE_HASH_ATTRIBUTE3}]`
10017 + `style[${STYLE_HASH_ATTRIBUTE10}]`
865 10018 )) {
866 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
10019 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
867 10020 return true;
868 10021 }
869 10022 }
870 10023 return false;
871 10024 }
872 -function injectStyle3(targetDocument, hash, css) {
10025 +function injectStyle10(targetDocument, hash, css) {
873 10026 if (!targetDocument.head) {
874 10027 return;
875 10028 }
876 - const runtime = getRuntime3();
10029 + const runtime = getRuntime10();
877 10030 let injectedStyles = runtime.injectedStyles.get(targetDocument);
878 10031 if (!injectedStyles) {
879 10032 injectedStyles = /* @__PURE__ */ new Set();
880 10033 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -881,26 +10034,26 @@
881 10034 }
882 10035 if (injectedStyles.has(hash)) {
883 10036 return;
884 10037 }
885 - if (documentContainsStyleHash3(targetDocument, hash)) {
10038 + if (documentContainsStyleHash10(targetDocument, hash)) {
886 10039 injectedStyles.add(hash);
887 10040 return;
888 10041 }
889 10042 const style = targetDocument.createElement("style");
890 - style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
10043 + style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
891 10044 style.appendChild(targetDocument.createTextNode(css));
892 10045 targetDocument.head.appendChild(style);
893 10046 injectedStyles.add(hash);
894 10047 }
895 -function registerDocument3(targetDocument) {
896 - const runtime = getRuntime3();
10048 +function registerDocument10(targetDocument) {
10049 + const runtime = getRuntime10();
897 10050 runtime.documents.set(
898 10051 targetDocument,
899 10052 (runtime.documents.get(targetDocument) ?? 0) + 1
900 10053 );
901 10054 for (const [hash, css] of runtime.styles) {
902 - injectStyle3(targetDocument, hash, css);
10055 + injectStyle10(targetDocument, hash, css);
903 10056 }
904 10057 return () => {
905 10058 const count = runtime.documents.get(targetDocument);
906 10059 if (count === void 0) {
@@ -912,19 +10065,19 @@
912 10065 }
913 10066 runtime.documents.set(targetDocument, count - 1);
914 10067 };
915 10068 }
916 -function registerStyle3(hash, css) {
917 - const runtime = getRuntime3();
10069 +function registerStyle10(hash, css) {
10070 + const runtime = getRuntime10();
918 10071 runtime.styles.set(hash, css);
919 10072 for (const targetDocument of runtime.documents.keys()) {
920 - injectStyle3(targetDocument, hash, css);
10073 + injectStyle10(targetDocument, hash, css);
921 10074 }
922 10075 }
923 10076 if (typeof process === "undefined" || true) {
924 - registerStyle3("ddd9aab364", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
10077 + registerStyle10("1f3750277d", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8bcd33103b451f30__header-lockup{min-width:0}._8113be94e7caf73c__header-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation,._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation ._60fea2f6bf5319cd__header-subtitle{padding-block-end:0}._673c99dcbfb58211__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
925 10078 }
926 -var style_default3 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
10079 +var style_default9 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-lockup": "_8bcd33103b451f30__header-lockup", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "has-navigation": "_4b0f17e503d11619__has-navigation", "header-navigation": "_673c99dcbfb58211__header-navigation", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
927 10080 function Header({
928 10081 headingLevel = 1,
929 10082 breadcrumbs,
930 10083 badges,
@@ -931,77 +10084,108 @@
931 10084 visual,
932 10085 title,
933 10086 subTitle,
934 10087 actions,
10088 + navigation,
10089 + components,
935 10090 showSidebarToggle = true
936 10091 }) {
937 10092 const HeadingTag = `h${headingLevel}`;
938 - return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Stack, { direction: "column", className: style_default3.header, children: [
939 - /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
940 - Stack,
941 - {
942 - className: style_default3["header-content"],
943 - direction: "row",
944 - gap: "sm",
945 - justify: "space-between",
946 - children: [
947 - /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
948 - showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
949 - SidebarToggleSlot,
950 - {
951 - bubblesVirtually: true,
952 - className: style_default3["sidebar-toggle-slot"]
953 - }
954 - ),
955 - visual && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
956 - "div",
957 - {
958 - className: style_default3["header-visual"],
959 - "aria-hidden": "true",
960 - children: visual
961 - }
962 - ),
963 - title && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
964 - Text,
965 - {
966 - className: style_default3["header-title"],
967 - render: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HeadingTag, {}),
968 - variant: "heading-lg",
969 - children: title
970 - }
971 - ),
972 - breadcrumbs,
973 - badges
974 - ] }),
975 - actions && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
976 - Stack,
977 - {
978 - align: "center",
979 - className: style_default3["header-actions"],
980 - direction: "row",
981 - gap: "sm",
982 - children: actions
983 - }
984 - )
985 - ]
986 - }
987 - ),
988 - subTitle && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
989 - Text,
990 - {
991 - render: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", {}),
992 - variant: "body-md",
993 - className: style_default3["header-subtitle"],
994 - children: subTitle
995 - }
996 - )
997 - ] });
10093 + const hasNavigation = !!navigation?.items?.length;
10094 + return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10095 + Stack,
10096 + {
10097 + direction: "column",
10098 + className: clsx_default(
10099 + style_default9.header,
10100 + hasNavigation && style_default9["has-navigation"]
10101 + ),
10102 + children: [
10103 + /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10104 + Stack,
10105 + {
10106 + className: style_default9["header-content"],
10107 + direction: "row",
10108 + gap: "sm",
10109 + justify: "space-between",
10110 + children: [
10111 + /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10112 + Stack,
10113 + {
10114 + direction: "row",
10115 + gap: "sm",
10116 + align: "center",
10117 + justify: "start",
10118 + className: style_default9["header-lockup"],
10119 + children: [
10120 + showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10121 + SidebarToggleSlot,
10122 + {
10123 + bubblesVirtually: true,
10124 + className: style_default9["sidebar-toggle-slot"]
10125 + }
10126 + ),
10127 + visual && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10128 + "div",
10129 + {
10130 + className: style_default9["header-visual"],
10131 + "aria-hidden": "true",
10132 + children: visual
10133 + }
10134 + ),
10135 + title && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10136 + Text,
10137 + {
10138 + className: style_default9["header-title"],
10139 + render: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(HeadingTag, {}),
10140 + variant: "heading-lg",
10141 + children: title
10142 + }
10143 + ),
10144 + breadcrumbs,
10145 + badges
10146 + ]
10147 + }
10148 + ),
10149 + actions && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10150 + Stack,
10151 + {
10152 + align: "center",
10153 + className: style_default9["header-actions"],
10154 + direction: "row",
10155 + gap: "sm",
10156 + children: actions
10157 + }
10158 + )
10159 + ]
10160 + }
10161 + ),
10162 + subTitle && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10163 + Text,
10164 + {
10165 + render: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", {}),
10166 + variant: "body-md",
10167 + className: style_default9["header-subtitle"],
10168 + children: subTitle
10169 + }
10170 + ),
10171 + hasNavigation && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10172 + navigation_default,
10173 + {
10174 + ...navigation,
10175 + linkComponent: components?.link,
10176 + className: style_default9["header-navigation"]
10177 + }
10178 + )
10179 + ]
10180 + }
10181 + );
998 10182 }
999 10183
1000 10184 // packages/admin-ui/build-module/page/index.mjs
1001 -var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
1002 -var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
1003 -function getRuntime4() {
10185 +var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
10186 +var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
10187 +function getRuntime11() {
1004 10188 const globalScope = globalThis;
1005 10189 if (globalScope.__wpStyleRuntime) {
1006 10190 return globalScope.__wpStyleRuntime;
1007 10191 }
@@ -1010,30 +10194,30 @@
1010 10194 styles: /* @__PURE__ */ new Map(),
1011 10195 injectedStyles: /* @__PURE__ */ new WeakMap()
1012 10196 };
1013 10197 if (typeof document !== "undefined") {
1014 - registerDocument4(document);
10198 + registerDocument11(document);
1015 10199 }
1016 10200 return globalScope.__wpStyleRuntime;
1017 10201 }
1018 -function documentContainsStyleHash4(targetDocument, hash) {
10202 +function documentContainsStyleHash11(targetDocument, hash) {
1019 10203 if (!targetDocument.head) {
1020 10204 return false;
1021 10205 }
1022 10206 for (const style of targetDocument.head.querySelectorAll(
1023 - `style[${STYLE_HASH_ATTRIBUTE4}]`
10207 + `style[${STYLE_HASH_ATTRIBUTE11}]`
1024 10208 )) {
1025 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
10209 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
1026 10210 return true;
1027 10211 }
1028 10212 }
1029 10213 return false;
1030 10214 }
1031 -function injectStyle4(targetDocument, hash, css) {
10215 +function injectStyle11(targetDocument, hash, css) {
1032 10216 if (!targetDocument.head) {
1033 10217 return;
1034 10218 }
1035 - const runtime = getRuntime4();
10219 + const runtime = getRuntime11();
1036 10220 let injectedStyles = runtime.injectedStyles.get(targetDocument);
1037 10221 if (!injectedStyles) {
1038 10222 injectedStyles = /* @__PURE__ */ new Set();
1039 10223 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -1040,26 +10224,26 @@
1040 10224 }
1041 10225 if (injectedStyles.has(hash)) {
1042 10226 return;
1043 10227 }
1044 - if (documentContainsStyleHash4(targetDocument, hash)) {
10228 + if (documentContainsStyleHash11(targetDocument, hash)) {
1045 10229 injectedStyles.add(hash);
1046 10230 return;
1047 10231 }
1048 10232 const style = targetDocument.createElement("style");
1049 - style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
10233 + style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
1050 10234 style.appendChild(targetDocument.createTextNode(css));
1051 10235 targetDocument.head.appendChild(style);
1052 10236 injectedStyles.add(hash);
1053 10237 }
1054 -function registerDocument4(targetDocument) {
1055 - const runtime = getRuntime4();
10238 +function registerDocument11(targetDocument) {
10239 + const runtime = getRuntime11();
1056 10240 runtime.documents.set(
1057 10241 targetDocument,
1058 10242 (runtime.documents.get(targetDocument) ?? 0) + 1
1059 10243 );
1060 10244 for (const [hash, css] of runtime.styles) {
1061 - injectStyle4(targetDocument, hash, css);
10245 + injectStyle11(targetDocument, hash, css);
1062 10246 }
1063 10247 return () => {
1064 10248 const count = runtime.documents.get(targetDocument);
1065 10249 if (count === void 0) {
@@ -1071,19 +10255,19 @@
1071 10255 }
1072 10256 runtime.documents.set(targetDocument, count - 1);
1073 10257 };
1074 10258 }
1075 -function registerStyle4(hash, css) {
1076 - const runtime = getRuntime4();
10259 +function registerStyle11(hash, css) {
10260 + const runtime = getRuntime11();
1077 10261 runtime.styles.set(hash, css);
1078 10262 for (const targetDocument of runtime.documents.keys()) {
1079 - injectStyle4(targetDocument, hash, css);
10263 + injectStyle11(targetDocument, hash, css);
1080 10264 }
1081 10265 }
1082 10266 if (typeof process === "undefined" || true) {
1083 - registerStyle4("ddd9aab364", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
10267 + registerStyle11("1f3750277d", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8bcd33103b451f30__header-lockup{min-width:0}._8113be94e7caf73c__header-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation,._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation ._60fea2f6bf5319cd__header-subtitle{padding-block-end:0}._673c99dcbfb58211__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
1084 10268 }
1085 -var style_default4 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
10269 +var style_default10 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-lockup": "_8bcd33103b451f30__header-lockup", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "has-navigation": "_4b0f17e503d11619__has-navigation", "header-navigation": "_673c99dcbfb58211__header-navigation", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
1086 10270 function Page({
1087 10271 headingLevel,
1088 10272 breadcrumbs,
1089 10273 badges,
@@ -1092,16 +10276,18 @@
1092 10276 subTitle,
1093 10277 children,
1094 10278 className,
1095 10279 actions,
10280 + navigation,
10281 + components,
1096 10282 ariaLabel,
1097 10283 hasPadding = false,
1098 10284 showSidebarToggle = true
1099 10285 }) {
1100 - const classes = clsx_default(style_default4.page, className);
10286 + const classes = clsx_default(style_default10.page, className);
1101 10287 const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
1102 - return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
1103 - (title || breadcrumbs || badges || actions || visual) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
10288 + return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
10289 + (title || breadcrumbs || badges || actions || visual || !!navigation?.items?.length) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1104 10290 Header,
1105 10291 {
1106 10292 headingLevel,
1107 10293 breadcrumbs,
@@ -1109,17 +10295,19 @@
1109 10295 visual,
1110 10296 title,
1111 10297 subTitle,
1112 10298 actions,
10299 + navigation,
10300 + components,
1113 10301 showSidebarToggle
1114 10302 }
1115 10303 ),
1116 - hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
10304 + hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1117 10305 "div",
1118 10306 {
1119 10307 className: clsx_default(
1120 - style_default4.content,
1121 - style_default4["has-padding"]
10308 + style_default10.content,
10309 + style_default10["has-padding"]
1122 10310 ),
1123 10311 children
1124 10312 }
1125 10313 ) : children
@@ -1128,47 +10316,159 @@
1128 10316 Page.SidebarToggleFill = SidebarToggleFill;
1129 10317 var page_default = Page;
1130 10318
1131 10319 // routes/styles/stage.tsx
1132 -var import_i18n = __toESM(require_i18n());
10320 +var import_i18n6 = __toESM(require_i18n());
1133 10321 var import_editor = __toESM(require_editor());
1134 10322 var import_compose = __toESM(require_compose());
1135 10323 var import_data = __toESM(require_data());
1136 -var import_core_data = __toESM(require_core_data());
10324 +var import_core_data2 = __toESM(require_core_data());
1137 10325 var import_components2 = __toESM(require_components());
1138 -var import_element4 = __toESM(require_element());
10326 +var import_html_entities = __toESM(require_html_entities());
10327 +var import_element23 = __toESM(require_element());
1139 10328 import { useEditorSettings } from "@wordpress/lazy-editor";
1140 10329
1141 10330 // routes/lock-unlock/index.ts
1142 -var import_private_apis = __toESM(require_private_apis());
1143 -var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
10331 +var import_private_apis2 = __toESM(require_private_apis());
10332 +var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
1144 10333 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
1145 10334 "@wordpress/routes"
1146 10335 );
1147 10336
10337 +// routes/styles/activate-panel.tsx
10338 +var import_api_fetch = __toESM(require_api_fetch());
10339 +var import_core_data = __toESM(require_core_data());
10340 +var import_element22 = __toESM(require_element());
10341 +var import_i18n5 = __toESM(require_i18n());
10342 +var import_url2 = __toESM(require_url());
10343 +
10344 +// routes/styles/previewed-theme.ts
10345 +var import_i18n4 = __toESM(require_i18n());
10346 +var import_url = __toESM(require_url());
10347 +var previewedStylesheet = (() => {
10348 + const value = (0, import_url.getQueryArg)(window.location.href, "wp_theme_preview");
10349 + return typeof value === "string" ? value : "";
10350 +})();
10351 +function getPreviewedStylesheet() {
10352 + return previewedStylesheet;
10353 +}
10354 +function getPreviewTitle(themeName) {
10355 + return themeName ? (0, import_i18n4.sprintf)(
10356 + /* translators: %s: Theme name. */
10357 + (0, import_i18n4.__)("Previewing %s"),
10358 + themeName
10359 + ) : (0, import_i18n4.__)("Theme Preview");
10360 +}
10361 +
10362 +// routes/styles/activate-panel.tsx
10363 +var import_jsx_runtime26 = __toESM(require_jsx_runtime());
10364 +var { EntitiesSavedStatesExtensible, useEntitiesSavedStatesIsDirty } = unlock2(import_core_data.privateApis);
10365 +var ACTIVE_THEMES_URL = "/wp/v2/themes?status=active";
10366 +function useActualCurrentTheme() {
10367 + const [currentTheme, setCurrentTheme] = (0, import_element22.useState)();
10368 + (0, import_element22.useEffect)(() => {
10369 + const path = (0, import_url2.addQueryArgs)(ACTIVE_THEMES_URL, {
10370 + context: "edit",
10371 + wp_theme_preview: ""
10372 + });
10373 + (0, import_api_fetch.default)({ path }).then((activeThemes) => setCurrentTheme(activeThemes[0])).catch(() => {
10374 + });
10375 + }, []);
10376 + return currentTheme;
10377 +}
10378 +function activateTheme(stylesheet) {
10379 + window.location.href = (0, import_url2.addQueryArgs)("themes.php", {
10380 + action: "activate",
10381 + stylesheet,
10382 + _wpnonce: window.WP_BLOCK_THEME_ACTIVATE_NONCE
10383 + });
10384 +}
10385 +function ActivatePanel({
10386 + themeName,
10387 + onClose
10388 +}) {
10389 + const isDirtyProps = useEntitiesSavedStatesIsDirty();
10390 + let activateSaveLabel, successNoticeContent;
10391 + if (isDirtyProps.isDirty) {
10392 + activateSaveLabel = (0, import_i18n5.__)("Activate & Save");
10393 + successNoticeContent = (0, import_i18n5.__)("Theme activated and site updated.");
10394 + } else {
10395 + activateSaveLabel = (0, import_i18n5.__)("Activate");
10396 + successNoticeContent = (0, import_i18n5.__)("Theme activated.");
10397 + }
10398 + const currentTheme = useActualCurrentTheme();
10399 + const additionalPrompt = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { children: (0, import_i18n5.sprintf)(
10400 + /* translators: 1: The name of active theme, 2: The name of theme to be activated. */
10401 + (0, import_i18n5.__)(
10402 + "Saving your changes will change your active theme from %1$s to %2$s."
10403 + ),
10404 + currentTheme?.name?.rendered ?? "...",
10405 + themeName ?? "..."
10406 + ) });
10407 + return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10408 + EntitiesSavedStatesExtensible,
10409 + {
10410 + ...isDirtyProps,
10411 + additionalPrompt,
10412 + close: onClose,
10413 + onSave: () => activateTheme(getPreviewedStylesheet()),
10414 + saveEnabled: true,
10415 + saveLabel: activateSaveLabel,
10416 + variant: "inline",
10417 + successNoticeContent
10418 + }
10419 + );
10420 +}
10421 +
1148 10422 // routes/styles/style.scss
1149 -if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='1153641d9c']")) {
10423 +if (typeof document !== "undefined" && (typeof process === "undefined" || true) && !document.head.querySelector("style[data-wp-hash='f4ae13b25a']")) {
1150 10424 const style = document.createElement("style");
1151 - style.setAttribute("data-wp-hash", "1153641d9c");
1152 - style.appendChild(document.createTextNode(".routes-styles__page .global-styles-ui-screen-root{box-shadow:none}.routes-styles__page .global-styles-ui-screen-root>div>hr{display:none}.routes-styles__page .global-styles-ui-sidebar__navigator-provider .components-tools-panel{border-top:none}.routes-styles__page .global-styles-ui-sidebar__navigator-provider{overflow-y:auto;padding-inline:0}"));
10425 + style.setAttribute("data-wp-hash", "f4ae13b25a");
10426 + style.appendChild(document.createTextNode(".routes-styles__page .global-styles-ui-screen-root{box-shadow:none}.routes-styles__page .global-styles-ui-screen-root>div>hr{display:none}.routes-styles__page .global-styles-ui-sidebar__navigator-provider .components-tools-panel{border-top:none}.routes-styles__page .global-styles-ui-sidebar__navigator-provider{overflow-y:auto;padding-inline:0}.routes-styles__content{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);flex-grow:1;min-height:0}"));
1153 10427 document.head.appendChild(style);
1154 10428 }
1155 10429
1156 10430 // routes/styles/stage.tsx
1157 -var { GlobalStylesUIWrapper, GlobalStylesActionMenu } = unlock(import_editor.privateApis);
10431 +var import_jsx_runtime27 = __toESM(require_jsx_runtime());
10432 +var { GlobalStylesUIWrapper, GlobalStylesActionMenu } = unlock2(import_editor.privateApis);
1158 10433 function Stage() {
1159 10434 const navigate = useNavigate();
1160 10435 const search = useSearch({ strict: false });
1161 10436 const isMobileViewport = (0, import_compose.useViewportMatch)("medium", "<");
1162 - const globalStylesId = (0, import_data.useSelect)(
1163 - (select) => select(import_core_data.store).__experimentalGetCurrentGlobalStylesId(),
1164 - []
10437 + const isPreviewingTheme = !!getPreviewedStylesheet();
10438 + const [isActivatePanelOpen, setIsActivatePanelOpen] = (0, import_element23.useState)(false);
10439 + const { globalStylesId, hasRevisions, themeName } = (0, import_data.useSelect)(
10440 + (select) => {
10441 + const {
10442 + getCurrentTheme,
10443 + getEntityRecord,
10444 + __experimentalGetCurrentGlobalStylesId
10445 + } = select(import_core_data2.store);
10446 + const themeNameRendered = isPreviewingTheme ? getCurrentTheme()?.name?.rendered : void 0;
10447 + const _globalStylesId = __experimentalGetCurrentGlobalStylesId();
10448 + const globalStyles = _globalStylesId ? getEntityRecord("root", "globalStyles", _globalStylesId) : void 0;
10449 + return {
10450 + globalStylesId: _globalStylesId,
10451 + hasRevisions: !!globalStyles?._links?.["version-history"]?.[0]?.count,
10452 + themeName: themeNameRendered ? (0, import_html_entities.decodeEntities)(themeNameRendered) : void 0
10453 + };
10454 + },
10455 + [isPreviewingTheme]
1165 10456 );
1166 10457 const { editorSettings } = useEditorSettings({
1167 10458 stylesId: globalStylesId
1168 10459 });
1169 10460 const section = search.section ?? "/";
1170 - const [isStyleBookOpened, setIsStyleBookOpened] = (0, import_element4.useState)(
10461 + const areRevisionsOpened = section.startsWith("/revisions");
10462 + const { setStylesPath } = unlock2((0, import_data.useDispatch)(import_editor.store));
10463 + (0, import_element23.useEffect)(() => {
10464 + if (!areRevisionsOpened) {
10465 + return;
10466 + }
10467 + setStylesPath(section);
10468 + return () => setStylesPath("/");
10469 + }, [areRevisionsOpened, section, setStylesPath]);
10470 + const [isStyleBookOpened, setIsStyleBookOpened] = (0, import_element23.useState)(
1171 10471 search.preview === "stylebook"
1172 10472 );
1173 10473 const onChangeSection = (updatedSection) => {
1174 10474 navigate({
@@ -1177,65 +10477,13618 @@
1177 10477 section: updatedSection
1178 10478 }
1179 10479 });
1180 10480 };
1181 - return /* @__PURE__ */ React.createElement(
10481 + return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1182 10482 page_default,
1183 10483 {
1184 10484 headingLevel: 2,
1185 - actions: !isMobileViewport ? /* @__PURE__ */ React.createElement(import_components2.__experimentalHStack, null, /* @__PURE__ */ React.createElement(
1186 - import_components2.Button,
10485 + actions: !isMobileViewport || isPreviewingTheme ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_components2.__experimentalHStack, { children: [
10486 + !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
10487 + /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10488 + import_components2.Button,
10489 + {
10490 + size: "compact",
10491 + isPressed: isStyleBookOpened,
10492 + icon: seen_default,
10493 + label: (0, import_i18n6.__)("Style Book"),
10494 + onClick: () => {
10495 + const newIsStyleBookOpened = !isStyleBookOpened;
10496 + setIsStyleBookOpened(
10497 + newIsStyleBookOpened
10498 + );
10499 + navigate({
10500 + search: newIsStyleBookOpened ? {
10501 + ...search,
10502 + preview: "stylebook"
10503 + } : (() => {
10504 + const {
10505 + preview,
10506 + ...restSearch
10507 + } = search;
10508 + return restSearch;
10509 + })()
10510 + });
10511 + }
10512 + }
10513 + ),
10514 + /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10515 + import_components2.Button,
10516 + {
10517 + size: "compact",
10518 + isPressed: areRevisionsOpened,
10519 + icon: backup_default,
10520 + label: (0, import_i18n6.__)("Revisions"),
10521 + accessibleWhenDisabled: true,
10522 + disabled: !hasRevisions,
10523 + onClick: () => onChangeSection(
10524 + areRevisionsOpened ? "/" : "/revisions"
10525 + )
10526 + }
10527 + ),
10528 + /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10529 + GlobalStylesActionMenu,
10530 + {
10531 + hideWelcomeGuide: true,
10532 + onChangePath: onChangeSection
10533 + }
10534 + )
10535 + ] }),
10536 + isPreviewingTheme && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10537 + import_components2.Button,
10538 + {
10539 + size: "compact",
10540 + variant: "primary",
10541 + onClick: () => setIsActivatePanelOpen(true),
10542 + children: (0, import_i18n6.__)("Activate")
10543 + }
10544 + )
10545 + ] }) : null,
10546 + className: "routes-styles__page",
10547 + title: isPreviewingTheme ? getPreviewTitle(themeName) : (0, import_i18n6.__)("Styles"),
10548 + children: [
10549 + /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "routes-styles__content", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10550 + GlobalStylesUIWrapper,
10551 + {
10552 + path: section,
10553 + onPathChange: onChangeSection,
10554 + settings: editorSettings
10555 + }
10556 + ) }),
10557 + isActivatePanelOpen && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10558 + import_components2.Modal,
10559 + {
10560 + title: (0, import_i18n6.__)("Activate"),
10561 + onRequestClose: () => setIsActivatePanelOpen(false),
10562 + size: "small",
10563 + children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10564 + ActivatePanel,
10565 + {
10566 + themeName,
10567 + onClose: () => setIsActivatePanelOpen(false)
10568 + }
10569 + )
10570 + }
10571 + )
10572 + ]
10573 + }
10574 + );
10575 +}
10576 +var stage = Stage;
10577 +
10578 +// routes/styles/canvas.tsx
10579 +var import_editor2 = __toESM(require_editor());
10580 +var import_components57 = __toESM(require_components());
10581 +var import_data14 = __toESM(require_data());
10582 +var import_core_data14 = __toESM(require_core_data());
10583 +import { useNavigate as useNavigate2, useSearch as useSearch2 } from "@wordpress/route";
10584 +import { useEditorAssets, useEditorSettings as useEditorSettings2 } from "@wordpress/lazy-editor";
10585 +
10586 +// packages/global-styles-ui/build-module/global-styles-ui.mjs
10587 +var import_components56 = __toESM(require_components(), 1);
10588 +var import_blocks5 = __toESM(require_blocks(), 1);
10589 +var import_data13 = __toESM(require_data(), 1);
10590 +var import_block_editor14 = __toESM(require_block_editor(), 1);
10591 +var import_element57 = __toESM(require_element(), 1);
10592 +var import_compose8 = __toESM(require_compose(), 1);
10593 +
10594 +// packages/global-styles-engine/build-module/utils/object.mjs
10595 +function setImmutably(object, path, value) {
10596 + path = Array.isArray(path) ? [...path] : [path];
10597 + object = Array.isArray(object) ? [...object] : { ...object };
10598 + const leaf = path.pop();
10599 + let prev = object;
10600 + for (const key of path) {
10601 + const lvl = prev[key];
10602 + prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
10603 + }
10604 + prev[leaf] = value;
10605 + return object;
10606 +}
10607 +var getValueFromObjectPath = (object, path, defaultValue) => {
10608 + const arrayPath = Array.isArray(path) ? path : path.split(".");
10609 + let value = object;
10610 + arrayPath.forEach((fieldName) => {
10611 + value = value?.[fieldName];
10612 + });
10613 + return value ?? defaultValue;
10614 +};
10615 +
10616 +// packages/global-styles-engine/build-module/settings/get-setting.mjs
10617 +var VALID_SETTINGS = [
10618 + "appearanceTools",
10619 + "useRootPaddingAwareAlignments",
10620 + "background.backgroundImage",
10621 + "background.backgroundRepeat",
10622 + "background.backgroundSize",
10623 + "background.backgroundPosition",
10624 + "background.gradient",
10625 + "border.color",
10626 + "border.radius",
10627 + "border.radiusSizes",
10628 + "border.style",
10629 + "border.width",
10630 + "shadow.presets",
10631 + "shadow.defaultPresets",
10632 + "color.background",
10633 + "color.button",
10634 + "color.caption",
10635 + "color.custom",
10636 + "color.customDuotone",
10637 + "color.customGradient",
10638 + "color.defaultDuotone",
10639 + "color.defaultGradients",
10640 + "color.defaultPalette",
10641 + "color.duotone",
10642 + "color.gradients",
10643 + "color.heading",
10644 + "color.link",
10645 + "color.palette",
10646 + "color.text",
10647 + "custom",
10648 + "dimensions.aspectRatio",
10649 + "dimensions.height",
10650 + "dimensions.minHeight",
10651 + "dimensions.minWidth",
10652 + "dimensions.width",
10653 + "dimensions.dimensionSizes",
10654 + "layout.contentSize",
10655 + "layout.definitions",
10656 + "layout.wideSize",
10657 + "lightbox.enabled",
10658 + "lightbox.allowEditing",
10659 + "position.fixed",
10660 + "position.sticky",
10661 + "spacing.customSpacingSize",
10662 + "spacing.defaultSpacingSizes",
10663 + "spacing.spacingSizes",
10664 + "spacing.spacingScale",
10665 + "spacing.blockGap",
10666 + "spacing.margin",
10667 + "spacing.padding",
10668 + "spacing.units",
10669 + "typography.fluid",
10670 + "typography.customFontSize",
10671 + "typography.defaultFontSizes",
10672 + "typography.dropCap",
10673 + "typography.fontFamilies",
10674 + "typography.fontSizes",
10675 + "typography.fontStyle",
10676 + "typography.fontWeight",
10677 + "typography.letterSpacing",
10678 + "typography.lineHeight",
10679 + "typography.textAlign",
10680 + "typography.textColumns",
10681 + "typography.textDecoration",
10682 + "typography.textIndent",
10683 + "typography.textShadow",
10684 + "typography.defaultTextShadowPresets",
10685 + "typography.textShadowPresets",
10686 + "typography.textTransform",
10687 + "typography.writingMode",
10688 + "viewport.mobile",
10689 + "viewport.tablet"
10690 +];
10691 +function getSetting(globalStyles, path, blockName) {
10692 + const appendedBlockPath = blockName ? ".blocks." + blockName : "";
10693 + const appendedPropertyPath = path ? "." + path : "";
10694 + const contextualPath = `settings${appendedBlockPath}${appendedPropertyPath}`;
10695 + const globalPath = `settings${appendedPropertyPath}`;
10696 + if (path) {
10697 + return getValueFromObjectPath(globalStyles, contextualPath) ?? getValueFromObjectPath(globalStyles, globalPath);
10698 + }
10699 + let result = {};
10700 + VALID_SETTINGS.forEach((setting) => {
10701 + const value = getValueFromObjectPath(
10702 + globalStyles,
10703 + `settings${appendedBlockPath}.${setting}`
10704 + ) ?? getValueFromObjectPath(globalStyles, `settings.${setting}`);
10705 + if (value !== void 0) {
10706 + result = setImmutably(result, setting.split("."), value);
10707 + }
10708 + });
10709 + return result;
10710 +}
10711 +
10712 +// packages/global-styles-engine/build-module/settings/set-setting.mjs
10713 +function setSetting(globalStyles, path, newValue, blockName) {
10714 + const appendedBlockPath = blockName ? ".blocks." + blockName : "";
10715 + const appendedPropertyPath = path ? "." + path : "";
10716 + const finalPath = `settings${appendedBlockPath}${appendedPropertyPath}`;
10717 + return setImmutably(
10718 + globalStyles,
10719 + finalPath.split("."),
10720 + newValue
10721 + );
10722 +}
10723 +
10724 +// packages/global-styles-engine/build-module/utils/common.mjs
10725 +var import_style_engine = __toESM(require_style_engine(), 1);
10726 +
10727 +// packages/global-styles-engine/build-module/utils/fluid.mjs
10728 +var DEFAULT_MAXIMUM_VIEWPORT_WIDTH = "1600px";
10729 +var DEFAULT_MINIMUM_VIEWPORT_WIDTH = "320px";
10730 +var DEFAULT_SCALE_FACTOR = 1;
10731 +var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;
10732 +var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;
10733 +var DEFAULT_MINIMUM_FONT_SIZE_LIMIT = "14px";
10734 +function getComputedFluidTypographyValue({
10735 + minimumFontSize,
10736 + maximumFontSize,
10737 + fontSize,
10738 + minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,
10739 + maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,
10740 + scaleFactor = DEFAULT_SCALE_FACTOR,
10741 + minimumFontSizeLimit
10742 +}) {
10743 + minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT;
10744 + if (fontSize) {
10745 + const fontSizeParsed = getTypographyValueAndUnit(fontSize);
10746 + if (!fontSizeParsed?.unit || !fontSizeParsed?.value) {
10747 + return null;
10748 + }
10749 + const minimumFontSizeLimitParsed = getTypographyValueAndUnit(
10750 + minimumFontSizeLimit,
10751 + {
10752 + coerceTo: fontSizeParsed.unit
10753 + }
10754 + );
10755 + if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
10756 + if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
10757 + return null;
10758 + }
10759 + }
10760 + if (!maximumFontSize) {
10761 + maximumFontSize = `${fontSizeParsed.value}${fontSizeParsed.unit}`;
10762 + }
10763 + if (!minimumFontSize) {
10764 + const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16;
10765 + const minimumFontSizeFactor = Math.min(
10766 + Math.max(
10767 + 1 - 0.075 * Math.log2(fontSizeValueInPx),
10768 + DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN
10769 + ),
10770 + DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX
10771 + );
10772 + const calculatedMinimumFontSize = roundToPrecision(
10773 + fontSizeParsed.value * minimumFontSizeFactor,
10774 + 3
10775 + );
10776 + if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
10777 + minimumFontSize = `${minimumFontSizeLimitParsed.value}${minimumFontSizeLimitParsed.unit}`;
10778 + } else {
10779 + minimumFontSize = `${calculatedMinimumFontSize}${fontSizeParsed.unit}`;
10780 + }
10781 + }
10782 + }
10783 + const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize);
10784 + const fontSizeUnit = minimumFontSizeParsed?.unit || "rem";
10785 + const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, {
10786 + coerceTo: fontSizeUnit
10787 + });
10788 + if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
10789 + return null;
10790 + }
10791 + const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, {
10792 + coerceTo: "rem"
10793 + });
10794 + const maximumViewportWidthParsed = getTypographyValueAndUnit(
10795 + maximumViewportWidth,
10796 + { coerceTo: fontSizeUnit }
10797 + );
10798 + const minimumViewportWidthParsed = getTypographyValueAndUnit(
10799 + minimumViewportWidth,
10800 + { coerceTo: fontSizeUnit }
10801 + );
10802 + if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
10803 + return null;
10804 + }
10805 + const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value;
10806 + if (!linearDenominator) {
10807 + return null;
10808 + }
10809 + const minViewportWidthOffsetValue = roundToPrecision(
10810 + minimumViewportWidthParsed.value / 100,
10811 + 3
10812 + );
10813 + const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit;
10814 + const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator);
10815 + const linearFactorScaled = roundToPrecision(
10816 + (linearFactor || 1) * scaleFactor,
10817 + 3
10818 + );
10819 + const fluidTargetFontSize = `${minimumFontSizeRem.value}${minimumFontSizeRem.unit} + ((1vw - ${viewportWidthOffset}) * ${linearFactorScaled})`;
10820 + return `clamp(${minimumFontSize}, ${fluidTargetFontSize}, ${maximumFontSize})`;
10821 +}
10822 +function getTypographyValueAndUnit(rawValue, options = {}) {
10823 + if (typeof rawValue !== "string" && typeof rawValue !== "number") {
10824 + return null;
10825 + }
10826 + if (isFinite(rawValue)) {
10827 + rawValue = `${rawValue}px`;
10828 + }
10829 + const { coerceTo, rootSizeValue, acceptableUnits } = {
10830 + coerceTo: "",
10831 + // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`.
10832 + rootSizeValue: 16,
10833 + acceptableUnits: ["rem", "px", "em"],
10834 + ...options
10835 + };
10836 + const acceptableUnitsGroup = acceptableUnits?.join("|");
10837 + const regexUnits = new RegExp(
10838 + `^(\\d*\\.?\\d+)(${acceptableUnitsGroup}){1,1}$`
10839 + );
10840 + const matches = rawValue.toString().match(regexUnits);
10841 + if (!matches || matches.length < 3) {
10842 + return null;
10843 + }
10844 + let [, value, unit] = matches;
10845 + let returnValue = parseFloat(value);
10846 + if ("px" === coerceTo && ("em" === unit || "rem" === unit)) {
10847 + returnValue = returnValue * rootSizeValue;
10848 + unit = coerceTo;
10849 + }
10850 + if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) {
10851 + returnValue = returnValue / rootSizeValue;
10852 + unit = coerceTo;
10853 + }
10854 + if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) {
10855 + unit = coerceTo;
10856 + }
10857 + if (!unit) {
10858 + return null;
10859 + }
10860 + return {
10861 + value: roundToPrecision(returnValue, 3),
10862 + unit
10863 + };
10864 +}
10865 +function roundToPrecision(value, digits = 3) {
10866 + const base = Math.pow(10, digits);
10867 + return Math.round(value * base) / base;
10868 +}
10869 +
10870 +// packages/global-styles-engine/build-module/utils/typography.mjs
10871 +function isFluidTypographyEnabled(typographySettings) {
10872 + const fluidSettings = typographySettings?.fluid;
10873 + return true === fluidSettings || fluidSettings && typeof fluidSettings === "object" && Object.keys(fluidSettings).length > 0;
10874 +}
10875 +function getFluidTypographyOptionsFromSettings(settings) {
10876 + const typographySettings = settings?.typography ?? {};
10877 + const layoutSettings = settings?.layout;
10878 + const defaultMaxViewportWidth = getTypographyValueAndUnit(
10879 + layoutSettings?.wideSize
10880 + ) ? layoutSettings?.wideSize : null;
10881 + return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? {
10882 + fluid: {
10883 + maxViewportWidth: defaultMaxViewportWidth,
10884 + ...typeof typographySettings.fluid === "object" ? typographySettings.fluid : {}
10885 + }
10886 + } : {
10887 + fluid: typographySettings?.fluid
10888 + };
10889 +}
10890 +function getTypographyFontSizeValue(preset, settings) {
10891 + const { size: defaultSize } = preset;
10892 + if (!defaultSize || "0" === defaultSize || false === preset?.fluid) {
10893 + return defaultSize;
10894 + }
10895 + if (!isFluidTypographyEnabled(settings?.typography) && !isFluidTypographyEnabled(preset)) {
10896 + return defaultSize;
10897 + }
10898 + const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings)?.fluid ?? {};
10899 + const fluidFontSizeValue = getComputedFluidTypographyValue({
10900 + minimumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.min,
10901 + maximumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.max,
10902 + fontSize: defaultSize,
10903 + minimumFontSizeLimit: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minFontSize : void 0,
10904 + maximumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.maxViewportWidth : void 0,
10905 + minimumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minViewportWidth : void 0
10906 + });
10907 + if (!!fluidFontSizeValue) {
10908 + return fluidFontSizeValue;
10909 + }
10910 + return defaultSize;
10911 +}
10912 +
10913 +// packages/global-styles-engine/build-module/utils/common.mjs
10914 +var PRESET_METADATA = [
10915 + {
10916 + path: ["color", "palette"],
10917 + valueKey: "color",
10918 + cssVarInfix: "color",
10919 + classes: [
10920 + { classSuffix: "color", propertyName: "color" },
10921 + {
10922 + classSuffix: "background-color",
10923 + propertyName: "background-color"
10924 + },
10925 + {
10926 + classSuffix: "border-color",
10927 + propertyName: "border-color"
10928 + }
10929 + ]
10930 + },
10931 + {
10932 + path: ["color", "gradients"],
10933 + valueKey: "gradient",
10934 + cssVarInfix: "gradient",
10935 + classes: [
10936 + {
10937 + classSuffix: "gradient-background",
10938 + propertyName: "background"
10939 + }
10940 + ]
10941 + },
10942 + {
10943 + path: ["color", "duotone"],
10944 + valueKey: "colors",
10945 + cssVarInfix: "duotone",
10946 + valueFunc: ({ slug }) => `url( '#wp-duotone-${slug}' )`,
10947 + classes: []
10948 + },
10949 + {
10950 + path: ["shadow", "presets"],
10951 + valueKey: "shadow",
10952 + cssVarInfix: "shadow",
10953 + classes: []
10954 + },
10955 + {
10956 + path: ["typography", "fontSizes"],
10957 + valueFunc: (preset, settings) => getTypographyFontSizeValue(preset, settings),
10958 + valueKey: "size",
10959 + cssVarInfix: "font-size",
10960 + classes: [{ classSuffix: "font-size", propertyName: "font-size" }]
10961 + },
10962 + {
10963 + path: ["typography", "fontFamilies"],
10964 + valueKey: "fontFamily",
10965 + cssVarInfix: "font-family",
10966 + classes: [
10967 + { classSuffix: "font-family", propertyName: "font-family" }
10968 + ]
10969 + },
10970 + {
10971 + path: ["typography", "textShadowPresets"],
10972 + valueKey: "textShadow",
10973 + cssVarInfix: "text-shadow",
10974 + classes: [
10975 + { classSuffix: "text-shadow", propertyName: "text-shadow" }
10976 + ]
10977 + },
10978 + {
10979 + path: ["spacing", "spacingSizes"],
10980 + valueKey: "size",
10981 + cssVarInfix: "spacing",
10982 + valueFunc: ({ size: size4 }) => size4,
10983 + classes: []
10984 + },
10985 + {
10986 + path: ["border", "radiusSizes"],
10987 + valueKey: "size",
10988 + cssVarInfix: "border-radius",
10989 + classes: []
10990 + },
10991 + {
10992 + path: ["dimensions", "dimensionSizes"],
10993 + valueKey: "size",
10994 + cssVarInfix: "dimension",
10995 + classes: []
10996 + }
10997 +];
10998 +function getResolvedRefValue(ruleValue, tree) {
10999 + if (!ruleValue || !tree) {
11000 + return ruleValue;
11001 + }
11002 + if (typeof ruleValue === "object" && "ref" in ruleValue && ruleValue?.ref) {
11003 + const resolvedRuleValue = (0, import_style_engine.getCSSValueFromRawStyle)(
11004 + getValueFromObjectPath(tree, ruleValue.ref)
11005 + );
11006 + if (typeof resolvedRuleValue === "object" && resolvedRuleValue !== null && "ref" in resolvedRuleValue && resolvedRuleValue?.ref) {
11007 + return void 0;
11008 + }
11009 + if (resolvedRuleValue === void 0) {
11010 + return ruleValue;
11011 + }
11012 + return resolvedRuleValue;
11013 + }
11014 + return ruleValue;
11015 +}
11016 +function getResolvedThemeFilePath(file, themeFileURIs) {
11017 + if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) {
11018 + return file;
11019 + }
11020 + const uri = themeFileURIs.find(
11021 + (themeFileUri) => themeFileUri?.name === file
11022 + );
11023 + if (!uri?.href) {
11024 + return file;
11025 + }
11026 + return uri?.href;
11027 +}
11028 +function getResolvedValue(ruleValue, tree) {
11029 + if (!ruleValue || !tree) {
11030 + return ruleValue;
11031 + }
11032 + const resolvedValue = getResolvedRefValue(ruleValue, tree);
11033 + if (typeof resolvedValue === "object" && resolvedValue !== null && "url" in resolvedValue && resolvedValue?.url) {
11034 + return {
11035 + ...resolvedValue,
11036 + url: getResolvedThemeFilePath(
11037 + resolvedValue.url,
11038 + tree?._links?.["wp:theme-file"]
11039 + )
11040 + };
11041 + }
11042 + return resolvedValue;
11043 +}
11044 +function findInPresetsBy(settings, blockName, presetPath = [], presetProperty = "slug", presetValueValue) {
11045 + const orderedPresetsByOrigin = [
11046 + blockName ? getValueFromObjectPath(settings, [
11047 + "blocks",
11048 + blockName,
11049 + ...presetPath
11050 + ]) : void 0,
11051 + getValueFromObjectPath(settings, presetPath)
11052 + ].filter(Boolean);
11053 + for (const presetByOrigin of orderedPresetsByOrigin) {
11054 + if (presetByOrigin) {
11055 + const origins = ["custom", "theme", "default"];
11056 + for (const origin of origins) {
11057 + const presets = presetByOrigin[origin];
11058 + if (presets) {
11059 + const presetObject = presets.find(
11060 + (preset) => preset[presetProperty] === presetValueValue
11061 + );
11062 + if (presetObject) {
11063 + if (presetProperty === "slug") {
11064 + return presetObject;
11065 + }
11066 + const highestPresetObjectWithSameSlug = findInPresetsBy(
11067 + settings,
11068 + blockName,
11069 + presetPath,
11070 + "slug",
11071 + presetObject.slug
11072 + );
11073 + if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) {
11074 + return presetObject;
11075 + }
11076 + return void 0;
11077 + }
11078 + }
11079 + }
11080 + }
11081 + }
11082 +}
11083 +function getValueFromPresetVariable(features, blockName, variable, [presetType, slug] = []) {
11084 + const metadata = PRESET_METADATA.find(
11085 + (data) => data.cssVarInfix === presetType
11086 + );
11087 + if (!metadata || !features.settings) {
11088 + return variable;
11089 + }
11090 + const presetObject = findInPresetsBy(
11091 + features.settings,
11092 + blockName,
11093 + metadata.path,
11094 + "slug",
11095 + slug
11096 + );
11097 + if (presetObject) {
11098 + const { valueKey } = metadata;
11099 + const result = presetObject[valueKey];
11100 + return getValueFromVariable(features, blockName, result);
11101 + }
11102 + return variable;
11103 +}
11104 +function getValueFromCustomVariable(features, blockName, variable, path = []) {
11105 + const result = (blockName ? getValueFromObjectPath(features?.settings ?? {}, [
11106 + "blocks",
11107 + blockName,
11108 + "custom",
11109 + ...path
11110 + ]) : void 0) ?? getValueFromObjectPath(features?.settings ?? {}, [
11111 + "custom",
11112 + ...path
11113 + ]);
11114 + if (!result) {
11115 + return variable;
11116 + }
11117 + return getValueFromVariable(features, blockName, result);
11118 +}
11119 +function getValueFromVariable(features, blockName, variable) {
11120 + if (!variable || typeof variable !== "string") {
11121 + if (typeof variable === "object" && variable !== null && "ref" in variable && typeof variable.ref === "string") {
11122 + const resolvedVariable = getValueFromObjectPath(
11123 + features,
11124 + variable.ref
11125 + );
11126 + if (!resolvedVariable || typeof resolvedVariable === "object" && "ref" in resolvedVariable) {
11127 + return resolvedVariable;
11128 + }
11129 + variable = resolvedVariable;
11130 + } else {
11131 + return variable;
11132 + }
11133 + }
11134 + const USER_VALUE_PREFIX = "var:";
11135 + const THEME_VALUE_PREFIX = "var(--wp--";
11136 + const THEME_VALUE_SUFFIX = ")";
11137 + let parsedVar;
11138 + if (variable.startsWith(USER_VALUE_PREFIX)) {
11139 + parsedVar = variable.slice(USER_VALUE_PREFIX.length).split("|");
11140 + } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) {
11141 + parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split("--");
11142 + } else {
11143 + return variable;
11144 + }
11145 + const [type, ...path] = parsedVar;
11146 + if (type === "preset") {
11147 + return getValueFromPresetVariable(
11148 + features,
11149 + blockName,
11150 + variable,
11151 + path
11152 + );
11153 + }
11154 + if (type === "custom") {
11155 + return getValueFromCustomVariable(
11156 + features,
11157 + blockName,
11158 + variable,
11159 + path
11160 + );
11161 + }
11162 + return variable;
11163 +}
11164 +
11165 +// packages/global-styles-engine/build-module/style-state-back-compat.mjs
11166 +var LEGACY_STYLE_STATE_ALIASES = {
11167 + "@mobile": "mobile",
11168 + "@tablet": "tablet",
11169 + "-current": "@current"
11170 +};
11171 +function isObjectRecord(value) {
11172 + return !!value && typeof value === "object" && !Array.isArray(value);
11173 +}
11174 +function normalizeStyleStateNode(node) {
11175 + if (!isObjectRecord(node)) {
11176 + return node;
11177 + }
11178 + let normalized = node;
11179 + Object.entries(LEGACY_STYLE_STATE_ALIASES).forEach(
11180 + ([state, legacyState]) => {
11181 + if (Object.hasOwn(node, legacyState)) {
11182 + if (normalized === node) {
11183 + normalized = { ...node };
11184 + }
11185 + if (!Object.hasOwn(node, state)) {
11186 + normalized[state] = node[legacyState];
11187 + }
11188 + delete normalized[legacyState];
11189 + }
11190 + }
11191 + );
11192 + Object.entries(normalized).forEach(([key, value]) => {
11193 + if (!isObjectRecord(value)) {
11194 + return;
11195 + }
11196 + const normalizedValue = normalizeStyleStateNode(value);
11197 + if (normalizedValue !== value) {
11198 + if (normalized === node) {
11199 + normalized = { ...node };
11200 + }
11201 + normalized[key] = normalizedValue;
11202 + }
11203 + });
11204 + return normalized;
11205 +}
11206 +function normalizeStyleStateAliases(globalStyles) {
11207 + if (false) {
11208 + return globalStyles;
11209 + }
11210 + if (!globalStyles?.styles) {
11211 + return globalStyles;
11212 + }
11213 + const styles = normalizeStyleStateNode(globalStyles.styles);
11214 + return styles === globalStyles.styles ? globalStyles : { ...globalStyles, styles };
11215 +}
11216 +function getLegacyStyleStatePath(path) {
11217 + if (false) {
11218 + return void 0;
11219 + }
11220 + const pathParts = path.split(".");
11221 + const legacyPathParts = pathParts.map(
11222 + (part) => LEGACY_STYLE_STATE_ALIASES[part] ?? part
11223 + );
11224 + return legacyPathParts.some(
11225 + (part, index2) => part !== pathParts[index2]
11226 + ) ? legacyPathParts.join(".") : void 0;
11227 +}
11228 +
11229 +// packages/global-styles-engine/build-module/settings/get-style.mjs
11230 +function getStyle(globalStyles, path, blockName, shouldDecodeEncode = true) {
11231 + const appendedPath = path ? "." + path : "";
11232 + const finalPath = !blockName ? `styles${appendedPath}` : `styles.blocks.${blockName}${appendedPath}`;
11233 + if (!globalStyles) {
11234 + return void 0;
11235 + }
11236 + let rawResult = getValueFromObjectPath(globalStyles, finalPath);
11237 + const legacyPath = getLegacyStyleStatePath(finalPath);
11238 + if (rawResult === void 0 && legacyPath) {
11239 + let hasCanonicalPath = true;
11240 + let currentValue = globalStyles;
11241 + for (const pathPart of finalPath.split(".")) {
11242 + if (!currentValue || typeof currentValue !== "object" || !Object.hasOwn(currentValue, pathPart)) {
11243 + hasCanonicalPath = false;
11244 + break;
11245 + }
11246 + currentValue = currentValue[pathPart];
11247 + }
11248 + if (!hasCanonicalPath) {
11249 + rawResult = getValueFromObjectPath(globalStyles, legacyPath);
11250 + }
11251 + }
11252 + const result = shouldDecodeEncode ? getValueFromVariable(globalStyles, blockName, rawResult) : rawResult;
11253 + return result;
11254 +}
11255 +
11256 +// packages/global-styles-engine/build-module/settings/set-style.mjs
11257 +function setStyle(globalStyles, path, newValue, blockName) {
11258 + const appendedPath = path ? "." + path : "";
11259 + const finalPath = !blockName ? `styles${appendedPath}` : `styles.blocks.${blockName}${appendedPath}`;
11260 + return setImmutably(
11261 + normalizeStyleStateAliases(globalStyles),
11262 + finalPath.split("."),
11263 + newValue
11264 + );
11265 +}
11266 +
11267 +// packages/global-styles-engine/build-module/core/equal.mjs
11268 +var import_es6 = __toESM(require_es6(), 1);
11269 +function areGlobalStylesEqual(original, variation) {
11270 + if (typeof original !== "object" || typeof variation !== "object") {
11271 + return original === variation;
11272 + }
11273 + return (0, import_es6.default)(original?.styles, variation?.styles) && (0, import_es6.default)(original?.settings, variation?.settings);
11274 +}
11275 +
11276 +// packages/global-styles-engine/build-module/core/merge.mjs
11277 +var import_deepmerge = __toESM(require_cjs(), 1);
11278 +
11279 +// node_modules/is-plain-object/dist/is-plain-object.mjs
11280 +function isObject(o) {
11281 + return Object.prototype.toString.call(o) === "[object Object]";
11282 +}
11283 +function isPlainObject(o) {
11284 + var ctor, prot;
11285 + if (isObject(o) === false) return false;
11286 + ctor = o.constructor;
11287 + if (ctor === void 0) return true;
11288 + prot = ctor.prototype;
11289 + if (isObject(prot) === false) return false;
11290 + if (prot.hasOwnProperty("isPrototypeOf") === false) {
11291 + return false;
11292 + }
11293 + return true;
11294 +}
11295 +
11296 +// packages/global-styles-engine/build-module/core/merge.mjs
11297 +function mergeGlobalStyles(base, user) {
11298 + return (0, import_deepmerge.default)(
11299 + normalizeStyleStateAliases(base),
11300 + normalizeStyleStateAliases(user),
11301 + {
11302 + /*
11303 + * We only pass as arrays the presets,
11304 + * in which case we want the new array of values
11305 + * to override the old array (no merging).
11306 + */
11307 + isMergeableObject: isPlainObject,
11308 + /*
11309 + * Exceptions to the above rule.
11310 + * Background images should be replaced, not merged,
11311 + * as they themselves are specific object definitions for the style.
11312 + */
11313 + customMerge: (key) => {
11314 + if (key === "backgroundImage") {
11315 + return (baseConfig, userConfig) => userConfig ?? baseConfig;
11316 + }
11317 + return void 0;
11318 + }
11319 + }
11320 + );
11321 +}
11322 +
11323 +// node_modules/colord/index.mjs
11324 +for (r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t = function(r3) {
11325 + return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
11326 +}, n = function(r3, t2, n2) {
11327 + return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r3) / n2 + 0;
11328 +}, u = function(r3, t2, n2) {
11329 + return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t2 ? r3 : t2;
11330 +}, e = function(r3) {
11331 + return (r3 = isFinite(r3) ? r3 % 360 : 0) < 0 ? r3 + 360 : r3;
11332 +}, o = function(r3, t2) {
11333 + return void 0 === t2 && (t2 = 0), n(r3, t2) % 360;
11334 +}, a = function(r3) {
11335 + return { r: u(r3.r, 0, 255), g: u(r3.g, 0, 255), b: u(r3.b, 0, 255), a: u(r3.a) };
11336 +}, i = function(r3) {
11337 + return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
11338 +}, s = /^#([0-9a-f]{3,8})$/i, d = function(r3, t2) {
11339 + var n2 = r3.charCodeAt(t2);
11340 + return (15 & n2) + 9 * (n2 >> 6);
11341 +}, h = function(r3, t2) {
11342 + return d(r3, t2) << 4 | d(r3, t2 + 1);
11343 +}, b = [], f = 0; f < 256; f++) b.push((f < 16 ? "0" : "") + f.toString(16));
11344 +var r2;
11345 +var t;
11346 +var n;
11347 +var u;
11348 +var e;
11349 +var o;
11350 +var a;
11351 +var i;
11352 +var s;
11353 +var d;
11354 +var h;
11355 +var b;
11356 +var f;
11357 +var g = function(r2) {
11358 + return b[u(r2, 0, 255)];
11359 +};
11360 +var c = function(r2) {
11361 + var t = r2.r, n = r2.g, u = r2.b, e = r2.a, o = Math.max(t, n, u), a = o - Math.min(t, n, u), i = a ? o === t ? (n - u) / a : o === n ? 2 + (u - t) / a : 4 + (t - n) / a : 0;
11362 + return { h: 60 * (i < 0 ? i + 6 : i), s: o ? a / o * 100 : 0, v: o / 255 * 100, a: e };
11363 +};
11364 +var v = function(r2) {
11365 + var t = r2.h, n = r2.s, u = r2.v, e = r2.a;
11366 + t = t / 360 * 6, n /= 100, u /= 100;
11367 + var o = Math.floor(t), a = u * (1 - n), i = u * (1 - (t - o) * n), s = u * (1 - (1 - t + o) * n), d = o % 6;
11368 + return { r: 255 * [u, i, a, a, s, u][d], g: 255 * [s, u, u, i, a, a][d], b: 255 * [a, a, s, u, u, i][d], a: e };
11369 +};
11370 +var l = function(r2) {
11371 + return { h: e(r2.h), s: u(r2.s, 0, 100), l: u(r2.l, 0, 100), a: u(r2.a) };
11372 +};
11373 +var p2 = function(r2) {
11374 + return { h: o(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
11375 +};
11376 +var m = function(r2) {
11377 + return v((n = (t = r2).s, { h: t.h, s: (n *= ((u = t.l) < 50 ? u : 100 - u) / 100) > 0 ? 2 * n / (u + n) * 100 : 0, v: u + n, a: t.a }));
11378 + var t, n, u;
11379 +};
11380 +var y = function(r2) {
11381 + return { h: (t = c(r2)).h, s: (e = (200 - (n = t.s)) * (u = t.v) / 100) > 0 && e < 200 ? n * u / 100 / (e <= 100 ? e : 200 - e) * 100 : 0, l: e / 2, a: t.a };
11382 + var t, n, u, e;
11383 +};
11384 +var N = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
11385 +var x = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s+([+-]?(?:\d*\.\d+|\d+))%\s+([+-]?(?:\d*\.\d+|\d+))%\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
11386 +var M = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
11387 +var H = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
11388 +var $ = { string: [[function(r2) {
11389 + if (!s.test(r2)) return null;
11390 + var t = r2.length;
11391 + return t <= 5 ? { r: 17 * d(r2, 1), g: 17 * d(r2, 2), b: 17 * d(r2, 3), a: 5 === t ? n(17 * d(r2, 4) / 255, 2) : 1 } : 7 === t || 9 === t ? { r: h(r2, 1), g: h(r2, 3), b: h(r2, 5), a: 9 === t ? n(h(r2, 7) / 255, 2) : 1 } : null;
11392 +}, "hex"], [function(r2) {
11393 + var t = M.exec(r2) || H.exec(r2);
11394 + return t ? t[2] !== t[4] || t[4] !== t[6] ? null : a({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: void 0 === t[7] ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
11395 +}, "rgb"], [function(t) {
11396 + var n = N.exec(t) || x.exec(t);
11397 + if (!n) return null;
11398 + var u, e, o = l({ h: (u = n[1], e = n[2], void 0 === e && (e = "deg"), Number(u) * (r2[e] || 1)), s: Number(n[3]), l: Number(n[4]), a: void 0 === n[5] ? 1 : Number(n[5]) / (n[6] ? 100 : 1) });
11399 + return m(o);
11400 +}, "hsl"]], object: [[function(r2) {
11401 + var n = r2.r, u = r2.g, e = r2.b, o = r2.a, i = void 0 === o ? 1 : o;
11402 + return t(n) && t(u) && t(e) ? a({ r: Number(n), g: Number(u), b: Number(e), a: Number(i) }) : null;
11403 +}, "rgb"], [function(r2) {
11404 + var n = r2.h, u = r2.s, e = r2.l, o = r2.a, a = void 0 === o ? 1 : o;
11405 + if (!t(n) || !t(u) || !t(e)) return null;
11406 + var i = l({ h: Number(n), s: Number(u), l: Number(e), a: Number(a) });
11407 + return m(i);
11408 +}, "hsl"], [function(r2) {
11409 + var n = r2.h, o = r2.s, a = r2.v, i = r2.a, s = void 0 === i ? 1 : i;
11410 + if (!t(n) || !t(o) || !t(a)) return null;
11411 + var d = (function(r3) {
11412 + return { h: e(r3.h), s: u(r3.s, 0, 100), v: u(r3.v, 0, 100), a: u(r3.a) };
11413 + })({ h: Number(n), s: Number(o), v: Number(a), a: Number(s) });
11414 + return v(d);
11415 +}, "hsv"]] };
11416 +var j = function(r2, t) {
11417 + for (var n = 0; n < t.length; n++) {
11418 + var u = t[n][0](r2);
11419 + if (u) return [u, t[n][1]];
11420 + }
11421 + return [null, void 0];
11422 +};
11423 +var w = function(r2) {
11424 + return "string" == typeof r2 ? j(r2.trim(), $.string) : "object" == typeof r2 && null !== r2 ? j(r2, $.object) : [null, void 0];
11425 +};
11426 +var k = function(r2, t) {
11427 + var n = y(r2);
11428 + return { h: n.h, s: u(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
11429 +};
11430 +var E = function(r2) {
11431 + return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
11432 +};
11433 +var R = function(r2, t) {
11434 + var n = y(r2);
11435 + return { h: n.h, s: n.s, l: u(n.l + 100 * t, 0, 100), a: n.a };
11436 +};
11437 +var q = (function() {
11438 + function r2(r3) {
11439 + this.parsed = w(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
11440 + }
11441 + return r2.prototype.isValid = function() {
11442 + return null !== this.parsed;
11443 + }, r2.prototype.brightness = function() {
11444 + return n(E(this.rgba), 2);
11445 + }, r2.prototype.isDark = function() {
11446 + return E(this.rgba) < 0.5;
11447 + }, r2.prototype.isLight = function() {
11448 + return E(this.rgba) >= 0.5;
11449 + }, r2.prototype.toHex = function() {
11450 + return r3 = i(this.rgba), t = r3.r, u = r3.g, e = r3.b, a = (o = r3.a) < 1 ? g(n(255 * o)) : "", "#" + g(t) + g(u) + g(e) + a;
11451 + var r3, t, u, e, o, a;
11452 + }, r2.prototype.toRgb = function() {
11453 + return i(this.rgba);
11454 + }, r2.prototype.toRgbString = function() {
11455 + return r3 = i(this.rgba), t = r3.r, n = r3.g, u = r3.b, (e = r3.a) < 1 ? "rgba(" + t + ", " + n + ", " + u + ", " + e + ")" : "rgb(" + t + ", " + n + ", " + u + ")";
11456 + var r3, t, n, u, e;
11457 + }, r2.prototype.toHsl = function() {
11458 + return p2(y(this.rgba));
11459 + }, r2.prototype.toHslString = function() {
11460 + return r3 = p2(y(this.rgba)), t = r3.h, n = r3.s, u = r3.l, (e = r3.a) < 1 ? "hsla(" + t + ", " + n + "%, " + u + "%, " + e + ")" : "hsl(" + t + ", " + n + "%, " + u + "%)";
11461 + var r3, t, n, u, e;
11462 + }, r2.prototype.toHsv = function() {
11463 + return r3 = c(this.rgba), { h: o(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
11464 + var r3;
11465 + }, r2.prototype.invert = function() {
11466 + return A({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
11467 + var r3;
11468 + }, r2.prototype.saturate = function(r3) {
11469 + return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, r3));
11470 + }, r2.prototype.desaturate = function(r3) {
11471 + return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, -r3));
11472 + }, r2.prototype.grayscale = function() {
11473 + return A(k(this.rgba, -1));
11474 + }, r2.prototype.lighten = function(r3) {
11475 + return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, r3));
11476 + }, r2.prototype.darken = function(r3) {
11477 + return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, -r3));
11478 + }, r2.prototype.rotate = function(r3) {
11479 + return void 0 === r3 && (r3 = 15), this.hue(y(this.rgba).h + r3);
11480 + }, r2.prototype.alpha = function(r3) {
11481 + return "number" == typeof r3 ? A({ r: (t = this.rgba).r, g: t.g, b: t.b, a: r3 }) : n(this.rgba.a, 3);
11482 + var t;
11483 + }, r2.prototype.hue = function(r3) {
11484 + var t = y(this.rgba);
11485 + return "number" == typeof r3 ? A({ h: r3, s: t.s, l: t.l, a: t.a }) : o(t.h);
11486 + }, r2.prototype.isEqual = function(r3) {
11487 + return this.toHex() === A(r3).toHex();
11488 + }, r2;
11489 +})();
11490 +var A = function(r2) {
11491 + return r2 instanceof q ? r2 : new q(r2);
11492 +};
11493 +
11494 +// packages/global-styles-engine/build-module/utils/duotone.mjs
11495 +function getValuesFromColors(colors = []) {
11496 + const values = {
11497 + r: [],
11498 + g: [],
11499 + b: [],
11500 + a: []
11501 + };
11502 + colors.forEach((color) => {
11503 + const rgbColor = A(color).toRgb();
11504 + values.r.push(rgbColor.r / 255);
11505 + values.g.push(rgbColor.g / 255);
11506 + values.b.push(rgbColor.b / 255);
11507 + values.a.push(rgbColor.a);
11508 + });
11509 + return values;
11510 +}
11511 +function getDuotoneUnsetStylesheet(selector) {
11512 + return `${selector}{filter:none}`;
11513 +}
11514 +function getDuotoneStylesheet(selector, id) {
11515 + return `${selector}{filter:url(#${id})}`;
11516 +}
11517 +function getDuotoneFilter(id, colors) {
11518 + const values = getValuesFromColors(colors);
11519 + return `
11520 +<svg
11521 + xmlns:xlink="http://www.w3.org/1999/xlink"
11522 + viewBox="0 0 0 0"
11523 + width="0"
11524 + height="0"
11525 + focusable="false"
11526 + role="none"
11527 + aria-hidden="true"
11528 + style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
11529 +>
11530 + <defs>
11531 + <filter id="${id}">
11532 + <!--
11533 + Use sRGB instead of linearRGB so transparency looks correct.
11534 + Use perceptual brightness to convert to grayscale.
11535 + -->
11536 + <feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
11537 + <!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
11538 + <feComponentTransfer color-interpolation-filters="sRGB">
11539 + <feFuncR type="table" tableValues="${values.r.join(" ")}"></feFuncR>
11540 + <feFuncG type="table" tableValues="${values.g.join(" ")}"></feFuncG>
11541 + <feFuncB type="table" tableValues="${values.b.join(" ")}"></feFuncB>
11542 + <feFuncA type="table" tableValues="${values.a.join(" ")}"></feFuncA>
11543 + </feComponentTransfer>
11544 + <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
11545 + <feComposite in2="SourceGraphic" operator="in"></feComposite>
11546 + </filter>
11547 + </defs>
11548 +</svg>`;
11549 +}
11550 +
11551 +// packages/global-styles-engine/build-module/utils/viewport.mjs
11552 +var DEFAULT_VIEWPORT_BREAKPOINTS = {
11553 + mobile: "480px",
11554 + tablet: "782px"
11555 +};
11556 +var VIEWPORT_SIZE_REGEXP = /^(\d+|\d*\.\d+)(px|em|rem)$/;
11557 +var DEFAULT_FONT_SIZE = 16;
11558 +function isViewportSettings(configOrSettings) {
11559 + return "mobile" in configOrSettings || "tablet" in configOrSettings;
11560 +}
11561 +function getViewportSettings(configOrSettings) {
11562 + if (!configOrSettings || typeof configOrSettings !== "object") {
11563 + return {};
11564 + }
11565 + if (isViewportSettings(configOrSettings)) {
11566 + return configOrSettings;
11567 + }
11568 + return configOrSettings.settings?.viewport ?? {};
11569 +}
11570 +function isValidViewportSize(value) {
11571 + return typeof value === "string" && VIEWPORT_SIZE_REGEXP.test(value.trim());
11572 +}
11573 +function getViewportBreakpointValueInPixels(value) {
11574 + if (typeof value === "number") {
11575 + return value;
11576 + }
11577 + if (typeof value !== "string") {
11578 + return void 0;
11579 + }
11580 + const match2 = value.trim().match(VIEWPORT_SIZE_REGEXP);
11581 + if (!match2) {
11582 + return void 0;
11583 + }
11584 + const numericValue = Number.parseFloat(match2[1]);
11585 + const unit = match2[2];
11586 + return unit === "px" ? numericValue : numericValue * DEFAULT_FONT_SIZE;
11587 +}
11588 +function getViewportBreakpoints(configOrSettings) {
11589 + const viewportSettings = getViewportSettings(configOrSettings);
11590 + const breakpoints = {};
11591 + const breakpointValuesInPixels = {};
11592 + Object.keys(DEFAULT_VIEWPORT_BREAKPOINTS).forEach((breakpoint) => {
11593 + const key = breakpoint;
11594 + const value = viewportSettings[key];
11595 + const px = getViewportBreakpointValueInPixels(value);
11596 + if (px !== void 0 && isValidViewportSize(value)) {
11597 + breakpoints[key] = value.trim();
11598 + breakpointValuesInPixels[key] = px;
11599 + }
11600 + });
11601 + const breakpointNames = Object.keys(breakpoints);
11602 + if (!breakpointNames.length) {
11603 + return { ...DEFAULT_VIEWPORT_BREAKPOINTS };
11604 + }
11605 + if (1 === breakpointNames.length) {
11606 + return breakpoints;
11607 + }
11608 + const mobile = breakpoints.mobile;
11609 + const tablet = breakpoints.tablet;
11610 + if (breakpointValuesInPixels.mobile >= breakpointValuesInPixels.tablet) {
11611 + return { mobile };
11612 + }
11613 + return { mobile, tablet };
11614 +}
11615 +function getResponsiveMediaQueries(configOrSettings) {
11616 + const breakpoints = getViewportBreakpoints(configOrSettings);
11617 + const mediaQueries = {};
11618 + if (breakpoints.mobile) {
11619 + mediaQueries["@mobile"] = `@media (width <= ${breakpoints.mobile})`;
11620 + }
11621 + if (breakpoints.tablet) {
11622 + mediaQueries["@tablet"] = breakpoints.mobile ? `@media (${breakpoints.mobile} < width <= ${breakpoints.tablet})` : `@media (width <= ${breakpoints.tablet})`;
11623 + }
11624 + return mediaQueries;
11625 +}
11626 +
11627 +// packages/global-styles-engine/build-module/variation.mjs
11628 +function getVariationStyle(globalStyles, name2, variation, { resolveRefs = true } = {}) {
11629 + if (!globalStyles?.styles?.blocks?.[name2]?.variations?.[variation]) {
11630 + return void 0;
11631 + }
11632 + const replaceRefs = (variationStyles) => {
11633 + Object.keys(variationStyles).forEach((key) => {
11634 + const value = variationStyles[key];
11635 + if (typeof value === "object" && value !== null) {
11636 + if (value.ref !== void 0) {
11637 + if (typeof value.ref !== "string" || value.ref.trim() === "") {
11638 + delete variationStyles[key];
11639 + } else {
11640 + const refValue = getValueFromObjectPath(
11641 + globalStyles,
11642 + value.ref
11643 + );
11644 + if (refValue !== void 0 && refValue !== null) {
11645 + variationStyles[key] = refValue;
11646 + } else {
11647 + delete variationStyles[key];
11648 + }
11649 + }
11650 + } else {
11651 + replaceRefs(value);
11652 + if (Object.keys(value).length === 0) {
11653 + delete variationStyles[key];
11654 + }
11655 + }
11656 + }
11657 + });
11658 + };
11659 + const styles = JSON.parse(
11660 + JSON.stringify(
11661 + globalStyles.styles.blocks[name2].variations[variation]
11662 + )
11663 + );
11664 + if (resolveRefs) {
11665 + replaceRefs(styles);
11666 + }
11667 + return styles;
11668 +}
11669 +
11670 +// packages/global-styles-engine/build-module/resolve-style.mjs
11671 +var DEFAULT_STATE_VALUE = "default";
11672 +function isDefaultBlockStyleState(selectedState) {
11673 + const viewport = selectedState?.viewport;
11674 + const pseudoState = selectedState?.pseudoState;
11675 + return (!viewport || viewport === DEFAULT_STATE_VALUE) && (!pseudoState || pseudoState === DEFAULT_STATE_VALUE);
11676 +}
11677 +function getStyleStatePath(selectedState) {
11678 + if (isDefaultBlockStyleState(selectedState)) {
11679 + return [];
11680 + }
11681 + return [selectedState.viewport, selectedState.pseudoState].filter(
11682 + (state) => !!state && state !== DEFAULT_STATE_VALUE
11683 + );
11684 +}
11685 +function getStyleForState(style, selectedState) {
11686 + const path = getStyleStatePath(selectedState);
11687 + if (!path.length) {
11688 + return style;
11689 + }
11690 + return getValueFromObjectPath(style, path);
11691 +}
11692 +var TREE_STRUCTURAL_KEYS = /* @__PURE__ */ new Set(["blocks", "variations", "css"]);
11693 +var EMPTY_INHERITANCE = Object.freeze({
11694 + value: {},
11695 + sources: {}
11696 +});
11697 +var SOURCE_DESCRIPTORS = {
11698 + root: { layer: "root" },
11699 + element: { layer: "element" },
11700 + block: { layer: "block" },
11701 + blockVariation: { layer: "blockVariation" }
11702 +};
11703 +function createSourceDescriptor(type) {
11704 + const descriptor = SOURCE_DESCRIPTORS[type];
11705 + if (!descriptor) {
11706 + return null;
11707 + }
11708 + return { ...descriptor };
11709 +}
11710 +function createContribution(styles, source) {
11711 + if (!styles || !source) {
11712 + return null;
11713 + }
11714 + return { styles, source };
11715 +}
11716 +function getPathKey(path) {
11717 + return path.join(".");
11718 +}
11719 +function getSourceForPath(source) {
11720 + return { ...source };
11721 +}
11722 +function isExplicitEmpty(value) {
11723 + if (value === "" || value === null) {
11724 + return true;
11725 + }
11726 + if (typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) {
11727 + return true;
11728 + }
11729 + return false;
11730 +}
11731 +function isRefObject(value) {
11732 + return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.ref === "string";
11733 +}
11734 +function pickLayerRootContribution(layer) {
11735 + if (!layer || typeof layer !== "object" || Array.isArray(layer)) {
11736 + return null;
11737 + }
11738 + const contribution = {};
11739 + for (const key of Object.keys(layer)) {
11740 + if (TREE_STRUCTURAL_KEYS.has(key)) {
11741 + continue;
11742 + }
11743 + if (key === "elements") {
11744 + if (layer.elements && typeof layer.elements === "object") {
11745 + contribution.elements = layer.elements;
11746 + }
11747 + continue;
11748 + }
11749 + if (isExplicitEmpty(layer[key])) {
11750 + continue;
11751 + }
11752 + contribution[key] = layer[key];
11753 + }
11754 + return Object.keys(contribution).length === 0 ? null : contribution;
11755 +}
11756 +var ATOMIC_OBJECT_KEYS = /* @__PURE__ */ new Set(["backgroundImage"]);
11757 +function deepMergeDroppingEmpties(target, source, globalStyles, sourceMetadata, sources, path = []) {
11758 + if (!source || typeof source !== "object" || Array.isArray(source)) {
11759 + return target;
11760 + }
11761 + for (const key of Object.keys(source)) {
11762 + let sourceValue = source[key];
11763 + if (isExplicitEmpty(sourceValue)) {
11764 + continue;
11765 + }
11766 + if (isRefObject(sourceValue)) {
11767 + if (sourceValue.ref.trim() === "") {
11768 + continue;
11769 + }
11770 + const resolved = getValueFromObjectPath(
11771 + globalStyles,
11772 + sourceValue.ref
11773 + );
11774 + if (resolved === void 0 || resolved === null || isRefObject(resolved)) {
11775 + continue;
11776 + }
11777 + sourceValue = resolved;
11778 + }
11779 + const nextPath = [...path, key];
11780 + if (!ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) && !isRefObject(sourceValue)) {
11781 + const existing = target[key] && typeof target[key] === "object" && !Array.isArray(target[key]) ? target[key] : {};
11782 + target[key] = deepMergeDroppingEmpties(
11783 + { ...existing },
11784 + sourceValue,
11785 + globalStyles,
11786 + sourceMetadata,
11787 + sources,
11788 + nextPath
11789 + );
11790 + } else {
11791 + target[key] = ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) ? { ...sourceValue } : sourceValue;
11792 + if (sourceMetadata && sources) {
11793 + sources[getPathKey(nextPath)] = getSourceForPath(sourceMetadata);
11794 + }
11795 + }
11796 + }
11797 + return target;
11798 +}
11799 +function getStateSlice(layerObject, selectedState) {
11800 + if (!layerObject) {
11801 + return null;
11802 + }
11803 + const slice = getStyleForState(layerObject, selectedState);
11804 + return slice && typeof slice === "object" && !Array.isArray(slice) ? slice : null;
11805 +}
11806 +var NON_CASCADING_ROOT_PREFIXES = [
11807 + "color.background",
11808 + "color.gradient",
11809 + "background",
11810 + "spacing",
11811 + "dimensions",
11812 + "border",
11813 + "shadow",
11814 + "filter"
11815 +];
11816 +function isNonCascadingRootPath(pathKey) {
11817 + if (pathKey.startsWith("elements.")) {
11818 + return false;
11819 + }
11820 + return NON_CASCADING_ROOT_PREFIXES.some(
11821 + (prefix) => pathKey === prefix || pathKey.startsWith(`${prefix}.`)
11822 + );
11823 +}
11824 +function deleteAtPath(target, pathSegments) {
11825 + if (!target || typeof target !== "object") {
11826 + return;
11827 + }
11828 + const [head2, ...rest] = pathSegments;
11829 + if (rest.length === 0) {
11830 + delete target[head2];
11831 + return;
11832 + }
11833 + const child = target[head2];
11834 + if (child && typeof child === "object") {
11835 + deleteAtPath(child, rest);
11836 + if (Object.keys(child).length === 0) {
11837 + delete target[head2];
11838 + }
11839 + }
11840 +}
11841 +function dropNonCascadingRootLeaves(value, sources) {
11842 + for (const pathKey of Object.keys(sources)) {
11843 + if (sources[pathKey].layer === "root" && isNonCascadingRootPath(pathKey)) {
11844 + deleteAtPath(value, pathKey.split("."));
11845 + delete sources[pathKey];
11846 + }
11847 + }
11848 +}
11849 +function resolveThemeFileBackgroundImage(value, globalStyles, links) {
11850 + const image = value?.background?.backgroundImage;
11851 + if (!image) {
11852 + return;
11853 + }
11854 + const resolved = getResolvedValue(image, {
11855 + ...globalStyles,
11856 + _links: links ?? void 0
11857 + });
11858 + if (resolved !== void 0) {
11859 + value.background.backgroundImage = resolved;
11860 + }
11861 +}
11862 +function computeResolvedStyle(globalStyles, {
11863 + blockName,
11864 + variationName = null,
11865 + elements: elements2 = null,
11866 + viewport = null,
11867 + pseudoState = null
11868 +} = {}) {
11869 + if (!globalStyles || !globalStyles.styles) {
11870 + return EMPTY_INHERITANCE;
11871 + }
11872 + if (!blockName) {
11873 + return EMPTY_INHERITANCE;
11874 + }
11875 + const styles = globalStyles.styles;
11876 + const selectedState = { viewport, pseudoState };
11877 + const root = styles;
11878 + const block = styles.blocks?.[blockName] ?? null;
11879 + const elementLayers = (elements2 ?? []).map((elementName) => styles.elements?.[elementName] ?? null).filter((layer) => !!layer);
11880 + const variation = variationName ? getVariationStyle(globalStyles, blockName, variationName) ?? null : null;
11881 + const contributions = [
11882 + createContribution(
11883 + pickLayerRootContribution(root),
11884 + createSourceDescriptor("root")
11885 + ),
11886 + ...elementLayers.map(
11887 + (layer) => createContribution(
11888 + pickLayerRootContribution(layer),
11889 + createSourceDescriptor("element")
11890 + )
11891 + ),
11892 + block ? createContribution(
11893 + pickLayerRootContribution(block),
11894 + createSourceDescriptor("block")
11895 + ) : null,
11896 + variation ? createContribution(
11897 + pickLayerRootContribution(variation),
11898 + createSourceDescriptor("blockVariation")
11899 + ) : null
11900 + ];
11901 + if (!isDefaultBlockStyleState(selectedState)) {
11902 + contributions.push(
11903 + createContribution(
11904 + pickLayerRootContribution(
11905 + getStateSlice(root, selectedState)
11906 + ),
11907 + createSourceDescriptor("root")
11908 + ),
11909 + ...elementLayers.map(
11910 + (layer) => createContribution(
11911 + pickLayerRootContribution(
11912 + getStateSlice(layer, selectedState)
11913 + ),
11914 + createSourceDescriptor("element")
11915 + )
11916 + ),
11917 + block ? createContribution(
11918 + pickLayerRootContribution(
11919 + getStateSlice(block, selectedState)
11920 + ),
11921 + createSourceDescriptor("block")
11922 + ) : null,
11923 + variation ? createContribution(
11924 + pickLayerRootContribution(
11925 + getStateSlice(variation, selectedState)
11926 + ),
11927 + createSourceDescriptor("blockVariation")
11928 + ) : null
11929 + );
11930 + }
11931 + const filteredContributions = contributions.filter(
11932 + Boolean
11933 + );
11934 + if (filteredContributions.length === 0) {
11935 + return EMPTY_INHERITANCE;
11936 + }
11937 + const sources = {};
11938 + const value = filteredContributions.reduce(
11939 + (mergedValue, contribution) => deepMergeDroppingEmpties(
11940 + mergedValue,
11941 + contribution.styles,
11942 + globalStyles,
11943 + contribution.source,
11944 + sources
11945 + ),
11946 + {}
11947 + );
11948 + dropNonCascadingRootLeaves(value, sources);
11949 + resolveThemeFileBackgroundImage(
11950 + value,
11951 + globalStyles,
11952 + globalStyles._links ?? null
11953 + );
11954 + return { value, sources };
11955 +}
11956 +var NO_LINKS = {};
11957 +var memo = /* @__PURE__ */ new WeakMap();
11958 +function resolveStyle2(globalStyles, context = {}) {
11959 + const styleData = globalStyles?.styles;
11960 + if (!styleData || typeof styleData !== "object") {
11961 + return computeResolvedStyle(globalStyles, context);
11962 + }
11963 + let byLinks = memo.get(styleData);
11964 + if (!byLinks) {
11965 + byLinks = /* @__PURE__ */ new WeakMap();
11966 + memo.set(styleData, byLinks);
11967 + }
11968 + const linksKey = globalStyles?._links ?? NO_LINKS;
11969 + let inner = byLinks.get(linksKey);
11970 + if (!inner) {
11971 + inner = /* @__PURE__ */ new Map();
11972 + byLinks.set(linksKey, inner);
11973 + }
11974 + const sliceKey = `${context.elements?.join(",") ?? ""}:${context.viewport ?? ""}:${context.pseudoState ?? ""}`;
11975 + const key = (context.blockName || "") + "" + (context.variationName || "") + "" + sliceKey;
11976 + if (inner.has(key)) {
11977 + return inner.get(key);
11978 + }
11979 + const result = computeResolvedStyle(globalStyles, context);
11980 + inner.set(key, result);
11981 + return result;
11982 +}
11983 +
11984 +// packages/global-styles-engine/build-module/lock-unlock.mjs
11985 +var import_private_apis3 = __toESM(require_private_apis(), 1);
11986 +var { lock: lock3, unlock: unlock3 } = (0, import_private_apis3.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
11987 + "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
11988 + "@wordpress/global-styles-engine"
11989 +);
11990 +
11991 +// packages/global-styles-engine/build-module/private-apis.mjs
11992 +var privateApis = {};
11993 +lock3(privateApis, {
11994 + getResponsiveMediaQueries,
11995 + getViewportBreakpoints,
11996 + getViewportBreakpointValueInPixels,
11997 + getDuotoneFilter,
11998 + getDuotoneStylesheet,
11999 + getDuotoneUnsetStylesheet,
12000 + resolveStyle: resolveStyle2,
12001 + getVariationStyle
12002 +});
12003 +
12004 +// packages/global-styles-ui/build-module/provider.mjs
12005 +var import_element25 = __toESM(require_element(), 1);
12006 +
12007 +// packages/global-styles-ui/build-module/context.mjs
12008 +var import_element24 = __toESM(require_element(), 1);
12009 +var GlobalStylesContext = (0, import_element24.createContext)({
12010 + user: { styles: {}, settings: {} },
12011 + base: { styles: {}, settings: {} },
12012 + merged: { styles: {}, settings: {} },
12013 + onChange: () => {
12014 + },
12015 + fontLibraryEnabled: false
12016 +});
12017 +
12018 +// packages/global-styles-ui/build-module/provider.mjs
12019 +var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
12020 +function GlobalStylesProvider({
12021 + children,
12022 + value,
12023 + baseValue,
12024 + onChange,
12025 + fontLibraryEnabled
12026 +}) {
12027 + const merged = (0, import_element25.useMemo)(() => {
12028 + return mergeGlobalStyles(baseValue, value);
12029 + }, [baseValue, value]);
12030 + const contextValue = (0, import_element25.useMemo)(
12031 + () => ({
12032 + user: value,
12033 + base: baseValue,
12034 + merged,
12035 + onChange,
12036 + fontLibraryEnabled
12037 + }),
12038 + [value, baseValue, merged, onChange, fontLibraryEnabled]
12039 + );
12040 + return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GlobalStylesContext.Provider, { value: contextValue, children });
12041 +}
12042 +
12043 +// packages/global-styles-ui/build-module/screen-root.mjs
12044 +var import_components9 = __toESM(require_components(), 1);
12045 +var import_i18n11 = __toESM(require_i18n(), 1);
12046 +var import_data3 = __toESM(require_data(), 1);
12047 +var import_core_data4 = __toESM(require_core_data(), 1);
12048 +
12049 +// packages/global-styles-ui/build-module/icon-with-current-color.mjs
12050 +var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
12051 +function IconWithCurrentColor({
12052 + className,
12053 + ...props
12054 +}) {
12055 + return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
12056 + icon_default,
12057 + {
12058 + className: clsx_default(
12059 + className,
12060 + "global-styles-ui-icon-with-current-color"
12061 + ),
12062 + ...props
12063 + }
12064 + );
12065 +}
12066 +
12067 +// packages/global-styles-ui/build-module/navigation-button.mjs
12068 +var import_components3 = __toESM(require_components(), 1);
12069 +var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
12070 +function GenericNavigationButton({
12071 + icon,
12072 + children,
12073 + ...props
12074 +}) {
12075 + return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_components3.__experimentalItem, { ...props, children: [
12076 + icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_components3.__experimentalHStack, { justify: "flex-start", children: [
12077 + /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IconWithCurrentColor, { icon, size: 24 }),
12078 + /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components3.FlexItem, { children })
12079 + ] }),
12080 + !icon && children
12081 + ] });
12082 +}
12083 +function NavigationButtonAsItem(props) {
12084 + return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components3.Navigator.Button, { as: GenericNavigationButton, ...props });
12085 +}
12086 +
12087 +// packages/global-styles-ui/build-module/root-menu.mjs
12088 +var import_components4 = __toESM(require_components(), 1);
12089 +var import_i18n9 = __toESM(require_i18n(), 1);
12090 +var import_block_editor = __toESM(require_block_editor(), 1);
12091 +
12092 +// packages/global-styles-ui/build-module/hooks.mjs
12093 +var import_element26 = __toESM(require_element(), 1);
12094 +var import_data2 = __toESM(require_data(), 1);
12095 +var import_core_data3 = __toESM(require_core_data(), 1);
12096 +var import_i18n8 = __toESM(require_i18n(), 1);
12097 +
12098 +// packages/global-styles-ui/build-module/utils.mjs
12099 +var import_i18n7 = __toESM(require_i18n(), 1);
12100 +
12101 +// packages/global-styles-ui/build-module/lock-unlock.mjs
12102 +var import_private_apis5 = __toESM(require_private_apis(), 1);
12103 +var { lock: lock4, unlock: unlock4 } = (0, import_private_apis5.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
12104 + "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
12105 + "@wordpress/global-styles-ui"
12106 +);
12107 +
12108 +// packages/global-styles-ui/build-module/utils.mjs
12109 +var { getViewportBreakpoints: getViewportBreakpoints2 } = unlock4(privateApis);
12110 +var VALID_ELEMENT_STATES = {
12111 + link: [
12112 + { value: ":link", label: (0, import_i18n7.__)("Link") },
12113 + { value: ":any-link", label: (0, import_i18n7.__)("Any Link") },
12114 + { value: ":visited", label: (0, import_i18n7.__)("Visited") },
12115 + { value: ":hover", label: (0, import_i18n7.__)("Hover") },
12116 + { value: ":focus", label: (0, import_i18n7.__)("Focus") },
12117 + { value: ":focus-visible", label: (0, import_i18n7.__)("Focus-visible") },
12118 + { value: ":active", label: (0, import_i18n7.__)("Active") }
12119 + ],
12120 + button: [
12121 + { value: ":link", label: (0, import_i18n7.__)("Link") },
12122 + { value: ":any-link", label: (0, import_i18n7.__)("Any Link") },
12123 + { value: ":visited", label: (0, import_i18n7.__)("Visited") },
12124 + { value: ":hover", label: (0, import_i18n7.__)("Hover") },
12125 + { value: ":focus", label: (0, import_i18n7.__)("Focus") },
12126 + { value: ":focus-visible", label: (0, import_i18n7.__)("Focus-visible") },
12127 + { value: ":active", label: (0, import_i18n7.__)("Active") }
12128 + ]
12129 +};
12130 +var VALID_BLOCK_STATES = {
12131 + "core/button": [
12132 + { value: ":hover", label: (0, import_i18n7.__)("Hover") },
12133 + { value: ":focus", label: (0, import_i18n7.__)("Focus") },
12134 + { value: ":focus-visible", label: (0, import_i18n7.__)("Focus-visible") },
12135 + { value: ":active", label: (0, import_i18n7.__)("Active") }
12136 + ]
12137 +};
12138 +var RESPONSIVE_STATES = [
12139 + { value: "@tablet", label: (0, import_i18n7.__)("Tablet") },
12140 + { value: "@mobile", label: (0, import_i18n7.__)("Mobile") }
12141 +];
12142 +function removePropertiesFromObject(object, properties) {
12143 + if (!properties?.length) {
12144 + return object;
12145 + }
12146 + if (typeof object !== "object" || !object || !Object.keys(object).length) {
12147 + return object;
12148 + }
12149 + for (const key in object) {
12150 + if (properties.includes(key)) {
12151 + delete object[key];
12152 + } else if (typeof object[key] === "object") {
12153 + removePropertiesFromObject(object[key], properties);
12154 + }
12155 + }
12156 + return object;
12157 +}
12158 +var filterObjectByProperties = (object, properties) => {
12159 + if (!object || !properties?.length) {
12160 + return {};
12161 + }
12162 + const newObject = {};
12163 + Object.keys(object).forEach((key) => {
12164 + if (properties.includes(key)) {
12165 + newObject[key] = object[key];
12166 + } else if (typeof object[key] === "object") {
12167 + const newFilter = filterObjectByProperties(
12168 + object[key],
12169 + properties
12170 + );
12171 + if (Object.keys(newFilter).length) {
12172 + newObject[key] = newFilter;
12173 + }
12174 + }
12175 + });
12176 + return newObject;
12177 +};
12178 +function isVariationWithProperties(variation, properties) {
12179 + const variationWithProperties = filterObjectByProperties(
12180 + structuredClone(variation),
12181 + properties
12182 + );
12183 + return areGlobalStylesEqual(variationWithProperties, variation);
12184 +}
12185 +function getFontFamilyFromSetting(fontFamilies, setting) {
12186 + if (!Array.isArray(fontFamilies) || !setting) {
12187 + return null;
12188 + }
12189 + const fontFamilyVariable = setting.replace("var(", "").replace(")", "");
12190 + const fontFamilySlug = fontFamilyVariable?.split("--").slice(-1)[0];
12191 + return fontFamilies.find(
12192 + (fontFamily) => fontFamily.slug === fontFamilySlug
12193 + );
12194 +}
12195 +function getFontFamilies(themeJson) {
12196 + const themeFontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme;
12197 + const customFontFamilies = themeJson?.settings?.typography?.fontFamilies?.custom;
12198 + let fontFamilies = [];
12199 + if (themeFontFamilies && customFontFamilies) {
12200 + fontFamilies = [...themeFontFamilies, ...customFontFamilies];
12201 + } else if (themeFontFamilies) {
12202 + fontFamilies = themeFontFamilies;
12203 + } else if (customFontFamilies) {
12204 + fontFamilies = customFontFamilies;
12205 + }
12206 + const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;
12207 + const bodyFontFamily = getFontFamilyFromSetting(
12208 + fontFamilies,
12209 + bodyFontFamilySetting
12210 + );
12211 + const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily;
12212 + let headingFontFamily;
12213 + if (!headingFontFamilySetting) {
12214 + headingFontFamily = bodyFontFamily;
12215 + } else {
12216 + headingFontFamily = getFontFamilyFromSetting(
12217 + fontFamilies,
12218 + themeJson?.styles?.elements?.heading?.typography?.fontFamily
12219 + );
12220 + }
12221 + return [bodyFontFamily, headingFontFamily];
12222 +}
12223 +
12224 +// packages/global-styles-ui/build-module/hooks.mjs
12225 +function useStyle(path, blockName, readFrom = "merged", shouldDecodeEncode = true, state) {
12226 + const { user, base, merged, onChange } = (0, import_element26.useContext)(GlobalStylesContext);
12227 + const statePathParts = state?.split(".").filter(Boolean) ?? [];
12228 + const pseudoSelectorState = statePathParts.find(
12229 + (value) => value.startsWith(":")
12230 + );
12231 + const statePathWithoutPseudo = statePathParts.filter((value) => !value.startsWith(":")).join(".");
12232 + const stylePath = [path, statePathWithoutPseudo].filter(Boolean).join(".");
12233 + let sourceValue = merged;
12234 + if (readFrom === "base") {
12235 + sourceValue = base;
12236 + } else if (readFrom === "user") {
12237 + sourceValue = user;
12238 + }
12239 + const styleValue = (0, import_element26.useMemo)(() => {
12240 + const rawValue = getStyle(
12241 + sourceValue,
12242 + stylePath,
12243 + blockName,
12244 + shouldDecodeEncode
12245 + );
12246 + if (pseudoSelectorState) {
12247 + return rawValue?.[pseudoSelectorState] ?? {};
12248 + }
12249 + return rawValue;
12250 + }, [
12251 + sourceValue,
12252 + stylePath,
12253 + blockName,
12254 + shouldDecodeEncode,
12255 + pseudoSelectorState
12256 + ]);
12257 + const setStyleValue = (0, import_element26.useCallback)(
12258 + (newValue) => {
12259 + let valueToSet = newValue;
12260 + if (pseudoSelectorState) {
12261 + const fullCurrentValue = getStyle(
12262 + user,
12263 + stylePath,
12264 + blockName,
12265 + false
12266 + );
12267 + valueToSet = {
12268 + ...fullCurrentValue,
12269 + [pseudoSelectorState]: newValue
12270 + };
12271 + }
12272 + const newGlobalStyles = setStyle(
12273 + user,
12274 + stylePath,
12275 + valueToSet,
12276 + blockName
12277 + );
12278 + onChange(newGlobalStyles);
12279 + },
12280 + [user, onChange, stylePath, blockName, pseudoSelectorState]
12281 + );
12282 + return [styleValue, setStyleValue];
12283 +}
12284 +function useSetting(path, blockName, readFrom = "merged") {
12285 + const { user, base, merged, onChange } = (0, import_element26.useContext)(GlobalStylesContext);
12286 + let sourceValue = merged;
12287 + if (readFrom === "base") {
12288 + sourceValue = base;
12289 + } else if (readFrom === "user") {
12290 + sourceValue = user;
12291 + }
12292 + const settingValue = (0, import_element26.useMemo)(
12293 + () => getSetting(sourceValue, path, blockName),
12294 + [sourceValue, path, blockName]
12295 + );
12296 + const setSettingValue = (0, import_element26.useCallback)(
12297 + (newValue) => {
12298 + const newGlobalStyles = setSetting(
12299 + user,
12300 + path,
12301 + newValue,
12302 + blockName
12303 + );
12304 + onChange(newGlobalStyles);
12305 + },
12306 + [user, onChange, path, blockName]
12307 + );
12308 + return [settingValue, setSettingValue];
12309 +}
12310 +var EMPTY_ARRAY2 = [];
12311 +function hasThemeVariation({
12312 + title,
12313 + settings,
12314 + styles
12315 +}) {
12316 + return title === (0, import_i18n8.__)("Default") || Object.keys(settings || {}).length > 0 || Object.keys(styles || {}).length > 0;
12317 +}
12318 +function useCurrentMergeThemeStyleVariationsWithUserConfig(properties = []) {
12319 + const { variationsFromTheme } = (0, import_data2.useSelect)((select) => {
12320 + const _variationsFromTheme = select(
12321 + import_core_data3.store
12322 + ).__experimentalGetCurrentThemeGlobalStylesVariations?.();
12323 + return {
12324 + variationsFromTheme: _variationsFromTheme || EMPTY_ARRAY2
12325 + };
12326 + }, []);
12327 + const { user: userVariation } = (0, import_element26.useContext)(GlobalStylesContext);
12328 + return (0, import_element26.useMemo)(() => {
12329 + const clonedUserVariation = structuredClone(userVariation);
12330 + const userVariationWithoutProperties = removePropertiesFromObject(
12331 + clonedUserVariation,
12332 + properties
12333 + );
12334 + userVariationWithoutProperties.title = (0, import_i18n8.__)("Default");
12335 + const variationsWithPropertiesAndBase = variationsFromTheme.filter((variation) => {
12336 + return isVariationWithProperties(variation, properties);
12337 + }).map((variation) => {
12338 + return mergeGlobalStyles(
12339 + userVariationWithoutProperties,
12340 + variation
12341 + );
12342 + });
12343 + const variationsByProperties = [
12344 + userVariationWithoutProperties,
12345 + ...variationsWithPropertiesAndBase
12346 + ];
12347 + return variationsByProperties?.length ? variationsByProperties.filter(hasThemeVariation) : [];
12348 + }, [properties, userVariation, variationsFromTheme]);
12349 +}
12350 +
12351 +// packages/global-styles-ui/build-module/root-menu.mjs
12352 +var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
12353 +var {
12354 + useHasDimensionsPanel,
12355 + useHasTypographyPanel,
12356 + useHasColorPanel,
12357 + useSettingsForBlockElement,
12358 + useHasBackgroundPanel
12359 +} = unlock4(import_block_editor.privateApis);
12360 +
12361 +// packages/global-styles-ui/build-module/preview-styles.mjs
12362 +var import_components8 = __toESM(require_components(), 1);
12363 +
12364 +// packages/global-styles-ui/build-module/preview-hooks.mjs
12365 +function useStylesPreviewColors() {
12366 + const [textColor = "black"] = useStyle("color.text");
12367 + const [backgroundColor = "white"] = useStyle("color.background");
12368 + const [headingColor = textColor] = useStyle(
12369 + "elements.h1.color.text"
12370 + );
12371 + const [linkColor = headingColor] = useStyle(
12372 + "elements.link.color.text"
12373 + );
12374 + const [buttonBackgroundColor = linkColor] = useStyle(
12375 + "elements.button.color.background"
12376 + );
12377 + const [coreColors] = useSetting("color.palette.core") || [];
12378 + const [themeColors] = useSetting("color.palette.theme") || [];
12379 + const [customColors] = useSetting("color.palette.custom") || [];
12380 + const paletteColors = (themeColors ?? []).concat(customColors ?? []).concat(coreColors ?? []);
12381 + const textColorObject = paletteColors.filter(
12382 + ({ color }) => color === textColor
12383 + );
12384 + const buttonBackgroundColorObject = paletteColors.filter(
12385 + ({ color }) => color === buttonBackgroundColor
12386 + );
12387 + const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter(
12388 + // we exclude these background color because it is already visible in the preview.
12389 + ({ color }) => color !== backgroundColor
12390 + ).slice(0, 2);
12391 + return {
12392 + paletteColors,
12393 + highlightedColors
12394 + };
12395 +}
12396 +
12397 +// packages/global-styles-ui/build-module/typography-example.mjs
12398 +var import_element27 = __toESM(require_element(), 1);
12399 +var import_components5 = __toESM(require_components(), 1);
12400 +var import_i18n10 = __toESM(require_i18n(), 1);
12401 +
12402 +// packages/global-styles-ui/build-module/font-library/utils/preview-styles.mjs
12403 +function findNearest(input, numbers) {
12404 + if (numbers.length === 0) {
12405 + return null;
12406 + }
12407 + numbers.sort((a, b) => Math.abs(input - a) - Math.abs(input - b));
12408 + return numbers[0];
12409 +}
12410 +var FONT_WEIGHT_KEYWORDS = {
12411 + normal: 400,
12412 + bold: 700
12413 +};
12414 +function isValidWeight(weight) {
12415 + return weight !== void 0 && Number.isFinite(weight) && weight >= 1 && weight <= 1e3;
12416 +}
12417 +function resolveFontWeight(fontWeight) {
12418 + const weights = String(fontWeight ?? "").trim().toLowerCase().split(/\s+/).filter(Boolean).map((value) => FONT_WEIGHT_KEYWORDS[value] ?? Number(value));
12419 + const [start, end] = weights;
12420 + if (!isValidWeight(start)) {
12421 + return "400";
12422 + }
12423 + if (weights.length !== 2 || !isValidWeight(end)) {
12424 + return String(start);
12425 + }
12426 + return String(Math.min(Math.max(400, start), end));
12427 +}
12428 +function formatFontFamily(input) {
12429 + const regex = /^(?!generic\([ a-zA-Z\-]+\)$)(?!var\(\s*--[\w-]+\s*\)$)(?!^[a-zA-Z\-]+$).+/;
12430 + const output = input.trim();
12431 + const formatItem = (item) => {
12432 + item = item.trim();
12433 + if (item.match(regex)) {
12434 + item = item.replace(/^["']|["']$/g, "");
12435 + return `"${item}"`;
12436 + }
12437 + return item;
12438 + };
12439 + if (output.includes(",")) {
12440 + return output.split(",").map(formatItem).filter((item) => item !== "").join(", ");
12441 + }
12442 + return formatItem(output);
12443 +}
12444 +function getFamilyPreviewStyle(family) {
12445 + const style = {
12446 + fontFamily: formatFontFamily(family.fontFamily)
12447 + };
12448 + if (!("fontFace" in family) || !Array.isArray(family.fontFace)) {
12449 + style.fontWeight = "400";
12450 + style.fontStyle = "normal";
12451 + return style;
12452 + }
12453 + if (family.fontFace) {
12454 + const normalFaces = family.fontFace.filter(
12455 + (face) => face?.fontStyle && face.fontStyle.toLowerCase() === "normal"
12456 + );
12457 + if (normalFaces.length > 0) {
12458 + style.fontStyle = "normal";
12459 + const normalWeights = normalFaces.map(
12460 + (face) => Number(resolveFontWeight(face.fontWeight))
12461 + );
12462 + style.fontWeight = String(
12463 + findNearest(400, normalWeights) ?? 400
12464 + );
12465 + } else {
12466 + style.fontStyle = family.fontFace.length && family.fontFace[0].fontStyle || "normal";
12467 + style.fontWeight = family.fontFace.length && resolveFontWeight(family.fontFace[0].fontWeight) || "400";
12468 + }
12469 + }
12470 + return style;
12471 +}
12472 +
12473 +// packages/global-styles-ui/build-module/typography-example.mjs
12474 +var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
12475 +function PreviewTypography({
12476 + fontSize,
12477 + variation
12478 +}) {
12479 + const { base } = (0, import_element27.useContext)(GlobalStylesContext);
12480 + let config = base;
12481 + if (variation) {
12482 + config = { ...base, ...variation };
12483 + }
12484 + const [textColor] = useStyle("color.text");
12485 + const [bodyFontFamilies, headingFontFamilies] = getFontFamilies(config);
12486 + const bodyPreviewStyle = bodyFontFamilies ? getFamilyPreviewStyle(bodyFontFamilies) : {};
12487 + const headingPreviewStyle = headingFontFamilies ? getFamilyPreviewStyle(headingFontFamilies) : {};
12488 + if (textColor) {
12489 + bodyPreviewStyle.color = textColor;
12490 + headingPreviewStyle.color = textColor;
12491 + }
12492 + if (fontSize) {
12493 + bodyPreviewStyle.fontSize = fontSize;
12494 + headingPreviewStyle.fontSize = fontSize;
12495 + }
12496 + return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
12497 + import_components5.__unstableMotion.div,
12498 + {
12499 + animate: {
12500 + scale: 1,
12501 + opacity: 1
12502 + },
12503 + initial: {
12504 + scale: 0.1,
12505 + opacity: 0
12506 + },
12507 + transition: {
12508 + delay: 0.3,
12509 + type: "tween"
12510 + },
12511 + style: {
12512 + textAlign: "center",
12513 + lineHeight: 1
12514 + },
12515 + children: [
12516 + /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { style: headingPreviewStyle, children: (0, import_i18n10._x)("A", "Uppercase letter A") }),
12517 + /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { style: bodyPreviewStyle, children: (0, import_i18n10._x)("a", "Lowercase letter A") })
12518 + ]
12519 + }
12520 + );
12521 +}
12522 +
12523 +// packages/global-styles-ui/build-module/highlighted-colors.mjs
12524 +var import_components6 = __toESM(require_components(), 1);
12525 +var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
12526 +function HighlightedColors({
12527 + normalizedColorSwatchSize,
12528 + ratio
12529 +}) {
12530 + const { highlightedColors } = useStylesPreviewColors();
12531 + const scaledSwatchSize = normalizedColorSwatchSize * ratio;
12532 + return highlightedColors.map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12533 + import_components6.__unstableMotion.div,
12534 + {
12535 + style: {
12536 + height: scaledSwatchSize,
12537 + width: scaledSwatchSize,
12538 + background: color,
12539 + borderRadius: scaledSwatchSize / 2
12540 + },
12541 + animate: {
12542 + scale: 1,
12543 + opacity: 1
12544 + },
12545 + initial: {
12546 + scale: 0.1,
12547 + opacity: 0
12548 + },
12549 + transition: {
12550 + delay: index2 === 1 ? 0.2 : 0.1
12551 + }
12552 + },
12553 + `${slug}-${index2}`
12554 + ));
12555 +}
12556 +
12557 +// packages/global-styles-ui/build-module/preview-wrapper.mjs
12558 +var import_components7 = __toESM(require_components(), 1);
12559 +var import_compose2 = __toESM(require_compose(), 1);
12560 +var import_element28 = __toESM(require_element(), 1);
12561 +var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
12562 +var normalizedWidth = 248;
12563 +var normalizedHeight = 152;
12564 +var THROTTLE_OPTIONS = {
12565 + leading: true,
12566 + trailing: true
12567 +};
12568 +function PreviewWrapper({
12569 + children,
12570 + label,
12571 + isFocused,
12572 + withHoverView
12573 +}) {
12574 + const [backgroundColor = "white"] = useStyle("color.background");
12575 + const [gradientValue] = useStyle("color.gradient");
12576 + const disableMotion = (0, import_compose2.useReducedMotion)();
12577 + const [isHovered, setIsHovered] = (0, import_element28.useState)(false);
12578 + const [containerResizeListener, { width }] = (0, import_compose2.useResizeObserver)();
12579 + const [throttledWidth, setThrottledWidthState] = (0, import_element28.useState)(width);
12580 + const [ratioState, setRatioState] = (0, import_element28.useState)();
12581 + const setThrottledWidth = (0, import_compose2.useThrottle)(
12582 + setThrottledWidthState,
12583 + 250,
12584 + THROTTLE_OPTIONS
12585 + );
12586 + (0, import_element28.useLayoutEffect)(() => {
12587 + if (width) {
12588 + setThrottledWidth(width);
12589 + }
12590 + }, [width, setThrottledWidth]);
12591 + (0, import_element28.useLayoutEffect)(() => {
12592 + const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;
12593 + const ratioDiff = newRatio - (ratioState || 0);
12594 + const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1;
12595 + if (isRatioDiffBigEnough || !ratioState) {
12596 + setRatioState(newRatio);
12597 + }
12598 + }, [throttledWidth, ratioState]);
12599 + const fallbackRatio = width ? width / normalizedWidth : 1;
12600 + const ratio = ratioState ? ratioState : fallbackRatio;
12601 + const isReady = !!width;
12602 + return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
12603 + /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { position: "relative" }, children: containerResizeListener }),
12604 + !isReady && // Match the preview aspect ratio so layout doesn't jump once width is measured.
12605 + /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
12606 + Skeleton,
12607 + {
12608 + className: "global-styles-ui-preview__wrapper",
12609 + style: {
12610 + aspectRatio: normalizedWidth / normalizedHeight
12611 + }
12612 + }
12613 + ),
12614 + isReady && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
12615 + "div",
12616 + {
12617 + className: clsx_default("global-styles-ui-preview__wrapper", {
12618 + "is-hoverable": withHoverView
12619 + }),
12620 + style: {
12621 + height: normalizedHeight * ratio
12622 + },
12623 + onMouseEnter: () => setIsHovered(true),
12624 + onMouseLeave: () => setIsHovered(false),
12625 + tabIndex: -1,
12626 + children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
12627 + import_components7.__unstableMotion.div,
12628 + {
12629 + style: {
12630 + height: normalizedHeight * ratio,
12631 + width: "100%",
12632 + background: gradientValue ?? backgroundColor
12633 + },
12634 + initial: "start",
12635 + animate: (isHovered || isFocused) && !disableMotion && label ? "hover" : "start",
12636 + children: [].concat(children).map(
12637 + (child, key) => child({ ratio, key })
12638 + )
12639 + }
12640 + )
12641 + }
12642 + )
12643 + ] });
12644 +}
12645 +var preview_wrapper_default = PreviewWrapper;
12646 +
12647 +// packages/global-styles-ui/build-module/preview-styles.mjs
12648 +var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
12649 +var firstFrameVariants = {
12650 + start: {
12651 + scale: 1,
12652 + opacity: 1
12653 + },
12654 + hover: {
12655 + scale: 0,
12656 + opacity: 0
12657 + }
12658 +};
12659 +var midFrameVariants = {
12660 + hover: {
12661 + opacity: 1
12662 + },
12663 + start: {
12664 + opacity: 0.5
12665 + }
12666 +};
12667 +var secondFrameVariants = {
12668 + hover: {
12669 + scale: 1,
12670 + opacity: 1
12671 + },
12672 + start: {
12673 + scale: 0,
12674 + opacity: 0
12675 + }
12676 +};
12677 +function PreviewStyles({
12678 + label,
12679 + isFocused,
12680 + withHoverView,
12681 + variation
12682 +}) {
12683 + const [fontWeight] = useStyle("typography.fontWeight");
12684 + const [fontFamily = "serif"] = useStyle(
12685 + "typography.fontFamily"
12686 + );
12687 + const [headingFontFamily = fontFamily] = useStyle(
12688 + "elements.h1.typography.fontFamily"
12689 + );
12690 + const [headingFontWeight = fontWeight] = useStyle(
12691 + "elements.h1.typography.fontWeight"
12692 + );
12693 + const [textColor = "black"] = useStyle("color.text");
12694 + const [headingColor = textColor] = useStyle(
12695 + "elements.h1.color.text"
12696 + );
12697 + const { paletteColors } = useStylesPreviewColors();
12698 + return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
12699 + preview_wrapper_default,
12700 + {
12701 + label,
12702 + isFocused,
12703 + withHoverView,
12704 + children: [
12705 + ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12706 + import_components8.__unstableMotion.div,
12707 + {
12708 + variants: firstFrameVariants,
12709 + style: {
12710 + height: "100%",
12711 + overflow: "hidden"
12712 + },
12713 + children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
12714 + import_components8.__experimentalHStack,
12715 + {
12716 + spacing: 10 * ratio,
12717 + justify: "center",
12718 + style: {
12719 + height: "100%",
12720 + overflow: "hidden"
12721 + },
12722 + children: [
12723 + /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12724 + PreviewTypography,
12725 + {
12726 + fontSize: 65 * ratio,
12727 + variation
12728 + }
12729 + ),
12730 + /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components8.__experimentalVStack, { spacing: 4 * ratio, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12731 + HighlightedColors,
12732 + {
12733 + normalizedColorSwatchSize: 32,
12734 + ratio
12735 + }
12736 + ) })
12737 + ]
12738 + }
12739 + )
12740 + },
12741 + key
12742 + ),
12743 + ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12744 + import_components8.__unstableMotion.div,
12745 + {
12746 + variants: withHoverView ? midFrameVariants : void 0,
12747 + style: {
12748 + height: "100%",
12749 + width: "100%",
12750 + position: "absolute",
12751 + top: 0,
12752 + overflow: "hidden",
12753 + filter: "blur(60px)",
12754 + opacity: 0.1
12755 + },
12756 + children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12757 + import_components8.__experimentalHStack,
12758 + {
12759 + spacing: 0,
12760 + justify: "flex-start",
12761 + style: {
12762 + height: "100%",
12763 + overflow: "hidden"
12764 + },
12765 + children: paletteColors.slice(0, 4).map(({ color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12766 + "div",
12767 + {
12768 + style: {
12769 + height: "100%",
12770 + background: color,
12771 + flexGrow: 1
12772 + }
12773 + },
12774 + index2
12775 + ))
12776 + }
12777 + )
12778 + },
12779 + key
12780 + ),
12781 + ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12782 + import_components8.__unstableMotion.div,
12783 + {
12784 + variants: secondFrameVariants,
12785 + style: {
12786 + height: "100%",
12787 + width: "100%",
12788 + overflow: "hidden",
12789 + position: "absolute",
12790 + top: 0
12791 + },
12792 + children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12793 + import_components8.__experimentalVStack,
12794 + {
12795 + spacing: 3 * ratio,
12796 + justify: "center",
12797 + style: {
12798 + height: "100%",
12799 + overflow: "hidden",
12800 + padding: 10 * ratio,
12801 + boxSizing: "border-box"
12802 + },
12803 + children: label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12804 + "div",
12805 + {
12806 + style: {
12807 + fontSize: 40 * ratio,
12808 + fontFamily: headingFontFamily,
12809 + color: headingColor,
12810 + fontWeight: headingFontWeight,
12811 + lineHeight: "1em",
12812 + textAlign: "center"
12813 + },
12814 + children: label
12815 + }
12816 + )
12817 + }
12818 + )
12819 + },
12820 + key
12821 + )
12822 + ]
12823 + }
12824 + );
12825 +}
12826 +var preview_styles_default = PreviewStyles;
12827 +
12828 +// packages/global-styles-ui/build-module/screen-root.mjs
12829 +var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
12830 +
12831 +// packages/global-styles-ui/build-module/screen-block-list.mjs
12832 +var import_blocks2 = __toESM(require_blocks(), 1);
12833 +var import_i18n13 = __toESM(require_i18n(), 1);
12834 +var import_components12 = __toESM(require_components(), 1);
12835 +var import_data5 = __toESM(require_data(), 1);
12836 +var import_element29 = __toESM(require_element(), 1);
12837 +var import_block_editor3 = __toESM(require_block_editor(), 1);
12838 +var import_compose3 = __toESM(require_compose(), 1);
12839 +import { speak } from "@wordpress/a11y";
12840 +
12841 +// packages/global-styles-ui/build-module/variations/variations-panel.mjs
12842 +var import_blocks = __toESM(require_blocks(), 1);
12843 +var import_data4 = __toESM(require_data(), 1);
12844 +var import_components10 = __toESM(require_components(), 1);
12845 +var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
12846 +function getFilteredBlockStyles(blockStyles, variations) {
12847 + return blockStyles?.filter(
12848 + (style) => style.source === "block" || variations.includes(style.name)
12849 + ) || [];
12850 +}
12851 +function useBlockVariations(name2) {
12852 + const blockStyles = (0, import_data4.useSelect)(
12853 + (select) => {
12854 + const { getBlockStyles } = select(import_blocks.store);
12855 + return getBlockStyles(name2);
12856 + },
12857 + [name2]
12858 + );
12859 + const [variations] = useStyle("variations", name2);
12860 + const variationNames = Object.keys(variations ?? {});
12861 + return getFilteredBlockStyles(blockStyles, variationNames);
12862 +}
12863 +
12864 +// packages/global-styles-ui/build-module/screen-header.mjs
12865 +var import_components11 = __toESM(require_components(), 1);
12866 +var import_i18n12 = __toESM(require_i18n(), 1);
12867 +var import_block_editor2 = __toESM(require_block_editor(), 1);
12868 +var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
12869 +var { StateControl, StateControlBadges } = unlock4(import_block_editor2.privateApis);
12870 +
12871 +// packages/global-styles-ui/build-module/screen-block-list.mjs
12872 +var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
12873 +var {
12874 + useHasDimensionsPanel: useHasDimensionsPanel2,
12875 + useHasTypographyPanel: useHasTypographyPanel2,
12876 + useHasBorderPanel,
12877 + useSettingsForBlockElement: useSettingsForBlockElement2,
12878 + useHasColorPanel: useHasColorPanel2,
12879 + useHasBackgroundPanel: useHasBackgroundPanel2,
12880 + searchItems
12881 +} = unlock4(import_block_editor3.privateApis);
12882 +function hasAnyValue(value) {
12883 + if (value === void 0 || value === null) {
12884 + return false;
12885 + }
12886 + if (Array.isArray(value)) {
12887 + return value.length > 0;
12888 + }
12889 + if (typeof value === "object") {
12890 + return Object.values(value).some(hasAnyValue);
12891 + }
12892 + return true;
12893 +}
12894 +function hasUserStylesForBlock(user, blockName) {
12895 + return hasAnyValue(user?.styles?.blocks?.[blockName]) || hasAnyValue(user?.settings?.blocks?.[blockName]);
12896 +}
12897 +function useSortedBlockTypes() {
12898 + const blockItems = (0, import_data5.useSelect)(
12899 + (select) => select(import_blocks2.store).getBlockTypes(),
12900 + []
12901 + );
12902 + const groupByType = (blocks, block) => {
12903 + const { core, noncore } = blocks;
12904 + const type = block.name.startsWith("core/") ? core : noncore;
12905 + type.push(block);
12906 + return blocks;
12907 + };
12908 + const { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(
12909 + groupByType,
12910 + { core: [], noncore: [] }
12911 + );
12912 + return [...coreItems, ...nonCoreItems];
12913 +}
12914 +function useBlockHasGlobalStyles(blockName) {
12915 + const [rawSettings] = useSetting("", blockName);
12916 + const settings = useSettingsForBlockElement2(rawSettings, blockName);
12917 + const hasTypographyPanel = useHasTypographyPanel2(settings);
12918 + const hasColorPanel = useHasColorPanel2(settings);
12919 + const hasBackgroundPanel = useHasBackgroundPanel2(settings);
12920 + const hasBorderPanel = useHasBorderPanel(settings);
12921 + const hasDimensionsPanel = useHasDimensionsPanel2(settings);
12922 + const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
12923 + const hasVariationsPanel = !!useBlockVariations(blockName)?.length;
12924 + const hasGlobalStyles = hasTypographyPanel || hasColorPanel || hasBackgroundPanel || hasLayoutPanel || hasVariationsPanel;
12925 + return hasGlobalStyles;
12926 +}
12927 +function BlockMenuItem({ block, isCustomized }) {
12928 + const hasBlockMenuItem = useBlockHasGlobalStyles(block.name);
12929 + if (!hasBlockMenuItem) {
12930 + return null;
12931 + }
12932 + return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12933 + NavigationButtonAsItem,
12934 + {
12935 + path: "/blocks/" + encodeURIComponent(block.name),
12936 + children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_components12.__experimentalHStack, { justify: "flex-start", spacing: 2, children: [
12937 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12938 + import_block_editor3.BlockIcon,
12939 + {
12940 + className: "global-styles-ui-block-types-item__icon",
12941 + icon: block.icon
12942 + }
12943 + ),
12944 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components12.FlexItem, { children: block.title }),
12945 + isCustomized && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
12946 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(VisuallyHidden, { children: (0, import_i18n13.__)("Has custom styles") }),
12947 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12948 + "span",
12949 + {
12950 + "aria-hidden": "true",
12951 + className: "global-styles-ui-block-types-item__indicator"
12952 + }
12953 + )
12954 + ] })
12955 + ] })
12956 + }
12957 + );
12958 +}
12959 +function EmptyBlockList({
12960 + filterValue,
12961 + styleFilter
12962 +}) {
12963 + const label = "customized" === styleFilter && !filterValue ? (0, import_i18n13.__)("You haven't customized any blocks yet.") : (0, import_i18n13.__)("No blocks found.");
12964 + return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12965 + import_components12.__experimentalText,
12966 + {
12967 + align: "center",
12968 + as: "p",
12969 + className: "global-styles-ui-block-types-item-list__no-results",
12970 + children: label
12971 + }
12972 + );
12973 +}
12974 +function BlockList({ filterValue, styleFilter }) {
12975 + const sortedBlockTypes = useSortedBlockTypes();
12976 + const debouncedSpeak = (0, import_compose3.useDebounce)(speak, 500);
12977 + const { user } = (0, import_element29.useContext)(GlobalStylesContext);
12978 + const customizedBlockNames = (0, import_element29.useMemo)(() => {
12979 + const names = /* @__PURE__ */ new Set();
12980 + const blockNames = [
12981 + ...Object.keys(user?.styles?.blocks ?? {}),
12982 + ...Object.keys(user?.settings?.blocks ?? {})
12983 + ];
12984 + blockNames.forEach((blockName) => {
12985 + if (hasUserStylesForBlock(user, blockName)) {
12986 + names.add(blockName);
12987 + }
12988 + });
12989 + return names;
12990 + }, [user]);
12991 + const searchedBlockTypes = searchItems(
12992 + sortedBlockTypes,
12993 + filterValue
12994 + );
12995 + const filteredBlockTypes = styleFilter === "customized" ? searchedBlockTypes.filter(
12996 + (blockType) => customizedBlockNames.has(blockType.name)
12997 + ) : searchedBlockTypes;
12998 + const blockTypesListRef = (0, import_element29.useRef)(null);
12999 + const hasResults = filteredBlockTypes.length > 0;
13000 + (0, import_element29.useEffect)(() => {
13001 + if (!filterValue && styleFilter === "all") {
13002 + return;
13003 + }
13004 + const count = hasResults ? blockTypesListRef.current?.childElementCount || 0 : 0;
13005 + const resultsFoundMessage = (0, import_i18n13.sprintf)(
13006 + /* translators: %d: number of results. */
13007 + (0, import_i18n13._n)("%d result found.", "%d results found.", count),
13008 + count
13009 + );
13010 + debouncedSpeak(resultsFoundMessage, "polite");
13011 + }, [filterValue, styleFilter, hasResults, debouncedSpeak]);
13012 + return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
13013 + "div",
13014 + {
13015 + ref: blockTypesListRef,
13016 + className: "global-styles-ui-block-types-item-list",
13017 + role: "list",
13018 + children: filteredBlockTypes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
13019 + EmptyBlockList,
1187 13020 {
1188 - size: "compact",
1189 - isPressed: isStyleBookOpened,
1190 - icon: seen_default,
1191 - label: (0, import_i18n.__)("Style Book"),
1192 - onClick: () => {
1193 - const newIsStyleBookOpened = !isStyleBookOpened;
1194 - setIsStyleBookOpened(newIsStyleBookOpened);
1195 - navigate({
1196 - search: newIsStyleBookOpened ? { ...search, preview: "stylebook" } : (() => {
1197 - const {
1198 - preview,
1199 - ...restSearch
1200 - } = search;
1201 - return restSearch;
1202 - })()
1203 - });
13021 + filterValue,
13022 + styleFilter
13023 + }
13024 + ) : filteredBlockTypes.map((block) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
13025 + BlockMenuItem,
13026 + {
13027 + block,
13028 + isCustomized: customizedBlockNames.has(block.name)
13029 + },
13030 + "menu-itemblock-" + block.name
13031 + ))
13032 + }
13033 + );
13034 +}
13035 +var MemoizedBlockList = (0, import_element29.memo)(BlockList);
13036 +
13037 +// packages/global-styles-ui/build-module/screen-block.mjs
13038 +var import_blocks4 = __toESM(require_blocks(), 1);
13039 +var import_block_editor5 = __toESM(require_block_editor(), 1);
13040 +var import_element31 = __toESM(require_element(), 1);
13041 +var import_data6 = __toESM(require_data(), 1);
13042 +var import_core_data5 = __toESM(require_core_data(), 1);
13043 +var import_components15 = __toESM(require_components(), 1);
13044 +var import_i18n14 = __toESM(require_i18n(), 1);
13045 +
13046 +// packages/global-styles-ui/build-module/block-preview-panel.mjs
13047 +var import_block_editor4 = __toESM(require_block_editor(), 1);
13048 +var import_blocks3 = __toESM(require_blocks(), 1);
13049 +var import_components13 = __toESM(require_components(), 1);
13050 +var import_element30 = __toESM(require_element(), 1);
13051 +var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
13052 +var { getViewportBreakpoints: getViewportBreakpoints3, getViewportBreakpointValueInPixels: getViewportBreakpointValueInPixels2 } = unlock4(
13053 + privateApis
13054 +);
13055 +
13056 +// packages/global-styles-ui/build-module/subtitle.mjs
13057 +var import_components14 = __toESM(require_components(), 1);
13058 +var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
13059 +function Subtitle({ children, level = 2 }) {
13060 + return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components14.__experimentalHeading, { className: "global-styles-ui-subtitle", level, children });
13061 +}
13062 +
13063 +// packages/global-styles-ui/build-module/screen-block.mjs
13064 +var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
13065 +var {
13066 + useHasDimensionsPanel: useHasDimensionsPanel3,
13067 + useHasTypographyPanel: useHasTypographyPanel3,
13068 + useHasBorderPanel: useHasBorderPanel2,
13069 + useSettingsForBlockElement: useSettingsForBlockElement3,
13070 + useHasColorPanel: useHasColorPanel3,
13071 + useHasFiltersPanel,
13072 + useHasImageSettingsPanel,
13073 + useHasBackgroundPanel: useHasBackgroundPanel3,
13074 + BackgroundPanel: StylesBackgroundPanel,
13075 + BorderPanel: StylesBorderPanel,
13076 + ColorPanel: StylesColorPanel,
13077 + TypographyPanel: StylesTypographyPanel,
13078 + DimensionsPanel: StylesDimensionsPanel,
13079 + FiltersPanel: StylesFiltersPanel,
13080 + ImageSettingsPanel,
13081 + AdvancedPanel: StylesAdvancedPanel
13082 +} = unlock4(import_block_editor5.privateApis);
13083 +
13084 +// packages/global-styles-ui/build-module/screen-typography.mjs
13085 +var import_i18n29 = __toESM(require_i18n(), 1);
13086 +var import_element43 = __toESM(require_element(), 1);
13087 +
13088 +// packages/global-styles-ui/build-module/screen-body.mjs
13089 +var import_components16 = __toESM(require_components(), 1);
13090 +var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
13091 +
13092 +// packages/global-styles-ui/build-module/typography-elements.mjs
13093 +var import_i18n15 = __toESM(require_i18n(), 1);
13094 +var import_components17 = __toESM(require_components(), 1);
13095 +var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
13096 +
13097 +// packages/global-styles-ui/build-module/variations/variations-typography.mjs
13098 +var import_components19 = __toESM(require_components(), 1);
13099 +
13100 +// packages/global-styles-ui/build-module/preview-typography.mjs
13101 +var import_components18 = __toESM(require_components(), 1);
13102 +var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
13103 +var StylesPreviewTypography = ({
13104 + variation,
13105 + isFocused,
13106 + withHoverView
13107 +}) => {
13108 + return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13109 + preview_wrapper_default,
13110 + {
13111 + label: variation.title,
13112 + isFocused,
13113 + withHoverView,
13114 + children: ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13115 + import_components18.__experimentalHStack,
13116 + {
13117 + spacing: 10 * ratio,
13118 + justify: "center",
13119 + style: {
13120 + height: "100%",
13121 + overflow: "hidden"
13122 + },
13123 + children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13124 + PreviewTypography,
13125 + {
13126 + variation,
13127 + fontSize: 85 * ratio
13128 + }
13129 + )
13130 + },
13131 + key
13132 + )
13133 + }
13134 + );
13135 +};
13136 +var preview_typography_default = StylesPreviewTypography;
13137 +
13138 +// packages/global-styles-ui/build-module/variations/variation.mjs
13139 +var import_element32 = __toESM(require_element(), 1);
13140 +var import_keycodes = __toESM(require_keycodes(), 1);
13141 +var import_i18n16 = __toESM(require_i18n(), 1);
13142 +var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
13143 +function Variation({
13144 + variation,
13145 + children,
13146 + isPill = false,
13147 + properties,
13148 + showTooltip = false
13149 +}) {
13150 + const [isFocused, setIsFocused] = (0, import_element32.useState)(false);
13151 + const {
13152 + base,
13153 + user,
13154 + onChange: setUserConfig
13155 + } = (0, import_element32.useContext)(GlobalStylesContext);
13156 + const context = (0, import_element32.useMemo)(() => {
13157 + let merged = mergeGlobalStyles(base, variation);
13158 + if (properties) {
13159 + merged = filterObjectByProperties(merged, properties);
13160 + }
13161 + return {
13162 + user: variation,
13163 + base,
13164 + merged,
13165 + onChange: () => {
13166 + }
13167 + };
13168 + }, [variation, base, properties]);
13169 + const selectVariation = () => setUserConfig(variation);
13170 + const selectOnEnter = (event) => {
13171 + if (event.keyCode === import_keycodes.ENTER) {
13172 + event.preventDefault();
13173 + selectVariation();
13174 + }
13175 + };
13176 + const isActive = (0, import_element32.useMemo)(
13177 + () => areGlobalStylesEqual(user, variation),
13178 + [user, variation]
13179 + );
13180 + let label = variation?.title;
13181 + if (variation?.description) {
13182 + label = (0, import_i18n16.sprintf)(
13183 + /* translators: 1: variation title. 2: variation description. */
13184 + (0, import_i18n16._x)("%1$s (%2$s)", "variation label"),
13185 + variation?.title,
13186 + variation?.description
13187 + );
13188 + }
13189 + const content = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13190 + "div",
13191 + {
13192 + className: clsx_default("global-styles-ui-variations_item", {
13193 + "is-active": isActive
13194 + }),
13195 + role: "button",
13196 + onClick: selectVariation,
13197 + onKeyDown: selectOnEnter,
13198 + tabIndex: 0,
13199 + "aria-label": label,
13200 + "aria-current": isActive,
13201 + onFocus: () => setIsFocused(true),
13202 + onBlur: () => setIsFocused(false),
13203 + children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13204 + "div",
13205 + {
13206 + className: clsx_default("global-styles-ui-variations_item-preview", {
13207 + "is-pill": isPill
13208 + }),
13209 + children: children(isFocused)
13210 + }
13211 + )
13212 + }
13213 + );
13214 + return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(GlobalStylesContext.Provider, { value: context, children: showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(tooltip_exports.Root, { children: [
13215 + /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(tooltip_exports.Trigger, { render: content }),
13216 + /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(tooltip_exports.Popup, { children: variation?.title })
13217 + ] }) : content });
13218 +}
13219 +
13220 +// packages/global-styles-ui/build-module/variations/variations-typography.mjs
13221 +var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
13222 +var propertiesToFilter = ["typography"];
13223 +function TypographyVariations({
13224 + title,
13225 + gap = 2
13226 +}) {
13227 + const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter);
13228 + if (typographyVariations?.length <= 1) {
13229 + return null;
13230 + }
13231 + return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_components19.__experimentalVStack, { spacing: 3, children: [
13232 + title && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Subtitle, { level: 3, children: title }),
13233 + /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13234 + import_components19.__experimentalGrid,
13235 + {
13236 + columns: 3,
13237 + gap,
13238 + className: "global-styles-ui-style-variations-container",
13239 + children: typographyVariations.map(
13240 + (variation, index2) => {
13241 + return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13242 + Variation,
13243 + {
13244 + variation,
13245 + properties: propertiesToFilter,
13246 + showTooltip: true,
13247 + children: () => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13248 + preview_typography_default,
13249 + {
13250 + variation
13251 + }
13252 + )
13253 + },
13254 + index2
13255 + );
1204 13256 }
13257 + )
13258 + }
13259 + )
13260 + ] });
13261 +}
13262 +
13263 +// packages/global-styles-ui/build-module/font-families.mjs
13264 +var import_i18n26 = __toESM(require_i18n(), 1);
13265 +var import_components29 = __toESM(require_components(), 1);
13266 +var import_element42 = __toESM(require_element(), 1);
13267 +
13268 +// packages/global-styles-ui/build-module/font-library/context.mjs
13269 +var import_element33 = __toESM(require_element(), 1);
13270 +var import_data7 = __toESM(require_data(), 1);
13271 +var import_core_data7 = __toESM(require_core_data(), 1);
13272 +var import_i18n18 = __toESM(require_i18n(), 1);
13273 +
13274 +// packages/global-styles-ui/build-module/font-library/api.mjs
13275 +var import_api_fetch2 = __toESM(require_api_fetch(), 1);
13276 +var import_core_data6 = __toESM(require_core_data(), 1);
13277 +
13278 +// packages/global-styles-ui/build-module/font-library/utils/constants.mjs
13279 +var import_i18n17 = __toESM(require_i18n(), 1);
13280 +var FONT_WEIGHTS = {
13281 + 100: (0, import_i18n17._x)("Thin", "font weight"),
13282 + 200: (0, import_i18n17._x)("Extra-light", "font weight"),
13283 + 300: (0, import_i18n17._x)("Light", "font weight"),
13284 + 400: (0, import_i18n17._x)("Normal", "font weight"),
13285 + 500: (0, import_i18n17._x)("Medium", "font weight"),
13286 + 600: (0, import_i18n17._x)("Semi-bold", "font weight"),
13287 + 700: (0, import_i18n17._x)("Bold", "font weight"),
13288 + 800: (0, import_i18n17._x)("Extra-bold", "font weight"),
13289 + 900: (0, import_i18n17._x)("Black", "font weight")
13290 +};
13291 +var FONT_STYLES = {
13292 + normal: (0, import_i18n17._x)("Normal", "font style"),
13293 + italic: (0, import_i18n17._x)("Italic", "font style")
13294 +};
13295 +
13296 +// packages/global-styles-ui/build-module/font-library/utils/index.mjs
13297 +var { File } = window;
13298 +
13299 +// packages/global-styles-ui/build-module/font-library/context.mjs
13300 +var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
13301 +var FontLibraryContext = (0, import_element33.createContext)(
13302 + {}
13303 +);
13304 +FontLibraryContext.displayName = "FontLibraryContext";
13305 +
13306 +// packages/global-styles-ui/build-module/font-library/modal.mjs
13307 +var import_i18n24 = __toESM(require_i18n(), 1);
13308 +var import_components27 = __toESM(require_components(), 1);
13309 +var import_core_data10 = __toESM(require_core_data(), 1);
13310 +var import_data9 = __toESM(require_data(), 1);
13311 +
13312 +// packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
13313 +var import_components22 = __toESM(require_components(), 1);
13314 +var import_core_data8 = __toESM(require_core_data(), 1);
13315 +var import_data8 = __toESM(require_data(), 1);
13316 +var import_element37 = __toESM(require_element(), 1);
13317 +var import_i18n20 = __toESM(require_i18n(), 1);
13318 +
13319 +// packages/global-styles-ui/build-module/font-library/font-card.mjs
13320 +var import_i18n19 = __toESM(require_i18n(), 1);
13321 +var import_element35 = __toESM(require_element(), 1);
13322 +var import_components20 = __toESM(require_components(), 1);
13323 +
13324 +// packages/global-styles-ui/build-module/font-library/font-demo.mjs
13325 +var import_element34 = __toESM(require_element(), 1);
13326 +var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
13327 +
13328 +// packages/global-styles-ui/build-module/font-library/font-card.mjs
13329 +var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
13330 +
13331 +// packages/global-styles-ui/build-module/font-library/library-font-variant.mjs
13332 +var import_element36 = __toESM(require_element(), 1);
13333 +var import_components21 = __toESM(require_components(), 1);
13334 +var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
13335 +
13336 +// packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
13337 +var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
13338 +
13339 +// packages/global-styles-ui/build-module/font-library/font-collection.mjs
13340 +var import_element39 = __toESM(require_element(), 1);
13341 +var import_components25 = __toESM(require_components(), 1);
13342 +var import_compose4 = __toESM(require_compose(), 1);
13343 +var import_i18n22 = __toESM(require_i18n(), 1);
13344 +var import_core_data9 = __toESM(require_core_data(), 1);
13345 +
13346 +// packages/global-styles-ui/build-module/font-library/google-fonts-confirm-dialog.mjs
13347 +var import_i18n21 = __toESM(require_i18n(), 1);
13348 +var import_components23 = __toESM(require_components(), 1);
13349 +var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
13350 +
13351 +// packages/global-styles-ui/build-module/font-library/collection-font-variant.mjs
13352 +var import_element38 = __toESM(require_element(), 1);
13353 +var import_components24 = __toESM(require_components(), 1);
13354 +var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
13355 +
13356 +// packages/global-styles-ui/build-module/font-library/font-collection.mjs
13357 +var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
13358 +var DEFAULT_CATEGORY = {
13359 + slug: "all",
13360 + name: (0, import_i18n22._x)("All", "font categories")
13361 +};
13362 +
13363 +// packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
13364 +var import_i18n23 = __toESM(require_i18n(), 1);
13365 +var import_components26 = __toESM(require_components(), 1);
13366 +var import_element40 = __toESM(require_element(), 1);
13367 +
13368 +// packages/global-styles-ui/build-module/font-library/lib/unbrotli.mjs
13369 +var __require2 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
13370 + get: (a, b) => (typeof __require !== "undefined" ? __require : a)[b]
13371 +}) : x2)(function(x2) {
13372 + if (typeof __require !== "undefined") return __require.apply(this, arguments);
13373 + throw Error('Dynamic require of "' + x2 + '" is not supported');
13374 +});
13375 +var unbrotli_default = (function() {
13376 + var define, module, exports;
13377 + return (/* @__PURE__ */ (function() {
13378 + function r2(e, n, t) {
13379 + function o(i2, f) {
13380 + if (!n[i2]) {
13381 + if (!e[i2]) {
13382 + var c2 = "function" == typeof __require2 && __require2;
13383 + if (!f && c2) return c2(i2, true);
13384 + if (u) return u(i2, true);
13385 + var a = new Error("Cannot find module '" + i2 + "'");
13386 + throw a.code = "MODULE_NOT_FOUND", a;
13387 + }
13388 + var p3 = n[i2] = { exports: {} };
13389 + e[i2][0].call(
13390 + p3.exports,
13391 + function(r22) {
13392 + var n2 = e[i2][1][r22];
13393 + return o(n2 || r22);
13394 + },
13395 + p3,
13396 + p3.exports,
13397 + r2,
13398 + e,
13399 + n,
13400 + t
13401 + );
1205 13402 }
1206 - ), /* @__PURE__ */ React.createElement(
1207 - GlobalStylesActionMenu,
13403 + return n[i2].exports;
13404 + }
13405 + for (var u = "function" == typeof __require2 && __require2, i = 0; i < t.length; i++)
13406 + o(t[i]);
13407 + return o;
13408 + }
13409 + return r2;
13410 + })())(
13411 + {
13412 + 1: [
13413 + function(require2, module2, exports2) {
13414 + var BROTLI_READ_SIZE = 4096;
13415 + var BROTLI_IBUF_SIZE = 2 * BROTLI_READ_SIZE + 32;
13416 + var BROTLI_IBUF_MASK = 2 * BROTLI_READ_SIZE - 1;
13417 + var kBitMask = new Uint32Array([
13418 + 0,
13419 + 1,
13420 + 3,
13421 + 7,
13422 + 15,
13423 + 31,
13424 + 63,
13425 + 127,
13426 + 255,
13427 + 511,
13428 + 1023,
13429 + 2047,
13430 + 4095,
13431 + 8191,
13432 + 16383,
13433 + 32767,
13434 + 65535,
13435 + 131071,
13436 + 262143,
13437 + 524287,
13438 + 1048575,
13439 + 2097151,
13440 + 4194303,
13441 + 8388607,
13442 + 16777215
13443 + ]);
13444 + function BrotliBitReader(input) {
13445 + this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE);
13446 + this.input_ = input;
13447 + this.reset();
13448 + }
13449 + BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE;
13450 + BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK;
13451 + BrotliBitReader.prototype.reset = function() {
13452 + this.buf_ptr_ = 0;
13453 + this.val_ = 0;
13454 + this.pos_ = 0;
13455 + this.bit_pos_ = 0;
13456 + this.bit_end_pos_ = 0;
13457 + this.eos_ = 0;
13458 + this.readMoreInput();
13459 + for (var i = 0; i < 4; i++) {
13460 + this.val_ |= this.buf_[this.pos_] << 8 * i;
13461 + ++this.pos_;
13462 + }
13463 + return this.bit_end_pos_ > 0;
13464 + };
13465 + BrotliBitReader.prototype.readMoreInput = function() {
13466 + if (this.bit_end_pos_ > 256) {
13467 + return;
13468 + } else if (this.eos_) {
13469 + if (this.bit_pos_ > this.bit_end_pos_)
13470 + throw new Error(
13471 + "Unexpected end of input " + this.bit_pos_ + " " + this.bit_end_pos_
13472 + );
13473 + } else {
13474 + var dst = this.buf_ptr_;
13475 + var bytes_read = this.input_.read(
13476 + this.buf_,
13477 + dst,
13478 + BROTLI_READ_SIZE
13479 + );
13480 + if (bytes_read < 0) {
13481 + throw new Error("Unexpected end of input");
13482 + }
13483 + if (bytes_read < BROTLI_READ_SIZE) {
13484 + this.eos_ = 1;
13485 + for (var p3 = 0; p3 < 32; p3++)
13486 + this.buf_[dst + bytes_read + p3] = 0;
13487 + }
13488 + if (dst === 0) {
13489 + for (var p3 = 0; p3 < 32; p3++)
13490 + this.buf_[(BROTLI_READ_SIZE << 1) + p3] = this.buf_[p3];
13491 + this.buf_ptr_ = BROTLI_READ_SIZE;
13492 + } else {
13493 + this.buf_ptr_ = 0;
13494 + }
13495 + this.bit_end_pos_ += bytes_read << 3;
13496 + }
13497 + };
13498 + BrotliBitReader.prototype.fillBitWindow = function() {
13499 + while (this.bit_pos_ >= 8) {
13500 + this.val_ >>>= 8;
13501 + this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24;
13502 + ++this.pos_;
13503 + this.bit_pos_ = this.bit_pos_ - 8 >>> 0;
13504 + this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0;
13505 + }
13506 + };
13507 + BrotliBitReader.prototype.readBits = function(n_bits) {
13508 + if (32 - this.bit_pos_ < n_bits) {
13509 + this.fillBitWindow();
13510 + }
13511 + var val = this.val_ >>> this.bit_pos_ & kBitMask[n_bits];
13512 + this.bit_pos_ += n_bits;
13513 + return val;
13514 + };
13515 + module2.exports = BrotliBitReader;
13516 + },
13517 + {}
13518 + ],
13519 + 2: [
13520 + function(require2, module2, exports2) {
13521 + var CONTEXT_LSB6 = 0;
13522 + var CONTEXT_MSB6 = 1;
13523 + var CONTEXT_UTF8 = 2;
13524 + var CONTEXT_SIGNED = 3;
13525 + exports2.lookup = new Uint8Array([
13526 + /* CONTEXT_UTF8, last byte. */
13527 + /* ASCII range. */
13528 + 0,
13529 + 0,
13530 + 0,
13531 + 0,
13532 + 0,
13533 + 0,
13534 + 0,
13535 + 0,
13536 + 0,
13537 + 4,
13538 + 4,
13539 + 0,
13540 + 0,
13541 + 4,
13542 + 0,
13543 + 0,
13544 + 0,
13545 + 0,
13546 + 0,
13547 + 0,
13548 + 0,
13549 + 0,
13550 + 0,
13551 + 0,
13552 + 0,
13553 + 0,
13554 + 0,
13555 + 0,
13556 + 0,
13557 + 0,
13558 + 0,
13559 + 0,
13560 + 8,
13561 + 12,
13562 + 16,
13563 + 12,
13564 + 12,
13565 + 20,
13566 + 12,
13567 + 16,
13568 + 24,
13569 + 28,
13570 + 12,
13571 + 12,
13572 + 32,
13573 + 12,
13574 + 36,
13575 + 12,
13576 + 44,
13577 + 44,
13578 + 44,
13579 + 44,
13580 + 44,
13581 + 44,
13582 + 44,
13583 + 44,
13584 + 44,
13585 + 44,
13586 + 32,
13587 + 32,
13588 + 24,
13589 + 40,
13590 + 28,
13591 + 12,
13592 + 12,
13593 + 48,
13594 + 52,
13595 + 52,
13596 + 52,
13597 + 48,
13598 + 52,
13599 + 52,
13600 + 52,
13601 + 48,
13602 + 52,
13603 + 52,
13604 + 52,
13605 + 52,
13606 + 52,
13607 + 48,
13608 + 52,
13609 + 52,
13610 + 52,
13611 + 52,
13612 + 52,
13613 + 48,
13614 + 52,
13615 + 52,
13616 + 52,
13617 + 52,
13618 + 52,
13619 + 24,
13620 + 12,
13621 + 28,
13622 + 12,
13623 + 12,
13624 + 12,
13625 + 56,
13626 + 60,
13627 + 60,
13628 + 60,
13629 + 56,
13630 + 60,
13631 + 60,
13632 + 60,
13633 + 56,
13634 + 60,
13635 + 60,
13636 + 60,
13637 + 60,
13638 + 60,
13639 + 56,
13640 + 60,
13641 + 60,
13642 + 60,
13643 + 60,
13644 + 60,
13645 + 56,
13646 + 60,
13647 + 60,
13648 + 60,
13649 + 60,
13650 + 60,
13651 + 24,
13652 + 12,
13653 + 28,
13654 + 12,
13655 + 0,
13656 + /* UTF8 continuation byte range. */
13657 + 0,
13658 + 1,
13659 + 0,
13660 + 1,
13661 + 0,
13662 + 1,
13663 + 0,
13664 + 1,
13665 + 0,
13666 + 1,
13667 + 0,
13668 + 1,
13669 + 0,
13670 + 1,
13671 + 0,
13672 + 1,
13673 + 0,
13674 + 1,
13675 + 0,
13676 + 1,
13677 + 0,
13678 + 1,
13679 + 0,
13680 + 1,
13681 + 0,
13682 + 1,
13683 + 0,
13684 + 1,
13685 + 0,
13686 + 1,
13687 + 0,
13688 + 1,
13689 + 0,
13690 + 1,
13691 + 0,
13692 + 1,
13693 + 0,
13694 + 1,
13695 + 0,
13696 + 1,
13697 + 0,
13698 + 1,
13699 + 0,
13700 + 1,
13701 + 0,
13702 + 1,
13703 + 0,
13704 + 1,
13705 + 0,
13706 + 1,
13707 + 0,
13708 + 1,
13709 + 0,
13710 + 1,
13711 + 0,
13712 + 1,
13713 + 0,
13714 + 1,
13715 + 0,
13716 + 1,
13717 + 0,
13718 + 1,
13719 + 0,
13720 + 1,
13721 + 2,
13722 + 3,
13723 + 2,
13724 + 3,
13725 + 2,
13726 + 3,
13727 + 2,
13728 + 3,
13729 + 2,
13730 + 3,
13731 + 2,
13732 + 3,
13733 + 2,
13734 + 3,
13735 + 2,
13736 + 3,
13737 + 2,
13738 + 3,
13739 + 2,
13740 + 3,
13741 + 2,
13742 + 3,
13743 + 2,
13744 + 3,
13745 + 2,
13746 + 3,
13747 + 2,
13748 + 3,
13749 + 2,
13750 + 3,
13751 + 2,
13752 + 3,
13753 + 2,
13754 + 3,
13755 + 2,
13756 + 3,
13757 + 2,
13758 + 3,
13759 + 2,
13760 + 3,
13761 + 2,
13762 + 3,
13763 + 2,
13764 + 3,
13765 + 2,
13766 + 3,
13767 + 2,
13768 + 3,
13769 + 2,
13770 + 3,
13771 + 2,
13772 + 3,
13773 + 2,
13774 + 3,
13775 + 2,
13776 + 3,
13777 + 2,
13778 + 3,
13779 + 2,
13780 + 3,
13781 + 2,
13782 + 3,
13783 + 2,
13784 + 3,
13785 + /* ASCII range. */
13786 + 0,
13787 + 0,
13788 + 0,
13789 + 0,
13790 + 0,
13791 + 0,
13792 + 0,
13793 + 0,
13794 + 0,
13795 + 0,
13796 + 0,
13797 + 0,
13798 + 0,
13799 + 0,
13800 + 0,
13801 + 0,
13802 + 0,
13803 + 0,
13804 + 0,
13805 + 0,
13806 + 0,
13807 + 0,
13808 + 0,
13809 + 0,
13810 + 0,
13811 + 0,
13812 + 0,
13813 + 0,
13814 + 0,
13815 + 0,
13816 + 0,
13817 + 0,
13818 + 0,
13819 + 1,
13820 + 1,
13821 + 1,
13822 + 1,
13823 + 1,
13824 + 1,
13825 + 1,
13826 + 1,
13827 + 1,
13828 + 1,
13829 + 1,
13830 + 1,
13831 + 1,
13832 + 1,
13833 + 1,
13834 + 2,
13835 + 2,
13836 + 2,
13837 + 2,
13838 + 2,
13839 + 2,
13840 + 2,
13841 + 2,
13842 + 2,
13843 + 2,
13844 + 1,
13845 + 1,
13846 + 1,
13847 + 1,
13848 + 1,
13849 + 1,
13850 + 1,
13851 + 2,
13852 + 2,
13853 + 2,
13854 + 2,
13855 + 2,
13856 + 2,
13857 + 2,
13858 + 2,
13859 + 2,
13860 + 2,
13861 + 2,
13862 + 2,
13863 + 2,
13864 + 2,
13865 + 2,
13866 + 2,
13867 + 2,
13868 + 2,
13869 + 2,
13870 + 2,
13871 + 2,
13872 + 2,
13873 + 2,
13874 + 2,
13875 + 2,
13876 + 2,
13877 + 1,
13878 + 1,
13879 + 1,
13880 + 1,
13881 + 1,
13882 + 1,
13883 + 3,
13884 + 3,
13885 + 3,
13886 + 3,
13887 + 3,
13888 + 3,
13889 + 3,
13890 + 3,
13891 + 3,
13892 + 3,
13893 + 3,
13894 + 3,
13895 + 3,
13896 + 3,
13897 + 3,
13898 + 3,
13899 + 3,
13900 + 3,
13901 + 3,
13902 + 3,
13903 + 3,
13904 + 3,
13905 + 3,
13906 + 3,
13907 + 3,
13908 + 3,
13909 + 1,
13910 + 1,
13911 + 1,
13912 + 1,
13913 + 0,
13914 + /* UTF8 continuation byte range. */
13915 + 0,
13916 + 0,
13917 + 0,
13918 + 0,
13919 + 0,
13920 + 0,
13921 + 0,
13922 + 0,
13923 + 0,
13924 + 0,
13925 + 0,
13926 + 0,
13927 + 0,
13928 + 0,
13929 + 0,
13930 + 0,
13931 + 0,
13932 + 0,
13933 + 0,
13934 + 0,
13935 + 0,
13936 + 0,
13937 + 0,
13938 + 0,
13939 + 0,
13940 + 0,
13941 + 0,
13942 + 0,
13943 + 0,
13944 + 0,
13945 + 0,
13946 + 0,
13947 + 0,
13948 + 0,
13949 + 0,
13950 + 0,
13951 + 0,
13952 + 0,
13953 + 0,
13954 + 0,
13955 + 0,
13956 + 0,
13957 + 0,
13958 + 0,
13959 + 0,
13960 + 0,
13961 + 0,
13962 + 0,
13963 + 0,
13964 + 0,
13965 + 0,
13966 + 0,
13967 + 0,
13968 + 0,
13969 + 0,
13970 + 0,
13971 + 0,
13972 + 0,
13973 + 0,
13974 + 0,
13975 + 0,
13976 + 0,
13977 + 0,
13978 + 0,
13979 + 0,
13980 + 0,
13981 + 0,
13982 + 0,
13983 + 0,
13984 + 0,
13985 + 0,
13986 + 0,
13987 + 0,
13988 + 0,
13989 + 0,
13990 + 0,
13991 + 0,
13992 + 0,
13993 + 0,
13994 + 0,
13995 + 0,
13996 + 0,
13997 + 0,
13998 + 0,
13999 + 0,
14000 + 0,
14001 + 0,
14002 + 0,
14003 + 0,
14004 + 0,
14005 + 0,
14006 + 0,
14007 + 0,
14008 + 0,
14009 + 0,
14010 + 0,
14011 + 2,
14012 + 2,
14013 + 2,
14014 + 2,
14015 + 2,
14016 + 2,
14017 + 2,
14018 + 2,
14019 + 2,
14020 + 2,
14021 + 2,
14022 + 2,
14023 + 2,
14024 + 2,
14025 + 2,
14026 + 2,
14027 + 2,
14028 + 2,
14029 + 2,
14030 + 2,
14031 + 2,
14032 + 2,
14033 + 2,
14034 + 2,
14035 + 2,
14036 + 2,
14037 + 2,
14038 + 2,
14039 + 2,
14040 + 2,
14041 + 2,
14042 + 2,
14043 + 0,
14044 + 1,
14045 + 1,
14046 + 1,
14047 + 1,
14048 + 1,
14049 + 1,
14050 + 1,
14051 + 1,
14052 + 1,
14053 + 1,
14054 + 1,
14055 + 1,
14056 + 1,
14057 + 1,
14058 + 1,
14059 + 2,
14060 + 2,
14061 + 2,
14062 + 2,
14063 + 2,
14064 + 2,
14065 + 2,
14066 + 2,
14067 + 2,
14068 + 2,
14069 + 2,
14070 + 2,
14071 + 2,
14072 + 2,
14073 + 2,
14074 + 2,
14075 + 2,
14076 + 2,
14077 + 2,
14078 + 2,
14079 + 2,
14080 + 2,
14081 + 2,
14082 + 2,
14083 + 2,
14084 + 2,
14085 + 2,
14086 + 2,
14087 + 2,
14088 + 2,
14089 + 2,
14090 + 2,
14091 + 2,
14092 + 2,
14093 + 2,
14094 + 2,
14095 + 2,
14096 + 2,
14097 + 2,
14098 + 2,
14099 + 2,
14100 + 2,
14101 + 2,
14102 + 2,
14103 + 2,
14104 + 2,
14105 + 2,
14106 + 2,
14107 + 3,
14108 + 3,
14109 + 3,
14110 + 3,
14111 + 3,
14112 + 3,
14113 + 3,
14114 + 3,
14115 + 3,
14116 + 3,
14117 + 3,
14118 + 3,
14119 + 3,
14120 + 3,
14121 + 3,
14122 + 3,
14123 + 3,
14124 + 3,
14125 + 3,
14126 + 3,
14127 + 3,
14128 + 3,
14129 + 3,
14130 + 3,
14131 + 3,
14132 + 3,
14133 + 3,
14134 + 3,
14135 + 3,
14136 + 3,
14137 + 3,
14138 + 3,
14139 + 3,
14140 + 3,
14141 + 3,
14142 + 3,
14143 + 3,
14144 + 3,
14145 + 3,
14146 + 3,
14147 + 3,
14148 + 3,
14149 + 3,
14150 + 3,
14151 + 3,
14152 + 3,
14153 + 3,
14154 + 3,
14155 + 3,
14156 + 3,
14157 + 3,
14158 + 3,
14159 + 3,
14160 + 3,
14161 + 3,
14162 + 3,
14163 + 3,
14164 + 3,
14165 + 3,
14166 + 3,
14167 + 3,
14168 + 3,
14169 + 3,
14170 + 3,
14171 + 4,
14172 + 4,
14173 + 4,
14174 + 4,
14175 + 4,
14176 + 4,
14177 + 4,
14178 + 4,
14179 + 4,
14180 + 4,
14181 + 4,
14182 + 4,
14183 + 4,
14184 + 4,
14185 + 4,
14186 + 4,
14187 + 4,
14188 + 4,
14189 + 4,
14190 + 4,
14191 + 4,
14192 + 4,
14193 + 4,
14194 + 4,
14195 + 4,
14196 + 4,
14197 + 4,
14198 + 4,
14199 + 4,
14200 + 4,
14201 + 4,
14202 + 4,
14203 + 4,
14204 + 4,
14205 + 4,
14206 + 4,
14207 + 4,
14208 + 4,
14209 + 4,
14210 + 4,
14211 + 4,
14212 + 4,
14213 + 4,
14214 + 4,
14215 + 4,
14216 + 4,
14217 + 4,
14218 + 4,
14219 + 4,
14220 + 4,
14221 + 4,
14222 + 4,
14223 + 4,
14224 + 4,
14225 + 4,
14226 + 4,
14227 + 4,
14228 + 4,
14229 + 4,
14230 + 4,
14231 + 4,
14232 + 4,
14233 + 4,
14234 + 4,
14235 + 5,
14236 + 5,
14237 + 5,
14238 + 5,
14239 + 5,
14240 + 5,
14241 + 5,
14242 + 5,
14243 + 5,
14244 + 5,
14245 + 5,
14246 + 5,
14247 + 5,
14248 + 5,
14249 + 5,
14250 + 5,
14251 + 5,
14252 + 5,
14253 + 5,
14254 + 5,
14255 + 5,
14256 + 5,
14257 + 5,
14258 + 5,
14259 + 5,
14260 + 5,
14261 + 5,
14262 + 5,
14263 + 5,
14264 + 5,
14265 + 5,
14266 + 5,
14267 + 5,
14268 + 5,
14269 + 5,
14270 + 5,
14271 + 5,
14272 + 5,
14273 + 5,
14274 + 5,
14275 + 5,
14276 + 5,
14277 + 5,
14278 + 5,
14279 + 5,
14280 + 5,
14281 + 5,
14282 + 5,
14283 + 6,
14284 + 6,
14285 + 6,
14286 + 6,
14287 + 6,
14288 + 6,
14289 + 6,
14290 + 6,
14291 + 6,
14292 + 6,
14293 + 6,
14294 + 6,
14295 + 6,
14296 + 6,
14297 + 6,
14298 + 7,
14299 + /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */
14300 + 0,
14301 + 8,
14302 + 8,
14303 + 8,
14304 + 8,
14305 + 8,
14306 + 8,
14307 + 8,
14308 + 8,
14309 + 8,
14310 + 8,
14311 + 8,
14312 + 8,
14313 + 8,
14314 + 8,
14315 + 8,
14316 + 16,
14317 + 16,
14318 + 16,
14319 + 16,
14320 + 16,
14321 + 16,
14322 + 16,
14323 + 16,
14324 + 16,
14325 + 16,
14326 + 16,
14327 + 16,
14328 + 16,
14329 + 16,
14330 + 16,
14331 + 16,
14332 + 16,
14333 + 16,
14334 + 16,
14335 + 16,
14336 + 16,
14337 + 16,
14338 + 16,
14339 + 16,
14340 + 16,
14341 + 16,
14342 + 16,
14343 + 16,
14344 + 16,
14345 + 16,
14346 + 16,
14347 + 16,
14348 + 16,
14349 + 16,
14350 + 16,
14351 + 16,
14352 + 16,
14353 + 16,
14354 + 16,
14355 + 16,
14356 + 16,
14357 + 16,
14358 + 16,
14359 + 16,
14360 + 16,
14361 + 16,
14362 + 16,
14363 + 16,
14364 + 24,
14365 + 24,
14366 + 24,
14367 + 24,
14368 + 24,
14369 + 24,
14370 + 24,
14371 + 24,
14372 + 24,
14373 + 24,
14374 + 24,
14375 + 24,
14376 + 24,
14377 + 24,
14378 + 24,
14379 + 24,
14380 + 24,
14381 + 24,
14382 + 24,
14383 + 24,
14384 + 24,
14385 + 24,
14386 + 24,
14387 + 24,
14388 + 24,
14389 + 24,
14390 + 24,
14391 + 24,
14392 + 24,
14393 + 24,
14394 + 24,
14395 + 24,
14396 + 24,
14397 + 24,
14398 + 24,
14399 + 24,
14400 + 24,
14401 + 24,
14402 + 24,
14403 + 24,
14404 + 24,
14405 + 24,
14406 + 24,
14407 + 24,
14408 + 24,
14409 + 24,
14410 + 24,
14411 + 24,
14412 + 24,
14413 + 24,
14414 + 24,
14415 + 24,
14416 + 24,
14417 + 24,
14418 + 24,
14419 + 24,
14420 + 24,
14421 + 24,
14422 + 24,
14423 + 24,
14424 + 24,
14425 + 24,
14426 + 24,
14427 + 24,
14428 + 32,
14429 + 32,
14430 + 32,
14431 + 32,
14432 + 32,
14433 + 32,
14434 + 32,
14435 + 32,
14436 + 32,
14437 + 32,
14438 + 32,
14439 + 32,
14440 + 32,
14441 + 32,
14442 + 32,
14443 + 32,
14444 + 32,
14445 + 32,
14446 + 32,
14447 + 32,
14448 + 32,
14449 + 32,
14450 + 32,
14451 + 32,
14452 + 32,
14453 + 32,
14454 + 32,
14455 + 32,
14456 + 32,
14457 + 32,
14458 + 32,
14459 + 32,
14460 + 32,
14461 + 32,
14462 + 32,
14463 + 32,
14464 + 32,
14465 + 32,
14466 + 32,
14467 + 32,
14468 + 32,
14469 + 32,
14470 + 32,
14471 + 32,
14472 + 32,
14473 + 32,
14474 + 32,
14475 + 32,
14476 + 32,
14477 + 32,
14478 + 32,
14479 + 32,
14480 + 32,
14481 + 32,
14482 + 32,
14483 + 32,
14484 + 32,
14485 + 32,
14486 + 32,
14487 + 32,
14488 + 32,
14489 + 32,
14490 + 32,
14491 + 32,
14492 + 40,
14493 + 40,
14494 + 40,
14495 + 40,
14496 + 40,
14497 + 40,
14498 + 40,
14499 + 40,
14500 + 40,
14501 + 40,
14502 + 40,
14503 + 40,
14504 + 40,
14505 + 40,
14506 + 40,
14507 + 40,
14508 + 40,
14509 + 40,
14510 + 40,
14511 + 40,
14512 + 40,
14513 + 40,
14514 + 40,
14515 + 40,
14516 + 40,
14517 + 40,
14518 + 40,
14519 + 40,
14520 + 40,
14521 + 40,
14522 + 40,
14523 + 40,
14524 + 40,
14525 + 40,
14526 + 40,
14527 + 40,
14528 + 40,
14529 + 40,
14530 + 40,
14531 + 40,
14532 + 40,
14533 + 40,
14534 + 40,
14535 + 40,
14536 + 40,
14537 + 40,
14538 + 40,
14539 + 40,
14540 + 48,
14541 + 48,
14542 + 48,
14543 + 48,
14544 + 48,
14545 + 48,
14546 + 48,
14547 + 48,
14548 + 48,
14549 + 48,
14550 + 48,
14551 + 48,
14552 + 48,
14553 + 48,
14554 + 48,
14555 + 56,
14556 + /* CONTEXT_LSB6, last byte. */
14557 + 0,
14558 + 1,
14559 + 2,
14560 + 3,
14561 + 4,
14562 + 5,
14563 + 6,
14564 + 7,
14565 + 8,
14566 + 9,
14567 + 10,
14568 + 11,
14569 + 12,
14570 + 13,
14571 + 14,
14572 + 15,
14573 + 16,
14574 + 17,
14575 + 18,
14576 + 19,
14577 + 20,
14578 + 21,
14579 + 22,
14580 + 23,
14581 + 24,
14582 + 25,
14583 + 26,
14584 + 27,
14585 + 28,
14586 + 29,
14587 + 30,
14588 + 31,
14589 + 32,
14590 + 33,
14591 + 34,
14592 + 35,
14593 + 36,
14594 + 37,
14595 + 38,
14596 + 39,
14597 + 40,
14598 + 41,
14599 + 42,
14600 + 43,
14601 + 44,
14602 + 45,
14603 + 46,
14604 + 47,
14605 + 48,
14606 + 49,
14607 + 50,
14608 + 51,
14609 + 52,
14610 + 53,
14611 + 54,
14612 + 55,
14613 + 56,
14614 + 57,
14615 + 58,
14616 + 59,
14617 + 60,
14618 + 61,
14619 + 62,
14620 + 63,
14621 + 0,
14622 + 1,
14623 + 2,
14624 + 3,
14625 + 4,
14626 + 5,
14627 + 6,
14628 + 7,
14629 + 8,
14630 + 9,
14631 + 10,
14632 + 11,
14633 + 12,
14634 + 13,
14635 + 14,
14636 + 15,
14637 + 16,
14638 + 17,
14639 + 18,
14640 + 19,
14641 + 20,
14642 + 21,
14643 + 22,
14644 + 23,
14645 + 24,
14646 + 25,
14647 + 26,
14648 + 27,
14649 + 28,
14650 + 29,
14651 + 30,
14652 + 31,
14653 + 32,
14654 + 33,
14655 + 34,
14656 + 35,
14657 + 36,
14658 + 37,
14659 + 38,
14660 + 39,
14661 + 40,
14662 + 41,
14663 + 42,
14664 + 43,
14665 + 44,
14666 + 45,
14667 + 46,
14668 + 47,
14669 + 48,
14670 + 49,
14671 + 50,
14672 + 51,
14673 + 52,
14674 + 53,
14675 + 54,
14676 + 55,
14677 + 56,
14678 + 57,
14679 + 58,
14680 + 59,
14681 + 60,
14682 + 61,
14683 + 62,
14684 + 63,
14685 + 0,
14686 + 1,
14687 + 2,
14688 + 3,
14689 + 4,
14690 + 5,
14691 + 6,
14692 + 7,
14693 + 8,
14694 + 9,
14695 + 10,
14696 + 11,
14697 + 12,
14698 + 13,
14699 + 14,
14700 + 15,
14701 + 16,
14702 + 17,
14703 + 18,
14704 + 19,
14705 + 20,
14706 + 21,
14707 + 22,
14708 + 23,
14709 + 24,
14710 + 25,
14711 + 26,
14712 + 27,
14713 + 28,
14714 + 29,
14715 + 30,
14716 + 31,
14717 + 32,
14718 + 33,
14719 + 34,
14720 + 35,
14721 + 36,
14722 + 37,
14723 + 38,
14724 + 39,
14725 + 40,
14726 + 41,
14727 + 42,
14728 + 43,
14729 + 44,
14730 + 45,
14731 + 46,
14732 + 47,
14733 + 48,
14734 + 49,
14735 + 50,
14736 + 51,
14737 + 52,
14738 + 53,
14739 + 54,
14740 + 55,
14741 + 56,
14742 + 57,
14743 + 58,
14744 + 59,
14745 + 60,
14746 + 61,
14747 + 62,
14748 + 63,
14749 + 0,
14750 + 1,
14751 + 2,
14752 + 3,
14753 + 4,
14754 + 5,
14755 + 6,
14756 + 7,
14757 + 8,
14758 + 9,
14759 + 10,
14760 + 11,
14761 + 12,
14762 + 13,
14763 + 14,
14764 + 15,
14765 + 16,
14766 + 17,
14767 + 18,
14768 + 19,
14769 + 20,
14770 + 21,
14771 + 22,
14772 + 23,
14773 + 24,
14774 + 25,
14775 + 26,
14776 + 27,
14777 + 28,
14778 + 29,
14779 + 30,
14780 + 31,
14781 + 32,
14782 + 33,
14783 + 34,
14784 + 35,
14785 + 36,
14786 + 37,
14787 + 38,
14788 + 39,
14789 + 40,
14790 + 41,
14791 + 42,
14792 + 43,
14793 + 44,
14794 + 45,
14795 + 46,
14796 + 47,
14797 + 48,
14798 + 49,
14799 + 50,
14800 + 51,
14801 + 52,
14802 + 53,
14803 + 54,
14804 + 55,
14805 + 56,
14806 + 57,
14807 + 58,
14808 + 59,
14809 + 60,
14810 + 61,
14811 + 62,
14812 + 63,
14813 + /* CONTEXT_MSB6, last byte. */
14814 + 0,
14815 + 0,
14816 + 0,
14817 + 0,
14818 + 1,
14819 + 1,
14820 + 1,
14821 + 1,
14822 + 2,
14823 + 2,
14824 + 2,
14825 + 2,
14826 + 3,
14827 + 3,
14828 + 3,
14829 + 3,
14830 + 4,
14831 + 4,
14832 + 4,
14833 + 4,
14834 + 5,
14835 + 5,
14836 + 5,
14837 + 5,
14838 + 6,
14839 + 6,
14840 + 6,
14841 + 6,
14842 + 7,
14843 + 7,
14844 + 7,
14845 + 7,
14846 + 8,
14847 + 8,
14848 + 8,
14849 + 8,
14850 + 9,
14851 + 9,
14852 + 9,
14853 + 9,
14854 + 10,
14855 + 10,
14856 + 10,
14857 + 10,
14858 + 11,
14859 + 11,
14860 + 11,
14861 + 11,
14862 + 12,
14863 + 12,
14864 + 12,
14865 + 12,
14866 + 13,
14867 + 13,
14868 + 13,
14869 + 13,
14870 + 14,
14871 + 14,
14872 + 14,
14873 + 14,
14874 + 15,
14875 + 15,
14876 + 15,
14877 + 15,
14878 + 16,
14879 + 16,
14880 + 16,
14881 + 16,
14882 + 17,
14883 + 17,
14884 + 17,
14885 + 17,
14886 + 18,
14887 + 18,
14888 + 18,
14889 + 18,
14890 + 19,
14891 + 19,
14892 + 19,
14893 + 19,
14894 + 20,
14895 + 20,
14896 + 20,
14897 + 20,
14898 + 21,
14899 + 21,
14900 + 21,
14901 + 21,
14902 + 22,
14903 + 22,
14904 + 22,
14905 + 22,
14906 + 23,
14907 + 23,
14908 + 23,
14909 + 23,
14910 + 24,
14911 + 24,
14912 + 24,
14913 + 24,
14914 + 25,
14915 + 25,
14916 + 25,
14917 + 25,
14918 + 26,
14919 + 26,
14920 + 26,
14921 + 26,
14922 + 27,
14923 + 27,
14924 + 27,
14925 + 27,
14926 + 28,
14927 + 28,
14928 + 28,
14929 + 28,
14930 + 29,
14931 + 29,
14932 + 29,
14933 + 29,
14934 + 30,
14935 + 30,
14936 + 30,
14937 + 30,
14938 + 31,
14939 + 31,
14940 + 31,
14941 + 31,
14942 + 32,
14943 + 32,
14944 + 32,
14945 + 32,
14946 + 33,
14947 + 33,
14948 + 33,
14949 + 33,
14950 + 34,
14951 + 34,
14952 + 34,
14953 + 34,
14954 + 35,
14955 + 35,
14956 + 35,
14957 + 35,
14958 + 36,
14959 + 36,
14960 + 36,
14961 + 36,
14962 + 37,
14963 + 37,
14964 + 37,
14965 + 37,
14966 + 38,
14967 + 38,
14968 + 38,
14969 + 38,
14970 + 39,
14971 + 39,
14972 + 39,
14973 + 39,
14974 + 40,
14975 + 40,
14976 + 40,
14977 + 40,
14978 + 41,
14979 + 41,
14980 + 41,
14981 + 41,
14982 + 42,
14983 + 42,
14984 + 42,
14985 + 42,
14986 + 43,
14987 + 43,
14988 + 43,
14989 + 43,
14990 + 44,
14991 + 44,
14992 + 44,
14993 + 44,
14994 + 45,
14995 + 45,
14996 + 45,
14997 + 45,
14998 + 46,
14999 + 46,
15000 + 46,
15001 + 46,
15002 + 47,
15003 + 47,
15004 + 47,
15005 + 47,
15006 + 48,
15007 + 48,
15008 + 48,
15009 + 48,
15010 + 49,
15011 + 49,
15012 + 49,
15013 + 49,
15014 + 50,
15015 + 50,
15016 + 50,
15017 + 50,
15018 + 51,
15019 + 51,
15020 + 51,
15021 + 51,
15022 + 52,
15023 + 52,
15024 + 52,
15025 + 52,
15026 + 53,
15027 + 53,
15028 + 53,
15029 + 53,
15030 + 54,
15031 + 54,
15032 + 54,
15033 + 54,
15034 + 55,
15035 + 55,
15036 + 55,
15037 + 55,
15038 + 56,
15039 + 56,
15040 + 56,
15041 + 56,
15042 + 57,
15043 + 57,
15044 + 57,
15045 + 57,
15046 + 58,
15047 + 58,
15048 + 58,
15049 + 58,
15050 + 59,
15051 + 59,
15052 + 59,
15053 + 59,
15054 + 60,
15055 + 60,
15056 + 60,
15057 + 60,
15058 + 61,
15059 + 61,
15060 + 61,
15061 + 61,
15062 + 62,
15063 + 62,
15064 + 62,
15065 + 62,
15066 + 63,
15067 + 63,
15068 + 63,
15069 + 63,
15070 + /* CONTEXT_{M,L}SB6, second last byte, */
15071 + 0,
15072 + 0,
15073 + 0,
15074 + 0,
15075 + 0,
15076 + 0,
15077 + 0,
15078 + 0,
15079 + 0,
15080 + 0,
15081 + 0,
15082 + 0,
15083 + 0,
15084 + 0,
15085 + 0,
15086 + 0,
15087 + 0,
15088 + 0,
15089 + 0,
15090 + 0,
15091 + 0,
15092 + 0,
15093 + 0,
15094 + 0,
15095 + 0,
15096 + 0,
15097 + 0,
15098 + 0,
15099 + 0,
15100 + 0,
15101 + 0,
15102 + 0,
15103 + 0,
15104 + 0,
15105 + 0,
15106 + 0,
15107 + 0,
15108 + 0,
15109 + 0,
15110 + 0,
15111 + 0,
15112 + 0,
15113 + 0,
15114 + 0,
15115 + 0,
15116 + 0,
15117 + 0,
15118 + 0,
15119 + 0,
15120 + 0,
15121 + 0,
15122 + 0,
15123 + 0,
15124 + 0,
15125 + 0,
15126 + 0,
15127 + 0,
15128 + 0,
15129 + 0,
15130 + 0,
15131 + 0,
15132 + 0,
15133 + 0,
15134 + 0,
15135 + 0,
15136 + 0,
15137 + 0,
15138 + 0,
15139 + 0,
15140 + 0,
15141 + 0,
15142 + 0,
15143 + 0,
15144 + 0,
15145 + 0,
15146 + 0,
15147 + 0,
15148 + 0,
15149 + 0,
15150 + 0,
15151 + 0,
15152 + 0,
15153 + 0,
15154 + 0,
15155 + 0,
15156 + 0,
15157 + 0,
15158 + 0,
15159 + 0,
15160 + 0,
15161 + 0,
15162 + 0,
15163 + 0,
15164 + 0,
15165 + 0,
15166 + 0,
15167 + 0,
15168 + 0,
15169 + 0,
15170 + 0,
15171 + 0,
15172 + 0,
15173 + 0,
15174 + 0,
15175 + 0,
15176 + 0,
15177 + 0,
15178 + 0,
15179 + 0,
15180 + 0,
15181 + 0,
15182 + 0,
15183 + 0,
15184 + 0,
15185 + 0,
15186 + 0,
15187 + 0,
15188 + 0,
15189 + 0,
15190 + 0,
15191 + 0,
15192 + 0,
15193 + 0,
15194 + 0,
15195 + 0,
15196 + 0,
15197 + 0,
15198 + 0,
15199 + 0,
15200 + 0,
15201 + 0,
15202 + 0,
15203 + 0,
15204 + 0,
15205 + 0,
15206 + 0,
15207 + 0,
15208 + 0,
15209 + 0,
15210 + 0,
15211 + 0,
15212 + 0,
15213 + 0,
15214 + 0,
15215 + 0,
15216 + 0,
15217 + 0,
15218 + 0,
15219 + 0,
15220 + 0,
15221 + 0,
15222 + 0,
15223 + 0,
15224 + 0,
15225 + 0,
15226 + 0,
15227 + 0,
15228 + 0,
15229 + 0,
15230 + 0,
15231 + 0,
15232 + 0,
15233 + 0,
15234 + 0,
15235 + 0,
15236 + 0,
15237 + 0,
15238 + 0,
15239 + 0,
15240 + 0,
15241 + 0,
15242 + 0,
15243 + 0,
15244 + 0,
15245 + 0,
15246 + 0,
15247 + 0,
15248 + 0,
15249 + 0,
15250 + 0,
15251 + 0,
15252 + 0,
15253 + 0,
15254 + 0,
15255 + 0,
15256 + 0,
15257 + 0,
15258 + 0,
15259 + 0,
15260 + 0,
15261 + 0,
15262 + 0,
15263 + 0,
15264 + 0,
15265 + 0,
15266 + 0,
15267 + 0,
15268 + 0,
15269 + 0,
15270 + 0,
15271 + 0,
15272 + 0,
15273 + 0,
15274 + 0,
15275 + 0,
15276 + 0,
15277 + 0,
15278 + 0,
15279 + 0,
15280 + 0,
15281 + 0,
15282 + 0,
15283 + 0,
15284 + 0,
15285 + 0,
15286 + 0,
15287 + 0,
15288 + 0,
15289 + 0,
15290 + 0,
15291 + 0,
15292 + 0,
15293 + 0,
15294 + 0,
15295 + 0,
15296 + 0,
15297 + 0,
15298 + 0,
15299 + 0,
15300 + 0,
15301 + 0,
15302 + 0,
15303 + 0,
15304 + 0,
15305 + 0,
15306 + 0,
15307 + 0,
15308 + 0,
15309 + 0,
15310 + 0,
15311 + 0,
15312 + 0,
15313 + 0,
15314 + 0,
15315 + 0,
15316 + 0,
15317 + 0,
15318 + 0,
15319 + 0,
15320 + 0,
15321 + 0,
15322 + 0,
15323 + 0,
15324 + 0,
15325 + 0,
15326 + 0
15327 + ]);
15328 + exports2.lookupOffsets = new Uint16Array([
15329 + /* CONTEXT_LSB6 */
15330 + 1024,
15331 + 1536,
15332 + 1280,
15333 + 1536,
15334 + 0,
15335 + 256,
15336 + 768,
15337 + 512
15338 + ]);
15339 + },
15340 + {}
15341 + ],
15342 + 3: [
15343 + function(require2, module2, exports2) {
15344 + var BrotliInput = require2("./streams").BrotliInput;
15345 + var BrotliOutput = require2("./streams").BrotliOutput;
15346 + var BrotliBitReader = require2("./bit_reader");
15347 + var BrotliDictionary = require2("./dictionary");
15348 + var HuffmanCode = require2("./huffman").HuffmanCode;
15349 + var BrotliBuildHuffmanTable = require2("./huffman").BrotliBuildHuffmanTable;
15350 + var Context = require2("./context");
15351 + var Prefix = require2("./prefix");
15352 + var Transform = require2("./transform");
15353 + var kDefaultCodeLength = 8;
15354 + var kCodeLengthRepeatCode = 16;
15355 + var kNumLiteralCodes = 256;
15356 + var kNumInsertAndCopyCodes = 704;
15357 + var kNumBlockLengthCodes = 26;
15358 + var kLiteralContextBits = 6;
15359 + var kDistanceContextBits = 2;
15360 + var HUFFMAN_TABLE_BITS = 8;
15361 + var HUFFMAN_TABLE_MASK = 255;
15362 + var HUFFMAN_MAX_TABLE_SIZE = 1080;
15363 + var CODE_LENGTH_CODES = 18;
15364 + var kCodeLengthCodeOrder = new Uint8Array([
15365 + 1,
15366 + 2,
15367 + 3,
15368 + 4,
15369 + 0,
15370 + 5,
15371 + 17,
15372 + 6,
15373 + 16,
15374 + 7,
15375 + 8,
15376 + 9,
15377 + 10,
15378 + 11,
15379 + 12,
15380 + 13,
15381 + 14,
15382 + 15
15383 + ]);
15384 + var NUM_DISTANCE_SHORT_CODES = 16;
15385 + var kDistanceShortCodeIndexOffset = new Uint8Array([
15386 + 3,
15387 + 2,
15388 + 1,
15389 + 0,
15390 + 3,
15391 + 3,
15392 + 3,
15393 + 3,
15394 + 3,
15395 + 3,
15396 + 2,
15397 + 2,
15398 + 2,
15399 + 2,
15400 + 2,
15401 + 2
15402 + ]);
15403 + var kDistanceShortCodeValueOffset = new Int8Array([
15404 + 0,
15405 + 0,
15406 + 0,
15407 + 0,
15408 + -1,
15409 + 1,
15410 + -2,
15411 + 2,
15412 + -3,
15413 + 3,
15414 + -1,
15415 + 1,
15416 + -2,
15417 + 2,
15418 + -3,
15419 + 3
15420 + ]);
15421 + var kMaxHuffmanTableSize = new Uint16Array([
15422 + 256,
15423 + 402,
15424 + 436,
15425 + 468,
15426 + 500,
15427 + 534,
15428 + 566,
15429 + 598,
15430 + 630,
15431 + 662,
15432 + 694,
15433 + 726,
15434 + 758,
15435 + 790,
15436 + 822,
15437 + 854,
15438 + 886,
15439 + 920,
15440 + 952,
15441 + 984,
15442 + 1016,
15443 + 1048,
15444 + 1080
15445 + ]);
15446 + function DecodeWindowBits(br) {
15447 + var n;
15448 + if (br.readBits(1) === 0) {
15449 + return 16;
15450 + }
15451 + n = br.readBits(3);
15452 + if (n > 0) {
15453 + return 17 + n;
15454 + }
15455 + n = br.readBits(3);
15456 + if (n > 0) {
15457 + return 8 + n;
15458 + }
15459 + return 17;
15460 + }
15461 + function DecodeVarLenUint8(br) {
15462 + if (br.readBits(1)) {
15463 + var nbits = br.readBits(3);
15464 + if (nbits === 0) {
15465 + return 1;
15466 + } else {
15467 + return br.readBits(nbits) + (1 << nbits);
15468 + }
15469 + }
15470 + return 0;
15471 + }
15472 + function MetaBlockLength() {
15473 + this.meta_block_length = 0;
15474 + this.input_end = 0;
15475 + this.is_uncompressed = 0;
15476 + this.is_metadata = false;
15477 + }
15478 + function DecodeMetaBlockLength(br) {
15479 + var out = new MetaBlockLength();
15480 + var size_nibbles;
15481 + var size_bytes;
15482 + var i;
15483 + out.input_end = br.readBits(1);
15484 + if (out.input_end && br.readBits(1)) {
15485 + return out;
15486 + }
15487 + size_nibbles = br.readBits(2) + 4;
15488 + if (size_nibbles === 7) {
15489 + out.is_metadata = true;
15490 + if (br.readBits(1) !== 0)
15491 + throw new Error("Invalid reserved bit");
15492 + size_bytes = br.readBits(2);
15493 + if (size_bytes === 0) return out;
15494 + for (i = 0; i < size_bytes; i++) {
15495 + var next_byte = br.readBits(8);
15496 + if (i + 1 === size_bytes && size_bytes > 1 && next_byte === 0)
15497 + throw new Error("Invalid size byte");
15498 + out.meta_block_length |= next_byte << i * 8;
15499 + }
15500 + } else {
15501 + for (i = 0; i < size_nibbles; ++i) {
15502 + var next_nibble = br.readBits(4);
15503 + if (i + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0)
15504 + throw new Error("Invalid size nibble");
15505 + out.meta_block_length |= next_nibble << i * 4;
15506 + }
15507 + }
15508 + ++out.meta_block_length;
15509 + if (!out.input_end && !out.is_metadata) {
15510 + out.is_uncompressed = br.readBits(1);
15511 + }
15512 + return out;
15513 + }
15514 + function ReadSymbol(table, index2, br) {
15515 + var start_index = index2;
15516 + var nbits;
15517 + br.fillBitWindow();
15518 + index2 += br.val_ >>> br.bit_pos_ & HUFFMAN_TABLE_MASK;
15519 + nbits = table[index2].bits - HUFFMAN_TABLE_BITS;
15520 + if (nbits > 0) {
15521 + br.bit_pos_ += HUFFMAN_TABLE_BITS;
15522 + index2 += table[index2].value;
15523 + index2 += br.val_ >>> br.bit_pos_ & (1 << nbits) - 1;
15524 + }
15525 + br.bit_pos_ += table[index2].bits;
15526 + return table[index2].value;
15527 + }
15528 + function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) {
15529 + var symbol = 0;
15530 + var prev_code_len = kDefaultCodeLength;
15531 + var repeat = 0;
15532 + var repeat_code_len = 0;
15533 + var space = 32768;
15534 + var table = [];
15535 + for (var i = 0; i < 32; i++)
15536 + table.push(new HuffmanCode(0, 0));
15537 + BrotliBuildHuffmanTable(
15538 + table,
15539 + 0,
15540 + 5,
15541 + code_length_code_lengths,
15542 + CODE_LENGTH_CODES
15543 + );
15544 + while (symbol < num_symbols && space > 0) {
15545 + var p3 = 0;
15546 + var code_len;
15547 + br.readMoreInput();
15548 + br.fillBitWindow();
15549 + p3 += br.val_ >>> br.bit_pos_ & 31;
15550 + br.bit_pos_ += table[p3].bits;
15551 + code_len = table[p3].value & 255;
15552 + if (code_len < kCodeLengthRepeatCode) {
15553 + repeat = 0;
15554 + code_lengths[symbol++] = code_len;
15555 + if (code_len !== 0) {
15556 + prev_code_len = code_len;
15557 + space -= 32768 >> code_len;
15558 + }
15559 + } else {
15560 + var extra_bits = code_len - 14;
15561 + var old_repeat;
15562 + var repeat_delta;
15563 + var new_len = 0;
15564 + if (code_len === kCodeLengthRepeatCode) {
15565 + new_len = prev_code_len;
15566 + }
15567 + if (repeat_code_len !== new_len) {
15568 + repeat = 0;
15569 + repeat_code_len = new_len;
15570 + }
15571 + old_repeat = repeat;
15572 + if (repeat > 0) {
15573 + repeat -= 2;
15574 + repeat <<= extra_bits;
15575 + }
15576 + repeat += br.readBits(extra_bits) + 3;
15577 + repeat_delta = repeat - old_repeat;
15578 + if (symbol + repeat_delta > num_symbols) {
15579 + throw new Error(
15580 + "[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols"
15581 + );
15582 + }
15583 + for (var x2 = 0; x2 < repeat_delta; x2++)
15584 + code_lengths[symbol + x2] = repeat_code_len;
15585 + symbol += repeat_delta;
15586 + if (repeat_code_len !== 0) {
15587 + space -= repeat_delta << 15 - repeat_code_len;
15588 + }
15589 + }
15590 + }
15591 + if (space !== 0) {
15592 + throw new Error(
15593 + "[ReadHuffmanCodeLengths] space = " + space
15594 + );
15595 + }
15596 + for (; symbol < num_symbols; symbol++)
15597 + code_lengths[symbol] = 0;
15598 + }
15599 + function ReadHuffmanCode(alphabet_size, tables, table, br) {
15600 + var table_size = 0;
15601 + var simple_code_or_skip;
15602 + var code_lengths = new Uint8Array(alphabet_size);
15603 + br.readMoreInput();
15604 + simple_code_or_skip = br.readBits(2);
15605 + if (simple_code_or_skip === 1) {
15606 + var i;
15607 + var max_bits_counter = alphabet_size - 1;
15608 + var max_bits = 0;
15609 + var symbols = new Int32Array(4);
15610 + var num_symbols = br.readBits(2) + 1;
15611 + while (max_bits_counter) {
15612 + max_bits_counter >>= 1;
15613 + ++max_bits;
15614 + }
15615 + for (i = 0; i < num_symbols; ++i) {
15616 + symbols[i] = br.readBits(max_bits) % alphabet_size;
15617 + code_lengths[symbols[i]] = 2;
15618 + }
15619 + code_lengths[symbols[0]] = 1;
15620 + switch (num_symbols) {
15621 + case 1:
15622 + break;
15623 + case 3:
15624 + if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[1] === symbols[2]) {
15625 + throw new Error(
15626 + "[ReadHuffmanCode] invalid symbols"
15627 + );
15628 + }
15629 + break;
15630 + case 2:
15631 + if (symbols[0] === symbols[1]) {
15632 + throw new Error(
15633 + "[ReadHuffmanCode] invalid symbols"
15634 + );
15635 + }
15636 + code_lengths[symbols[1]] = 1;
15637 + break;
15638 + case 4:
15639 + if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[0] === symbols[3] || symbols[1] === symbols[2] || symbols[1] === symbols[3] || symbols[2] === symbols[3]) {
15640 + throw new Error(
15641 + "[ReadHuffmanCode] invalid symbols"
15642 + );
15643 + }
15644 + if (br.readBits(1)) {
15645 + code_lengths[symbols[2]] = 3;
15646 + code_lengths[symbols[3]] = 3;
15647 + } else {
15648 + code_lengths[symbols[0]] = 2;
15649 + }
15650 + break;
15651 + }
15652 + } else {
15653 + var i;
15654 + var code_length_code_lengths = new Uint8Array(
15655 + CODE_LENGTH_CODES
15656 + );
15657 + var space = 32;
15658 + var num_codes = 0;
15659 + var huff = [
15660 + new HuffmanCode(2, 0),
15661 + new HuffmanCode(2, 4),
15662 + new HuffmanCode(2, 3),
15663 + new HuffmanCode(3, 2),
15664 + new HuffmanCode(2, 0),
15665 + new HuffmanCode(2, 4),
15666 + new HuffmanCode(2, 3),
15667 + new HuffmanCode(4, 1),
15668 + new HuffmanCode(2, 0),
15669 + new HuffmanCode(2, 4),
15670 + new HuffmanCode(2, 3),
15671 + new HuffmanCode(3, 2),
15672 + new HuffmanCode(2, 0),
15673 + new HuffmanCode(2, 4),
15674 + new HuffmanCode(2, 3),
15675 + new HuffmanCode(4, 5)
15676 + ];
15677 + for (i = simple_code_or_skip; i < CODE_LENGTH_CODES && space > 0; ++i) {
15678 + var code_len_idx = kCodeLengthCodeOrder[i];
15679 + var p3 = 0;
15680 + var v2;
15681 + br.fillBitWindow();
15682 + p3 += br.val_ >>> br.bit_pos_ & 15;
15683 + br.bit_pos_ += huff[p3].bits;
15684 + v2 = huff[p3].value;
15685 + code_length_code_lengths[code_len_idx] = v2;
15686 + if (v2 !== 0) {
15687 + space -= 32 >> v2;
15688 + ++num_codes;
15689 + }
15690 + }
15691 + if (!(num_codes === 1 || space === 0))
15692 + throw new Error(
15693 + "[ReadHuffmanCode] invalid num_codes or space"
15694 + );
15695 + ReadHuffmanCodeLengths(
15696 + code_length_code_lengths,
15697 + alphabet_size,
15698 + code_lengths,
15699 + br
15700 + );
15701 + }
15702 + table_size = BrotliBuildHuffmanTable(
15703 + tables,
15704 + table,
15705 + HUFFMAN_TABLE_BITS,
15706 + code_lengths,
15707 + alphabet_size
15708 + );
15709 + if (table_size === 0) {
15710 + throw new Error(
15711 + "[ReadHuffmanCode] BuildHuffmanTable failed: "
15712 + );
15713 + }
15714 + return table_size;
15715 + }
15716 + function ReadBlockLength(table, index2, br) {
15717 + var code;
15718 + var nbits;
15719 + code = ReadSymbol(table, index2, br);
15720 + nbits = Prefix.kBlockLengthPrefixCode[code].nbits;
15721 + return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits);
15722 + }
15723 + function TranslateShortCodes(code, ringbuffer, index2) {
15724 + var val;
15725 + if (code < NUM_DISTANCE_SHORT_CODES) {
15726 + index2 += kDistanceShortCodeIndexOffset[code];
15727 + index2 &= 3;
15728 + val = ringbuffer[index2] + kDistanceShortCodeValueOffset[code];
15729 + } else {
15730 + val = code - NUM_DISTANCE_SHORT_CODES + 1;
15731 + }
15732 + return val;
15733 + }
15734 + function MoveToFront(v2, index2) {
15735 + var value = v2[index2];
15736 + var i = index2;
15737 + for (; i; --i) v2[i] = v2[i - 1];
15738 + v2[0] = value;
15739 + }
15740 + function InverseMoveToFrontTransform(v2, v_len) {
15741 + var mtf = new Uint8Array(256);
15742 + var i;
15743 + for (i = 0; i < 256; ++i) {
15744 + mtf[i] = i;
15745 + }
15746 + for (i = 0; i < v_len; ++i) {
15747 + var index2 = v2[i];
15748 + v2[i] = mtf[index2];
15749 + if (index2) MoveToFront(mtf, index2);
15750 + }
15751 + }
15752 + function HuffmanTreeGroup(alphabet_size, num_htrees) {
15753 + this.alphabet_size = alphabet_size;
15754 + this.num_htrees = num_htrees;
15755 + this.codes = new Array(
15756 + num_htrees + num_htrees * kMaxHuffmanTableSize[alphabet_size + 31 >>> 5]
15757 + );
15758 + this.htrees = new Uint32Array(num_htrees);
15759 + }
15760 + HuffmanTreeGroup.prototype.decode = function(br) {
15761 + var i;
15762 + var table_size;
15763 + var next = 0;
15764 + for (i = 0; i < this.num_htrees; ++i) {
15765 + this.htrees[i] = next;
15766 + table_size = ReadHuffmanCode(
15767 + this.alphabet_size,
15768 + this.codes,
15769 + next,
15770 + br
15771 + );
15772 + next += table_size;
15773 + }
15774 + };
15775 + function DecodeContextMap(context_map_size, br) {
15776 + var out = { num_htrees: null, context_map: null };
15777 + var use_rle_for_zeros;
15778 + var max_run_length_prefix = 0;
15779 + var table;
15780 + var i;
15781 + br.readMoreInput();
15782 + var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1;
15783 + var context_map = out.context_map = new Uint8Array(
15784 + context_map_size
15785 + );
15786 + if (num_htrees <= 1) {
15787 + return out;
15788 + }
15789 + use_rle_for_zeros = br.readBits(1);
15790 + if (use_rle_for_zeros) {
15791 + max_run_length_prefix = br.readBits(4) + 1;
15792 + }
15793 + table = [];
15794 + for (i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++) {
15795 + table[i] = new HuffmanCode(0, 0);
15796 + }
15797 + ReadHuffmanCode(
15798 + num_htrees + max_run_length_prefix,
15799 + table,
15800 + 0,
15801 + br
15802 + );
15803 + for (i = 0; i < context_map_size; ) {
15804 + var code;
15805 + br.readMoreInput();
15806 + code = ReadSymbol(table, 0, br);
15807 + if (code === 0) {
15808 + context_map[i] = 0;
15809 + ++i;
15810 + } else if (code <= max_run_length_prefix) {
15811 + var reps = 1 + (1 << code) + br.readBits(code);
15812 + while (--reps) {
15813 + if (i >= context_map_size) {
15814 + throw new Error(
15815 + "[DecodeContextMap] i >= context_map_size"
15816 + );
15817 + }
15818 + context_map[i] = 0;
15819 + ++i;
15820 + }
15821 + } else {
15822 + context_map[i] = code - max_run_length_prefix;
15823 + ++i;
15824 + }
15825 + }
15826 + if (br.readBits(1)) {
15827 + InverseMoveToFrontTransform(
15828 + context_map,
15829 + context_map_size
15830 + );
15831 + }
15832 + return out;
15833 + }
15834 + function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) {
15835 + var ringbuffer = tree_type * 2;
15836 + var index2 = tree_type;
15837 + var type_code = ReadSymbol(
15838 + trees,
15839 + tree_type * HUFFMAN_MAX_TABLE_SIZE,
15840 + br
15841 + );
15842 + var block_type;
15843 + if (type_code === 0) {
15844 + block_type = ringbuffers[ringbuffer + (indexes[index2] & 1)];
15845 + } else if (type_code === 1) {
15846 + block_type = ringbuffers[ringbuffer + (indexes[index2] - 1 & 1)] + 1;
15847 + } else {
15848 + block_type = type_code - 2;
15849 + }
15850 + if (block_type >= max_block_type) {
15851 + block_type -= max_block_type;
15852 + }
15853 + block_types[tree_type] = block_type;
15854 + ringbuffers[ringbuffer + (indexes[index2] & 1)] = block_type;
15855 + ++indexes[index2];
15856 + }
15857 + function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) {
15858 + var rb_size = ringbuffer_mask + 1;
15859 + var rb_pos = pos & ringbuffer_mask;
15860 + var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK;
15861 + var nbytes;
15862 + if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) {
15863 + while (len-- > 0) {
15864 + br.readMoreInput();
15865 + ringbuffer[rb_pos++] = br.readBits(8);
15866 + if (rb_pos === rb_size) {
15867 + output.write(ringbuffer, rb_size);
15868 + rb_pos = 0;
15869 + }
15870 + }
15871 + return;
15872 + }
15873 + if (br.bit_end_pos_ < 32) {
15874 + throw new Error(
15875 + "[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32"
15876 + );
15877 + }
15878 + while (br.bit_pos_ < 32) {
15879 + ringbuffer[rb_pos] = br.val_ >>> br.bit_pos_;
15880 + br.bit_pos_ += 8;
15881 + ++rb_pos;
15882 + --len;
15883 + }
15884 + nbytes = br.bit_end_pos_ - br.bit_pos_ >> 3;
15885 + if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) {
15886 + var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;
15887 + for (var x2 = 0; x2 < tail; x2++)
15888 + ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
15889 + nbytes -= tail;
15890 + rb_pos += tail;
15891 + len -= tail;
15892 + br_pos = 0;
15893 + }
15894 + for (var x2 = 0; x2 < nbytes; x2++)
15895 + ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
15896 + rb_pos += nbytes;
15897 + len -= nbytes;
15898 + if (rb_pos >= rb_size) {
15899 + output.write(ringbuffer, rb_size);
15900 + rb_pos -= rb_size;
15901 + for (var x2 = 0; x2 < rb_pos; x2++)
15902 + ringbuffer[x2] = ringbuffer[rb_size + x2];
15903 + }
15904 + while (rb_pos + len >= rb_size) {
15905 + nbytes = rb_size - rb_pos;
15906 + if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) {
15907 + throw new Error(
15908 + "[CopyUncompressedBlockToOutput] not enough bytes"
15909 + );
15910 + }
15911 + output.write(ringbuffer, rb_size);
15912 + len -= nbytes;
15913 + rb_pos = 0;
15914 + }
15915 + if (br.input_.read(ringbuffer, rb_pos, len) < len) {
15916 + throw new Error(
15917 + "[CopyUncompressedBlockToOutput] not enough bytes"
15918 + );
15919 + }
15920 + br.reset();
15921 + }
15922 + function JumpToByteBoundary(br) {
15923 + var new_bit_pos = br.bit_pos_ + 7 & ~7;
15924 + var pad_bits = br.readBits(new_bit_pos - br.bit_pos_);
15925 + return pad_bits == 0;
15926 + }
15927 + function BrotliDecompressedSize(buffer) {
15928 + var input = new BrotliInput(buffer);
15929 + var br = new BrotliBitReader(input);
15930 + DecodeWindowBits(br);
15931 + var out = DecodeMetaBlockLength(br);
15932 + return out.meta_block_length;
15933 + }
15934 + exports2.BrotliDecompressedSize = BrotliDecompressedSize;
15935 + function BrotliDecompressBuffer(buffer, output_size) {
15936 + var input = new BrotliInput(buffer);
15937 + if (output_size == null) {
15938 + output_size = BrotliDecompressedSize(buffer);
15939 + }
15940 + var output_buffer = new Uint8Array(output_size);
15941 + var output = new BrotliOutput(output_buffer);
15942 + BrotliDecompress(input, output);
15943 + if (output.pos < output.buffer.length) {
15944 + output.buffer = output.buffer.subarray(
15945 + 0,
15946 + output.pos
15947 + );
15948 + }
15949 + return output.buffer;
15950 + }
15951 + exports2.BrotliDecompressBuffer = BrotliDecompressBuffer;
15952 + function BrotliDecompress(input, output) {
15953 + var i;
15954 + var pos = 0;
15955 + var input_end = 0;
15956 + var window_bits = 0;
15957 + var max_backward_distance;
15958 + var max_distance = 0;
15959 + var ringbuffer_size;
15960 + var ringbuffer_mask;
15961 + var ringbuffer;
15962 + var ringbuffer_end;
15963 + var dist_rb = [16, 15, 11, 4];
15964 + var dist_rb_idx = 0;
15965 + var prev_byte1 = 0;
15966 + var prev_byte2 = 0;
15967 + var hgroup = [
15968 + new HuffmanTreeGroup(0, 0),
15969 + new HuffmanTreeGroup(0, 0),
15970 + new HuffmanTreeGroup(0, 0)
15971 + ];
15972 + var block_type_trees;
15973 + var block_len_trees;
15974 + var br;
15975 + var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE;
15976 + br = new BrotliBitReader(input);
15977 + window_bits = DecodeWindowBits(br);
15978 + max_backward_distance = (1 << window_bits) - 16;
15979 + ringbuffer_size = 1 << window_bits;
15980 + ringbuffer_mask = ringbuffer_size - 1;
15981 + ringbuffer = new Uint8Array(
15982 + ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength
15983 + );
15984 + ringbuffer_end = ringbuffer_size;
15985 + block_type_trees = [];
15986 + block_len_trees = [];
15987 + for (var x2 = 0; x2 < 3 * HUFFMAN_MAX_TABLE_SIZE; x2++) {
15988 + block_type_trees[x2] = new HuffmanCode(0, 0);
15989 + block_len_trees[x2] = new HuffmanCode(0, 0);
15990 + }
15991 + while (!input_end) {
15992 + var meta_block_remaining_len = 0;
15993 + var is_uncompressed;
15994 + var block_length = [1 << 28, 1 << 28, 1 << 28];
15995 + var block_type = [0];
15996 + var num_block_types = [1, 1, 1];
15997 + var block_type_rb = [0, 1, 0, 1, 0, 1];
15998 + var block_type_rb_index = [0];
15999 + var distance_postfix_bits;
16000 + var num_direct_distance_codes;
16001 + var distance_postfix_mask;
16002 + var num_distance_codes;
16003 + var context_map = null;
16004 + var context_modes = null;
16005 + var num_literal_htrees;
16006 + var dist_context_map = null;
16007 + var num_dist_htrees;
16008 + var context_offset = 0;
16009 + var context_map_slice = null;
16010 + var literal_htree_index = 0;
16011 + var dist_context_offset = 0;
16012 + var dist_context_map_slice = null;
16013 + var dist_htree_index = 0;
16014 + var context_lookup_offset1 = 0;
16015 + var context_lookup_offset2 = 0;
16016 + var context_mode;
16017 + var htree_command;
16018 + for (i = 0; i < 3; ++i) {
16019 + hgroup[i].codes = null;
16020 + hgroup[i].htrees = null;
16021 + }
16022 + br.readMoreInput();
16023 + var _out = DecodeMetaBlockLength(br);
16024 + meta_block_remaining_len = _out.meta_block_length;
16025 + if (pos + meta_block_remaining_len > output.buffer.length) {
16026 + var tmp = new Uint8Array(
16027 + pos + meta_block_remaining_len
16028 + );
16029 + tmp.set(output.buffer);
16030 + output.buffer = tmp;
16031 + }
16032 + input_end = _out.input_end;
16033 + is_uncompressed = _out.is_uncompressed;
16034 + if (_out.is_metadata) {
16035 + JumpToByteBoundary(br);
16036 + for (; meta_block_remaining_len > 0; --meta_block_remaining_len) {
16037 + br.readMoreInput();
16038 + br.readBits(8);
16039 + }
16040 + continue;
16041 + }
16042 + if (meta_block_remaining_len === 0) {
16043 + continue;
16044 + }
16045 + if (is_uncompressed) {
16046 + br.bit_pos_ = br.bit_pos_ + 7 & ~7;
16047 + CopyUncompressedBlockToOutput(
16048 + output,
16049 + meta_block_remaining_len,
16050 + pos,
16051 + ringbuffer,
16052 + ringbuffer_mask,
16053 + br
16054 + );
16055 + pos += meta_block_remaining_len;
16056 + continue;
16057 + }
16058 + for (i = 0; i < 3; ++i) {
16059 + num_block_types[i] = DecodeVarLenUint8(br) + 1;
16060 + if (num_block_types[i] >= 2) {
16061 + ReadHuffmanCode(
16062 + num_block_types[i] + 2,
16063 + block_type_trees,
16064 + i * HUFFMAN_MAX_TABLE_SIZE,
16065 + br
16066 + );
16067 + ReadHuffmanCode(
16068 + kNumBlockLengthCodes,
16069 + block_len_trees,
16070 + i * HUFFMAN_MAX_TABLE_SIZE,
16071 + br
16072 + );
16073 + block_length[i] = ReadBlockLength(
16074 + block_len_trees,
16075 + i * HUFFMAN_MAX_TABLE_SIZE,
16076 + br
16077 + );
16078 + block_type_rb_index[i] = 1;
16079 + }
16080 + }
16081 + br.readMoreInput();
16082 + distance_postfix_bits = br.readBits(2);
16083 + num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits);
16084 + distance_postfix_mask = (1 << distance_postfix_bits) - 1;
16085 + num_distance_codes = num_direct_distance_codes + (48 << distance_postfix_bits);
16086 + context_modes = new Uint8Array(
16087 + num_block_types[0]
16088 + );
16089 + for (i = 0; i < num_block_types[0]; ++i) {
16090 + br.readMoreInput();
16091 + context_modes[i] = br.readBits(2) << 1;
16092 + }
16093 + var _o1 = DecodeContextMap(
16094 + num_block_types[0] << kLiteralContextBits,
16095 + br
16096 + );
16097 + num_literal_htrees = _o1.num_htrees;
16098 + context_map = _o1.context_map;
16099 + var _o2 = DecodeContextMap(
16100 + num_block_types[2] << kDistanceContextBits,
16101 + br
16102 + );
16103 + num_dist_htrees = _o2.num_htrees;
16104 + dist_context_map = _o2.context_map;
16105 + hgroup[0] = new HuffmanTreeGroup(
16106 + kNumLiteralCodes,
16107 + num_literal_htrees
16108 + );
16109 + hgroup[1] = new HuffmanTreeGroup(
16110 + kNumInsertAndCopyCodes,
16111 + num_block_types[1]
16112 + );
16113 + hgroup[2] = new HuffmanTreeGroup(
16114 + num_distance_codes,
16115 + num_dist_htrees
16116 + );
16117 + for (i = 0; i < 3; ++i) {
16118 + hgroup[i].decode(br);
16119 + }
16120 + context_map_slice = 0;
16121 + dist_context_map_slice = 0;
16122 + context_mode = context_modes[block_type[0]];
16123 + context_lookup_offset1 = Context.lookupOffsets[context_mode];
16124 + context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
16125 + htree_command = hgroup[1].htrees[0];
16126 + while (meta_block_remaining_len > 0) {
16127 + var cmd_code;
16128 + var range_idx;
16129 + var insert_code;
16130 + var copy_code;
16131 + var insert_length;
16132 + var copy_length;
16133 + var distance_code;
16134 + var distance;
16135 + var context;
16136 + var j2;
16137 + var copy_dst;
16138 + br.readMoreInput();
16139 + if (block_length[1] === 0) {
16140 + DecodeBlockType(
16141 + num_block_types[1],
16142 + block_type_trees,
16143 + 1,
16144 + block_type,
16145 + block_type_rb,
16146 + block_type_rb_index,
16147 + br
16148 + );
16149 + block_length[1] = ReadBlockLength(
16150 + block_len_trees,
16151 + HUFFMAN_MAX_TABLE_SIZE,
16152 + br
16153 + );
16154 + htree_command = hgroup[1].htrees[block_type[1]];
16155 + }
16156 + --block_length[1];
16157 + cmd_code = ReadSymbol(
16158 + hgroup[1].codes,
16159 + htree_command,
16160 + br
16161 + );
16162 + range_idx = cmd_code >> 6;
16163 + if (range_idx >= 2) {
16164 + range_idx -= 2;
16165 + distance_code = -1;
16166 + } else {
16167 + distance_code = 0;
16168 + }
16169 + insert_code = Prefix.kInsertRangeLut[range_idx] + (cmd_code >> 3 & 7);
16170 + copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7);
16171 + insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + br.readBits(
16172 + Prefix.kInsertLengthPrefixCode[insert_code].nbits
16173 + );
16174 + copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + br.readBits(
16175 + Prefix.kCopyLengthPrefixCode[copy_code].nbits
16176 + );
16177 + prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
16178 + prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
16179 + for (j2 = 0; j2 < insert_length; ++j2) {
16180 + br.readMoreInput();
16181 + if (block_length[0] === 0) {
16182 + DecodeBlockType(
16183 + num_block_types[0],
16184 + block_type_trees,
16185 + 0,
16186 + block_type,
16187 + block_type_rb,
16188 + block_type_rb_index,
16189 + br
16190 + );
16191 + block_length[0] = ReadBlockLength(
16192 + block_len_trees,
16193 + 0,
16194 + br
16195 + );
16196 + context_offset = block_type[0] << kLiteralContextBits;
16197 + context_map_slice = context_offset;
16198 + context_mode = context_modes[block_type[0]];
16199 + context_lookup_offset1 = Context.lookupOffsets[context_mode];
16200 + context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
16201 + }
16202 + context = Context.lookup[context_lookup_offset1 + prev_byte1] | Context.lookup[context_lookup_offset2 + prev_byte2];
16203 + literal_htree_index = context_map[context_map_slice + context];
16204 + --block_length[0];
16205 + prev_byte2 = prev_byte1;
16206 + prev_byte1 = ReadSymbol(
16207 + hgroup[0].codes,
16208 + hgroup[0].htrees[literal_htree_index],
16209 + br
16210 + );
16211 + ringbuffer[pos & ringbuffer_mask] = prev_byte1;
16212 + if ((pos & ringbuffer_mask) === ringbuffer_mask) {
16213 + output.write(
16214 + ringbuffer,
16215 + ringbuffer_size
16216 + );
16217 + }
16218 + ++pos;
16219 + }
16220 + meta_block_remaining_len -= insert_length;
16221 + if (meta_block_remaining_len <= 0) break;
16222 + if (distance_code < 0) {
16223 + var context;
16224 + br.readMoreInput();
16225 + if (block_length[2] === 0) {
16226 + DecodeBlockType(
16227 + num_block_types[2],
16228 + block_type_trees,
16229 + 2,
16230 + block_type,
16231 + block_type_rb,
16232 + block_type_rb_index,
16233 + br
16234 + );
16235 + block_length[2] = ReadBlockLength(
16236 + block_len_trees,
16237 + 2 * HUFFMAN_MAX_TABLE_SIZE,
16238 + br
16239 + );
16240 + dist_context_offset = block_type[2] << kDistanceContextBits;
16241 + dist_context_map_slice = dist_context_offset;
16242 + }
16243 + --block_length[2];
16244 + context = (copy_length > 4 ? 3 : copy_length - 2) & 255;
16245 + dist_htree_index = dist_context_map[dist_context_map_slice + context];
16246 + distance_code = ReadSymbol(
16247 + hgroup[2].codes,
16248 + hgroup[2].htrees[dist_htree_index],
16249 + br
16250 + );
16251 + if (distance_code >= num_direct_distance_codes) {
16252 + var nbits;
16253 + var postfix;
16254 + var offset4;
16255 + distance_code -= num_direct_distance_codes;
16256 + postfix = distance_code & distance_postfix_mask;
16257 + distance_code >>= distance_postfix_bits;
16258 + nbits = (distance_code >> 1) + 1;
16259 + offset4 = (2 + (distance_code & 1) << nbits) - 4;
16260 + distance_code = num_direct_distance_codes + (offset4 + br.readBits(nbits) << distance_postfix_bits) + postfix;
16261 + }
16262 + }
16263 + distance = TranslateShortCodes(
16264 + distance_code,
16265 + dist_rb,
16266 + dist_rb_idx
16267 + );
16268 + if (distance < 0) {
16269 + throw new Error(
16270 + "[BrotliDecompress] invalid distance"
16271 + );
16272 + }
16273 + if (pos < max_backward_distance && max_distance !== max_backward_distance) {
16274 + max_distance = pos;
16275 + } else {
16276 + max_distance = max_backward_distance;
16277 + }
16278 + copy_dst = pos & ringbuffer_mask;
16279 + if (distance > max_distance) {
16280 + if (copy_length >= BrotliDictionary.minDictionaryWordLength && copy_length <= BrotliDictionary.maxDictionaryWordLength) {
16281 + var offset4 = BrotliDictionary.offsetsByLength[copy_length];
16282 + var word_id = distance - max_distance - 1;
16283 + var shift4 = BrotliDictionary.sizeBitsByLength[copy_length];
16284 + var mask = (1 << shift4) - 1;
16285 + var word_idx = word_id & mask;
16286 + var transform_idx = word_id >> shift4;
16287 + offset4 += word_idx * copy_length;
16288 + if (transform_idx < Transform.kNumTransforms) {
16289 + var len = Transform.transformDictionaryWord(
16290 + ringbuffer,
16291 + copy_dst,
16292 + offset4,
16293 + copy_length,
16294 + transform_idx
16295 + );
16296 + copy_dst += len;
16297 + pos += len;
16298 + meta_block_remaining_len -= len;
16299 + if (copy_dst >= ringbuffer_end) {
16300 + output.write(
16301 + ringbuffer,
16302 + ringbuffer_size
16303 + );
16304 + for (var _x8 = 0; _x8 < copy_dst - ringbuffer_end; _x8++)
16305 + ringbuffer[_x8] = ringbuffer[ringbuffer_end + _x8];
16306 + }
16307 + } else {
16308 + throw new Error(
16309 + "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
16310 + );
16311 + }
16312 + } else {
16313 + throw new Error(
16314 + "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
16315 + );
16316 + }
16317 + } else {
16318 + if (distance_code > 0) {
16319 + dist_rb[dist_rb_idx & 3] = distance;
16320 + ++dist_rb_idx;
16321 + }
16322 + if (copy_length > meta_block_remaining_len) {
16323 + throw new Error(
16324 + "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
16325 + );
16326 + }
16327 + for (j2 = 0; j2 < copy_length; ++j2) {
16328 + ringbuffer[pos & ringbuffer_mask] = ringbuffer[pos - distance & ringbuffer_mask];
16329 + if ((pos & ringbuffer_mask) === ringbuffer_mask) {
16330 + output.write(
16331 + ringbuffer,
16332 + ringbuffer_size
16333 + );
16334 + }
16335 + ++pos;
16336 + --meta_block_remaining_len;
16337 + }
16338 + }
16339 + prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
16340 + prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
16341 + }
16342 + pos &= 1073741823;
16343 + }
16344 + output.write(ringbuffer, pos & ringbuffer_mask);
16345 + }
16346 + exports2.BrotliDecompress = BrotliDecompress;
16347 + BrotliDictionary.init();
16348 + },
1208 16349 {
1209 - hideWelcomeGuide: true,
1210 - onChangePath: onChangeSection
16350 + "./bit_reader": 1,
16351 + "./context": 2,
16352 + "./dictionary": 6,
16353 + "./huffman": 7,
16354 + "./prefix": 9,
16355 + "./streams": 10,
16356 + "./transform": 11
1211 16357 }
1212 - )) : null,
1213 - className: "routes-styles__page",
1214 - title: (0, import_i18n.__)("Styles")
16358 + ],
16359 + 4: [
16360 + function(require2, module2, exports2) {
16361 + var base64 = require2("base64-js");
16362 + exports2.init = function() {
16363 + var BrotliDecompressBuffer = require2("./decode").BrotliDecompressBuffer;
16364 + var compressed = base64.toByteArray(
16365 + require2("./dictionary.bin.js")
16366 + );
16367 + return BrotliDecompressBuffer(compressed);
16368 + };
16369 + },
16370 + { "./decode": 3, "./dictionary.bin.js": 5, "base64-js": 8 }
16371 + ],
16372 + 5: [
16373 + function(require2, module2, exports2) {
16374 + module2.exports = "W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4E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p/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg=";
16375 + },
16376 + {}
16377 + ],
16378 + 6: [
16379 + function(require2, module2, exports2) {
16380 + var data = require2("./dictionary-browser");
16381 + exports2.init = function() {
16382 + exports2.dictionary = data.init();
16383 + };
16384 + exports2.offsetsByLength = new Uint32Array([
16385 + 0,
16386 + 0,
16387 + 0,
16388 + 0,
16389 + 0,
16390 + 4096,
16391 + 9216,
16392 + 21504,
16393 + 35840,
16394 + 44032,
16395 + 53248,
16396 + 63488,
16397 + 74752,
16398 + 87040,
16399 + 93696,
16400 + 100864,
16401 + 104704,
16402 + 106752,
16403 + 108928,
16404 + 113536,
16405 + 115968,
16406 + 118528,
16407 + 119872,
16408 + 121280,
16409 + 122016
16410 + ]);
16411 + exports2.sizeBitsByLength = new Uint8Array([
16412 + 0,
16413 + 0,
16414 + 0,
16415 + 0,
16416 + 10,
16417 + 10,
16418 + 11,
16419 + 11,
16420 + 10,
16421 + 10,
16422 + 10,
16423 + 10,
16424 + 10,
16425 + 9,
16426 + 9,
16427 + 8,
16428 + 7,
16429 + 7,
16430 + 8,
16431 + 7,
16432 + 7,
16433 + 6,
16434 + 6,
16435 + 5,
16436 + 5
16437 + ]);
16438 + exports2.minDictionaryWordLength = 4;
16439 + exports2.maxDictionaryWordLength = 24;
16440 + },
16441 + { "./dictionary-browser": 4 }
16442 + ],
16443 + 7: [
16444 + function(require2, module2, exports2) {
16445 + function HuffmanCode(bits, value) {
16446 + this.bits = bits;
16447 + this.value = value;
16448 + }
16449 + exports2.HuffmanCode = HuffmanCode;
16450 + var MAX_LENGTH = 15;
16451 + function GetNextKey(key, len) {
16452 + var step = 1 << len - 1;
16453 + while (key & step) {
16454 + step >>= 1;
16455 + }
16456 + return (key & step - 1) + step;
16457 + }
16458 + function ReplicateValue(table, i, step, end, code) {
16459 + do {
16460 + end -= step;
16461 + table[i + end] = new HuffmanCode(
16462 + code.bits,
16463 + code.value
16464 + );
16465 + } while (end > 0);
16466 + }
16467 + function NextTableBitSize(count, len, root_bits) {
16468 + var left = 1 << len - root_bits;
16469 + while (len < MAX_LENGTH) {
16470 + left -= count[len];
16471 + if (left <= 0) break;
16472 + ++len;
16473 + left <<= 1;
16474 + }
16475 + return len - root_bits;
16476 + }
16477 + exports2.BrotliBuildHuffmanTable = function(root_table, table, root_bits, code_lengths, code_lengths_size) {
16478 + var start_table = table;
16479 + var code;
16480 + var len;
16481 + var symbol;
16482 + var key;
16483 + var step;
16484 + var low;
16485 + var mask;
16486 + var table_bits;
16487 + var table_size;
16488 + var total_size;
16489 + var sorted;
16490 + var count = new Int32Array(
16491 + MAX_LENGTH + 1
16492 + );
16493 + var offset4 = new Int32Array(
16494 + MAX_LENGTH + 1
16495 + );
16496 + sorted = new Int32Array(code_lengths_size);
16497 + for (symbol = 0; symbol < code_lengths_size; symbol++) {
16498 + count[code_lengths[symbol]]++;
16499 + }
16500 + offset4[1] = 0;
16501 + for (len = 1; len < MAX_LENGTH; len++) {
16502 + offset4[len + 1] = offset4[len] + count[len];
16503 + }
16504 + for (symbol = 0; symbol < code_lengths_size; symbol++) {
16505 + if (code_lengths[symbol] !== 0) {
16506 + sorted[offset4[code_lengths[symbol]]++] = symbol;
16507 + }
16508 + }
16509 + table_bits = root_bits;
16510 + table_size = 1 << table_bits;
16511 + total_size = table_size;
16512 + if (offset4[MAX_LENGTH] === 1) {
16513 + for (key = 0; key < total_size; ++key) {
16514 + root_table[table + key] = new HuffmanCode(
16515 + 0,
16516 + sorted[0] & 65535
16517 + );
16518 + }
16519 + return total_size;
16520 + }
16521 + key = 0;
16522 + symbol = 0;
16523 + for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) {
16524 + for (; count[len] > 0; --count[len]) {
16525 + code = new HuffmanCode(
16526 + len & 255,
16527 + sorted[symbol++] & 65535
16528 + );
16529 + ReplicateValue(
16530 + root_table,
16531 + table + key,
16532 + step,
16533 + table_size,
16534 + code
16535 + );
16536 + key = GetNextKey(key, len);
16537 + }
16538 + }
16539 + mask = total_size - 1;
16540 + low = -1;
16541 + for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) {
16542 + for (; count[len] > 0; --count[len]) {
16543 + if ((key & mask) !== low) {
16544 + table += table_size;
16545 + table_bits = NextTableBitSize(
16546 + count,
16547 + len,
16548 + root_bits
16549 + );
16550 + table_size = 1 << table_bits;
16551 + total_size += table_size;
16552 + low = key & mask;
16553 + root_table[start_table + low] = new HuffmanCode(
16554 + table_bits + root_bits & 255,
16555 + table - start_table - low & 65535
16556 + );
16557 + }
16558 + code = new HuffmanCode(
16559 + len - root_bits & 255,
16560 + sorted[symbol++] & 65535
16561 + );
16562 + ReplicateValue(
16563 + root_table,
16564 + table + (key >> root_bits),
16565 + step,
16566 + table_size,
16567 + code
16568 + );
16569 + key = GetNextKey(key, len);
16570 + }
16571 + }
16572 + return total_size;
16573 + };
16574 + },
16575 + {}
16576 + ],
16577 + 8: [
16578 + function(require2, module2, exports2) {
16579 + "use strict";
16580 + exports2.byteLength = byteLength;
16581 + exports2.toByteArray = toByteArray;
16582 + exports2.fromByteArray = fromByteArray;
16583 + var lookup = [];
16584 + var revLookup = [];
16585 + var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
16586 + var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
16587 + for (var i = 0, len = code.length; i < len; ++i) {
16588 + lookup[i] = code[i];
16589 + revLookup[code.charCodeAt(i)] = i;
16590 + }
16591 + revLookup["-".charCodeAt(0)] = 62;
16592 + revLookup["_".charCodeAt(0)] = 63;
16593 + function getLens(b64) {
16594 + var len2 = b64.length;
16595 + if (len2 % 4 > 0) {
16596 + throw new Error(
16597 + "Invalid string. Length must be a multiple of 4"
16598 + );
16599 + }
16600 + var validLen = b64.indexOf("=");
16601 + if (validLen === -1) validLen = len2;
16602 + var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
16603 + return [validLen, placeHoldersLen];
16604 + }
16605 + function byteLength(b64) {
16606 + var lens = getLens(b64);
16607 + var validLen = lens[0];
16608 + var placeHoldersLen = lens[1];
16609 + return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
16610 + }
16611 + function _byteLength(b64, validLen, placeHoldersLen) {
16612 + return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
16613 + }
16614 + function toByteArray(b64) {
16615 + var tmp;
16616 + var lens = getLens(b64);
16617 + var validLen = lens[0];
16618 + var placeHoldersLen = lens[1];
16619 + var arr = new Arr(
16620 + _byteLength(b64, validLen, placeHoldersLen)
16621 + );
16622 + var curByte = 0;
16623 + var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
16624 + for (var i2 = 0; i2 < len2; i2 += 4) {
16625 + tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];
16626 + arr[curByte++] = tmp >> 16 & 255;
16627 + arr[curByte++] = tmp >> 8 & 255;
16628 + arr[curByte++] = tmp & 255;
16629 + }
16630 + if (placeHoldersLen === 2) {
16631 + tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;
16632 + arr[curByte++] = tmp & 255;
16633 + }
16634 + if (placeHoldersLen === 1) {
16635 + tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;
16636 + arr[curByte++] = tmp >> 8 & 255;
16637 + arr[curByte++] = tmp & 255;
16638 + }
16639 + return arr;
16640 + }
16641 + function tripletToBase64(num) {
16642 + return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
16643 + }
16644 + function encodeChunk(uint8, start, end) {
16645 + var tmp;
16646 + var output = [];
16647 + for (var i2 = start; i2 < end; i2 += 3) {
16648 + tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);
16649 + output.push(tripletToBase64(tmp));
16650 + }
16651 + return output.join("");
16652 + }
16653 + function fromByteArray(uint8) {
16654 + var tmp;
16655 + var len2 = uint8.length;
16656 + var extraBytes = len2 % 3;
16657 + var parts = [];
16658 + var maxChunkLength = 16383;
16659 + for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {
16660 + parts.push(
16661 + encodeChunk(
16662 + uint8,
16663 + i2,
16664 + i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength
16665 + )
16666 + );
16667 + }
16668 + if (extraBytes === 1) {
16669 + tmp = uint8[len2 - 1];
16670 + parts.push(
16671 + lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
16672 + );
16673 + } else if (extraBytes === 2) {
16674 + tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
16675 + parts.push(
16676 + lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
16677 + );
16678 + }
16679 + return parts.join("");
16680 + }
16681 + },
16682 + {}
16683 + ],
16684 + 9: [
16685 + function(require2, module2, exports2) {
16686 + function PrefixCodeRange(offset4, nbits) {
16687 + this.offset = offset4;
16688 + this.nbits = nbits;
16689 + }
16690 + exports2.kBlockLengthPrefixCode = [
16691 + new PrefixCodeRange(1, 2),
16692 + new PrefixCodeRange(5, 2),
16693 + new PrefixCodeRange(9, 2),
16694 + new PrefixCodeRange(13, 2),
16695 + new PrefixCodeRange(17, 3),
16696 + new PrefixCodeRange(25, 3),
16697 + new PrefixCodeRange(33, 3),
16698 + new PrefixCodeRange(41, 3),
16699 + new PrefixCodeRange(49, 4),
16700 + new PrefixCodeRange(65, 4),
16701 + new PrefixCodeRange(81, 4),
16702 + new PrefixCodeRange(97, 4),
16703 + new PrefixCodeRange(113, 5),
16704 + new PrefixCodeRange(145, 5),
16705 + new PrefixCodeRange(177, 5),
16706 + new PrefixCodeRange(209, 5),
16707 + new PrefixCodeRange(241, 6),
16708 + new PrefixCodeRange(305, 6),
16709 + new PrefixCodeRange(369, 7),
16710 + new PrefixCodeRange(497, 8),
16711 + new PrefixCodeRange(753, 9),
16712 + new PrefixCodeRange(1265, 10),
16713 + new PrefixCodeRange(2289, 11),
16714 + new PrefixCodeRange(4337, 12),
16715 + new PrefixCodeRange(8433, 13),
16716 + new PrefixCodeRange(16625, 24)
16717 + ];
16718 + exports2.kInsertLengthPrefixCode = [
16719 + new PrefixCodeRange(0, 0),
16720 + new PrefixCodeRange(1, 0),
16721 + new PrefixCodeRange(2, 0),
16722 + new PrefixCodeRange(3, 0),
16723 + new PrefixCodeRange(4, 0),
16724 + new PrefixCodeRange(5, 0),
16725 + new PrefixCodeRange(6, 1),
16726 + new PrefixCodeRange(8, 1),
16727 + new PrefixCodeRange(10, 2),
16728 + new PrefixCodeRange(14, 2),
16729 + new PrefixCodeRange(18, 3),
16730 + new PrefixCodeRange(26, 3),
16731 + new PrefixCodeRange(34, 4),
16732 + new PrefixCodeRange(50, 4),
16733 + new PrefixCodeRange(66, 5),
16734 + new PrefixCodeRange(98, 5),
16735 + new PrefixCodeRange(130, 6),
16736 + new PrefixCodeRange(194, 7),
16737 + new PrefixCodeRange(322, 8),
16738 + new PrefixCodeRange(578, 9),
16739 + new PrefixCodeRange(1090, 10),
16740 + new PrefixCodeRange(2114, 12),
16741 + new PrefixCodeRange(6210, 14),
16742 + new PrefixCodeRange(22594, 24)
16743 + ];
16744 + exports2.kCopyLengthPrefixCode = [
16745 + new PrefixCodeRange(2, 0),
16746 + new PrefixCodeRange(3, 0),
16747 + new PrefixCodeRange(4, 0),
16748 + new PrefixCodeRange(5, 0),
16749 + new PrefixCodeRange(6, 0),
16750 + new PrefixCodeRange(7, 0),
16751 + new PrefixCodeRange(8, 0),
16752 + new PrefixCodeRange(9, 0),
16753 + new PrefixCodeRange(10, 1),
16754 + new PrefixCodeRange(12, 1),
16755 + new PrefixCodeRange(14, 2),
16756 + new PrefixCodeRange(18, 2),
16757 + new PrefixCodeRange(22, 3),
16758 + new PrefixCodeRange(30, 3),
16759 + new PrefixCodeRange(38, 4),
16760 + new PrefixCodeRange(54, 4),
16761 + new PrefixCodeRange(70, 5),
16762 + new PrefixCodeRange(102, 5),
16763 + new PrefixCodeRange(134, 6),
16764 + new PrefixCodeRange(198, 7),
16765 + new PrefixCodeRange(326, 8),
16766 + new PrefixCodeRange(582, 9),
16767 + new PrefixCodeRange(1094, 10),
16768 + new PrefixCodeRange(2118, 24)
16769 + ];
16770 + exports2.kInsertRangeLut = [0, 0, 8, 8, 0, 16, 8, 16, 16];
16771 + exports2.kCopyRangeLut = [0, 8, 0, 8, 16, 0, 16, 8, 16];
16772 + },
16773 + {}
16774 + ],
16775 + 10: [
16776 + function(require2, module2, exports2) {
16777 + function BrotliInput(buffer) {
16778 + this.buffer = buffer;
16779 + this.pos = 0;
16780 + }
16781 + BrotliInput.prototype.read = function(buf, i, count) {
16782 + if (this.pos + count > this.buffer.length) {
16783 + count = this.buffer.length - this.pos;
16784 + }
16785 + for (var p3 = 0; p3 < count; p3++)
16786 + buf[i + p3] = this.buffer[this.pos + p3];
16787 + this.pos += count;
16788 + return count;
16789 + };
16790 + exports2.BrotliInput = BrotliInput;
16791 + function BrotliOutput(buf) {
16792 + this.buffer = buf;
16793 + this.pos = 0;
16794 + }
16795 + BrotliOutput.prototype.write = function(buf, count) {
16796 + if (this.pos + count > this.buffer.length)
16797 + throw new Error(
16798 + "Output buffer is not large enough"
16799 + );
16800 + this.buffer.set(buf.subarray(0, count), this.pos);
16801 + this.pos += count;
16802 + return count;
16803 + };
16804 + exports2.BrotliOutput = BrotliOutput;
16805 + },
16806 + {}
16807 + ],
16808 + 11: [
16809 + function(require2, module2, exports2) {
16810 + var BrotliDictionary = require2("./dictionary");
16811 + var kIdentity = 0;
16812 + var kOmitLast1 = 1;
16813 + var kOmitLast2 = 2;
16814 + var kOmitLast3 = 3;
16815 + var kOmitLast4 = 4;
16816 + var kOmitLast5 = 5;
16817 + var kOmitLast6 = 6;
16818 + var kOmitLast7 = 7;
16819 + var kOmitLast8 = 8;
16820 + var kOmitLast9 = 9;
16821 + var kUppercaseFirst = 10;
16822 + var kUppercaseAll = 11;
16823 + var kOmitFirst1 = 12;
16824 + var kOmitFirst2 = 13;
16825 + var kOmitFirst3 = 14;
16826 + var kOmitFirst4 = 15;
16827 + var kOmitFirst5 = 16;
16828 + var kOmitFirst6 = 17;
16829 + var kOmitFirst7 = 18;
16830 + var kOmitFirst8 = 19;
16831 + var kOmitFirst9 = 20;
16832 + function Transform(prefix, transform, suffix) {
16833 + this.prefix = new Uint8Array(prefix.length);
16834 + this.transform = transform;
16835 + this.suffix = new Uint8Array(suffix.length);
16836 + for (var i = 0; i < prefix.length; i++)
16837 + this.prefix[i] = prefix.charCodeAt(i);
16838 + for (var i = 0; i < suffix.length; i++)
16839 + this.suffix[i] = suffix.charCodeAt(i);
16840 + }
16841 + var kTransforms = [
16842 + new Transform("", kIdentity, ""),
16843 + new Transform("", kIdentity, " "),
16844 + new Transform(" ", kIdentity, " "),
16845 + new Transform("", kOmitFirst1, ""),
16846 + new Transform("", kUppercaseFirst, " "),
16847 + new Transform("", kIdentity, " the "),
16848 + new Transform(" ", kIdentity, ""),
16849 + new Transform("s ", kIdentity, " "),
16850 + new Transform("", kIdentity, " of "),
16851 + new Transform("", kUppercaseFirst, ""),
16852 + new Transform("", kIdentity, " and "),
16853 + new Transform("", kOmitFirst2, ""),
16854 + new Transform("", kOmitLast1, ""),
16855 + new Transform(", ", kIdentity, " "),
16856 + new Transform("", kIdentity, ", "),
16857 + new Transform(" ", kUppercaseFirst, " "),
16858 + new Transform("", kIdentity, " in "),
16859 + new Transform("", kIdentity, " to "),
16860 + new Transform("e ", kIdentity, " "),
16861 + new Transform("", kIdentity, '"'),
16862 + new Transform("", kIdentity, "."),
16863 + new Transform("", kIdentity, '">'),
16864 + new Transform("", kIdentity, "\n"),
16865 + new Transform("", kOmitLast3, ""),
16866 + new Transform("", kIdentity, "]"),
16867 + new Transform("", kIdentity, " for "),
16868 + new Transform("", kOmitFirst3, ""),
16869 + new Transform("", kOmitLast2, ""),
16870 + new Transform("", kIdentity, " a "),
16871 + new Transform("", kIdentity, " that "),
16872 + new Transform(" ", kUppercaseFirst, ""),
16873 + new Transform("", kIdentity, ". "),
16874 + new Transform(".", kIdentity, ""),
16875 + new Transform(" ", kIdentity, ", "),
16876 + new Transform("", kOmitFirst4, ""),
16877 + new Transform("", kIdentity, " with "),
16878 + new Transform("", kIdentity, "'"),
16879 + new Transform("", kIdentity, " from "),
16880 + new Transform("", kIdentity, " by "),
16881 + new Transform("", kOmitFirst5, ""),
16882 + new Transform("", kOmitFirst6, ""),
16883 + new Transform(" the ", kIdentity, ""),
16884 + new Transform("", kOmitLast4, ""),
16885 + new Transform("", kIdentity, ". The "),
16886 + new Transform("", kUppercaseAll, ""),
16887 + new Transform("", kIdentity, " on "),
16888 + new Transform("", kIdentity, " as "),
16889 + new Transform("", kIdentity, " is "),
16890 + new Transform("", kOmitLast7, ""),
16891 + new Transform("", kOmitLast1, "ing "),
16892 + new Transform("", kIdentity, "\n "),
16893 + new Transform("", kIdentity, ":"),
16894 + new Transform(" ", kIdentity, ". "),
16895 + new Transform("", kIdentity, "ed "),
16896 + new Transform("", kOmitFirst9, ""),
16897 + new Transform("", kOmitFirst7, ""),
16898 + new Transform("", kOmitLast6, ""),
16899 + new Transform("", kIdentity, "("),
16900 + new Transform("", kUppercaseFirst, ", "),
16901 + new Transform("", kOmitLast8, ""),
16902 + new Transform("", kIdentity, " at "),
16903 + new Transform("", kIdentity, "ly "),
16904 + new Transform(" the ", kIdentity, " of "),
16905 + new Transform("", kOmitLast5, ""),
16906 + new Transform("", kOmitLast9, ""),
16907 + new Transform(" ", kUppercaseFirst, ", "),
16908 + new Transform("", kUppercaseFirst, '"'),
16909 + new Transform(".", kIdentity, "("),
16910 + new Transform("", kUppercaseAll, " "),
16911 + new Transform("", kUppercaseFirst, '">'),
16912 + new Transform("", kIdentity, '="'),
16913 + new Transform(" ", kIdentity, "."),
16914 + new Transform(".com/", kIdentity, ""),
16915 + new Transform(" the ", kIdentity, " of the "),
16916 + new Transform("", kUppercaseFirst, "'"),
16917 + new Transform("", kIdentity, ". This "),
16918 + new Transform("", kIdentity, ","),
16919 + new Transform(".", kIdentity, " "),
16920 + new Transform("", kUppercaseFirst, "("),
16921 + new Transform("", kUppercaseFirst, "."),
16922 + new Transform("", kIdentity, " not "),
16923 + new Transform(" ", kIdentity, '="'),
16924 + new Transform("", kIdentity, "er "),
16925 + new Transform(" ", kUppercaseAll, " "),
16926 + new Transform("", kIdentity, "al "),
16927 + new Transform(" ", kUppercaseAll, ""),
16928 + new Transform("", kIdentity, "='"),
16929 + new Transform("", kUppercaseAll, '"'),
16930 + new Transform("", kUppercaseFirst, ". "),
16931 + new Transform(" ", kIdentity, "("),
16932 + new Transform("", kIdentity, "ful "),
16933 + new Transform(" ", kUppercaseFirst, ". "),
16934 + new Transform("", kIdentity, "ive "),
16935 + new Transform("", kIdentity, "less "),
16936 + new Transform("", kUppercaseAll, "'"),
16937 + new Transform("", kIdentity, "est "),
16938 + new Transform(" ", kUppercaseFirst, "."),
16939 + new Transform("", kUppercaseAll, '">'),
16940 + new Transform(" ", kIdentity, "='"),
16941 + new Transform("", kUppercaseFirst, ","),
16942 + new Transform("", kIdentity, "ize "),
16943 + new Transform("", kUppercaseAll, "."),
16944 + new Transform("\xC2\xA0", kIdentity, ""),
16945 + new Transform(" ", kIdentity, ","),
16946 + new Transform("", kUppercaseFirst, '="'),
16947 + new Transform("", kUppercaseAll, '="'),
16948 + new Transform("", kIdentity, "ous "),
16949 + new Transform("", kUppercaseAll, ", "),
16950 + new Transform("", kUppercaseFirst, "='"),
16951 + new Transform(" ", kUppercaseFirst, ","),
16952 + new Transform(" ", kUppercaseAll, '="'),
16953 + new Transform(" ", kUppercaseAll, ", "),
16954 + new Transform("", kUppercaseAll, ","),
16955 + new Transform("", kUppercaseAll, "("),
16956 + new Transform("", kUppercaseAll, ". "),
16957 + new Transform(" ", kUppercaseAll, "."),
16958 + new Transform("", kUppercaseAll, "='"),
16959 + new Transform(" ", kUppercaseAll, ". "),
16960 + new Transform(" ", kUppercaseFirst, '="'),
16961 + new Transform(" ", kUppercaseAll, "='"),
16962 + new Transform(" ", kUppercaseFirst, "='")
16963 + ];
16964 + exports2.kTransforms = kTransforms;
16965 + exports2.kNumTransforms = kTransforms.length;
16966 + function ToUpperCase(p3, i) {
16967 + if (p3[i] < 192) {
16968 + if (p3[i] >= 97 && p3[i] <= 122) {
16969 + p3[i] ^= 32;
16970 + }
16971 + return 1;
16972 + }
16973 + if (p3[i] < 224) {
16974 + p3[i + 1] ^= 32;
16975 + return 2;
16976 + }
16977 + p3[i + 2] ^= 5;
16978 + return 3;
16979 + }
16980 + exports2.transformDictionaryWord = function(dst, idx, word, len, transform) {
16981 + var prefix = kTransforms[transform].prefix;
16982 + var suffix = kTransforms[transform].suffix;
16983 + var t = kTransforms[transform].transform;
16984 + var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1);
16985 + var i = 0;
16986 + var start_idx = idx;
16987 + var uppercase;
16988 + if (skip > len) {
16989 + skip = len;
16990 + }
16991 + var prefix_pos = 0;
16992 + while (prefix_pos < prefix.length) {
16993 + dst[idx++] = prefix[prefix_pos++];
16994 + }
16995 + word += skip;
16996 + len -= skip;
16997 + if (t <= kOmitLast9) {
16998 + len -= t;
16999 + }
17000 + for (i = 0; i < len; i++) {
17001 + dst[idx++] = BrotliDictionary.dictionary[word + i];
17002 + }
17003 + uppercase = idx - len;
17004 + if (t === kUppercaseFirst) {
17005 + ToUpperCase(dst, uppercase);
17006 + } else if (t === kUppercaseAll) {
17007 + while (len > 0) {
17008 + var step = ToUpperCase(dst, uppercase);
17009 + uppercase += step;
17010 + len -= step;
17011 + }
17012 + }
17013 + var suffix_pos = 0;
17014 + while (suffix_pos < suffix.length) {
17015 + dst[idx++] = suffix[suffix_pos++];
17016 + }
17017 + return idx - start_idx;
17018 + };
17019 + },
17020 + { "./dictionary": 6 }
17021 + ],
17022 + 12: [
17023 + function(require2, module2, exports2) {
17024 + module2.exports = require2("./dec/decode").BrotliDecompressBuffer;
17025 + },
17026 + { "./dec/decode": 3 }
17027 + ]
1215 17028 },
1216 - /* @__PURE__ */ React.createElement(
1217 - GlobalStylesUIWrapper,
17029 + {},
17030 + [12]
17031 + )(12);
17032 +})();
17033 +
17034 +// packages/global-styles-ui/build-module/font-library/lib/inflate.mjs
17035 +var __require3 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
17036 + get: (a, b) => (typeof __require !== "undefined" ? __require : a)[b]
17037 +}) : x2)(function(x2) {
17038 + if (typeof __require !== "undefined") return __require.apply(this, arguments);
17039 + throw Error('Dynamic require of "' + x2 + '" is not supported');
17040 +});
17041 +var inflate_default = (function() {
17042 + var define, module, exports;
17043 + return (/* @__PURE__ */ (function() {
17044 + function r2(e, n, t) {
17045 + function o(i2, f) {
17046 + if (!n[i2]) {
17047 + if (!e[i2]) {
17048 + var c2 = "function" == typeof __require3 && __require3;
17049 + if (!f && c2) return c2(i2, true);
17050 + if (u) return u(i2, true);
17051 + var a = new Error("Cannot find module '" + i2 + "'");
17052 + throw a.code = "MODULE_NOT_FOUND", a;
17053 + }
17054 + var p3 = n[i2] = { exports: {} };
17055 + e[i2][0].call(
17056 + p3.exports,
17057 + function(r22) {
17058 + var n2 = e[i2][1][r22];
17059 + return o(n2 || r22);
17060 + },
17061 + p3,
17062 + p3.exports,
17063 + r2,
17064 + e,
17065 + n,
17066 + t
17067 + );
17068 + }
17069 + return n[i2].exports;
17070 + }
17071 + for (var u = "function" == typeof __require3 && __require3, i = 0; i < t.length; i++)
17072 + o(t[i]);
17073 + return o;
17074 + }
17075 + return r2;
17076 + })())(
17077 + {
17078 + 1: [
17079 + function(require2, module2, exports2) {
17080 + "use strict";
17081 + var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined";
17082 + function _has(obj, key) {
17083 + return Object.prototype.hasOwnProperty.call(obj, key);
17084 + }
17085 + exports2.assign = function(obj) {
17086 + var sources = Array.prototype.slice.call(
17087 + arguments,
17088 + 1
17089 + );
17090 + while (sources.length) {
17091 + var source = sources.shift();
17092 + if (!source) {
17093 + continue;
17094 + }
17095 + if (typeof source !== "object") {
17096 + throw new TypeError(
17097 + source + "must be non-object"
17098 + );
17099 + }
17100 + for (var p3 in source) {
17101 + if (_has(source, p3)) {
17102 + obj[p3] = source[p3];
17103 + }
17104 + }
17105 + }
17106 + return obj;
17107 + };
17108 + exports2.shrinkBuf = function(buf, size4) {
17109 + if (buf.length === size4) {
17110 + return buf;
17111 + }
17112 + if (buf.subarray) {
17113 + return buf.subarray(0, size4);
17114 + }
17115 + buf.length = size4;
17116 + return buf;
17117 + };
17118 + var fnTyped = {
17119 + arraySet: function(dest, src, src_offs, len, dest_offs) {
17120 + if (src.subarray && dest.subarray) {
17121 + dest.set(
17122 + src.subarray(src_offs, src_offs + len),
17123 + dest_offs
17124 + );
17125 + return;
17126 + }
17127 + for (var i = 0; i < len; i++) {
17128 + dest[dest_offs + i] = src[src_offs + i];
17129 + }
17130 + },
17131 + // Join array of chunks to single array.
17132 + flattenChunks: function(chunks) {
17133 + var i, l2, len, pos, chunk, result;
17134 + len = 0;
17135 + for (i = 0, l2 = chunks.length; i < l2; i++) {
17136 + len += chunks[i].length;
17137 + }
17138 + result = new Uint8Array(len);
17139 + pos = 0;
17140 + for (i = 0, l2 = chunks.length; i < l2; i++) {
17141 + chunk = chunks[i];
17142 + result.set(chunk, pos);
17143 + pos += chunk.length;
17144 + }
17145 + return result;
17146 + }
17147 + };
17148 + var fnUntyped = {
17149 + arraySet: function(dest, src, src_offs, len, dest_offs) {
17150 + for (var i = 0; i < len; i++) {
17151 + dest[dest_offs + i] = src[src_offs + i];
17152 + }
17153 + },
17154 + // Join array of chunks to single array.
17155 + flattenChunks: function(chunks) {
17156 + return [].concat.apply([], chunks);
17157 + }
17158 + };
17159 + exports2.setTyped = function(on) {
17160 + if (on) {
17161 + exports2.Buf8 = Uint8Array;
17162 + exports2.Buf16 = Uint16Array;
17163 + exports2.Buf32 = Int32Array;
17164 + exports2.assign(exports2, fnTyped);
17165 + } else {
17166 + exports2.Buf8 = Array;
17167 + exports2.Buf16 = Array;
17168 + exports2.Buf32 = Array;
17169 + exports2.assign(exports2, fnUntyped);
17170 + }
17171 + };
17172 + exports2.setTyped(TYPED_OK);
17173 + },
17174 + {}
17175 + ],
17176 + 2: [
17177 + function(require2, module2, exports2) {
17178 + "use strict";
17179 + var utils = require2("./common");
17180 + var STR_APPLY_OK = true;
17181 + var STR_APPLY_UIA_OK = true;
17182 + try {
17183 + String.fromCharCode.apply(null, [0]);
17184 + } catch (__49) {
17185 + STR_APPLY_OK = false;
17186 + }
17187 + try {
17188 + String.fromCharCode.apply(null, new Uint8Array(1));
17189 + } catch (__49) {
17190 + STR_APPLY_UIA_OK = false;
17191 + }
17192 + var _utf8len = new utils.Buf8(256);
17193 + for (var q2 = 0; q2 < 256; q2++) {
17194 + _utf8len[q2] = q2 >= 252 ? 6 : q2 >= 248 ? 5 : q2 >= 240 ? 4 : q2 >= 224 ? 3 : q2 >= 192 ? 2 : 1;
17195 + }
17196 + _utf8len[254] = _utf8len[254] = 1;
17197 + exports2.string2buf = function(str) {
17198 + var buf, c2, c22, m_pos, i, str_len = str.length, buf_len = 0;
17199 + for (m_pos = 0; m_pos < str_len; m_pos++) {
17200 + c2 = str.charCodeAt(m_pos);
17201 + if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) {
17202 + c22 = str.charCodeAt(m_pos + 1);
17203 + if ((c22 & 64512) === 56320) {
17204 + c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320);
17205 + m_pos++;
17206 + }
17207 + }
17208 + buf_len += c2 < 128 ? 1 : c2 < 2048 ? 2 : c2 < 65536 ? 3 : 4;
17209 + }
17210 + buf = new utils.Buf8(buf_len);
17211 + for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
17212 + c2 = str.charCodeAt(m_pos);
17213 + if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) {
17214 + c22 = str.charCodeAt(m_pos + 1);
17215 + if ((c22 & 64512) === 56320) {
17216 + c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320);
17217 + m_pos++;
17218 + }
17219 + }
17220 + if (c2 < 128) {
17221 + buf[i++] = c2;
17222 + } else if (c2 < 2048) {
17223 + buf[i++] = 192 | c2 >>> 6;
17224 + buf[i++] = 128 | c2 & 63;
17225 + } else if (c2 < 65536) {
17226 + buf[i++] = 224 | c2 >>> 12;
17227 + buf[i++] = 128 | c2 >>> 6 & 63;
17228 + buf[i++] = 128 | c2 & 63;
17229 + } else {
17230 + buf[i++] = 240 | c2 >>> 18;
17231 + buf[i++] = 128 | c2 >>> 12 & 63;
17232 + buf[i++] = 128 | c2 >>> 6 & 63;
17233 + buf[i++] = 128 | c2 & 63;
17234 + }
17235 + }
17236 + return buf;
17237 + };
17238 + function buf2binstring(buf, len) {
17239 + if (len < 65534) {
17240 + if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) {
17241 + return String.fromCharCode.apply(
17242 + null,
17243 + utils.shrinkBuf(buf, len)
17244 + );
17245 + }
17246 + }
17247 + var result = "";
17248 + for (var i = 0; i < len; i++) {
17249 + result += String.fromCharCode(buf[i]);
17250 + }
17251 + return result;
17252 + }
17253 + exports2.buf2binstring = function(buf) {
17254 + return buf2binstring(buf, buf.length);
17255 + };
17256 + exports2.binstring2buf = function(str) {
17257 + var buf = new utils.Buf8(str.length);
17258 + for (var i = 0, len = buf.length; i < len; i++) {
17259 + buf[i] = str.charCodeAt(i);
17260 + }
17261 + return buf;
17262 + };
17263 + exports2.buf2string = function(buf, max2) {
17264 + var i, out, c2, c_len;
17265 + var len = max2 || buf.length;
17266 + var utf16buf = new Array(len * 2);
17267 + for (out = 0, i = 0; i < len; ) {
17268 + c2 = buf[i++];
17269 + if (c2 < 128) {
17270 + utf16buf[out++] = c2;
17271 + continue;
17272 + }
17273 + c_len = _utf8len[c2];
17274 + if (c_len > 4) {
17275 + utf16buf[out++] = 65533;
17276 + i += c_len - 1;
17277 + continue;
17278 + }
17279 + c2 &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7;
17280 + while (c_len > 1 && i < len) {
17281 + c2 = c2 << 6 | buf[i++] & 63;
17282 + c_len--;
17283 + }
17284 + if (c_len > 1) {
17285 + utf16buf[out++] = 65533;
17286 + continue;
17287 + }
17288 + if (c2 < 65536) {
17289 + utf16buf[out++] = c2;
17290 + } else {
17291 + c2 -= 65536;
17292 + utf16buf[out++] = 55296 | c2 >> 10 & 1023;
17293 + utf16buf[out++] = 56320 | c2 & 1023;
17294 + }
17295 + }
17296 + return buf2binstring(utf16buf, out);
17297 + };
17298 + exports2.utf8border = function(buf, max2) {
17299 + var pos;
17300 + max2 = max2 || buf.length;
17301 + if (max2 > buf.length) {
17302 + max2 = buf.length;
17303 + }
17304 + pos = max2 - 1;
17305 + while (pos >= 0 && (buf[pos] & 192) === 128) {
17306 + pos--;
17307 + }
17308 + if (pos < 0) {
17309 + return max2;
17310 + }
17311 + if (pos === 0) {
17312 + return max2;
17313 + }
17314 + return pos + _utf8len[buf[pos]] > max2 ? pos : max2;
17315 + };
17316 + },
17317 + { "./common": 1 }
17318 + ],
17319 + 3: [
17320 + function(require2, module2, exports2) {
17321 + "use strict";
17322 + function adler32(adler, buf, len, pos) {
17323 + var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0;
17324 + while (len !== 0) {
17325 + n = len > 2e3 ? 2e3 : len;
17326 + len -= n;
17327 + do {
17328 + s1 = s1 + buf[pos++] | 0;
17329 + s2 = s2 + s1 | 0;
17330 + } while (--n);
17331 + s1 %= 65521;
17332 + s2 %= 65521;
17333 + }
17334 + return s1 | s2 << 16 | 0;
17335 + }
17336 + module2.exports = adler32;
17337 + },
17338 + {}
17339 + ],
17340 + 4: [
17341 + function(require2, module2, exports2) {
17342 + "use strict";
17343 + module2.exports = {
17344 + /* Allowed flush values; see deflate() and inflate() below for details */
17345 + Z_NO_FLUSH: 0,
17346 + Z_PARTIAL_FLUSH: 1,
17347 + Z_SYNC_FLUSH: 2,
17348 + Z_FULL_FLUSH: 3,
17349 + Z_FINISH: 4,
17350 + Z_BLOCK: 5,
17351 + Z_TREES: 6,
17352 + /* Return codes for the compression/decompression functions. Negative values
17353 + * are errors, positive values are used for special but normal events.
17354 + */
17355 + Z_OK: 0,
17356 + Z_STREAM_END: 1,
17357 + Z_NEED_DICT: 2,
17358 + Z_ERRNO: -1,
17359 + Z_STREAM_ERROR: -2,
17360 + Z_DATA_ERROR: -3,
17361 + //Z_MEM_ERROR: -4,
17362 + Z_BUF_ERROR: -5,
17363 + //Z_VERSION_ERROR: -6,
17364 + /* compression levels */
17365 + Z_NO_COMPRESSION: 0,
17366 + Z_BEST_SPEED: 1,
17367 + Z_BEST_COMPRESSION: 9,
17368 + Z_DEFAULT_COMPRESSION: -1,
17369 + Z_FILTERED: 1,
17370 + Z_HUFFMAN_ONLY: 2,
17371 + Z_RLE: 3,
17372 + Z_FIXED: 4,
17373 + Z_DEFAULT_STRATEGY: 0,
17374 + /* Possible values of the data_type field (though see inflate()) */
17375 + Z_BINARY: 0,
17376 + Z_TEXT: 1,
17377 + //Z_ASCII: 1, // = Z_TEXT (deprecated)
17378 + Z_UNKNOWN: 2,
17379 + /* The deflate compression method */
17380 + Z_DEFLATED: 8
17381 + //Z_NULL: null // Use -1 or null inline, depending on var type
17382 + };
17383 + },
17384 + {}
17385 + ],
17386 + 5: [
17387 + function(require2, module2, exports2) {
17388 + "use strict";
17389 + function makeTable() {
17390 + var c2, table = [];
17391 + for (var n = 0; n < 256; n++) {
17392 + c2 = n;
17393 + for (var k2 = 0; k2 < 8; k2++) {
17394 + c2 = c2 & 1 ? 3988292384 ^ c2 >>> 1 : c2 >>> 1;
17395 + }
17396 + table[n] = c2;
17397 + }
17398 + return table;
17399 + }
17400 + var crcTable = makeTable();
17401 + function crc32(crc, buf, len, pos) {
17402 + var t = crcTable, end = pos + len;
17403 + crc ^= -1;
17404 + for (var i = pos; i < end; i++) {
17405 + crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255];
17406 + }
17407 + return crc ^ -1;
17408 + }
17409 + module2.exports = crc32;
17410 + },
17411 + {}
17412 + ],
17413 + 6: [
17414 + function(require2, module2, exports2) {
17415 + "use strict";
17416 + function GZheader() {
17417 + this.text = 0;
17418 + this.time = 0;
17419 + this.xflags = 0;
17420 + this.os = 0;
17421 + this.extra = null;
17422 + this.extra_len = 0;
17423 + this.name = "";
17424 + this.comment = "";
17425 + this.hcrc = 0;
17426 + this.done = false;
17427 + }
17428 + module2.exports = GZheader;
17429 + },
17430 + {}
17431 + ],
17432 + 7: [
17433 + function(require2, module2, exports2) {
17434 + "use strict";
17435 + var BAD = 30;
17436 + var TYPE = 12;
17437 + module2.exports = function inflate_fast(strm, start) {
17438 + var state;
17439 + var _in;
17440 + var last;
17441 + var _out;
17442 + var beg;
17443 + var end;
17444 + var dmax;
17445 + var wsize;
17446 + var whave;
17447 + var wnext;
17448 + var s_window;
17449 + var hold;
17450 + var bits;
17451 + var lcode;
17452 + var dcode;
17453 + var lmask;
17454 + var dmask;
17455 + var here;
17456 + var op;
17457 + var len;
17458 + var dist;
17459 + var from;
17460 + var from_source;
17461 + var input, output;
17462 + state = strm.state;
17463 + _in = strm.next_in;
17464 + input = strm.input;
17465 + last = _in + (strm.avail_in - 5);
17466 + _out = strm.next_out;
17467 + output = strm.output;
17468 + beg = _out - (start - strm.avail_out);
17469 + end = _out + (strm.avail_out - 257);
17470 + dmax = state.dmax;
17471 + wsize = state.wsize;
17472 + whave = state.whave;
17473 + wnext = state.wnext;
17474 + s_window = state.window;
17475 + hold = state.hold;
17476 + bits = state.bits;
17477 + lcode = state.lencode;
17478 + dcode = state.distcode;
17479 + lmask = (1 << state.lenbits) - 1;
17480 + dmask = (1 << state.distbits) - 1;
17481 + top: do {
17482 + if (bits < 15) {
17483 + hold += input[_in++] << bits;
17484 + bits += 8;
17485 + hold += input[_in++] << bits;
17486 + bits += 8;
17487 + }
17488 + here = lcode[hold & lmask];
17489 + dolen: for (; ; ) {
17490 + op = here >>> 24;
17491 + hold >>>= op;
17492 + bits -= op;
17493 + op = here >>> 16 & 255;
17494 + if (op === 0) {
17495 + output[_out++] = here & 65535;
17496 + } else if (op & 16) {
17497 + len = here & 65535;
17498 + op &= 15;
17499 + if (op) {
17500 + if (bits < op) {
17501 + hold += input[_in++] << bits;
17502 + bits += 8;
17503 + }
17504 + len += hold & (1 << op) - 1;
17505 + hold >>>= op;
17506 + bits -= op;
17507 + }
17508 + if (bits < 15) {
17509 + hold += input[_in++] << bits;
17510 + bits += 8;
17511 + hold += input[_in++] << bits;
17512 + bits += 8;
17513 + }
17514 + here = dcode[hold & dmask];
17515 + dodist: for (; ; ) {
17516 + op = here >>> 24;
17517 + hold >>>= op;
17518 + bits -= op;
17519 + op = here >>> 16 & 255;
17520 + if (op & 16) {
17521 + dist = here & 65535;
17522 + op &= 15;
17523 + if (bits < op) {
17524 + hold += input[_in++] << bits;
17525 + bits += 8;
17526 + if (bits < op) {
17527 + hold += input[_in++] << bits;
17528 + bits += 8;
17529 + }
17530 + }
17531 + dist += hold & (1 << op) - 1;
17532 + if (dist > dmax) {
17533 + strm.msg = "invalid distance too far back";
17534 + state.mode = BAD;
17535 + break top;
17536 + }
17537 + hold >>>= op;
17538 + bits -= op;
17539 + op = _out - beg;
17540 + if (dist > op) {
17541 + op = dist - op;
17542 + if (op > whave) {
17543 + if (state.sane) {
17544 + strm.msg = "invalid distance too far back";
17545 + state.mode = BAD;
17546 + break top;
17547 + }
17548 + }
17549 + from = 0;
17550 + from_source = s_window;
17551 + if (wnext === 0) {
17552 + from += wsize - op;
17553 + if (op < len) {
17554 + len -= op;
17555 + do {
17556 + output[_out++] = s_window[from++];
17557 + } while (--op);
17558 + from = _out - dist;
17559 + from_source = output;
17560 + }
17561 + } else if (wnext < op) {
17562 + from += wsize + wnext - op;
17563 + op -= wnext;
17564 + if (op < len) {
17565 + len -= op;
17566 + do {
17567 + output[_out++] = s_window[from++];
17568 + } while (--op);
17569 + from = 0;
17570 + if (wnext < len) {
17571 + op = wnext;
17572 + len -= op;
17573 + do {
17574 + output[_out++] = s_window[from++];
17575 + } while (--op);
17576 + from = _out - dist;
17577 + from_source = output;
17578 + }
17579 + }
17580 + } else {
17581 + from += wnext - op;
17582 + if (op < len) {
17583 + len -= op;
17584 + do {
17585 + output[_out++] = s_window[from++];
17586 + } while (--op);
17587 + from = _out - dist;
17588 + from_source = output;
17589 + }
17590 + }
17591 + while (len > 2) {
17592 + output[_out++] = from_source[from++];
17593 + output[_out++] = from_source[from++];
17594 + output[_out++] = from_source[from++];
17595 + len -= 3;
17596 + }
17597 + if (len) {
17598 + output[_out++] = from_source[from++];
17599 + if (len > 1) {
17600 + output[_out++] = from_source[from++];
17601 + }
17602 + }
17603 + } else {
17604 + from = _out - dist;
17605 + do {
17606 + output[_out++] = output[from++];
17607 + output[_out++] = output[from++];
17608 + output[_out++] = output[from++];
17609 + len -= 3;
17610 + } while (len > 2);
17611 + if (len) {
17612 + output[_out++] = output[from++];
17613 + if (len > 1) {
17614 + output[_out++] = output[from++];
17615 + }
17616 + }
17617 + }
17618 + } else if ((op & 64) === 0) {
17619 + here = dcode[(here & 65535) + (hold & (1 << op) - 1)];
17620 + continue dodist;
17621 + } else {
17622 + strm.msg = "invalid distance code";
17623 + state.mode = BAD;
17624 + break top;
17625 + }
17626 + break;
17627 + }
17628 + } else if ((op & 64) === 0) {
17629 + here = lcode[(here & 65535) + (hold & (1 << op) - 1)];
17630 + continue dolen;
17631 + } else if (op & 32) {
17632 + state.mode = TYPE;
17633 + break top;
17634 + } else {
17635 + strm.msg = "invalid literal/length code";
17636 + state.mode = BAD;
17637 + break top;
17638 + }
17639 + break;
17640 + }
17641 + } while (_in < last && _out < end);
17642 + len = bits >> 3;
17643 + _in -= len;
17644 + bits -= len << 3;
17645 + hold &= (1 << bits) - 1;
17646 + strm.next_in = _in;
17647 + strm.next_out = _out;
17648 + strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last);
17649 + strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end);
17650 + state.hold = hold;
17651 + state.bits = bits;
17652 + return;
17653 + };
17654 + },
17655 + {}
17656 + ],
17657 + 8: [
17658 + function(require2, module2, exports2) {
17659 + "use strict";
17660 + var utils = require2("../utils/common");
17661 + var adler32 = require2("./adler32");
17662 + var crc32 = require2("./crc32");
17663 + var inflate_fast = require2("./inffast");
17664 + var inflate_table = require2("./inftrees");
17665 + var CODES = 0;
17666 + var LENS = 1;
17667 + var DISTS = 2;
17668 + var Z_FINISH = 4;
17669 + var Z_BLOCK = 5;
17670 + var Z_TREES = 6;
17671 + var Z_OK = 0;
17672 + var Z_STREAM_END = 1;
17673 + var Z_NEED_DICT = 2;
17674 + var Z_STREAM_ERROR = -2;
17675 + var Z_DATA_ERROR = -3;
17676 + var Z_MEM_ERROR = -4;
17677 + var Z_BUF_ERROR = -5;
17678 + var Z_DEFLATED = 8;
17679 + var HEAD = 1;
17680 + var FLAGS = 2;
17681 + var TIME = 3;
17682 + var OS = 4;
17683 + var EXLEN = 5;
17684 + var EXTRA = 6;
17685 + var NAME = 7;
17686 + var COMMENT = 8;
17687 + var HCRC = 9;
17688 + var DICTID = 10;
17689 + var DICT = 11;
17690 + var TYPE = 12;
17691 + var TYPEDO = 13;
17692 + var STORED = 14;
17693 + var COPY_ = 15;
17694 + var COPY = 16;
17695 + var TABLE = 17;
17696 + var LENLENS = 18;
17697 + var CODELENS = 19;
17698 + var LEN_ = 20;
17699 + var LEN = 21;
17700 + var LENEXT = 22;
17701 + var DIST = 23;
17702 + var DISTEXT = 24;
17703 + var MATCH = 25;
17704 + var LIT = 26;
17705 + var CHECK = 27;
17706 + var LENGTH = 28;
17707 + var DONE = 29;
17708 + var BAD = 30;
17709 + var MEM = 31;
17710 + var SYNC = 32;
17711 + var ENOUGH_LENS = 852;
17712 + var ENOUGH_DISTS = 592;
17713 + var MAX_WBITS = 15;
17714 + var DEF_WBITS = MAX_WBITS;
17715 + function zswap32(q2) {
17716 + return (q2 >>> 24 & 255) + (q2 >>> 8 & 65280) + ((q2 & 65280) << 8) + ((q2 & 255) << 24);
17717 + }
17718 + function InflateState() {
17719 + this.mode = 0;
17720 + this.last = false;
17721 + this.wrap = 0;
17722 + this.havedict = false;
17723 + this.flags = 0;
17724 + this.dmax = 0;
17725 + this.check = 0;
17726 + this.total = 0;
17727 + this.head = null;
17728 + this.wbits = 0;
17729 + this.wsize = 0;
17730 + this.whave = 0;
17731 + this.wnext = 0;
17732 + this.window = null;
17733 + this.hold = 0;
17734 + this.bits = 0;
17735 + this.length = 0;
17736 + this.offset = 0;
17737 + this.extra = 0;
17738 + this.lencode = null;
17739 + this.distcode = null;
17740 + this.lenbits = 0;
17741 + this.distbits = 0;
17742 + this.ncode = 0;
17743 + this.nlen = 0;
17744 + this.ndist = 0;
17745 + this.have = 0;
17746 + this.next = null;
17747 + this.lens = new utils.Buf16(
17748 + 320
17749 + );
17750 + this.work = new utils.Buf16(
17751 + 288
17752 + );
17753 + this.lendyn = null;
17754 + this.distdyn = null;
17755 + this.sane = 0;
17756 + this.back = 0;
17757 + this.was = 0;
17758 + }
17759 + function inflateResetKeep(strm) {
17760 + var state;
17761 + if (!strm || !strm.state) {
17762 + return Z_STREAM_ERROR;
17763 + }
17764 + state = strm.state;
17765 + strm.total_in = strm.total_out = state.total = 0;
17766 + strm.msg = "";
17767 + if (state.wrap) {
17768 + strm.adler = state.wrap & 1;
17769 + }
17770 + state.mode = HEAD;
17771 + state.last = 0;
17772 + state.havedict = 0;
17773 + state.dmax = 32768;
17774 + state.head = null;
17775 + state.hold = 0;
17776 + state.bits = 0;
17777 + state.lencode = state.lendyn = new utils.Buf32(
17778 + ENOUGH_LENS
17779 + );
17780 + state.distcode = state.distdyn = new utils.Buf32(
17781 + ENOUGH_DISTS
17782 + );
17783 + state.sane = 1;
17784 + state.back = -1;
17785 + return Z_OK;
17786 + }
17787 + function inflateReset(strm) {
17788 + var state;
17789 + if (!strm || !strm.state) {
17790 + return Z_STREAM_ERROR;
17791 + }
17792 + state = strm.state;
17793 + state.wsize = 0;
17794 + state.whave = 0;
17795 + state.wnext = 0;
17796 + return inflateResetKeep(strm);
17797 + }
17798 + function inflateReset2(strm, windowBits) {
17799 + var wrap;
17800 + var state;
17801 + if (!strm || !strm.state) {
17802 + return Z_STREAM_ERROR;
17803 + }
17804 + state = strm.state;
17805 + if (windowBits < 0) {
17806 + wrap = 0;
17807 + windowBits = -windowBits;
17808 + } else {
17809 + wrap = (windowBits >> 4) + 1;
17810 + if (windowBits < 48) {
17811 + windowBits &= 15;
17812 + }
17813 + }
17814 + if (windowBits && (windowBits < 8 || windowBits > 15)) {
17815 + return Z_STREAM_ERROR;
17816 + }
17817 + if (state.window !== null && state.wbits !== windowBits) {
17818 + state.window = null;
17819 + }
17820 + state.wrap = wrap;
17821 + state.wbits = windowBits;
17822 + return inflateReset(strm);
17823 + }
17824 + function inflateInit2(strm, windowBits) {
17825 + var ret;
17826 + var state;
17827 + if (!strm) {
17828 + return Z_STREAM_ERROR;
17829 + }
17830 + state = new InflateState();
17831 + strm.state = state;
17832 + state.window = null;
17833 + ret = inflateReset2(strm, windowBits);
17834 + if (ret !== Z_OK) {
17835 + strm.state = null;
17836 + }
17837 + return ret;
17838 + }
17839 + function inflateInit(strm) {
17840 + return inflateInit2(strm, DEF_WBITS);
17841 + }
17842 + var virgin = true;
17843 + var lenfix, distfix;
17844 + function fixedtables(state) {
17845 + if (virgin) {
17846 + var sym;
17847 + lenfix = new utils.Buf32(512);
17848 + distfix = new utils.Buf32(32);
17849 + sym = 0;
17850 + while (sym < 144) {
17851 + state.lens[sym++] = 8;
17852 + }
17853 + while (sym < 256) {
17854 + state.lens[sym++] = 9;
17855 + }
17856 + while (sym < 280) {
17857 + state.lens[sym++] = 7;
17858 + }
17859 + while (sym < 288) {
17860 + state.lens[sym++] = 8;
17861 + }
17862 + inflate_table(
17863 + LENS,
17864 + state.lens,
17865 + 0,
17866 + 288,
17867 + lenfix,
17868 + 0,
17869 + state.work,
17870 + { bits: 9 }
17871 + );
17872 + sym = 0;
17873 + while (sym < 32) {
17874 + state.lens[sym++] = 5;
17875 + }
17876 + inflate_table(
17877 + DISTS,
17878 + state.lens,
17879 + 0,
17880 + 32,
17881 + distfix,
17882 + 0,
17883 + state.work,
17884 + { bits: 5 }
17885 + );
17886 + virgin = false;
17887 + }
17888 + state.lencode = lenfix;
17889 + state.lenbits = 9;
17890 + state.distcode = distfix;
17891 + state.distbits = 5;
17892 + }
17893 + function updatewindow(strm, src, end, copy) {
17894 + var dist;
17895 + var state = strm.state;
17896 + if (state.window === null) {
17897 + state.wsize = 1 << state.wbits;
17898 + state.wnext = 0;
17899 + state.whave = 0;
17900 + state.window = new utils.Buf8(state.wsize);
17901 + }
17902 + if (copy >= state.wsize) {
17903 + utils.arraySet(
17904 + state.window,
17905 + src,
17906 + end - state.wsize,
17907 + state.wsize,
17908 + 0
17909 + );
17910 + state.wnext = 0;
17911 + state.whave = state.wsize;
17912 + } else {
17913 + dist = state.wsize - state.wnext;
17914 + if (dist > copy) {
17915 + dist = copy;
17916 + }
17917 + utils.arraySet(
17918 + state.window,
17919 + src,
17920 + end - copy,
17921 + dist,
17922 + state.wnext
17923 + );
17924 + copy -= dist;
17925 + if (copy) {
17926 + utils.arraySet(
17927 + state.window,
17928 + src,
17929 + end - copy,
17930 + copy,
17931 + 0
17932 + );
17933 + state.wnext = copy;
17934 + state.whave = state.wsize;
17935 + } else {
17936 + state.wnext += dist;
17937 + if (state.wnext === state.wsize) {
17938 + state.wnext = 0;
17939 + }
17940 + if (state.whave < state.wsize) {
17941 + state.whave += dist;
17942 + }
17943 + }
17944 + }
17945 + return 0;
17946 + }
17947 + function inflate(strm, flush) {
17948 + var state;
17949 + var input, output;
17950 + var next;
17951 + var put;
17952 + var have, left;
17953 + var hold;
17954 + var bits;
17955 + var _in, _out;
17956 + var copy;
17957 + var from;
17958 + var from_source;
17959 + var here = 0;
17960 + var here_bits, here_op, here_val;
17961 + var last_bits, last_op, last_val;
17962 + var len;
17963 + var ret;
17964 + var hbuf = new utils.Buf8(
17965 + 4
17966 + );
17967 + var opts;
17968 + var n;
17969 + var order = (
17970 + /* permutation of code lengths */
17971 + [
17972 + 16,
17973 + 17,
17974 + 18,
17975 + 0,
17976 + 8,
17977 + 7,
17978 + 9,
17979 + 6,
17980 + 10,
17981 + 5,
17982 + 11,
17983 + 4,
17984 + 12,
17985 + 3,
17986 + 13,
17987 + 2,
17988 + 14,
17989 + 1,
17990 + 15
17991 + ]
17992 + );
17993 + if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) {
17994 + return Z_STREAM_ERROR;
17995 + }
17996 + state = strm.state;
17997 + if (state.mode === TYPE) {
17998 + state.mode = TYPEDO;
17999 + }
18000 + put = strm.next_out;
18001 + output = strm.output;
18002 + left = strm.avail_out;
18003 + next = strm.next_in;
18004 + input = strm.input;
18005 + have = strm.avail_in;
18006 + hold = state.hold;
18007 + bits = state.bits;
18008 + _in = have;
18009 + _out = left;
18010 + ret = Z_OK;
18011 + inf_leave: for (; ; ) {
18012 + switch (state.mode) {
18013 + case HEAD:
18014 + if (state.wrap === 0) {
18015 + state.mode = TYPEDO;
18016 + break;
18017 + }
18018 + while (bits < 16) {
18019 + if (have === 0) {
18020 + break inf_leave;
18021 + }
18022 + have--;
18023 + hold += input[next++] << bits;
18024 + bits += 8;
18025 + }
18026 + if (state.wrap & 2 && hold === 35615) {
18027 + state.check = 0;
18028 + hbuf[0] = hold & 255;
18029 + hbuf[1] = hold >>> 8 & 255;
18030 + state.check = crc32(
18031 + state.check,
18032 + hbuf,
18033 + 2,
18034 + 0
18035 + );
18036 + hold = 0;
18037 + bits = 0;
18038 + state.mode = FLAGS;
18039 + break;
18040 + }
18041 + state.flags = 0;
18042 + if (state.head) {
18043 + state.head.done = false;
18044 + }
18045 + if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {
18046 + strm.msg = "incorrect header check";
18047 + state.mode = BAD;
18048 + break;
18049 + }
18050 + if ((hold & 15) !== Z_DEFLATED) {
18051 + strm.msg = "unknown compression method";
18052 + state.mode = BAD;
18053 + break;
18054 + }
18055 + hold >>>= 4;
18056 + bits -= 4;
18057 + len = (hold & 15) + 8;
18058 + if (state.wbits === 0) {
18059 + state.wbits = len;
18060 + } else if (len > state.wbits) {
18061 + strm.msg = "invalid window size";
18062 + state.mode = BAD;
18063 + break;
18064 + }
18065 + state.dmax = 1 << len;
18066 + strm.adler = state.check = 1;
18067 + state.mode = hold & 512 ? DICTID : TYPE;
18068 + hold = 0;
18069 + bits = 0;
18070 + break;
18071 + case FLAGS:
18072 + while (bits < 16) {
18073 + if (have === 0) {
18074 + break inf_leave;
18075 + }
18076 + have--;
18077 + hold += input[next++] << bits;
18078 + bits += 8;
18079 + }
18080 + state.flags = hold;
18081 + if ((state.flags & 255) !== Z_DEFLATED) {
18082 + strm.msg = "unknown compression method";
18083 + state.mode = BAD;
18084 + break;
18085 + }
18086 + if (state.flags & 57344) {
18087 + strm.msg = "unknown header flags set";
18088 + state.mode = BAD;
18089 + break;
18090 + }
18091 + if (state.head) {
18092 + state.head.text = hold >> 8 & 1;
18093 + }
18094 + if (state.flags & 512) {
18095 + hbuf[0] = hold & 255;
18096 + hbuf[1] = hold >>> 8 & 255;
18097 + state.check = crc32(
18098 + state.check,
18099 + hbuf,
18100 + 2,
18101 + 0
18102 + );
18103 + }
18104 + hold = 0;
18105 + bits = 0;
18106 + state.mode = TIME;
18107 + /* falls through */
18108 + case TIME:
18109 + while (bits < 32) {
18110 + if (have === 0) {
18111 + break inf_leave;
18112 + }
18113 + have--;
18114 + hold += input[next++] << bits;
18115 + bits += 8;
18116 + }
18117 + if (state.head) {
18118 + state.head.time = hold;
18119 + }
18120 + if (state.flags & 512) {
18121 + hbuf[0] = hold & 255;
18122 + hbuf[1] = hold >>> 8 & 255;
18123 + hbuf[2] = hold >>> 16 & 255;
18124 + hbuf[3] = hold >>> 24 & 255;
18125 + state.check = crc32(
18126 + state.check,
18127 + hbuf,
18128 + 4,
18129 + 0
18130 + );
18131 + }
18132 + hold = 0;
18133 + bits = 0;
18134 + state.mode = OS;
18135 + /* falls through */
18136 + case OS:
18137 + while (bits < 16) {
18138 + if (have === 0) {
18139 + break inf_leave;
18140 + }
18141 + have--;
18142 + hold += input[next++] << bits;
18143 + bits += 8;
18144 + }
18145 + if (state.head) {
18146 + state.head.xflags = hold & 255;
18147 + state.head.os = hold >> 8;
18148 + }
18149 + if (state.flags & 512) {
18150 + hbuf[0] = hold & 255;
18151 + hbuf[1] = hold >>> 8 & 255;
18152 + state.check = crc32(
18153 + state.check,
18154 + hbuf,
18155 + 2,
18156 + 0
18157 + );
18158 + }
18159 + hold = 0;
18160 + bits = 0;
18161 + state.mode = EXLEN;
18162 + /* falls through */
18163 + case EXLEN:
18164 + if (state.flags & 1024) {
18165 + while (bits < 16) {
18166 + if (have === 0) {
18167 + break inf_leave;
18168 + }
18169 + have--;
18170 + hold += input[next++] << bits;
18171 + bits += 8;
18172 + }
18173 + state.length = hold;
18174 + if (state.head) {
18175 + state.head.extra_len = hold;
18176 + }
18177 + if (state.flags & 512) {
18178 + hbuf[0] = hold & 255;
18179 + hbuf[1] = hold >>> 8 & 255;
18180 + state.check = crc32(
18181 + state.check,
18182 + hbuf,
18183 + 2,
18184 + 0
18185 + );
18186 + }
18187 + hold = 0;
18188 + bits = 0;
18189 + } else if (state.head) {
18190 + state.head.extra = null;
18191 + }
18192 + state.mode = EXTRA;
18193 + /* falls through */
18194 + case EXTRA:
18195 + if (state.flags & 1024) {
18196 + copy = state.length;
18197 + if (copy > have) {
18198 + copy = have;
18199 + }
18200 + if (copy) {
18201 + if (state.head) {
18202 + len = state.head.extra_len - state.length;
18203 + if (!state.head.extra) {
18204 + state.head.extra = new Array(
18205 + state.head.extra_len
18206 + );
18207 + }
18208 + utils.arraySet(
18209 + state.head.extra,
18210 + input,
18211 + next,
18212 + // extra field is limited to 65536 bytes
18213 + // - no need for additional size check
18214 + copy,
18215 + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
18216 + len
18217 + );
18218 + }
18219 + if (state.flags & 512) {
18220 + state.check = crc32(
18221 + state.check,
18222 + input,
18223 + copy,
18224 + next
18225 + );
18226 + }
18227 + have -= copy;
18228 + next += copy;
18229 + state.length -= copy;
18230 + }
18231 + if (state.length) {
18232 + break inf_leave;
18233 + }
18234 + }
18235 + state.length = 0;
18236 + state.mode = NAME;
18237 + /* falls through */
18238 + case NAME:
18239 + if (state.flags & 2048) {
18240 + if (have === 0) {
18241 + break inf_leave;
18242 + }
18243 + copy = 0;
18244 + do {
18245 + len = input[next + copy++];
18246 + if (state.head && len && state.length < 65536) {
18247 + state.head.name += String.fromCharCode(len);
18248 + }
18249 + } while (len && copy < have);
18250 + if (state.flags & 512) {
18251 + state.check = crc32(
18252 + state.check,
18253 + input,
18254 + copy,
18255 + next
18256 + );
18257 + }
18258 + have -= copy;
18259 + next += copy;
18260 + if (len) {
18261 + break inf_leave;
18262 + }
18263 + } else if (state.head) {
18264 + state.head.name = null;
18265 + }
18266 + state.length = 0;
18267 + state.mode = COMMENT;
18268 + /* falls through */
18269 + case COMMENT:
18270 + if (state.flags & 4096) {
18271 + if (have === 0) {
18272 + break inf_leave;
18273 + }
18274 + copy = 0;
18275 + do {
18276 + len = input[next + copy++];
18277 + if (state.head && len && state.length < 65536) {
18278 + state.head.comment += String.fromCharCode(len);
18279 + }
18280 + } while (len && copy < have);
18281 + if (state.flags & 512) {
18282 + state.check = crc32(
18283 + state.check,
18284 + input,
18285 + copy,
18286 + next
18287 + );
18288 + }
18289 + have -= copy;
18290 + next += copy;
18291 + if (len) {
18292 + break inf_leave;
18293 + }
18294 + } else if (state.head) {
18295 + state.head.comment = null;
18296 + }
18297 + state.mode = HCRC;
18298 + /* falls through */
18299 + case HCRC:
18300 + if (state.flags & 512) {
18301 + while (bits < 16) {
18302 + if (have === 0) {
18303 + break inf_leave;
18304 + }
18305 + have--;
18306 + hold += input[next++] << bits;
18307 + bits += 8;
18308 + }
18309 + if (hold !== (state.check & 65535)) {
18310 + strm.msg = "header crc mismatch";
18311 + state.mode = BAD;
18312 + break;
18313 + }
18314 + hold = 0;
18315 + bits = 0;
18316 + }
18317 + if (state.head) {
18318 + state.head.hcrc = state.flags >> 9 & 1;
18319 + state.head.done = true;
18320 + }
18321 + strm.adler = state.check = 0;
18322 + state.mode = TYPE;
18323 + break;
18324 + case DICTID:
18325 + while (bits < 32) {
18326 + if (have === 0) {
18327 + break inf_leave;
18328 + }
18329 + have--;
18330 + hold += input[next++] << bits;
18331 + bits += 8;
18332 + }
18333 + strm.adler = state.check = zswap32(hold);
18334 + hold = 0;
18335 + bits = 0;
18336 + state.mode = DICT;
18337 + /* falls through */
18338 + case DICT:
18339 + if (state.havedict === 0) {
18340 + strm.next_out = put;
18341 + strm.avail_out = left;
18342 + strm.next_in = next;
18343 + strm.avail_in = have;
18344 + state.hold = hold;
18345 + state.bits = bits;
18346 + return Z_NEED_DICT;
18347 + }
18348 + strm.adler = state.check = 1;
18349 + state.mode = TYPE;
18350 + /* falls through */
18351 + case TYPE:
18352 + if (flush === Z_BLOCK || flush === Z_TREES) {
18353 + break inf_leave;
18354 + }
18355 + /* falls through */
18356 + case TYPEDO:
18357 + if (state.last) {
18358 + hold >>>= bits & 7;
18359 + bits -= bits & 7;
18360 + state.mode = CHECK;
18361 + break;
18362 + }
18363 + while (bits < 3) {
18364 + if (have === 0) {
18365 + break inf_leave;
18366 + }
18367 + have--;
18368 + hold += input[next++] << bits;
18369 + bits += 8;
18370 + }
18371 + state.last = hold & 1;
18372 + hold >>>= 1;
18373 + bits -= 1;
18374 + switch (hold & 3) {
18375 + case 0:
18376 + state.mode = STORED;
18377 + break;
18378 + case 1:
18379 + fixedtables(state);
18380 + state.mode = LEN_;
18381 + if (flush === Z_TREES) {
18382 + hold >>>= 2;
18383 + bits -= 2;
18384 + break inf_leave;
18385 + }
18386 + break;
18387 + case 2:
18388 + state.mode = TABLE;
18389 + break;
18390 + case 3:
18391 + strm.msg = "invalid block type";
18392 + state.mode = BAD;
18393 + }
18394 + hold >>>= 2;
18395 + bits -= 2;
18396 + break;
18397 + case STORED:
18398 + hold >>>= bits & 7;
18399 + bits -= bits & 7;
18400 + while (bits < 32) {
18401 + if (have === 0) {
18402 + break inf_leave;
18403 + }
18404 + have--;
18405 + hold += input[next++] << bits;
18406 + bits += 8;
18407 + }
18408 + if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {
18409 + strm.msg = "invalid stored block lengths";
18410 + state.mode = BAD;
18411 + break;
18412 + }
18413 + state.length = hold & 65535;
18414 + hold = 0;
18415 + bits = 0;
18416 + state.mode = COPY_;
18417 + if (flush === Z_TREES) {
18418 + break inf_leave;
18419 + }
18420 + /* falls through */
18421 + case COPY_:
18422 + state.mode = COPY;
18423 + /* falls through */
18424 + case COPY:
18425 + copy = state.length;
18426 + if (copy) {
18427 + if (copy > have) {
18428 + copy = have;
18429 + }
18430 + if (copy > left) {
18431 + copy = left;
18432 + }
18433 + if (copy === 0) {
18434 + break inf_leave;
18435 + }
18436 + utils.arraySet(
18437 + output,
18438 + input,
18439 + next,
18440 + copy,
18441 + put
18442 + );
18443 + have -= copy;
18444 + next += copy;
18445 + left -= copy;
18446 + put += copy;
18447 + state.length -= copy;
18448 + break;
18449 + }
18450 + state.mode = TYPE;
18451 + break;
18452 + case TABLE:
18453 + while (bits < 14) {
18454 + if (have === 0) {
18455 + break inf_leave;
18456 + }
18457 + have--;
18458 + hold += input[next++] << bits;
18459 + bits += 8;
18460 + }
18461 + state.nlen = (hold & 31) + 257;
18462 + hold >>>= 5;
18463 + bits -= 5;
18464 + state.ndist = (hold & 31) + 1;
18465 + hold >>>= 5;
18466 + bits -= 5;
18467 + state.ncode = (hold & 15) + 4;
18468 + hold >>>= 4;
18469 + bits -= 4;
18470 + if (state.nlen > 286 || state.ndist > 30) {
18471 + strm.msg = "too many length or distance symbols";
18472 + state.mode = BAD;
18473 + break;
18474 + }
18475 + state.have = 0;
18476 + state.mode = LENLENS;
18477 + /* falls through */
18478 + case LENLENS:
18479 + while (state.have < state.ncode) {
18480 + while (bits < 3) {
18481 + if (have === 0) {
18482 + break inf_leave;
18483 + }
18484 + have--;
18485 + hold += input[next++] << bits;
18486 + bits += 8;
18487 + }
18488 + state.lens[order[state.have++]] = hold & 7;
18489 + hold >>>= 3;
18490 + bits -= 3;
18491 + }
18492 + while (state.have < 19) {
18493 + state.lens[order[state.have++]] = 0;
18494 + }
18495 + state.lencode = state.lendyn;
18496 + state.lenbits = 7;
18497 + opts = { bits: state.lenbits };
18498 + ret = inflate_table(
18499 + CODES,
18500 + state.lens,
18501 + 0,
18502 + 19,
18503 + state.lencode,
18504 + 0,
18505 + state.work,
18506 + opts
18507 + );
18508 + state.lenbits = opts.bits;
18509 + if (ret) {
18510 + strm.msg = "invalid code lengths set";
18511 + state.mode = BAD;
18512 + break;
18513 + }
18514 + state.have = 0;
18515 + state.mode = CODELENS;
18516 + /* falls through */
18517 + case CODELENS:
18518 + while (state.have < state.nlen + state.ndist) {
18519 + for (; ; ) {
18520 + here = state.lencode[hold & (1 << state.lenbits) - 1];
18521 + here_bits = here >>> 24;
18522 + here_op = here >>> 16 & 255;
18523 + here_val = here & 65535;
18524 + if (here_bits <= bits) {
18525 + break;
18526 + }
18527 + if (have === 0) {
18528 + break inf_leave;
18529 + }
18530 + have--;
18531 + hold += input[next++] << bits;
18532 + bits += 8;
18533 + }
18534 + if (here_val < 16) {
18535 + hold >>>= here_bits;
18536 + bits -= here_bits;
18537 + state.lens[state.have++] = here_val;
18538 + } else {
18539 + if (here_val === 16) {
18540 + n = here_bits + 2;
18541 + while (bits < n) {
18542 + if (have === 0) {
18543 + break inf_leave;
18544 + }
18545 + have--;
18546 + hold += input[next++] << bits;
18547 + bits += 8;
18548 + }
18549 + hold >>>= here_bits;
18550 + bits -= here_bits;
18551 + if (state.have === 0) {
18552 + strm.msg = "invalid bit length repeat";
18553 + state.mode = BAD;
18554 + break;
18555 + }
18556 + len = state.lens[state.have - 1];
18557 + copy = 3 + (hold & 3);
18558 + hold >>>= 2;
18559 + bits -= 2;
18560 + } else if (here_val === 17) {
18561 + n = here_bits + 3;
18562 + while (bits < n) {
18563 + if (have === 0) {
18564 + break inf_leave;
18565 + }
18566 + have--;
18567 + hold += input[next++] << bits;
18568 + bits += 8;
18569 + }
18570 + hold >>>= here_bits;
18571 + bits -= here_bits;
18572 + len = 0;
18573 + copy = 3 + (hold & 7);
18574 + hold >>>= 3;
18575 + bits -= 3;
18576 + } else {
18577 + n = here_bits + 7;
18578 + while (bits < n) {
18579 + if (have === 0) {
18580 + break inf_leave;
18581 + }
18582 + have--;
18583 + hold += input[next++] << bits;
18584 + bits += 8;
18585 + }
18586 + hold >>>= here_bits;
18587 + bits -= here_bits;
18588 + len = 0;
18589 + copy = 11 + (hold & 127);
18590 + hold >>>= 7;
18591 + bits -= 7;
18592 + }
18593 + if (state.have + copy > state.nlen + state.ndist) {
18594 + strm.msg = "invalid bit length repeat";
18595 + state.mode = BAD;
18596 + break;
18597 + }
18598 + while (copy--) {
18599 + state.lens[state.have++] = len;
18600 + }
18601 + }
18602 + }
18603 + if (state.mode === BAD) {
18604 + break;
18605 + }
18606 + if (state.lens[256] === 0) {
18607 + strm.msg = "invalid code -- missing end-of-block";
18608 + state.mode = BAD;
18609 + break;
18610 + }
18611 + state.lenbits = 9;
18612 + opts = { bits: state.lenbits };
18613 + ret = inflate_table(
18614 + LENS,
18615 + state.lens,
18616 + 0,
18617 + state.nlen,
18618 + state.lencode,
18619 + 0,
18620 + state.work,
18621 + opts
18622 + );
18623 + state.lenbits = opts.bits;
18624 + if (ret) {
18625 + strm.msg = "invalid literal/lengths set";
18626 + state.mode = BAD;
18627 + break;
18628 + }
18629 + state.distbits = 6;
18630 + state.distcode = state.distdyn;
18631 + opts = { bits: state.distbits };
18632 + ret = inflate_table(
18633 + DISTS,
18634 + state.lens,
18635 + state.nlen,
18636 + state.ndist,
18637 + state.distcode,
18638 + 0,
18639 + state.work,
18640 + opts
18641 + );
18642 + state.distbits = opts.bits;
18643 + if (ret) {
18644 + strm.msg = "invalid distances set";
18645 + state.mode = BAD;
18646 + break;
18647 + }
18648 + state.mode = LEN_;
18649 + if (flush === Z_TREES) {
18650 + break inf_leave;
18651 + }
18652 + /* falls through */
18653 + case LEN_:
18654 + state.mode = LEN;
18655 + /* falls through */
18656 + case LEN:
18657 + if (have >= 6 && left >= 258) {
18658 + strm.next_out = put;
18659 + strm.avail_out = left;
18660 + strm.next_in = next;
18661 + strm.avail_in = have;
18662 + state.hold = hold;
18663 + state.bits = bits;
18664 + inflate_fast(strm, _out);
18665 + put = strm.next_out;
18666 + output = strm.output;
18667 + left = strm.avail_out;
18668 + next = strm.next_in;
18669 + input = strm.input;
18670 + have = strm.avail_in;
18671 + hold = state.hold;
18672 + bits = state.bits;
18673 + if (state.mode === TYPE) {
18674 + state.back = -1;
18675 + }
18676 + break;
18677 + }
18678 + state.back = 0;
18679 + for (; ; ) {
18680 + here = state.lencode[hold & (1 << state.lenbits) - 1];
18681 + here_bits = here >>> 24;
18682 + here_op = here >>> 16 & 255;
18683 + here_val = here & 65535;
18684 + if (here_bits <= bits) {
18685 + break;
18686 + }
18687 + if (have === 0) {
18688 + break inf_leave;
18689 + }
18690 + have--;
18691 + hold += input[next++] << bits;
18692 + bits += 8;
18693 + }
18694 + if (here_op && (here_op & 240) === 0) {
18695 + last_bits = here_bits;
18696 + last_op = here_op;
18697 + last_val = here_val;
18698 + for (; ; ) {
18699 + here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
18700 + here_bits = here >>> 24;
18701 + here_op = here >>> 16 & 255;
18702 + here_val = here & 65535;
18703 + if (last_bits + here_bits <= bits) {
18704 + break;
18705 + }
18706 + if (have === 0) {
18707 + break inf_leave;
18708 + }
18709 + have--;
18710 + hold += input[next++] << bits;
18711 + bits += 8;
18712 + }
18713 + hold >>>= last_bits;
18714 + bits -= last_bits;
18715 + state.back += last_bits;
18716 + }
18717 + hold >>>= here_bits;
18718 + bits -= here_bits;
18719 + state.back += here_bits;
18720 + state.length = here_val;
18721 + if (here_op === 0) {
18722 + state.mode = LIT;
18723 + break;
18724 + }
18725 + if (here_op & 32) {
18726 + state.back = -1;
18727 + state.mode = TYPE;
18728 + break;
18729 + }
18730 + if (here_op & 64) {
18731 + strm.msg = "invalid literal/length code";
18732 + state.mode = BAD;
18733 + break;
18734 + }
18735 + state.extra = here_op & 15;
18736 + state.mode = LENEXT;
18737 + /* falls through */
18738 + case LENEXT:
18739 + if (state.extra) {
18740 + n = state.extra;
18741 + while (bits < n) {
18742 + if (have === 0) {
18743 + break inf_leave;
18744 + }
18745 + have--;
18746 + hold += input[next++] << bits;
18747 + bits += 8;
18748 + }
18749 + state.length += hold & (1 << state.extra) - 1;
18750 + hold >>>= state.extra;
18751 + bits -= state.extra;
18752 + state.back += state.extra;
18753 + }
18754 + state.was = state.length;
18755 + state.mode = DIST;
18756 + /* falls through */
18757 + case DIST:
18758 + for (; ; ) {
18759 + here = state.distcode[hold & (1 << state.distbits) - 1];
18760 + here_bits = here >>> 24;
18761 + here_op = here >>> 16 & 255;
18762 + here_val = here & 65535;
18763 + if (here_bits <= bits) {
18764 + break;
18765 + }
18766 + if (have === 0) {
18767 + break inf_leave;
18768 + }
18769 + have--;
18770 + hold += input[next++] << bits;
18771 + bits += 8;
18772 + }
18773 + if ((here_op & 240) === 0) {
18774 + last_bits = here_bits;
18775 + last_op = here_op;
18776 + last_val = here_val;
18777 + for (; ; ) {
18778 + here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
18779 + here_bits = here >>> 24;
18780 + here_op = here >>> 16 & 255;
18781 + here_val = here & 65535;
18782 + if (last_bits + here_bits <= bits) {
18783 + break;
18784 + }
18785 + if (have === 0) {
18786 + break inf_leave;
18787 + }
18788 + have--;
18789 + hold += input[next++] << bits;
18790 + bits += 8;
18791 + }
18792 + hold >>>= last_bits;
18793 + bits -= last_bits;
18794 + state.back += last_bits;
18795 + }
18796 + hold >>>= here_bits;
18797 + bits -= here_bits;
18798 + state.back += here_bits;
18799 + if (here_op & 64) {
18800 + strm.msg = "invalid distance code";
18801 + state.mode = BAD;
18802 + break;
18803 + }
18804 + state.offset = here_val;
18805 + state.extra = here_op & 15;
18806 + state.mode = DISTEXT;
18807 + /* falls through */
18808 + case DISTEXT:
18809 + if (state.extra) {
18810 + n = state.extra;
18811 + while (bits < n) {
18812 + if (have === 0) {
18813 + break inf_leave;
18814 + }
18815 + have--;
18816 + hold += input[next++] << bits;
18817 + bits += 8;
18818 + }
18819 + state.offset += hold & (1 << state.extra) - 1;
18820 + hold >>>= state.extra;
18821 + bits -= state.extra;
18822 + state.back += state.extra;
18823 + }
18824 + if (state.offset > state.dmax) {
18825 + strm.msg = "invalid distance too far back";
18826 + state.mode = BAD;
18827 + break;
18828 + }
18829 + state.mode = MATCH;
18830 + /* falls through */
18831 + case MATCH:
18832 + if (left === 0) {
18833 + break inf_leave;
18834 + }
18835 + copy = _out - left;
18836 + if (state.offset > copy) {
18837 + copy = state.offset - copy;
18838 + if (copy > state.whave) {
18839 + if (state.sane) {
18840 + strm.msg = "invalid distance too far back";
18841 + state.mode = BAD;
18842 + break;
18843 + }
18844 + }
18845 + if (copy > state.wnext) {
18846 + copy -= state.wnext;
18847 + from = state.wsize - copy;
18848 + } else {
18849 + from = state.wnext - copy;
18850 + }
18851 + if (copy > state.length) {
18852 + copy = state.length;
18853 + }
18854 + from_source = state.window;
18855 + } else {
18856 + from_source = output;
18857 + from = put - state.offset;
18858 + copy = state.length;
18859 + }
18860 + if (copy > left) {
18861 + copy = left;
18862 + }
18863 + left -= copy;
18864 + state.length -= copy;
18865 + do {
18866 + output[put++] = from_source[from++];
18867 + } while (--copy);
18868 + if (state.length === 0) {
18869 + state.mode = LEN;
18870 + }
18871 + break;
18872 + case LIT:
18873 + if (left === 0) {
18874 + break inf_leave;
18875 + }
18876 + output[put++] = state.length;
18877 + left--;
18878 + state.mode = LEN;
18879 + break;
18880 + case CHECK:
18881 + if (state.wrap) {
18882 + while (bits < 32) {
18883 + if (have === 0) {
18884 + break inf_leave;
18885 + }
18886 + have--;
18887 + hold |= input[next++] << bits;
18888 + bits += 8;
18889 + }
18890 + _out -= left;
18891 + strm.total_out += _out;
18892 + state.total += _out;
18893 + if (_out) {
18894 + strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/
18895 + state.flags ? crc32(
18896 + state.check,
18897 + output,
18898 + _out,
18899 + put - _out
18900 + ) : adler32(
18901 + state.check,
18902 + output,
18903 + _out,
18904 + put - _out
18905 + );
18906 + }
18907 + _out = left;
18908 + if ((state.flags ? hold : zswap32(hold)) !== state.check) {
18909 + strm.msg = "incorrect data check";
18910 + state.mode = BAD;
18911 + break;
18912 + }
18913 + hold = 0;
18914 + bits = 0;
18915 + }
18916 + state.mode = LENGTH;
18917 + /* falls through */
18918 + case LENGTH:
18919 + if (state.wrap && state.flags) {
18920 + while (bits < 32) {
18921 + if (have === 0) {
18922 + break inf_leave;
18923 + }
18924 + have--;
18925 + hold += input[next++] << bits;
18926 + bits += 8;
18927 + }
18928 + if (hold !== (state.total & 4294967295)) {
18929 + strm.msg = "incorrect length check";
18930 + state.mode = BAD;
18931 + break;
18932 + }
18933 + hold = 0;
18934 + bits = 0;
18935 + }
18936 + state.mode = DONE;
18937 + /* falls through */
18938 + case DONE:
18939 + ret = Z_STREAM_END;
18940 + break inf_leave;
18941 + case BAD:
18942 + ret = Z_DATA_ERROR;
18943 + break inf_leave;
18944 + case MEM:
18945 + return Z_MEM_ERROR;
18946 + case SYNC:
18947 + /* falls through */
18948 + default:
18949 + return Z_STREAM_ERROR;
18950 + }
18951 + }
18952 + strm.next_out = put;
18953 + strm.avail_out = left;
18954 + strm.next_in = next;
18955 + strm.avail_in = have;
18956 + state.hold = hold;
18957 + state.bits = bits;
18958 + if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {
18959 + if (updatewindow(
18960 + strm,
18961 + strm.output,
18962 + strm.next_out,
18963 + _out - strm.avail_out
18964 + )) {
18965 + state.mode = MEM;
18966 + return Z_MEM_ERROR;
18967 + }
18968 + }
18969 + _in -= strm.avail_in;
18970 + _out -= strm.avail_out;
18971 + strm.total_in += _in;
18972 + strm.total_out += _out;
18973 + state.total += _out;
18974 + if (state.wrap && _out) {
18975 + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
18976 + state.flags ? crc32(
18977 + state.check,
18978 + output,
18979 + _out,
18980 + strm.next_out - _out
18981 + ) : adler32(
18982 + state.check,
18983 + output,
18984 + _out,
18985 + strm.next_out - _out
18986 + );
18987 + }
18988 + strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
18989 + if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK) {
18990 + ret = Z_BUF_ERROR;
18991 + }
18992 + return ret;
18993 + }
18994 + function inflateEnd(strm) {
18995 + if (!strm || !strm.state) {
18996 + return Z_STREAM_ERROR;
18997 + }
18998 + var state = strm.state;
18999 + if (state.window) {
19000 + state.window = null;
19001 + }
19002 + strm.state = null;
19003 + return Z_OK;
19004 + }
19005 + function inflateGetHeader(strm, head2) {
19006 + var state;
19007 + if (!strm || !strm.state) {
19008 + return Z_STREAM_ERROR;
19009 + }
19010 + state = strm.state;
19011 + if ((state.wrap & 2) === 0) {
19012 + return Z_STREAM_ERROR;
19013 + }
19014 + state.head = head2;
19015 + head2.done = false;
19016 + return Z_OK;
19017 + }
19018 + function inflateSetDictionary(strm, dictionary) {
19019 + var dictLength = dictionary.length;
19020 + var state;
19021 + var dictid;
19022 + var ret;
19023 + if (!strm || !strm.state) {
19024 + return Z_STREAM_ERROR;
19025 + }
19026 + state = strm.state;
19027 + if (state.wrap !== 0 && state.mode !== DICT) {
19028 + return Z_STREAM_ERROR;
19029 + }
19030 + if (state.mode === DICT) {
19031 + dictid = 1;
19032 + dictid = adler32(
19033 + dictid,
19034 + dictionary,
19035 + dictLength,
19036 + 0
19037 + );
19038 + if (dictid !== state.check) {
19039 + return Z_DATA_ERROR;
19040 + }
19041 + }
19042 + ret = updatewindow(
19043 + strm,
19044 + dictionary,
19045 + dictLength,
19046 + dictLength
19047 + );
19048 + if (ret) {
19049 + state.mode = MEM;
19050 + return Z_MEM_ERROR;
19051 + }
19052 + state.havedict = 1;
19053 + return Z_OK;
19054 + }
19055 + exports2.inflateReset = inflateReset;
19056 + exports2.inflateReset2 = inflateReset2;
19057 + exports2.inflateResetKeep = inflateResetKeep;
19058 + exports2.inflateInit = inflateInit;
19059 + exports2.inflateInit2 = inflateInit2;
19060 + exports2.inflate = inflate;
19061 + exports2.inflateEnd = inflateEnd;
19062 + exports2.inflateGetHeader = inflateGetHeader;
19063 + exports2.inflateSetDictionary = inflateSetDictionary;
19064 + exports2.inflateInfo = "pako inflate (from Nodeca project)";
19065 + },
19066 + {
19067 + "../utils/common": 1,
19068 + "./adler32": 3,
19069 + "./crc32": 5,
19070 + "./inffast": 7,
19071 + "./inftrees": 9
19072 + }
19073 + ],
19074 + 9: [
19075 + function(require2, module2, exports2) {
19076 + "use strict";
19077 + var utils = require2("../utils/common");
19078 + var MAXBITS = 15;
19079 + var ENOUGH_LENS = 852;
19080 + var ENOUGH_DISTS = 592;
19081 + var CODES = 0;
19082 + var LENS = 1;
19083 + var DISTS = 2;
19084 + var lbase = [
19085 + /* Length codes 257..285 base */
19086 + 3,
19087 + 4,
19088 + 5,
19089 + 6,
19090 + 7,
19091 + 8,
19092 + 9,
19093 + 10,
19094 + 11,
19095 + 13,
19096 + 15,
19097 + 17,
19098 + 19,
19099 + 23,
19100 + 27,
19101 + 31,
19102 + 35,
19103 + 43,
19104 + 51,
19105 + 59,
19106 + 67,
19107 + 83,
19108 + 99,
19109 + 115,
19110 + 131,
19111 + 163,
19112 + 195,
19113 + 227,
19114 + 258,
19115 + 0,
19116 + 0
19117 + ];
19118 + var lext = [
19119 + /* Length codes 257..285 extra */
19120 + 16,
19121 + 16,
19122 + 16,
19123 + 16,
19124 + 16,
19125 + 16,
19126 + 16,
19127 + 16,
19128 + 17,
19129 + 17,
19130 + 17,
19131 + 17,
19132 + 18,
19133 + 18,
19134 + 18,
19135 + 18,
19136 + 19,
19137 + 19,
19138 + 19,
19139 + 19,
19140 + 20,
19141 + 20,
19142 + 20,
19143 + 20,
19144 + 21,
19145 + 21,
19146 + 21,
19147 + 21,
19148 + 16,
19149 + 72,
19150 + 78
19151 + ];
19152 + var dbase = [
19153 + /* Distance codes 0..29 base */
19154 + 1,
19155 + 2,
19156 + 3,
19157 + 4,
19158 + 5,
19159 + 7,
19160 + 9,
19161 + 13,
19162 + 17,
19163 + 25,
19164 + 33,
19165 + 49,
19166 + 65,
19167 + 97,
19168 + 129,
19169 + 193,
19170 + 257,
19171 + 385,
19172 + 513,
19173 + 769,
19174 + 1025,
19175 + 1537,
19176 + 2049,
19177 + 3073,
19178 + 4097,
19179 + 6145,
19180 + 8193,
19181 + 12289,
19182 + 16385,
19183 + 24577,
19184 + 0,
19185 + 0
19186 + ];
19187 + var dext = [
19188 + /* Distance codes 0..29 extra */
19189 + 16,
19190 + 16,
19191 + 16,
19192 + 16,
19193 + 17,
19194 + 17,
19195 + 18,
19196 + 18,
19197 + 19,
19198 + 19,
19199 + 20,
19200 + 20,
19201 + 21,
19202 + 21,
19203 + 22,
19204 + 22,
19205 + 23,
19206 + 23,
19207 + 24,
19208 + 24,
19209 + 25,
19210 + 25,
19211 + 26,
19212 + 26,
19213 + 27,
19214 + 27,
19215 + 28,
19216 + 28,
19217 + 29,
19218 + 29,
19219 + 64,
19220 + 64
19221 + ];
19222 + module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {
19223 + var bits = opts.bits;
19224 + var len = 0;
19225 + var sym = 0;
19226 + var min2 = 0, max2 = 0;
19227 + var root = 0;
19228 + var curr = 0;
19229 + var drop = 0;
19230 + var left = 0;
19231 + var used = 0;
19232 + var huff = 0;
19233 + var incr;
19234 + var fill;
19235 + var low;
19236 + var mask;
19237 + var next;
19238 + var base = null;
19239 + var base_index = 0;
19240 + var end;
19241 + var count = new utils.Buf16(MAXBITS + 1);
19242 + var offs = new utils.Buf16(MAXBITS + 1);
19243 + var extra = null;
19244 + var extra_index = 0;
19245 + var here_bits, here_op, here_val;
19246 + for (len = 0; len <= MAXBITS; len++) {
19247 + count[len] = 0;
19248 + }
19249 + for (sym = 0; sym < codes; sym++) {
19250 + count[lens[lens_index + sym]]++;
19251 + }
19252 + root = bits;
19253 + for (max2 = MAXBITS; max2 >= 1; max2--) {
19254 + if (count[max2] !== 0) {
19255 + break;
19256 + }
19257 + }
19258 + if (root > max2) {
19259 + root = max2;
19260 + }
19261 + if (max2 === 0) {
19262 + table[table_index++] = 1 << 24 | 64 << 16 | 0;
19263 + table[table_index++] = 1 << 24 | 64 << 16 | 0;
19264 + opts.bits = 1;
19265 + return 0;
19266 + }
19267 + for (min2 = 1; min2 < max2; min2++) {
19268 + if (count[min2] !== 0) {
19269 + break;
19270 + }
19271 + }
19272 + if (root < min2) {
19273 + root = min2;
19274 + }
19275 + left = 1;
19276 + for (len = 1; len <= MAXBITS; len++) {
19277 + left <<= 1;
19278 + left -= count[len];
19279 + if (left < 0) {
19280 + return -1;
19281 + }
19282 + }
19283 + if (left > 0 && (type === CODES || max2 !== 1)) {
19284 + return -1;
19285 + }
19286 + offs[1] = 0;
19287 + for (len = 1; len < MAXBITS; len++) {
19288 + offs[len + 1] = offs[len] + count[len];
19289 + }
19290 + for (sym = 0; sym < codes; sym++) {
19291 + if (lens[lens_index + sym] !== 0) {
19292 + work[offs[lens[lens_index + sym]]++] = sym;
19293 + }
19294 + }
19295 + if (type === CODES) {
19296 + base = extra = work;
19297 + end = 19;
19298 + } else if (type === LENS) {
19299 + base = lbase;
19300 + base_index -= 257;
19301 + extra = lext;
19302 + extra_index -= 257;
19303 + end = 256;
19304 + } else {
19305 + base = dbase;
19306 + extra = dext;
19307 + end = -1;
19308 + }
19309 + huff = 0;
19310 + sym = 0;
19311 + len = min2;
19312 + next = table_index;
19313 + curr = root;
19314 + drop = 0;
19315 + low = -1;
19316 + used = 1 << root;
19317 + mask = used - 1;
19318 + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
19319 + return 1;
19320 + }
19321 + for (; ; ) {
19322 + here_bits = len - drop;
19323 + if (work[sym] < end) {
19324 + here_op = 0;
19325 + here_val = work[sym];
19326 + } else if (work[sym] > end) {
19327 + here_op = extra[extra_index + work[sym]];
19328 + here_val = base[base_index + work[sym]];
19329 + } else {
19330 + here_op = 32 + 64;
19331 + here_val = 0;
19332 + }
19333 + incr = 1 << len - drop;
19334 + fill = 1 << curr;
19335 + min2 = fill;
19336 + do {
19337 + fill -= incr;
19338 + table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;
19339 + } while (fill !== 0);
19340 + incr = 1 << len - 1;
19341 + while (huff & incr) {
19342 + incr >>= 1;
19343 + }
19344 + if (incr !== 0) {
19345 + huff &= incr - 1;
19346 + huff += incr;
19347 + } else {
19348 + huff = 0;
19349 + }
19350 + sym++;
19351 + if (--count[len] === 0) {
19352 + if (len === max2) {
19353 + break;
19354 + }
19355 + len = lens[lens_index + work[sym]];
19356 + }
19357 + if (len > root && (huff & mask) !== low) {
19358 + if (drop === 0) {
19359 + drop = root;
19360 + }
19361 + next += min2;
19362 + curr = len - drop;
19363 + left = 1 << curr;
19364 + while (curr + drop < max2) {
19365 + left -= count[curr + drop];
19366 + if (left <= 0) {
19367 + break;
19368 + }
19369 + curr++;
19370 + left <<= 1;
19371 + }
19372 + used += 1 << curr;
19373 + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
19374 + return 1;
19375 + }
19376 + low = huff & mask;
19377 + table[low] = root << 24 | curr << 16 | next - table_index | 0;
19378 + }
19379 + }
19380 + if (huff !== 0) {
19381 + table[next + huff] = len - drop << 24 | 64 << 16 | 0;
19382 + }
19383 + opts.bits = root;
19384 + return 0;
19385 + };
19386 + },
19387 + { "../utils/common": 1 }
19388 + ],
19389 + 10: [
19390 + function(require2, module2, exports2) {
19391 + "use strict";
19392 + module2.exports = {
19393 + 2: "need dictionary",
19394 + 1: "stream end",
19395 + 0: "",
19396 + "-1": "file error",
19397 + "-2": "stream error",
19398 + "-3": "data error",
19399 + "-4": "insufficient memory",
19400 + "-5": "buffer error",
19401 + "-6": "incompatible version"
19402 + };
19403 + },
19404 + {}
19405 + ],
19406 + 11: [
19407 + function(require2, module2, exports2) {
19408 + "use strict";
19409 + function ZStream() {
19410 + this.input = null;
19411 + this.next_in = 0;
19412 + this.avail_in = 0;
19413 + this.total_in = 0;
19414 + this.output = null;
19415 + this.next_out = 0;
19416 + this.avail_out = 0;
19417 + this.total_out = 0;
19418 + this.msg = "";
19419 + this.state = null;
19420 + this.data_type = 2;
19421 + this.adler = 0;
19422 + }
19423 + module2.exports = ZStream;
19424 + },
19425 + {}
19426 + ],
19427 + "/lib/inflate.js": [
19428 + function(require2, module2, exports2) {
19429 + "use strict";
19430 + var zlib_inflate = require2("./zlib/inflate");
19431 + var utils = require2("./utils/common");
19432 + var strings = require2("./utils/strings");
19433 + var c2 = require2("./zlib/constants");
19434 + var msg = require2("./zlib/messages");
19435 + var ZStream = require2("./zlib/zstream");
19436 + var GZheader = require2("./zlib/gzheader");
19437 + var toString = Object.prototype.toString;
19438 + function Inflate(options) {
19439 + if (!(this instanceof Inflate))
19440 + return new Inflate(options);
19441 + this.options = utils.assign(
19442 + {
19443 + chunkSize: 16384,
19444 + windowBits: 0,
19445 + to: ""
19446 + },
19447 + options || {}
19448 + );
19449 + var opt = this.options;
19450 + if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) {
19451 + opt.windowBits = -opt.windowBits;
19452 + if (opt.windowBits === 0) {
19453 + opt.windowBits = -15;
19454 + }
19455 + }
19456 + if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) {
19457 + opt.windowBits += 32;
19458 + }
19459 + if (opt.windowBits > 15 && opt.windowBits < 48) {
19460 + if ((opt.windowBits & 15) === 0) {
19461 + opt.windowBits |= 15;
19462 + }
19463 + }
19464 + this.err = 0;
19465 + this.msg = "";
19466 + this.ended = false;
19467 + this.chunks = [];
19468 + this.strm = new ZStream();
19469 + this.strm.avail_out = 0;
19470 + var status = zlib_inflate.inflateInit2(
19471 + this.strm,
19472 + opt.windowBits
19473 + );
19474 + if (status !== c2.Z_OK) {
19475 + throw new Error(msg[status]);
19476 + }
19477 + this.header = new GZheader();
19478 + zlib_inflate.inflateGetHeader(this.strm, this.header);
19479 + if (opt.dictionary) {
19480 + if (typeof opt.dictionary === "string") {
19481 + opt.dictionary = strings.string2buf(
19482 + opt.dictionary
19483 + );
19484 + } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") {
19485 + opt.dictionary = new Uint8Array(
19486 + opt.dictionary
19487 + );
19488 + }
19489 + if (opt.raw) {
19490 + status = zlib_inflate.inflateSetDictionary(
19491 + this.strm,
19492 + opt.dictionary
19493 + );
19494 + if (status !== c2.Z_OK) {
19495 + throw new Error(msg[status]);
19496 + }
19497 + }
19498 + }
19499 + }
19500 + Inflate.prototype.push = function(data, mode) {
19501 + var strm = this.strm;
19502 + var chunkSize = this.options.chunkSize;
19503 + var dictionary = this.options.dictionary;
19504 + var status, _mode;
19505 + var next_out_utf8, tail, utf8str;
19506 + var allowBufError = false;
19507 + if (this.ended) {
19508 + return false;
19509 + }
19510 + _mode = mode === ~~mode ? mode : mode === true ? c2.Z_FINISH : c2.Z_NO_FLUSH;
19511 + if (typeof data === "string") {
19512 + strm.input = strings.binstring2buf(data);
19513 + } else if (toString.call(data) === "[object ArrayBuffer]") {
19514 + strm.input = new Uint8Array(data);
19515 + } else {
19516 + strm.input = data;
19517 + }
19518 + strm.next_in = 0;
19519 + strm.avail_in = strm.input.length;
19520 + do {
19521 + if (strm.avail_out === 0) {
19522 + strm.output = new utils.Buf8(chunkSize);
19523 + strm.next_out = 0;
19524 + strm.avail_out = chunkSize;
19525 + }
19526 + status = zlib_inflate.inflate(
19527 + strm,
19528 + c2.Z_NO_FLUSH
19529 + );
19530 + if (status === c2.Z_NEED_DICT && dictionary) {
19531 + status = zlib_inflate.inflateSetDictionary(
19532 + this.strm,
19533 + dictionary
19534 + );
19535 + }
19536 + if (status === c2.Z_BUF_ERROR && allowBufError === true) {
19537 + status = c2.Z_OK;
19538 + allowBufError = false;
19539 + }
19540 + if (status !== c2.Z_STREAM_END && status !== c2.Z_OK) {
19541 + this.onEnd(status);
19542 + this.ended = true;
19543 + return false;
19544 + }
19545 + if (strm.next_out) {
19546 + if (strm.avail_out === 0 || status === c2.Z_STREAM_END || strm.avail_in === 0 && (_mode === c2.Z_FINISH || _mode === c2.Z_SYNC_FLUSH)) {
19547 + if (this.options.to === "string") {
19548 + next_out_utf8 = strings.utf8border(
19549 + strm.output,
19550 + strm.next_out
19551 + );
19552 + tail = strm.next_out - next_out_utf8;
19553 + utf8str = strings.buf2string(
19554 + strm.output,
19555 + next_out_utf8
19556 + );
19557 + strm.next_out = tail;
19558 + strm.avail_out = chunkSize - tail;
19559 + if (tail) {
19560 + utils.arraySet(
19561 + strm.output,
19562 + strm.output,
19563 + next_out_utf8,
19564 + tail,
19565 + 0
19566 + );
19567 + }
19568 + this.onData(utf8str);
19569 + } else {
19570 + this.onData(
19571 + utils.shrinkBuf(
19572 + strm.output,
19573 + strm.next_out
19574 + )
19575 + );
19576 + }
19577 + }
19578 + }
19579 + if (strm.avail_in === 0 && strm.avail_out === 0) {
19580 + allowBufError = true;
19581 + }
19582 + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c2.Z_STREAM_END);
19583 + if (status === c2.Z_STREAM_END) {
19584 + _mode = c2.Z_FINISH;
19585 + }
19586 + if (_mode === c2.Z_FINISH) {
19587 + status = zlib_inflate.inflateEnd(this.strm);
19588 + this.onEnd(status);
19589 + this.ended = true;
19590 + return status === c2.Z_OK;
19591 + }
19592 + if (_mode === c2.Z_SYNC_FLUSH) {
19593 + this.onEnd(c2.Z_OK);
19594 + strm.avail_out = 0;
19595 + return true;
19596 + }
19597 + return true;
19598 + };
19599 + Inflate.prototype.onData = function(chunk) {
19600 + this.chunks.push(chunk);
19601 + };
19602 + Inflate.prototype.onEnd = function(status) {
19603 + if (status === c2.Z_OK) {
19604 + if (this.options.to === "string") {
19605 + this.result = this.chunks.join("");
19606 + } else {
19607 + this.result = utils.flattenChunks(
19608 + this.chunks
19609 + );
19610 + }
19611 + }
19612 + this.chunks = [];
19613 + this.err = status;
19614 + this.msg = this.strm.msg;
19615 + };
19616 + function inflate(input, options) {
19617 + var inflator = new Inflate(options);
19618 + inflator.push(input, true);
19619 + if (inflator.err) {
19620 + throw inflator.msg || msg[inflator.err];
19621 + }
19622 + return inflator.result;
19623 + }
19624 + function inflateRaw(input, options) {
19625 + options = options || {};
19626 + options.raw = true;
19627 + return inflate(input, options);
19628 + }
19629 + exports2.Inflate = Inflate;
19630 + exports2.inflate = inflate;
19631 + exports2.inflateRaw = inflateRaw;
19632 + exports2.ungzip = inflate;
19633 + },
19634 + {
19635 + "./utils/common": 1,
19636 + "./utils/strings": 2,
19637 + "./zlib/constants": 4,
19638 + "./zlib/gzheader": 6,
19639 + "./zlib/inflate": 8,
19640 + "./zlib/messages": 10,
19641 + "./zlib/zstream": 11
19642 + }
19643 + ]
19644 + },
19645 + {},
19646 + []
19647 + )("/lib/inflate.js");
19648 +})();
19649 +
19650 +// packages/global-styles-ui/build-module/font-library/lib/lib-font.browser.mjs
19651 +var fetchFunction = globalThis.fetch;
19652 +var Event2 = class {
19653 + constructor(type, detail = {}, msg) {
19654 + this.type = type;
19655 + this.detail = detail;
19656 + this.msg = msg;
19657 + Object.defineProperty(this, `__mayPropagate`, {
19658 + enumerable: false,
19659 + writable: true
19660 + });
19661 + this.__mayPropagate = true;
19662 + }
19663 + preventDefault() {
19664 + }
19665 + stopPropagation() {
19666 + this.__mayPropagate = false;
19667 + }
19668 + valueOf() {
19669 + return this;
19670 + }
19671 + toString() {
19672 + return this.msg ? `[${this.type} event]: ${this.msg}` : `[${this.type} event]`;
19673 + }
19674 +};
19675 +var EventManager = class {
19676 + constructor() {
19677 + this.listeners = {};
19678 + }
19679 + addEventListener(type, listener, useCapture) {
19680 + let bin = this.listeners[type] || [];
19681 + if (useCapture) bin.unshift(listener);
19682 + else bin.push(listener);
19683 + this.listeners[type] = bin;
19684 + }
19685 + removeEventListener(type, listener) {
19686 + let bin = this.listeners[type] || [];
19687 + let pos = bin.findIndex((e) => e === listener);
19688 + if (pos > -1) {
19689 + bin.splice(pos, 1);
19690 + this.listeners[type] = bin;
19691 + }
19692 + }
19693 + dispatch(event) {
19694 + let bin = this.listeners[event.type];
19695 + if (bin) {
19696 + for (let l2 = 0, e = bin.length; l2 < e; l2++) {
19697 + if (!event.__mayPropagate) break;
19698 + bin[l2](event);
19699 + }
19700 + }
19701 + }
19702 +};
19703 +var startDate = (/* @__PURE__ */ new Date(`1904-01-01T00:00:00+0000`)).getTime();
19704 +function asText(data) {
19705 + return Array.from(data).map((v2) => String.fromCharCode(v2)).join(``);
19706 +}
19707 +var Parser = class {
19708 + constructor(dict, dataview, name2) {
19709 + this.name = (name2 || dict.tag || ``).trim();
19710 + this.length = dict.length;
19711 + this.start = dict.offset;
19712 + this.offset = 0;
19713 + this.data = dataview;
19714 + [
19715 + `getInt8`,
19716 + `getUint8`,
19717 + `getInt16`,
19718 + `getUint16`,
19719 + `getInt32`,
19720 + `getUint32`,
19721 + `getBigInt64`,
19722 + `getBigUint64`
19723 + ].forEach((name3) => {
19724 + let fn = name3.replace(/get(Big)?/, "").toLowerCase();
19725 + let increment = parseInt(name3.replace(/[^\d]/g, "")) / 8;
19726 + Object.defineProperty(this, fn, {
19727 + get: () => this.getValue(name3, increment)
19728 + });
19729 + });
19730 + }
19731 + get currentPosition() {
19732 + return this.start + this.offset;
19733 + }
19734 + set currentPosition(position) {
19735 + this.start = position;
19736 + this.offset = 0;
19737 + }
19738 + skip(n = 0, bits = 8) {
19739 + this.offset += n * bits / 8;
19740 + }
19741 + getValue(type, increment) {
19742 + let pos = this.start + this.offset;
19743 + this.offset += increment;
19744 + try {
19745 + return this.data[type](pos);
19746 + } catch (e) {
19747 + console.error(`parser`, type, increment, this);
19748 + console.error(`parser`, this.start, this.offset);
19749 + throw e;
19750 + }
19751 + }
19752 + flags(n) {
19753 + if (n === 8 || n === 16 || n === 32 || n === 64) {
19754 + return this[`uint${n}`].toString(2).padStart(n, 0).split(``).map((v2) => v2 === "1");
19755 + }
19756 + console.error(
19757 + `Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long`
19758 + );
19759 + console.trace();
19760 + }
19761 + get tag() {
19762 + const t = this.uint32;
19763 + return asText([
19764 + t >> 24 & 255,
19765 + t >> 16 & 255,
19766 + t >> 8 & 255,
19767 + t & 255
19768 + ]);
19769 + }
19770 + get fixed() {
19771 + let major = this.int16;
19772 + let minor = Math.round(1e3 * this.uint16 / 65356);
19773 + return major + minor / 1e3;
19774 + }
19775 + get legacyFixed() {
19776 + let major = this.uint16;
19777 + let minor = this.uint16.toString(16).padStart(4, 0);
19778 + return parseFloat(`${major}.${minor}`);
19779 + }
19780 + get uint24() {
19781 + return (this.uint8 << 16) + (this.uint8 << 8) + this.uint8;
19782 + }
19783 + get uint128() {
19784 + let value = 0;
19785 + for (let i = 0; i < 5; i++) {
19786 + let byte = this.uint8;
19787 + value = value * 128 + (byte & 127);
19788 + if (byte < 128) break;
19789 + }
19790 + return value;
19791 + }
19792 + get longdatetime() {
19793 + return new Date(startDate + 1e3 * parseInt(this.int64.toString()));
19794 + }
19795 + get fword() {
19796 + return this.int16;
19797 + }
19798 + get ufword() {
19799 + return this.uint16;
19800 + }
19801 + get Offset16() {
19802 + return this.uint16;
19803 + }
19804 + get Offset32() {
19805 + return this.uint32;
19806 + }
19807 + get F2DOT14() {
19808 + const bits = p.uint16;
19809 + const integer = [0, 1, -2, -1][bits >> 14];
19810 + const fraction = bits & 16383;
19811 + return integer + fraction / 16384;
19812 + }
19813 + verifyLength() {
19814 + if (this.offset != this.length) {
19815 + console.error(
19816 + `unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`
19817 + );
19818 + }
19819 + }
19820 + readBytes(n = 0, position = 0, bits = 8, signed = false) {
19821 + n = n || this.length;
19822 + if (n === 0) return [];
19823 + if (position) this.currentPosition = position;
19824 + const fn = `${signed ? `` : `u`}int${bits}`, slice = [];
19825 + while (n--) slice.push(this[fn]);
19826 + return slice;
19827 + }
19828 +};
19829 +var ParsedData = class {
19830 + constructor(parser) {
19831 + const pGetter = { enumerable: false, get: () => parser };
19832 + Object.defineProperty(this, `parser`, pGetter);
19833 + const start = parser.currentPosition;
19834 + const startGetter = { enumerable: false, get: () => start };
19835 + Object.defineProperty(this, `start`, startGetter);
19836 + }
19837 + load(struct) {
19838 + Object.keys(struct).forEach((p22) => {
19839 + let props = Object.getOwnPropertyDescriptor(struct, p22);
19840 + if (props.get) {
19841 + this[p22] = props.get.bind(this);
19842 + } else if (props.value !== void 0) {
19843 + this[p22] = props.value;
19844 + }
19845 + });
19846 + if (this.parser.length) {
19847 + this.parser.verifyLength();
19848 + }
19849 + }
19850 +};
19851 +var SimpleTable = class extends ParsedData {
19852 + constructor(dict, dataview, name2) {
19853 + const { parser, start } = super(
19854 + new Parser(dict, dataview, name2)
19855 + );
19856 + const pGetter = { enumerable: false, get: () => parser };
19857 + Object.defineProperty(this, `p`, pGetter);
19858 + const startGetter = { enumerable: false, get: () => start };
19859 + Object.defineProperty(this, `tableStart`, startGetter);
19860 + }
19861 +};
19862 +function lazy$1(object, property, getter) {
19863 + let val;
19864 + Object.defineProperty(object, property, {
19865 + get: () => {
19866 + if (val) return val;
19867 + val = getter();
19868 + return val;
19869 + },
19870 + enumerable: true
19871 + });
19872 +}
19873 +var SFNT = class extends SimpleTable {
19874 + constructor(font2, dataview, createTable2) {
19875 + const { p: p22 } = super({ offset: 0, length: 12 }, dataview, `sfnt`);
19876 + this.version = p22.uint32;
19877 + this.numTables = p22.uint16;
19878 + this.searchRange = p22.uint16;
19879 + this.entrySelector = p22.uint16;
19880 + this.rangeShift = p22.uint16;
19881 + p22.verifyLength();
19882 + this.directory = [...new Array(this.numTables)].map(
19883 + (_) => new TableRecord(p22)
19884 + );
19885 + this.tables = {};
19886 + this.directory.forEach((entry) => {
19887 + const getter = () => createTable2(
19888 + this.tables,
19889 + {
19890 + tag: entry.tag,
19891 + offset: entry.offset,
19892 + length: entry.length
19893 + },
19894 + dataview
19895 + );
19896 + lazy$1(this.tables, entry.tag.trim(), getter);
19897 + });
19898 + }
19899 +};
19900 +var TableRecord = class {
19901 + constructor(p22) {
19902 + this.tag = p22.tag;
19903 + this.checksum = p22.uint32;
19904 + this.offset = p22.uint32;
19905 + this.length = p22.uint32;
19906 + }
19907 +};
19908 +var gzipDecode = inflate_default.inflate || void 0;
19909 +var nativeGzipDecode = void 0;
19910 +var WOFF$1 = class extends SimpleTable {
19911 + constructor(font2, dataview, createTable2) {
19912 + const { p: p22 } = super({ offset: 0, length: 44 }, dataview, `woff`);
19913 + this.signature = p22.tag;
19914 + this.flavor = p22.uint32;
19915 + this.length = p22.uint32;
19916 + this.numTables = p22.uint16;
19917 + p22.uint16;
19918 + this.totalSfntSize = p22.uint32;
19919 + this.majorVersion = p22.uint16;
19920 + this.minorVersion = p22.uint16;
19921 + this.metaOffset = p22.uint32;
19922 + this.metaLength = p22.uint32;
19923 + this.metaOrigLength = p22.uint32;
19924 + this.privOffset = p22.uint32;
19925 + this.privLength = p22.uint32;
19926 + p22.verifyLength();
19927 + this.directory = [...new Array(this.numTables)].map(
19928 + (_) => new WoffTableDirectoryEntry(p22)
19929 + );
19930 + buildWoffLazyLookups(this, dataview, createTable2);
19931 + }
19932 +};
19933 +var WoffTableDirectoryEntry = class {
19934 + constructor(p22) {
19935 + this.tag = p22.tag;
19936 + this.offset = p22.uint32;
19937 + this.compLength = p22.uint32;
19938 + this.origLength = p22.uint32;
19939 + this.origChecksum = p22.uint32;
19940 + }
19941 +};
19942 +function buildWoffLazyLookups(woff, dataview, createTable2) {
19943 + woff.tables = {};
19944 + woff.directory.forEach((entry) => {
19945 + lazy$1(woff.tables, entry.tag.trim(), () => {
19946 + let offset4 = 0;
19947 + let view = dataview;
19948 + if (entry.compLength !== entry.origLength) {
19949 + const data = dataview.buffer.slice(
19950 + entry.offset,
19951 + entry.offset + entry.compLength
19952 + );
19953 + let unpacked;
19954 + if (gzipDecode) {
19955 + unpacked = gzipDecode(new Uint8Array(data));
19956 + } else if (nativeGzipDecode) {
19957 + unpacked = nativeGzipDecode(new Uint8Array(data));
19958 + } else {
19959 + const msg = `no brotli decoder available to decode WOFF2 font`;
19960 + if (font.onerror) font.onerror(msg);
19961 + throw new Error(msg);
19962 + }
19963 + view = new DataView(unpacked.buffer);
19964 + } else {
19965 + offset4 = entry.offset;
19966 + }
19967 + return createTable2(
19968 + woff.tables,
19969 + { tag: entry.tag, offset: offset4, length: entry.origLength },
19970 + view
19971 + );
19972 + });
19973 + });
19974 +}
19975 +var brotliDecode = unbrotli_default;
19976 +var nativeBrotliDecode = void 0;
19977 +var WOFF2$1 = class extends SimpleTable {
19978 + constructor(font2, dataview, createTable2) {
19979 + const { p: p22 } = super({ offset: 0, length: 48 }, dataview, `woff2`);
19980 + this.signature = p22.tag;
19981 + this.flavor = p22.uint32;
19982 + this.length = p22.uint32;
19983 + this.numTables = p22.uint16;
19984 + p22.uint16;
19985 + this.totalSfntSize = p22.uint32;
19986 + this.totalCompressedSize = p22.uint32;
19987 + this.majorVersion = p22.uint16;
19988 + this.minorVersion = p22.uint16;
19989 + this.metaOffset = p22.uint32;
19990 + this.metaLength = p22.uint32;
19991 + this.metaOrigLength = p22.uint32;
19992 + this.privOffset = p22.uint32;
19993 + this.privLength = p22.uint32;
19994 + p22.verifyLength();
19995 + this.directory = [...new Array(this.numTables)].map(
19996 + (_) => new Woff2TableDirectoryEntry(p22)
19997 + );
19998 + let dictOffset = p22.currentPosition;
19999 + this.directory[0].offset = 0;
20000 + this.directory.forEach((e, i) => {
20001 + let next = this.directory[i + 1];
20002 + if (next) {
20003 + next.offset = e.offset + (e.transformLength !== void 0 ? e.transformLength : e.origLength);
20004 + }
20005 + });
20006 + let decoded;
20007 + let buffer = dataview.buffer.slice(dictOffset);
20008 + if (brotliDecode) {
20009 + decoded = brotliDecode(new Uint8Array(buffer));
20010 + } else if (nativeBrotliDecode) {
20011 + decoded = new Uint8Array(nativeBrotliDecode(buffer));
20012 + } else {
20013 + const msg = `no brotli decoder available to decode WOFF2 font`;
20014 + if (font2.onerror) font2.onerror(msg);
20015 + throw new Error(msg);
20016 + }
20017 + buildWoff2LazyLookups(this, decoded, createTable2);
20018 + }
20019 +};
20020 +var Woff2TableDirectoryEntry = class {
20021 + constructor(p22) {
20022 + this.flags = p22.uint8;
20023 + const tagNumber = this.tagNumber = this.flags & 63;
20024 + if (tagNumber === 63) {
20025 + this.tag = p22.tag;
20026 + } else {
20027 + this.tag = getWOFF2Tag(tagNumber);
20028 + }
20029 + const transformVersion = this.transformVersion = (this.flags & 192) >> 6;
20030 + let hasTransforms = transformVersion !== 0;
20031 + if (this.tag === `glyf` || this.tag === `loca`) {
20032 + hasTransforms = this.transformVersion !== 3;
20033 + }
20034 + this.origLength = p22.uint128;
20035 + if (hasTransforms) {
20036 + this.transformLength = p22.uint128;
20037 + }
20038 + }
20039 +};
20040 +function buildWoff2LazyLookups(woff2, decoded, createTable2) {
20041 + woff2.tables = {};
20042 + woff2.directory.forEach((entry) => {
20043 + lazy$1(woff2.tables, entry.tag.trim(), () => {
20044 + const start = entry.offset;
20045 + const end = start + (entry.transformLength ? entry.transformLength : entry.origLength);
20046 + const data = new DataView(decoded.slice(start, end).buffer);
20047 + try {
20048 + return createTable2(
20049 + woff2.tables,
20050 + { tag: entry.tag, offset: 0, length: entry.origLength },
20051 + data
20052 + );
20053 + } catch (e) {
20054 + console.error(e);
20055 + }
20056 + });
20057 + });
20058 +}
20059 +function getWOFF2Tag(flag) {
20060 + return [
20061 + `cmap`,
20062 + `head`,
20063 + `hhea`,
20064 + `hmtx`,
20065 + `maxp`,
20066 + `name`,
20067 + `OS/2`,
20068 + `post`,
20069 + `cvt `,
20070 + `fpgm`,
20071 + `glyf`,
20072 + `loca`,
20073 + `prep`,
20074 + `CFF `,
20075 + `VORG`,
20076 + `EBDT`,
20077 + `EBLC`,
20078 + `gasp`,
20079 + `hdmx`,
20080 + `kern`,
20081 + `LTSH`,
20082 + `PCLT`,
20083 + `VDMX`,
20084 + `vhea`,
20085 + `vmtx`,
20086 + `BASE`,
20087 + `GDEF`,
20088 + `GPOS`,
20089 + `GSUB`,
20090 + `EBSC`,
20091 + `JSTF`,
20092 + `MATH`,
20093 + `CBDT`,
20094 + `CBLC`,
20095 + `COLR`,
20096 + `CPAL`,
20097 + `SVG `,
20098 + `sbix`,
20099 + `acnt`,
20100 + `avar`,
20101 + `bdat`,
20102 + `bloc`,
20103 + `bsln`,
20104 + `cvar`,
20105 + `fdsc`,
20106 + `feat`,
20107 + `fmtx`,
20108 + `fvar`,
20109 + `gvar`,
20110 + `hsty`,
20111 + `just`,
20112 + `lcar`,
20113 + `mort`,
20114 + `morx`,
20115 + `opbd`,
20116 + `prop`,
20117 + `trak`,
20118 + `Zapf`,
20119 + `Silf`,
20120 + `Glat`,
20121 + `Gloc`,
20122 + `Feat`,
20123 + `Sill`
20124 + ][flag & 63];
20125 +}
20126 +var tableClasses = {};
20127 +var tableClassesLoaded = false;
20128 +Promise.all([
20129 + Promise.resolve().then(function() {
20130 + return cmap$1;
20131 + }),
20132 + Promise.resolve().then(function() {
20133 + return head$1;
20134 + }),
20135 + Promise.resolve().then(function() {
20136 + return hhea$1;
20137 + }),
20138 + Promise.resolve().then(function() {
20139 + return hmtx$1;
20140 + }),
20141 + Promise.resolve().then(function() {
20142 + return maxp$1;
20143 + }),
20144 + Promise.resolve().then(function() {
20145 + return name$1;
20146 + }),
20147 + Promise.resolve().then(function() {
20148 + return OS2$1;
20149 + }),
20150 + Promise.resolve().then(function() {
20151 + return post$1;
20152 + }),
20153 + Promise.resolve().then(function() {
20154 + return BASE$1;
20155 + }),
20156 + Promise.resolve().then(function() {
20157 + return GDEF$1;
20158 + }),
20159 + Promise.resolve().then(function() {
20160 + return GSUB$1;
20161 + }),
20162 + Promise.resolve().then(function() {
20163 + return GPOS$1;
20164 + }),
20165 + Promise.resolve().then(function() {
20166 + return SVG$1;
20167 + }),
20168 + Promise.resolve().then(function() {
20169 + return fvar$1;
20170 + }),
20171 + Promise.resolve().then(function() {
20172 + return cvt$1;
20173 + }),
20174 + Promise.resolve().then(function() {
20175 + return fpgm$1;
20176 + }),
20177 + Promise.resolve().then(function() {
20178 + return gasp$1;
20179 + }),
20180 + Promise.resolve().then(function() {
20181 + return glyf$1;
20182 + }),
20183 + Promise.resolve().then(function() {
20184 + return loca$1;
20185 + }),
20186 + Promise.resolve().then(function() {
20187 + return prep$1;
20188 + }),
20189 + Promise.resolve().then(function() {
20190 + return CFF$1;
20191 + }),
20192 + Promise.resolve().then(function() {
20193 + return CFF2$1;
20194 + }),
20195 + Promise.resolve().then(function() {
20196 + return VORG$1;
20197 + }),
20198 + Promise.resolve().then(function() {
20199 + return EBLC$1;
20200 + }),
20201 + Promise.resolve().then(function() {
20202 + return EBDT$1;
20203 + }),
20204 + Promise.resolve().then(function() {
20205 + return EBSC$1;
20206 + }),
20207 + Promise.resolve().then(function() {
20208 + return CBLC$1;
20209 + }),
20210 + Promise.resolve().then(function() {
20211 + return CBDT$1;
20212 + }),
20213 + Promise.resolve().then(function() {
20214 + return sbix$1;
20215 + }),
20216 + Promise.resolve().then(function() {
20217 + return COLR$1;
20218 + }),
20219 + Promise.resolve().then(function() {
20220 + return CPAL$1;
20221 + }),
20222 + Promise.resolve().then(function() {
20223 + return DSIG$1;
20224 + }),
20225 + Promise.resolve().then(function() {
20226 + return hdmx$1;
20227 + }),
20228 + Promise.resolve().then(function() {
20229 + return kern$1;
20230 + }),
20231 + Promise.resolve().then(function() {
20232 + return LTSH$1;
20233 + }),
20234 + Promise.resolve().then(function() {
20235 + return MERG$1;
20236 + }),
20237 + Promise.resolve().then(function() {
20238 + return meta$1;
20239 + }),
20240 + Promise.resolve().then(function() {
20241 + return PCLT$1;
20242 + }),
20243 + Promise.resolve().then(function() {
20244 + return VDMX$1;
20245 + }),
20246 + Promise.resolve().then(function() {
20247 + return vhea$1;
20248 + }),
20249 + Promise.resolve().then(function() {
20250 + return vmtx$1;
20251 + })
20252 +]).then((data) => {
20253 + data.forEach((e) => {
20254 + let name2 = Object.keys(e)[0];
20255 + tableClasses[name2] = e[name2];
20256 + });
20257 + tableClassesLoaded = true;
20258 +});
20259 +function createTable(tables, dict, dataview) {
20260 + let name2 = dict.tag.replace(/[^\w\d]/g, ``);
20261 + let Type = tableClasses[name2];
20262 + if (Type) return new Type(dict, dataview, tables);
20263 + console.warn(
20264 + `lib-font has no definition for ${name2}. The table was skipped.`
20265 + );
20266 + return {};
20267 +}
20268 +function loadTableClasses() {
20269 + let count = 0;
20270 + function checkLoaded(resolve, reject) {
20271 + if (!tableClassesLoaded) {
20272 + if (count > 10) {
20273 + return reject(new Error(`loading took too long`));
20274 + }
20275 + count++;
20276 + return setTimeout(() => checkLoaded(resolve), 250);
20277 + }
20278 + resolve(createTable);
20279 + }
20280 + return new Promise((resolve, reject) => checkLoaded(resolve));
20281 +}
20282 +function getFontCSSFormat(path, errorOnStyle) {
20283 + let pos = path.lastIndexOf(`.`);
20284 + let ext = (path.substring(pos + 1) || ``).toLowerCase();
20285 + let format = {
20286 + ttf: `truetype`,
20287 + otf: `opentype`,
20288 + woff: `woff`,
20289 + woff2: `woff2`
20290 + }[ext];
20291 + if (format) return format;
20292 + let msg = {
20293 + eot: `The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.`,
20294 + svg: `The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.`,
20295 + fon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`,
20296 + ttc: `Based on the current CSS specification, font collections are not (yet?) supported.`
20297 + }[ext];
20298 + if (!msg) msg = `${path} is not a known webfont format.`;
20299 + if (errorOnStyle) {
20300 + throw new Error(msg);
20301 + } else {
20302 + console.warn(`Could not load font: ${msg}`);
20303 + }
20304 +}
20305 +async function setupFontFace(name2, url, options = {}) {
20306 + if (!globalThis.document) return;
20307 + let format = getFontCSSFormat(url, options.errorOnStyle);
20308 + if (!format) return;
20309 + let style = document.createElement(`style`);
20310 + style.className = `injected-by-Font-js`;
20311 + let rules = [];
20312 + if (options.styleRules) {
20313 + rules = Object.entries(options.styleRules).map(
20314 + ([key, value]) => `${key}: ${value};`
20315 + );
20316 + }
20317 + style.textContent = `
20318 +@font-face {
20319 + font-family: "${name2}";
20320 + ${rules.join(
20321 + `
20322 + `
20323 + )}
20324 + src: url("${url}") format("${format}");
20325 +}`;
20326 + globalThis.document.head.appendChild(style);
20327 + return style;
20328 +}
20329 +var TTF = [0, 1, 0, 0];
20330 +var OTF = [79, 84, 84, 79];
20331 +var WOFF = [119, 79, 70, 70];
20332 +var WOFF2 = [119, 79, 70, 50];
20333 +function match(ar1, ar2) {
20334 + if (ar1.length !== ar2.length) return;
20335 + for (let i = 0; i < ar1.length; i++) {
20336 + if (ar1[i] !== ar2[i]) return;
20337 + }
20338 + return true;
20339 +}
20340 +function validFontFormat(dataview) {
20341 + const LEAD_BYTES = [
20342 + dataview.getUint8(0),
20343 + dataview.getUint8(1),
20344 + dataview.getUint8(2),
20345 + dataview.getUint8(3)
20346 + ];
20347 + if (match(LEAD_BYTES, TTF) || match(LEAD_BYTES, OTF)) return `SFNT`;
20348 + if (match(LEAD_BYTES, WOFF)) return `WOFF`;
20349 + if (match(LEAD_BYTES, WOFF2)) return `WOFF2`;
20350 +}
20351 +function checkFetchResponseStatus(response) {
20352 + if (!response.ok) {
20353 + throw new Error(
20354 + `HTTP ${response.status} - ${response.statusText}`
20355 + );
20356 + }
20357 + return response;
20358 +}
20359 +var Font = class extends EventManager {
20360 + constructor(name2, options = {}) {
20361 + super();
20362 + this.name = name2;
20363 + this.options = options;
20364 + this.metrics = false;
20365 + }
20366 + get src() {
20367 + return this.__src;
20368 + }
20369 + set src(src) {
20370 + this.__src = src;
20371 + (async () => {
20372 + if (globalThis.document && !this.options.skipStyleSheet) {
20373 + await setupFontFace(this.name, src, this.options);
20374 + }
20375 + this.loadFont(src);
20376 + })();
20377 + }
20378 + async loadFont(url, filename) {
20379 + fetch(url).then(
20380 + (response) => checkFetchResponseStatus(response) && response.arrayBuffer()
20381 + ).then(
20382 + (buffer) => this.fromDataBuffer(buffer, filename || url)
20383 + ).catch((err) => {
20384 + const evt = new Event2(
20385 + `error`,
20386 + err,
20387 + `Failed to load font at ${filename || url}`
20388 + );
20389 + this.dispatch(evt);
20390 + if (this.onerror) this.onerror(evt);
20391 + });
20392 + }
20393 + async fromDataBuffer(buffer, filenameOrUrL) {
20394 + this.fontData = new DataView(buffer);
20395 + let type = validFontFormat(this.fontData);
20396 + if (!type) {
20397 + throw new Error(
20398 + `${filenameOrUrL} is either an unsupported font format, or not a font at all.`
20399 + );
20400 + }
20401 + await this.parseBasicData(type);
20402 + const evt = new Event2("load", { font: this });
20403 + this.dispatch(evt);
20404 + if (this.onload) this.onload(evt);
20405 + }
20406 + async parseBasicData(type) {
20407 + return loadTableClasses().then((createTable2) => {
20408 + if (type === `SFNT`) {
20409 + this.opentype = new SFNT(this, this.fontData, createTable2);
20410 + }
20411 + if (type === `WOFF`) {
20412 + this.opentype = new WOFF$1(this, this.fontData, createTable2);
20413 + }
20414 + if (type === `WOFF2`) {
20415 + this.opentype = new WOFF2$1(this, this.fontData, createTable2);
20416 + }
20417 + return this.opentype;
20418 + });
20419 + }
20420 + getGlyphId(char) {
20421 + return this.opentype.tables.cmap.getGlyphId(char);
20422 + }
20423 + reverse(glyphid) {
20424 + return this.opentype.tables.cmap.reverse(glyphid);
20425 + }
20426 + supports(char) {
20427 + return this.getGlyphId(char) !== 0;
20428 + }
20429 + supportsVariation(variation) {
20430 + return this.opentype.tables.cmap.supportsVariation(variation) !== false;
20431 + }
20432 + measureText(text, size4 = 16) {
20433 + if (this.__unloaded)
20434 + throw new Error(
20435 + "Cannot measure text: font was unloaded. Please reload before calling measureText()"
20436 + );
20437 + let d = document.createElement("div");
20438 + d.textContent = text;
20439 + d.style.fontFamily = this.name;
20440 + d.style.fontSize = `${size4}px`;
20441 + d.style.color = `transparent`;
20442 + d.style.background = `transparent`;
20443 + d.style.top = `0`;
20444 + d.style.left = `0`;
20445 + d.style.position = `absolute`;
20446 + document.body.appendChild(d);
20447 + let bbox = d.getBoundingClientRect();
20448 + document.body.removeChild(d);
20449 + const OS22 = this.opentype.tables["OS/2"];
20450 + bbox.fontSize = size4;
20451 + bbox.ascender = OS22.sTypoAscender;
20452 + bbox.descender = OS22.sTypoDescender;
20453 + return bbox;
20454 + }
20455 + unload() {
20456 + if (this.styleElement.parentNode) {
20457 + this.styleElement.parentNode.removeElement(this.styleElement);
20458 + const evt = new Event2("unload", { font: this });
20459 + this.dispatch(evt);
20460 + if (this.onunload) this.onunload(evt);
20461 + }
20462 + this._unloaded = true;
20463 + }
20464 + load() {
20465 + if (this.__unloaded) {
20466 + delete this.__unloaded;
20467 + document.head.appendChild(this.styleElement);
20468 + const evt = new Event2("load", { font: this });
20469 + this.dispatch(evt);
20470 + if (this.onload) this.onload(evt);
20471 + }
20472 + }
20473 +};
20474 +globalThis.Font = Font;
20475 +var Subtable = class extends ParsedData {
20476 + constructor(p22, plaformID, encodingID) {
20477 + super(p22);
20478 + this.plaformID = plaformID;
20479 + this.encodingID = encodingID;
20480 + }
20481 +};
20482 +var Format0 = class extends Subtable {
20483 + constructor(p22, platformID, encodingID) {
20484 + super(p22, platformID, encodingID);
20485 + this.format = 0;
20486 + this.length = p22.uint16;
20487 + this.language = p22.uint16;
20488 + this.glyphIdArray = [...new Array(256)].map((_) => p22.uint8);
20489 + }
20490 + supports(charCode) {
20491 + if (charCode.charCodeAt) {
20492 + charCode = -1;
20493 + console.warn(
20494 + `supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.`
20495 + );
20496 + }
20497 + return 0 <= charCode && charCode <= 255;
20498 + }
20499 + reverse(glyphID) {
20500 + console.warn(`reverse not implemented for cmap subtable format 0`);
20501 + return {};
20502 + }
20503 + getSupportedCharCodes() {
20504 + return [{ start: 1, end: 256 }];
20505 + }
20506 +};
20507 +var Format2 = class extends Subtable {
20508 + constructor(p22, platformID, encodingID) {
20509 + super(p22, platformID, encodingID);
20510 + this.format = 2;
20511 + this.length = p22.uint16;
20512 + this.language = p22.uint16;
20513 + this.subHeaderKeys = [...new Array(256)].map((_) => p22.uint16);
20514 + const subHeaderCount = Math.max(...this.subHeaderKeys);
20515 + const subHeaderOffset = p22.currentPosition;
20516 + lazy$1(this, `subHeaders`, () => {
20517 + p22.currentPosition = subHeaderOffset;
20518 + return [...new Array(subHeaderCount)].map(
20519 + (_) => new SubHeader(p22)
20520 + );
20521 + });
20522 + const glyphIndexOffset = subHeaderOffset + subHeaderCount * 8;
20523 + lazy$1(this, `glyphIndexArray`, () => {
20524 + p22.currentPosition = glyphIndexOffset;
20525 + return [...new Array(subHeaderCount)].map((_) => p22.uint16);
20526 + });
20527 + }
20528 + supports(charCode) {
20529 + if (charCode.charCodeAt) {
20530 + charCode = -1;
20531 + console.warn(
20532 + `supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.`
20533 + );
20534 + }
20535 + const low = charCode && 255;
20536 + const high = charCode && 65280;
20537 + const subHeaderKey = this.subHeaders[high];
20538 + const subheader = this.subHeaders[subHeaderKey];
20539 + const first = subheader.firstCode;
20540 + const last = first + subheader.entryCount;
20541 + return first <= low && low <= last;
20542 + }
20543 + reverse(glyphID) {
20544 + console.warn(`reverse not implemented for cmap subtable format 2`);
20545 + return {};
20546 + }
20547 + getSupportedCharCodes(preservePropNames = false) {
20548 + if (preservePropNames) {
20549 + return this.subHeaders.map((h) => ({
20550 + firstCode: h.firstCode,
20551 + lastCode: h.lastCode
20552 + }));
20553 + }
20554 + return this.subHeaders.map((h) => ({
20555 + start: h.firstCode,
20556 + end: h.lastCode
20557 + }));
20558 + }
20559 +};
20560 +var SubHeader = class {
20561 + constructor(p22) {
20562 + this.firstCode = p22.uint16;
20563 + this.entryCount = p22.uint16;
20564 + this.lastCode = this.first + this.entryCount;
20565 + this.idDelta = p22.int16;
20566 + this.idRangeOffset = p22.uint16;
20567 + }
20568 +};
20569 +var Format4 = class extends Subtable {
20570 + constructor(p22, platformID, encodingID) {
20571 + super(p22, platformID, encodingID);
20572 + this.format = 4;
20573 + this.length = p22.uint16;
20574 + this.language = p22.uint16;
20575 + this.segCountX2 = p22.uint16;
20576 + this.segCount = this.segCountX2 / 2;
20577 + this.searchRange = p22.uint16;
20578 + this.entrySelector = p22.uint16;
20579 + this.rangeShift = p22.uint16;
20580 + const endCodePosition = p22.currentPosition;
20581 + lazy$1(
20582 + this,
20583 + `endCode`,
20584 + () => p22.readBytes(this.segCount, endCodePosition, 16)
20585 + );
20586 + const startCodePosition = endCodePosition + 2 + this.segCountX2;
20587 + lazy$1(
20588 + this,
20589 + `startCode`,
20590 + () => p22.readBytes(this.segCount, startCodePosition, 16)
20591 + );
20592 + const idDeltaPosition = startCodePosition + this.segCountX2;
20593 + lazy$1(
20594 + this,
20595 + `idDelta`,
20596 + () => p22.readBytes(this.segCount, idDeltaPosition, 16, true)
20597 + );
20598 + const idRangePosition = idDeltaPosition + this.segCountX2;
20599 + lazy$1(
20600 + this,
20601 + `idRangeOffset`,
20602 + () => p22.readBytes(this.segCount, idRangePosition, 16)
20603 + );
20604 + const glyphIdArrayPosition = idRangePosition + this.segCountX2;
20605 + const glyphIdArrayLength = this.length - (glyphIdArrayPosition - this.tableStart);
20606 + lazy$1(
20607 + this,
20608 + `glyphIdArray`,
20609 + () => p22.readBytes(glyphIdArrayLength, glyphIdArrayPosition, 16)
20610 + );
20611 + lazy$1(
20612 + this,
20613 + `segments`,
20614 + () => this.buildSegments(idRangePosition, glyphIdArrayPosition, p22)
20615 + );
20616 + }
20617 + buildSegments(idRangePosition, glyphIdArrayPosition, p22) {
20618 + const build = (_, i) => {
20619 + let startCode = this.startCode[i], endCode = this.endCode[i], idDelta = this.idDelta[i], idRangeOffset = this.idRangeOffset[i], idRangeOffsetPointer = idRangePosition + 2 * i, glyphIDs = [];
20620 + if (idRangeOffset === 0) {
20621 + for (let i2 = startCode + idDelta, e = endCode + idDelta; i2 <= e; i2++) {
20622 + glyphIDs.push(i2);
20623 + }
20624 + } else {
20625 + for (let i2 = 0, e = endCode - startCode; i2 <= e; i2++) {
20626 + p22.currentPosition = idRangeOffsetPointer + idRangeOffset + i2 * 2;
20627 + glyphIDs.push(p22.uint16);
20628 + }
20629 + }
20630 + return {
20631 + startCode,
20632 + endCode,
20633 + idDelta,
20634 + idRangeOffset,
20635 + glyphIDs
20636 + };
20637 + };
20638 + return [...new Array(this.segCount)].map(build);
20639 + }
20640 + reverse(glyphID) {
20641 + let s = this.segments.find((v2) => v2.glyphIDs.includes(glyphID));
20642 + if (!s) return {};
20643 + const code = s.startCode + s.glyphIDs.indexOf(glyphID);
20644 + return { code, unicode: String.fromCodePoint(code) };
20645 + }
20646 + getGlyphId(charCode) {
20647 + if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
20648 + if (55296 <= charCode && charCode <= 57343) return 0;
20649 + if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
20650 + return 0;
20651 + let segment = this.segments.find(
20652 + (s) => s.startCode <= charCode && charCode <= s.endCode
20653 + );
20654 + if (!segment) return 0;
20655 + return segment.glyphIDs[charCode - segment.startCode];
20656 + }
20657 + supports(charCode) {
20658 + return this.getGlyphId(charCode) !== 0;
20659 + }
20660 + getSupportedCharCodes(preservePropNames = false) {
20661 + if (preservePropNames) return this.segments;
20662 + return this.segments.map((v2) => ({
20663 + start: v2.startCode,
20664 + end: v2.endCode
20665 + }));
20666 + }
20667 +};
20668 +var Format6 = class extends Subtable {
20669 + constructor(p22, platformID, encodingID) {
20670 + super(p22, platformID, encodingID);
20671 + this.format = 6;
20672 + this.length = p22.uint16;
20673 + this.language = p22.uint16;
20674 + this.firstCode = p22.uint16;
20675 + this.entryCount = p22.uint16;
20676 + this.lastCode = this.firstCode + this.entryCount - 1;
20677 + const getter = () => [...new Array(this.entryCount)].map((_) => p22.uint16);
20678 + lazy$1(this, `glyphIdArray`, getter);
20679 + }
20680 + supports(charCode) {
20681 + if (charCode.charCodeAt) {
20682 + charCode = -1;
20683 + console.warn(
20684 + `supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.`
20685 + );
20686 + }
20687 + if (charCode < this.firstCode) return {};
20688 + if (charCode > this.firstCode + this.entryCount) return {};
20689 + const code = charCode - this.firstCode;
20690 + return { code, unicode: String.fromCodePoint(code) };
20691 + }
20692 + reverse(glyphID) {
20693 + let pos = this.glyphIdArray.indexOf(glyphID);
20694 + if (pos > -1) return this.firstCode + pos;
20695 + }
20696 + getSupportedCharCodes(preservePropNames = false) {
20697 + if (preservePropNames) {
20698 + return [{ firstCode: this.firstCode, lastCode: this.lastCode }];
20699 + }
20700 + return [{ start: this.firstCode, end: this.lastCode }];
20701 + }
20702 +};
20703 +var Format8 = class extends Subtable {
20704 + constructor(p22, platformID, encodingID) {
20705 + super(p22, platformID, encodingID);
20706 + this.format = 8;
20707 + p22.uint16;
20708 + this.length = p22.uint32;
20709 + this.language = p22.uint32;
20710 + this.is32 = [...new Array(8192)].map((_) => p22.uint8);
20711 + this.numGroups = p22.uint32;
20712 + const getter = () => [...new Array(this.numGroups)].map(
20713 + (_) => new SequentialMapGroup$1(p22)
20714 + );
20715 + lazy$1(this, `groups`, getter);
20716 + }
20717 + supports(charCode) {
20718 + if (charCode.charCodeAt) {
20719 + charCode = -1;
20720 + console.warn(
20721 + `supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.`
20722 + );
20723 + }
20724 + return this.groups.findIndex(
20725 + (s) => s.startcharCode <= charCode && charCode <= s.endcharCode
20726 + ) !== -1;
20727 + }
20728 + reverse(glyphID) {
20729 + console.warn(`reverse not implemented for cmap subtable format 8`);
20730 + return {};
20731 + }
20732 + getSupportedCharCodes(preservePropNames = false) {
20733 + if (preservePropNames) return this.groups;
20734 + return this.groups.map((v2) => ({
20735 + start: v2.startcharCode,
20736 + end: v2.endcharCode
20737 + }));
20738 + }
20739 +};
20740 +var SequentialMapGroup$1 = class {
20741 + constructor(p22) {
20742 + this.startcharCode = p22.uint32;
20743 + this.endcharCode = p22.uint32;
20744 + this.startGlyphID = p22.uint32;
20745 + }
20746 +};
20747 +var Format10 = class extends Subtable {
20748 + constructor(p22, platformID, encodingID) {
20749 + super(p22, platformID, encodingID);
20750 + this.format = 10;
20751 + p22.uint16;
20752 + this.length = p22.uint32;
20753 + this.language = p22.uint32;
20754 + this.startCharCode = p22.uint32;
20755 + this.numChars = p22.uint32;
20756 + this.endCharCode = this.startCharCode + this.numChars;
20757 + const getter = () => [...new Array(this.numChars)].map((_) => p22.uint16);
20758 + lazy$1(this, `glyphs`, getter);
20759 + }
20760 + supports(charCode) {
20761 + if (charCode.charCodeAt) {
20762 + charCode = -1;
20763 + console.warn(
20764 + `supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.`
20765 + );
20766 + }
20767 + if (charCode < this.startCharCode) return false;
20768 + if (charCode > this.startCharCode + this.numChars) return false;
20769 + return charCode - this.startCharCode;
20770 + }
20771 + reverse(glyphID) {
20772 + console.warn(`reverse not implemented for cmap subtable format 10`);
20773 + return {};
20774 + }
20775 + getSupportedCharCodes(preservePropNames = false) {
20776 + if (preservePropNames) {
20777 + return [
20778 + {
20779 + startCharCode: this.startCharCode,
20780 + endCharCode: this.endCharCode
20781 + }
20782 + ];
20783 + }
20784 + return [{ start: this.startCharCode, end: this.endCharCode }];
20785 + }
20786 +};
20787 +var Format12 = class extends Subtable {
20788 + constructor(p22, platformID, encodingID) {
20789 + super(p22, platformID, encodingID);
20790 + this.format = 12;
20791 + p22.uint16;
20792 + this.length = p22.uint32;
20793 + this.language = p22.uint32;
20794 + this.numGroups = p22.uint32;
20795 + const getter = () => [...new Array(this.numGroups)].map(
20796 + (_) => new SequentialMapGroup(p22)
20797 + );
20798 + lazy$1(this, `groups`, getter);
20799 + }
20800 + supports(charCode) {
20801 + if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
20802 + if (55296 <= charCode && charCode <= 57343) return 0;
20803 + if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
20804 + return 0;
20805 + return this.groups.findIndex(
20806 + (s) => s.startCharCode <= charCode && charCode <= s.endCharCode
20807 + ) !== -1;
20808 + }
20809 + reverse(glyphID) {
20810 + for (let group of this.groups) {
20811 + let start = group.startGlyphID;
20812 + if (start > glyphID) continue;
20813 + if (start === glyphID) return group.startCharCode;
20814 + let end = start + (group.endCharCode - group.startCharCode);
20815 + if (end < glyphID) continue;
20816 + const code = group.startCharCode + (glyphID - start);
20817 + return { code, unicode: String.fromCodePoint(code) };
20818 + }
20819 + return {};
20820 + }
20821 + getSupportedCharCodes(preservePropNames = false) {
20822 + if (preservePropNames) return this.groups;
20823 + return this.groups.map((v2) => ({
20824 + start: v2.startCharCode,
20825 + end: v2.endCharCode
20826 + }));
20827 + }
20828 +};
20829 +var SequentialMapGroup = class {
20830 + constructor(p22) {
20831 + this.startCharCode = p22.uint32;
20832 + this.endCharCode = p22.uint32;
20833 + this.startGlyphID = p22.uint32;
20834 + }
20835 +};
20836 +var Format13 = class extends Subtable {
20837 + constructor(p22, platformID, encodingID) {
20838 + super(p22, platformID, encodingID);
20839 + this.format = 13;
20840 + p22.uint16;
20841 + this.length = p22.uint32;
20842 + this.language = p22.uint32;
20843 + this.numGroups = p22.uint32;
20844 + const getter = [...new Array(this.numGroups)].map(
20845 + (_) => new ConstantMapGroup(p22)
20846 + );
20847 + lazy$1(this, `groups`, getter);
20848 + }
20849 + supports(charCode) {
20850 + if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
20851 + return this.groups.findIndex(
20852 + (s) => s.startCharCode <= charCode && charCode <= s.endCharCode
20853 + ) !== -1;
20854 + }
20855 + reverse(glyphID) {
20856 + console.warn(`reverse not implemented for cmap subtable format 13`);
20857 + return {};
20858 + }
20859 + getSupportedCharCodes(preservePropNames = false) {
20860 + if (preservePropNames) return this.groups;
20861 + return this.groups.map((v2) => ({
20862 + start: v2.startCharCode,
20863 + end: v2.endCharCode
20864 + }));
20865 + }
20866 +};
20867 +var ConstantMapGroup = class {
20868 + constructor(p22) {
20869 + this.startCharCode = p22.uint32;
20870 + this.endCharCode = p22.uint32;
20871 + this.glyphID = p22.uint32;
20872 + }
20873 +};
20874 +var Format14 = class extends Subtable {
20875 + constructor(p22, platformID, encodingID) {
20876 + super(p22, platformID, encodingID);
20877 + this.subTableStart = p22.currentPosition;
20878 + this.format = 14;
20879 + this.length = p22.uint32;
20880 + this.numVarSelectorRecords = p22.uint32;
20881 + lazy$1(
20882 + this,
20883 + `varSelectors`,
20884 + () => [...new Array(this.numVarSelectorRecords)].map(
20885 + (_) => new VariationSelector(p22)
20886 + )
20887 + );
20888 + }
20889 + supports() {
20890 + console.warn(`supports not implemented for cmap subtable format 14`);
20891 + return 0;
20892 + }
20893 + getSupportedCharCodes() {
20894 + console.warn(
20895 + `getSupportedCharCodes not implemented for cmap subtable format 14`
20896 + );
20897 + return [];
20898 + }
20899 + reverse(glyphID) {
20900 + console.warn(`reverse not implemented for cmap subtable format 14`);
20901 + return {};
20902 + }
20903 + supportsVariation(variation) {
20904 + let v2 = this.varSelector.find(
20905 + (uvs) => uvs.varSelector === variation
20906 + );
20907 + return v2 ? v2 : false;
20908 + }
20909 + getSupportedVariations() {
20910 + return this.varSelectors.map((v2) => v2.varSelector);
20911 + }
20912 +};
20913 +var VariationSelector = class {
20914 + constructor(p22) {
20915 + this.varSelector = p22.uint24;
20916 + this.defaultUVSOffset = p22.Offset32;
20917 + this.nonDefaultUVSOffset = p22.Offset32;
20918 + }
20919 +};
20920 +function createSubTable(parser, platformID, encodingID) {
20921 + const format = parser.uint16;
20922 + if (format === 0) return new Format0(parser, platformID, encodingID);
20923 + if (format === 2) return new Format2(parser, platformID, encodingID);
20924 + if (format === 4) return new Format4(parser, platformID, encodingID);
20925 + if (format === 6) return new Format6(parser, platformID, encodingID);
20926 + if (format === 8) return new Format8(parser, platformID, encodingID);
20927 + if (format === 10) return new Format10(parser, platformID, encodingID);
20928 + if (format === 12) return new Format12(parser, platformID, encodingID);
20929 + if (format === 13) return new Format13(parser, platformID, encodingID);
20930 + if (format === 14) return new Format14(parser, platformID, encodingID);
20931 + return {};
20932 +}
20933 +var cmap = class extends SimpleTable {
20934 + constructor(dict, dataview) {
20935 + const { p: p22 } = super(dict, dataview);
20936 + this.version = p22.uint16;
20937 + this.numTables = p22.uint16;
20938 + this.encodingRecords = [...new Array(this.numTables)].map(
20939 + (_) => new EncodingRecord(p22, this.tableStart)
20940 + );
20941 + }
20942 + getSubTable(tableID) {
20943 + return this.encodingRecords[tableID].table;
20944 + }
20945 + getSupportedEncodings() {
20946 + return this.encodingRecords.map((r2) => ({
20947 + platformID: r2.platformID,
20948 + encodingId: r2.encodingID
20949 + }));
20950 + }
20951 + getSupportedCharCodes(platformID, encodingID) {
20952 + const recordID = this.encodingRecords.findIndex(
20953 + (r2) => r2.platformID === platformID && r2.encodingID === encodingID
20954 + );
20955 + if (recordID === -1) return false;
20956 + const subtable = this.getSubTable(recordID);
20957 + return subtable.getSupportedCharCodes();
20958 + }
20959 + reverse(glyphid) {
20960 + for (let i = 0; i < this.numTables; i++) {
20961 + let code = this.getSubTable(i).reverse(glyphid);
20962 + if (code) return code;
20963 + }
20964 + }
20965 + getGlyphId(char) {
20966 + let last = 0;
20967 + this.encodingRecords.some((_, tableID) => {
20968 + let t = this.getSubTable(tableID);
20969 + if (!t.getGlyphId) return false;
20970 + last = t.getGlyphId(char);
20971 + return last !== 0;
20972 + });
20973 + return last;
20974 + }
20975 + supports(char) {
20976 + return this.encodingRecords.some((_, tableID) => {
20977 + const t = this.getSubTable(tableID);
20978 + return t.supports && t.supports(char) !== false;
20979 + });
20980 + }
20981 + supportsVariation(variation) {
20982 + return this.encodingRecords.some((_, tableID) => {
20983 + const t = this.getSubTable(tableID);
20984 + return t.supportsVariation && t.supportsVariation(variation) !== false;
20985 + });
20986 + }
20987 +};
20988 +var EncodingRecord = class {
20989 + constructor(p22, tableStart) {
20990 + const platformID = this.platformID = p22.uint16;
20991 + const encodingID = this.encodingID = p22.uint16;
20992 + const offset4 = this.offset = p22.Offset32;
20993 + lazy$1(this, `table`, () => {
20994 + p22.currentPosition = tableStart + offset4;
20995 + return createSubTable(p22, platformID, encodingID);
20996 + });
20997 + }
20998 +};
20999 +var cmap$1 = Object.freeze({ __proto__: null, cmap });
21000 +var head = class extends SimpleTable {
21001 + constructor(dict, dataview) {
21002 + const { p: p22 } = super(dict, dataview);
21003 + this.load({
21004 + majorVersion: p22.uint16,
21005 + minorVersion: p22.uint16,
21006 + fontRevision: p22.fixed,
21007 + checkSumAdjustment: p22.uint32,
21008 + magicNumber: p22.uint32,
21009 + flags: p22.flags(16),
21010 + unitsPerEm: p22.uint16,
21011 + created: p22.longdatetime,
21012 + modified: p22.longdatetime,
21013 + xMin: p22.int16,
21014 + yMin: p22.int16,
21015 + xMax: p22.int16,
21016 + yMax: p22.int16,
21017 + macStyle: p22.flags(16),
21018 + lowestRecPPEM: p22.uint16,
21019 + fontDirectionHint: p22.uint16,
21020 + indexToLocFormat: p22.uint16,
21021 + glyphDataFormat: p22.uint16
21022 + });
21023 + }
21024 +};
21025 +var head$1 = Object.freeze({ __proto__: null, head });
21026 +var hhea = class extends SimpleTable {
21027 + constructor(dict, dataview) {
21028 + const { p: p22 } = super(dict, dataview);
21029 + this.majorVersion = p22.uint16;
21030 + this.minorVersion = p22.uint16;
21031 + this.ascender = p22.fword;
21032 + this.descender = p22.fword;
21033 + this.lineGap = p22.fword;
21034 + this.advanceWidthMax = p22.ufword;
21035 + this.minLeftSideBearing = p22.fword;
21036 + this.minRightSideBearing = p22.fword;
21037 + this.xMaxExtent = p22.fword;
21038 + this.caretSlopeRise = p22.int16;
21039 + this.caretSlopeRun = p22.int16;
21040 + this.caretOffset = p22.int16;
21041 + p22.int16;
21042 + p22.int16;
21043 + p22.int16;
21044 + p22.int16;
21045 + this.metricDataFormat = p22.int16;
21046 + this.numberOfHMetrics = p22.uint16;
21047 + p22.verifyLength();
21048 + }
21049 +};
21050 +var hhea$1 = Object.freeze({ __proto__: null, hhea });
21051 +var hmtx = class extends SimpleTable {
21052 + constructor(dict, dataview, tables) {
21053 + const { p: p22 } = super(dict, dataview);
21054 + const numberOfHMetrics = tables.hhea.numberOfHMetrics;
21055 + const numGlyphs = tables.maxp.numGlyphs;
21056 + const metricsStart = p22.currentPosition;
21057 + lazy$1(this, `hMetrics`, () => {
21058 + p22.currentPosition = metricsStart;
21059 + return [...new Array(numberOfHMetrics)].map(
21060 + (_) => new LongHorMetric(p22.uint16, p22.int16)
21061 + );
21062 + });
21063 + if (numberOfHMetrics < numGlyphs) {
21064 + const lsbStart = metricsStart + numberOfHMetrics * 4;
21065 + lazy$1(this, `leftSideBearings`, () => {
21066 + p22.currentPosition = lsbStart;
21067 + return [...new Array(numGlyphs - numberOfHMetrics)].map(
21068 + (_) => p22.int16
21069 + );
21070 + });
21071 + }
21072 + }
21073 +};
21074 +var LongHorMetric = class {
21075 + constructor(w2, b) {
21076 + this.advanceWidth = w2;
21077 + this.lsb = b;
21078 + }
21079 +};
21080 +var hmtx$1 = Object.freeze({ __proto__: null, hmtx });
21081 +var maxp = class extends SimpleTable {
21082 + constructor(dict, dataview) {
21083 + const { p: p22 } = super(dict, dataview);
21084 + this.version = p22.legacyFixed;
21085 + this.numGlyphs = p22.uint16;
21086 + if (this.version === 1) {
21087 + this.maxPoints = p22.uint16;
21088 + this.maxContours = p22.uint16;
21089 + this.maxCompositePoints = p22.uint16;
21090 + this.maxCompositeContours = p22.uint16;
21091 + this.maxZones = p22.uint16;
21092 + this.maxTwilightPoints = p22.uint16;
21093 + this.maxStorage = p22.uint16;
21094 + this.maxFunctionDefs = p22.uint16;
21095 + this.maxInstructionDefs = p22.uint16;
21096 + this.maxStackElements = p22.uint16;
21097 + this.maxSizeOfInstructions = p22.uint16;
21098 + this.maxComponentElements = p22.uint16;
21099 + this.maxComponentDepth = p22.uint16;
21100 + }
21101 + p22.verifyLength();
21102 + }
21103 +};
21104 +var maxp$1 = Object.freeze({ __proto__: null, maxp });
21105 +var name = class extends SimpleTable {
21106 + constructor(dict, dataview) {
21107 + const { p: p22 } = super(dict, dataview);
21108 + this.format = p22.uint16;
21109 + this.count = p22.uint16;
21110 + this.stringOffset = p22.Offset16;
21111 + this.nameRecords = [...new Array(this.count)].map(
21112 + (_) => new NameRecord(p22, this)
21113 + );
21114 + if (this.format === 1) {
21115 + this.langTagCount = p22.uint16;
21116 + this.langTagRecords = [...new Array(this.langTagCount)].map(
21117 + (_) => new LangTagRecord(p22.uint16, p22.Offset16)
21118 + );
21119 + }
21120 + this.stringStart = this.tableStart + this.stringOffset;
21121 + }
21122 + get(nameID) {
21123 + let record = this.nameRecords.find(
21124 + (record2) => record2.nameID === nameID
21125 + );
21126 + if (record) return record.string;
21127 + }
21128 +};
21129 +var LangTagRecord = class {
21130 + constructor(length, offset4) {
21131 + this.length = length;
21132 + this.offset = offset4;
21133 + }
21134 +};
21135 +var NameRecord = class {
21136 + constructor(p22, nameTable) {
21137 + this.platformID = p22.uint16;
21138 + this.encodingID = p22.uint16;
21139 + this.languageID = p22.uint16;
21140 + this.nameID = p22.uint16;
21141 + this.length = p22.uint16;
21142 + this.offset = p22.Offset16;
21143 + lazy$1(this, `string`, () => {
21144 + p22.currentPosition = nameTable.stringStart + this.offset;
21145 + return decodeString(p22, this);
21146 + });
21147 + }
21148 +};
21149 +function decodeString(p22, record) {
21150 + const { platformID, length } = record;
21151 + if (length === 0) return ``;
21152 + if (platformID === 0 || platformID === 3) {
21153 + const str2 = [];
21154 + for (let i = 0, e = length / 2; i < e; i++)
21155 + str2[i] = String.fromCharCode(p22.uint16);
21156 + return str2.join(``);
21157 + }
21158 + const bytes = p22.readBytes(length);
21159 + const str = [];
21160 + bytes.forEach(function(b, i) {
21161 + str[i] = String.fromCharCode(b);
21162 + });
21163 + return str.join(``);
21164 +}
21165 +var name$1 = Object.freeze({ __proto__: null, name });
21166 +var OS2 = class extends SimpleTable {
21167 + constructor(dict, dataview) {
21168 + const { p: p22 } = super(dict, dataview);
21169 + this.version = p22.uint16;
21170 + this.xAvgCharWidth = p22.int16;
21171 + this.usWeightClass = p22.uint16;
21172 + this.usWidthClass = p22.uint16;
21173 + this.fsType = p22.uint16;
21174 + this.ySubscriptXSize = p22.int16;
21175 + this.ySubscriptYSize = p22.int16;
21176 + this.ySubscriptXOffset = p22.int16;
21177 + this.ySubscriptYOffset = p22.int16;
21178 + this.ySuperscriptXSize = p22.int16;
21179 + this.ySuperscriptYSize = p22.int16;
21180 + this.ySuperscriptXOffset = p22.int16;
21181 + this.ySuperscriptYOffset = p22.int16;
21182 + this.yStrikeoutSize = p22.int16;
21183 + this.yStrikeoutPosition = p22.int16;
21184 + this.sFamilyClass = p22.int16;
21185 + this.panose = [...new Array(10)].map((_) => p22.uint8);
21186 + this.ulUnicodeRange1 = p22.flags(32);
21187 + this.ulUnicodeRange2 = p22.flags(32);
21188 + this.ulUnicodeRange3 = p22.flags(32);
21189 + this.ulUnicodeRange4 = p22.flags(32);
21190 + this.achVendID = p22.tag;
21191 + this.fsSelection = p22.uint16;
21192 + this.usFirstCharIndex = p22.uint16;
21193 + this.usLastCharIndex = p22.uint16;
21194 + this.sTypoAscender = p22.int16;
21195 + this.sTypoDescender = p22.int16;
21196 + this.sTypoLineGap = p22.int16;
21197 + this.usWinAscent = p22.uint16;
21198 + this.usWinDescent = p22.uint16;
21199 + if (this.version === 0) return p22.verifyLength();
21200 + this.ulCodePageRange1 = p22.flags(32);
21201 + this.ulCodePageRange2 = p22.flags(32);
21202 + if (this.version === 1) return p22.verifyLength();
21203 + this.sxHeight = p22.int16;
21204 + this.sCapHeight = p22.int16;
21205 + this.usDefaultChar = p22.uint16;
21206 + this.usBreakChar = p22.uint16;
21207 + this.usMaxContext = p22.uint16;
21208 + if (this.version <= 4) return p22.verifyLength();
21209 + this.usLowerOpticalPointSize = p22.uint16;
21210 + this.usUpperOpticalPointSize = p22.uint16;
21211 + if (this.version === 5) return p22.verifyLength();
21212 + }
21213 +};
21214 +var OS2$1 = Object.freeze({ __proto__: null, OS2 });
21215 +var post = class extends SimpleTable {
21216 + constructor(dict, dataview) {
21217 + const { p: p22 } = super(dict, dataview);
21218 + this.version = p22.legacyFixed;
21219 + this.italicAngle = p22.fixed;
21220 + this.underlinePosition = p22.fword;
21221 + this.underlineThickness = p22.fword;
21222 + this.isFixedPitch = p22.uint32;
21223 + this.minMemType42 = p22.uint32;
21224 + this.maxMemType42 = p22.uint32;
21225 + this.minMemType1 = p22.uint32;
21226 + this.maxMemType1 = p22.uint32;
21227 + if (this.version === 1 || this.version === 3) return p22.verifyLength();
21228 + this.numGlyphs = p22.uint16;
21229 + if (this.version === 2) {
21230 + this.glyphNameIndex = [...new Array(this.numGlyphs)].map(
21231 + (_) => p22.uint16
21232 + );
21233 + this.namesOffset = p22.currentPosition;
21234 + this.glyphNameOffsets = [1];
21235 + for (let i = 0; i < this.numGlyphs; i++) {
21236 + let index2 = this.glyphNameIndex[i];
21237 + if (index2 < macStrings.length) {
21238 + this.glyphNameOffsets.push(this.glyphNameOffsets[i]);
21239 + continue;
21240 + }
21241 + let bytelength = p22.int8;
21242 + p22.skip(bytelength);
21243 + this.glyphNameOffsets.push(
21244 + this.glyphNameOffsets[i] + bytelength + 1
21245 + );
21246 + }
21247 + }
21248 + if (this.version === 2.5) {
21249 + this.offset = [...new Array(this.numGlyphs)].map(
21250 + (_) => p22.int8
21251 + );
21252 + }
21253 + }
21254 + getGlyphName(glyphid) {
21255 + if (this.version !== 2) {
21256 + console.warn(
21257 + `post table version ${this.version} does not support glyph name lookups`
21258 + );
21259 + return ``;
21260 + }
21261 + let index2 = this.glyphNameIndex[glyphid];
21262 + if (index2 < 258) return macStrings[index2];
21263 + let offset4 = this.glyphNameOffsets[glyphid];
21264 + let next = this.glyphNameOffsets[glyphid + 1];
21265 + let len = next - offset4 - 1;
21266 + if (len === 0) return `.notdef.`;
21267 + this.parser.currentPosition = this.namesOffset + offset4;
21268 + const data = this.parser.readBytes(
21269 + len,
21270 + this.namesOffset + offset4,
21271 + 8,
21272 + true
21273 + );
21274 + return data.map((b) => String.fromCharCode(b)).join(``);
21275 + }
21276 +};
21277 +var macStrings = [
21278 + `.notdef`,
21279 + `.null`,
21280 + `nonmarkingreturn`,
21281 + `space`,
21282 + `exclam`,
21283 + `quotedbl`,
21284 + `numbersign`,
21285 + `dollar`,
21286 + `percent`,
21287 + `ampersand`,
21288 + `quotesingle`,
21289 + `parenleft`,
21290 + `parenright`,
21291 + `asterisk`,
21292 + `plus`,
21293 + `comma`,
21294 + `hyphen`,
21295 + `period`,
21296 + `slash`,
21297 + `zero`,
21298 + `one`,
21299 + `two`,
21300 + `three`,
21301 + `four`,
21302 + `five`,
21303 + `six`,
21304 + `seven`,
21305 + `eight`,
21306 + `nine`,
21307 + `colon`,
21308 + `semicolon`,
21309 + `less`,
21310 + `equal`,
21311 + `greater`,
21312 + `question`,
21313 + `at`,
21314 + `A`,
21315 + `B`,
21316 + `C`,
21317 + `D`,
21318 + `E`,
21319 + `F`,
21320 + `G`,
21321 + `H`,
21322 + `I`,
21323 + `J`,
21324 + `K`,
21325 + `L`,
21326 + `M`,
21327 + `N`,
21328 + `O`,
21329 + `P`,
21330 + `Q`,
21331 + `R`,
21332 + `S`,
21333 + `T`,
21334 + `U`,
21335 + `V`,
21336 + `W`,
21337 + `X`,
21338 + `Y`,
21339 + `Z`,
21340 + `bracketleft`,
21341 + `backslash`,
21342 + `bracketright`,
21343 + `asciicircum`,
21344 + `underscore`,
21345 + `grave`,
21346 + `a`,
21347 + `b`,
21348 + `c`,
21349 + `d`,
21350 + `e`,
21351 + `f`,
21352 + `g`,
21353 + `h`,
21354 + `i`,
21355 + `j`,
21356 + `k`,
21357 + `l`,
21358 + `m`,
21359 + `n`,
21360 + `o`,
21361 + `p`,
21362 + `q`,
21363 + `r`,
21364 + `s`,
21365 + `t`,
21366 + `u`,
21367 + `v`,
21368 + `w`,
21369 + `x`,
21370 + `y`,
21371 + `z`,
21372 + `braceleft`,
21373 + `bar`,
21374 + `braceright`,
21375 + `asciitilde`,
21376 + `Adieresis`,
21377 + `Aring`,
21378 + `Ccedilla`,
21379 + `Eacute`,
21380 + `Ntilde`,
21381 + `Odieresis`,
21382 + `Udieresis`,
21383 + `aacute`,
21384 + `agrave`,
21385 + `acircumflex`,
21386 + `adieresis`,
21387 + `atilde`,
21388 + `aring`,
21389 + `ccedilla`,
21390 + `eacute`,
21391 + `egrave`,
21392 + `ecircumflex`,
21393 + `edieresis`,
21394 + `iacute`,
21395 + `igrave`,
21396 + `icircumflex`,
21397 + `idieresis`,
21398 + `ntilde`,
21399 + `oacute`,
21400 + `ograve`,
21401 + `ocircumflex`,
21402 + `odieresis`,
21403 + `otilde`,
21404 + `uacute`,
21405 + `ugrave`,
21406 + `ucircumflex`,
21407 + `udieresis`,
21408 + `dagger`,
21409 + `degree`,
21410 + `cent`,
21411 + `sterling`,
21412 + `section`,
21413 + `bullet`,
21414 + `paragraph`,
21415 + `germandbls`,
21416 + `registered`,
21417 + `copyright`,
21418 + `trademark`,
21419 + `acute`,
21420 + `dieresis`,
21421 + `notequal`,
21422 + `AE`,
21423 + `Oslash`,
21424 + `infinity`,
21425 + `plusminus`,
21426 + `lessequal`,
21427 + `greaterequal`,
21428 + `yen`,
21429 + `mu`,
21430 + `partialdiff`,
21431 + `summation`,
21432 + `product`,
21433 + `pi`,
21434 + `integral`,
21435 + `ordfeminine`,
21436 + `ordmasculine`,
21437 + `Omega`,
21438 + `ae`,
21439 + `oslash`,
21440 + `questiondown`,
21441 + `exclamdown`,
21442 + `logicalnot`,
21443 + `radical`,
21444 + `florin`,
21445 + `approxequal`,
21446 + `Delta`,
21447 + `guillemotleft`,
21448 + `guillemotright`,
21449 + `ellipsis`,
21450 + `nonbreakingspace`,
21451 + `Agrave`,
21452 + `Atilde`,
21453 + `Otilde`,
21454 + `OE`,
21455 + `oe`,
21456 + `endash`,
21457 + `emdash`,
21458 + `quotedblleft`,
21459 + `quotedblright`,
21460 + `quoteleft`,
21461 + `quoteright`,
21462 + `divide`,
21463 + `lozenge`,
21464 + `ydieresis`,
21465 + `Ydieresis`,
21466 + `fraction`,
21467 + `currency`,
21468 + `guilsinglleft`,
21469 + `guilsinglright`,
21470 + `fi`,
21471 + `fl`,
21472 + `daggerdbl`,
21473 + `periodcentered`,
21474 + `quotesinglbase`,
21475 + `quotedblbase`,
21476 + `perthousand`,
21477 + `Acircumflex`,
21478 + `Ecircumflex`,
21479 + `Aacute`,
21480 + `Edieresis`,
21481 + `Egrave`,
21482 + `Iacute`,
21483 + `Icircumflex`,
21484 + `Idieresis`,
21485 + `Igrave`,
21486 + `Oacute`,
21487 + `Ocircumflex`,
21488 + `apple`,
21489 + `Ograve`,
21490 + `Uacute`,
21491 + `Ucircumflex`,
21492 + `Ugrave`,
21493 + `dotlessi`,
21494 + `circumflex`,
21495 + `tilde`,
21496 + `macron`,
21497 + `breve`,
21498 + `dotaccent`,
21499 + `ring`,
21500 + `cedilla`,
21501 + `hungarumlaut`,
21502 + `ogonek`,
21503 + `caron`,
21504 + `Lslash`,
21505 + `lslash`,
21506 + `Scaron`,
21507 + `scaron`,
21508 + `Zcaron`,
21509 + `zcaron`,
21510 + `brokenbar`,
21511 + `Eth`,
21512 + `eth`,
21513 + `Yacute`,
21514 + `yacute`,
21515 + `Thorn`,
21516 + `thorn`,
21517 + `minus`,
21518 + `multiply`,
21519 + `onesuperior`,
21520 + `twosuperior`,
21521 + `threesuperior`,
21522 + `onehalf`,
21523 + `onequarter`,
21524 + `threequarters`,
21525 + `franc`,
21526 + `Gbreve`,
21527 + `gbreve`,
21528 + `Idotaccent`,
21529 + `Scedilla`,
21530 + `scedilla`,
21531 + `Cacute`,
21532 + `cacute`,
21533 + `Ccaron`,
21534 + `ccaron`,
21535 + `dcroat`
21536 +];
21537 +var post$1 = Object.freeze({ __proto__: null, post });
21538 +var BASE = class extends SimpleTable {
21539 + constructor(dict, dataview) {
21540 + const { p: p22 } = super(dict, dataview);
21541 + this.majorVersion = p22.uint16;
21542 + this.minorVersion = p22.uint16;
21543 + this.horizAxisOffset = p22.Offset16;
21544 + this.vertAxisOffset = p22.Offset16;
21545 + lazy$1(
21546 + this,
21547 + `horizAxis`,
21548 + () => new AxisTable(
21549 + { offset: dict.offset + this.horizAxisOffset },
21550 + dataview
21551 + )
21552 + );
21553 + lazy$1(
21554 + this,
21555 + `vertAxis`,
21556 + () => new AxisTable(
21557 + { offset: dict.offset + this.vertAxisOffset },
21558 + dataview
21559 + )
21560 + );
21561 + if (this.majorVersion === 1 && this.minorVersion === 1) {
21562 + this.itemVarStoreOffset = p22.Offset32;
21563 + lazy$1(
21564 + this,
21565 + `itemVarStore`,
21566 + () => new AxisTable(
21567 + { offset: dict.offset + this.itemVarStoreOffset },
21568 + dataview
21569 + )
21570 + );
21571 + }
21572 + }
21573 +};
21574 +var AxisTable = class extends SimpleTable {
21575 + constructor(dict, dataview) {
21576 + const { p: p22 } = super(dict, dataview, `AxisTable`);
21577 + this.baseTagListOffset = p22.Offset16;
21578 + this.baseScriptListOffset = p22.Offset16;
21579 + lazy$1(
21580 + this,
21581 + `baseTagList`,
21582 + () => new BaseTagListTable(
21583 + { offset: dict.offset + this.baseTagListOffset },
21584 + dataview
21585 + )
21586 + );
21587 + lazy$1(
21588 + this,
21589 + `baseScriptList`,
21590 + () => new BaseScriptListTable(
21591 + { offset: dict.offset + this.baseScriptListOffset },
21592 + dataview
21593 + )
21594 + );
21595 + }
21596 +};
21597 +var BaseTagListTable = class extends SimpleTable {
21598 + constructor(dict, dataview) {
21599 + const { p: p22 } = super(dict, dataview, `BaseTagListTable`);
21600 + this.baseTagCount = p22.uint16;
21601 + this.baselineTags = [...new Array(this.baseTagCount)].map(
21602 + (_) => p22.tag
21603 + );
21604 + }
21605 +};
21606 +var BaseScriptListTable = class extends SimpleTable {
21607 + constructor(dict, dataview) {
21608 + const { p: p22 } = super(dict, dataview, `BaseScriptListTable`);
21609 + this.baseScriptCount = p22.uint16;
21610 + const recordStart = p22.currentPosition;
21611 + lazy$1(this, `baseScriptRecords`, () => {
21612 + p22.currentPosition = recordStart;
21613 + return [...new Array(this.baseScriptCount)].map(
21614 + (_) => new BaseScriptRecord(this.start, p22)
21615 + );
21616 + });
21617 + }
21618 +};
21619 +var BaseScriptRecord = class {
21620 + constructor(baseScriptListTableStart, p22) {
21621 + this.baseScriptTag = p22.tag;
21622 + this.baseScriptOffset = p22.Offset16;
21623 + lazy$1(this, `baseScriptTable`, () => {
21624 + p22.currentPosition = baseScriptListTableStart + this.baseScriptOffset;
21625 + return new BaseScriptTable(p22);
21626 + });
21627 + }
21628 +};
21629 +var BaseScriptTable = class {
21630 + constructor(p22) {
21631 + this.start = p22.currentPosition;
21632 + this.baseValuesOffset = p22.Offset16;
21633 + this.defaultMinMaxOffset = p22.Offset16;
21634 + this.baseLangSysCount = p22.uint16;
21635 + this.baseLangSysRecords = [...new Array(this.baseLangSysCount)].map(
21636 + (_) => new BaseLangSysRecord(this.start, p22)
21637 + );
21638 + lazy$1(this, `baseValues`, () => {
21639 + p22.currentPosition = this.start + this.baseValuesOffset;
21640 + return new BaseValuesTable(p22);
21641 + });
21642 + lazy$1(this, `defaultMinMax`, () => {
21643 + p22.currentPosition = this.start + this.defaultMinMaxOffset;
21644 + return new MinMaxTable(p22);
21645 + });
21646 + }
21647 +};
21648 +var BaseLangSysRecord = class {
21649 + constructor(baseScriptTableStart, p22) {
21650 + this.baseLangSysTag = p22.tag;
21651 + this.minMaxOffset = p22.Offset16;
21652 + lazy$1(this, `minMax`, () => {
21653 + p22.currentPosition = baseScriptTableStart + this.minMaxOffset;
21654 + return new MinMaxTable(p22);
21655 + });
21656 + }
21657 +};
21658 +var BaseValuesTable = class {
21659 + constructor(p22) {
21660 + this.parser = p22;
21661 + this.start = p22.currentPosition;
21662 + this.defaultBaselineIndex = p22.uint16;
21663 + this.baseCoordCount = p22.uint16;
21664 + this.baseCoords = [...new Array(this.baseCoordCount)].map(
21665 + (_) => p22.Offset16
21666 + );
21667 + }
21668 + getTable(id) {
21669 + this.parser.currentPosition = this.start + this.baseCoords[id];
21670 + return new BaseCoordTable(this.parser);
21671 + }
21672 +};
21673 +var MinMaxTable = class {
21674 + constructor(p22) {
21675 + this.minCoord = p22.Offset16;
21676 + this.maxCoord = p22.Offset16;
21677 + this.featMinMaxCount = p22.uint16;
21678 + const recordStart = p22.currentPosition;
21679 + lazy$1(this, `featMinMaxRecords`, () => {
21680 + p22.currentPosition = recordStart;
21681 + return [...new Array(this.featMinMaxCount)].map(
21682 + (_) => new FeatMinMaxRecord(p22)
21683 + );
21684 + });
21685 + }
21686 +};
21687 +var FeatMinMaxRecord = class {
21688 + constructor(p22) {
21689 + this.featureTableTag = p22.tag;
21690 + this.minCoord = p22.Offset16;
21691 + this.maxCoord = p22.Offset16;
21692 + }
21693 +};
21694 +var BaseCoordTable = class {
21695 + constructor(p22) {
21696 + this.baseCoordFormat = p22.uint16;
21697 + this.coordinate = p22.int16;
21698 + if (this.baseCoordFormat === 2) {
21699 + this.referenceGlyph = p22.uint16;
21700 + this.baseCoordPoint = p22.uint16;
21701 + }
21702 + if (this.baseCoordFormat === 3) {
21703 + this.deviceTable = p22.Offset16;
21704 + }
21705 + }
21706 +};
21707 +var BASE$1 = Object.freeze({ __proto__: null, BASE });
21708 +var ClassDefinition = class {
21709 + constructor(p22) {
21710 + this.classFormat = p22.uint16;
21711 + if (this.classFormat === 1) {
21712 + this.startGlyphID = p22.uint16;
21713 + this.glyphCount = p22.uint16;
21714 + this.classValueArray = [...new Array(this.glyphCount)].map(
21715 + (_) => p22.uint16
21716 + );
21717 + }
21718 + if (this.classFormat === 2) {
21719 + this.classRangeCount = p22.uint16;
21720 + this.classRangeRecords = [
21721 + ...new Array(this.classRangeCount)
21722 + ].map((_) => new ClassRangeRecord(p22));
21723 + }
21724 + }
21725 +};
21726 +var ClassRangeRecord = class {
21727 + constructor(p22) {
21728 + this.startGlyphID = p22.uint16;
21729 + this.endGlyphID = p22.uint16;
21730 + this.class = p22.uint16;
21731 + }
21732 +};
21733 +var CoverageTable = class extends ParsedData {
21734 + constructor(p22) {
21735 + super(p22);
21736 + this.coverageFormat = p22.uint16;
21737 + if (this.coverageFormat === 1) {
21738 + this.glyphCount = p22.uint16;
21739 + this.glyphArray = [...new Array(this.glyphCount)].map(
21740 + (_) => p22.uint16
21741 + );
21742 + }
21743 + if (this.coverageFormat === 2) {
21744 + this.rangeCount = p22.uint16;
21745 + this.rangeRecords = [...new Array(this.rangeCount)].map(
21746 + (_) => new CoverageRangeRecord(p22)
21747 + );
21748 + }
21749 + }
21750 +};
21751 +var CoverageRangeRecord = class {
21752 + constructor(p22) {
21753 + this.startGlyphID = p22.uint16;
21754 + this.endGlyphID = p22.uint16;
21755 + this.startCoverageIndex = p22.uint16;
21756 + }
21757 +};
21758 +var ItemVariationStoreTable = class {
21759 + constructor(table, p22) {
21760 + this.table = table;
21761 + this.parser = p22;
21762 + this.start = p22.currentPosition;
21763 + this.format = p22.uint16;
21764 + this.variationRegionListOffset = p22.Offset32;
21765 + this.itemVariationDataCount = p22.uint16;
21766 + this.itemVariationDataOffsets = [
21767 + ...new Array(this.itemVariationDataCount)
21768 + ].map((_) => p22.Offset32);
21769 + }
21770 +};
21771 +var GDEF = class extends SimpleTable {
21772 + constructor(dict, dataview) {
21773 + const { p: p22 } = super(dict, dataview);
21774 + this.majorVersion = p22.uint16;
21775 + this.minorVersion = p22.uint16;
21776 + this.glyphClassDefOffset = p22.Offset16;
21777 + lazy$1(this, `glyphClassDefs`, () => {
21778 + if (this.glyphClassDefOffset === 0) return void 0;
21779 + p22.currentPosition = this.tableStart + this.glyphClassDefOffset;
21780 + return new ClassDefinition(p22);
21781 + });
21782 + this.attachListOffset = p22.Offset16;
21783 + lazy$1(this, `attachList`, () => {
21784 + if (this.attachListOffset === 0) return void 0;
21785 + p22.currentPosition = this.tableStart + this.attachListOffset;
21786 + return new AttachList(p22);
21787 + });
21788 + this.ligCaretListOffset = p22.Offset16;
21789 + lazy$1(this, `ligCaretList`, () => {
21790 + if (this.ligCaretListOffset === 0) return void 0;
21791 + p22.currentPosition = this.tableStart + this.ligCaretListOffset;
21792 + return new LigCaretList(p22);
21793 + });
21794 + this.markAttachClassDefOffset = p22.Offset16;
21795 + lazy$1(this, `markAttachClassDef`, () => {
21796 + if (this.markAttachClassDefOffset === 0) return void 0;
21797 + p22.currentPosition = this.tableStart + this.markAttachClassDefOffset;
21798 + return new ClassDefinition(p22);
21799 + });
21800 + if (this.minorVersion >= 2) {
21801 + this.markGlyphSetsDefOffset = p22.Offset16;
21802 + lazy$1(this, `markGlyphSetsDef`, () => {
21803 + if (this.markGlyphSetsDefOffset === 0) return void 0;
21804 + p22.currentPosition = this.tableStart + this.markGlyphSetsDefOffset;
21805 + return new MarkGlyphSetsTable(p22);
21806 + });
21807 + }
21808 + if (this.minorVersion === 3) {
21809 + this.itemVarStoreOffset = p22.Offset32;
21810 + lazy$1(this, `itemVarStore`, () => {
21811 + if (this.itemVarStoreOffset === 0) return void 0;
21812 + p22.currentPosition = this.tableStart + this.itemVarStoreOffset;
21813 + return new ItemVariationStoreTable(p22);
21814 + });
21815 + }
21816 + }
21817 +};
21818 +var AttachList = class extends ParsedData {
21819 + constructor(p22) {
21820 + super(p22);
21821 + this.coverageOffset = p22.Offset16;
21822 + this.glyphCount = p22.uint16;
21823 + this.attachPointOffsets = [...new Array(this.glyphCount)].map(
21824 + (_) => p22.Offset16
21825 + );
21826 + }
21827 + getPoint(pointID) {
21828 + this.parser.currentPosition = this.start + this.attachPointOffsets[pointID];
21829 + return new AttachPoint(this.parser);
21830 + }
21831 +};
21832 +var AttachPoint = class {
21833 + constructor(p22) {
21834 + this.pointCount = p22.uint16;
21835 + this.pointIndices = [...new Array(this.pointCount)].map(
21836 + (_) => p22.uint16
21837 + );
21838 + }
21839 +};
21840 +var LigCaretList = class extends ParsedData {
21841 + constructor(p22) {
21842 + super(p22);
21843 + this.coverageOffset = p22.Offset16;
21844 + lazy$1(this, `coverage`, () => {
21845 + p22.currentPosition = this.start + this.coverageOffset;
21846 + return new CoverageTable(p22);
21847 + });
21848 + this.ligGlyphCount = p22.uint16;
21849 + this.ligGlyphOffsets = [...new Array(this.ligGlyphCount)].map(
21850 + (_) => p22.Offset16
21851 + );
21852 + }
21853 + getLigGlyph(ligGlyphID) {
21854 + this.parser.currentPosition = this.start + this.ligGlyphOffsets[ligGlyphID];
21855 + return new LigGlyph(this.parser);
21856 + }
21857 +};
21858 +var LigGlyph = class extends ParsedData {
21859 + constructor(p22) {
21860 + super(p22);
21861 + this.caretCount = p22.uint16;
21862 + this.caretValueOffsets = [...new Array(this.caretCount)].map(
21863 + (_) => p22.Offset16
21864 + );
21865 + }
21866 + getCaretValue(caretID) {
21867 + this.parser.currentPosition = this.start + this.caretValueOffsets[caretID];
21868 + return new CaretValue(this.parser);
21869 + }
21870 +};
21871 +var CaretValue = class {
21872 + constructor(p22) {
21873 + this.caretValueFormat = p22.uint16;
21874 + if (this.caretValueFormat === 1) {
21875 + this.coordinate = p22.int16;
21876 + }
21877 + if (this.caretValueFormat === 2) {
21878 + this.caretValuePointIndex = p22.uint16;
21879 + }
21880 + if (this.caretValueFormat === 3) {
21881 + this.coordinate = p22.int16;
21882 + this.deviceOffset = p22.Offset16;
21883 + }
21884 + }
21885 +};
21886 +var MarkGlyphSetsTable = class extends ParsedData {
21887 + constructor(p22) {
21888 + super(p22);
21889 + this.markGlyphSetTableFormat = p22.uint16;
21890 + this.markGlyphSetCount = p22.uint16;
21891 + this.coverageOffsets = [...new Array(this.markGlyphSetCount)].map(
21892 + (_) => p22.Offset32
21893 + );
21894 + }
21895 + getMarkGlyphSet(markGlyphSetID) {
21896 + this.parser.currentPosition = this.start + this.coverageOffsets[markGlyphSetID];
21897 + return new CoverageTable(this.parser);
21898 + }
21899 +};
21900 +var GDEF$1 = Object.freeze({ __proto__: null, GDEF });
21901 +var ScriptList = class extends ParsedData {
21902 + static EMPTY = { scriptCount: 0, scriptRecords: [] };
21903 + constructor(p22) {
21904 + super(p22);
21905 + this.scriptCount = p22.uint16;
21906 + this.scriptRecords = [...new Array(this.scriptCount)].map(
21907 + (_) => new ScriptRecord(p22)
21908 + );
21909 + }
21910 +};
21911 +var ScriptRecord = class {
21912 + constructor(p22) {
21913 + this.scriptTag = p22.tag;
21914 + this.scriptOffset = p22.Offset16;
21915 + }
21916 +};
21917 +var ScriptTable = class extends ParsedData {
21918 + constructor(p22) {
21919 + super(p22);
21920 + this.defaultLangSys = p22.Offset16;
21921 + this.langSysCount = p22.uint16;
21922 + this.langSysRecords = [...new Array(this.langSysCount)].map(
21923 + (_) => new LangSysRecord(p22)
21924 + );
21925 + }
21926 +};
21927 +var LangSysRecord = class {
21928 + constructor(p22) {
21929 + this.langSysTag = p22.tag;
21930 + this.langSysOffset = p22.Offset16;
21931 + }
21932 +};
21933 +var LangSysTable = class {
21934 + constructor(p22) {
21935 + this.lookupOrder = p22.Offset16;
21936 + this.requiredFeatureIndex = p22.uint16;
21937 + this.featureIndexCount = p22.uint16;
21938 + this.featureIndices = [...new Array(this.featureIndexCount)].map(
21939 + (_) => p22.uint16
21940 + );
21941 + }
21942 +};
21943 +var FeatureList = class extends ParsedData {
21944 + static EMPTY = { featureCount: 0, featureRecords: [] };
21945 + constructor(p22) {
21946 + super(p22);
21947 + this.featureCount = p22.uint16;
21948 + this.featureRecords = [...new Array(this.featureCount)].map(
21949 + (_) => new FeatureRecord(p22)
21950 + );
21951 + }
21952 +};
21953 +var FeatureRecord = class {
21954 + constructor(p22) {
21955 + this.featureTag = p22.tag;
21956 + this.featureOffset = p22.Offset16;
21957 + }
21958 +};
21959 +var FeatureTable = class extends ParsedData {
21960 + constructor(p22) {
21961 + super(p22);
21962 + this.featureParams = p22.Offset16;
21963 + this.lookupIndexCount = p22.uint16;
21964 + this.lookupListIndices = [...new Array(this.lookupIndexCount)].map(
21965 + (_) => p22.uint16
21966 + );
21967 + }
21968 + getFeatureParams() {
21969 + if (this.featureParams > 0) {
21970 + const p22 = this.parser;
21971 + p22.currentPosition = this.start + this.featureParams;
21972 + const tag = this.featureTag;
21973 + if (tag === `size`) return new Size(p22);
21974 + if (tag.startsWith(`cc`)) return new CharacterVariant(p22);
21975 + if (tag.startsWith(`ss`)) return new StylisticSet(p22);
21976 + }
21977 + }
21978 +};
21979 +var CharacterVariant = class {
21980 + constructor(p22) {
21981 + this.format = p22.uint16;
21982 + this.featUiLabelNameId = p22.uint16;
21983 + this.featUiTooltipTextNameId = p22.uint16;
21984 + this.sampleTextNameId = p22.uint16;
21985 + this.numNamedParameters = p22.uint16;
21986 + this.firstParamUiLabelNameId = p22.uint16;
21987 + this.charCount = p22.uint16;
21988 + this.character = [...new Array(this.charCount)].map(
21989 + (_) => p22.uint24
21990 + );
21991 + }
21992 +};
21993 +var Size = class {
21994 + constructor(p22) {
21995 + this.designSize = p22.uint16;
21996 + this.subfamilyIdentifier = p22.uint16;
21997 + this.subfamilyNameID = p22.uint16;
21998 + this.smallEnd = p22.uint16;
21999 + this.largeEnd = p22.uint16;
22000 + }
22001 +};
22002 +var StylisticSet = class {
22003 + constructor(p22) {
22004 + this.version = p22.uint16;
22005 + this.UINameID = p22.uint16;
22006 + }
22007 +};
22008 +function undoCoverageOffsetParsing(instance) {
22009 + instance.parser.currentPosition -= 2;
22010 + delete instance.coverageOffset;
22011 + delete instance.getCoverageTable;
22012 +}
22013 +var LookupType$1 = class extends ParsedData {
22014 + constructor(p22) {
22015 + super(p22);
22016 + this.substFormat = p22.uint16;
22017 + this.coverageOffset = p22.Offset16;
22018 + }
22019 + getCoverageTable() {
22020 + let p22 = this.parser;
22021 + p22.currentPosition = this.start + this.coverageOffset;
22022 + return new CoverageTable(p22);
22023 + }
22024 +};
22025 +var SubstLookupRecord = class {
22026 + constructor(p22) {
22027 + this.glyphSequenceIndex = p22.uint16;
22028 + this.lookupListIndex = p22.uint16;
22029 + }
22030 +};
22031 +var LookupType1$1 = class extends LookupType$1 {
22032 + constructor(p22) {
22033 + super(p22);
22034 + this.deltaGlyphID = p22.int16;
22035 + }
22036 +};
22037 +var LookupType2$1 = class extends LookupType$1 {
22038 + constructor(p22) {
22039 + super(p22);
22040 + this.sequenceCount = p22.uint16;
22041 + this.sequenceOffsets = [...new Array(this.sequenceCount)].map(
22042 + (_) => p22.Offset16
22043 + );
22044 + }
22045 + getSequence(index2) {
22046 + let p22 = this.parser;
22047 + p22.currentPosition = this.start + this.sequenceOffsets[index2];
22048 + return new SequenceTable(p22);
22049 + }
22050 +};
22051 +var SequenceTable = class {
22052 + constructor(p22) {
22053 + this.glyphCount = p22.uint16;
22054 + this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
22055 + (_) => p22.uint16
22056 + );
22057 + }
22058 +};
22059 +var LookupType3$1 = class extends LookupType$1 {
22060 + constructor(p22) {
22061 + super(p22);
22062 + this.alternateSetCount = p22.uint16;
22063 + this.alternateSetOffsets = [
22064 + ...new Array(this.alternateSetCount)
22065 + ].map((_) => p22.Offset16);
22066 + }
22067 + getAlternateSet(index2) {
22068 + let p22 = this.parser;
22069 + p22.currentPosition = this.start + this.alternateSetOffsets[index2];
22070 + return new AlternateSetTable(p22);
22071 + }
22072 +};
22073 +var AlternateSetTable = class {
22074 + constructor(p22) {
22075 + this.glyphCount = p22.uint16;
22076 + this.alternateGlyphIDs = [...new Array(this.glyphCount)].map(
22077 + (_) => p22.uint16
22078 + );
22079 + }
22080 +};
22081 +var LookupType4$1 = class extends LookupType$1 {
22082 + constructor(p22) {
22083 + super(p22);
22084 + this.ligatureSetCount = p22.uint16;
22085 + this.ligatureSetOffsets = [...new Array(this.ligatureSetCount)].map(
22086 + (_) => p22.Offset16
22087 + );
22088 + }
22089 + getLigatureSet(index2) {
22090 + let p22 = this.parser;
22091 + p22.currentPosition = this.start + this.ligatureSetOffsets[index2];
22092 + return new LigatureSetTable(p22);
22093 + }
22094 +};
22095 +var LigatureSetTable = class extends ParsedData {
22096 + constructor(p22) {
22097 + super(p22);
22098 + this.ligatureCount = p22.uint16;
22099 + this.ligatureOffsets = [...new Array(this.ligatureCount)].map(
22100 + (_) => p22.Offset16
22101 + );
22102 + }
22103 + getLigature(index2) {
22104 + let p22 = this.parser;
22105 + p22.currentPosition = this.start + this.ligatureOffsets[index2];
22106 + return new LigatureTable(p22);
22107 + }
22108 +};
22109 +var LigatureTable = class {
22110 + constructor(p22) {
22111 + this.ligatureGlyph = p22.uint16;
22112 + this.componentCount = p22.uint16;
22113 + this.componentGlyphIDs = [
22114 + ...new Array(this.componentCount - 1)
22115 + ].map((_) => p22.uint16);
22116 + }
22117 +};
22118 +var LookupType5$1 = class extends LookupType$1 {
22119 + constructor(p22) {
22120 + super(p22);
22121 + if (this.substFormat === 1) {
22122 + this.subRuleSetCount = p22.uint16;
22123 + this.subRuleSetOffsets = [
22124 + ...new Array(this.subRuleSetCount)
22125 + ].map((_) => p22.Offset16);
22126 + }
22127 + if (this.substFormat === 2) {
22128 + this.classDefOffset = p22.Offset16;
22129 + this.subClassSetCount = p22.uint16;
22130 + this.subClassSetOffsets = [
22131 + ...new Array(this.subClassSetCount)
22132 + ].map((_) => p22.Offset16);
22133 + }
22134 + if (this.substFormat === 3) {
22135 + undoCoverageOffsetParsing(this);
22136 + this.glyphCount = p22.uint16;
22137 + this.substitutionCount = p22.uint16;
22138 + this.coverageOffsets = [...new Array(this.glyphCount)].map(
22139 + (_) => p22.Offset16
22140 + );
22141 + this.substLookupRecords = [
22142 + ...new Array(this.substitutionCount)
22143 + ].map((_) => new SubstLookupRecord(p22));
22144 + }
22145 + }
22146 + getSubRuleSet(index2) {
22147 + if (this.substFormat !== 1)
22148 + throw new Error(
22149 + `lookup type 5.${this.substFormat} has no subrule sets.`
22150 + );
22151 + let p22 = this.parser;
22152 + p22.currentPosition = this.start + this.subRuleSetOffsets[index2];
22153 + return new SubRuleSetTable(p22);
22154 + }
22155 + getSubClassSet(index2) {
22156 + if (this.substFormat !== 2)
22157 + throw new Error(
22158 + `lookup type 5.${this.substFormat} has no subclass sets.`
22159 + );
22160 + let p22 = this.parser;
22161 + p22.currentPosition = this.start + this.subClassSetOffsets[index2];
22162 + return new SubClassSetTable(p22);
22163 + }
22164 + getCoverageTable(index2) {
22165 + if (this.substFormat !== 3 && !index2)
22166 + return super.getCoverageTable();
22167 + if (!index2)
22168 + throw new Error(
22169 + `lookup type 5.${this.substFormat} requires an coverage table index.`
22170 + );
22171 + let p22 = this.parser;
22172 + p22.currentPosition = this.start + this.coverageOffsets[index2];
22173 + return new CoverageTable(p22);
22174 + }
22175 +};
22176 +var SubRuleSetTable = class extends ParsedData {
22177 + constructor(p22) {
22178 + super(p22);
22179 + this.subRuleCount = p22.uint16;
22180 + this.subRuleOffsets = [...new Array(this.subRuleCount)].map(
22181 + (_) => p22.Offset16
22182 + );
22183 + }
22184 + getSubRule(index2) {
22185 + let p22 = this.parser;
22186 + p22.currentPosition = this.start + this.subRuleOffsets[index2];
22187 + return new SubRuleTable(p22);
22188 + }
22189 +};
22190 +var SubRuleTable = class {
22191 + constructor(p22) {
22192 + this.glyphCount = p22.uint16;
22193 + this.substitutionCount = p22.uint16;
22194 + this.inputSequence = [...new Array(this.glyphCount - 1)].map(
22195 + (_) => p22.uint16
22196 + );
22197 + this.substLookupRecords = [
22198 + ...new Array(this.substitutionCount)
22199 + ].map((_) => new SubstLookupRecord(p22));
22200 + }
22201 +};
22202 +var SubClassSetTable = class extends ParsedData {
22203 + constructor(p22) {
22204 + super(p22);
22205 + this.subClassRuleCount = p22.uint16;
22206 + this.subClassRuleOffsets = [
22207 + ...new Array(this.subClassRuleCount)
22208 + ].map((_) => p22.Offset16);
22209 + }
22210 + getSubClass(index2) {
22211 + let p22 = this.parser;
22212 + p22.currentPosition = this.start + this.subClassRuleOffsets[index2];
22213 + return new SubClassRuleTable(p22);
22214 + }
22215 +};
22216 +var SubClassRuleTable = class extends SubRuleTable {
22217 + constructor(p22) {
22218 + super(p22);
22219 + }
22220 +};
22221 +var LookupType6$1 = class extends LookupType$1 {
22222 + constructor(p22) {
22223 + super(p22);
22224 + if (this.substFormat === 1) {
22225 + this.chainSubRuleSetCount = p22.uint16;
22226 + this.chainSubRuleSetOffsets = [
22227 + ...new Array(this.chainSubRuleSetCount)
22228 + ].map((_) => p22.Offset16);
22229 + }
22230 + if (this.substFormat === 2) {
22231 + this.backtrackClassDefOffset = p22.Offset16;
22232 + this.inputClassDefOffset = p22.Offset16;
22233 + this.lookaheadClassDefOffset = p22.Offset16;
22234 + this.chainSubClassSetCount = p22.uint16;
22235 + this.chainSubClassSetOffsets = [
22236 + ...new Array(this.chainSubClassSetCount)
22237 + ].map((_) => p22.Offset16);
22238 + }
22239 + if (this.substFormat === 3) {
22240 + undoCoverageOffsetParsing(this);
22241 + this.backtrackGlyphCount = p22.uint16;
22242 + this.backtrackCoverageOffsets = [
22243 + ...new Array(this.backtrackGlyphCount)
22244 + ].map((_) => p22.Offset16);
22245 + this.inputGlyphCount = p22.uint16;
22246 + this.inputCoverageOffsets = [
22247 + ...new Array(this.inputGlyphCount)
22248 + ].map((_) => p22.Offset16);
22249 + this.lookaheadGlyphCount = p22.uint16;
22250 + this.lookaheadCoverageOffsets = [
22251 + ...new Array(this.lookaheadGlyphCount)
22252 + ].map((_) => p22.Offset16);
22253 + this.seqLookupCount = p22.uint16;
22254 + this.seqLookupRecords = [
22255 + ...new Array(this.substitutionCount)
22256 + ].map((_) => new SequenceLookupRecord(p22));
22257 + }
22258 + }
22259 + getChainSubRuleSet(index2) {
22260 + if (this.substFormat !== 1)
22261 + throw new Error(
22262 + `lookup type 6.${this.substFormat} has no chainsubrule sets.`
22263 + );
22264 + let p22 = this.parser;
22265 + p22.currentPosition = this.start + this.chainSubRuleSetOffsets[index2];
22266 + return new ChainSubRuleSetTable(p22);
22267 + }
22268 + getChainSubClassSet(index2) {
22269 + if (this.substFormat !== 2)
22270 + throw new Error(
22271 + `lookup type 6.${this.substFormat} has no chainsubclass sets.`
22272 + );
22273 + let p22 = this.parser;
22274 + p22.currentPosition = this.start + this.chainSubClassSetOffsets[index2];
22275 + return new ChainSubClassSetTable(p22);
22276 + }
22277 + getCoverageFromOffset(offset4) {
22278 + if (this.substFormat !== 3)
22279 + throw new Error(
22280 + `lookup type 6.${this.substFormat} does not use contextual coverage offsets.`
22281 + );
22282 + let p22 = this.parser;
22283 + p22.currentPosition = this.start + offset4;
22284 + return new CoverageTable(p22);
22285 + }
22286 +};
22287 +var ChainSubRuleSetTable = class extends ParsedData {
22288 + constructor(p22) {
22289 + super(p22);
22290 + this.chainSubRuleCount = p22.uint16;
22291 + this.chainSubRuleOffsets = [
22292 + ...new Array(this.chainSubRuleCount)
22293 + ].map((_) => p22.Offset16);
22294 + }
22295 + getSubRule(index2) {
22296 + let p22 = this.parser;
22297 + p22.currentPosition = this.start + this.chainSubRuleOffsets[index2];
22298 + return new ChainSubRuleTable(p22);
22299 + }
22300 +};
22301 +var ChainSubRuleTable = class {
22302 + constructor(p22) {
22303 + this.backtrackGlyphCount = p22.uint16;
22304 + this.backtrackSequence = [
22305 + ...new Array(this.backtrackGlyphCount)
22306 + ].map((_) => p22.uint16);
22307 + this.inputGlyphCount = p22.uint16;
22308 + this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
22309 + (_) => p22.uint16
22310 + );
22311 + this.lookaheadGlyphCount = p22.uint16;
22312 + this.lookAheadSequence = [
22313 + ...new Array(this.lookAheadGlyphCount)
22314 + ].map((_) => p22.uint16);
22315 + this.substitutionCount = p22.uint16;
22316 + this.substLookupRecords = [...new Array(this.SubstCount)].map(
22317 + (_) => new SubstLookupRecord(p22)
22318 + );
22319 + }
22320 +};
22321 +var ChainSubClassSetTable = class extends ParsedData {
22322 + constructor(p22) {
22323 + super(p22);
22324 + this.chainSubClassRuleCount = p22.uint16;
22325 + this.chainSubClassRuleOffsets = [
22326 + ...new Array(this.chainSubClassRuleCount)
22327 + ].map((_) => p22.Offset16);
22328 + }
22329 + getSubClass(index2) {
22330 + let p22 = this.parser;
22331 + p22.currentPosition = this.start + this.chainSubRuleOffsets[index2];
22332 + return new ChainSubClassRuleTable(p22);
22333 + }
22334 +};
22335 +var ChainSubClassRuleTable = class {
22336 + constructor(p22) {
22337 + this.backtrackGlyphCount = p22.uint16;
22338 + this.backtrackSequence = [
22339 + ...new Array(this.backtrackGlyphCount)
22340 + ].map((_) => p22.uint16);
22341 + this.inputGlyphCount = p22.uint16;
22342 + this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
22343 + (_) => p22.uint16
22344 + );
22345 + this.lookaheadGlyphCount = p22.uint16;
22346 + this.lookAheadSequence = [
22347 + ...new Array(this.lookAheadGlyphCount)
22348 + ].map((_) => p22.uint16);
22349 + this.substitutionCount = p22.uint16;
22350 + this.substLookupRecords = [
22351 + ...new Array(this.substitutionCount)
22352 + ].map((_) => new SequenceLookupRecord(p22));
22353 + }
22354 +};
22355 +var SequenceLookupRecord = class extends ParsedData {
22356 + constructor(p22) {
22357 + super(p22);
22358 + this.sequenceIndex = p22.uint16;
22359 + this.lookupListIndex = p22.uint16;
22360 + }
22361 +};
22362 +var LookupType7$1 = class extends ParsedData {
22363 + constructor(p22) {
22364 + super(p22);
22365 + this.substFormat = p22.uint16;
22366 + this.extensionLookupType = p22.uint16;
22367 + this.extensionOffset = p22.Offset32;
22368 + }
22369 +};
22370 +var LookupType8$1 = class extends LookupType$1 {
22371 + constructor(p22) {
22372 + super(p22);
22373 + this.backtrackGlyphCount = p22.uint16;
22374 + this.backtrackCoverageOffsets = [
22375 + ...new Array(this.backtrackGlyphCount)
22376 + ].map((_) => p22.Offset16);
22377 + this.lookaheadGlyphCount = p22.uint16;
22378 + this.lookaheadCoverageOffsets = [
22379 + new Array(this.lookaheadGlyphCount)
22380 + ].map((_) => p22.Offset16);
22381 + this.glyphCount = p22.uint16;
22382 + this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
22383 + (_) => p22.uint16
22384 + );
22385 + }
22386 +};
22387 +var GSUBtables = {
22388 + buildSubtable: function(type, p22) {
22389 + const subtable = new [
22390 + void 0,
22391 + LookupType1$1,
22392 + LookupType2$1,
22393 + LookupType3$1,
22394 + LookupType4$1,
22395 + LookupType5$1,
22396 + LookupType6$1,
22397 + LookupType7$1,
22398 + LookupType8$1
22399 + ][type](p22);
22400 + subtable.type = type;
22401 + return subtable;
22402 + }
22403 +};
22404 +var LookupType = class extends ParsedData {
22405 + constructor(p22) {
22406 + super(p22);
22407 + }
22408 +};
22409 +var LookupType1 = class extends LookupType {
22410 + constructor(p22) {
22411 + super(p22);
22412 + console.log(`lookup type 1`);
22413 + }
22414 +};
22415 +var LookupType2 = class extends LookupType {
22416 + constructor(p22) {
22417 + super(p22);
22418 + console.log(`lookup type 2`);
22419 + }
22420 +};
22421 +var LookupType3 = class extends LookupType {
22422 + constructor(p22) {
22423 + super(p22);
22424 + console.log(`lookup type 3`);
22425 + }
22426 +};
22427 +var LookupType4 = class extends LookupType {
22428 + constructor(p22) {
22429 + super(p22);
22430 + console.log(`lookup type 4`);
22431 + }
22432 +};
22433 +var LookupType5 = class extends LookupType {
22434 + constructor(p22) {
22435 + super(p22);
22436 + console.log(`lookup type 5`);
22437 + }
22438 +};
22439 +var LookupType6 = class extends LookupType {
22440 + constructor(p22) {
22441 + super(p22);
22442 + console.log(`lookup type 6`);
22443 + }
22444 +};
22445 +var LookupType7 = class extends LookupType {
22446 + constructor(p22) {
22447 + super(p22);
22448 + console.log(`lookup type 7`);
22449 + }
22450 +};
22451 +var LookupType8 = class extends LookupType {
22452 + constructor(p22) {
22453 + super(p22);
22454 + console.log(`lookup type 8`);
22455 + }
22456 +};
22457 +var LookupType9 = class extends LookupType {
22458 + constructor(p22) {
22459 + super(p22);
22460 + console.log(`lookup type 9`);
22461 + }
22462 +};
22463 +var GPOStables = {
22464 + buildSubtable: function(type, p22) {
22465 + const subtable = new [
22466 + void 0,
22467 + LookupType1,
22468 + LookupType2,
22469 + LookupType3,
22470 + LookupType4,
22471 + LookupType5,
22472 + LookupType6,
22473 + LookupType7,
22474 + LookupType8,
22475 + LookupType9
22476 + ][type](p22);
22477 + subtable.type = type;
22478 + return subtable;
22479 + }
22480 +};
22481 +var LookupList = class extends ParsedData {
22482 + static EMPTY = { lookupCount: 0, lookups: [] };
22483 + constructor(p22) {
22484 + super(p22);
22485 + this.lookupCount = p22.uint16;
22486 + this.lookups = [...new Array(this.lookupCount)].map(
22487 + (_) => p22.Offset16
22488 + );
22489 + }
22490 +};
22491 +var LookupTable = class extends ParsedData {
22492 + constructor(p22, type) {
22493 + super(p22);
22494 + this.ctType = type;
22495 + this.lookupType = p22.uint16;
22496 + this.lookupFlag = p22.uint16;
22497 + this.subTableCount = p22.uint16;
22498 + this.subtableOffsets = [...new Array(this.subTableCount)].map(
22499 + (_) => p22.Offset16
22500 + );
22501 + this.markFilteringSet = p22.uint16;
22502 + }
22503 + get rightToLeft() {
22504 + return this.lookupFlag & true;
22505 + }
22506 + get ignoreBaseGlyphs() {
22507 + return this.lookupFlag & true;
22508 + }
22509 + get ignoreLigatures() {
22510 + return this.lookupFlag & true;
22511 + }
22512 + get ignoreMarks() {
22513 + return this.lookupFlag & true;
22514 + }
22515 + get useMarkFilteringSet() {
22516 + return this.lookupFlag & true;
22517 + }
22518 + get markAttachmentType() {
22519 + return this.lookupFlag & true;
22520 + }
22521 + getSubTable(index2) {
22522 + const builder = this.ctType === `GSUB` ? GSUBtables : GPOStables;
22523 + this.parser.currentPosition = this.start + this.subtableOffsets[index2];
22524 + return builder.buildSubtable(this.lookupType, this.parser);
22525 + }
22526 +};
22527 +var CommonLayoutTable = class extends SimpleTable {
22528 + constructor(dict, dataview, name2) {
22529 + const { p: p22, tableStart } = super(dict, dataview, name2);
22530 + this.majorVersion = p22.uint16;
22531 + this.minorVersion = p22.uint16;
22532 + this.scriptListOffset = p22.Offset16;
22533 + this.featureListOffset = p22.Offset16;
22534 + this.lookupListOffset = p22.Offset16;
22535 + if (this.majorVersion === 1 && this.minorVersion === 1) {
22536 + this.featureVariationsOffset = p22.Offset32;
22537 + }
22538 + const no_content = !(this.scriptListOffset || this.featureListOffset || this.lookupListOffset);
22539 + lazy$1(this, `scriptList`, () => {
22540 + if (no_content) return ScriptList.EMPTY;
22541 + p22.currentPosition = tableStart + this.scriptListOffset;
22542 + return new ScriptList(p22);
22543 + });
22544 + lazy$1(this, `featureList`, () => {
22545 + if (no_content) return FeatureList.EMPTY;
22546 + p22.currentPosition = tableStart + this.featureListOffset;
22547 + return new FeatureList(p22);
22548 + });
22549 + lazy$1(this, `lookupList`, () => {
22550 + if (no_content) return LookupList.EMPTY;
22551 + p22.currentPosition = tableStart + this.lookupListOffset;
22552 + return new LookupList(p22);
22553 + });
22554 + if (this.featureVariationsOffset) {
22555 + lazy$1(this, `featureVariations`, () => {
22556 + if (no_content) return FeatureVariations.EMPTY;
22557 + p22.currentPosition = tableStart + this.featureVariationsOffset;
22558 + return new FeatureVariations(p22);
22559 + });
22560 + }
22561 + }
22562 + getSupportedScripts() {
22563 + return this.scriptList.scriptRecords.map((r2) => r2.scriptTag);
22564 + }
22565 + getScriptTable(scriptTag) {
22566 + let record = this.scriptList.scriptRecords.find(
22567 + (r2) => r2.scriptTag === scriptTag
22568 + );
22569 + this.parser.currentPosition = this.scriptList.start + record.scriptOffset;
22570 + let table = new ScriptTable(this.parser);
22571 + table.scriptTag = scriptTag;
22572 + return table;
22573 + }
22574 + ensureScriptTable(arg) {
22575 + if (typeof arg === "string") {
22576 + return this.getScriptTable(arg);
22577 + }
22578 + return arg;
22579 + }
22580 + getSupportedLangSys(scriptTable) {
22581 + scriptTable = this.ensureScriptTable(scriptTable);
22582 + const hasDefault = scriptTable.defaultLangSys !== 0;
22583 + const supported = scriptTable.langSysRecords.map(
22584 + (l2) => l2.langSysTag
22585 + );
22586 + if (hasDefault) supported.unshift(`dflt`);
22587 + return supported;
22588 + }
22589 + getDefaultLangSysTable(scriptTable) {
22590 + scriptTable = this.ensureScriptTable(scriptTable);
22591 + let offset4 = scriptTable.defaultLangSys;
22592 + if (offset4 !== 0) {
22593 + this.parser.currentPosition = scriptTable.start + offset4;
22594 + let table = new LangSysTable(this.parser);
22595 + table.langSysTag = ``;
22596 + table.defaultForScript = scriptTable.scriptTag;
22597 + return table;
22598 + }
22599 + }
22600 + getLangSysTable(scriptTable, langSysTag = `dflt`) {
22601 + if (langSysTag === `dflt`)
22602 + return this.getDefaultLangSysTable(scriptTable);
22603 + scriptTable = this.ensureScriptTable(scriptTable);
22604 + let record = scriptTable.langSysRecords.find(
22605 + (l2) => l2.langSysTag === langSysTag
22606 + );
22607 + this.parser.currentPosition = scriptTable.start + record.langSysOffset;
22608 + let table = new LangSysTable(this.parser);
22609 + table.langSysTag = langSysTag;
22610 + return table;
22611 + }
22612 + getFeatures(langSysTable) {
22613 + return langSysTable.featureIndices.map(
22614 + (index2) => this.getFeature(index2)
22615 + );
22616 + }
22617 + getFeature(indexOrTag) {
22618 + let record;
22619 + if (parseInt(indexOrTag) == indexOrTag) {
22620 + record = this.featureList.featureRecords[indexOrTag];
22621 + } else {
22622 + record = this.featureList.featureRecords.find(
22623 + (f) => f.featureTag === indexOrTag
22624 + );
22625 + }
22626 + if (!record) return;
22627 + this.parser.currentPosition = this.featureList.start + record.featureOffset;
22628 + let table = new FeatureTable(this.parser);
22629 + table.featureTag = record.featureTag;
22630 + return table;
22631 + }
22632 + getLookups(featureTable) {
22633 + return featureTable.lookupListIndices.map(
22634 + (index2) => this.getLookup(index2)
22635 + );
22636 + }
22637 + getLookup(lookupIndex, type) {
22638 + let lookupOffset = this.lookupList.lookups[lookupIndex];
22639 + this.parser.currentPosition = this.lookupList.start + lookupOffset;
22640 + return new LookupTable(this.parser, type);
22641 + }
22642 +};
22643 +var GSUB = class extends CommonLayoutTable {
22644 + constructor(dict, dataview) {
22645 + super(dict, dataview, `GSUB`);
22646 + }
22647 + getLookup(lookupIndex) {
22648 + return super.getLookup(lookupIndex, `GSUB`);
22649 + }
22650 +};
22651 +var GSUB$1 = Object.freeze({ __proto__: null, GSUB });
22652 +var GPOS = class extends CommonLayoutTable {
22653 + constructor(dict, dataview) {
22654 + super(dict, dataview, `GPOS`);
22655 + }
22656 + getLookup(lookupIndex) {
22657 + return super.getLookup(lookupIndex, `GPOS`);
22658 + }
22659 +};
22660 +var GPOS$1 = Object.freeze({ __proto__: null, GPOS });
22661 +var SVG3 = class extends SimpleTable {
22662 + constructor(dict, dataview) {
22663 + const { p: p22 } = super(dict, dataview);
22664 + this.version = p22.uint16;
22665 + this.offsetToSVGDocumentList = p22.Offset32;
22666 + p22.currentPosition = this.tableStart + this.offsetToSVGDocumentList;
22667 + this.documentList = new SVGDocumentList(p22);
22668 + }
22669 +};
22670 +var SVGDocumentList = class extends ParsedData {
22671 + constructor(p22) {
22672 + super(p22);
22673 + this.numEntries = p22.uint16;
22674 + this.documentRecords = [...new Array(this.numEntries)].map(
22675 + (_) => new SVGDocumentRecord(p22)
22676 + );
22677 + }
22678 + getDocument(documentID) {
22679 + let record = this.documentRecords[documentID];
22680 + if (!record) return "";
22681 + let offset4 = this.start + record.svgDocOffset;
22682 + this.parser.currentPosition = offset4;
22683 + return this.parser.readBytes(record.svgDocLength);
22684 + }
22685 + getDocumentForGlyph(glyphID) {
22686 + let id = this.documentRecords.findIndex(
22687 + (d) => d.startGlyphID <= glyphID && glyphID <= d.endGlyphID
22688 + );
22689 + if (id === -1) return "";
22690 + return this.getDocument(id);
22691 + }
22692 +};
22693 +var SVGDocumentRecord = class {
22694 + constructor(p22) {
22695 + this.startGlyphID = p22.uint16;
22696 + this.endGlyphID = p22.uint16;
22697 + this.svgDocOffset = p22.Offset32;
22698 + this.svgDocLength = p22.uint32;
22699 + }
22700 +};
22701 +var SVG$1 = Object.freeze({ __proto__: null, SVG: SVG3 });
22702 +var fvar = class extends SimpleTable {
22703 + constructor(dict, dataview) {
22704 + const { p: p22 } = super(dict, dataview);
22705 + this.majorVersion = p22.uint16;
22706 + this.minorVersion = p22.uint16;
22707 + this.axesArrayOffset = p22.Offset16;
22708 + p22.uint16;
22709 + this.axisCount = p22.uint16;
22710 + this.axisSize = p22.uint16;
22711 + this.instanceCount = p22.uint16;
22712 + this.instanceSize = p22.uint16;
22713 + const axisStart = this.tableStart + this.axesArrayOffset;
22714 + lazy$1(this, `axes`, () => {
22715 + p22.currentPosition = axisStart;
22716 + return [...new Array(this.axisCount)].map(
22717 + (_) => new VariationAxisRecord(p22)
22718 + );
22719 + });
22720 + const instanceStart = axisStart + this.axisCount * this.axisSize;
22721 + lazy$1(this, `instances`, () => {
22722 + let instances = [];
22723 + for (let i = 0; i < this.instanceCount; i++) {
22724 + p22.currentPosition = instanceStart + i * this.instanceSize;
22725 + instances.push(
22726 + new InstanceRecord(p22, this.axisCount, this.instanceSize)
22727 + );
22728 + }
22729 + return instances;
22730 + });
22731 + }
22732 + getSupportedAxes() {
22733 + return this.axes.map((a) => a.tag);
22734 + }
22735 + getAxis(name2) {
22736 + return this.axes.find((a) => a.tag === name2);
22737 + }
22738 +};
22739 +var VariationAxisRecord = class {
22740 + constructor(p22) {
22741 + this.tag = p22.tag;
22742 + this.minValue = p22.fixed;
22743 + this.defaultValue = p22.fixed;
22744 + this.maxValue = p22.fixed;
22745 + this.flags = p22.flags(16);
22746 + this.axisNameID = p22.uint16;
22747 + }
22748 +};
22749 +var InstanceRecord = class {
22750 + constructor(p22, axisCount, size4) {
22751 + let start = p22.currentPosition;
22752 + this.subfamilyNameID = p22.uint16;
22753 + p22.uint16;
22754 + this.coordinates = [...new Array(axisCount)].map(
22755 + (_) => p22.fixed
22756 + );
22757 + if (p22.currentPosition - start < size4) {
22758 + this.postScriptNameID = p22.uint16;
22759 + }
22760 + }
22761 +};
22762 +var fvar$1 = Object.freeze({ __proto__: null, fvar });
22763 +var cvt = class extends SimpleTable {
22764 + constructor(dict, dataview) {
22765 + const { p: p22 } = super(dict, dataview);
22766 + const n = dict.length / 2;
22767 + lazy$1(
22768 + this,
22769 + `items`,
22770 + () => [...new Array(n)].map((_) => p22.fword)
22771 + );
22772 + }
22773 +};
22774 +var cvt$1 = Object.freeze({ __proto__: null, cvt });
22775 +var fpgm = class extends SimpleTable {
22776 + constructor(dict, dataview) {
22777 + const { p: p22 } = super(dict, dataview);
22778 + lazy$1(
22779 + this,
22780 + `instructions`,
22781 + () => [...new Array(dict.length)].map((_) => p22.uint8)
22782 + );
22783 + }
22784 +};
22785 +var fpgm$1 = Object.freeze({ __proto__: null, fpgm });
22786 +var gasp = class extends SimpleTable {
22787 + constructor(dict, dataview) {
22788 + const { p: p22 } = super(dict, dataview);
22789 + this.version = p22.uint16;
22790 + this.numRanges = p22.uint16;
22791 + const getter = () => [...new Array(this.numRanges)].map(
22792 + (_) => new GASPRange(p22)
22793 + );
22794 + lazy$1(this, `gaspRanges`, getter);
22795 + }
22796 +};
22797 +var GASPRange = class {
22798 + constructor(p22) {
22799 + this.rangeMaxPPEM = p22.uint16;
22800 + this.rangeGaspBehavior = p22.uint16;
22801 + }
22802 +};
22803 +var gasp$1 = Object.freeze({ __proto__: null, gasp });
22804 +var glyf = class extends SimpleTable {
22805 + constructor(dict, dataview) {
22806 + super(dict, dataview);
22807 + }
22808 + getGlyphData(offset4, length) {
22809 + this.parser.currentPosition = this.tableStart + offset4;
22810 + return this.parser.readBytes(length);
22811 + }
22812 +};
22813 +var glyf$1 = Object.freeze({ __proto__: null, glyf });
22814 +var loca = class extends SimpleTable {
22815 + constructor(dict, dataview, tables) {
22816 + const { p: p22 } = super(dict, dataview);
22817 + const n = tables.maxp.numGlyphs + 1;
22818 + if (tables.head.indexToLocFormat === 0) {
22819 + this.x2 = true;
22820 + lazy$1(
22821 + this,
22822 + `offsets`,
22823 + () => [...new Array(n)].map((_) => p22.Offset16)
22824 + );
22825 + } else {
22826 + lazy$1(
22827 + this,
22828 + `offsets`,
22829 + () => [...new Array(n)].map((_) => p22.Offset32)
22830 + );
22831 + }
22832 + }
22833 + getGlyphDataOffsetAndLength(glyphID) {
22834 + let offset4 = this.offsets[glyphID] * this.x2 ? 2 : 1;
22835 + let nextOffset = this.offsets[glyphID + 1] * this.x2 ? 2 : 1;
22836 + return { offset: offset4, length: nextOffset - offset4 };
22837 + }
22838 +};
22839 +var loca$1 = Object.freeze({ __proto__: null, loca });
22840 +var prep = class extends SimpleTable {
22841 + constructor(dict, dataview) {
22842 + const { p: p22 } = super(dict, dataview);
22843 + lazy$1(
22844 + this,
22845 + `instructions`,
22846 + () => [...new Array(dict.length)].map((_) => p22.uint8)
22847 + );
22848 + }
22849 +};
22850 +var prep$1 = Object.freeze({ __proto__: null, prep });
22851 +var CFF = class extends SimpleTable {
22852 + constructor(dict, dataview) {
22853 + const { p: p22 } = super(dict, dataview);
22854 + lazy$1(this, `data`, () => p22.readBytes());
22855 + }
22856 +};
22857 +var CFF$1 = Object.freeze({ __proto__: null, CFF });
22858 +var CFF2 = class extends SimpleTable {
22859 + constructor(dict, dataview) {
22860 + const { p: p22 } = super(dict, dataview);
22861 + lazy$1(this, `data`, () => p22.readBytes());
22862 + }
22863 +};
22864 +var CFF2$1 = Object.freeze({ __proto__: null, CFF2 });
22865 +var VORG = class extends SimpleTable {
22866 + constructor(dict, dataview) {
22867 + const { p: p22 } = super(dict, dataview);
22868 + this.majorVersion = p22.uint16;
22869 + this.minorVersion = p22.uint16;
22870 + this.defaultVertOriginY = p22.int16;
22871 + this.numVertOriginYMetrics = p22.uint16;
22872 + lazy$1(
22873 + this,
22874 + `vertORiginYMetrics`,
22875 + () => [...new Array(this.numVertOriginYMetrics)].map(
22876 + (_) => new VertOriginYMetric(p22)
22877 + )
22878 + );
22879 + }
22880 +};
22881 +var VertOriginYMetric = class {
22882 + constructor(p22) {
22883 + this.glyphIndex = p22.uint16;
22884 + this.vertOriginY = p22.int16;
22885 + }
22886 +};
22887 +var VORG$1 = Object.freeze({ __proto__: null, VORG });
22888 +var BitmapSize = class {
22889 + constructor(p22) {
22890 + this.indexSubTableArrayOffset = p22.Offset32;
22891 + this.indexTablesSize = p22.uint32;
22892 + this.numberofIndexSubTables = p22.uint32;
22893 + this.colorRef = p22.uint32;
22894 + this.hori = new SbitLineMetrics(p22);
22895 + this.vert = new SbitLineMetrics(p22);
22896 + this.startGlyphIndex = p22.uint16;
22897 + this.endGlyphIndex = p22.uint16;
22898 + this.ppemX = p22.uint8;
22899 + this.ppemY = p22.uint8;
22900 + this.bitDepth = p22.uint8;
22901 + this.flags = p22.int8;
22902 + }
22903 +};
22904 +var BitmapScale = class {
22905 + constructor(p22) {
22906 + this.hori = new SbitLineMetrics(p22);
22907 + this.vert = new SbitLineMetrics(p22);
22908 + this.ppemX = p22.uint8;
22909 + this.ppemY = p22.uint8;
22910 + this.substitutePpemX = p22.uint8;
22911 + this.substitutePpemY = p22.uint8;
22912 + }
22913 +};
22914 +var SbitLineMetrics = class {
22915 + constructor(p22) {
22916 + this.ascender = p22.int8;
22917 + this.descender = p22.int8;
22918 + this.widthMax = p22.uint8;
22919 + this.caretSlopeNumerator = p22.int8;
22920 + this.caretSlopeDenominator = p22.int8;
22921 + this.caretOffset = p22.int8;
22922 + this.minOriginSB = p22.int8;
22923 + this.minAdvanceSB = p22.int8;
22924 + this.maxBeforeBL = p22.int8;
22925 + this.minAfterBL = p22.int8;
22926 + this.pad1 = p22.int8;
22927 + this.pad2 = p22.int8;
22928 + }
22929 +};
22930 +var EBLC = class extends SimpleTable {
22931 + constructor(dict, dataview, name2) {
22932 + const { p: p22 } = super(dict, dataview, name2);
22933 + this.majorVersion = p22.uint16;
22934 + this.minorVersion = p22.uint16;
22935 + this.numSizes = p22.uint32;
22936 + lazy$1(
22937 + this,
22938 + `bitMapSizes`,
22939 + () => [...new Array(this.numSizes)].map(
22940 + (_) => new BitmapSize(p22)
22941 + )
22942 + );
22943 + }
22944 +};
22945 +var EBLC$1 = Object.freeze({ __proto__: null, EBLC });
22946 +var EBDT = class extends SimpleTable {
22947 + constructor(dict, dataview, name2) {
22948 + const { p: p22 } = super(dict, dataview, name2);
22949 + this.majorVersion = p22.uint16;
22950 + this.minorVersion = p22.uint16;
22951 + }
22952 +};
22953 +var EBDT$1 = Object.freeze({ __proto__: null, EBDT });
22954 +var EBSC = class extends SimpleTable {
22955 + constructor(dict, dataview) {
22956 + const { p: p22 } = super(dict, dataview);
22957 + this.majorVersion = p22.uint16;
22958 + this.minorVersion = p22.uint16;
22959 + this.numSizes = p22.uint32;
22960 + lazy$1(
22961 + this,
22962 + `bitmapScales`,
22963 + () => [...new Array(this.numSizes)].map(
22964 + (_) => new BitmapScale(p22)
22965 + )
22966 + );
22967 + }
22968 +};
22969 +var EBSC$1 = Object.freeze({ __proto__: null, EBSC });
22970 +var CBLC = class extends EBLC {
22971 + constructor(dict, dataview) {
22972 + super(dict, dataview, `CBLC`);
22973 + }
22974 +};
22975 +var CBLC$1 = Object.freeze({ __proto__: null, CBLC });
22976 +var CBDT = class extends EBDT {
22977 + constructor(dict, dataview) {
22978 + super(dict, dataview, `CBDT`);
22979 + }
22980 +};
22981 +var CBDT$1 = Object.freeze({ __proto__: null, CBDT });
22982 +var sbix = class extends SimpleTable {
22983 + constructor(dict, dataview) {
22984 + const { p: p22 } = super(dict, dataview);
22985 + this.version = p22.uint16;
22986 + this.flags = p22.flags(16);
22987 + this.numStrikes = p22.uint32;
22988 + lazy$1(
22989 + this,
22990 + `strikeOffsets`,
22991 + () => [...new Array(this.numStrikes)].map((_) => p22.Offset32)
22992 + );
22993 + }
22994 +};
22995 +var sbix$1 = Object.freeze({ __proto__: null, sbix });
22996 +var COLR = class extends SimpleTable {
22997 + constructor(dict, dataview) {
22998 + const { p: p22 } = super(dict, dataview);
22999 + this.version = p22.uint16;
23000 + this.numBaseGlyphRecords = p22.uint16;
23001 + this.baseGlyphRecordsOffset = p22.Offset32;
23002 + this.layerRecordsOffset = p22.Offset32;
23003 + this.numLayerRecords = p22.uint16;
23004 + }
23005 + getBaseGlyphRecord(glyphID) {
23006 + let start = this.tableStart + this.baseGlyphRecordsOffset;
23007 + this.parser.currentPosition = start;
23008 + let first = new BaseGlyphRecord(this.parser);
23009 + let firstID = first.gID;
23010 + let end = this.tableStart + this.layerRecordsOffset - 6;
23011 + this.parser.currentPosition = end;
23012 + let last = new BaseGlyphRecord(this.parser);
23013 + let lastID = last.gID;
23014 + if (firstID === glyphID) return first;
23015 + if (lastID === glyphID) return last;
23016 + while (true) {
23017 + if (start === end) break;
23018 + let mid = start + (end - start) / 12;
23019 + this.parser.currentPosition = mid;
23020 + let middle = new BaseGlyphRecord(this.parser);
23021 + let midID = middle.gID;
23022 + if (midID === glyphID) return middle;
23023 + else if (midID > glyphID) {
23024 + end = mid;
23025 + } else if (midID < glyphID) {
23026 + start = mid;
23027 + }
23028 + }
23029 + return false;
23030 + }
23031 + getLayers(glyphID) {
23032 + let record = this.getBaseGlyphRecord(glyphID);
23033 + this.parser.currentPosition = this.tableStart + this.layerRecordsOffset + 4 * record.firstLayerIndex;
23034 + return [...new Array(record.numLayers)].map(
23035 + (_) => new LayerRecord(p)
23036 + );
23037 + }
23038 +};
23039 +var BaseGlyphRecord = class {
23040 + constructor(p22) {
23041 + this.gID = p22.uint16;
23042 + this.firstLayerIndex = p22.uint16;
23043 + this.numLayers = p22.uint16;
23044 + }
23045 +};
23046 +var LayerRecord = class {
23047 + constructor(p22) {
23048 + this.gID = p22.uint16;
23049 + this.paletteIndex = p22.uint16;
23050 + }
23051 +};
23052 +var COLR$1 = Object.freeze({ __proto__: null, COLR });
23053 +var CPAL = class extends SimpleTable {
23054 + constructor(dict, dataview) {
23055 + const { p: p22 } = super(dict, dataview);
23056 + this.version = p22.uint16;
23057 + this.numPaletteEntries = p22.uint16;
23058 + const numPalettes = this.numPalettes = p22.uint16;
23059 + this.numColorRecords = p22.uint16;
23060 + this.offsetFirstColorRecord = p22.Offset32;
23061 + this.colorRecordIndices = [...new Array(this.numPalettes)].map(
23062 + (_) => p22.uint16
23063 + );
23064 + lazy$1(this, `colorRecords`, () => {
23065 + p22.currentPosition = this.tableStart + this.offsetFirstColorRecord;
23066 + return [...new Array(this.numColorRecords)].map(
23067 + (_) => new ColorRecord(p22)
23068 + );
23069 + });
23070 + if (this.version === 1) {
23071 + this.offsetPaletteTypeArray = p22.Offset32;
23072 + this.offsetPaletteLabelArray = p22.Offset32;
23073 + this.offsetPaletteEntryLabelArray = p22.Offset32;
23074 + lazy$1(this, `paletteTypeArray`, () => {
23075 + p22.currentPosition = this.tableStart + this.offsetPaletteTypeArray;
23076 + return new PaletteTypeArray(p22, numPalettes);
23077 + });
23078 + lazy$1(this, `paletteLabelArray`, () => {
23079 + p22.currentPosition = this.tableStart + this.offsetPaletteLabelArray;
23080 + return new PaletteLabelsArray(p22, numPalettes);
23081 + });
23082 + lazy$1(this, `paletteEntryLabelArray`, () => {
23083 + p22.currentPosition = this.tableStart + this.offsetPaletteEntryLabelArray;
23084 + return new PaletteEntryLabelArray(p22, numPalettes);
23085 + });
23086 + }
23087 + }
23088 +};
23089 +var ColorRecord = class {
23090 + constructor(p22) {
23091 + this.blue = p22.uint8;
23092 + this.green = p22.uint8;
23093 + this.red = p22.uint8;
23094 + this.alpha = p22.uint8;
23095 + }
23096 +};
23097 +var PaletteTypeArray = class {
23098 + constructor(p22, numPalettes) {
23099 + this.paletteTypes = [...new Array(numPalettes)].map(
23100 + (_) => p22.uint32
23101 + );
23102 + }
23103 +};
23104 +var PaletteLabelsArray = class {
23105 + constructor(p22, numPalettes) {
23106 + this.paletteLabels = [...new Array(numPalettes)].map(
23107 + (_) => p22.uint16
23108 + );
23109 + }
23110 +};
23111 +var PaletteEntryLabelArray = class {
23112 + constructor(p22, numPalettes) {
23113 + this.paletteEntryLabels = [...new Array(numPalettes)].map(
23114 + (_) => p22.uint16
23115 + );
23116 + }
23117 +};
23118 +var CPAL$1 = Object.freeze({ __proto__: null, CPAL });
23119 +var DSIG = class extends SimpleTable {
23120 + constructor(dict, dataview) {
23121 + const { p: p22 } = super(dict, dataview);
23122 + this.version = p22.uint32;
23123 + this.numSignatures = p22.uint16;
23124 + this.flags = p22.uint16;
23125 + this.signatureRecords = [...new Array(this.numSignatures)].map(
23126 + (_) => new SignatureRecord(p22)
23127 + );
23128 + }
23129 + getData(signatureID) {
23130 + const record = this.signatureRecords[signatureID];
23131 + this.parser.currentPosition = this.tableStart + record.offset;
23132 + return new SignatureBlockFormat1(this.parser);
23133 + }
23134 +};
23135 +var SignatureRecord = class {
23136 + constructor(p22) {
23137 + this.format = p22.uint32;
23138 + this.length = p22.uint32;
23139 + this.offset = p22.Offset32;
23140 + }
23141 +};
23142 +var SignatureBlockFormat1 = class {
23143 + constructor(p22) {
23144 + p22.uint16;
23145 + p22.uint16;
23146 + this.signatureLength = p22.uint32;
23147 + this.signature = p22.readBytes(this.signatureLength);
23148 + }
23149 +};
23150 +var DSIG$1 = Object.freeze({ __proto__: null, DSIG });
23151 +var hdmx = class extends SimpleTable {
23152 + constructor(dict, dataview, tables) {
23153 + const { p: p22 } = super(dict, dataview);
23154 + const numGlyphs = tables.hmtx.numGlyphs;
23155 + this.version = p22.uint16;
23156 + this.numRecords = p22.int16;
23157 + this.sizeDeviceRecord = p22.int32;
23158 + this.records = [...new Array(numRecords)].map(
23159 + (_) => new DeviceRecord(p22, numGlyphs)
23160 + );
23161 + }
23162 +};
23163 +var DeviceRecord = class {
23164 + constructor(p22, numGlyphs) {
23165 + this.pixelSize = p22.uint8;
23166 + this.maxWidth = p22.uint8;
23167 + this.widths = p22.readBytes(numGlyphs);
23168 + }
23169 +};
23170 +var hdmx$1 = Object.freeze({ __proto__: null, hdmx });
23171 +var kern = class extends SimpleTable {
23172 + constructor(dict, dataview) {
23173 + const { p: p22 } = super(dict, dataview);
23174 + this.version = p22.uint16;
23175 + this.nTables = p22.uint16;
23176 + lazy$1(this, `tables`, () => {
23177 + let offset4 = this.tableStart + 4;
23178 + const tables = [];
23179 + for (let i = 0; i < this.nTables; i++) {
23180 + p22.currentPosition = offset4;
23181 + let subtable = new KernSubTable(p22);
23182 + tables.push(subtable);
23183 + offset4 += subtable;
23184 + }
23185 + return tables;
23186 + });
23187 + }
23188 +};
23189 +var KernSubTable = class {
23190 + constructor(p22) {
23191 + this.version = p22.uint16;
23192 + this.length = p22.uint16;
23193 + this.coverage = p22.flags(8);
23194 + this.format = p22.uint8;
23195 + if (this.format === 0) {
23196 + this.nPairs = p22.uint16;
23197 + this.searchRange = p22.uint16;
23198 + this.entrySelector = p22.uint16;
23199 + this.rangeShift = p22.uint16;
23200 + lazy$1(
23201 + this,
23202 + `pairs`,
23203 + () => [...new Array(this.nPairs)].map((_) => new Pair(p22))
23204 + );
23205 + }
23206 + if (this.format === 2) {
23207 + console.warn(
23208 + `Kern subtable format 2 is not supported: this parser currently only parses universal table data.`
23209 + );
23210 + }
23211 + }
23212 + get horizontal() {
23213 + return this.coverage[0];
23214 + }
23215 + get minimum() {
23216 + return this.coverage[1];
23217 + }
23218 + get crossstream() {
23219 + return this.coverage[2];
23220 + }
23221 + get override() {
23222 + return this.coverage[3];
23223 + }
23224 +};
23225 +var Pair = class {
23226 + constructor(p22) {
23227 + this.left = p22.uint16;
23228 + this.right = p22.uint16;
23229 + this.value = p22.fword;
23230 + }
23231 +};
23232 +var kern$1 = Object.freeze({ __proto__: null, kern });
23233 +var LTSH = class extends SimpleTable {
23234 + constructor(dict, dataview) {
23235 + const { p: p22 } = super(dict, dataview);
23236 + this.version = p22.uint16;
23237 + this.numGlyphs = p22.uint16;
23238 + this.yPels = p22.readBytes(this.numGlyphs);
23239 + }
23240 +};
23241 +var LTSH$1 = Object.freeze({ __proto__: null, LTSH });
23242 +var MERG = class extends SimpleTable {
23243 + constructor(dict, dataview) {
23244 + const { p: p22 } = super(dict, dataview);
23245 + this.version = p22.uint16;
23246 + this.mergeClassCount = p22.uint16;
23247 + this.mergeDataOffset = p22.Offset16;
23248 + this.classDefCount = p22.uint16;
23249 + this.offsetToClassDefOffsets = p22.Offset16;
23250 + lazy$1(
23251 + this,
23252 + `mergeEntryMatrix`,
23253 + () => [...new Array(this.mergeClassCount)].map(
23254 + (_) => p22.readBytes(this.mergeClassCount)
23255 + )
23256 + );
23257 + console.warn(`Full MERG parsing is currently not supported.`);
23258 + console.warn(
23259 + `If you need this table parsed, please file an issue, or better yet, a PR.`
23260 + );
23261 + }
23262 +};
23263 +var MERG$1 = Object.freeze({ __proto__: null, MERG });
23264 +var meta = class extends SimpleTable {
23265 + constructor(dict, dataview) {
23266 + const { p: p22 } = super(dict, dataview);
23267 + this.version = p22.uint32;
23268 + this.flags = p22.uint32;
23269 + p22.uint32;
23270 + this.dataMapsCount = p22.uint32;
23271 + this.dataMaps = [...new Array(this.dataMapsCount)].map(
23272 + (_) => new DataMap(this.tableStart, p22)
23273 + );
23274 + }
23275 +};
23276 +var DataMap = class {
23277 + constructor(tableStart, p22) {
23278 + this.tableStart = tableStart;
23279 + this.parser = p22;
23280 + this.tag = p22.tag;
23281 + this.dataOffset = p22.Offset32;
23282 + this.dataLength = p22.uint32;
23283 + }
23284 + getData() {
23285 + this.parser.currentField = this.tableStart + this.dataOffset;
23286 + return this.parser.readBytes(this.dataLength);
23287 + }
23288 +};
23289 +var meta$1 = Object.freeze({ __proto__: null, meta });
23290 +var PCLT = class extends SimpleTable {
23291 + constructor(dict, dataview) {
23292 + super(dict, dataview);
23293 + console.warn(
23294 + `This font uses a PCLT table, which is currently not supported by this parser.`
23295 + );
23296 + console.warn(
23297 + `If you need this table parsed, please file an issue, or better yet, a PR.`
23298 + );
23299 + }
23300 +};
23301 +var PCLT$1 = Object.freeze({ __proto__: null, PCLT });
23302 +var VDMX = class extends SimpleTable {
23303 + constructor(dict, dataview) {
23304 + const { p: p22 } = super(dict, dataview);
23305 + this.version = p22.uint16;
23306 + this.numRecs = p22.uint16;
23307 + this.numRatios = p22.uint16;
23308 + this.ratRanges = [...new Array(this.numRatios)].map(
23309 + (_) => new RatioRange(p22)
23310 + );
23311 + this.offsets = [...new Array(this.numRatios)].map(
23312 + (_) => p22.Offset16
23313 + );
23314 + this.VDMXGroups = [...new Array(this.numRecs)].map(
23315 + (_) => new VDMXGroup(p22)
23316 + );
23317 + }
23318 +};
23319 +var RatioRange = class {
23320 + constructor(p22) {
23321 + this.bCharSet = p22.uint8;
23322 + this.xRatio = p22.uint8;
23323 + this.yStartRatio = p22.uint8;
23324 + this.yEndRatio = p22.uint8;
23325 + }
23326 +};
23327 +var VDMXGroup = class {
23328 + constructor(p22) {
23329 + this.recs = p22.uint16;
23330 + this.startsz = p22.uint8;
23331 + this.endsz = p22.uint8;
23332 + this.records = [...new Array(this.recs)].map(
23333 + (_) => new vTable(p22)
23334 + );
23335 + }
23336 +};
23337 +var vTable = class {
23338 + constructor(p22) {
23339 + this.yPelHeight = p22.uint16;
23340 + this.yMax = p22.int16;
23341 + this.yMin = p22.int16;
23342 + }
23343 +};
23344 +var VDMX$1 = Object.freeze({ __proto__: null, VDMX });
23345 +var vhea = class extends SimpleTable {
23346 + constructor(dict, dataview) {
23347 + const { p: p22 } = super(dict, dataview);
23348 + this.version = p22.fixed;
23349 + this.ascent = this.vertTypoAscender = p22.int16;
23350 + this.descent = this.vertTypoDescender = p22.int16;
23351 + this.lineGap = this.vertTypoLineGap = p22.int16;
23352 + this.advanceHeightMax = p22.int16;
23353 + this.minTopSideBearing = p22.int16;
23354 + this.minBottomSideBearing = p22.int16;
23355 + this.yMaxExtent = p22.int16;
23356 + this.caretSlopeRise = p22.int16;
23357 + this.caretSlopeRun = p22.int16;
23358 + this.caretOffset = p22.int16;
23359 + this.reserved = p22.int16;
23360 + this.reserved = p22.int16;
23361 + this.reserved = p22.int16;
23362 + this.reserved = p22.int16;
23363 + this.metricDataFormat = p22.int16;
23364 + this.numOfLongVerMetrics = p22.uint16;
23365 + p22.verifyLength();
23366 + }
23367 +};
23368 +var vhea$1 = Object.freeze({ __proto__: null, vhea });
23369 +var vmtx = class extends SimpleTable {
23370 + constructor(dict, dataview, tables) {
23371 + super(dict, dataview);
23372 + const numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics;
23373 + const numGlyphs = tables.maxp.numGlyphs;
23374 + const metricsStart = p.currentPosition;
23375 + lazy(this, `vMetrics`, () => {
23376 + p.currentPosition = metricsStart;
23377 + return [...new Array(numOfLongVerMetrics)].map(
23378 + (_) => new LongVertMetric(p.uint16, p.int16)
23379 + );
23380 + });
23381 + if (numOfLongVerMetrics < numGlyphs) {
23382 + const tsbStart = metricsStart + numOfLongVerMetrics * 4;
23383 + lazy(this, `topSideBearings`, () => {
23384 + p.currentPosition = tsbStart;
23385 + return [...new Array(numGlyphs - numOfLongVerMetrics)].map(
23386 + (_) => p.int16
23387 + );
23388 + });
23389 + }
23390 + }
23391 +};
23392 +var LongVertMetric = class {
23393 + constructor(h, b) {
23394 + this.advanceHeight = h;
23395 + this.topSideBearing = b;
23396 + }
23397 +};
23398 +var vmtx$1 = Object.freeze({ __proto__: null, vmtx });
23399 +
23400 +// packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
23401 +var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
23402 +
23403 +// packages/global-styles-ui/build-module/font-library/modal.mjs
23404 +var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
23405 +var { Tabs } = unlock4(import_components27.privateApis);
23406 +var DEFAULT_TAB = {
23407 + id: "installed-fonts",
23408 + title: (0, import_i18n24._x)("Library", "Font library")
23409 +};
23410 +var UPLOAD_TAB = {
23411 + id: "upload-fonts",
23412 + title: (0, import_i18n24._x)("Upload", "noun")
23413 +};
23414 +
23415 +// packages/global-styles-ui/build-module/font-family-item.mjs
23416 +var import_i18n25 = __toESM(require_i18n(), 1);
23417 +var import_components28 = __toESM(require_components(), 1);
23418 +var import_element41 = __toESM(require_element(), 1);
23419 +var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
23420 +
23421 +// packages/global-styles-ui/build-module/font-families.mjs
23422 +var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
23423 +
23424 +// packages/global-styles-ui/build-module/font-sizes/font-sizes-count.mjs
23425 +var import_i18n27 = __toESM(require_i18n(), 1);
23426 +var import_components30 = __toESM(require_components(), 1);
23427 +var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
23428 +
23429 +// packages/global-styles-ui/build-module/text-shadows.mjs
23430 +var import_i18n28 = __toESM(require_i18n(), 1);
23431 +var import_components31 = __toESM(require_components(), 1);
23432 +var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
23433 +
23434 +// packages/global-styles-ui/build-module/screen-typography.mjs
23435 +var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
23436 +
23437 +// packages/global-styles-ui/build-module/screen-typography-element.mjs
23438 +var import_i18n30 = __toESM(require_i18n(), 1);
23439 +var import_components32 = __toESM(require_components(), 1);
23440 +var import_element44 = __toESM(require_element(), 1);
23441 +
23442 +// packages/global-styles-ui/build-module/typography-panel.mjs
23443 +var import_block_editor6 = __toESM(require_block_editor(), 1);
23444 +var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
23445 +var { useSettingsForBlockElement: useSettingsForBlockElement4, TypographyPanel: StylesTypographyPanel2 } = unlock4(import_block_editor6.privateApis);
23446 +
23447 +// packages/global-styles-ui/build-module/typography-preview.mjs
23448 +var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
23449 +
23450 +// packages/global-styles-ui/build-module/screen-typography-element.mjs
23451 +var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
23452 +var elements = {
23453 + text: {
23454 + description: (0, import_i18n30.__)("Manage the fonts used on the site."),
23455 + title: (0, import_i18n30.__)("Text")
23456 + },
23457 + link: {
23458 + description: (0, import_i18n30.__)("Manage the fonts and typography used on the links."),
23459 + title: (0, import_i18n30.__)("Links")
23460 + },
23461 + heading: {
23462 + description: (0, import_i18n30.__)("Manage the fonts and typography used on headings."),
23463 + title: (0, import_i18n30.__)("Headings")
23464 + },
23465 + caption: {
23466 + description: (0, import_i18n30.__)("Manage the fonts and typography used on captions."),
23467 + title: (0, import_i18n30.__)("Captions")
23468 + },
23469 + cite: {
23470 + description: (0, import_i18n30.__)("Manage the fonts and typography used on citations."),
23471 + title: (0, import_i18n30.__)("Citations")
23472 + },
23473 + button: {
23474 + description: (0, import_i18n30.__)("Manage the fonts and typography used on buttons."),
23475 + title: (0, import_i18n30.__)("Buttons")
23476 + },
23477 + textInput: {
23478 + description: (0, import_i18n30.__)("Manage the fonts and typography used on inputs."),
23479 + title: (0, import_i18n30.__)("Inputs")
23480 + },
23481 + select: {
23482 + description: (0, import_i18n30.__)("Manage the fonts and typography used on selects."),
23483 + title: (0, import_i18n30.__)("Selects")
23484 + }
23485 +};
23486 +
23487 +// packages/global-styles-ui/build-module/screen-colors.mjs
23488 +var import_i18n32 = __toESM(require_i18n(), 1);
23489 +var import_components34 = __toESM(require_components(), 1);
23490 +var import_block_editor7 = __toESM(require_block_editor(), 1);
23491 +
23492 +// packages/global-styles-ui/build-module/palette.mjs
23493 +var import_components33 = __toESM(require_components(), 1);
23494 +var import_i18n31 = __toESM(require_i18n(), 1);
23495 +var import_element45 = __toESM(require_element(), 1);
23496 +
23497 +// packages/global-styles-ui/build-module/color-indicator-wrapper.mjs
23498 +var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
23499 +
23500 +// packages/global-styles-ui/build-module/palette.mjs
23501 +var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
23502 +
23503 +// packages/global-styles-ui/build-module/screen-colors.mjs
23504 +var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
23505 +var { useSettingsForBlockElement: useSettingsForBlockElement5, ColorPanel: StylesColorPanel2 } = unlock4(
23506 + import_block_editor7.privateApis
23507 +);
23508 +var ADDITIONAL_ELEMENTS = [
23509 + { name: "cite", label: (0, import_i18n32.__)("Citations") },
23510 + { name: "textInput", label: (0, import_i18n32.__)("Inputs") },
23511 + { name: "select", label: (0, import_i18n32.__)("Selects") }
23512 +];
23513 +
23514 +// packages/global-styles-ui/build-module/screen-color-palette.mjs
23515 +var import_i18n36 = __toESM(require_i18n(), 1);
23516 +
23517 +// packages/global-styles-ui/build-module/color-palette-panel.mjs
23518 +var import_compose5 = __toESM(require_compose(), 1);
23519 +var import_components37 = __toESM(require_components(), 1);
23520 +var import_i18n33 = __toESM(require_i18n(), 1);
23521 +
23522 +// packages/global-styles-ui/build-module/variations/variations-color.mjs
23523 +var import_components36 = __toESM(require_components(), 1);
23524 +
23525 +// packages/global-styles-ui/build-module/preview-colors.mjs
23526 +var import_components35 = __toESM(require_components(), 1);
23527 +
23528 +// packages/global-styles-ui/build-module/preset-colors.mjs
23529 +var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
23530 +function PresetColors() {
23531 + const { paletteColors } = useStylesPreviewColors();
23532 + return paletteColors.slice(0, 4).map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
23533 + "div",
23534 + {
23535 + style: {
23536 + flexGrow: 1,
23537 + height: "100%",
23538 + background: color
23539 + }
23540 + },
23541 + `${slug}-${index2}`
23542 + ));
23543 +}
23544 +
23545 +// packages/global-styles-ui/build-module/preview-colors.mjs
23546 +var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
23547 +var firstFrameVariants2 = {
23548 + start: {
23549 + scale: 1,
23550 + opacity: 1
23551 + },
23552 + hover: {
23553 + scale: 0,
23554 + opacity: 0
23555 + }
23556 +};
23557 +var StylesPreviewColors = ({
23558 + label,
23559 + isFocused,
23560 + withHoverView
23561 +}) => {
23562 + return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
23563 + preview_wrapper_default,
23564 + {
23565 + label,
23566 + isFocused,
23567 + withHoverView,
23568 + children: ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
23569 + import_components35.__unstableMotion.div,
23570 + {
23571 + variants: firstFrameVariants2,
23572 + style: {
23573 + height: "100%",
23574 + overflow: "hidden"
23575 + },
23576 + children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
23577 + import_components35.__experimentalHStack,
23578 + {
23579 + spacing: 0,
23580 + justify: "center",
23581 + style: {
23582 + height: "100%",
23583 + overflow: "hidden"
23584 + },
23585 + children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PresetColors, {})
23586 + }
23587 + )
23588 + },
23589 + key
23590 + )
23591 + }
23592 + );
23593 +};
23594 +var preview_colors_default = StylesPreviewColors;
23595 +
23596 +// packages/global-styles-ui/build-module/variations/variations-color.mjs
23597 +var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
23598 +var propertiesToFilter2 = ["color"];
23599 +function ColorVariations({
23600 + title,
23601 + gap = 2
23602 +}) {
23603 + const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter2);
23604 + if (colorVariations?.length <= 1) {
23605 + return null;
23606 + }
23607 + return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_components36.__experimentalVStack, { spacing: 3, children: [
23608 + title && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Subtitle, { level: 3, children: title }),
23609 + /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components36.__experimentalGrid, { gap, children: colorVariations.map((variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
23610 + Variation,
1218 23611 {
1219 - path: section,
1220 - onPathChange: onChangeSection,
1221 - settings: editorSettings
23612 + variation,
23613 + isPill: true,
23614 + properties: propertiesToFilter2,
23615 + showTooltip: true,
23616 + children: () => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(preview_colors_default, {})
23617 + },
23618 + index2
23619 + )) })
23620 + ] });
23621 +}
23622 +
23623 +// packages/global-styles-ui/build-module/color-palette-panel.mjs
23624 +var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
23625 +
23626 +// packages/global-styles-ui/build-module/gradients-palette-panel.mjs
23627 +var import_compose6 = __toESM(require_compose(), 1);
23628 +var import_components38 = __toESM(require_components(), 1);
23629 +var import_i18n34 = __toESM(require_i18n(), 1);
23630 +var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
23631 +
23632 +// packages/global-styles-ui/build-module/duotone-palette-panel.mjs
23633 +var import_compose7 = __toESM(require_compose(), 1);
23634 +var import_element46 = __toESM(require_element(), 1);
23635 +var import_components39 = __toESM(require_components(), 1);
23636 +var import_i18n35 = __toESM(require_i18n(), 1);
23637 +var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
23638 +
23639 +// packages/global-styles-ui/build-module/screen-color-palette.mjs
23640 +var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
23641 +
23642 +// packages/global-styles-ui/build-module/screen-background.mjs
23643 +var import_i18n37 = __toESM(require_i18n(), 1);
23644 +var import_block_editor9 = __toESM(require_block_editor(), 1);
23645 +var import_components40 = __toESM(require_components(), 1);
23646 +
23647 +// packages/global-styles-ui/build-module/background-panel.mjs
23648 +var import_block_editor8 = __toESM(require_block_editor(), 1);
23649 +var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
23650 +var { BackgroundPanel: StylesBackgroundPanel2 } = unlock4(
23651 + import_block_editor8.privateApis
23652 +);
23653 +
23654 +// packages/global-styles-ui/build-module/screen-background.mjs
23655 +var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
23656 +var { useHasBackgroundPanel: useHasBackgroundPanel4 } = unlock4(import_block_editor9.privateApis);
23657 +
23658 +// packages/global-styles-ui/build-module/shadows-panel.mjs
23659 +var import_i18n40 = __toESM(require_i18n(), 1);
23660 +
23661 +// packages/global-styles-ui/build-module/presets/preset-group.mjs
23662 +var import_components42 = __toESM(require_components(), 1);
23663 +var import_i18n39 = __toESM(require_i18n(), 1);
23664 +var import_element47 = __toESM(require_element(), 1);
23665 +
23666 +// packages/global-styles-ui/build-module/presets/dialogs/confirm-reset-dialog.mjs
23667 +var import_components41 = __toESM(require_components(), 1);
23668 +var import_i18n38 = __toESM(require_i18n(), 1);
23669 +var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
23670 +
23671 +// packages/global-styles-ui/build-module/presets/preset-group.mjs
23672 +var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
23673 +
23674 +// packages/global-styles-ui/build-module/shadows-panel.mjs
23675 +var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
23676 +
23677 +// packages/global-styles-ui/build-module/shadows-edit-panel.mjs
23678 +var import_components46 = __toESM(require_components(), 1);
23679 +var import_i18n43 = __toESM(require_i18n(), 1);
23680 +var import_element49 = __toESM(require_element(), 1);
23681 +
23682 +// packages/global-styles-ui/build-module/presets/preset-edit-header.mjs
23683 +var import_components43 = __toESM(require_components(), 1);
23684 +var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
23685 +
23686 +// packages/global-styles-ui/build-module/presets/dialogs/confirm-delete-dialog.mjs
23687 +var import_components44 = __toESM(require_components(), 1);
23688 +var import_i18n41 = __toESM(require_i18n(), 1);
23689 +var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
23690 +
23691 +// packages/global-styles-ui/build-module/presets/dialogs/rename-dialog.mjs
23692 +var import_components45 = __toESM(require_components(), 1);
23693 +var import_i18n42 = __toESM(require_i18n(), 1);
23694 +var import_element48 = __toESM(require_element(), 1);
23695 +var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
23696 +
23697 +// packages/global-styles-ui/build-module/shadows-edit-panel.mjs
23698 +var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
23699 +
23700 +// packages/global-styles-ui/build-module/screen-shadows.mjs
23701 +var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
23702 +
23703 +// packages/global-styles-ui/build-module/screen-text-shadows.mjs
23704 +var import_i18n44 = __toESM(require_i18n(), 1);
23705 +var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
23706 +
23707 +// packages/global-styles-ui/build-module/screen-text-shadows-edit.mjs
23708 +var import_components47 = __toESM(require_components(), 1);
23709 +var import_i18n45 = __toESM(require_i18n(), 1);
23710 +var import_element50 = __toESM(require_element(), 1);
23711 +var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
23712 +
23713 +// packages/global-styles-ui/build-module/screen-layout.mjs
23714 +var import_i18n46 = __toESM(require_i18n(), 1);
23715 +var import_block_editor11 = __toESM(require_block_editor(), 1);
23716 +
23717 +// packages/global-styles-ui/build-module/dimensions-panel.mjs
23718 +var import_block_editor10 = __toESM(require_block_editor(), 1);
23719 +var import_element51 = __toESM(require_element(), 1);
23720 +var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
23721 +var { useSettingsForBlockElement: useSettingsForBlockElement6, DimensionsPanel: StylesDimensionsPanel2 } = unlock4(import_block_editor10.privateApis);
23722 +
23723 +// packages/global-styles-ui/build-module/screen-layout.mjs
23724 +var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
23725 +var { useHasDimensionsPanel: useHasDimensionsPanel4, useSettingsForBlockElement: useSettingsForBlockElement7 } = unlock4(
23726 + import_block_editor11.privateApis
23727 +);
23728 +
23729 +// packages/global-styles-ui/build-module/screen-style-variations.mjs
23730 +var import_components50 = __toESM(require_components(), 1);
23731 +var import_i18n49 = __toESM(require_i18n(), 1);
23732 +
23733 +// packages/global-styles-ui/build-module/style-variations-content.mjs
23734 +var import_i18n48 = __toESM(require_i18n(), 1);
23735 +var import_components49 = __toESM(require_components(), 1);
23736 +
23737 +// packages/global-styles-ui/build-module/style-variations-container.mjs
23738 +var import_core_data11 = __toESM(require_core_data(), 1);
23739 +var import_data10 = __toESM(require_data(), 1);
23740 +var import_element52 = __toESM(require_element(), 1);
23741 +var import_components48 = __toESM(require_components(), 1);
23742 +var import_i18n47 = __toESM(require_i18n(), 1);
23743 +var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
23744 +function StyleVariationsContainer({
23745 + gap = 2
23746 +}) {
23747 + const { user } = (0, import_element52.useContext)(GlobalStylesContext);
23748 + const userStyles = user?.styles;
23749 + const variations = (0, import_data10.useSelect)((select) => {
23750 + const result = select(
23751 + import_core_data11.store
23752 + ).__experimentalGetCurrentThemeGlobalStylesVariations();
23753 + return Array.isArray(result) ? result : void 0;
23754 + }, []);
23755 + const fullStyleVariations = variations?.filter(
23756 + (variation) => {
23757 + return !isVariationWithProperties(variation, ["color"]) && !isVariationWithProperties(variation, [
23758 + "typography",
23759 + "spacing"
23760 + ]);
23761 + }
23762 + );
23763 + const themeVariations = (0, import_element52.useMemo)(() => {
23764 + const withEmptyVariation = [
23765 + {
23766 + title: (0, import_i18n47.__)("Default"),
23767 + settings: {},
23768 + styles: {}
23769 + },
23770 + ...fullStyleVariations ?? []
23771 + ];
23772 + return [
23773 + ...withEmptyVariation.map((variation) => {
23774 + const blockStyles = variation?.styles?.blocks ? { ...variation.styles.blocks } : {};
23775 + if (userStyles?.blocks) {
23776 + Object.keys(userStyles.blocks).forEach((blockName) => {
23777 + if (userStyles.blocks?.[blockName]?.css) {
23778 + const variationBlockStyles = blockStyles[blockName] || {};
23779 + const customCSS = {
23780 + css: `${blockStyles[blockName]?.css || ""} ${userStyles.blocks?.[blockName]?.css?.trim() || ""}`
23781 + };
23782 + blockStyles[blockName] = {
23783 + ...variationBlockStyles,
23784 + ...customCSS
23785 + };
23786 + }
23787 + });
23788 + }
23789 + const css = userStyles?.css || variation.styles?.css ? {
23790 + css: `${variation.styles?.css || ""} ${userStyles?.css || ""}`
23791 + } : {};
23792 + const blocks = Object.keys(blockStyles).length > 0 ? { blocks: blockStyles } : {};
23793 + const styles = {
23794 + ...variation.styles,
23795 + ...css,
23796 + ...blocks
23797 + };
23798 + return {
23799 + ...variation,
23800 + settings: variation.settings ?? {},
23801 + styles
23802 + };
23803 + })
23804 + ];
23805 + }, [fullStyleVariations, userStyles?.blocks, userStyles?.css]);
23806 + if (!fullStyleVariations || fullStyleVariations.length < 1) {
23807 + return null;
23808 + }
23809 + return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
23810 + import_components48.__experimentalGrid,
23811 + {
23812 + columns: 2,
23813 + className: "global-styles-ui-style-variations-container",
23814 + gap,
23815 + children: themeVariations.map(
23816 + (variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Variation, { variation, children: (isFocused) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
23817 + preview_styles_default,
23818 + {
23819 + label: variation?.title,
23820 + withHoverView: true,
23821 + isFocused,
23822 + variation
23823 + }
23824 + ) }, index2)
23825 + )
23826 + }
23827 + );
23828 +}
23829 +var style_variations_container_default = StyleVariationsContainer;
23830 +
23831 +// packages/global-styles-ui/build-module/style-variations-content.mjs
23832 +var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
23833 +
23834 +// packages/global-styles-ui/build-module/screen-style-variations.mjs
23835 +var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
23836 +
23837 +// packages/global-styles-ui/build-module/screen-css.mjs
23838 +var import_i18n50 = __toESM(require_i18n(), 1);
23839 +var import_components51 = __toESM(require_components(), 1);
23840 +var import_block_editor12 = __toESM(require_block_editor(), 1);
23841 +var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
23842 +var { AdvancedPanel: StylesAdvancedPanel2 } = unlock4(import_block_editor12.privateApis);
23843 +
23844 +// packages/global-styles-ui/build-module/screen-revisions/index.mjs
23845 +var import_i18n52 = __toESM(require_i18n(), 1);
23846 +var import_components52 = __toESM(require_components(), 1);
23847 +var import_element55 = __toESM(require_element(), 1);
23848 +
23849 +// packages/global-styles-ui/build-module/screen-revisions/use-global-styles-revisions.mjs
23850 +var import_data11 = __toESM(require_data(), 1);
23851 +var import_core_data12 = __toESM(require_core_data(), 1);
23852 +var import_element53 = __toESM(require_element(), 1);
23853 +var SITE_EDITOR_AUTHORS_QUERY = {
23854 + per_page: -1,
23855 + _fields: "id,name,avatar_urls",
23856 + context: "view",
23857 + capabilities: ["edit_theme_options"]
23858 +};
23859 +var DEFAULT_QUERY = { per_page: 100, page: 1 };
23860 +var EMPTY_ARRAY3 = [];
23861 +function useGlobalStylesRevisions({
23862 + query
23863 +} = {}) {
23864 + const { user: userConfig } = (0, import_element53.useContext)(GlobalStylesContext);
23865 + const _query = (0, import_element53.useMemo)(
23866 + () => ({ ...DEFAULT_QUERY, ...query }),
23867 + [query]
23868 + );
23869 + const {
23870 + authors,
23871 + currentUser,
23872 + isDirty,
23873 + revisions,
23874 + isLoadingGlobalStylesRevisions,
23875 + revisionsCount
23876 + } = (0, import_data11.useSelect)(
23877 + (select) => {
23878 + const {
23879 + __experimentalGetDirtyEntityRecords,
23880 + getCurrentUser,
23881 + getUsers,
23882 + getRevisions,
23883 + __experimentalGetCurrentGlobalStylesId,
23884 + getEntityRecord,
23885 + isResolving
23886 + } = select(import_core_data12.store);
23887 + const dirtyEntityRecords = __experimentalGetDirtyEntityRecords() || [];
23888 + const _currentUser = getCurrentUser();
23889 + const _isDirty = dirtyEntityRecords.length > 0;
23890 + const globalStylesId = __experimentalGetCurrentGlobalStylesId();
23891 + const globalStyles = globalStylesId ? getEntityRecord("root", "globalStyles", globalStylesId) : void 0;
23892 + const _revisionsCount = globalStyles?._links?.["version-history"]?.[0]?.count ?? 0;
23893 + const globalStylesRevisions = globalStylesId ? getRevisions(
23894 + "root",
23895 + "globalStyles",
23896 + globalStylesId,
23897 + _query
23898 + ) || EMPTY_ARRAY3 : EMPTY_ARRAY3;
23899 + const _authors = getUsers(SITE_EDITOR_AUTHORS_QUERY) || EMPTY_ARRAY3;
23900 + const _isResolving = globalStylesId ? isResolving("getRevisions", [
23901 + "root",
23902 + "globalStyles",
23903 + globalStylesId,
23904 + _query
23905 + ]) : false;
23906 + return {
23907 + authors: _authors,
23908 + currentUser: _currentUser,
23909 + isDirty: _isDirty,
23910 + revisions: globalStylesRevisions,
23911 + isLoadingGlobalStylesRevisions: _isResolving,
23912 + revisionsCount: _revisionsCount
23913 + };
23914 + },
23915 + [_query]
23916 + );
23917 + return (0, import_element53.useMemo)(() => {
23918 + if (!authors.length || isLoadingGlobalStylesRevisions) {
23919 + return {
23920 + revisions: EMPTY_ARRAY3,
23921 + hasUnsavedChanges: isDirty,
23922 + isLoading: true,
23923 + revisionsCount
23924 + };
23925 + }
23926 + const _modifiedRevisions = revisions.map((revision) => {
23927 + return {
23928 + ...revision,
23929 + author: authors.find(
23930 + (author) => author.id === revision.author
23931 + )
23932 + };
23933 + });
23934 + const fetchedRevisionsCount = revisions.length;
23935 + if (fetchedRevisionsCount) {
23936 + if (_modifiedRevisions[0].id !== "unsaved" && _query.page === 1) {
23937 + _modifiedRevisions[0].isLatest = true;
1222 23938 }
1223 - )
1224 - );
23939 + if (isDirty && userConfig && Object.keys(userConfig).length > 0 && currentUser && _query.page === 1) {
23940 + const unsavedRevision = {
23941 + id: "unsaved",
23942 + styles: userConfig?.styles,
23943 + settings: userConfig?.settings,
23944 + _links: userConfig?._links,
23945 + author: {
23946 + name: currentUser?.name || "",
23947 + // @ts-expect-error - avatar_urls is not typed in User
23948 + avatar_urls: currentUser?.avatar_urls || {}
23949 + },
23950 + modified: /* @__PURE__ */ new Date()
23951 + };
23952 + _modifiedRevisions.unshift(unsavedRevision);
23953 + }
23954 + if (_query.per_page && _query.page === Math.ceil(revisionsCount / _query.per_page)) {
23955 + _modifiedRevisions.push({
23956 + id: "parent",
23957 + styles: {},
23958 + settings: {}
23959 + });
23960 + }
23961 + }
23962 + return {
23963 + revisions: _modifiedRevisions,
23964 + hasUnsavedChanges: isDirty,
23965 + isLoading: false,
23966 + revisionsCount
23967 + };
23968 + }, [
23969 + isDirty,
23970 + revisions,
23971 + currentUser,
23972 + authors,
23973 + userConfig,
23974 + isLoadingGlobalStylesRevisions,
23975 + revisionsCount,
23976 + _query.page,
23977 + _query.per_page
23978 + ]);
1225 23979 }
1226 -var stage = Stage;
1227 23980
23981 +// packages/global-styles-ui/build-module/screen-revisions/revisions-list.mjs
23982 +var import_i18n51 = __toESM(require_i18n(), 1);
23983 +var import_date = __toESM(require_date(), 1);
23984 +var import_core_data13 = __toESM(require_core_data(), 1);
23985 +var import_data12 = __toESM(require_data(), 1);
23986 +var import_element54 = __toESM(require_element(), 1);
23987 +var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
23988 +var DAY_IN_MILLISECONDS = 60 * 60 * 1e3 * 24;
23989 +
23990 +// packages/global-styles-ui/build-module/screen-revisions/index.mjs
23991 +var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
23992 +
23993 +// packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs
23994 +var import_i18n53 = __toESM(require_i18n(), 1);
23995 +var import_components53 = __toESM(require_components(), 1);
23996 +var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
23997 +
23998 +// packages/global-styles-ui/build-module/font-sizes/font-size.mjs
23999 +var import_i18n55 = __toESM(require_i18n(), 1);
24000 +var import_components55 = __toESM(require_components(), 1);
24001 +var import_element56 = __toESM(require_element(), 1);
24002 +
24003 +// packages/global-styles-ui/build-module/font-sizes/font-size-preview.mjs
24004 +var import_block_editor13 = __toESM(require_block_editor(), 1);
24005 +var import_i18n54 = __toESM(require_i18n(), 1);
24006 +var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
24007 +
24008 +// packages/global-styles-ui/build-module/size-control/index.mjs
24009 +var import_components54 = __toESM(require_components(), 1);
24010 +var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
24011 +
24012 +// packages/global-styles-ui/build-module/font-sizes/font-size.mjs
24013 +var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
24014 +
24015 +// packages/global-styles-ui/build-module/global-styles-ui.mjs
24016 +var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
24017 +
24018 +// packages/global-styles-ui/build-module/with-global-styles-provider.mjs
24019 +var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
24020 +function withGlobalStylesProvider(Component) {
24021 + return function WrappedComponent({
24022 + value,
24023 + baseValue,
24024 + onChange,
24025 + ...props
24026 + }) {
24027 + return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
24028 + GlobalStylesProvider,
24029 + {
24030 + value,
24031 + baseValue,
24032 + onChange,
24033 + children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Component, { ...props })
24034 + }
24035 + );
24036 + };
24037 +}
24038 +
24039 +// packages/global-styles-ui/build-module/style-variations.mjs
24040 +var StyleVariations = withGlobalStylesProvider(style_variations_container_default);
24041 +
24042 +// packages/global-styles-ui/build-module/color-variations.mjs
24043 +var ColorVariations2 = withGlobalStylesProvider(ColorVariations);
24044 +
24045 +// packages/global-styles-ui/build-module/typography-variations.mjs
24046 +var TypographyVariations2 = withGlobalStylesProvider(TypographyVariations);
24047 +
24048 +// packages/global-styles-ui/build-module/font-library/font-library.mjs
24049 +var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
24050 +
1228 24051 // routes/styles/canvas.tsx
1229 -var import_editor2 = __toESM(require_editor());
1230 -var import_components3 = __toESM(require_components());
1231 -import { useNavigate as useNavigate2, useSearch as useSearch2 } from "@wordpress/route";
1232 -import { useEditorAssets } from "@wordpress/lazy-editor";
1233 -var { StyleBookPreview } = unlock(import_editor2.privateApis);
24052 +var import_jsx_runtime103 = __toESM(require_jsx_runtime());
24053 +var { StyleBookPreview } = unlock2(import_editor2.privateApis);
24054 +function RevisionStyleBookPreview({
24055 + revisionId,
24056 + section,
24057 + onChangeSection,
24058 + settings
24059 +}) {
24060 + const { revisions, isLoading } = useGlobalStylesRevisions();
24061 + if (isLoading) {
24062 + return null;
24063 + }
24064 + const selectedRevision = revisions.find(
24065 + (revision) => String(revision.id) === revisionId
24066 + );
24067 + return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
24068 + StyleBookPreview,
24069 + {
24070 + path: section,
24071 + onPathChange: onChangeSection,
24072 + settings,
24073 + userConfig: selectedRevision
24074 + }
24075 + );
24076 +}
1234 24077 function Canvas() {
1235 24078 const { isReady: assetsReady } = useEditorAssets();
1236 24079 const navigate = useNavigate2();
1237 24080 const search = useSearch2({ strict: false });
24081 + const { globalStylesId, isBlockTheme } = (0, import_data14.useSelect)((select) => {
24082 + const { getCurrentTheme, __experimentalGetCurrentGlobalStylesId } = select(import_core_data14.store);
24083 + return {
24084 + globalStylesId: __experimentalGetCurrentGlobalStylesId(),
24085 + isBlockTheme: !!getCurrentTheme()?.is_block_theme
24086 + };
24087 + }, []);
24088 + const { isReady: settingsReady, editorSettings } = useEditorSettings2({
24089 + stylesId: globalStylesId
24090 + });
1238 24091 const section = search.section ?? "/";
1239 24092 const onChangeSection = (updatedSection) => {
1240 24093 navigate({
1241 24094 search: {
@@ -1243,10 +24096,10 @@
1243 24096 section: updatedSection
1244 24097 }
1245 24098 });
1246 24099 };
1247 - if (!assetsReady) {
1248 - return /* @__PURE__ */ React.createElement(
24100 + if (!assetsReady || !settingsReady) {
24101 + return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
1249 24102 "div",
1250 24103 {
1251 24104 style: {
1252 24105 display: "flex",
@@ -1252,14 +24105,36 @@
1252 24105 display: "flex",
1253 24106 justifyContent: "center",
1254 24107 alignItems: "center",
1255 24108 height: "100%"
1256 - }
1257 - },
1258 - /* @__PURE__ */ React.createElement(import_components3.Spinner, null)
24109 + },
24110 + children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_components57.Spinner, {})
24111 + }
1259 24112 );
1260 24113 }
1261 - return /* @__PURE__ */ React.createElement(StyleBookPreview, { path: section, onPathChange: onChangeSection });
24114 + if (!isBlockTheme) {
24115 + return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(StyleBookPreview, { isStatic: true, settings: editorSettings });
24116 + }
24117 + const revisionId = section.match(/^\/revisions\/(.+)$/)?.[1];
24118 + if (revisionId) {
24119 + return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
24120 + RevisionStyleBookPreview,
24121 + {
24122 + revisionId,
24123 + section,
24124 + onChangeSection,
24125 + settings: editorSettings
24126 + }
24127 + );
24128 + }
24129 + return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
24130 + StyleBookPreview,
24131 + {
24132 + path: section,
24133 + onPathChange: onChangeSection,
24134 + settings: editorSettings
24135 + }
24136 + );
1262 24137 }
1263 24138 var canvas = Canvas;
1264 24139 export {
1265 24140 canvas,
@@ -1264,4 +24139,36 @@
1264 24139 export {
1265 24140 canvas,
1266 24141 stage
1267 24142 };
24143 +/*! Bundled license information:
24144 +
24145 +use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
24146 + (**
24147 + * @license React
24148 + * use-sync-external-store-shim.development.js
24149 + *
24150 + * Copyright (c) Meta Platforms, Inc. and affiliates.
24151 + *
24152 + * This source code is licensed under the MIT license found in the
24153 + * LICENSE file in the root directory of this source tree.
24154 + *)
24155 +
24156 +use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
24157 + (**
24158 + * @license React
24159 + * use-sync-external-store-shim/with-selector.development.js
24160 + *
24161 + * Copyright (c) Meta Platforms, Inc. and affiliates.
24162 + *
24163 + * This source code is licensed under the MIT license found in the
24164 + * LICENSE file in the root directory of this source tree.
24165 + *)
24166 +
24167 +is-plain-object/dist/is-plain-object.mjs:
24168 + (*!
24169 + * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
24170 + *
24171 + * Copyright (c) 2014-2017, Jon Schlinkert.
24172 + * Released under the MIT License.
24173 + *)
24174 +*/